/*
 * Copyright (c) 2026 John Luke NIKABOU (LucNIK) - OSC. All rights reserved.
 * SPDX-License-Identifier: LicenseRef-Proprietary
 */

/* ---------- Polices auto-hébergées (SIL OFL 1.1, voir THIRD-PARTY-NOTICES.txt) ---------- */
/* Réduites aux caractères latins et aux seules graisses/largeurs utilisées, en WOFF2 (repli WOFF). */
@font-face { font-family: "Archivo"; src: url("../fonts/archivo.woff2") format("woff2"); font-weight: 600 800; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url("../fonts/space-grotesk.woff2") format("woff2"); font-weight: 400 600; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("../fonts/jetbrains-mono.woff2") format("woff2"); font-weight: 400 800; font-display: swap; }

/* ==========================================================================
   Jetons de design : couleurs (sémantiques), espacements (grille de 4/8 px),
   rayons, profondeurs, durées, couches. Aucune valeur brute dans les composants.
   ========================================================================== */
:root {
  /* Couleurs — thème sombre (contrastes mesurés sur --bg) */
  --bg: #05070b;
  --bg-2: #0b0f17;
  --fg: #eef1f6;                 /* 17,6:1 */
  --muted: #9aa4b5;              /* 7,9:1  */
  --line: rgba(238, 241, 246, .16);
  --line-strong: rgba(238, 241, 246, .32);
  --line-input: rgba(238, 241, 246, .4);   /* contour de champ : 3,5:1 */
  --surface: rgba(14, 19, 29, .88);
  --surface-solid: #0e131d;
  --accent: #2563eb;             /* fond des boutons : texte blanc 5,2:1 */
  --accent-text: #6ea8ff;        /* accent en texte : 7,9:1 */
  --accent-2: #22d3ee;
  --on-accent: #ffffff;
  --danger: #ff8a8a;
  --ok: #5ee6a8;
  --p1: #6ea8ff;                 /* pions du visiteur */
  --p2: #f5b041;                 /* pions de l'IA */
  --board: #101a2c;
  --hole: #05070b;
  --scrim: rgba(3, 5, 9, .78);
  --particle: 238, 241, 246;
  --particle-accent: 110, 168, 255;
  --particle-alt: 34, 211, 238;
  --veil: radial-gradient(120% 90% at 0% 50%, rgba(5,7,11,.92) 0%, rgba(5,7,11,.55) 45%, rgba(5,7,11,0) 75%);
  --shadow-1: 0 8px 24px -12px rgba(0, 0, 0, .55);
  --shadow-2: 0 30px 80px -24px rgba(0, 0, 0, .7);

  /* Typographie */
  --font-head: "Archivo", "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Noto Sans SC", "Source Han Sans SC", sans-serif;
  --font-body: "Space Grotesk", system-ui, -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Noto Sans SC", "Source Han Sans SC", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Noto Sans SC", "Source Han Sans SC", monospace;
  --fs-xs: .75rem;   /* 12 px, minimum absolu */
  --fs-sm: .875rem;  /* 14 px */
  --fs-md: 1rem;     /* 16 px */
  --fs-lg: 1.125rem; /* 18 px */

  /* Espacements (grille de 4/8 px) */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px;
  --gutter: clamp(16px, 4vw, 56px);

  /* Rayons */
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 24px; --r-pill: 999px;

  /* Icônes : une seule taille et une seule épaisseur de trait */
  --icon: 18px;
  --stroke: 1.75;

  /* Mouvement */
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-in: cubic-bezier(.7, 0, .84, 0);
  --ease-io: cubic-bezier(.87, 0, .13, 1);
  --d-fast: 150ms; --d-base: 250ms; --d-slow: 500ms;

  /* Couches */
  --z-scene: 0; --z-veil: 1; --z-grain: 2; --z-stage: 5; --z-hud: 10; --z-toast: 30; --z-cursor: 40; --z-skip: 50; --z-boot: 60;

  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f4f5f7; --bg-2: #e9ecf1; --fg: #0b0e14; --muted: #4a5466;
    --line: rgba(11, 14, 20, .14); --line-strong: rgba(11, 14, 20, .3); --line-input: rgba(11, 14, 20, .48);
    --surface: rgba(255, 255, 255, .9); --surface-solid: #ffffff;
    --accent: #1d4ed8; --accent-text: #1d4ed8; --accent-2: #0e7490;
    --danger: #b42318; --ok: #067647;
    --p1: #1d4ed8; --p2: #b45309; --board: #d9e1ee; --hole: #f8f9fb; --scrim: rgba(15, 20, 30, .55);
    --particle: 20, 26, 38; --particle-accent: 29, 78, 216; --particle-alt: 14, 116, 144;
    --veil: radial-gradient(120% 90% at 0% 50%, rgba(244,245,247,.94) 0%, rgba(244,245,247,.6) 45%, rgba(244,245,247,0) 75%);
    --shadow-1: 0 8px 24px -14px rgba(15, 23, 42, .35);
    --shadow-2: 0 30px 80px -28px rgba(15, 23, 42, .45);
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #f4f5f7; --bg-2: #e9ecf1; --fg: #0b0e14; --muted: #4a5466;
  --line: rgba(11, 14, 20, .14); --line-strong: rgba(11, 14, 20, .3); --line-input: rgba(11, 14, 20, .48);
  --surface: rgba(255, 255, 255, .9); --surface-solid: #ffffff;
  --accent: #1d4ed8; --accent-text: #1d4ed8; --accent-2: #0e7490;
  --danger: #b42318; --ok: #067647;
  --p1: #1d4ed8; --p2: #b45309; --board: #d9e1ee; --hole: #f8f9fb; --scrim: rgba(15, 20, 30, .55);
  --particle: 20, 26, 38; --particle-accent: 29, 78, 216; --particle-alt: 14, 116, 144;
  --veil: radial-gradient(120% 90% at 0% 50%, rgba(244,245,247,.94) 0%, rgba(244,245,247,.6) 45%, rgba(244,245,247,0) 75%);
  --shadow-1: 0 8px 24px -14px rgba(15, 23, 42, .35);
  --shadow-2: 0 30px 80px -28px rgba(15, 23, 42, .45);
  color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
/* Aucune sélection de texte sur le site, sauf dans le champ de saisie */
html { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
input, textarea { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }
img, svg, a { -webkit-user-drag: none; }
html { height: 100%; scroll-padding-top: 96px; scroll-padding-bottom: 72px; }
html.is-locked { overflow: hidden; }
body {
  position: relative;
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 var(--fs-md)/1.55 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100svh;
  transition: background-color var(--d-slow) var(--ease-out), color var(--d-slow) var(--ease-out);
}
.mono { font-family: var(--font-mono); font-size: var(--fs-xs); letter-spacing: .08em; text-transform: uppercase; }
.dim, .muted { color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
button { font: inherit; color: inherit; }
button, a, [role="tab"], [role="radio"] { touch-action: manipulation; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; border-radius: var(--r-sm); }
.skip { position: fixed; left: var(--gutter); top: -64px; z-index: var(--z-skip); padding: var(--s-3) var(--s-4); background: var(--accent); color: var(--on-accent); border-radius: var(--r-sm); text-decoration: none; font-weight: 600; }
.skip:focus { top: var(--s-3); }
/* Icônes au trait : une seule famille */
.ico, .chip svg:not(.flag), .btn__icon, .field svg, .link svg:not(.brand), .feature__btn svg, .ghost svg, .points svg, .proj__close svg {
  width: var(--icon); height: var(--icon); flex: none;
  fill: none; stroke: currentColor; stroke-width: var(--stroke); stroke-linecap: round; stroke-linejoin: round;
}
/* Logos de marque officiels : pleins, jamais retouchés */
.brand { width: var(--icon); height: var(--icon); flex: none; fill: currentColor; stroke: none; }

/* ---------- Couches de scène ---------- */
.scene { position: fixed; inset: 0; width: 100%; height: 100%; z-index: var(--z-scene); display: block; }
.veil { position: fixed; inset: 0; z-index: var(--z-veil); background: var(--veil); pointer-events: none; }
.grain {
  position: fixed; inset: -50%; z-index: var(--z-grain); pointer-events: none; opacity: .06;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain { 0%{transform:translate(0,0)} 25%{transform:translate(-3%,2%)} 50%{transform:translate(2%,-3%)} 75%{transform:translate(-2%,-1%)} 100%{transform:translate(1%,3%)} }

/* ---------- Curseur (pointeur fin uniquement) ---------- */
.cursor { position: fixed; left: 0; top: 0; z-index: var(--z-cursor); pointer-events: none; width: 36px; height: 36px; margin: -18px 0 0 -18px; opacity: 0; transition: opacity .3s; }
.cursor span { display: block; width: 100%; height: 100%; border: 1px solid var(--accent-text); border-radius: 50%; transition: transform .35s var(--ease-out), background-color .35s; }
.cursor.is-on { opacity: 1; }
.cursor.is-hover span { transform: scale(1.7); background: color-mix(in srgb, var(--accent-text) 14%, transparent); }
html.is-locked .cursor { display: none; }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

/* ---------- En-tête et pied (HUD) ---------- */
.hud { position: fixed; left: 0; right: 0; z-index: var(--z-hud); display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); padding: var(--s-4) var(--gutter); }
.hud--top { top: 0; padding-top: max(var(--s-4), env(safe-area-inset-top)); transition: background-color var(--d-base) var(--ease-out), box-shadow var(--d-base) var(--ease-out); }
/* Quand la page défile (mobile), l'en-tête reçoit un fond pour ne jamais chevaucher le texte */
.hud--top.is-scrolled { background: color-mix(in srgb, var(--bg) 86%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--line); }
.hud--bottom { position: absolute; bottom: 0; color: var(--muted); padding-bottom: max(var(--s-4), env(safe-area-inset-bottom)); }
.hud__brand { display: flex; align-items: center; gap: var(--s-3); font: 600 1.0625rem/1 var(--font-head); letter-spacing: -.01em; }
.logo { width: 28px; height: 28px; color: var(--fg); }
.hud__meta { display: flex; gap: var(--s-5); color: var(--muted); }
.status { display: inline-flex; align-items: center; gap: var(--s-2); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 60%, transparent); } 100% { box-shadow: 0 0 0 9px transparent; } }
.hud__ctrl { display: flex; gap: var(--s-2); }

/* Boutons ronds de l'en-tête : exactement 44 × 44 px, tous identiques */
.chip {
  display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0;
  border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--surface);
  cursor: pointer; transition: border-color var(--d-fast), transform var(--d-fast) var(--ease-out), background-color var(--d-fast);
}
.chip:hover { border-color: var(--accent-text); }
.chip:active { transform: scale(.95); }
.chip .i-play { display: none; fill: currentColor; stroke: none; }
.chip[aria-pressed="true"] .i-play { display: block; }
.chip[aria-pressed="true"] .i-pause { display: none; }
.flags { display: grid; }
.chip .flag { display: none; grid-area: 1 / 1; width: 22px; height: 15px; border-radius: 3px; box-shadow: 0 0 0 1px var(--line); stroke: none; fill: none; transition: transform var(--d-fast) var(--ease-out); }
html[lang="fr"] .chip .flag--fr, html[lang="en"] .chip .flag--en, html[lang^="zh"] .chip .flag--zh { display: block; }
.chip--lang:hover .flag { transform: scale(1.08); }

/* Message bref (adresse copiée) */
.toast {
  position: fixed; left: 50%; top: max(84px, calc(env(safe-area-inset-top) + 72px)); z-index: var(--z-toast);
  max-width: calc(100vw - 32px); padding: var(--s-3) var(--s-4); border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--surface-solid); color: var(--fg); font-size: var(--fs-sm); font-weight: 500; box-shadow: var(--shadow-1);
  opacity: 0; transform: translate(-50%, -12px); pointer-events: none;
  transition: opacity var(--d-base) var(--ease-out), transform var(--d-base) var(--ease-out);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* Chinois : pas de capitales ni de grand interlettrage, interligne plus aéré */
:lang(zh) .mono { letter-spacing: .06em; }
:lang(zh) body, :lang(zh) .lede { line-height: 1.7; }
:lang(zh) .role { letter-spacing: .02em; }
.coords { font-variant-numeric: tabular-nums; }

/* ---------- Scène principale ---------- */
.stage {
  position: relative; z-index: var(--z-stage); min-height: 100svh;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--s-6);
  padding: 96px var(--gutter) 80px;
}
.hero { max-width: 680px; }
.eyebrow { color: var(--accent-text); margin: 0 0 var(--s-4); }
.title { margin: 0; font-family: var(--font-head); font-weight: 800; line-height: .88; letter-spacing: -.045em; font-size: clamp(4.2rem, min(15vw, 18svh), 11.5rem); }
.title__word { display: inline-flex; overflow: hidden; padding: .04em .02em .1em; margin-left: -.02em; }
.title__word .ch { display: inline-block; transform: translateY(105%); will-change: transform; transition: color var(--d-base); }
.title__word .ch:hover { color: var(--accent-text); }
.role { margin: var(--s-4) 0 0; font: 600 clamp(1.0625rem, 2.1vw, 1.375rem)/1.3 var(--font-head); letter-spacing: -.01em; }
.lede { margin: var(--s-3) 0 0; font-size: clamp(1rem, 1.6vw, 1.125rem); max-width: 34em; }
.scramble { color: var(--accent-text); font-weight: 500; }
.caret { display: inline-block; width: .5em; height: 1.05em; margin-left: 3px; vertical-align: -.15em; background: var(--accent-text); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* Compte à rebours */
.cd-label { margin: var(--s-5) 0 0; color: var(--muted); }
.cd-label[hidden] { display: none; }
.cd-label + .countdown { margin-top: var(--s-2); }
.countdown { display: flex; gap: var(--s-2); margin-top: var(--s-5); }
.countdown[hidden] { display: none; }
.countdown div { min-width: 76px; padding: var(--s-2) var(--s-3); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); text-align: center; }
.countdown b { display: block; font: 700 1.75rem/1.15 var(--font-head); font-variant-numeric: tabular-nums; }
.countdown span { font: var(--fs-xs)/1.4 var(--font-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }

/* Formulaire */
.notify { margin-top: var(--s-6); max-width: 540px; }
.notify__label { display: block; font-weight: 600; margin-bottom: var(--s-2); }
.notify__row { display: flex; gap: var(--s-2); }
.field { position: relative; flex: 1; }
.field svg { position: absolute; z-index: 1; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.field input {
  width: 100%; height: 52px; padding: 0 var(--s-4) 0 44px; font: inherit; font-size: var(--fs-md); color: var(--fg);
  background: var(--surface); border: 1px solid var(--line-input); border-radius: var(--r-md);
  transition: border-color var(--d-fast), box-shadow var(--d-fast);
}
.field input::placeholder { color: var(--muted); opacity: 1; }
.field input:focus { outline: none; border-color: var(--accent-text); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-text) 30%, transparent); }
.field input[aria-invalid="true"] { border-color: var(--danger); }
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  height: 52px; padding: 0 var(--s-5); border: 0; border-radius: var(--r-md); cursor: pointer; white-space: nowrap;
  background: var(--accent); color: var(--on-accent); font-weight: 600; overflow: hidden;
  transition: transform var(--d-base) var(--ease-out), box-shadow var(--d-base), opacity var(--d-fast);
  box-shadow: 0 10px 30px -12px color-mix(in srgb, var(--accent) 80%, transparent);
}
.btn::before { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.28) 50%, transparent 70%); transform: translateX(-120%); transition: transform .7s var(--ease-out); }
.btn:hover::before { transform: translateX(120%); }
.btn:active { transform: scale(.97); }
.btn[disabled] { opacity: .5; cursor: progress; }
.btn__icon { transition: transform var(--d-base) var(--ease-out); }
.btn:hover .btn__icon { transform: translateX(3px); }
.notify__help { margin: var(--s-2) 0 0; font-size: var(--fs-sm); color: var(--muted); }
.notify__msg { margin: var(--s-1) 0 0; min-height: 1.5em; font-size: var(--fs-sm); font-weight: 500; }
.notify__msg.is-error { color: var(--danger); }
.notify__msg.is-ok { color: var(--ok); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Liens de contact et réseaux */
.links { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-4); }
.link {
  display: inline-flex; align-items: center; gap: var(--s-2); min-height: 44px; padding: 0 var(--s-4);
  border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--surface);
  color: var(--fg); text-decoration: none; font-size: var(--fs-sm); font-weight: 500;
  transition: border-color var(--d-fast), color var(--d-fast), transform var(--d-base) var(--ease-out);
}
.link:hover { border-color: var(--accent-text); color: var(--accent-text); }
.link .ext { width: 14px; height: 14px; opacity: .7; }

/* ---------- Colonne de droite : projet à la une + modules ---------- */
.side { align-self: end; display: grid; gap: var(--s-3); width: 320px; }
.feature { display: grid; gap: var(--s-2); padding: var(--s-4); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-1); }
.feature__eyebrow { margin: 0 0 var(--s-1); color: var(--accent-text); font-weight: 400; }
.feature__row {
  display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: var(--s-3); width: 100%; min-height: 64px;
  padding: var(--s-2) var(--s-3) var(--s-2) var(--s-2); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg-2);
  text-align: left; cursor: pointer; transition: border-color var(--d-fast), background-color var(--d-fast), transform var(--d-base) var(--ease-out);
}
.feature__row:hover { border-color: var(--accent-text); background: color-mix(in srgb, var(--accent-text) 8%, var(--bg-2)); }
.feature__row:active { transform: scale(.98); }
.feature__row[aria-busy="true"] { cursor: progress; }
.feature__row > svg:last-child { width: var(--icon); height: var(--icon); fill: none; stroke: currentColor; stroke-width: var(--stroke); stroke-linecap: round; stroke-linejoin: round; color: var(--muted); transition: transform var(--d-base) var(--ease-out), color var(--d-fast); }
.feature__row:hover > svg:last-child { transform: translateX(3px); color: var(--accent-text); }
.feature__ico { width: 52px; height: 44px; }
.feature__ico .mb { fill: var(--board); }
.feature__ico .me { fill: var(--hole); }
.feature__ico .mh { fill: var(--p1); }
.feature__ico .ma { fill: var(--p2); }
.feature__ico .vl { fill: none; stroke: var(--accent-2); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; opacity: .55; }
.feature__ico .vh { fill: var(--p2); }
.feature__ico .vd { fill: var(--board); }
.feature__body { display: grid; gap: 2px; min-width: 0; }
.feature__title { font: 700 var(--fs-md)/1.2 var(--font-head); letter-spacing: -.01em; }
.feature__text { font-size: .8125rem; line-height: 1.35; color: var(--muted); }

.stack { padding: var(--s-4); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.stack__head { margin: 0 0 var(--s-3); color: var(--muted); }
.stack__list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); text-transform: none; letter-spacing: .01em; font-size: .8125rem; }
.stack__list li { display: flex; gap: var(--s-3); color: var(--muted); transition: color .3s; }
.stack__list li span:first-child { color: var(--accent-text); opacity: .75; }
.stack__list li.is-active { color: var(--fg); }
.stack__list li.is-active span:first-child { opacity: 1; }
.bar { margin-top: var(--s-4); height: 2px; background: var(--line); border-radius: 2px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 34%; background: linear-gradient(90deg, transparent, var(--accent-text), var(--accent-2)); animation: scan 2.4s var(--ease-io) infinite; }
@keyframes scan { 0% { transform: translateX(-110%); } 100% { transform: translateX(310%); } }

/* ==========================================================================
   Fenêtre du projet
   ========================================================================== */
.proj {
  width: min(1120px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 0; margin: auto;
  border: 1px solid var(--line); border-radius: var(--r-xl); background: var(--surface-solid); color: var(--fg);
  box-shadow: var(--shadow-2); overflow: hidden;
}
.proj::backdrop { background: var(--scrim); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.proj[open] { animation: projIn 420ms var(--ease-out); }
.proj[open]::backdrop { animation: fadeIn 300ms var(--ease-out); }
.proj.is-closing { animation: projOut 220ms var(--ease-in) forwards; }
.proj.is-closing::backdrop { animation: fadeOut 220ms var(--ease-in) forwards; }
@keyframes projIn { from { opacity: 0; transform: translateY(16px) scale(.97); } }
@keyframes projOut { to { opacity: 0; transform: translateY(10px) scale(.98); } }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes fadeOut { to { opacity: 0; } }
.proj__inner { display: flex; flex-direction: column; max-height: calc(100dvh - 34px); overflow: auto; overscroll-behavior: contain; }
.proj__bar { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: var(--s-3) var(--s-6); border-bottom: 1px solid var(--line); background: var(--surface-solid); }
.tabs--proj { align-self: center; }
.tabs--proj button { font-weight: 600; }
.proj__head { display: flex; justify-content: space-between; gap: var(--s-5); padding: var(--s-4) var(--s-6); border-bottom: 1px solid var(--line); }
.proj__links { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.proj__eyebrow { margin: 0; color: var(--accent-text); }
.proj__title { margin: var(--s-2) 0 0; font: 800 clamp(1.75rem, 3.4vw, 2.5rem)/1.05 var(--font-head); letter-spacing: -.03em; }
.proj__tagline { margin: var(--s-2) 0 0; max-width: 60ch; color: var(--muted); }
.proj__close { flex: none; }
.proj__body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
.proj__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-4); padding: var(--s-4) var(--s-6); border-top: 1px solid var(--line); }
.proj__note { margin: 0; max-width: 62ch; font-size: var(--fs-sm); color: var(--muted); }

/* ---------- Jeu ---------- */
.game { padding: var(--s-5) var(--s-6); border-right: 1px solid var(--line); }
.game__top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3); }
.game__title { margin: 0; font: 700 var(--fs-lg)/1.3 var(--font-head); }
.seg { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--bg-2); }
.seg button { min-height: 38px; padding: 0 var(--s-3); border: 0; border-radius: var(--r-pill); background: transparent; color: var(--muted); font-size: var(--fs-sm); font-weight: 500; cursor: pointer; transition: background-color var(--d-fast), color var(--d-fast); }
.seg button:hover { color: var(--fg); }
.seg button[aria-checked="true"] { background: var(--accent); color: var(--on-accent); }
.board {
  --cell: max(36px, min(54px, calc((100vw - 96px) / 7), calc((100dvh - 470px) / 6)));
  position: relative; display: grid; grid-template-columns: repeat(7, var(--cell)); justify-content: center;
  width: max-content; max-width: 100%; margin: var(--s-4) auto 0; padding: 6px; border-radius: var(--r-lg); background: var(--board);
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow-1);
}
.col { position: relative; display: flex; flex-direction: column-reverse; padding: 0; border: 0; border-radius: var(--r-md); background: transparent; cursor: pointer; }
.col.is-off, .col[aria-disabled="true"] { cursor: default; }
.col:focus-visible { background: color-mix(in srgb, var(--p1) 14%, transparent); }
.col:focus-visible { outline-offset: 2px; }
.cell { position: relative; display: grid; place-items: center; width: var(--cell); height: var(--cell); }
.cell::before { content: ""; position: absolute; inset: 12%; border-radius: 50%; background: var(--hole); box-shadow: inset 0 2px 4px rgba(0, 0, 0, .35); }
.disc { position: relative; display: block; width: 76%; height: 76%; border-radius: 50%; }
.disc--h { background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--p1) 70%, #fff), var(--p1) 60%); }
/* L'IA a aussi un motif (anneau) : la couleur n'est jamais le seul indice */
.disc--a { background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--p2) 70%, #fff), var(--p2) 60%); box-shadow: inset 0 0 0 4px color-mix(in srgb, var(--p2) 55%, #000); }
.disc.is-last::after { content: ""; position: absolute; inset: 36%; border-radius: 50%; background: color-mix(in srgb, var(--hole) 75%, transparent); }
.disc.is-win { animation: win 900ms var(--ease-out) infinite alternate; box-shadow: 0 0 0 3px var(--fg), 0 0 18px color-mix(in srgb, var(--fg) 40%, transparent); }
@keyframes win { to { transform: scale(.86); } }
.ghostdisc { position: absolute; top: -2px; left: 50%; width: calc(var(--cell) * .6); height: calc(var(--cell) * .6); margin-left: calc(var(--cell) * -.3); border-radius: 50%; background: var(--p1); opacity: 0; transform: translateY(-110%); transition: opacity var(--d-fast); pointer-events: none; }
.col:not([aria-disabled="true"]):focus-visible .ghostdisc { opacity: .55; }
@media (hover: hover) and (pointer: fine) {
  .col:not(.is-off):hover { background: color-mix(in srgb, var(--p1) 14%, transparent); }
  .col:not([aria-disabled="true"]):hover .ghostdisc { opacity: .55; }
}
.legend { display: flex; justify-content: center; gap: var(--s-5); margin-top: var(--s-3); font-size: var(--fs-sm); color: var(--muted); }
.legend > span { display: inline-flex; align-items: center; gap: var(--s-2); }
.legend .disc { width: 16px; height: 16px; }
.legend .disc--a { box-shadow: inset 0 0 0 3px color-mix(in srgb, var(--p2) 55%, #000); }
.game__status { margin: var(--s-3) 0 0; min-height: 1.6em; text-align: center; font-weight: 600; }
.game__status.is-win { color: var(--ok); }
.game__status.is-loss { color: var(--p2); }
.game__meta { margin: var(--s-1) 0 0; text-align: center; text-wrap: balance; color: var(--muted); text-transform: none; letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.game__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3); margin-top: var(--s-3); }
.score { margin: 0; color: var(--muted); text-transform: none; letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.ghost { display: inline-flex; align-items: center; gap: var(--s-2); min-height: 44px; padding: 0 var(--s-4); border: 1px solid var(--line-strong); border-radius: var(--r-pill); background: transparent; font-weight: 500; cursor: pointer; transition: border-color var(--d-fast), color var(--d-fast); }
.ghost:hover { border-color: var(--accent-text); color: var(--accent-text); }
.board.is-thinking::after { content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none; box-shadow: 0 0 0 2px var(--p2); animation: think 1s var(--ease-io) infinite alternate; }
@keyframes think { from { opacity: .25; } to { opacity: 1; } }

/* ---------- Informations (onglets) ---------- */
.info { display: flex; flex-direction: column; min-width: 0; padding: var(--s-5) var(--s-6); }
.tabs { display: flex; gap: var(--s-1); padding: 3px; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--bg-2); align-self: flex-start; }
.tabs button { min-height: 38px; padding: 0 var(--s-4); border: 0; border-radius: var(--r-pill); background: transparent; color: var(--muted); font-weight: 500; font-size: var(--fs-sm); cursor: pointer; transition: background-color var(--d-fast), color var(--d-fast); }
.tabs button:hover { color: var(--fg); }
.tabs button[aria-selected="true"] { background: var(--surface-solid); color: var(--fg); box-shadow: 0 0 0 1px var(--line-strong); }
.panel { margin-top: var(--s-5); animation: panelIn var(--d-slow) var(--ease-out); }
.panel:focus-visible { outline-offset: 6px; }
@keyframes panelIn { from { opacity: 0; transform: translateY(6px); } }
.panel__hint { margin: 0; font-size: var(--fs-sm); color: var(--muted); }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-2); margin: 0; }
.stats div { padding: var(--s-3); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg-2); }
.stats dt { font: var(--fs-xs)/1.3 var(--font-mono); letter-spacing: .04em; color: var(--muted); }
.stats dd { margin: var(--s-1) 0 0; white-space: nowrap; font: 700 clamp(1.125rem, 1.9vw, 1.5rem)/1.1 var(--font-head); font-variant-numeric: tabular-nums; }
.points { list-style: none; margin: var(--s-5) 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4) var(--s-5); }
.points li { display: flex; gap: var(--s-3); }
.points svg { margin-top: 2px; color: var(--accent-text); }
.points b { display: block; font-weight: 600; }
.points span { display: block; margin-top: 2px; font-size: var(--fs-sm); line-height: 1.5; color: var(--muted); }

.flow { display: grid; grid-template-columns: 1fr 44px auto 44px 1fr; align-items: center; margin-top: var(--s-4); }
.flow__col { display: grid; gap: var(--s-2); }
.flow__col--core { align-self: stretch; align-content: center; }
.flow__label { margin: 0 0 var(--s-1); color: var(--muted); }
.node { min-height: 40px; padding: var(--s-2) var(--s-3); border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg-2); font: 500 var(--fs-sm)/1.2 var(--font-mono); text-align: left; cursor: pointer; transition: border-color var(--d-fast), background-color var(--d-fast), color var(--d-fast); }
.node:hover { border-color: var(--accent-text); }
.node[aria-pressed="true"] { border-color: var(--accent-text); background: color-mix(in srgb, var(--accent-text) 14%, var(--bg-2)); color: var(--fg); }
.node--core { min-height: 120px; padding: var(--s-4); text-align: center; font-weight: 700; border-color: var(--line-strong); background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 30%, var(--bg-2)), var(--bg-2)); }
.flow__pipe { position: relative; height: 2px; margin: 0 var(--s-1); background: var(--line); overflow: hidden; }
.flow__pipe i { position: absolute; top: -2px; left: 0; width: 6px; height: 6px; border-radius: 50%; background: var(--accent-text); animation: packet 1.8s linear infinite; }
.flow__pipe i:nth-child(2) { animation-delay: .6s; }
.flow__pipe i:nth-child(3) { animation-delay: 1.2s; }
@keyframes packet { from { transform: translateX(-8px); } to { transform: translateX(44px); } }
.detail { min-height: 4.5em; margin: var(--s-5) 0 0; padding: var(--s-4); border-left: 2px solid var(--accent-text); border-radius: 0 var(--r-sm) var(--r-sm) 0; background: var(--bg-2); font-size: var(--fs-sm); line-height: 1.55; }
.detail b { display: block; margin-bottom: var(--s-1); font-family: var(--font-mono); font-size: var(--fs-xs); letter-spacing: .06em; text-transform: uppercase; color: var(--accent-text); }

.mods { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-2); }
.mod { min-height: 44px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg-2); font: 500 var(--fs-sm)/1 var(--font-mono); cursor: pointer; transition: border-color var(--d-fast), background-color var(--d-fast); }
.mod:hover { border-color: var(--accent-text); }
.mod[aria-pressed="true"] { border-color: var(--accent-text); background: color-mix(in srgb, var(--accent-text) 14%, var(--bg-2)); }
.modcard { margin-top: var(--s-4); padding: var(--s-5); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg-2); }
.modcard__name { margin: 0; color: var(--accent-text); }
.modcard__desc { margin: var(--s-2) 0 0; line-height: 1.55; }
.modcard__meta { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); margin: var(--s-4) 0 0; padding-top: var(--s-4); border-top: 1px solid var(--line); }
.modcard__meta dt { font: var(--fs-xs)/1.3 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.modcard__meta dd { margin: var(--s-1) 0 0; font-size: var(--fs-sm); overflow-wrap: anywhere; }
.modcard__meta dd.mono { text-transform: none; letter-spacing: 0; }

/* ---------- Valia : mini-estimateur ---------- */
.badge { padding: 4px 10px; border: 1px solid color-mix(in srgb, var(--ok) 50%, transparent); border-radius: var(--r-pill); color: var(--ok); }
.val__form { display: grid; gap: var(--s-4); margin-top: var(--s-4); }
.val__field { display: grid; gap: var(--s-2); }
.val__field label, .val__label { display: flex; justify-content: space-between; align-items: baseline; font-size: var(--fs-sm); font-weight: 600; }
.val__field output { color: var(--accent-text); font-size: var(--fs-sm); text-transform: none; letter-spacing: 0; }
.select { position: relative; }
.select select {
  width: 100%; height: 44px; padding: 0 40px 0 var(--s-3); border: 1px solid var(--line-input); border-radius: var(--r-md);
  background: var(--bg-2); color: var(--fg); font: inherit; font-size: var(--fs-md); -webkit-appearance: none; appearance: none; cursor: pointer;
}
.select select:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }
.select svg { position: absolute; right: 12px; top: 50%; width: var(--icon); height: var(--icon); transform: translateY(-50%); fill: none; stroke: var(--muted); stroke-width: var(--stroke); stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
input[type="range"] { width: 100%; height: 44px; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; touch-action: pan-y; }
input[type="range"]::-webkit-slider-runnable-track { height: 6px; border-radius: 6px; background: linear-gradient(90deg, var(--accent-text), var(--accent-2)); }
input[type="range"]::-moz-range-track { height: 6px; border-radius: 6px; background: linear-gradient(90deg, var(--accent-text), var(--accent-2)); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; margin-top: -9px; border: 3px solid var(--surface-solid); border-radius: 50%; background: var(--fg); box-shadow: 0 0 0 1px var(--line-strong), var(--shadow-1); }
input[type="range"]::-moz-range-thumb { width: 18px; height: 18px; border: 3px solid var(--surface-solid); border-radius: 50%; background: var(--fg); }
input[type="range"]:focus-visible { outline: none; }
input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px var(--accent-text); }
.dpe { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; }
.dpe__b { position: relative; min-height: 40px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg-2); font: 700 var(--fs-sm)/1 var(--font-mono); cursor: pointer; overflow: hidden; transition: border-color var(--d-fast), background-color var(--d-fast); }
.dpe__b::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--c, var(--line-strong)); }
.dpe--a { --c: #009c6d; } .dpe--b { --c: #52b153; } .dpe--c { --c: #a5cc74; } .dpe--d { --c: #f4e70f; } .dpe--e { --c: #f0b50f; } .dpe--f { --c: #eb8235; } .dpe--g { --c: #d7221f; }
.dpe__b:hover { border-color: var(--accent-text); }
.dpe__b[aria-checked="true"] { border-color: var(--fg); background: color-mix(in srgb, var(--fg) 10%, var(--bg-2)); }
.val__res { margin-top: var(--s-5); padding: var(--s-4) var(--s-5); border: 1px solid var(--line); border-radius: var(--r-lg); background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 16%, var(--bg-2)), var(--bg-2)); }
.val__k { margin: 0; color: var(--muted); }
.val__price { margin: var(--s-1) 0 0; font: 800 clamp(2rem, 4vw, 2.75rem)/1.05 var(--font-head); font-stretch: 105%; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.val__ppm2 { margin: var(--s-1) 0 0; color: var(--muted); font-variant-numeric: tabular-nums; }
.range { position: relative; height: 10px; margin-top: var(--s-4); border-radius: 10px; background: var(--line); overflow: hidden; }
.range__band { position: absolute; inset: 0 8%; border-radius: 10px; background: linear-gradient(90deg, color-mix(in srgb, var(--accent-text) 25%, transparent), var(--accent-text), color-mix(in srgb, var(--accent-text) 25%, transparent)); }
.range__mark { position: absolute; top: -3px; bottom: -3px; left: 50%; width: 3px; margin-left: -1.5px; border-radius: 2px; background: var(--fg); }
.range__ends { display: flex; justify-content: space-between; margin: var(--s-2) 8% 0; text-transform: none; letter-spacing: 0; color: var(--fg); font-variant-numeric: tabular-nums; }
.val__note { margin: var(--s-3) 0 0; font-size: .8125rem; line-height: 1.45; color: var(--muted); }
.val__charts { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); margin-top: var(--s-4); }
.val__charts figure { margin: 0; padding: var(--s-3); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg-2); }
.val__charts figcaption { font-size: var(--fs-xs); line-height: 1.4; color: var(--muted); }
.val__charts figcaption b { display: block; margin-top: 2px; font-size: var(--fs-sm); color: var(--fg); }
.val__charts figcaption b.is-up { color: var(--ok); }
.val__charts figcaption b.is-down { color: var(--p2); }
.spark svg { display: block; width: 100%; height: 72px; margin-top: var(--s-2); overflow: visible; }
.spark__area { fill: color-mix(in srgb, var(--accent-text) 16%, transparent); }
.spark__line { fill: none; stroke: var(--accent-text); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 1; vector-effect: non-scaling-stroke; }
.spark__dot { fill: var(--accent-text); stroke: var(--bg-2); stroke-width: 2; }
.spark__axis { display: flex; justify-content: space-between; margin: var(--s-1) 0 0; color: var(--muted); letter-spacing: 0; }
.bars__row { display: grid; grid-template-columns: repeat(7, 1fr); align-items: end; gap: 4px; height: 96px; margin-top: var(--s-2); }
.bars__col { display: grid; grid-template-rows: 1fr auto; align-items: end; height: 100%; gap: 4px; }
.bars__bar { display: block; width: 100%; border-radius: 4px 4px 2px 2px; opacity: .55; transition: height var(--d-slow) var(--ease-out), opacity var(--d-fast); }
.bars__col.is-on .bars__bar { opacity: 1; box-shadow: 0 0 0 2px var(--fg); }
.bars__k { text-align: center; color: var(--muted); letter-spacing: 0; }
.bars__col.is-on .bars__k { color: var(--fg); font-weight: 700; }
.val__foot { margin: var(--s-3) 0 0; font-size: .8125rem; line-height: 1.45; color: var(--muted); }
.steps { list-style: none; margin: var(--s-4) 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: var(--s-2); }
.steps button { display: flex; align-items: center; gap: var(--s-2); width: 100%; min-height: 44px; padding: 0 var(--s-3); border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg-2); font-weight: 500; font-size: var(--fs-sm); text-align: left; cursor: pointer; transition: border-color var(--d-fast), background-color var(--d-fast); }
.steps button .mono { color: var(--accent-text); letter-spacing: 0; }
.steps button:hover { border-color: var(--accent-text); }
.steps button[aria-pressed="true"] { border-color: var(--accent-text); background: color-mix(in srgb, var(--accent-text) 14%, var(--bg-2)); }
.acc { display: grid; gap: var(--s-3); margin-top: var(--s-4); }
.acc__row { display: grid; grid-template-columns: 130px 1fr 64px; grid-template-rows: auto auto; column-gap: var(--s-3); align-items: center; }
.acc__name { font-size: var(--fs-sm); font-weight: 500; }
.acc__track { height: 10px; border-radius: 10px; background: var(--line); overflow: hidden; }
.acc__bar { display: block; height: 100%; border-radius: 10px; background: var(--accent-text); }
.acc__row.is-total .acc__bar { background: linear-gradient(90deg, var(--accent-text), var(--accent-2)); }
.acc__row.is-total .acc__name { font-weight: 700; }
.acc__val { text-align: right; text-transform: none; letter-spacing: 0; font-size: var(--fs-sm); color: var(--fg); }
.acc__cov { grid-column: 2 / 4; font-size: var(--fs-xs); color: var(--muted); }

/* ---------- Apparition ---------- */
.js .reveal { opacity: 0; transform: translateY(12px); }
.is-ready .reveal { opacity: 1; transform: none; transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); transition-delay: calc(var(--i, 0) * 45ms + 40ms); }

/* ---------- Séquence d'ouverture ---------- */
.boot { position: fixed; inset: 0; z-index: var(--z-boot); display: flex; align-items: flex-end; padding: var(--gutter); background: var(--bg); clip-path: inset(0 0 0 0); transition: clip-path 1s var(--ease-io); }
.boot.is-done { clip-path: inset(0 0 100% 0); }
.boot.is-gone { display: none; }
.boot__log { margin: 0; font: .8125rem/1.75 var(--font-mono); color: var(--muted); white-space: pre-wrap; }
.boot__log .ok { color: var(--ok); }
.boot__log .ac { color: var(--accent-text); }
:root:not(.js) .boot { display: none; }

/* ---------- Points de rupture : 1024 / 640 ---------- */
@media (max-width: 1100px) {
  .proj__body { grid-template-columns: 1fr; }
  .val .val__charts { grid-template-columns: 1fr 1fr; }
  .game { border-right: 0; border-bottom: 1px solid var(--line); }
}
@media (max-width: 1024px) {
  .stage { grid-template-columns: 1fr; align-content: end; padding-bottom: 110px; }
  .side { width: auto; max-width: 540px; align-self: start; }
  .stack { display: none; }
  .hud__meta .clock { display: none; }
}
@media (max-width: 640px) {
  .hud__meta { display: none; }
  .hud--bottom .coords, .hud--bottom .hint { display: none; }
  .stage { align-content: start; padding-top: min(330px, 40svh); padding-bottom: 72px; }
  .eyebrow { margin-bottom: var(--s-3); }
  .notify__row { flex-direction: column; }
  .btn { width: 100%; }
  .countdown div { min-width: 0; flex: 1; padding: var(--s-2) var(--s-1); }
  .countdown b { font-size: 1.375rem; }
  .link { flex: 1 1 calc(50% - 4px); justify-content: center; }
  .link:first-child { flex-basis: 100%; }
  .veil { background: linear-gradient(180deg, color-mix(in srgb, var(--bg) 35%, transparent) 0%, color-mix(in srgb, var(--bg) 80%, transparent) 55%, var(--bg) 100%); }
  .proj { width: 100vw; max-width: 100vw; max-height: 100dvh; height: 100dvh; border-radius: 0; border: 0; }
  .proj__inner { max-height: 100dvh; }
  .proj__bar { padding: max(var(--s-3), env(safe-area-inset-top)) var(--s-4) var(--s-3); }
  .tabs--proj button { padding: 0 var(--s-3); }
  .proj__head { padding: var(--s-4); }
  .val .val__charts { grid-template-columns: 1fr; }
  .acc__row { grid-template-columns: 96px 1fr 56px; }
  .proj__links { width: 100%; }
  .proj__links .link { flex: 1 1 0; justify-content: center; }
  .game, .info { padding: var(--s-5) var(--s-4); }
  .proj__foot { padding: var(--s-5) var(--s-4) max(var(--s-5), env(safe-area-inset-bottom)); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .points { grid-template-columns: 1fr; }
  .mods { grid-template-columns: repeat(2, 1fr); }
  .flow { grid-template-columns: 1fr; gap: var(--s-2); }
  .flow__pipe { width: 2px; height: 28px; margin: 0 auto; }
  .flow__pipe i { left: -2px; top: 0; animation-name: packetV; }
  @keyframes packetV { from { transform: translateY(-8px); } to { transform: translateY(30px); } }
  .node--core { min-height: 64px; }
}
@media (pointer: coarse) {
  .seg button, .tabs button, .dpe__b { min-height: 44px; }
  .node { min-height: 44px; }
}
/* Paysage sur téléphone : la sphère et le contenu ne se chevauchent pas */
@media (max-height: 520px) and (orientation: landscape) {
  .stage { align-content: start; padding-top: 88px; }
}

/* ---------- Mouvement réduit ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
  .grain { display: none; }
  .caret { animation: none; }
  .bar i { transform: none; width: 100%; opacity: .5; }
  .flow__pipe i { display: none; }
}
.is-paused .grain, .is-paused .bar i, .is-paused .dot, .is-paused .caret, .is-paused .flow__pipe i { animation-play-state: paused; }
