/* FICHIER GÉNÉRÉ — ne pas éditer.
   Source : css/tokens.css, css/xp.css
   Régénérer avec : python3 build.py */
/* ===== tokens.css ===== */
/* ============================================================
   ANTHONY ROD — XP PORTFOLIO
   01 · Tokens, reset, typographie
   ============================================================ */

@font-face { font-family: 'Clash Display'; src: url('../assets/fonts/ClashDisplay-300.woff2') format('woff2'); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: 'Clash Display'; src: url('../assets/fonts/ClashDisplay-400.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Clash Display'; src: url('../assets/fonts/ClashDisplay-500.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Clash Display'; src: url('../assets/fonts/ClashDisplay-600.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }

:root {
  /* — Fond : noir, très noir — */
  --bg:        #000000;
  --bg-lift:   #0a0a0b;

  /* — Encre — */
  --ink:       #F4F2ED;
  --ink-65:    rgba(244, 242, 237, 0.65);
  --ink-40:    rgba(244, 242, 237, 0.40);
  --ink-25:    rgba(244, 242, 237, 0.25);

  /* — Traits — */
  --line:      rgba(244, 242, 237, 0.11);

  /* — Signal : un blanc nacré, très légèrement plus froid et plus clair
     que l'encre, pour que la mise en avant se lise sans crier — */
  --accent:      #FAF8FF;
  --accent-ink:  #FAF8FF;

  /* — Mesures — */
  --pad:       clamp(20px, 3.4vw, 68px);
  --nav-h:     70px;
  --gap-sec:   clamp(120px, 19vh, 260px);
  --radius:    3px;

  /* — Courbes — */
  --ease:      cubic-bezier(0.22, 1, 0.36, 1);
  --ease-io:   cubic-bezier(0.65, 0, 0.35, 1);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--bg); }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Clash Display', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 400;
  font-size: 15px;
  line-height: 1.55;
  letter-spacing: -0.005em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-synthesis: none;
}

/* Léger relief au centre du haut de page — puis noir absolu */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(90% 55% at 50% 0%, var(--bg-lift) 0%, #030303 42%, var(--bg) 78%);
}

/* Visible des moteurs et des lecteurs d'écran, invisible à l'oeil.
   Jamais display:none ni visibility:hidden : le contenu serait ignoré. */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; }

::selection { background: var(--accent); color: #060606; }

/* ============================================================
   TYPOGRAPHIE
   ============================================================ */

.t-title {
  font-weight: 500;
  font-size: clamp(28px, 4.4vw, 68px);
  line-height: 0.98;
  letter-spacing: -0.035em;
}

.t-lead {
  font-weight: 300;
  font-size: clamp(17px, 1.7vw, 24px);
  line-height: 1.45;
  letter-spacing: -0.018em;
  color: var(--ink-65);
}

.t-body {
  font-weight: 400;
  font-size: clamp(14px, 1.02vw, 16px);
  line-height: 1.7;
  color: var(--ink-65);
}

.t-micro {
  font-weight: 500;
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-40);
  font-variant-numeric: tabular-nums;
}

.t-num {
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.14em;
  font-variant-numeric: tabular-nums;
  color: var(--ink-25);
}

.accent { color: var(--accent-ink); }

/* ============================================================
   RÉVÉLATIONS AU SCROLL
   ============================================================ */
.rv {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}
.rv.in { opacity: 1; transform: none; }
.rv[data-d="1"] { transition-delay: 0.09s; }
.rv[data-d="2"] { transition-delay: 0.18s; }
.rv[data-d="3"] { transition-delay: 0.27s; }
.rv[data-d="4"] { transition-delay: 0.36s; }

.rv-mask { display: block; overflow: hidden; padding-bottom: 0.06em; }
.rv-mask > span {
  display: block;
  transform: translateY(105%);
  transition: transform 1.05s var(--ease);
}
.rv.in .rv-mask > span { transform: none; }
.rv.in .rv-mask:nth-child(2) > span { transition-delay: 0.08s; }
.rv.in .rv-mask:nth-child(3) > span { transition-delay: 0.16s; }
.rv.in .rv-mask:nth-child(4) > span { transition-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rv, .rv-mask > span { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* ===== xp.css ===== */
/* ============================================================
   VERSION ALTERNATIVE — LE COULOIR
   Le site entier est un seul voyage 3D continu.
   Aucune section classique : on traverse tout.
   ============================================================ */

/* La piste de scroll pilote la caméra */
.trip { position: relative; height: 1650vh; z-index: 2; }

.deck {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  perspective: calc(1200px * var(--u, 1));
  perspective-origin: 50% 50%;
  background: #000;
  transform: translateZ(0);
}

/* Couche des cartes : c'est la seule qui tourne avec le tunnel */
.deck__world {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  will-change: transform;
}

/* Couche des plaques : aucune rotation, jamais.
   Elle est posée au-dessus des cartes, donc rien ne vient masquer un titre. */
.deck__plates {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  pointer-events: none;
}

/* ------------------------------------------------------------
   LES CARTES — mur puis tunnel
   ------------------------------------------------------------ */
.card {
  position: absolute;
  top: 50%; left: 50%;
  width: calc(290px * var(--u, 1));
  height: calc(163px * var(--u, 1));
  margin: calc(-81.5px * var(--u, 1)) 0 0 calc(-145px * var(--u, 1));
  transform-style: preserve-3d;
  backface-visibility: hidden;
  will-change: transform, opacity;
  border-radius: 3px;
  overflow: hidden;
  background: #0b0b0c;
}
.card img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.92) contrast(1.04); }
.card__fog { position: absolute; inset: 0; background: #000; opacity: 0; pointer-events: none; }

.card--type {
  display: flex; align-items: center; justify-content: center; text-align: center;
  background: #0a0a0b;
  box-shadow: inset 0 0 0 1px rgba(244, 242, 237, 0.16);
}
.card--type span {
  display: block; font-weight: 600; font-size: calc(26px * var(--u, 1)); line-height: 1;
  letter-spacing: -0.035em; text-transform: uppercase; color: var(--ink);
}
.card--type small {
  display: block; font-size: calc(8.5px * var(--u, 1)); font-weight: 500; letter-spacing: 0.26em;
  text-transform: uppercase; color: var(--ink-40); margin-top: 8px;
}
.card--paper { background: var(--ink); box-shadow: none; }
.card--paper span { color: #060606; }
.card--paper small { color: rgba(6, 6, 6, 0.45); }
.card--accent { background: var(--accent); box-shadow: none; }
.card--accent span { color: #060606; }
.card--accent small { color: rgba(6, 6, 6, 0.45); }

/* ------------------------------------------------------------
   LES PLAQUES — ce qu'on traverse : projets, profil, contact
   Pas de will-change : le texte reste net pendant l'approche.
   ------------------------------------------------------------ */
/* container-type : tout ce qui vit dans une plaque se dimensionne en
   cqw, donc en pourcentage de la plaque. Changer sa largeur à un palier
   suffit à remettre tout son contenu à l'échelle. */
.plate {
  position: absolute;
  top: 50%; left: 50%;
  container-type: inline-size;
  width: 82vw;
  max-width: 1180px;
  opacity: 0;
  visibility: hidden;
}
.plate--narrow { width: 50vw; max-width: 720px; }

/* ------------------------------------------------------------
   LES ÉQUERRES — le motif de cadre réutilisable partout.
   Quatre coins tracés par huit dégradés : aucun balisage en plus,
   et jamais de filet continu.
   ------------------------------------------------------------ */
@property --ec {
  syntax: '<color>';
  inherits: false;
  initial-value: rgba(244, 242, 237, 0.30);
}

.eq {
  --eq: 30px;   /* longueur de l'équerre */
  --ep: 1.5px;  /* épaisseur */
  --ec: rgba(244, 242, 237, 0.30);
  background:
    linear-gradient(var(--ec), var(--ec)) left  top    / var(--eq) var(--ep) no-repeat,
    linear-gradient(var(--ec), var(--ec)) left  top    / var(--ep) var(--eq) no-repeat,
    linear-gradient(var(--ec), var(--ec)) right top    / var(--eq) var(--ep) no-repeat,
    linear-gradient(var(--ec), var(--ec)) right top    / var(--ep) var(--eq) no-repeat,
    linear-gradient(var(--ec), var(--ec)) left  bottom / var(--eq) var(--ep) no-repeat,
    linear-gradient(var(--ec), var(--ec)) left  bottom / var(--ep) var(--eq) no-repeat,
    linear-gradient(var(--ec), var(--ec)) right bottom / var(--eq) var(--ep) no-repeat,
    linear-gradient(var(--ec), var(--ec)) right bottom / var(--ep) var(--eq) no-repeat;
  transition: --ec 0.5s var(--ease);
}

/* — Plaque projet — le cadre n'entoure que l'image — */
.gate { display: block; color: inherit; }

.gate__frame { --eq: 3.6cqw; --ep: 2px; padding: 2cqw; }
.gate:hover .gate__frame { --ec: var(--ink); }

.gate__media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 3px;
  background: #0b0b0c;
}
.gate__media img {
  width: 100%; height: 100%; object-fit: cover;
  filter: saturate(0.9) contrast(1.05) brightness(0.68);
  /* Le transform est piloté en JS pour la parallaxe : pas de transition
     dessus, sinon elle traînerait derrière le scroll. */
  transform: scale(1.18);
  transition: filter 0.8s var(--ease);
  will-change: transform;
}
.gate:hover .gate__media img { filter: saturate(1) contrast(1.02) brightness(0.9); }

.gate__title {
  position: absolute;
  left: 0; right: 0; top: 50%;
  transform: translateY(-50%);
  text-align: center;
  font-weight: 600;
  font-size: 9.2cqw;
  line-height: 0.9;
  letter-spacing: -0.05em;
  text-transform: uppercase;
  padding-inline: 40px;
  text-wrap: balance;
  text-shadow: 0 6px 60px rgba(0, 0, 0, 0.6);
}

/* La ligne d'info vit hors du cadre */
.gate__bar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding: 1.9cqw 2.2cqw 0;
}
.gate__bar .t-micro { font-size: 1.28cqw; letter-spacing: 0.22em; }
.gate__go { display: inline-flex; align-items: center; gap: 12px; color: var(--ink-40); transition: color 0.4s var(--ease); }
.gate:hover .gate__go { color: var(--accent-ink); }
.gate__go svg { width: 16px; height: 16px; }

/* — Plaque texte : manifeste, profil, contact — */
.slab { text-align: center; }
.slab__eyebrow { display: block; font-size: 1.28cqw; letter-spacing: 0.24em; margin-bottom: 34px; }
.slab__big {
  font-weight: 500;
  font-size: 7.8cqw;
  line-height: 1.1;
  letter-spacing: -0.045em;
  text-transform: uppercase;
  text-wrap: balance;
}
/* Mise en avant : un bloc nacré et le texte en négatif, à la manière
   d'une sélection. box-decoration-break garde le pavé propre quand la
   phrase passe à la ligne. */
.slab__big em,
.phrase em {
  font-style: normal;
  color: #060606;
  background: var(--accent);
  padding: 0.05em 0.16em 0.02em;
  -webkit-box-decoration-break: clone;
          box-decoration-break: clone;
}
.slab__body { font-size: 2.2cqw; line-height: 1.5; color: var(--ink-65); margin-top: 40px; text-wrap: balance; }

/* — Plaque données : CV — */
.data { text-align: left; padding: 4.2cqw 4.7cqw; }
.data__label {
  display: block;
  font-size: 2.1cqw; letter-spacing: 0.24em;
  margin-bottom: 3.6cqw;
}
.data__row {
  position: relative;
  padding: 22px 0;
  display: grid; gap: 9px;
}
/* Le contenu glisse, pas la boîte : le repère orange reste calé à gauche
   et aucune mise en page n'est recalculée. */
.data__row > * { transition: transform 0.55s var(--ease), color 0.45s var(--ease); }
.data__row:hover > * { transform: translateX(26px); }
.data__row + .data__row { border-top: 1px solid rgba(244, 242, 237, 0.06); }
.data__row b {
  font-weight: 500; font-size: 4.2cqw; letter-spacing: -0.025em; line-height: 1.2;
  transition: color 0.45s var(--ease);
}
.data__row span { font-size: 2.8cqw; color: var(--ink-40); transition: color 0.45s var(--ease); }

/* Un repère orange se déploie à gauche au survol */
.data__row::before {
  content: '';
  position: absolute;
  left: 0; top: 26px; bottom: 26px;
  width: 2px;
  background: var(--accent-ink);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.55s var(--ease);
}
.data__row:hover::before { transform: scaleY(1); }
.data__row:hover b { color: var(--accent-ink); }
.data__row:hover span { color: var(--ink-65); }

/* — Les outils, sous la bio du profil : chacun dans son cadre — */
.kit {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5cqw 2.2cqw;
  margin-top: 4.4cqw;
}
.kit__cell {
  --eq: 15px;
  padding: 1.2cqw 1.9cqw;
  font-size: 1.62cqw;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
  transition: --ec 0.45s var(--ease), color 0.45s var(--ease);
}
.kit__cell:hover { --ec: var(--accent-ink); color: var(--accent-ink); }

/* — Plaque contact — */
.hail__lead {
  font-weight: 500;
  font-size: 12.7cqw;
  line-height: 0.9;
  letter-spacing: 0.005em;
  text-transform: uppercase;
}
/* Le mail dans un rectangle plein, les réseaux dans des équerres */
.hail__mail {
  display: inline-block;
  margin-top: 5.4cqw;
  font-size: 2.4cqw;
  letter-spacing: 0.01em;
  padding: 1.9cqw 3.7cqw;
  border: 1px solid var(--line);
  border-radius: 3px;
  transition: border-color 0.5s var(--ease), color 0.5s var(--ease), background 0.5s var(--ease);
}
.hail__mail:hover { border-color: var(--accent-ink); color: var(--accent-ink); }

.hail__social { display: flex; justify-content: center; gap: 3.7cqw; margin-top: 3.7cqw; }
.hail__social a {
  font-size: 1.28cqw;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-40);
  transition: color 0.4s var(--ease);
}
.hail__social a:hover { color: var(--accent-ink); }

/* ------------------------------------------------------------
   ATMOSPHÈRE
   ------------------------------------------------------------ */
.deck__vignette {
  position: absolute; inset: 0; z-index: 5; pointer-events: none;
  background: radial-gradient(125% 92% at 50% 50%, transparent 42%, rgba(0, 0, 0, 0.5) 84%, #000 100%);
}

/* Les phrases traversées */
.phrases {
  position: absolute; inset: 0; z-index: 6; pointer-events: none;
  display: grid; place-items: center; padding: var(--pad);
}
.phrase {
  grid-area: 1 / 1;
  max-width: 21ch; text-align: center;
  font-weight: 500;
  font-size: clamp(26px, 4.9vw, 74px);
  line-height: 1.18; letter-spacing: -0.032em; text-transform: uppercase;
  opacity: 0; will-change: transform, opacity, filter;
  text-wrap: balance;
}


/* ------------------------------------------------------------
   HUD — repères de voyage
   ------------------------------------------------------------ */
.hud {
  position: fixed; inset: 0; z-index: 60; pointer-events: none;
  padding: var(--pad);
}
/* Le curseur de volume doit rester saisissable hors de l'index */
.hud a, .hud button, .hud input, .hud .vol { pointer-events: auto; }

.hud__id {
  position: absolute;
  top: var(--pad); left: var(--pad);
  color: var(--ink);
}
/* La zone tactile est étendue par un pseudo-élément : le visuel reste fin,
   mais la cible atteint les 44 px recommandés. */
.hud__id::before {
  content: '';
  position: absolute;
  inset: -14px -10px;
  min-width: 44px;
  min-height: 44px;
}
.hud__id em { font-style: normal; color: var(--ink-40); }

.hud__chapter {
  position: absolute;
  bottom: var(--pad); left: var(--pad);
  display: flex; align-items: baseline; gap: 12px;
}
.hud__chapter b { font-weight: 500; color: var(--ink); font-size: 10px; letter-spacing: 0.24em; }

/* Rail de chapitres, à droite */
.rail {
  position: absolute;
  top: 50%; right: var(--pad);
  transform: translateY(-50%);
  display: flex; flex-direction: column; align-items: flex-end; gap: 16px;
  pointer-events: auto;
}
.rail button {
  display: flex; align-items: center; gap: 12px;
  cursor: pointer;
  color: var(--ink-25);
  transition: color 0.4s var(--ease);
}
.rail button i {
  display: block; width: 34px; height: 1px; background: currentColor;
  /* scaleX plutôt que width : composé par le GPU, aucun recalcul de mise en page */
  transform: scaleX(0.53);
  transform-origin: right center;
  transition: transform 0.5s var(--ease);
}
.rail button span {
  font-size: 9px; font-weight: 500; letter-spacing: 0.22em; text-transform: uppercase;
  opacity: 0; transform: translateX(6px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}
.rail button:hover, .rail button.on { color: var(--ink); }
.rail button.on i { transform: scaleX(1); background: var(--accent-ink); }
.rail button:hover span, .rail button.on span { opacity: 1; transform: none; }

/* Réglage du son et bouton index */
.hud__tools {
  position: absolute;
  top: var(--pad); right: var(--pad);
  display: flex; align-items: center;
  gap: clamp(18px, 2.2vw, 34px);
}

.hud__index {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 44px;
  cursor: pointer;
  color: var(--ink-40);
  transition: color 0.35s var(--ease);
}
.hud__index:hover { color: var(--ink); }
.hud__index i {
  display: block; width: 13px; height: 9px;
  border-top: 1px solid currentColor; border-bottom: 1px solid currentColor;
}

/* — Le volume, de 0 à 100 % — */
.vol {
  display: inline-flex; align-items: center; gap: 12px;
  color: var(--ink-40);
  transition: color 0.35s var(--ease);
}
.vol:hover { color: var(--ink); }
.vol.on { color: var(--accent-ink); }

.eqz { display: flex; align-items: flex-end; gap: 2px; height: 11px; flex: none; }
.eqz i {
  display: block; width: 2px; height: 11px;
  background: currentColor;
  transform: scaleY(0.27);
  transform-origin: bottom;
  transition: transform 0.3s var(--ease);
}
.vol.on .eqz i { animation: eqz 0.9s var(--ease-io) infinite alternate; }
.vol.on .eqz i:nth-child(2) { animation-duration: 0.62s; }
.vol.on .eqz i:nth-child(3) { animation-duration: 1.1s; }
.vol.on .eqz i:nth-child(4) { animation-duration: 0.78s; }
@keyframes eqz { from { transform: scaleY(0.18); } to { transform: scaleY(1); } }

.vol__range {
  --f: 70%;
  -webkit-appearance: none;
  appearance: none;
  width: 74px;
  /* Le trait reste à 1 px, mais la zone saisissable fait 44 px de haut */
  height: 44px;
  background: transparent;
  cursor: pointer;
  margin: 0;
}
.vol__range::-webkit-slider-runnable-track {
  height: 1px;
  background: linear-gradient(to right, var(--accent-ink) 0 var(--f), rgba(244, 242, 237, 0.22) var(--f) 100%);
}
.vol__range::-moz-range-track {
  height: 1px;
  background: linear-gradient(to right, var(--accent-ink) 0 var(--f), rgba(244, 242, 237, 0.22) var(--f) 100%);
}
.vol__range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 9px; height: 9px;
  margin-top: -4px;
  border-radius: 50%;
  background: var(--ink);
  transition: transform 0.25s var(--ease);
}
.vol__range::-moz-range-thumb {
  width: 9px; height: 9px;
  border: 0; border-radius: 50%;
  background: var(--ink);
}
.vol__range:hover::-webkit-slider-thumb { transform: scale(1.5); }
.vol__range:focus-visible { outline: 1px solid var(--accent-ink); outline-offset: 4px; }

.index-pane__right { display: flex; align-items: center; gap: clamp(20px, 2.6vw, 40px); }

/* Invite à descendre */
.hud__scroll {
  position: absolute;
  left: 50%; bottom: calc(var(--pad) + 2px);
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.hud__scroll i {
  display: block; width: 1px; height: 52px;
  background: rgba(244, 242, 237, 0.12);
  position: relative; overflow: hidden;
}
.hud__scroll i::after {
  content: ''; position: absolute; left: 0; width: 100%; height: 44%;
  background: linear-gradient(to bottom, transparent, var(--ink));
  animation: railScroll 2.2s var(--ease-io) infinite;
}
@keyframes railScroll {
  0% { top: -50%; opacity: 0; } 25% { opacity: 1; } 75% { opacity: 1; } 100% { top: 100%; opacity: 0; }
}

/* Horloge, en bas à droite */
.hud__clock { position: absolute; bottom: var(--pad); right: var(--pad); }

.progress {
  position: fixed; top: 0; left: 0;
  height: 1px; width: 100%;
  transform: scaleX(0); transform-origin: left;
  background: var(--accent-ink);
  z-index: 300; pointer-events: none; will-change: transform;
}

/* Traînée du curseur, allumée sur le dernier chapitre */
.trail {
  position: fixed;
  inset: 0;
  z-index: 9997;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s var(--ease);
}
@media (pointer: coarse) { .trail { display: none; } }

/* ------------------------------------------------------------
   INDEX — la sortie de secours lisible
   ------------------------------------------------------------ */
.index-pane {
  position: fixed; inset: 0; z-index: 500;
  background: #000;
  overflow-y: auto;
  overscroll-behavior: contain;
  opacity: 0; visibility: hidden;
  transition: opacity 0.55s var(--ease), visibility 0.55s;
}
.index-pane.open { opacity: 1; visibility: visible; }

.index-pane__head {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
  padding: 22px var(--pad);
  background: rgba(0, 0, 0, 0.84);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}
.index-pane__close { cursor: pointer; color: var(--ink-40); transition: color 0.35s var(--ease); }
.index-pane__close:hover { color: var(--ink); }

.index-pane__body { padding: clamp(48px, 8vh, 96px) var(--pad) clamp(60px, 10vh, 120px); }
.index-pane__body > * + * { margin-top: clamp(60px, 10vh, 130px); }

.pane-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 24px;
  margin-bottom: clamp(30px, 4.4vh, 52px);
}

/* Liste des travaux — reprise de la version validée */
.rows { border-top: 1px solid var(--line); }
.rows a {
  position: relative; display: grid;
  grid-template-columns: 62px minmax(0, 1fr) 24% 96px;
  align-items: center; gap: 20px;
  padding: clamp(20px, 2.6vw, 34px) 0;
  border-bottom: 1px solid var(--line);
  isolation: isolate;
  transition: opacity 0.55s var(--ease);
}
.rows:hover a { opacity: 0.32; }
.rows:hover a:hover { opacity: 1; }
.rows a::before {
  content: ''; position: absolute; inset: 0 calc(var(--pad) * -1); z-index: -1;
  background: rgba(244, 242, 237, 0.03); opacity: 0;
  transition: opacity 0.55s var(--ease);
}
.rows a:hover::before { opacity: 1; }
.rows b {
  font-weight: 500; font-size: clamp(20px, 3vw, 44px); line-height: 1.02;
  letter-spacing: -0.038em; text-transform: uppercase;
  transition: transform 0.65s var(--ease);
}
.rows a:hover b { transform: translateX(16px); }
.rows .go { justify-self: end; display: flex; align-items: center; gap: 10px; color: var(--ink-25); transition: color 0.45s var(--ease); }
.rows a:hover .go { color: var(--accent-ink); }
.rows .go svg { width: 11px; height: 11px; overflow: visible; }

/* Les colonnes portent le cadre d'équerres, plus de filet au-dessus */
.pane-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(28px, 3.2vw, 54px); }
.pane-cols > div { --eq: 22px; padding: 26px 28px 30px; }
.pane-cols h4 { font-weight: 500; font-size: 10px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--ink-40); margin-bottom: 22px; }
.pane-item { padding: 14px 0; display: grid; gap: 6px; }
.pane-item + .pane-item { border-top: 1px solid rgba(244, 242, 237, 0.055); }
.pane-item b { font-weight: 500; font-size: 14.5px; letter-spacing: -0.014em; line-height: 1.35; }
.pane-item span { color: var(--ink-40); font-size: 12.5px; }

/* Aperçu flottant qui suit le curseur, dans l'index */
.peek {
  position: fixed;
  top: 0; left: 0;
  z-index: 520;
  width: clamp(230px, 22vw, 360px);
  aspect-ratio: 16 / 10;
  border-radius: 3px;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transform: translate3d(-50%, -50%, 0) scale(0.9);
  transition: opacity 0.42s var(--ease);
  will-change: transform, opacity;
}
.peek.on { opacity: 1; }
.peek img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.38s var(--ease);
}
.peek img.on { opacity: 1; }
@media (pointer: coarse) { .peek { display: none; } }

/* Contact de l'index : la même adresse que sur la version validée */
.pane-hail { padding-block: clamp(40px, 7vh, 90px) clamp(20px, 4vh, 50px); }
.pane-hail__lead {
  font-weight: 500;
  font-size: clamp(40px, 10.4vw, 186px);
  line-height: 0.9;
  letter-spacing: 0.005em;
  text-transform: uppercase;
  text-align: center;
  color: var(--ink);
}
.pane-hail__mail {
  display: block;
  width: fit-content;
  margin: clamp(48px, 8vh, 110px) auto 0;
  font-size: clamp(15px, 1.5vw, 21px);
  letter-spacing: 0.02em;
  padding: 20px 40px;
  border: 1px solid var(--line);
  border-radius: 3px;
  transition: border-color 0.5s var(--ease), color 0.5s var(--ease);
}
.pane-hail__mail:hover { border-color: var(--accent-ink); color: var(--accent-ink); }

.pane-quad { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(26px, 3vw, 48px); }
.pane-quad article { --eq: 22px; display: grid; gap: 14px; align-content: start; padding: 26px 26px 32px; }
.pane-quad h4 { font-weight: 500; font-size: clamp(16px, 1.5vw, 21px); letter-spacing: -0.025em; text-transform: uppercase; line-height: 1.1; }

body.pane-open { overflow: hidden; }

/* ------------------------------------------------------------
   PRÉCHARGEUR
   ------------------------------------------------------------ */
body.is-loading { overflow: hidden; height: 100vh; }
.loader {
  position: fixed; inset: 0; z-index: 9999; background: #000;
  display: grid; place-items: center;
  transition: opacity 0.8s var(--ease-io), visibility 0.8s;
}
.loader.done { opacity: 0; visibility: hidden; }
.loader__inner { width: min(520px, 74vw); }
.loader__count { font-weight: 600; font-size: clamp(52px, 11vw, 118px); line-height: 1; letter-spacing: -0.05em; font-variant-numeric: tabular-nums; }
.loader__bar { height: 1px; background: rgba(244, 242, 237, 0.12); margin: 24px 0 14px; position: relative; overflow: hidden; }
.loader__bar i {
  position: absolute; inset: 0; width: 100%;
  background: var(--ink);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.25s linear;
}
.loader__meta { display: flex; justify-content: space-between; }

/* ------------------------------------------------------------
   CURSEUR
   ------------------------------------------------------------ */
/* --cs porte l'agrandissement : le transform est écrit par le JS à chaque
   image et lit cette variable, donc plus rien ne recalcule de mise en page. */
@property --cs {
  syntax: '<number>';
  inherits: false;
  initial-value: 1;
}
.cursor {
  --cs: 1;
  position: fixed; top: 0; left: 0; z-index: 9998;
  width: 24px; height: 24px;
  border: 1px solid var(--ink-25); border-radius: 50%;
  pointer-events: none; transform: translate3d(-50%, -50%, 0);
  transition: --cs 0.38s var(--ease), background 0.38s var(--ease), border-color 0.38s var(--ease), opacity 0.3s;
  will-change: transform;
}
.cursor.on-link { --cs: 2.42; border-color: transparent; background: rgba(244, 242, 237, 0.1); }
@media not all and (pointer: fine) { .cursor { display: none; } }
@media (max-width: 900px) { .cursor { display: none; } }

/* ------------------------------------------------------------
   ADAPTATIONS
   ------------------------------------------------------------ */
/* — Tablette —
   Les plaques s'élargissent en vw ; leur contenu, en cqw, suit tout seul.
   La scène 3D, elle, est déjà remise à l'échelle par --u. */
@media (max-width: 1024px) {
  .plate { width: 108vw; max-width: none; }
  .plate--narrow { width: 84vw; max-width: none; }

  .pane-quad { grid-template-columns: repeat(2, 1fr); }
  .pane-cols { grid-template-columns: repeat(2, 1fr); }
  .index-pane__body > * + * { margin-top: clamp(48px, 8vh, 90px); }
}

/* — Mobile — */
@media (max-width: 700px) {
  .trip { height: 1250vh; }

  .plate { width: 132vw; }
  .plate--narrow { width: 116vw; }

  /* Le HUD se resserre : la barre du haut ne doit jamais se chevaucher */
  .hud__id { max-width: 46vw; line-height: 1.4; }
  .hud__tools { gap: 16px; }
  .vol__range { width: 52px; }
  .hud__index span { display: none; }
  .rail { display: none; }
  .peek { display: none; }

  /* En bas : le chapitre à gauche, l'heure disparaît pour laisser
     respirer l'invite centrale */
  .hud__clock { display: none; }
  .hud__scroll { bottom: calc(var(--pad) + 26px); }

  .rows a { grid-template-columns: 34px 1fr auto; gap: 12px; }
  .rows .cat { display: none; }
  .rows b { font-size: 6.4vw; }

  .pane-quad, .pane-cols { grid-template-columns: 1fr; }
  .pane-cols > div, .pane-quad article { padding: 22px 20px 26px; --eq: 18px; }
  .index-pane__head { padding: 16px var(--pad); }
  .index-pane__right { gap: 16px; }
  .pane-hail__mail { padding: 16px 26px; }
}

/* — Très petits écrans — */
@media (max-width: 400px) {
  .plate { width: 150vw; }
  .plate--narrow { width: 132vw; }
  .hud__id { font-size: 9px; }
}

/* — Paysage court : on évite que les plaques dépassent en hauteur — */
@media (max-height: 520px) and (orientation: landscape) {
  .plate { width: 76vw; }
  .plate--narrow { width: 58vw; }
  .hud__scroll { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .hud__scroll i::after { animation: none; }
}
