/* ============================================================================
   MagiKai / EJF — système visuel
   Bleu nuit institutionnel, or, papier. Deux surfaces : un tableau de bord
   technique (hub) et une page de conviction (EJF).
   ========================================================================== */

@font-face {
  font-family: "Cinzel";
  src: url("/assets/fonts/Cinzel.ttf") format("truetype");
  font-weight: 400 900;
  font-display: swap;
}
@font-face {
  font-family: "Grotesk";
  src: url("/assets/fonts/SpaceGrotesk.ttf") format("truetype-variations"),
       url("/assets/fonts/SpaceGrotesk.ttf") format("truetype");
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --ink:        #f7f3e9;
  --ink-soft:   #cfd6e2;
  --muted:      #8f9bb1;
  --navy:       #061530;
  --surface:    #0a1f3f;
  --surface-2:  #0d284f;
  --line:       rgba(201, 162, 39, 0.18);
  --line-soft:  rgba(207, 214, 226, 0.12);
  --gold:       #c9a227;
  --gold-lift:  #f0cd72;
  --ok:         #4ec9a0;
  --wait:       #d9a441;

  --display: "Cinzel", "Times New Roman", serif;
  --ui: "Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, monospace;

  --measure: 62ch;
  --gutter: clamp(20px, 5vw, 72px);
  --rule: 1px solid var(--line);
  --r: 4px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--navy);
  color: var(--ink);
  font-family: var(--ui);
  font-size: clamp(15px, 0.95vw + 12px, 17px);
  line-height: 1.6;
  font-weight: 400;
  text-wrap: pretty;
  -webkit-font-smoothing: antialiased;
}

/* le grain très discret évite le fond « plat » des dégradés */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
  background:
    radial-gradient(1100px 620px at 78% -8%, rgba(201, 162, 39, 0.10), transparent 62%),
    radial-gradient(900px 520px at 4% 102%, rgba(43, 96, 176, 0.16), transparent 65%);
}

.shell { position: relative; z-index: 1; }
.wrap { max-width: 1180px; margin-inline: auto; padding-inline: var(--gutter); }

a { color: var(--gold-lift); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #fff; }

:focus-visible {
  outline: 2px solid var(--gold-lift);
  outline-offset: 3px;
  border-radius: 2px;
}

h1, h2, h3 { font-weight: 400; margin: 0; text-wrap: balance; }
p { margin: 0; }
img { max-width: 100%; display: block; }

.eyebrow {
  font-family: var(--ui);
  font-size: 11.5px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  font-size: 11px;
}

/* ───────────────────────────────────────────── en-tête */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 22px;
  border-bottom: var(--rule);
}
.brand { display: flex; align-items: center; gap: 13px; text-decoration: none; color: var(--ink); }
.brand img { width: 40px; height: 40px; border-radius: 9px; }
.brand b { font-family: var(--display); font-size: 19px; letter-spacing: 0.06em; font-weight: 600; white-space: nowrap; }
.brand span { display: block; font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin-top: 1px; }

.nav { display: flex; gap: 26px; align-items: center; }
.nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 13.5px;
  letter-spacing: 0.02em;
  padding-block: 10px;
  border-bottom: 1px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.nav a:hover { color: var(--ink); border-color: var(--gold); }

/* ───────────────────────────────────────────── boutons */
.btn {
  --bg: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 22px;
  border-radius: var(--r);
  border: 1px solid var(--gold);
  background: var(--bg);
  color: var(--ink);
  font: 500 14px/1 var(--ui);
  letter-spacing: 0.03em;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.18s var(--ease), color 0.18s var(--ease), transform 0.18s var(--ease);
}
.btn:hover { background: var(--gold); color: #14100a; }
.btn:active { transform: translateY(1px); }
.btn.solid { background: var(--gold); color: #14100a; }
.btn.solid:hover { background: var(--gold-lift); }
.btn.ghost { border-color: var(--line-soft); color: var(--ink-soft); }
.btn.ghost:hover { border-color: var(--gold); color: var(--ink); background: transparent; }

/* ───────────────────────────────────────────── hub : tableau de bord */
.hub-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 32px;
  padding-block: clamp(48px, 7vw, 84px) clamp(28px, 4vw, 44px);
}
.hub-head h1 {
  font-family: var(--display);
  font-size: clamp(30px, 4.4vw, 54px);
  line-height: 1.06;
  letter-spacing: 0.01em;
  margin-bottom: 14px;
}
.hub-head p { color: var(--muted); max-width: 46ch; }
.clock {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  text-align: right;
  line-height: 1.9;
  white-space: nowrap;
}
.clock b { color: var(--ink-soft); font-weight: 500; }

.services { border-top: var(--rule); }
.svc-row {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr) minmax(120px, max-content) auto;
  align-items: center;
  gap: 20px;
  padding: 20px 4px;
  border-bottom: 1px solid var(--line-soft);
  text-decoration: none;
  color: inherit;
  transition: background 0.18s var(--ease), padding-left 0.18s var(--ease);
}
a.svc-row:hover { background: rgba(201, 162, 39, 0.05); padding-left: 12px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(78, 201, 160, 0.14); }
.dot.wait { background: var(--wait); box-shadow: 0 0 0 3px rgba(217, 164, 65, 0.14); }
.svc-name { font-size: 15.5px; font-weight: 500; }
.svc-name small { display: block; color: var(--muted); font-size: 12.5px; font-weight: 400; margin-top: 3px; letter-spacing: 0.01em; }
.svc-host { font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.svc-tag {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 5px 11px;
  white-space: nowrap;
}
.svc-tag.up { color: var(--ok); border-color: rgba(78, 201, 160, 0.35); }
.svc-tag.soon { color: var(--wait); border-color: rgba(217, 164, 65, 0.35); }

.hub-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  justify-content: space-between;
  padding-block: 30px 60px;
  color: var(--muted);
  font-size: 12.5px;
}
.hub-foot code { font-family: var(--mono); color: var(--ink-soft); }

/* ───────────────────────────────────────────── EJF : page de conviction */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  padding-block: clamp(44px, 7vw, 92px) clamp(40px, 6vw, 76px);
}
.hero h1 {
  font-family: var(--display);
  font-size: clamp(29px, 3.7vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.005em;
  margin: 18px 0 22px;
}
.hero h1 { max-width: 17ch; }
.hero h1 em { font-style: normal; color: var(--gold-lift); }
.hero p { color: var(--ink-soft); max-width: 44ch; font-size: clamp(15px, 1.1vw + 11px, 18px); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }

.mark { position: relative; justify-self: center; width: min(88%, 360px); }
.mark img { width: 100%; filter: drop-shadow(0 26px 48px rgba(0, 0, 0, 0.45)); }

/* services : lignes numérotées, pas de cartes */
.section { padding-block: clamp(36px, 4.6vw, 66px); border-top: var(--rule); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; margin-bottom: 40px; flex-wrap: wrap; }
.section-head h2 { font-family: var(--display); font-size: clamp(24px, 2.6vw, 34px); letter-spacing: 0.01em; }
.section-head p { color: var(--muted); font-size: 13.5px; max-width: 34ch; }

.list { border-top: var(--rule); }
.item {
  display: grid;
  grid-template-columns: 68px minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(16px, 3vw, 40px);
  align-items: start;
  padding-block: 26px;
  border-bottom: 1px solid var(--line-soft);
}
.item .num { font-family: var(--display); font-size: 15px; color: var(--gold); letter-spacing: 0.08em; padding-top: 3px; }
.item h3 { font-size: clamp(17px, 1.5vw, 21px); font-weight: 500; letter-spacing: 0.005em; }
.item p { color: var(--muted); font-size: 14px; margin-top: 7px; }
.item .deliver { font-family: var(--mono); font-size: 12px; color: var(--ink-soft); text-align: right; line-height: 1.9; }

/* méthode */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 44px); }
.step { position: relative; padding-top: 26px; border-top: 1px solid var(--line); }
.step::before {
  content: "";
  position: absolute; top: -4px; left: 0;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--gold);
}
.step span { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.16em; color: var(--muted); }
.step h3 { font-size: 17px; margin: 8px 0 10px; font-weight: 500; }
.step p { color: var(--muted); font-size: 14px; }

/* bandeau de contact */
.contact {
  border-top: var(--rule);
  padding-block: clamp(40px, 5.4vw, 74px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: center;
}
.contact h2 { font-family: var(--display); font-size: clamp(26px, 3.4vw, 44px); line-height: 1.1; }
.contact p { color: var(--muted); margin-top: 12px; max-width: 48ch; font-size: 14.5px; }
.contact .btn { min-height: 52px; padding-inline: 28px; }

.foot {
  border-top: 1px solid var(--line-soft);
  padding-block: 24px 44px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12.5px;
}

/* ───────────────────────────────────────────── page d'attente */
.wait-screen { min-height: 100svh; display: grid; place-items: center; text-align: center; padding: var(--gutter); }
.wait-screen .inner { max-width: 540px; }
.wait-screen .rule { width: 64px; height: 2px; background: var(--gold); margin: 0 auto 28px; }
.wait-screen h1 { font-family: var(--display); font-size: clamp(26px, 3.6vw, 40px); line-height: 1.12; margin-bottom: 16px; }
.wait-screen p { color: var(--muted); }
.wait-screen .back { display: inline-block; margin-top: 30px; font-size: 13.5px; }

/* ───────────────────────────────────────────── adaptatif */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 18px; }
  .mark { order: -1; width: min(56%, 220px); margin-bottom: 8px; }
  .brand span span { display: none; }
  .top { padding-block: 16px; }
  .item { grid-template-columns: 46px 1fr; }
  .item .deliver { grid-column: 2; text-align: left; }
  .steps { grid-template-columns: 1fr; }
  .hub-head { grid-template-columns: 1fr; }
  .clock { text-align: left; }
  .contact { grid-template-columns: 1fr; }
  .nav { gap: 14px; }
  .nav a { font-size: 12.5px; padding-block: 6px; }
  .svc-row { grid-template-columns: 12px 1fr auto; }
  .svc-host { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

@media print {
  body::before { display: none; }
  body { background: #fff; color: #111; }
  .nav, .btn { display: none; }
}
