/* Odyssée — site de la série. Néon sur noir chaud, Cormorant Garamond + Jost, φ doré,
   lignes de craie à nœuds ronds. Le fond 3D (#scene) vit derrière tout le contenu. */

:root {
  --bg: #0a0705;
  --bg-2: #050302;
  --ink: #f4efe6;
  --ink-2: rgba(244, 239, 230, .74);
  --ink-3: rgba(244, 239, 230, .5);
  --ink-4: rgba(244, 239, 230, .16);
  --line: rgba(244, 239, 230, .12);
  --gold: #ffc93c;
  --gold-rgb: 255, 201, 60;
  --gold-hot: #ffe8a6;
  --ember: #ff8a1f;
  --ember-rgb: 255, 138, 31;
  --cyan: #3df2ff;
  --magenta: #ff2bd6;
  --violet: #8b5cff;
  --green: #39ff9f;
  --red: #ff2a4a;

  --glass: linear-gradient(165deg, rgba(26, 18, 12, .74), rgba(9, 6, 4, .86));
  --glass-solid: linear-gradient(165deg, rgba(24, 17, 12, .94), rgba(9, 6, 4, .97));
  --radius: 22px;

  --f-display: "Cormorant Garamond", Cormorant, Georgia, "Times New Roman", serif;
  --f-ui: Jost, Futura, "Century Gothic", "Avenir Next", "Segoe UI", system-ui, -apple-system, sans-serif;

  --gut: max(16px, 4.2vw);
  --gut-l: max(var(--gut), env(safe-area-inset-left, 0px));
  --gut-r: max(var(--gut), env(safe-area-inset-right, 0px));
  --maxw: 1320px;
  --nav-h: 68px;
  --sec-y: clamp(96px, 15vh, 190px);

  --out: cubic-bezier(.16, 1, .3, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --gold-glow: 0 0 1px rgba(var(--gold-rgb), .9), 0 0 10px rgba(var(--gold-rgb), .6), 0 0 28px rgba(var(--gold-rgb), .32);
  --veil-o: .2;
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: var(--nav-h);
}
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.6 var(--f-ui);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  text-rendering: optimizeLegibility;
  font-variant-numeric: lining-nums;
}
main, .foot { overflow-x: clip; }
img, svg, canvas, video { display: block; max-width: 100%; }
img { height: auto; }
.lc { text-transform: none; letter-spacing: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; }
::selection { background: rgba(var(--gold-rgb), .85); color: #170d02; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

.wrap {
  width: 100%;
  max-width: calc(var(--maxw) + var(--gut-l) + var(--gut-r));
  margin: 0 auto;
  padding-left: var(--gut-l);
  padding-right: var(--gut-r);
}
.skip {
  position: fixed; left: 12px; top: -60px; z-index: 100;
  padding: 10px 16px; border-radius: 8px; background: var(--gold); color: #170d02; text-decoration: none; font-weight: 600;
  transition: top .2s;
}
.skip:focus { top: 12px; }

.phi {
  font-family: var(--f-display);
  font-style: italic;
  font-weight: 600;
  color: var(--gold);
  text-shadow: var(--gold-glow);
}

/* ---------- Fond : secours CSS, toile 3D, voile ---------- */
.backdrop {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
  background:
    radial-gradient(120% 60% at 50% 62%, rgba(var(--ember-rgb), .16), transparent 60%),
    radial-gradient(80% 50% at 50% 0%, #120a05, transparent 70%),
    linear-gradient(#050302, #0a0705 55%, #000);
}
.backdrop-sun {
  position: absolute; left: 50%; top: 40%; width: min(46vw, 420px); aspect-ratio: 1; transform: translate(-50%, -50%);
  border-radius: 50%;
  background: repeating-linear-gradient(to bottom, rgba(var(--gold-rgb), .5) 0 8px, transparent 8px 15px);
  -webkit-mask: radial-gradient(circle, #000 60%, transparent 71%);
  mask: radial-gradient(circle, #000 60%, transparent 71%);
  opacity: .22;
  filter: blur(.4px);
}
.backdrop-floor {
  position: absolute; left: -50%; right: -50%; bottom: -10%; height: 58%;
  background:
    repeating-linear-gradient(90deg, rgba(var(--gold-rgb), .22) 0 1px, transparent 1px 64px),
    repeating-linear-gradient(0deg, rgba(var(--gold-rgb), .18) 0 1px, transparent 1px 64px);
  transform: perspective(420px) rotateX(64deg);
  transform-origin: 50% 0;
  -webkit-mask: linear-gradient(to bottom, transparent, #000 40%);
  mask: linear-gradient(to bottom, transparent, #000 40%);
  opacity: .5;
}
#scene {
  position: fixed; left: 0; top: 0; z-index: 0;
  width: 100%; height: 100vh; height: 100lvh;
  pointer-events: none;
  touch-action: none;
}
.veil {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(130% 95% at 50% 45%, transparent 52%, rgba(0, 0, 0, .55));
}
.veil::before {
  content: ""; position: absolute; inset: 0;
  background: #070403;
  opacity: var(--veil-o);
  transition: opacity 1s var(--out);
}
main { position: relative; z-index: 2; }

/* ---------- Boutons : un segment de craie et ses deux nœuds ---------- */
.btn {
  position: relative; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: .7em;
  min-height: 52px; padding: 14px 26px; margin: 0 5px;
  font: 500 13.5px/1.15 var(--f-ui); letter-spacing: .14em; text-transform: uppercase; text-align: center; text-decoration: none;
  color: var(--ink);
  background-color: rgba(244, 239, 230, .035);
  background-image: linear-gradient(90deg, rgba(var(--gold-rgb), .2), rgba(var(--gold-rgb), .04));
  background-size: 0% 100%; background-repeat: no-repeat;
  border: 1px solid rgba(244, 239, 230, .26); border-radius: 3px;
  cursor: pointer;
  transition: border-color .25s, color .25s, background-size .5s var(--out), box-shadow .3s, transform .4s var(--spring);
  -webkit-user-select: none; user-select: none;
}
.btn::before, .btn::after {
  content: ""; position: absolute; top: 50%; width: 9px; height: 9px; margin-top: -4.5px; border-radius: 50%;
  background: var(--bg); border: 1.5px solid currentColor;
  transition: transform .4s var(--spring), background-color .2s, box-shadow .3s;
}
.btn::before { left: -5px; }
.btn::after { right: -5px; }
.btn small { font: 500 11.5px/1 var(--f-ui); letter-spacing: .06em; text-transform: none; opacity: .72; }
.btn:hover { border-color: rgba(var(--gold-rgb), .8); color: #fff; background-size: 100% 100%; box-shadow: 0 0 16px rgba(var(--gold-rgb), .25), inset 0 0 12px rgba(var(--gold-rgb), .1); }
.btn:hover::before { transform: translateX(-3px); border-color: var(--gold-hot); }
.btn:hover::after { transform: translateX(3px); border-color: var(--gold-hot); }
.btn:active { transform: scale(.955); transition-duration: .08s; }
.btn--primary {
  color: #1c1003; font-weight: 600;
  background-color: var(--gold);
  background-image: linear-gradient(90deg, rgba(255, 255, 255, .42), rgba(255, 255, 255, 0));
  border-color: var(--gold-hot);
  box-shadow: 0 0 0 1px rgba(var(--gold-rgb), .35), 0 0 18px rgba(var(--gold-rgb), .5), 0 0 46px rgba(var(--gold-rgb), .22), inset 0 0 10px rgba(255, 255, 255, .3);
}
.btn--primary::before, .btn--primary::after { background: var(--gold-hot); border-color: var(--gold-hot); box-shadow: 0 0 8px rgba(var(--gold-rgb), .9); }
.btn--primary:hover { color: #1c1003; border-color: #fff; box-shadow: 0 0 0 1px rgba(var(--gold-rgb), .5), 0 0 24px rgba(var(--gold-rgb), .75), 0 0 60px rgba(var(--gold-rgb), .32), inset 0 0 12px rgba(255, 255, 255, .34); }
.btn--block { width: calc(100% - 10px); }
.btn--xl { min-height: 64px; padding: 18px 42px; font-size: 15px; }
.btn--small { min-height: 44px; padding: 10px 18px; font-size: 12px; letter-spacing: .12em; }

/* ---------- Typo ---------- */
.kicker {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px;
  margin: 0 0 22px;
  font: 500 12.5px/1.3 var(--f-ui); letter-spacing: .26em; text-transform: uppercase;
  color: rgba(var(--gold-rgb), .92);
}
.kicker::before {
  content: ""; width: 34px; height: 9px; flex: none;
  background:
    radial-gradient(circle at 4.5px 4.5px, transparent 2.6px, currentColor 2.8px 4.1px, transparent 4.3px) left center / 9px 9px no-repeat,
    linear-gradient(currentColor, currentColor) 9px center / 25px 1px no-repeat;
  opacity: .9;
}
.kicker-n { font: italic 600 19px/1 var(--f-display); letter-spacing: .02em; text-transform: none; color: var(--ink); }
.giant, .big {
  margin: 0;
  font-family: var(--f-display); font-weight: 600;
  color: var(--ink);
  text-wrap: balance;
  text-shadow: 0 2px 30px rgba(0, 0, 0, .55);
}
.giant { font-size: clamp(2.9rem, 8.4vw, 8.6rem); line-height: .96; letter-spacing: -.012em; }
.big { font-size: clamp(2.5rem, 6.2vw, 6rem); line-height: .98; letter-spacing: -.01em; }
.giant em, .big em { font-style: italic; color: var(--gold); }
.lead {
  margin: 1.1em 0 0;
  max-width: 34em;
  font-size: clamp(16px, .5vw + 14px, 20px); line-height: 1.62;
  color: var(--ink-2);
  text-shadow: 0 1px 12px rgba(0, 0, 0, .7);
}

/* Mots qui s’allument au défilement */
.js [data-lightup] .w {
  --lit: 0;
  opacity: calc(.15 + var(--lit) * .85);
}
.js [data-lightup] em .w {
  text-shadow: 0 0 calc(var(--lit) * 26px) rgba(var(--gold-rgb), calc(var(--lit) * .55)), 0 2px 30px rgba(0, 0, 0, .55);
}

/* Apparitions douces */
.js [data-reveal] {
  opacity: 0;
  translate: 0 28px;
  transition: opacity .9s var(--out), translate 1.1s var(--out);
  transition-delay: var(--d, 0s);
}
.js [data-reveal].is-in { opacity: 1; translate: 0 0; }

/* Vitre sombre aux bords néon */
.glass-card {
  position: relative;
  background: var(--glass);
  border: 1px solid rgba(255, 255, 255, .075);
  border-radius: var(--radius);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 30px 80px rgba(0, 0, 0, .45);
}
.q-high .glass-card { -webkit-backdrop-filter: blur(14px) saturate(1.15); backdrop-filter: blur(14px) saturate(1.15); }
.q-low .glass-card { background: var(--glass-solid); }
.glass-card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(140deg, rgba(var(--c-rgb, var(--gold-rgb)), .75), rgba(var(--c-rgb, var(--gold-rgb)), .08) 32%, transparent 55%, rgba(var(--c-rgb, var(--gold-rgb)), .3));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  opacity: .55;
  transition: opacity .4s;
}
.glass-card:hover::before { opacity: 1; }

/* Inclinaison 3D au survol / au doigt */
.tilt {
  --rx: 0deg; --ry: 0deg; --mx: 50%; --my: 50%;
  transform: perspective(1100px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform .7s var(--out), opacity .9s var(--out), translate 1.1s var(--out), box-shadow .4s, border-color .4s;
  transform-style: preserve-3d;
  will-change: transform;
}
.tilt.is-tilting { transition: transform .12s linear, opacity .9s var(--out), translate 1.1s var(--out), box-shadow .4s, border-color .4s; }
.tilt::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(420px circle at var(--mx) var(--my), rgba(255, 255, 255, .11), transparent 60%);
  opacity: 0; transition: opacity .4s;
}
.tilt.is-tilting::after { opacity: 1; }
/* carte inclinable qui apparaît aussi au défilement : on garde les deux transitions */
.js .tilt[data-reveal] { transition: transform .7s var(--out), opacity .9s var(--out) var(--d, 0s), translate 1.1s var(--out) var(--d, 0s), box-shadow .4s, border-color .4s; }
.js .tilt.is-tilting[data-reveal] { transition: transform .12s linear, opacity .9s var(--out), translate 1.1s var(--out), box-shadow .4s, border-color .4s; }

/* ---------- Navigation ---------- */
.nav {
  position: fixed; left: 0; right: 0; top: 0; z-index: 50;
  height: calc(var(--nav-h) + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) var(--gut-r) 0 var(--gut-l);
  display: flex; align-items: center; gap: 28px;
  transition: transform .5s var(--out), background-color .4s, border-color .4s;
  border-bottom: 1px solid transparent;
}
.nav::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(to bottom, rgba(8, 5, 4, .82), rgba(8, 5, 4, .55));
  opacity: 0; transition: opacity .4s;
}
.q-high .nav::before { -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.nav.is-scrolled::before { opacity: 1; }
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav.is-hidden { transform: translateY(-105%); }
.nav-logo {
  display: inline-flex; align-items: center; gap: 4px;
  text-decoration: none;
  font: 600 27px/1 var(--f-display); letter-spacing: .005em;
}
.phi-mark { width: 26px; height: 26px; color: var(--gold); filter: drop-shadow(0 0 4px rgba(var(--gold-rgb), .9)) drop-shadow(0 0 12px rgba(var(--gold-rgb), .45)); margin-top: -4px; }
.phi-mark .node { fill: var(--bg); stroke: var(--gold-hot); stroke-width: 1.2; }
.nav-coins {
  display: inline-flex; align-items: center; gap: 6px; margin-right: 4px;
  padding: 6px 12px 6px 10px; border-radius: 999px;
  border: 1px solid rgba(var(--gold-rgb), .4); background: rgba(var(--gold-rgb), .08);
  font: 600 14px/1 var(--f-ui); color: var(--gold-hot);
}
.nav-coins .phi { font-size: 20px; line-height: .8; }
.nav-coins.is-bump, .hero-hint.is-bump { animation: bump .5s var(--spring); }
@keyframes bump { 40% { transform: scale(1.14); } }
.nav-links { display: flex; gap: 6px; margin-left: auto; }
.nav-links a {
  position: relative; padding: 10px 14px;
  font: 500 12.5px/1 var(--f-ui); letter-spacing: .18em; text-transform: uppercase; text-decoration: none;
  color: var(--ink-2);
  transition: color .25s;
}
.nav-links a::after {
  content: ""; position: absolute; left: 50%; bottom: 2px; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%;
  background: var(--gold); box-shadow: 0 0 8px var(--gold);
  transform: scale(0); transition: transform .35s var(--spring);
}
.nav-links a:hover, .nav-links a.is-active { color: var(--ink); }
.nav-links a.is-active::after { transform: scale(1); }
.nav-cta {
  position: relative; display: inline-flex; align-items: center; gap: 10px;
  min-height: 42px; padding: 0 20px 0 16px;
  font: 600 12.5px/1 var(--f-ui); letter-spacing: .18em; text-transform: uppercase; text-decoration: none;
  color: var(--gold);
  border: 1px solid rgba(var(--gold-rgb), .55); border-radius: 999px;
  background: rgba(var(--gold-rgb), .06);
  box-shadow: 0 0 14px rgba(var(--gold-rgb), .18), inset 0 0 10px rgba(var(--gold-rgb), .08);
  transition: background-color .25s, color .25s, box-shadow .3s;
}
.nav-cta::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 8px var(--gold); }
.nav-cta:hover { background: var(--gold); color: #1c1003; box-shadow: 0 0 22px rgba(var(--gold-rgb), .6); }
.nav-cta:hover::before { background: #1c1003; box-shadow: none; }
.nav-burger {
  display: none; position: relative; width: 44px; height: 44px; margin-right: -8px;
  border: 0; background: transparent; cursor: pointer;
}
.nav-burger i {
  position: absolute; left: 11px; right: 11px; height: 1.5px; border-radius: 2px; background: var(--ink);
  transition: transform .45s var(--spring), top .3s var(--out);
}
.nav-burger i:nth-child(1) { top: 17px; }
.nav-burger i:nth-child(2) { top: 26px; }
.nav-burger[aria-expanded="true"] i:nth-child(1) { top: 21.5px; transform: rotate(45deg); }
.nav-burger[aria-expanded="true"] i:nth-child(2) { top: 21.5px; transform: rotate(-45deg); }

.menu {
  position: fixed; inset: 0; z-index: 45;
  display: flex; flex-direction: column; justify-content: center; gap: 36px;
  padding: calc(var(--nav-h) + 20px) var(--gut-r) calc(32px + env(safe-area-inset-bottom, 0px)) var(--gut-l);
  background: rgba(7, 4, 3, .95);
}
.q-high .menu { background: rgba(7, 4, 3, .82); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
.menu-links { display: flex; flex-direction: column; }
.menu-links a {
  display: flex; align-items: baseline; gap: 16px;
  padding: 9px 0; border-bottom: 1px solid var(--line);
  font: 600 clamp(30px, 9vw, 44px)/1.15 var(--f-display); text-decoration: none;
  opacity: 0; transform: translateY(14px);
  transition: opacity .5s var(--out), transform .6s var(--out);
}
.menu-links a small { font: 500 12px/1 var(--f-ui); letter-spacing: .2em; color: var(--gold); }
.menu.is-open .menu-links a { opacity: 1; transform: none; }
.menu.is-open .menu-links a:nth-child(2) { transition-delay: .04s; }
.menu.is-open .menu-links a:nth-child(3) { transition-delay: .08s; }
.menu.is-open .menu-links a:nth-child(4) { transition-delay: .12s; }
.menu.is-open .menu-links a:nth-child(5) { transition-delay: .16s; }
.menu.is-open .menu-links a:nth-child(6) { transition-delay: .2s; }
.menu .btn { align-self: flex-start; }

/* Rail des chapitres */
.rail {
  position: fixed; right: max(18px, env(safe-area-inset-right, 0px)); top: 50%; z-index: 40;
  display: flex; flex-direction: column; gap: 20px;
  transform: translateY(-50%);
}
.rail::before {
  content: ""; position: absolute; left: 50%; top: 4px; bottom: 4px; width: 1px; margin-left: -.5px;
  background: linear-gradient(var(--ink-4), rgba(244, 239, 230, .28), var(--ink-4));
}
.rail a {
  position: relative; display: block; width: 13px; height: 13px; border-radius: 50%;
  border: 1.5px solid rgba(244, 239, 230, .4); background: var(--bg);
  transition: border-color .3s, background-color .3s, box-shadow .3s, transform .4s var(--spring);
}
.rail a span {
  position: absolute; right: 24px; top: 50%; transform: translate(6px, -50%);
  white-space: nowrap; pointer-events: none;
  font: 500 11.5px/1 var(--f-ui); letter-spacing: .18em; text-transform: uppercase; color: var(--ink);
  opacity: 0; transition: opacity .3s, transform .4s var(--out);
  text-shadow: 0 1px 8px #000;
}
.rail a:hover span, .rail a:focus-visible span, .rail a.is-active span { opacity: 1; transform: translate(0, -50%); }
.rail a.is-active span { color: var(--gold); }
.rail a:hover { border-color: var(--ink); transform: scale(1.2); }
.rail a.is-active { border-color: var(--gold-hot); background: var(--gold); box-shadow: 0 0 10px rgba(var(--gold-rgb), .9), 0 0 24px rgba(var(--gold-rgb), .4); }
.rail:not(:hover) a.is-active span { opacity: 0; }
.rail.is-hidden { opacity: 0; pointer-events: none; }
.rail { transition: opacity .4s; }

/* ---------- Sections ---------- */
.ch { position: relative; }

/* 0 · Accueil */
.hero {
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding-top: calc(var(--nav-h) + 20px);
  padding-bottom: max(22px, calc(env(safe-area-inset-bottom, 0px) + 14px));
}
.hero::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 72%; pointer-events: none; z-index: -1;
  background: linear-gradient(to top, rgba(8, 5, 4, .9), rgba(8, 5, 4, .5) 42%, transparent);
}
.hero-inner { position: relative; will-change: transform, opacity; }
.hero-kicker { color: var(--ink-2); letter-spacing: .22em; }
.hero-kicker::before { display: none; }
.live {
  position: relative; width: 9px; height: 9px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 10px var(--green);
}
.live::after {
  content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 1px solid var(--green);
  animation: ping 2.2s var(--out) infinite;
}
@keyframes ping { from { transform: scale(.4); opacity: 1; } to { transform: scale(1.9); opacity: 0; } }
.hero-title {
  display: flex; align-items: flex-start; flex-wrap: nowrap;
  margin: 0 0 0 -.04em;
  font: 600 clamp(4.4rem, 15vw, 12.5rem)/.86 var(--f-display);
  letter-spacing: -.022em;
  color: var(--ink);
  text-shadow: 0 0 2px rgba(255, 244, 225, .35), 0 6px 60px rgba(0, 0, 0, .7);
}
.hero-word { display: inline-block; white-space: nowrap; }
.hero-word .l { display: inline-block; will-change: transform; }
.hero-phi {
  flex: none; width: .5em; height: .62em; margin: .02em 0 0 .04em; overflow: visible;
  filter: drop-shadow(0 0 5px rgba(var(--gold-rgb), .95)) drop-shadow(0 0 22px rgba(var(--gold-rgb), .5));
}
.hero-phi .d { stroke: var(--gold); stroke-width: 2; stroke-dasharray: 1 1; stroke-dashoffset: 0; }
.hero-phi .node { fill: #120a03; stroke: var(--gold-hot); stroke-width: 1.1; }
.hero-sub {
  margin: .5em 0 1.25em;
  max-width: 21em;
  font: italic 500 clamp(1.4rem, 2.5vw, 2.25rem)/1.18 var(--f-display);
  color: var(--ink);
  text-shadow: 0 2px 20px rgba(0, 0, 0, .8);
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 16px 20px; }
.hero-foot {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 18px;
  margin-top: clamp(26px, 6vh, 64px);
}
.scroll-cue {
  display: inline-flex; align-items: center; gap: 14px;
  font: 500 11.5px/1 var(--f-ui); letter-spacing: .24em; text-transform: uppercase; text-decoration: none;
  color: var(--ink-3);
}
.scroll-cue-line { position: relative; width: 1px; height: 46px; background: var(--ink-4); overflow: visible; }
.scroll-cue-line i {
  position: absolute; left: -3.5px; top: 0; width: 8px; height: 8px; border-radius: 50%;
  border: 1.5px solid var(--gold); background: var(--bg); box-shadow: 0 0 8px rgba(var(--gold-rgb), .8);
  animation: cue 2.4s var(--out) infinite;
}
@keyframes cue { 0% { transform: translateY(0); opacity: 0; } 20% { opacity: 1; } 80% { opacity: 1; } 100% { transform: translateY(40px); opacity: 0; } }
.hero-hint {
  display: inline-flex; align-items: center; gap: 10px; margin: 0;
  padding: 10px 16px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(10, 7, 5, .55);
  font: 500 13px/1.3 var(--f-ui); color: var(--ink-2);
}
.hint-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); flex: none; animation: blink 2.4s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .35; } }

/* Entrée de l’accueil (animations CSS : elles suivent le temps réel) */
.intro .hero-word .l { animation: letterIn 1.4s var(--out) backwards; animation-delay: calc(.15s + var(--i, 0) * .06s); }
.intro .hero-phi .d { animation: phiDraw 1.5s cubic-bezier(.65, 0, .35, 1) .6s backwards; }
.intro .hero-phi .d + .d { animation-delay: .9s; }
.intro .hero-phi .node { transform-box: fill-box; transform-origin: center; animation: nodeIn .8s var(--spring) 1.5s backwards; }
.intro .hero-phi .node + .node { animation-delay: 1.64s; }
.intro .hero-kicker, .intro .hero-sub, .intro .hero-cta .btn, .intro .hero-foot > * { animation: riseIn 1.2s var(--out) backwards; animation-delay: calc(.55s + var(--k, 0) * .08s); }
@keyframes letterIn { from { opacity: 0; transform: translateY(70%) rotate(6deg); } }
@keyframes phiDraw { from { stroke-dashoffset: 1; } }
@keyframes nodeIn { from { transform: scale(0); } }
@keyframes riseIn { from { opacity: 0; transform: translateY(22px); } }

/* 1 · La plongée */
.ch-plongee { height: 250vh; height: 250svh; }
.plongee-sticky {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  display: flex; align-items: center;
  padding-top: var(--nav-h);
}
.plongee-sticky::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(90% 70% at 30% 50%, rgba(7, 4, 3, .55), transparent 70%);
}
.plongee-inner { position: relative; }
.ch-plongee .giant { max-width: 11.5em; }
.plongee-foot {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 22px 40px;
  margin-top: clamp(22px, 4vh, 44px);
}
.plongee-foot .lead { margin: 0; max-width: 30em; }
.js .plongee-foot { opacity: 0; transform: translateY(26px); }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; max-width: 34em; }
.chips li {
  position: relative; padding: 9px 16px 9px 30px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(10, 7, 5, .6);
  font: 500 13px/1.25 var(--f-ui); color: var(--ink-2);
}
.chips li::before {
  content: ""; position: absolute; left: 13px; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%;
  background: var(--c); box-shadow: 0 0 9px var(--c);
}

/* 2 · Dix mondes */
.ch-mondes {
  height: 560vh;
  --card-gap: clamp(16px, 2vw, 30px);
  --card-w: clamp(220px, min(22vw, calc((100vh - 470px) * 1.1)), 330px);
}
@supports (height: 100svh) {
  .ch-mondes { --card-w: clamp(220px, min(22vw, calc((100svh - 470px) * 1.1)), 330px); }
}
.mondes-sticky {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-start; gap: 12px;
  padding-top: calc(var(--nav-h) + clamp(8px, 3vh, 34px)); padding-bottom: clamp(12px, 2.6vh, 28px);
  overflow: hidden;
}
/* le haut et le bas de l’écran portent le texte et les cartes ; le milieu reste au monde 3D */
.mondes-viewport { margin-top: auto; }
.mondes-sticky::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to bottom, rgba(7, 4, 3, .66), rgba(7, 4, 3, .2) 34%, transparent 46%, transparent 58%, rgba(7, 4, 3, .62));
}
.mondes-head { position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 18px 36px; }
.mondes-title .big { font-size: clamp(2.2rem, 4.3vw, 4.3rem); max-width: 12em; }
@media (max-height: 820px) and (min-width: 721px) { .mondes-lead { display: none; } }
.mondes-lead { margin-top: .8em; max-width: 31em; }
.mondes-title { position: relative; }
.mondes-title::before {
  content: ""; position: absolute; inset: -18% -14% -22% -10%; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(7, 4, 3, .7), rgba(7, 4, 3, .35) 65%, transparent);
}
.mondes-now { text-shadow: 0 1px 14px rgba(0, 0, 0, .85); }
.mondes-now {
  display: flex; flex-direction: column; align-items: flex-end; gap: 6px; margin: 0; flex: none;
  text-align: right; min-width: 12em;
}
.mondes-count { font: 500 13px/1 var(--f-ui); letter-spacing: .2em; color: var(--ink-3); }
.mondes-count b {
  font: 600 clamp(2.8rem, 5vw, 4.8rem)/.9 var(--f-display); letter-spacing: 0;
  color: var(--wc, var(--gold));
  text-shadow: 0 0 2px var(--wc, var(--gold)), 0 0 18px var(--wc, var(--gold));
  transition: color .5s, text-shadow .5s;
}
.mondes-name { font: italic 600 clamp(1.15rem, 1.7vw, 1.6rem)/1.15 var(--f-display); color: var(--ink); }
.mondes-name.is-swap { animation: swap .55s var(--out); }
@keyframes swap { from { opacity: 0; transform: translateY(8px); } }
.mondes-viewport { position: relative; width: 100%; }
.mondes-track {
  display: flex; gap: var(--card-gap, 28px); margin: 0; padding: 18px 0; list-style: none;
  will-change: transform;
}
.world {
  --c: #ffc93c; --c-rgb: 255, 201, 60;
  position: relative; flex: 0 0 var(--card-w, 320px);
  border-radius: 16px; overflow: hidden;
  background: var(--glass-solid);
  border: 1px solid rgba(255, 255, 255, .08);
  transform: scale(.88);
  transition: transform .7s var(--out), border-color .6s, box-shadow .6s;
}
/* cartes en attente : assombries mais opaques (le décor 3D ne transparaît pas au travers) */
.world::before {
  content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: rgba(6, 4, 3, .58);
  transition: opacity .7s var(--out);
}
.world.is-active { transform: scale(1); border-color: rgba(var(--c-rgb), .7); box-shadow: 0 0 0 1px rgba(var(--c-rgb), .25), 0 0 34px rgba(var(--c-rgb), .32), 0 30px 80px rgba(0, 0, 0, .65); }
.world.is-active::before { opacity: 0; }
.world-media { position: relative; aspect-ratio: 16 / 9; background: #000; }
.world-media img { width: 100%; height: 100%; object-fit: cover; }
.world-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(9, 6, 4, .92), transparent 46%);
}
.world-body {
  position: relative; margin-top: -34px;
  display: grid; grid-template-columns: auto 1fr; align-items: end; gap: 0 12px;
  padding: 0 16px 14px;
}
.world-n {
  font: 600 clamp(40px, 3.4vw, 54px)/.8 var(--f-display);
  color: var(--c);
  text-shadow: 0 0 2px var(--c), 0 0 16px rgba(var(--c-rgb), .8), 0 0 40px rgba(var(--c-rgb), .4);
}
.world-name { margin: 0 0 3px; font: 600 clamp(19px, 1.6vw, 24px)/1.05 var(--f-display); text-wrap: balance; }
.world-meta { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 10px 0 0; padding: 9px 0 0; border-top: 1px solid var(--line); list-style: none; }
.world-meta li { font: 500 10px/1.4 var(--f-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.world-meta b { display: block; font: 500 13px/1.3 var(--f-ui); letter-spacing: .02em; text-transform: none; color: var(--ink); }
.mondes-rail { position: relative; height: 14px; }
.mondes-line { position: absolute; left: var(--gut-l); right: var(--gut-r); top: 6px; height: 1px; background: var(--ink-4); }
.mondes-line i { position: absolute; left: 0; top: 0; bottom: 0; width: 100%; transform-origin: 0 50%; transform: scaleX(var(--wp, 0)); background: linear-gradient(90deg, var(--gold), var(--wc, var(--gold))); box-shadow: 0 0 8px var(--wc, var(--gold)); }
.mondes-nodes { position: absolute; left: var(--gut-l); right: var(--gut-r); top: 0; height: 13px; }
.mondes-nodes span {
  position: absolute; top: 0; width: 13px; height: 13px; margin-inline-start: -6.5px; border-radius: 50%;
  border: 1.5px solid rgba(244, 239, 230, .35); background: var(--bg);
  transition: border-color .4s, background-color .4s, box-shadow .4s, transform .4s var(--spring);
}
.mondes-nodes span.is-done { border-color: var(--nc); }
.mondes-nodes span.is-active { border-color: #fff; background: var(--nc); box-shadow: 0 0 12px var(--nc); transform: scale(1.25); }

/* 3 · Les jeux */
.ch-jeux { padding: var(--sec-y) 0; }
.sec-head { position: relative; max-width: 54em; }
.sec-head--center { margin: 0 auto; text-align: center; display: flex; flex-direction: column; align-items: center; }
.sec-head--center .kicker { justify-content: center; }
.sec-head::before {
  content: ""; position: absolute; inset: -12% -18% -18% -14%; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(7, 4, 3, .62), transparent);
}
.catalog {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(16px, 2.2vw, 30px);
  margin-top: clamp(34px, 6vh, 70px);
}
.game { --c: #ffc93c; --c-rgb: 255, 201, 60; overflow: hidden; }
.game--available { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); }
.game-media { position: relative; min-height: 340px; background: #000; overflow: hidden; border-radius: var(--radius) 0 0 var(--radius); }
.game-media > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.02); transition: transform 1.2s var(--out); }
.game:hover .game-media > img { transform: scale(1.06); }
.game-media::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, transparent 55%, rgba(12, 8, 6, .85)), linear-gradient(to top, rgba(8, 5, 4, .5), transparent 40%);
}
.badge {
  position: absolute; top: 18px; left: 18px; z-index: 2;
  display: inline-flex; align-items: center; gap: 9px;
  padding: 8px 14px 8px 12px; border-radius: 999px;
  border: 1px solid rgba(var(--b-rgb, var(--c-rgb)), .55); background: rgba(6, 4, 3, .72);
  font: 600 11px/1 var(--f-ui); letter-spacing: .2em; text-transform: uppercase; color: rgb(var(--b-rgb, var(--c-rgb)));
}
.badge i { position: relative; width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 9px currentColor; }
.badge--live { --b-rgb: 57, 255, 159; }
.badge--live i::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 1px solid currentColor; animation: ping 2.2s var(--out) infinite; }
.game-body { position: relative; display: flex; flex-direction: column; gap: 16px; padding: clamp(24px, 3.2vw, 46px); }
.game-kicker { margin: 0; font: 500 12px/1.3 var(--f-ui); letter-spacing: .22em; text-transform: uppercase; color: rgba(var(--c-rgb), .9); }
.game-title { margin: 0; font: 600 clamp(2.8rem, 5vw, 4.8rem)/.88 var(--f-display); letter-spacing: -.01em; }
.game-tagline { margin: -4px 0 0; font: italic 500 clamp(1.25rem, 1.8vw, 1.6rem)/1.2 var(--f-display); color: var(--ink); }
.game-desc { margin: 0; color: var(--ink-2); font-size: 16px; line-height: 1.6; }
.game-facts { display: flex; flex-wrap: wrap; gap: 10px 30px; margin: 2px 0; padding: 0; list-style: none; }
.game-facts li { font: 500 11px/1.3 var(--f-ui); letter-spacing: .18em; text-transform: uppercase; color: var(--ink-3); }
.game-facts b { display: block; font: 600 42px/1 var(--f-display); letter-spacing: 0; color: var(--gold); text-shadow: var(--gold-glow); }
.game-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.game-gallery figure { margin: 0; }
.game-gallery img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); background: #000; }
.game-gallery figcaption { margin-top: 6px; font: 500 11.5px/1.3 var(--f-ui); color: var(--ink-3); }
.game-actions { display: flex; flex-wrap: wrap; gap: 14px 16px; margin-top: 6px; }
.game-ios {
  margin: 0; padding: 16px 18px; border-radius: 14px;
  border: 1px dashed rgba(127, 227, 255, .45); background: rgba(127, 227, 255, .05);
  font-size: 15px; color: var(--ink-2);
}
.game-ios b { color: var(--ink); }
.game-slot {
  position: absolute; left: clamp(18px, 2.4vw, 30px); bottom: clamp(12px, 2vw, 22px); z-index: 2;
  display: flex; align-items: baseline; gap: 8px;
  font: 600 clamp(56px, 6vw, 84px)/.8 var(--f-display); color: var(--gold);
  text-shadow: 0 0 2px var(--gold), 0 0 18px rgba(var(--gold-rgb), .7), 0 2px 24px rgba(0, 0, 0, .8);
}
.game-slot small { font: 500 13px/1 var(--f-ui); letter-spacing: .2em; color: var(--ink-2); text-shadow: 0 1px 8px #000; }

/* Les 10 emplacements : 1 jeu disponible, les autres attendent leur jeu */
.shelf { margin-top: clamp(30px, 6vh, 64px); }
.shelf-head { display: flex; align-items: flex-end; gap: 14px 34px; margin-bottom: clamp(18px, 3vh, 30px); }
.shelf-head { position: relative; }
.shelf-head::before {
  content: ""; position: absolute; inset: -30% -10% -30% -6%; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(7, 4, 3, .8), rgba(7, 4, 3, .45) 60%, transparent);
}
.shelf-count {
  flex: none; display: flex; align-items: baseline; gap: 10px; margin: 0;
  font: 600 clamp(3.6rem, 6vw, 5.6rem)/.8 var(--f-display); color: var(--gold); text-shadow: var(--gold-glow);
}
.shelf-count span { font: 500 15px/1 var(--f-ui); letter-spacing: .2em; color: var(--ink-3); text-shadow: none; }
.shelf-text { padding-left: clamp(18px, 2.4vw, 34px); border-left: 1px solid var(--line); }
.shelf-title { margin: 0; font: 600 clamp(1.7rem, 2.6vw, 2.4rem)/1.05 var(--f-display); }
.shelf-text p { margin: 8px 0 0; max-width: 42em; font-size: 15.5px; color: var(--ink-2); }
.slots {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(10px, 1.6vw, 22px);
}
.slot {
  --c: #ffc93c; --c-rgb: 255, 201, 60;
  position: relative;
  display: grid; grid-template-columns: clamp(96px, 8.4vw, 124px) minmax(0, 1fr); align-items: center; gap: 0 clamp(12px, 1.4vw, 20px);
  min-height: 152px; padding: 14px 22px 14px 12px;
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(22, 15, 11, .8), rgba(8, 5, 4, .88));
  border: 1px dashed rgba(var(--c-rgb), .26);
  box-shadow: inset 0 0 34px rgba(var(--c-rgb), .04), 0 24px 60px rgba(0, 0, 0, .35);
}
.slot:hover { border-style: solid; border-color: rgba(var(--c-rgb), .65); box-shadow: 0 0 0 1px rgba(var(--c-rgb), .14), 0 0 34px rgba(var(--c-rgb), .2), inset 0 0 34px rgba(var(--c-rgb), .08); }
.slot-fig { position: relative; aspect-ratio: 1; }
.slot-fig::before {
  content: ""; position: absolute; inset: 14%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(var(--c-rgb), .12), transparent);
  opacity: .6; transition: opacity .5s;
}
.slot:hover .slot-fig::before { opacity: 1; }
.slot-fig canvas { position: relative; width: 100%; height: 100%; }
.slot-n {
  position: absolute; top: 12px; right: 16px;
  font: italic 600 26px/1 var(--f-display); color: rgba(var(--c-rgb), .5);
  transition: color .4s, text-shadow .4s;
}
.slot:hover .slot-n { color: rgb(var(--c-rgb)); text-shadow: 0 0 14px rgba(var(--c-rgb), .7); }
.slot-body { min-width: 0; }
.slot-state {
  display: flex; align-items: center; gap: 8px; margin: 0 0 6px;
  font: 500 10.5px/1.2 var(--f-ui); letter-spacing: .2em; text-transform: uppercase; color: rgba(var(--c-rgb), .78);
}
.slot-state i { flex: none; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid currentColor; opacity: .8; }
.slot-title { margin: 0; font: 600 clamp(1.3rem, 1.6vw, 1.6rem)/1.05 var(--f-display); color: var(--ink-2); transition: color .3s; text-wrap: balance; }
.slot:hover .slot-title { color: var(--ink); }
.slot--live { border-style: solid; border-color: rgba(var(--c-rgb), .5); overflow: hidden; }
.slot--live .slot-state i { background: currentColor; box-shadow: 0 0 8px currentColor; }
.slot-cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .32; border-radius: inherit; }
.slot--live .slot-body { position: relative; grid-column: 1 / -1; }
.slot-links { margin: 8px 0 0; font: 600 12px/1 var(--f-ui); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }
.slot-links a { color: var(--gold); text-decoration: none; }

/* 4 · L’Arène φ */
.ch-arene { padding: var(--sec-y) 0; }
.arene-grid { display: grid; grid-template-columns: minmax(0, .78fr) minmax(0, 1.6fr); gap: clamp(28px, 4.4vw, 72px); align-items: center; }
.arene-head .big { font-size: clamp(2.6rem, 5vw, 5rem); }
.rules { position: relative; list-style: none; margin: 30px 0 0; padding: 0 0 0 30px; display: grid; gap: 16px; }
.rules::before { content: ""; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 1px; background: linear-gradient(var(--gold), rgba(var(--gold-rgb), .1)); }
.rules li { position: relative; display: flex; flex-direction: column; }
.rules li::before {
  content: ""; position: absolute; left: -30px; top: 5px; width: 13px; height: 13px; border-radius: 50%;
  border: 1.5px solid var(--gold); background: var(--bg); box-shadow: 0 0 8px rgba(var(--gold-rgb), .6);
}
.rules b { font: 600 12.5px/1.3 var(--f-ui); letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
.rules span { color: var(--ink-2); font-size: 15.5px; }
.toy-frame {
  position: relative; width: 100%; aspect-ratio: 16 / 10; max-height: 80vh; max-height: 80svh;
  border-radius: 22px; overflow: hidden;
  background: radial-gradient(90% 80% at 50% 100%, rgba(var(--gold-rgb), .12), transparent 60%), #060403;
  border: 1px solid rgba(var(--gold-rgb), .3);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .6), 0 0 46px rgba(var(--gold-rgb), .13), 0 40px 120px rgba(0, 0, 0, .65);
}
.toy { position: absolute; inset: 0; z-index: 1; }
.toy-wait {
  position: absolute; inset: 0; z-index: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 24px;
  text-align: center; color: var(--ink-2);
}
.toy-wait p { margin: 0; font: italic 500 1.5rem/1.2 var(--f-display); color: var(--ink); }
.toy-wait-fig { width: 96px; height: 96px; animation: float 4s ease-in-out infinite; }
.toy-wait-fig path { stroke: var(--gold); filter: drop-shadow(0 0 5px rgba(var(--gold-rgb), .9)); }
.toy-wait-fig circle { fill: var(--bg); stroke: var(--gold-hot); stroke-width: 2; }
@keyframes float { 50% { transform: translateY(-8px) rotate(6deg); } }
.toy-frame.is-live .toy-wait { visibility: hidden; }
.corner { position: absolute; z-index: 2; width: 22px; height: 22px; pointer-events: none; border-color: rgba(var(--gold-rgb), .7); border-style: solid; border-width: 0; }
.corner.c1 { left: 12px; top: 12px; border-left-width: 1.5px; border-top-width: 1.5px; }
.corner.c2 { right: 12px; top: 12px; border-right-width: 1.5px; border-top-width: 1.5px; }
.corner.c3 { left: 12px; bottom: 12px; border-left-width: 1.5px; border-bottom-width: 1.5px; }
.corner.c4 { right: 12px; bottom: 12px; border-right-width: 1.5px; border-bottom-width: 1.5px; }

/* 5 · Comment jouer */
.ch-steps { padding: var(--sec-y) 0 0; }
.steps {
  position: relative; list-style: none; margin: clamp(38px, 6vh, 72px) 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2.2vw, 30px);
}
.steps::before {
  content: ""; position: absolute; left: 8%; right: 8%; top: 125px; height: 1px; z-index: -1;
  background: repeating-linear-gradient(90deg, rgba(244, 239, 230, .3) 0 8px, transparent 8px 16px);
}
/* la carte laisse une fenêtre transparente : la scène 3D y pose sa figure (data-scene-anchor) */
.step { padding: 18px 26px 30px; }
.step.glass-card {
  background: linear-gradient(to bottom, rgba(10, 7, 5, .1), rgba(10, 7, 5, .16) 200px, rgba(15, 10, 7, .9) 262px, rgba(9, 6, 4, .94));
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
.step-fig {
  position: relative; height: 230px; margin: 0 -8px 14px; display: grid; place-items: center; border-radius: 16px;
  background: radial-gradient(closest-side, rgba(var(--c-rgb), .13), transparent);
}
.step-fig::after {
  content: ""; position: absolute; left: 22%; right: 22%; bottom: 14px; height: 30px; border-radius: 50%;
  border: 1px solid rgba(var(--c-rgb), .45);
  box-shadow: 0 0 18px rgba(var(--c-rgb), .25), inset 0 0 14px rgba(var(--c-rgb), .18);
}
.step-fig canvas { width: 200px; height: 200px; }
.has-scene .step-fig canvas { visibility: hidden; }
.step-n { display: flex; align-items: center; gap: 12px; margin: 0; font: 500 11.5px/1.2 var(--f-ui); letter-spacing: .2em; text-transform: uppercase; color: rgba(var(--c-rgb), .95); }
.step-n span { font: italic 600 22px/1 var(--f-display); letter-spacing: 0; color: var(--ink); }
.step h3 { margin: 6px 0 8px; font: 600 clamp(2.1rem, 3.2vw, 3rem)/1 var(--f-display); text-shadow: 0 0 22px rgba(var(--c-rgb), .35); }
.step p:last-child { margin: 0; color: var(--ink-2); font-size: 16px; }
.controls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 2vw, 26px); margin-top: clamp(22px, 3vw, 34px); }
.ctl { padding: 20px 22px; border-radius: 16px; border: 1px solid var(--line); background: rgba(9, 6, 4, .72); }
.ctl h3 { margin: 0 0 10px; font: 600 12px/1.3 var(--f-ui); letter-spacing: .22em; text-transform: uppercase; color: var(--gold); display: flex; align-items: center; gap: 10px; }
.ctl.is-mine { border-color: rgba(var(--gold-rgb), .45); box-shadow: 0 0 24px rgba(var(--gold-rgb), .12); }
.ctl.is-mine h3::after { content: attr(data-mine); padding: 4px 8px; border-radius: 999px; background: rgba(var(--gold-rgb), .14); font-size: 10px; letter-spacing: .14em; color: var(--gold-hot); }
.ctl ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ctl li { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 15px; color: var(--ink); }
.ctl li em { font-style: normal; color: var(--ink-3); font-size: 14px; text-align: right; }
.v { font: 600 17px/1 var(--f-display); color: var(--gold); text-shadow: var(--gold-glow); }
kbd {
  display: inline-flex; align-items: center; justify-content: center; min-width: 28px; height: 28px; margin-right: 4px; padding: 0 8px;
  font: 600 12.5px/1 var(--f-ui); color: var(--ink);
  border: 1px solid rgba(244, 239, 230, .28); border-bottom-width: 2px; border-radius: 5px; background: rgba(244, 239, 230, .05);
}
.marquee {
  position: relative; margin-top: clamp(64px, 11vh, 130px); padding: 10px 0; overflow: hidden;
  -webkit-mask: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
  mask: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
}
.marquee-track { display: flex; width: max-content; animation: marquee 46s linear infinite; }
.marquee ul { display: flex; gap: 14px; margin: 0; padding: 0 7px; list-style: none; }
.marquee li {
  position: relative; white-space: nowrap;
  padding: 13px 24px 13px 38px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .12); background: rgba(10, 7, 5, .7);
  font: 500 14px/1 var(--f-ui); letter-spacing: .16em; text-transform: uppercase; color: var(--ink);
}
.marquee li::before {
  content: ""; position: absolute; left: 16px; top: 50%; width: 10px; height: 10px; margin-top: -5px; border-radius: 50%;
  border: 2px solid var(--c); box-shadow: 0 0 10px var(--c), inset 0 0 4px var(--c);
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* 6 · Télécharger */
.ch-dl { padding: var(--sec-y) 0; }
.dl-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2.2vw, 28px); margin-top: clamp(34px, 6vh, 64px); }
.dl-card { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding: clamp(22px, 2.4vw, 32px); }
.dl-card > p { margin: 0; color: var(--ink-2); }
.dl-card h3 { margin: 0; font: 600 clamp(2rem, 2.6vw, 2.5rem)/1 var(--f-display); }
.dl-card .btn { margin-top: auto; }
.dl-ico { width: 54px; height: 54px; fill: none; stroke: var(--c); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 6px rgba(var(--c-rgb), .75)); }
.dl-note { margin: 0; font-size: 13.5px !important; line-height: 1.5; color: var(--ink-3) !important; }
.dl-steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 10px; color: var(--ink-2); }
.dl-steps li { counter-increment: s; position: relative; padding-left: 36px; }
.dl-steps li::before {
  content: counter(s); position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center; font: 600 12px/1 var(--f-ui); color: var(--c);
  border: 1.5px solid rgba(var(--c-rgb), .8); box-shadow: 0 0 8px rgba(var(--c-rgb), .4);
}
.dl-steps b { color: var(--ink); font-weight: 500; }
.share { display: inline-block; width: 1.15em; height: 1.15em; vertical-align: -.2em; fill: none; stroke: var(--c); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.dl-mine {
  position: absolute; top: 18px; right: 18px;
  padding: 6px 11px; border-radius: 999px; background: rgba(var(--c-rgb), .14); border: 1px solid rgba(var(--c-rgb), .5);
  font: 600 10.5px/1 var(--f-ui); letter-spacing: .16em; text-transform: uppercase; color: var(--c);
}
.dl-card.is-mine { border-color: rgba(var(--c-rgb), .45); box-shadow: 0 0 0 1px rgba(var(--c-rgb), .2), 0 0 40px rgba(var(--c-rgb), .14), 0 30px 80px rgba(0, 0, 0, .45); }
.dl-media { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: clamp(22px, 4vw, 64px); align-items: center; margin-top: clamp(34px, 6vh, 70px); }
.trailer {
  position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; overflow: hidden;
  border: 1px solid rgba(var(--gold-rgb), .3); border-radius: var(--radius); background: #000; cursor: pointer; text-align: left;
  box-shadow: 0 0 40px rgba(var(--gold-rgb), .1), 0 30px 90px rgba(0, 0, 0, .55);
}
.trailer img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--out), filter .6s; filter: saturate(1.05) brightness(.82); }
.trailer:hover img { transform: scale(1.04); filter: saturate(1.15) brightness(.95); }
.trailer::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(6, 4, 3, .85), transparent 55%); }
.trailer-play {
  position: absolute; left: 50%; top: 50%; z-index: 1; width: 86px; height: 86px; margin: -43px 0 0 -43px;
  display: grid; place-items: center; border-radius: 50%;
  border: 1.5px solid var(--gold-hot); background: rgba(10, 7, 5, .45);
  box-shadow: 0 0 22px rgba(var(--gold-rgb), .55), inset 0 0 18px rgba(var(--gold-rgb), .25);
  transition: transform .5s var(--spring), background-color .3s;
}
.trailer-play svg { width: 32px; height: 32px; margin-left: 4px; fill: var(--gold); filter: drop-shadow(0 0 6px rgba(var(--gold-rgb), .9)); }
.trailer:hover .trailer-play { transform: scale(1.1); background: rgba(var(--gold-rgb), .18); }
.trailer-label { position: absolute; left: clamp(18px, 2.4vw, 30px); bottom: clamp(16px, 2.2vw, 26px); z-index: 1; display: flex; flex-direction: column; gap: 6px; }
.trailer-label b { font: 600 clamp(1.5rem, 2.4vw, 2.2rem)/1 var(--f-display); color: var(--ink); }
.trailer-label small { font: 500 11.5px/1 var(--f-ui); letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
.phone { margin: 0; width: clamp(170px, 17vw, 240px); display: flex; flex-direction: column; align-items: center; gap: 16px; }
.phone-shell {
  padding: 8px; border-radius: 34px;
  background: linear-gradient(150deg, #2b2119, #0b0806 60%);
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: 0 0 0 1px #000, 0 0 50px rgba(var(--gold-rgb), .16), 0 40px 90px rgba(0, 0, 0, .7);
  transform: rotate(4deg);
}
.phone-shell img { width: 100%; height: auto; border-radius: 27px; }
.phone figcaption { font: 500 11.5px/1.2 var(--f-ui); letter-spacing: .2em; text-transform: uppercase; color: var(--ink-3); }

/* 7 · Finale */
.ch-finale {
  min-height: 165vh; min-height: 165svh;
  display: flex; align-items: flex-end;
  padding-bottom: clamp(70px, 14vh, 150px);
  text-align: center;
}
.finale-inner { position: relative; display: flex; flex-direction: column; align-items: center; }
/* la lumière de la porte peut être très forte : un voile sombre garde le texte lisible */
.finale-inner::before {
  content: ""; position: absolute; inset: -16% -8% -12%; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(7, 4, 3, .78), rgba(7, 4, 3, .5) 55%, transparent);
}
.ch-finale .giant { text-shadow: 0 0 1px rgba(0, 0, 0, .6), 0 2px 36px rgba(0, 0, 0, .85); }
.ch-finale .lead { color: var(--ink); }
.finale-inner .kicker { justify-content: center; }
.ch-finale .giant { font-size: clamp(3.3rem, 11.5vw, 10.5rem); max-width: 9em; }
.ch-finale .lead { margin-left: auto; margin-right: auto; }
.finale-cta { margin-top: clamp(26px, 4vh, 44px); }
/* téléphone : la porte s’ouvre au-dessus du texte ; le voile reste serré autour du texte */
@media (max-width: 759px) {
  .finale-inner::before { inset: -5% -6% -8%; }
  .ch-finale { padding-bottom: clamp(28px, 5vh, 60px); }
  .finale-inner .kicker { margin-bottom: 14px; }
  .ch-finale .lead { font-size: 15px; margin-top: .8em; }
  .finale-cta { margin-top: 22px; }
}
/* écran large : le texte à gauche, la porte d’or s’ouvre à droite (scene.js mesure la place libre) */
@media (min-width: 760px) {
  .ch-finale { text-align: left; }
  .finale-inner { align-items: flex-start; }
  .finale-inner > * { width: fit-content; max-width: 100%; }
  .finale-inner .kicker { justify-content: flex-start; }
  .ch-finale .giant { font-size: clamp(3.2rem, 7.4vw, 8.4rem); max-width: 6em; }
  .ch-finale .lead { margin-left: 0; max-width: min(27em, 44vw); }
  .finale-inner::before { inset: -16% auto -14% -12%; width: min(66vw, 1000px); }
}

/* Pied de page */
.foot {
  position: relative; z-index: 2;
  padding: 44px 0 max(28px, calc(env(safe-area-inset-bottom, 0px) + 18px));
  border-top: 1px solid var(--line);
  background: linear-gradient(rgba(6, 4, 3, .72), rgba(5, 3, 2, .96));
}
.foot-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 26px 40px; align-items: start; }
.foot-logo { margin: 0 0 6px; font: 600 30px/1 var(--f-display); }
.foot-brand p:last-child { margin: 0; color: var(--ink-3); font-size: 15px; }
.foot-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px 24px; }
.foot-links a, .foot-links button {
  padding: 6px 0; border: 0; background: none; cursor: pointer; text-decoration: none;
  font: 500 12.5px/1.2 var(--f-ui); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2);
  transition: color .2s;
}
.foot-links a:hover, .foot-links button:hover { color: var(--gold); }
.foot-legal { grid-column: 1 / -1; margin: 0; padding-top: 20px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-3); }

/* Vidéo */
.video-modal {
  width: min(92vw, 1100px); max-width: none; max-height: none; padding: 0; border: 0; overflow: visible;
  background: transparent; color: var(--ink);
}
.video-modal.is-vertical { width: min(92vw, 46vh); width: min(92vw, 46svh); }
.video-modal::backdrop { background: rgba(4, 3, 2, .88); }
.video-box { position: relative; padding-top: 56px; }
.video-box video { width: 100%; max-height: 82vh; max-height: 82svh; border-radius: 16px; background: #000; box-shadow: 0 0 0 1px rgba(var(--gold-rgb), .3), 0 0 60px rgba(var(--gold-rgb), .18); }
.video-close {
  position: absolute; right: 0; top: 0; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .3); background: rgba(10, 7, 5, .7); cursor: pointer;
}
.video-close i { position: absolute; left: 13px; right: 13px; top: 21px; height: 1.5px; background: var(--ink); }
.video-close i:first-child { transform: rotate(45deg); }
.video-close i:last-child { transform: rotate(-45deg); }

/* Chiffres : ceux du Cormorant sont elzéviriens (le 1 ressemble à un I), on passe au Jost */
.kicker-n, .mondes-count b, .world-n, .game-facts b, .step-n span, .game-slot, .shelf-count, .slot-n {
  font-family: var(--f-ui); font-style: normal; font-variant-numeric: lining-nums tabular-nums;
}
.kicker-n { font-size: 14px; font-weight: 500; letter-spacing: .06em; }
.step-n span { font-size: 17px; font-weight: 500; }
.slot-n { font-size: 15px; font-weight: 500; letter-spacing: .08em; }
.world-n { font-weight: 400; font-size: clamp(36px, 3vw, 48px); letter-spacing: -.04em; }
.mondes-count b { font-weight: 400; font-size: clamp(2.3rem, 4vw, 3.8rem); letter-spacing: -.03em; }
.game-facts b { font-weight: 500; font-size: 34px; letter-spacing: -.02em; margin-bottom: 4px; }
.game-slot { font-weight: 400; font-size: clamp(44px, 4.6vw, 64px); letter-spacing: -.03em; }
.shelf-count { font-weight: 400; font-size: clamp(3rem, 5vw, 4.6rem); letter-spacing: -.03em; }

/* ---------- Adaptations ---------- */
@media (max-width: 1100px) {
  .rail { display: none; }
  .foot-inner { grid-template-columns: minmax(0, 1fr); }
  .foot-links { justify-content: flex-start; }
  .game--available { grid-template-columns: minmax(0, 1fr); }
  .game-media { min-height: 0; aspect-ratio: 16 / 9; border-radius: var(--radius) var(--radius) 0 0; }
  .game-media::after { background: linear-gradient(to top, rgba(12, 8, 6, .9), transparent 45%); }
  .arene-grid { grid-template-columns: minmax(0, 1fr); }
  .arene-head { max-width: 40em; }
  .rules { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-left: 0; gap: 16px 22px; }
  .rules::before { display: none; }
  .rules li { padding-left: 26px; }
  .rules li::before { left: 0; }
}
@media (max-width: 1000px) {
  .slot { grid-template-columns: minmax(0, 1fr); align-items: start; text-align: center; padding: 12px 12px 16px; min-height: 0; }
  .slot-fig { width: min(70%, 150px); margin: 6px auto 4px; }
  .slot-state { justify-content: center; }
  .slot-n { right: auto; left: 14px; font-size: 14px; }
}
@media (max-width: 860px) {
  .steps { grid-template-columns: minmax(0, 1fr); }
  .steps::before { left: 50%; right: auto; top: 0; bottom: 0; width: 1px; height: auto; background: repeating-linear-gradient(rgba(244, 239, 230, .3) 0 8px, transparent 8px 16px); }
  .step { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 0 18px; align-items: center; padding: 16px 20px 20px 12px; }
  .step-fig { grid-row: 1 / 4; height: 140px; margin: 0; }
  .step.glass-card { background: linear-gradient(90deg, rgba(10, 7, 5, .1), rgba(10, 7, 5, .14) 128px, rgba(15, 10, 7, .9) 176px, rgba(9, 6, 4, .94)); }
  .step-fig::after { left: 14%; right: 14%; bottom: 6px; height: 20px; }
  .step-fig canvas { width: 132px; height: 132px; }
  .step h3 { margin: 4px 0 4px; }
  .controls { grid-template-columns: minmax(0, 1fr); }
  .dl-grid { grid-template-columns: minmax(0, 1fr); }
  .dl-media { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .mondes-head { flex-direction: column; align-items: flex-start; }
  .mondes-now { align-items: flex-start; text-align: left; flex-direction: row; align-items: baseline; gap: 14px; min-width: 0; }
  .mondes-count b { font-size: 2.1rem; }
}
@media (max-width: 720px) {
  :root { --nav-h: 60px; }
  .nav { gap: 10px; }
  .nav-links { display: none; }
  .nav-burger { display: block; }
  .nav-cta { margin-left: auto; }
  .nav-logo { font-size: 24px; }
  .shelf-head { flex-direction: column; align-items: flex-start; }
  .shelf-text { padding-left: 0; border-left: 0; }
  .slots { gap: 8px; }
  .slot { padding: 8px 6px 12px; border-radius: 14px; }
  .slot-fig { width: 78%; margin: 4px auto 0; }
  .slot-n { top: 9px; right: auto; left: 10px; font-size: 12px; }
  .slot-state { justify-content: center; margin-bottom: 4px; font-size: 9.5px; letter-spacing: .16em; }
  .slot-state i { width: 6px; height: 6px; }
  .slot-long { display: none; }
  .slot-title { font-size: 15.5px; line-height: 1.08; }
  .game-actions .btn { flex: 1 1 100%; }
  .game-gallery figcaption { font-size: 10.5px; }
  .hero-foot { align-items: center; }
  .scroll-cue { font-size: 0; letter-spacing: 0; gap: 0; }
  .hero-hint { font-size: 12.5px; padding: 9px 14px; }
  .hero-cta .btn { flex: 1 1 auto; }
  .mondes-lead { display: none; }
  .ch-mondes { --card-w: min(66vw, 260px); }
  .foot-inner { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .foot-links { justify-content: flex-start; gap: 4px 18px; }
  .foot { padding-top: 26px; }
  .foot-logo { font-size: 26px; }
  .foot-brand p:last-child { display: none; }
  .foot-legal { padding-top: 12px; font-size: 12px; }
  .toy-frame { aspect-ratio: 4 / 5; max-height: 74vh; max-height: 74svh; }
  .phone { display: none; }
}
@media (max-width: 420px) {
  .btn { padding: 14px 20px; letter-spacing: .1em; }
  .hero-kicker { font-size: 11px; letter-spacing: .16em; }
  .rules { grid-template-columns: minmax(0, 1fr); }
  .step { grid-template-columns: 104px minmax(0, 1fr); }
  .step-fig { height: 116px; }
  .step-fig canvas { width: 104px; height: 104px; }
  .chips li { font-size: 12.5px; }
  .world-meta { gap: 4px 14px; }
}
/* Téléphone à l’horizontale : peu de hauteur */
@media (max-height: 520px) and (orientation: landscape) {
  .hero-title { font-size: clamp(3.4rem, 11vw, 6rem); }
  .hero-sub { font-size: 1.2rem; margin: .3em 0 .8em; }
  .hero-foot { margin-top: 14px; }
  .giant { font-size: clamp(2.2rem, 6vw, 4rem); }
  .ch-finale .giant { font-size: clamp(2.2rem, 6vw, 3.4rem); }
  .ch-plongee .giant { max-width: 9.5em; }
  .plongee-foot { max-width: 66%; gap: 12px 24px; }
  .plongee-foot .lead { font-size: 15px; }
  .finale-cta { margin-top: 16px; }
  .mondes-title .big { font-size: 2rem; }
  .mondes-lead, .mondes-rail { display: none; }
  .mondes-sticky { gap: 6px; padding-top: calc(var(--nav-h) + 2px); padding-bottom: 8px; }
  .ch-mondes { --card-w: min(28vw, 210px); }
  .mondes-title .kicker { display: none; }
  .mondes-now { flex-direction: row; align-items: baseline; gap: 12px; }
  .mondes-count b { font-size: 1.8rem; }
  .world-meta { display: none; }
  .world-body { margin-top: -40px; padding-bottom: 12px; }
  .toy-frame { aspect-ratio: 16 / 9; max-height: 86vh; }
  .menu { justify-content: flex-start; overflow-y: auto; }
  .menu-links a { font-size: 26px; }
}

/* Qualité basse : moins d’effets coûteux */
.q-low .hero-phi { filter: drop-shadow(0 0 6px rgba(var(--gold-rgb), .9)); }
.q-low .tilt { will-change: auto; }

/* Mouvement réduit : pas de défilement horizontal piloté, pas d’animations en boucle */
.reduced .ch-plongee { height: auto; }
.reduced .plongee-sticky { position: relative; height: auto; min-height: 100vh; padding: var(--sec-y) 0; }
.reduced .plongee-foot { opacity: 1; transform: none; }
.reduced .ch-mondes { height: auto !important; }
.reduced .mondes-sticky { position: relative; height: auto; overflow: visible; padding: var(--sec-y) 0; }
.reduced .mondes-viewport { overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; padding-left: var(--gut-l); scrollbar-width: thin; }
.reduced .mondes-track { transform: none !important; padding-right: var(--gut-r); }
.reduced .world { scroll-snap-align: center; transform: none; opacity: 1; }
.reduced .world::before { display: none; }
.reduced .mondes-viewport { margin-top: 0; }
.reduced .mondes-rail { display: none; }
.reduced .marquee-track, .reduced .live::after, .reduced .badge--live i::after, .reduced .scroll-cue-line i, .reduced .hint-dot, .reduced .toy-wait-fig { animation: none; }
.reduced [data-reveal] { translate: none; transition: opacity .6s; }
.reduced .slot { transform: none; }
.reduced .tilt { transform: none; }
@media (prefers-reduced-motion: reduce) {
  .marquee-track, .live::after, .badge--live i::after, .scroll-cue-line i, .hint-dot, .toy-wait-fig { animation: none; }
}

/* =====================================================================
   Langues (js/i18n.js) : sélecteur, écritures non latines, arabe de droite à gauche
   ===================================================================== */

/* langue d’un premier passage détectée avant le chargement des textes : rien ne s’affiche en français */
.i18n-wait .nav, .i18n-wait .menu, .i18n-wait .rail, .i18n-wait main, .i18n-wait .foot, .i18n-wait .skip { visibility: hidden; }

/* ---------- Sélecteur de la barre : globe à la craie + code de la langue ---------- */
.lang { position: relative; flex: none; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 42px; padding: 0 12px 0 10px;
  border: 1px solid rgba(244, 239, 230, .2); border-radius: 999px;
  background: rgba(10, 7, 5, .35);
  font: 600 12px/1 Jost, Futura, "Segoe UI", system-ui, sans-serif; letter-spacing: .14em;
  color: var(--ink-2); cursor: pointer;
  transition: color .25s, border-color .25s, box-shadow .3s, background-color .25s;
}
.lang-btn:hover, .lang.is-open .lang-btn {
  color: var(--gold); border-color: rgba(var(--gold-rgb), .6);
  box-shadow: 0 0 16px rgba(var(--gold-rgb), .22), inset 0 0 10px rgba(var(--gold-rgb), .08);
}
.lang-globe { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.3; overflow: visible; }
.lang-globe .n { fill: var(--bg); stroke-width: 1.2; }
.lang-btn:hover .lang-globe, .lang.is-open .lang-globe { filter: drop-shadow(0 0 4px rgba(var(--gold-rgb), .85)); }
.lang-code { min-width: 2.2em; text-align: center; }
.lang-caret { width: 9px; height: 9px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; opacity: .7; transition: transform .35s var(--out); }
.lang.is-open .lang-caret { transform: rotate(180deg); }
.lang-pop {
  position: absolute; top: calc(100% + 14px); inset-inline-end: 0; z-index: 60;
  width: 352px; max-width: calc(100vw - 32px);
  padding: 16px 12px 12px;
  border-radius: 18px; border: 1px solid rgba(var(--gold-rgb), .32);
  background: linear-gradient(165deg, rgba(26, 18, 12, .97), rgba(9, 6, 4, .98));
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .5), 0 0 34px rgba(var(--gold-rgb), .14), 0 30px 70px rgba(0, 0, 0, .65);
  transform-origin: 90% 0;
  animation: langIn .32s var(--out);
}
/* le nœud de craie qui relie la liste au bouton */
.lang-pop::before {
  content: ""; position: absolute; top: -7px; inset-inline-end: 26px; width: 11px; height: 11px; border-radius: 50%;
  border: 1.5px solid rgba(var(--gold-rgb), .75); background: var(--bg); box-shadow: 0 0 9px rgba(var(--gold-rgb), .6);
}
@keyframes langIn { from { opacity: 0; transform: translateY(-8px) scale(.97); } }
.lang-head {
  margin: 0 8px 10px; font: 500 10.5px/1.2 var(--f-ui); letter-spacing: .24em; text-transform: uppercase;
  color: rgba(var(--gold-rgb), .85);
}
.lang-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 6px; margin: 0; padding: 0; list-style: none; }
.lang-opt {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px;
  padding: 8px 10px; border: 0; border-radius: 10px; background: transparent;
  font: 500 15px/1.25 Jost, Futura, "Segoe UI", system-ui, sans-serif; color: var(--ink-2); text-align: start; cursor: pointer;
  transition: background-color .2s, color .2s;
}
.lang-opt::before {
  content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%;
  border: 1.2px solid rgba(244, 239, 230, .3); transition: background-color .2s, border-color .2s, box-shadow .2s;
}
.lang-name { flex: 1 1 auto; min-width: 0; }
.lang-opt small { flex: none; font: 600 10px/1 Jost, sans-serif; letter-spacing: .14em; color: var(--ink-3); }
.lang-opt:hover, .lang-opt:focus-visible { background: rgba(var(--gold-rgb), .1); color: var(--ink); outline: none; }
.lang-opt:focus-visible { box-shadow: inset 0 0 0 1.5px rgba(var(--gold-rgb), .75); }
.lang-opt[aria-current="true"] { color: var(--gold-hot); background: rgba(var(--gold-rgb), .08); }
.lang-opt[aria-current="true"]::before { background: var(--gold); border-color: var(--gold-hot); box-shadow: 0 0 8px var(--gold); }
.lang-opt[aria-current="true"] small { color: var(--gold); }

/* ---------- Menu du téléphone : pastilles des 13 langues ---------- */
.menu-lang { display: flex; flex-direction: column; gap: 12px; }
.menu-lang-head {
  display: flex; align-items: center; gap: 10px; margin: 0;
  font: 500 12px/1.2 var(--f-ui); letter-spacing: .2em; text-transform: uppercase; color: var(--gold);
}
.menu-lang-head .lang-globe { width: 18px; height: 18px; filter: drop-shadow(0 0 4px rgba(var(--gold-rgb), .7)); }
.menu-lang-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.menu-lang-btn {
  min-height: 40px; padding: 8px 14px; border-radius: 999px;
  border: 1px solid rgba(244, 239, 230, .18); background: rgba(10, 7, 5, .5);
  font: 500 14px/1.2 Jost, Futura, "Segoe UI", system-ui, sans-serif; color: var(--ink-2); cursor: pointer;
  transition: color .2s, border-color .2s, background-color .2s, box-shadow .3s;
}
.menu-lang-btn:hover { color: var(--ink); border-color: rgba(var(--gold-rgb), .6); }
.menu-lang-btn[aria-pressed="true"] {
  color: #1c1003; background: var(--gold); border-color: var(--gold-hot);
  box-shadow: 0 0 14px rgba(var(--gold-rgb), .45);
}
.menu { overflow-y: auto; justify-content: safe center; }

/* noms des langues dans leur écriture (polices « Ody … » : quelques lettres, chargées par i18n.js) */
.lang-opt[lang="ar"] .lang-name, .menu-lang-btn[lang="ar"] { font-family: "Ody Cairo", Cairo, "Noto Sans Arabic", Tahoma, sans-serif; font-size: 16px; }
.lang-opt[lang="hi"] .lang-name, .menu-lang-btn[lang="hi"] { font-family: "Ody Noto Sans Devanagari", "Noto Sans Devanagari", "Nirmala UI", sans-serif; }
.lang-opt[lang="zh"] .lang-name, .menu-lang-btn[lang="zh"] { font-family: "Ody Noto Sans SC", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif; }
.lang-opt[lang="ja"] .lang-name, .menu-lang-btn[lang="ja"] { font-family: "Ody Noto Sans JP", "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif; }
.lang-opt[lang="ko"] .lang-name, .menu-lang-btn[lang="ko"] { font-family: "Ody Noto Sans KR", "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; }

/* barre plus serrée sur tablette : tout tient, même en allemand ou en russe */
@media (max-width: 1100px) and (min-width: 721px) {
  .nav { gap: 16px; }
  .nav-links { gap: 2px; }
  .nav-links a { padding: 10px 10px; letter-spacing: .12em; }
  .nav-cta { padding: 0 16px 0 13px; letter-spacing: .12em; }
}
@media (max-width: 900px) and (min-width: 721px) {
  .lang-code, .lang-caret { display: none; }
  .lang-btn { width: 42px; padding: 0; justify-content: center; }
}
.slot-short { display: none; }
@media (max-width: 720px) {
  .lang { display: none; }
  .slot-short { display: inline; }
}

/* ---------- Écritures non latines : Cormorant et Jost gardent le latin (Odyssée, φ, chiffres),
   la police de l’écriture prend le reste ---------- */
:root:lang(ar) {
  --f-display: "Cormorant Garamond", Amiri, "Noto Naskh Arabic", "Times New Roman", serif;
  --f-ui: Jost, Cairo, "Noto Sans Arabic", Tahoma, system-ui, sans-serif;
}
:root:lang(hi) {
  --f-display: "Cormorant Garamond", "Noto Serif Devanagari", "Nirmala UI", serif;
  --f-ui: Jost, "Noto Sans Devanagari", "Nirmala UI", system-ui, sans-serif;
}
:root:lang(zh) {
  --f-display: "Cormorant Garamond", "Noto Serif SC", "Songti SC", STSong, serif;
  --f-ui: Jost, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}
:root:lang(ja) {
  --f-display: "Cormorant Garamond", "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --f-ui: Jost, "Noto Sans JP", "Hiragino Sans", "Yu Gothic", Meiryo, system-ui, sans-serif;
}
:root:lang(ko) {
  --f-display: "Cormorant Garamond", "Noto Serif KR", AppleMyungjo, serif;
  --f-ui: Jost, "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
}
/* pas de faux italique ni d’espacement entre les lettres (il casse les liaisons de l’arabe
   et la ligne du devanagari) ; le mot mis en valeur reste doré */
:root:is(:lang(ar), :lang(hi), :lang(zh), :lang(ja), :lang(ko)) { font-synthesis: weight; }
:root:is(:lang(ar), :lang(hi), :lang(zh), :lang(ja), :lang(ko)) body * { letter-spacing: normal !important; }
:root:is(:lang(zh), :lang(ja), :lang(ko)) .lang-opt small, :root:is(:lang(ar), :lang(hi)) .lang-opt small { letter-spacing: .1em !important; }
/* lignes plus hautes : signes au-dessus et au-dessous de la ligne */
:root:is(:lang(ar), :lang(hi)) :is(.giant, .big) { line-height: 1.32; }
:root:is(:lang(zh), :lang(ja), :lang(ko)) :is(.giant, .big) { line-height: 1.18; }
:root:is(:lang(ar), :lang(hi), :lang(zh), :lang(ja), :lang(ko)) :is(.hero-sub, .game-tagline, .menu-links a, .world-name, .mondes-name, .shelf-title, .slot-title, .step h3, .dl-card h3, .trailer-label b, .toy-wait p) { line-height: 1.32; }
:root:is(:lang(ar), :lang(hi)) :is(.btn, .nav-cta, .nav-links a, .kicker, .badge, .rail a span, .scroll-cue, .marquee li, .slot-state, .step-n, .ctl h3, .dl-mine, .trailer-label small, .rules b, .foot-links a, .foot-links button, .menu-lang-head, .lang-head) { line-height: 1.5; }
:root:is(:lang(ar), :lang(hi)) .lead { line-height: 1.8; }
/* petites étiquettes : sans capitales ni espacement, ces écritures paraissent plus petites à taille égale */
:root:is(:lang(ar), :lang(hi), :lang(zh), :lang(ja), :lang(ko)) :is(.kicker, .game-kicker, .step-n, .ctl h3, .rules b, .slot-state, .world-meta li, .game-facts li, .badge, .dl-mine, .phone figcaption, .trailer-label small) { font-size: 13.5px; }
:root:is(:lang(ar), :lang(hi), :lang(zh), :lang(ja), :lang(ko)) .hero-kicker { font-size: 13.5px; }
@media (max-width: 420px) { :root:is(:lang(ar), :lang(hi), :lang(zh), :lang(ja), :lang(ko)) .hero-kicker { font-size: 12.5px; } }
@media (max-width: 720px) { :root:is(:lang(ar), :lang(hi), :lang(zh), :lang(ja), :lang(ko)) .slot-state { font-size: 11.5px; } }
/* les sinogrammes paraissent plus grands et plus denses que le Cormorant : titres un peu réduits */
:root:is(:lang(zh), :lang(ja), :lang(ko)) .giant { font-size: clamp(2.5rem, 7vw, 7.2rem); }
:root:is(:lang(zh), :lang(ja), :lang(ko)) .big { font-size: clamp(2.2rem, 5.2vw, 5.1rem); }
:root:is(:lang(zh), :lang(ja), :lang(ko)) .ch-finale .giant { font-size: clamp(2.8rem, 9.4vw, 8.6rem); }
@media (min-width: 760px) { :root:is(:lang(zh), :lang(ja), :lang(ko)) .ch-finale .giant { font-size: clamp(2.8rem, 6vw, 7rem); } }
:root:lang(ko) body { word-break: keep-all; }
:root:is(:lang(zh), :lang(ja)) body { line-break: strict; }
/* mots longs (allemand, russe…) : coupure propre plutôt qu’un débordement */
.giant, .big, .world-name, .shelf-title, .slot-title, .step h3, .dl-card h3, .game-tagline { overflow-wrap: break-word; }
:root:is(:lang(de), :lang(ru), :lang(tr), :lang(it), :lang(pt), :lang(es)) :is(.giant, .big, .shelf-title, .slot-title, .step h3, .dl-card h3) { hyphens: auto; -webkit-hyphens: auto; }

/* ---------- Arabe : la page se lit de droite à gauche (la scène 3D, elle, ne se retourne pas ;
   scene.js place ses sujets du côté libre) ---------- */
[dir="rtl"] .skip { left: auto; right: 12px; }
[dir="rtl"] .nav-logo, [dir="rtl"] .hero-title { direction: ltr; }
[dir="rtl"] .hero-title { justify-content: flex-end; margin: 0 -.04em 0 0; }
[dir="rtl"] .nav-coins { margin-right: 0; margin-left: 4px; padding: 6px 10px 6px 12px; }
[dir="rtl"] .nav-links { margin-left: 0; margin-right: auto; }
[dir="rtl"] .nav-cta { padding: 0 16px 0 20px; }
[dir="rtl"] .nav-burger { margin-right: 0; margin-left: -8px; }
[dir="rtl"] .lang-btn { padding: 0 10px 0 12px; }
[dir="rtl"] .lang-pop { transform-origin: 10% 0; }
[dir="rtl"] .kicker::before { transform: scaleX(-1); }
[dir="rtl"] .rail { right: auto; left: max(18px, env(safe-area-inset-left, 0px)); }
[dir="rtl"] .rail a span { right: auto; left: 24px; transform: translate(-6px, -50%); }
[dir="rtl"] .rail a:hover span, [dir="rtl"] .rail a:focus-visible span, [dir="rtl"] .rail a.is-active span { transform: translate(0, -50%); }
[dir="rtl"] .chips li { padding: 9px 30px 9px 16px; }
[dir="rtl"] .chips li::before { left: auto; right: 13px; }
[dir="rtl"] .plongee-sticky::before { background: radial-gradient(90% 70% at 70% 50%, rgba(7, 4, 3, .55), transparent 70%); }
[dir="rtl"] .mondes-title::before { inset: -18% -10% -22% -14%; }
[dir="rtl"] .mondes-now { text-align: left; }
[dir="rtl"] .mondes-line i { transform-origin: 100% 50%; background: linear-gradient(270deg, var(--gold), var(--wc, var(--gold))); }
[dir="rtl"] .sec-head::before { inset: -12% -14% -18% -18%; }
[dir="rtl"] .badge { left: auto; right: 18px; }
[dir="rtl"] .game-slot { left: auto; right: clamp(18px, 2.4vw, 30px); }
[dir="rtl"] .shelf-head::before { inset: -30% -6% -30% -10%; }
[dir="rtl"] .rules { padding: 0 30px 0 0; }
[dir="rtl"] .rules::before { left: auto; right: 6px; }
[dir="rtl"] .rules li::before { left: auto; right: -30px; }
[dir="rtl"] .ctl li em { text-align: left; }
[dir="rtl"] kbd { margin-right: 0; margin-left: 4px; }
/* le bandeau défile toujours dans le même sens ; chaque pastille se lit de droite à gauche */
[dir="rtl"] .marquee-track { direction: ltr; }
[dir="rtl"] .marquee li { direction: rtl; padding: 13px 38px 13px 24px; }
[dir="rtl"] .marquee li::before { left: auto; right: 16px; }
[dir="rtl"] .dl-steps li { padding-left: 0; padding-right: 36px; }
[dir="rtl"] .dl-steps li::before { left: auto; right: 0; }
[dir="rtl"] .dl-mine { right: auto; left: 18px; }
[dir="rtl"] .trailer { text-align: right; }
[dir="rtl"] .trailer-label { left: auto; right: clamp(18px, 2.4vw, 30px); }
[dir="rtl"] .phone-shell { transform: rotate(-4deg); }
[dir="rtl"] .video-close { right: auto; left: 0; }
[dir="rtl"] .reduced .mondes-viewport { padding-left: 0; padding-right: var(--gut-r); }
[dir="rtl"] .reduced .mondes-track { padding-right: 0; padding-left: var(--gut-l); }
@media (min-width: 1101px) {
  [dir="rtl"] .game-media { border-radius: 0 var(--radius) var(--radius) 0; }
  [dir="rtl"] .game-media::after { background: linear-gradient(270deg, transparent 55%, rgba(12, 8, 6, .85)), linear-gradient(to top, rgba(8, 5, 4, .5), transparent 40%); }
}
@media (max-width: 1100px) {
  [dir="rtl"] .rules { padding-right: 0; }
  [dir="rtl"] .rules li { padding-left: 0; padding-right: 26px; }
  [dir="rtl"] .rules li::before { right: 0; }
}
@media (min-width: 1001px) {
  [dir="rtl"] .slot { padding: 14px 12px 14px 22px; }
  [dir="rtl"] .slot-n { right: auto; left: 16px; }
}
@media (max-width: 1000px) { [dir="rtl"] .slot-n { left: auto; right: 14px; } }
@media (min-width: 721px) {
  [dir="rtl"] .shelf-text { padding-left: 0; padding-right: clamp(18px, 2.4vw, 34px); border-left: 0; border-right: 1px solid var(--line); }
}
@media (max-width: 720px) {
  [dir="rtl"] .slot-n { right: 10px; }
  [dir="rtl"] .nav-cta { margin-left: 0; margin-right: auto; }
}
@media (max-width: 860px) {
  [dir="rtl"] .step { padding: 16px 12px 20px 20px; }
  [dir="rtl"] .step.glass-card { background: linear-gradient(270deg, rgba(10, 7, 5, .1), rgba(10, 7, 5, .14) 128px, rgba(15, 10, 7, .9) 176px, rgba(9, 6, 4, .94)); }
  [dir="rtl"] .mondes-now { text-align: right; }
}
@media (min-width: 760px) {
  [dir="rtl"] .ch-finale { text-align: right; }
  [dir="rtl"] .ch-finale .lead { margin-left: auto; margin-right: 0; }
  [dir="rtl"] .finale-inner::before { inset: -16% -12% -14% auto; }
}
