/* Capri — feuille de style unique pour les 3 pages.
   Si tu touches a un truc ici, bump le ?v= dans les 3 HTML,
   sinon le cache Apache d'un mois te sert l'ancienne version. */

/* ---------- FONTES AUTO-HÉBERGÉES ---------- */
@font-face {
  font-family: 'Archivo';
  src: url('../fonts/archivo-var-latin.woff2') format('woff2-variations');
  font-weight: 400 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('../fonts/jetbrains-var-latin.woff2') format('woff2-variations');
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

/* jetons */
:root {
  /* Surfaces — charbon chaud, jamais noir pur */
  --ink-900: #0C0B09;
  --ink-850: #121110;
  --ink-800: #171512;
  --ink-700: #201D19;
  --line:    #2C2823;
  --line-2:  #3A342D;

  /* Encre */
  --paper:   #F4EFE7;
  --paper-2: #B9AFA3;
  /* Eclairci pour rester lisible au coeur du halo du fond anime. */
  --paper-3: #9F958B;

  /* Routes — trois marqueurs d'un même monde, pas trois marques */
  --amber:  #F0913C;
  --signal: #64B6C9;
  --sage:   #8CAE8F;
  /* Quatrieme route. Le violet Twitch officiel (#9146FF) plafonne a 4,24:1
     sur ce fond : il ne passe pas. Celui-ci se cale sur la meme luminance
     que les trois autres accents (L = 0,39) donc la famille tient. */
  --orchid: #B79BE0;

  /* Rouge d'antenne : uniquement le voyant du direct, jamais du texte. */
  --onair:  #E5484D;

  /* Accent actif : chaque page redéfinit --route */
  --route: var(--amber);
  --route-ink: #0C0B09;

  /* Rythme */
  --gutter: clamp(20px, 5vw, 64px);
  --measure: 68ch;
  --radius: 4px;
  --radius-lg: 10px;

  /* Mouvement */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-cut: cubic-bezier(0.2, 0.8, 0.2, 1);

  /* Profondeur — décalage + flou, jamais un halo centré */
  --lift-1: 0 2px 4px rgba(0,0,0,.34), 0 8px 20px rgba(0,0,0,.28);
  --lift-2: 0 6px 14px rgba(0,0,0,.42), 0 26px 56px rgba(0,0,0,.36);
}

/* fond anime
   Le canevas se place derriere tout le contenu. Le fond du body est
   identique a la couleur de base du shader : si WebGL manque, si le
   mouvement est reduit ou si la connexion est economisee, il n'y a
   aucun saut visuel, juste une page unie. */
#bg {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: -1; pointer-events: none;
  opacity: 0; transition: opacity 1.1s var(--ease-out);
}
#bg[data-ready="true"] { opacity: 1; }

/* reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--ink-900);
  color: var(--paper);
  /* Une seule superfamille : la largeur et la graisse distinguent
     le display du texte courant, pas une seconde police. */
  font-family: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-stretch: 100%;
  font-size: 17px;
  line-height: 1.65;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, video, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }

/* surfaces du navigateur
   Ce qu'on ne dessine pas porte quand même le design. */
::selection { background: var(--route); color: var(--route-ink); }

:root { scrollbar-color: var(--line-2) var(--ink-900); scrollbar-width: thin; }
/* Oui, je restyle la barre de défilement. Non, je ne m'en excuse pas. */
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--ink-900); }
::-webkit-scrollbar-thumb { background: var(--line-2); border: 3px solid var(--ink-900); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: #4C453C; }

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--route);
  outline-offset: 3px;
  border-radius: 2px;
}

a { color: inherit; text-decoration-color: color-mix(in oklab, var(--route) 55%, transparent); text-underline-offset: 0.22em; text-decoration-thickness: 1px; }

/* typographie */
.mono {
  font-family: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  font-variant-numeric: tabular-nums;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
}

.lede { font-size: 1.125rem; color: var(--paper-2); max-width: 54ch; line-height: 1.6; }
p { max-width: var(--measure); }

/* mise en page */
.shell { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: var(--gutter); }

/* Pas de trait entre les sections : la respiration suffit a les separer,
   et une ligne pleine largeur coupe la lecture au defilement. */
section { position: relative; padding-block: clamp(72px, 11vw, 148px); }

.section-head { margin-bottom: clamp(36px, 5vw, 64px); }
.section-head h2 {
  font-family: 'Archivo', system-ui, sans-serif;
  font-weight: 800; font-stretch: 112%;
  font-size: clamp(2rem, 4.2vw, 3.25rem);
  line-height: 0.98; letter-spacing: -0.03em;
  text-transform: uppercase; text-wrap: balance;
}
.section-head h2 em { font-style: normal; color: var(--route); }
.section-head .lede { margin-top: 18px; }

/* barre de navigation */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 60;
  display: flex; align-items: center; gap: 24px;
  padding: 14px var(--gutter);
  background: color-mix(in oklab, var(--ink-900) 78%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease-out), background .3s var(--ease-out);
}
.topbar[data-scrolled="true"] { border-bottom-color: var(--line); background: color-mix(in oklab, var(--ink-900) 92%, transparent); }

.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; margin-right: auto; }
.brand img { height: 30px; width: auto; }
.brand-name {
  font-family: 'Archivo', system-ui, sans-serif; font-weight: 800; font-stretch: 112%;
  font-size: 1.02rem; letter-spacing: 0.03em; text-transform: uppercase;
}
.brand-route { color: var(--route); }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  padding: 8px 13px; border-radius: var(--radius);
  font-size: 0.85rem; font-weight: 500; color: var(--paper-2);
  text-decoration: none; transition: color .18s, background .18s;
}
.nav a:hover { color: var(--paper); background: var(--ink-800); }
.nav a[aria-current="page"] { color: var(--paper); }
.nav a[aria-current="page"]::after {
  content: ''; display: block; height: 2px; margin-top: 5px;
  background: var(--route); border-radius: 2px;
}

.topbar-actions { display: flex; align-items: center; gap: 8px; }

.lang {
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent; border: 1px solid var(--line-2); color: var(--paper-2);
  padding: 7px 12px; border-radius: var(--radius); cursor: pointer;
  font-family: 'JetBrains Mono', monospace; font-size: 0.7rem; letter-spacing: 0.1em; font-weight: 500;
  transition: border-color .2s, color .2s;
}
.lang:hover { border-color: var(--route); color: var(--paper); }

.burger {
  display: none; background: transparent; border: 1px solid var(--line-2);
  border-radius: var(--radius); padding: 8px; cursor: pointer; color: var(--paper);
}

/* Panneau mobile */
.mobile-nav {
  position: fixed; inset: 0; z-index: 70;
  background: var(--ink-900);
  padding: 88px var(--gutter) 40px;
  display: flex; flex-direction: column; gap: 4px;
  transform: translateY(-8px); opacity: 0; visibility: hidden; pointer-events: none;
  /* visibility bascule à 0s à l'ouverture (sinon l'élément n'est pas focusable)
     et seulement après le fondu à la fermeture. */
  transition: opacity .26s var(--ease-out), transform .26s var(--ease-out), visibility 0s linear .26s;
}
.mobile-nav[data-open="true"] {
  opacity: 1; transform: none; visibility: visible; pointer-events: auto;
  transition: opacity .26s var(--ease-out), transform .26s var(--ease-out), visibility 0s linear 0s;
}
.mobile-nav a {
  font-family: 'Archivo', system-ui, sans-serif; font-weight: 700; font-stretch: 110%;
  font-size: 1.75rem; text-transform: uppercase; letter-spacing: -0.02em;
  text-decoration: none; padding: 14px 0; border-bottom: 1px solid var(--line);
}
.mobile-nav .close { position: absolute; top: 14px; right: var(--gutter); background: transparent; border: 1px solid var(--line-2); border-radius: var(--radius); padding: 8px; cursor: pointer; }

/* boutons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 24px; border-radius: var(--radius);
  font-weight: 600; font-size: 0.95rem; letter-spacing: 0.005em;
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
  transition: transform .18s var(--ease-out), background .2s, border-color .2s, color .2s, box-shadow .2s;
}
.btn svg { width: 18px; height: 18px; flex: none; }

.btn-primary { background: var(--route); color: var(--route-ink); box-shadow: var(--lift-1); }
.btn-primary:hover { box-shadow: var(--lift-2); background: color-mix(in oklab, var(--route) 86%, #fff); }
.btn-primary:active { transform: translateY(1px); }

.btn-ghost { border-color: var(--line-2); color: var(--paper); background: transparent; }
.btn-ghost:hover { border-color: var(--paper-3); background: var(--ink-800); }

.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* hero — moniteur programme + énoncé */
.hero { padding-top: clamp(112px, 15vh, 168px); padding-bottom: clamp(64px, 9vw, 112px); border-top: 0; }
.hero-grid {
  display: grid; gap: clamp(36px, 5vw, 72px);
  grid-template-columns: minmax(0, 1fr) minmax(0, 340px);
  align-items: center;
}

.hero h1 {
  font-family: 'Archivo', system-ui, sans-serif;
  font-weight: 900; font-stretch: 122%;
  /* Repli : proportionnel à l'écran. */
  font-size: clamp(2.1rem, 6.6vw, 4.4rem);
  line-height: 0.88; letter-spacing: -0.042em;
  text-transform: uppercase;
}
/* La plus longue ligne (« Je rythme. ») mesure 7,5 fois le corps.
   On dimensionne donc sur la colonne, pas sur la fenêtre : les trois
   lignes tiennent alors sur une seule ligne à toutes les largeurs. */
@supports (container-type: inline-size) {
  .hero-title { container-type: inline-size; }
  .hero h1 { font-size: clamp(var(--hero-min, 2.1rem), var(--hero-cqi, 12.6cqi), 6rem); }
}
.hero h1 .l { display: block; white-space: nowrap; }
.hero h1 .cut { color: var(--paper); }
/* 2px de contour, pas 1.5. À 1.5 la ligne du milieu disparaissait sur
   les écrans un peu lavés. Testé, tranché, on n'y revient pas. */
.hero h1 .pace {
  /* Ligne « fantôme » : le trait doit rester lisible à 90 px,
     donc 2 px dans l'encre secondaire, pas un filet gris. */
  color: transparent;
  -webkit-text-stroke: 2px var(--paper-2);
  paint-order: stroke fill;
}
.hero h1 .hit { color: var(--route); }
.hero .lede { margin-top: 26px; }
.hero .btn-row { margin-top: 32px; }

/* Le moniteur : cadre 9:16, comme un retour de montage */
.monitor { position: relative; }
.hero-grid[data-shape="wide"] { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.hero-grid[data-shape="solo"] { grid-template-columns: minmax(0, 1fr); }
.hero-grid[data-shape="solo"] .lede { max-width: 62ch; }

.monitor-frame {
  position: relative; aspect-ratio: 9 / 16; overflow: hidden;
  border-radius: var(--radius-lg); background: var(--ink-800);
  border: 1px solid var(--line-2); box-shadow: var(--lift-2);
}
.monitor-frame > img, .monitor-frame > video {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  filter: saturate(.82) contrast(1.04);
}
/* La vidéo se pose par-dessus le poster, pas en dessous : sans le
   positionnement absolu elle partait hors cadre et on ne voyait
   qu'une image fixe. */
.monitor-frame > video { opacity: 0; transition: opacity .7s var(--ease-out); }
.monitor-frame > video[data-playing="true"] { opacity: 1; }
/* La pastille ne clignote que si quelque chose tourne vraiment. */
.monitor-frame:not(:has(video[data-playing="true"])) .dot { animation: none; opacity: .45; }
.monitor-frame::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(12,11,9,.78) 0%, rgba(12,11,9,.06) 44%, rgba(12,11,9,.28) 100%);
}
/* Fenêtre de navigateur : trois pastilles et une barre d'adresse muette. */
.monitor-frame[data-ratio="wide"] { aspect-ratio: 16 / 10; }
.monitor-chrome {
  position: absolute; inset: 0 0 auto 0; z-index: 3; height: 32px;
  display: flex; align-items: center; gap: 7px; padding-inline: 12px;
  background: var(--ink-800); border-bottom: 1px solid var(--line);
}
.monitor-chrome i { width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); }
.monitor-chrome .url {
  flex: 1; margin-left: 8px; text-align: center; color: var(--paper-3);
  font-family: 'JetBrains Mono', monospace; font-size: 0.6rem; letter-spacing: 0.08em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.monitor-frame[data-ratio="wide"] > img { top: 32px; height: calc(100% - 32px); position: absolute; }
.monitor-frame[data-ratio="wide"]::after { top: 32px; }

.monitor-meta {
  position: absolute; left: 14px; right: 14px; bottom: 12px; z-index: 2;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  color: var(--paper-2);
}
.monitor-meta .rec { display: inline-flex; align-items: center; gap: 7px; }
.monitor-meta .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--route); }
@media (prefers-reduced-motion: no-preference) {
  .monitor-meta .dot { animation: rec 2.4s var(--ease-out) infinite; }
}
@keyframes rec { 0%, 62%, 100% { opacity: 1; } 78% { opacity: .25; } }

/* timeline — la piste de lecture
   Les largeurs des clips sont calculees en JS a partir de la hauteur
   reelle des sections. Ne pas remettre de largeur fixe ici, sinon la
   tete de lecture se decale du clip allume et c'est reparti pour 2 h. */
.timeline {
  position: fixed; inset: auto 0 0 0; z-index: 55;
  display: flex; align-items: stretch; height: 40px;
  background: color-mix(in oklab, var(--ink-900) 92%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
.timeline-tc {
  display: flex; align-items: center; padding-inline: 14px;
  border-right: 1px solid var(--line); color: var(--route);
  font-family: 'JetBrains Mono', monospace; font-variant-numeric: tabular-nums;
  font-size: 0.68rem; letter-spacing: 0.1em; font-weight: 500; flex: none;
}
.timeline-track { position: relative; display: flex; flex: 1; min-width: 0; }
.timeline-clip {
  position: relative; flex: 1; min-width: 0;
  background: transparent; border: 0; border-right: 1px solid var(--line);
  color: var(--paper-3); cursor: pointer;
  font-family: 'JetBrains Mono', monospace; font-size: 0.62rem;
  letter-spacing: 0.14em; text-transform: uppercase; font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  padding-inline: 10px;
  transition: color .2s, background .2s;
}
.timeline-clip:hover { color: var(--paper); background: var(--ink-800); }
.timeline-clip[data-tight="true"] { font-size: 0; padding-inline: 0; }
.timeline-clip[data-active="true"] { color: var(--paper); }
.timeline-clip[data-active="true"]::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 2px; background: var(--route);
}
.timeline-playhead {
  position: absolute; top: 0; bottom: 0; width: 1px; background: var(--route);
  pointer-events: none; box-shadow: 0 0 10px color-mix(in oklab, var(--route) 60%, transparent);
}
body { padding-bottom: 40px; }

/* Les clips ont la largeur de leur section : sur les écrans intermédiaires
   les plus courts se resserrent, donc on réduit le libellé plutôt que
   de le tronquer. */
@media (max-width: 1100px) {
  .timeline-clip { font-size: 0.56rem; letter-spacing: 0.08em; padding-inline: 6px; }
}
@media (max-width: 720px) {
  .timeline-track { display: none; }
  .timeline { height: 34px; }
  body { padding-bottom: 34px; }
}

/* reel — réalisations vidéo */
.reel { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2.2vw, 26px); }

.clip { position: relative; display: flex; flex-direction: column; gap: 14px; }
.clip-stage {
  position: relative; aspect-ratio: 9 / 16; overflow: hidden;
  border-radius: var(--radius-lg); background: var(--ink-800);
  border: 1px solid var(--line); box-shadow: var(--lift-1);
  transition: border-color .3s var(--ease-out), transform .4s var(--ease-out), box-shadow .4s var(--ease-out);
}
.clip:hover .clip-stage, .clip:focus-within .clip-stage {
  border-color: color-mix(in oklab, var(--route) 60%, var(--line));
  transform: translateY(-4px);
  box-shadow: var(--lift-2);
}
.clip-stage img, .clip-stage video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.clip-stage video { opacity: 0; transition: opacity .35s var(--ease-out); }
.clip-stage[data-playing="true"] video { opacity: 1; }
.clip-stage[data-playing="true"] img { opacity: 0; transition: opacity .35s var(--ease-out); }

.clip-open {
  position: absolute; inset: 0; z-index: 3; width: 100%;
  background: transparent; border: 0; cursor: pointer;
  display: flex; align-items: flex-end; justify-content: flex-start;
  padding: 16px; gap: 10px;
}
.clip-open::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(12,11,9,.82), rgba(12,11,9,0) 46%);
  transition: opacity .3s;
}
.play-badge {
  position: relative; display: inline-flex; align-items: center; gap: 9px;
  padding: 9px 15px 9px 11px; border-radius: 99px;
  background: color-mix(in oklab, var(--ink-900) 72%, transparent);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--line-2);
  font-family: 'JetBrains Mono', monospace; font-size: 0.64rem; letter-spacing: 0.12em;
  text-transform: uppercase; font-weight: 500; color: var(--paper);
  transition: background .25s, border-color .25s;
}
.clip-open:hover .play-badge { background: var(--route); border-color: var(--route); color: var(--route-ink); }
.play-badge svg { width: 13px; height: 13px; }

.clip-caption { display: flex; flex-direction: column; gap: 4px; }
.clip-caption .mono { color: var(--route); }
.clip-caption h3 { font-size: 1rem; font-weight: 600; letter-spacing: -0.01em; }
.clip-caption p { font-size: 0.875rem; color: var(--paper-2); line-height: 1.5; }

/* Lecteur plein écran */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center; padding: 24px;
  background: rgba(6,5,4,.93);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .28s var(--ease-out), visibility 0s linear .28s;
}
.lightbox[data-open="true"] {
  opacity: 1; visibility: visible; pointer-events: auto;
  transition: opacity .28s var(--ease-out), visibility 0s linear 0s;
}
.lightbox video {
  max-width: min(94vw, 460px); max-height: 86vh; width: auto;
  border-radius: var(--radius-lg); box-shadow: var(--lift-2); background: #000;
}
.lightbox .close {
  position: absolute; top: 18px; right: 18px;
  background: var(--ink-800); border: 1px solid var(--line-2); color: var(--paper);
  border-radius: var(--radius); padding: 10px; cursor: pointer;
  transition: border-color .2s, background .2s;
}
.lightbox .close:hover { border-color: var(--route); background: var(--ink-700); }

/* spec-sheet — services en lignes, pas en cartes */
.spec { border-top: 1px solid var(--line); }
.spec-row {
  display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 5fr);
  gap: clamp(20px, 4vw, 56px);
  padding-block: clamp(28px, 3.6vw, 44px);
  border-bottom: 1px solid var(--line);
  transition: background .3s var(--ease-out);
}
.spec-row:hover { background: color-mix(in oklab, var(--ink-800) 60%, transparent); }
.spec-key { display: flex; gap: 16px; align-items: flex-start; }
.spec-key svg { width: 26px; height: 26px; flex: none; color: var(--route); margin-top: 3px; }
.spec-key h3 {
  font-family: 'Archivo', system-ui, sans-serif; font-weight: 800; font-stretch: 110%;
  font-size: clamp(1.35rem, 2.4vw, 1.9rem); line-height: 1.02;
  letter-spacing: -0.025em; text-transform: uppercase; text-wrap: balance;
}
.spec-val p { color: var(--paper-2); font-size: 0.98rem; }
.tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
.tags span {
  font-family: 'JetBrains Mono', monospace; font-size: 0.63rem;
  letter-spacing: 0.11em; text-transform: uppercase; font-weight: 500;
  color: var(--paper-2); border: 1px solid var(--line-2);
  padding: 5px 10px; border-radius: 99px;
}

/* process — la séquence compte, donc elle est numérotée. */
/* L'épinglage tient parce que rien au-dessus n'a d'overflow exotique.
   Si un jour la section arrête de coller, c'est qu'un parent a gagné
   un overflow quelque part. Tu sais où chercher. */
.method-pin { padding-block: 0; --pin-steps: 4; }
.method-sticky { padding-block: clamp(72px, 11vw, 148px); }

@media (prefers-reduced-motion: no-preference) {
  .method-pin { height: calc(100vh + (var(--pin-steps) - 1) * 62vh); }
  .method-sticky {
    position: sticky; top: 0; min-height: 100vh;
    display: flex; flex-direction: column; justify-content: center;
    padding-block: clamp(96px, 12vh, 140px) clamp(72px, 9vh, 110px);
  }
}

.process {
  position: relative;
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: clamp(18px, 2.6vw, 32px);
  padding-top: 26px;
}

/* Le segment se deplace en transform, jamais en width : animer width
   fait recalculer la mise en page a chaque frame et ca rame. */
.process-rail { position: absolute; inset: 0 0 auto 0; height: 2px; background: var(--line); }
.process-fill {
  /* Largeur pleine, mise a l'echelle par transform : aucun recalcul
     de mise en page pendant le deplacement du segment. */
  position: absolute; inset: 0 auto 0 0; width: 100%;
  transform-origin: 0 50%; transform: scaleX(0);
  background: var(--route); border-radius: 2px;
  transition: transform .55s var(--ease-out);
  box-shadow: 0 0 14px color-mix(in oklab, var(--route) 45%, transparent);
}
@media (prefers-reduced-motion: reduce) { .process-fill { transition: none; } }

.step { position: relative; transition: opacity .45s var(--ease-out); }
.step .n {
  font-family: 'JetBrains Mono', monospace; font-size: 0.68rem; letter-spacing: 0.14em;
  color: var(--paper-3); font-weight: 600; display: block; margin-bottom: 10px;
  transition: color .45s var(--ease-out);
}
.step h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 8px; letter-spacing: -0.012em; }
.step p { font-size: 0.9rem; color: var(--paper-2); line-height: 1.55; }

/* Étape courante : les autres reculent sans disparaître. */
.process[data-pinned="true"] .step { opacity: .38; }
.process[data-pinned="true"] .step[data-active="true"] { opacity: 1; }
.process[data-pinned="true"] .step[data-active="true"] .n { color: var(--route); }
.process:not([data-pinned="true"]) .step .n { color: var(--route); }
.process:not([data-pinned="true"]) .process-fill { transform: none; }

/* tarifs — colonnes comparables sur une grille commune */
.rates { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.rates[data-cols="2"] { grid-template-columns: repeat(2, 1fr); }
.rate { display: flex; flex-direction: column; padding: clamp(26px, 3vw, 38px); border-right: 1px solid var(--line); background: var(--ink-850); }
.rate:last-child { border-right: 0; }
.rate[data-featured="true"] { background: var(--ink-700); }

.rate-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; min-height: 30px; }
.rate-name { font-family: 'JetBrains Mono', monospace; font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--paper-2); font-weight: 500; }
.rate[data-featured="true"] .rate-name { color: var(--route); }
.rate-flag {
  font-family: 'JetBrains Mono', monospace; font-size: 0.6rem; letter-spacing: 0.12em;
  text-transform: uppercase; font-weight: 600;
  background: var(--route); color: var(--route-ink); padding: 4px 9px; border-radius: 99px;
}
.rate-price {
  font-family: 'Archivo', system-ui, sans-serif; font-weight: 800; font-stretch: 112%;
  font-size: clamp(2.4rem, 4.4vw, 3.4rem); line-height: 1; letter-spacing: -0.04em;
  margin-top: 20px; font-variant-numeric: tabular-nums;
}
.rate-unit { display: block; font-size: 0.85rem; font-weight: 400; letter-spacing: 0; color: var(--paper-2); margin-top: 8px; }
.rate ul { list-style: none; margin: 26px 0 28px; display: flex; flex-direction: column; gap: 11px; flex: 1; }
.rate li { display: flex; gap: 11px; align-items: flex-start; font-size: 0.92rem; color: var(--paper-2); }
.rate li svg { width: 16px; height: 16px; flex: none; margin-top: 4px; color: var(--route); }
.rate .btn { width: 100%; }

.rates-note {
  margin-top: clamp(20px, 2.4vw, 30px);
  font-size: 0.92rem; color: var(--paper-3); max-width: 62ch;
}
.rates-note strong { color: var(--paper-2); font-weight: 600; }

/* brief — formulaire qualifiant */
.brief-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 72px); align-items: start; }

.brief-aside h2 { margin-bottom: 18px; }
.channels { display: flex; flex-direction: column; gap: 10px; margin-top: 28px; }
.channel {
  display: flex; align-items: center; gap: 14px; padding: 15px 18px;
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: var(--ink-850); text-decoration: none;
  transition: border-color .25s, background .25s, transform .25s var(--ease-out);
}
.channel:hover { border-color: var(--line-2); background: var(--ink-800); transform: translateX(3px); }
.channel svg { width: 20px; height: 20px; flex: none; color: var(--paper-2); }
.channel-text { display: flex; flex-direction: column; min-width: 0; }
.channel-text strong { font-size: 0.93rem; font-weight: 600; }
.channel-text span { font-size: 0.8rem; color: var(--paper-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

form.brief { display: grid; gap: 18px; }
.field { display: grid; gap: 7px; }
.field > label {
  font-family: 'JetBrains Mono', monospace; font-size: 0.66rem;
  letter-spacing: 0.13em; text-transform: uppercase; font-weight: 500; color: var(--paper-2);
}
.field .req { color: var(--route); }
.control {
  width: 100%; background: var(--ink-850); color: var(--paper);
  border: 1px solid var(--line-2); border-radius: var(--radius);
  padding: 12px 14px; font-size: 0.95rem;
  transition: border-color .2s, background .2s;
}
.control::placeholder { color: var(--paper-3); }
.control:hover { border-color: #453E35; }
.control:focus { outline: none; border-color: var(--route); background: var(--ink-800); }
textarea.control { resize: vertical; min-height: 112px; line-height: 1.55; }
select.control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238A8076' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 17px;
  padding-right: 40px;
}
select.control option { background: var(--ink-800); color: var(--paper); }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.field-error {
  font-size: 0.8rem; color: #F2A08A; display: none; align-items: center; gap: 6px;
}
.field[data-invalid="true"] .field-error { display: flex; }
.field[data-invalid="true"] .control { border-color: #C4593A; }

.form-note { font-size: 0.82rem; color: var(--paper-3); }
.form-status {
  display: none; align-items: center; gap: 9px;
  padding: 12px 15px; border-radius: var(--radius);
  border: 1px solid color-mix(in oklab, var(--route) 45%, var(--line));
  background: color-mix(in oklab, var(--route) 8%, var(--ink-850));
  font-size: 0.88rem;
}
.form-status[data-show="true"] { display: flex; }
.form-status svg { width: 17px; height: 17px; color: var(--route); flex: none; }

/* passerelles entre les trois routes */
.gateways { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(16px, 2.4vw, 26px); }
.gateway {
  display: flex; gap: 22px; align-items: center;
  padding: clamp(24px, 3vw, 34px);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: var(--ink-850); text-decoration: none;
  /* Accorde au fond : le shader met 1,5 s a virer de couleur, une bordure
     qui claque en 0,3 s donnerait deux gestes au lieu d'un. */
  transition: border-color .7s var(--ease-out), transform .3s var(--ease-out), background .7s var(--ease-out);
}
.gateway:hover { background: var(--ink-800); }
.gateway[data-route="video"]:hover { border-color: color-mix(in oklab, var(--amber) 55%, var(--line)); }
.gateway[data-route="web"]:hover   { border-color: color-mix(in oklab, var(--signal) 55%, var(--line)); }
.gateway[data-route="cv"]:hover    { border-color: color-mix(in oklab, var(--sage) 55%, var(--line)); }
.gateway[data-route="quinoa"]:hover{ border-color: color-mix(in oklab, var(--orchid) 55%, var(--line)); }
.gateway img { width: 66px; height: 66px; object-fit: contain; flex: none; transition: transform .4s var(--ease-out); }
.gateway:hover img { transform: scale(1.06) rotate(-3deg); }
.gateway-body { min-width: 0; }
.gateway h3 {
  font-family: 'Archivo', system-ui, sans-serif; font-weight: 800; font-stretch: 110%;
  font-size: 1.25rem; text-transform: uppercase; letter-spacing: -0.02em; margin-bottom: 6px;
}
.gateway p { font-size: 0.9rem; color: var(--paper-2); line-height: 1.5; }
.gateway .from {
  display: inline-block; margin-top: 12px;
  font-family: 'JetBrains Mono', monospace; font-size: 0.63rem;
  letter-spacing: 0.12em; text-transform: uppercase; font-weight: 500;
}
.gateway[data-route="video"] .from { color: var(--amber); }
.gateway[data-route="web"] .from   { color: var(--signal); }
.gateway[data-route="cv"] .from    { color: var(--sage); }
.gateway[data-route="quinoa"] .from{ color: var(--orchid); }

/* pied de page */
.site-footer { border-top: 1px solid var(--line); padding-block: clamp(48px, 6vw, 72px); }
.footer-grid { display: flex; flex-wrap: wrap; gap: 28px; align-items: center; justify-content: space-between; }
.footer-links { display: flex; flex-wrap: wrap; gap: 22px; }
.footer-links a { font-size: 0.88rem; color: var(--paper-2); text-decoration: none; transition: color .2s; }
.footer-links a:hover { color: var(--paper); }
.footer-meta { font-size: 0.82rem; color: var(--paper-3); }

/* projets web */
.projects { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(18px, 2.6vw, 30px); }
.project {
  display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--ink-850);
  transition: border-color .3s var(--ease-out), transform .35s var(--ease-out), box-shadow .35s var(--ease-out);
}
.project:hover { border-color: color-mix(in oklab, var(--route) 50%, var(--line)); box-shadow: var(--lift-2); }
.project-shot { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--ink-800); border-bottom: 1px solid var(--line); }
.project-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform .6s var(--ease-out); }
.project:hover .project-shot img { transform: scale(1.03); }
.project-flag {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  font-family: 'JetBrains Mono', monospace; font-size: 0.6rem; letter-spacing: 0.13em;
  text-transform: uppercase; font-weight: 600; padding: 5px 10px; border-radius: 99px;
  background: color-mix(in oklab, var(--ink-900) 80%, transparent);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--line-2); color: var(--paper-2);
}
.project-body { padding: clamp(22px, 2.6vw, 30px); display: flex; flex-direction: column; flex: 1; }
.project-body h3 { font-family: 'Archivo', system-ui, sans-serif; font-weight: 800; font-stretch: 110%; font-size: 1.3rem; text-transform: uppercase; letter-spacing: -0.022em; margin-bottom: 10px; }
.project-body p { font-size: 0.92rem; color: var(--paper-2); flex: 1; }
.project-body .tags { margin-top: 18px; }
.project-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; font-size: 0.88rem; font-weight: 600; color: var(--route); text-decoration: none; }
.project-link svg { width: 15px; height: 15px; transition: transform .25s var(--ease-out); }
.project-link:hover svg { transform: translateX(3px); }

/* La 2e case des projets n'est pas un projet : c'est une place libre. */
.project-open {
  display: flex; flex-direction: column; justify-content: center;
  gap: 14px; padding: clamp(30px, 4vw, 48px);
  border-style: dashed; border-color: var(--line-2); background: transparent;
}
.project-open:hover { border-color: color-mix(in oklab, var(--route) 55%, var(--line-2)); background: var(--ink-850); box-shadow: none; }
.project-open h3 {
  font-family: 'Archivo', system-ui, sans-serif; font-weight: 800; font-stretch: 110%;
  font-size: clamp(1.5rem, 3vw, 2.1rem); text-transform: uppercase;
  letter-spacing: -0.025em; line-height: 1.02; color: var(--route);
}
.project-open p { font-size: 0.95rem; color: var(--paper-2); }
.project-open .btn { align-self: flex-start; margin-top: 6px; }

/* Le "non" est aussi une information. */
.spec-aside {
  display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 5fr);
  gap: clamp(20px, 4vw, 56px);
  padding: clamp(24px, 3vw, 36px) clamp(18px, 2.2vw, 26px);
  margin: 0 calc(-1 * clamp(18px, 2.2vw, 26px));
  background: color-mix(in oklab, var(--ink-850) 72%, transparent);
  border-radius: var(--radius-lg);
}
.spec-aside .spec-key svg { color: var(--paper-3); }
.spec-aside h3 {
  font-family: 'Archivo', system-ui, sans-serif; font-weight: 700; font-stretch: 106%;
  font-size: clamp(1.05rem, 1.7vw, 1.25rem); line-height: 1.05;
  text-transform: uppercase; letter-spacing: -0.01em; color: var(--paper-3);
}
.spec-aside p { color: var(--paper-2); font-size: 0.96rem; }
@media (max-width: 900px) {
  .spec-aside { grid-template-columns: minmax(0, 1fr); gap: 14px; }
}

/* cv */
.cv-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 4vw, 56px); align-items: start; }
.panel { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--ink-850); padding: clamp(24px, 2.8vw, 34px); }
.panel + .panel { margin-top: clamp(18px, 2.2vw, 26px); }
.panel > h3 {
  font-family: 'Archivo', system-ui, sans-serif; font-weight: 800; font-stretch: 110%;
  font-size: 1.2rem; text-transform: uppercase; letter-spacing: -0.02em;
  color: var(--route); margin-bottom: 20px;
  padding-bottom: 14px; border-bottom: 1px solid var(--line);
}
.panel p { font-size: 0.94rem; color: var(--paper-2); }

.tl { display: flex; flex-direction: column; }
.tl-item { position: relative; padding-left: 26px; padding-bottom: 26px; border-left: 1px solid var(--line); }
.tl-item:last-child { padding-bottom: 0; border-left-color: transparent; }
.tl-item::before {
  content: ''; position: absolute; left: -4.5px; top: 6px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--route); box-shadow: 0 0 0 3px var(--ink-850);
}
.tl-date { font-family: 'JetBrains Mono', monospace; font-size: 0.65rem; letter-spacing: 0.13em; text-transform: uppercase; color: var(--route); font-weight: 500; }
.tl-title { font-size: 1.02rem; font-weight: 600; margin-top: 7px; letter-spacing: -0.012em; }
.tl-org { font-size: 0.88rem; color: var(--paper-3); margin-top: 3px; }
.tl-desc { font-size: 0.9rem; color: var(--paper-2); margin-top: 11px; line-height: 1.58; }

.facts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.facts span {
  font-size: 0.79rem; color: var(--paper-2);
  border: 1px solid var(--line-2); padding: 6px 11px; border-radius: 99px;
}

.skills { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(20px, 2.4vw, 30px); }
.skill h4 { font-size: 0.94rem; font-weight: 600; margin-bottom: 12px; padding-bottom: 9px; border-bottom: 1px solid var(--line); }
.skill ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.skill li { display: flex; gap: 10px; align-items: flex-start; font-size: 0.89rem; color: var(--paper-2); }
.skill li svg { width: 14px; height: 14px; flex: none; margin-top: 4px; color: var(--route); }

.langs { display: flex; flex-direction: column; gap: 14px; }
.lang-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: baseline; }
.lang-row .n { font-size: 0.92rem; }
.lang-row .v { font-family: 'JetBrains Mono', monospace; font-size: 0.66rem; letter-spacing: 0.1em; color: var(--paper-3); text-transform: uppercase; }

/* quinoa — la régie
   Même monde, autre poste. Sur les trois autres pages on est au banc de
   montage ; ici on regarde un direct, donc le vocabulaire glisse vers la
   régie : voyant d'antenne, état du signal, compteur. Le voyant n'est pas
   un ornement, il suit vraiment l'état de la chaîne. */

.quinoa-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(30px, 4.5vw, 60px); align-items: center; }
.quinoa-mark { justify-self: center; max-width: 340px; width: 100%; }
.quinoa-mark img { width: 100%; height: auto; display: block; filter: drop-shadow(0 18px 40px rgba(0,0,0,.5)); }

/* voyant d'antenne — éteint par défaut, allumé seulement si ça streame */
.tally {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 15px 8px 12px; border-radius: 99px; margin-bottom: 22px;
  border: 1px solid var(--line-2); background: var(--ink-850);
  font-family: 'JetBrains Mono', monospace; font-size: 0.64rem;
  letter-spacing: 0.14em; text-transform: uppercase; font-weight: 500;
  color: var(--paper-3);
  transition: border-color .6s var(--ease-out), color .6s var(--ease-out), background .6s var(--ease-out);
}
.tally .bulb {
  width: 9px; height: 9px; border-radius: 50%; flex: none;
  background: var(--line-2); transition: background .6s var(--ease-out), box-shadow .6s;
}
.tally[data-state="live"] {
  border-color: color-mix(in oklab, var(--onair) 55%, var(--line));
  background: color-mix(in oklab, var(--onair) 11%, var(--ink-850));
  color: var(--paper);
}
.tally[data-state="live"] .bulb { background: var(--onair); }
@media (prefers-reduced-motion: no-preference) {
  .tally[data-state="live"] .bulb { animation: tallyPulse 2.4s var(--ease-out) infinite; }
}
@keyframes tallyPulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in oklab, var(--onair) 62%, transparent); }
  72%  { box-shadow: 0 0 0 10px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

/* le duo */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(16px, 2.4vw, 26px); }
.duo article {
  padding: clamp(22px, 3vw, 32px);
  border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--ink-850);
}
.duo h3 {
  font-family: 'Archivo', system-ui, sans-serif; font-weight: 800; font-stretch: 110%;
  font-size: 1.2rem; text-transform: uppercase; letter-spacing: -0.02em; margin-bottom: 4px;
}
.duo .mono { color: var(--route); display: block; margin-bottom: 12px; }
.duo p { font-size: 0.9rem; color: var(--paper-2); line-height: 1.6; }

/* carte du direct — deux états dans le même cadre */
.live-card {
  display: grid; grid-template-columns: 1.25fr 1fr; gap: 0;
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: var(--ink-850); overflow: hidden; box-shadow: var(--lift-1);
  transition: border-color .6s var(--ease-out);
}
.live-card[data-state="live"] { border-color: color-mix(in oklab, var(--onair) 40%, var(--line)); }
.live-stage {
  position: relative; aspect-ratio: 16 / 9; background: var(--ink-800);
  border-right: 1px solid var(--line); overflow: hidden;
}
.live-stage img, .live-stage iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover;
}
/* Écran de mire quand la chaîne est hors ligne : pas de trou noir. */
.live-stage[data-state="off"]::after {
  content: ''; position: absolute; inset: 0;
  background:
    repeating-linear-gradient(0deg, rgba(244,239,231,.030) 0 1px, transparent 1px 4px),
    radial-gradient(60% 70% at 50% 45%, color-mix(in oklab, var(--route) 13%, transparent), transparent 72%);
}
.live-off {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  font-family: 'JetBrains Mono', monospace; font-size: 0.66rem;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--paper-3);
}
.live-off svg { width: 26px; height: 26px; opacity: .55; }
/* Meme piege que .live-play : sans cette ligne, « Pas de signal » reste
   affiche par-dessus l'apercu du direct. */
.live-off[hidden] { display: none; }
.live-play {
  position: absolute; inset: 0; z-index: 3; width: 100%;
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: 0; cursor: pointer; color: var(--paper);
}
/* display:flex bat la regle [hidden] du navigateur : sans cette ligne le
   bouton « Regarder » reste visible alors que la chaine est hors ligne. */
.live-play[hidden] { display: none; }
.live-body { padding: clamp(22px, 3vw, 32px); display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.live-title { font-size: 1.05rem; font-weight: 600; line-height: 1.4; letter-spacing: -0.01em; }
.live-facts { display: flex; flex-wrap: wrap; gap: 8px; }
.live-facts span {
  font-family: 'JetBrains Mono', monospace; font-size: 0.62rem;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--paper-3);
  border: 1px solid var(--line); border-radius: 99px; padding: 5px 11px;
}
.live-card[data-state="live"] .live-facts span[data-viewers] { color: var(--paper); border-color: var(--line-2); }

/* dernières vidéos */
.tubes { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2.2vw, 26px); }
.tube { display: flex; flex-direction: column; gap: 12px; }
.tube h3 a { text-decoration: none; }
.tube h3 a:hover { text-decoration: underline; }
.tube-stage {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden;
  border-radius: var(--radius-lg); background: var(--ink-800);
  border: 1px solid var(--line); box-shadow: var(--lift-1);
  transition: border-color .3s var(--ease-out), transform .4s var(--ease-out), box-shadow .4s var(--ease-out);
}
.tube:hover .tube-stage, .tube:focus-visible .tube-stage {
  border-color: color-mix(in oklab, var(--route) 60%, var(--line));
  transform: translateY(-4px); box-shadow: var(--lift-2);
}
.tube-stage img, .tube-stage iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover;
}
/* Au-dessus du voile (1) et du bouton de lecture (3), sinon les commandes
   du lecteur sont inaccessibles. */
.tube-stage iframe, .live-stage iframe { z-index: 4; }
.tube-stage .play-badge { position: absolute; left: 14px; bottom: 14px; z-index: 2; }
.tube-stage::before {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to top, rgba(12,11,9,.78), rgba(12,11,9,0) 48%);
  /* Purement decoratif : sans ca, ce voile avale les clics destines au
     lecteur et on ne peut plus mettre la video en pause. */
  pointer-events: none;
}
.tube:hover .play-badge { background: var(--route); border-color: var(--route); color: var(--route-ink); }
.tube h3 { font-size: 0.95rem; font-weight: 600; line-height: 1.45; letter-spacing: -0.01em; }
.tube .mono { color: var(--paper-3); font-size: 0.62rem; }
/* Le squelette d'attente : trois cadres vides plutôt qu'un saut de page. */
.tube[data-skeleton] { pointer-events: none; }
.tube[data-skeleton] h3 { color: transparent; background: var(--ink-800); border-radius: 3px; max-width: 80%; }

/* verticaux : on réutilise le banc de montage de l'accueil */
a.clip-open { text-decoration: none; }

/* le serveur */
.server {
  display: grid; grid-template-columns: auto 1fr auto; gap: clamp(20px, 3vw, 34px);
  align-items: center; padding: clamp(24px, 3.4vw, 38px);
  border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--ink-850);
}
.server-glyph { width: 54px; height: 54px; color: var(--route); flex: none; }
.server h3 {
  font-family: 'Archivo', system-ui, sans-serif; font-weight: 800; font-stretch: 110%;
  font-size: 1.3rem; text-transform: uppercase; letter-spacing: -0.02em; margin-bottom: 6px;
}
.server p { font-size: 0.9rem; color: var(--paper-2); line-height: 1.55; }
.server-count {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 12px;
  font-family: 'JetBrains Mono', monospace; font-size: 0.63rem;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--paper-3);
}
.server-count .bulb { width: 7px; height: 7px; border-radius: 50%; background: var(--sage); flex: none; }
.server-count[hidden] { display: none; }

/* mon rôle dans l'équipe — le seul bloc où je parle de moi */
.role {
  display: grid; grid-template-columns: 26px 1fr; gap: 18px; align-items: start;
  padding: clamp(22px, 3vw, 30px);
  border: 1px solid var(--line); border-left: 2px solid var(--route);
  border-radius: var(--radius-lg); background: var(--ink-850);
}
.role svg { width: 26px; height: 26px; color: var(--route); margin-top: 2px; }
.role p { font-size: 0.94rem; color: var(--paper-2); line-height: 1.65; max-width: 62ch; }
.role p + p { margin-top: 10px; }
.role strong { color: var(--paper); font-weight: 600; }

/* état de direct — le rouge d'antenne, partout sauf sur le CV
   Trois manifestations, toutes commandées par le même état : la notification
   en bas à droite, le clignotement du lien Stream, et le tracé du cadre. */

/* notification : au-dessus de la barre de progression, jamais dessus */
.livebar {
  position: fixed; z-index: 60;
  right: clamp(14px, 3vw, 26px); bottom: 52px;
  display: flex; align-items: stretch;
  max-width: min(330px, calc(100vw - 28px));
  border: 1px solid color-mix(in oklab, var(--onair) 42%, var(--line));
  border-radius: var(--radius-lg);
  background: color-mix(in oklab, var(--ink-850) 94%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--lift-2), 0 0 22px color-mix(in oklab, var(--onair) 16%, transparent);
  overflow: hidden;
}
@media (prefers-reduced-motion: no-preference) {
  .livebar { animation: livebarIn .5s var(--ease-out) both; }
}
@keyframes livebarIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

.livebar-link {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 6px 13px 15px; text-decoration: none; color: var(--paper);
  min-width: 0; flex: 1;
  transition: background .3s var(--ease-out);
}
.livebar-link:hover { background: color-mix(in oklab, var(--onair) 10%, transparent); }
.livebar-link .bulb {
  width: 9px; height: 9px; border-radius: 50%; flex: none;
  background: var(--onair);
}
@media (prefers-reduced-motion: no-preference) {
  .livebar-link .bulb { animation: tallyPulse 2.4s var(--ease-out) infinite; }
}
.livebar-text { min-width: 0; }
.livebar-text b {
  display: block; font-size: 0.86rem; font-weight: 600; letter-spacing: -0.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.livebar-text span {
  display: block; margin-top: 2px;
  font-family: 'JetBrains Mono', monospace; font-size: 0.58rem;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--paper-3);
}
.livebar-close {
  flex: none; width: 34px; border: 0; background: transparent; cursor: pointer;
  color: var(--paper-3); display: grid; place-items: center;
  transition: color .2s, background .2s;
}
.livebar-close:hover { color: var(--paper); background: var(--ink-700); }
.livebar-close svg { width: 13px; height: 13px; }

/* Fermeture : elle descend en se fondant, plutôt que de disparaître d'un
   coup. Plus spécifique que la règle d'ouverture, donc elle l'emporte. */
.livebar[data-closing] { pointer-events: none; animation: livebarOut .34s var(--ease-cut) forwards; }
@keyframes livebarOut {
  from { opacity: 1; transform: none; }
  to   { opacity: 0; transform: translateY(20px); }
}

/* Arrivée sur #live : un seul battement pour dire « c'est ici ».
   L'ombre portée n'est pas rognée par l'overflow:hidden de la carte. */
.live-card[data-arrive] { animation: cardArrive 1.05s var(--ease-out); }
@keyframes cardArrive {
  0%   { transform: scale(.986); box-shadow: var(--lift-1), 0 0 0 0 color-mix(in oklab, var(--onair) 50%, transparent); }
  45%  { box-shadow: var(--lift-2), 0 0 0 9px color-mix(in oklab, var(--onair) 20%, transparent); }
  100% { transform: none;         box-shadow: var(--lift-1), 0 0 0 16px transparent; }
}

/* le lien Stream bat lentement quand ça tourne */
@media (prefers-reduced-motion: no-preference) {
  :root[data-stream="live"] [data-stream-link] { animation: streamBlink 2.6s ease-in-out infinite; }
}
:root[data-stream="live"] [data-stream-link] { color: var(--onair); }
@keyframes streamBlink {
  0%, 100% { opacity: 1; }
  50%      { opacity: .42; }
}

/* tracé du cadre : deux traits qui font le tour dans le sens horaire.
   pathLength="100" normalise le périmètre, donc « 6 44 » donne toujours
   exactement deux traits régulièrement espacés, quelle que soit la taille
   réelle de la carte — sinon il faudrait recalculer à chaque redimension. */
.live-trace {
  /* Un <svg> est un element remplace : avec « inset » seul il garde sa
     taille intrinseque de 300x150 et le trace se retrouve tasse dans un
     coin. Il faut lui donner des dimensions explicites. */
  position: absolute; top: 2px; left: 2px; z-index: 6;
  width: calc(100% - 4px); height: calc(100% - 4px);
  pointer-events: none; overflow: visible;
  opacity: 0; transition: opacity .8s var(--ease-out);
}
.live-card[data-state="live"] .live-trace { opacity: 1; }
.live-trace rect {
  fill: none;
  stroke: var(--onair); stroke-width: 2; stroke-linecap: round;
  stroke-dasharray: 6 44;
  filter: drop-shadow(0 0 4px var(--onair)) drop-shadow(0 0 9px color-mix(in oklab, var(--onair) 55%, transparent));
}
@media (prefers-reduced-motion: no-preference) {
  .live-card[data-state="live"] .live-trace rect { animation: traceRun 9s linear infinite; }
  .live-card[data-state="live"] .live-trace { animation: traceBreath 3.4s ease-in-out infinite; }
}
@keyframes traceRun   { to { stroke-dashoffset: -100; } }
@keyframes traceBreath {
  0%, 100% { opacity: 1; }
  50%      { opacity: .5; }
}

@media (max-width: 620px) {
  .livebar { left: 14px; right: 14px; max-width: none; bottom: 48px; }
}

/* entrées — une coupe, pas un fondu */
@media (prefers-reduced-motion: no-preference) {
  /* Le drapeau est posé en <head> par un script synchrone : sans JS,
     rien n'est jamais masqué, donc rien ne peut rester invisible. */
  /* Surtout pas de clip-path sur l'élément observé : un rectangle
     d'intersection vide empêche IntersectionObserver de le voir entrer,
     et le contenu ne se révèle jamais. La coupe tient au tempo. */
  :root[data-motion="on"] [data-cut] {
    opacity: 0;
    transform: translateY(20px);
    transition:
      opacity .42s var(--ease-cut),
      transform .62s var(--ease-out);
    transition-delay: var(--cut-delay, 0ms);
  }
  :root[data-motion="on"] [data-cut][data-shown="true"] { opacity: 1; transform: none; }
}

/* séquences — apparition élément par élément */
@media (prefers-reduced-motion: no-preference) {
  :root[data-motion="on"] [data-seq] > * {
    opacity: 0;
    transform: translateY(var(--seq-y, 18px)) translateX(var(--seq-x, 0px));
    transition: opacity .44s var(--ease-cut), transform .62s var(--ease-out);
  }
  :root[data-motion="on"] [data-seq][data-shown="true"] > * { opacity: 1; transform: none; }
  /* Chaque conteneur donne sa propre cadence via --seq-step. Tout ne
     doit pas arriver au meme rythme, sinon ca sent le gabarit. */
  :root[data-motion="on"] [data-seq] > *:nth-child(2) { transition-delay: calc(var(--seq-step, 80ms) * 1); }
  :root[data-motion="on"] [data-seq] > *:nth-child(3) { transition-delay: calc(var(--seq-step, 80ms) * 2); }
  :root[data-motion="on"] [data-seq] > *:nth-child(4) { transition-delay: calc(var(--seq-step, 80ms) * 3); }
  :root[data-motion="on"] [data-seq] > *:nth-child(n+5) { transition-delay: calc(var(--seq-step, 80ms) * 4); }
}

.reel      { --seq-step: 70ms; }
.rates     { --seq-step: 125ms; }
.projects  { --seq-step: 95ms; }
.skills    { --seq-step: 45ms; }
.section-head { --seq-step: 55ms; }
/* Les deux passerelles arrivent ensemble : ca casse le tempo, expres. */
.gateways  { --seq-step: 0ms; }
.tubes     { --seq-step: 85ms; }
.duo       { --seq-step: 110ms; }
/* Les tarifs arrivent de la gauche, colonne apres colonne. */
.rates { --seq-x: -26px; --seq-y: 0px; }

/* ecran de premier chargement */
.boot { display: none; }
:root[data-boot="1"] .boot {
  display: flex; position: fixed; inset: 0; z-index: 400;
  align-items: center; justify-content: center;
  background: var(--ink-900);
  animation: bootOut .55s var(--ease-out) 1.15s forwards;
}
.boot-inner { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.boot-inner img { height: 54px; width: auto; animation: bootMark .8s var(--ease-out) both; }
.boot-name {
  font-family: 'Archivo', system-ui, sans-serif; font-weight: 800; font-stretch: 114%;
  font-size: 1.5rem; letter-spacing: 0.04em; text-transform: uppercase;
  animation: bootMark .8s var(--ease-out) .08s both;
}
.boot-rail {
  position: relative; width: 190px; height: 2px; background: var(--line); overflow: hidden;
  animation: bootMark .8s var(--ease-out) .14s both;
}
.boot-rail span {
  position: absolute; inset: 0 auto 0 0; width: 0; background: var(--route);
  animation: bootFill 1.15s var(--ease-cut) forwards;
}
.boot-tc { color: var(--paper-3); }
@keyframes bootMark { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
/* Le 1,15 s : j'ai essayé plus court, on n'a pas le temps de lire le nom ;
   plus long, on s'impatiente. C'est le seul réglage que j'ai fait à l'œil. */
@keyframes bootFill { to { width: 100%; } }
@keyframes bootOut { to { transform: translateY(-100%); visibility: hidden; } }
@media (prefers-reduced-motion: reduce) {
  :root[data-boot="1"] .boot { animation: bootOut .01s linear .25s forwards; }
  .boot-inner img, .boot-name, .boot-rail, .boot-rail span { animation-duration: .01s; }
}

/* Bascule de langue : le drapeau aux vraies couleurs, borde de la teinte
   de la page, revele par un volet horizontal — le geste d'un montage.
   Le conteneur porte `hidden` : sans CSS ni JS, il ne rend rien du tout. */
.flag-swap {
  position: fixed; inset: 0; z-index: 380;
  display: grid; place-items: center; align-content: center; gap: 20px;
  background: var(--ink-900);
  color: var(--route);
  opacity: 0; visibility: hidden; pointer-events: none;
}
.flag-swap[hidden] { display: none; }
.flag-swap[data-on="true"] { visibility: visible; animation: flagVeil 1s var(--ease-out) forwards; }
@keyframes flagVeil {
  0%   { opacity: 0; }
  14%  { opacity: 1; }
  76%  { opacity: 1; }
  100% { opacity: 0; visibility: hidden; }
}

.flag-swap figure { display: none; }
.flag-swap[data-lang="en"] .flag-en,
.flag-swap[data-lang="fr"] .flag-fr { display: block; }

.flag-swap svg {
  width: min(30vw, 208px); height: auto; display: block;
  box-shadow: var(--lift-2);
}
/* Volet : le drapeau se decouvre de gauche a droite, pas au trait. */
.flag-swap[data-on="true"] figure {
  clip-path: inset(0 100% 0 0);
  animation: flagWipe .5s var(--ease-out) .1s forwards;
}
@keyframes flagWipe { to { clip-path: inset(0 0 0 0); } }

.flag-swap .flag-code { color: var(--route); opacity: 0; }
.flag-swap[data-on="true"] .flag-code { animation: flagLabel .38s var(--ease-out) .36s forwards; }
@keyframes flagLabel { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .flag-swap[data-on="true"] { animation-duration: .01s; }
  .flag-swap[data-on="true"] figure { animation: none; clip-path: none; }
  .flag-swap[data-on="true"] .flag-code { animation: none; opacity: 1; }
}

/* rideau de transition entre les trois routes */
/* Ordre des couches : rideau 350 > voile de chargement 400 > modales 200
   > barre du haut 60. Si un élément passe par-dessus autre chose, c'est ici
   que ça se règle, et nulle part ailleurs avec un 9999. */
.curtain {
  position: fixed; inset: 0; z-index: 350;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background: var(--ink-900);
  transform: translateY(100%);
  pointer-events: none; visibility: hidden;
}
.curtain-label {
  font-family: 'Archivo', system-ui, sans-serif; font-weight: 900; font-stretch: 120%;
  font-size: clamp(2rem, 7vw, 3.6rem); letter-spacing: -0.04em; text-transform: uppercase;
  color: var(--route);
}
.curtain-rule { width: clamp(120px, 26vw, 260px); height: 2px; background: var(--route); }
.curtain-sub { color: var(--paper-3); }

.curtain[data-state="cover"] { visibility: visible; animation: curtainIn .36s var(--ease-cut) forwards; }
:root[data-enter="1"] .curtain {
  visibility: visible; transform: none;
  animation: curtainOut .52s var(--ease-out) .06s forwards;
}
@keyframes curtainIn  { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes curtainOut { from { transform: translateY(0); } to { transform: translateY(-100%); visibility: hidden; } }
@media (prefers-reduced-motion: reduce) {
  .curtain[data-state="cover"] { animation-duration: .01s; }
  :root[data-enter="1"] .curtain { animation: curtainOut .01s linear forwards; }
}

/* responsive */
@media (max-width: 1040px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 290px); }
  .process { grid-template-columns: repeat(2, 1fr); }
}

/* Sous 900 px l'epinglage n'a plus de sens : la section redevient normale
   et les quatre etapes se lisent d'un bloc. */
@media (max-width: 900px) {
  .method-pin { height: auto !important; }
  .method-sticky {
    position: static !important; min-height: 0 !important;
    padding-block: clamp(72px, 11vw, 148px) !important;
  }
  .process-rail { display: none; }
  .process { padding-top: 0; }
  .step { padding-top: 22px; border-top: 2px solid var(--line); opacity: 1 !important; }
  .step .n { color: var(--route) !important; }
}

@media (max-width: 900px) {
  .nav { display: none; }
  .burger { display: inline-flex; }
  /* Le sélecteur d'attribut de la variante « wide » est plus spécifique :
     il faut le renommer ici, sinon le hero reste sur deux colonnes. */
  .hero-grid, .hero-grid[data-shape="wide"] { grid-template-columns: minmax(0, 1fr); }
  .monitor { max-width: 300px; margin-inline: auto; width: 100%; }
  .spec-row { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .rates { grid-template-columns: minmax(0, 1fr); }
  .rate { border-right: 0; border-bottom: 1px solid var(--line); }
  .rate:last-child { border-bottom: 0; }
  .brief-grid, .cv-grid { grid-template-columns: minmax(0, 1fr); }
  .gateways, .projects { grid-template-columns: minmax(0, 1fr); }
  .quinoa-grid { grid-template-columns: minmax(0, 1fr); }
  .quinoa-mark { max-width: 230px; order: -1; }
  .live-card { grid-template-columns: minmax(0, 1fr); }
  .live-stage { border-right: 0; border-bottom: 1px solid var(--line); }
  .tubes { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .duo { grid-template-columns: minmax(0, 1fr); }
  /* La pastille de connectes passe sous le texte plutot que de serrer
     le bouton d'invitation contre le bord. */
  .server { grid-template-columns: auto minmax(0, 1fr); }
  .server .btn { grid-column: 2; justify-self: start; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .reel { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .clip-stage { max-width: 330px; }
  .clip { align-items: stretch; }
  .process { grid-template-columns: minmax(0, 1fr); }
  .field-pair { grid-template-columns: minmax(0, 1fr); }
  .skills { grid-template-columns: minmax(0, 1fr); }
  .gateway { flex-direction: column; align-items: flex-start; gap: 16px; }
  .footer-grid { flex-direction: column; align-items: flex-start; }
  .tubes { grid-template-columns: minmax(0, 1fr); }
  .server { grid-template-columns: minmax(0, 1fr); }
  .server .btn { grid-column: 1; }
  .role { grid-template-columns: minmax(0, 1fr); gap: 12px; }
}

/* impression et PDF du CV
   Le PDF est genere depuis cette feuille : si tu la changes, regenere-le,
   sinon la page et le fichier racontent deux choses differentes. */
@page { size: A4; margin: 12mm 14mm; }

.print-head { display: none; }

@media print {
  .topbar, .timeline, .mobile-nav, .lightbox, .btn-row,
  #elsewhere, .site-footer, #bg, .boot, .curtain { display: none !important; }

  html, body { background: #fff !important; color: #16130f !important; padding: 0 !important; }
  body { font-size: 9.8pt; line-height: 1.38; }
  .shell { max-width: none; padding-inline: 0; }
  section { padding-block: 0 !important; border: 0 !important; }
  .hero { padding: 0 !important; min-height: 0 !important; }

  .print-head {
    display: block; border-bottom: 1.5pt solid #16130f;
    padding-bottom: 5pt; margin-bottom: 9pt;
  }
  .print-name {
    font-family: 'Archivo', sans-serif; font-weight: 800; font-stretch: 118%;
    font-size: 24pt; letter-spacing: -0.03em; text-transform: uppercase; line-height: 1;
  }
  .print-contact { font-size: 9pt; color: #4a423a; margin-top: 4pt; }

  /* Le titre du site ferait doublon avec l'en-tete du PDF. */
  .hero h1 { display: none !important; }
  .hero .lede { font-size: 9.5pt; color: #3a332c; max-width: none; margin: 0 0 9pt; }

  .cv-grid { display: grid !important; grid-template-columns: 1fr 2.4fr !important; gap: 8pt !important; }
  .panel {
    border: 0.6pt solid #cfc8bf !important; background: #fff !important;
    padding: 7pt 9pt !important; break-inside: avoid;
  }
  .panel + .panel { margin-top: 6pt !important; }
  .panel > h3 {
    color: #2f6b45 !important; font-size: 11pt !important;
    margin-bottom: 6pt; padding-bottom: 3pt; border-bottom: 0.6pt solid #cfc8bf;
  }
  .panel p, .tl-desc, .skill li, .facts span, .lang-row .n { color: #2a251f !important; }
  .tl-date { color: #2f6b45 !important; font-size: 7.5pt; }
  .tl-title { font-size: 10pt; }
  .tl-org, .lang-row .v { color: #5d554c !important; }
  .tl-item { padding-left: 9pt; padding-bottom: 7pt; border-left: 0.6pt solid #d8d2ca; break-inside: avoid; }
  .tl-item::before { background: #2f6b45 !important; box-shadow: none !important; width: 5pt; height: 5pt; left: -2.8pt; }
  .facts span, .tags span { border-color: #cfc8bf !important; color: #3a332c !important; }
  .skill li svg { color: #2f6b45 !important; }
  .skills { gap: 7pt !important; }
  .tl-desc { margin-top: 5pt; }
  .facts { margin-top: 7pt; }
  a { text-decoration: none; color: inherit; }
}
