/* ============================================================
   LEGION — design system
   ============================================================ */

:root {
  --bg: #0a0608;
  --bg-2: #120b0e;
  --panel: rgba(38, 26, 30, 0.72);
  --border: rgba(255, 255, 255, 0.09);
  --ink: #f7f2f3;
  --muted: #a1959a;

  --red: #ff2f45;
  --red-deep: #c81030;
  --orange: #ff7a29;
  --green: #3ddc84;
  --cyan: #45e0d0;
  --gold: #f5b93c;
  --violet: #a78bfa;
  --bone: #f2ece4;

  --flame: linear-gradient(100deg, #ff7a29 0%, #ff2f45 58%, #e4123a 100%);
  --mint: linear-gradient(100deg, #3ddc84, #45e0d0);

  --maxw: 1340px;
  --pad: clamp(20px, 4vw, 56px);
  --display: "Anton", "Arial Narrow", Impact, sans-serif;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;

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

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  line-height: 1.6;
  background: transparent;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Ambiance */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  background:
    radial-gradient(72vw 56vw at 10% -10%, rgba(200, 16, 48, 0.32), transparent 62%),
    radial-gradient(56vw 50vw at 94% 2%, rgba(255, 47, 69, 0.16), transparent 60%),
    radial-gradient(74vw 60vw at 50% 114%, rgba(120, 8, 26, 0.4), transparent 66%),
    linear-gradient(180deg, #16090d 0%, #0a0608 55%, #0c070a 100%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 4;
  opacity: 0.3;
  pointer-events: none;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
}

a { color: inherit; text-decoration: none; }
img, svg, canvas { display: block; max-width: 100%; }

::selection { background: var(--red); color: #fff; }

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

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------------- Typographie ---------------- */

h1, h2, h3, h4, .display {
  font-family: var(--display);
  font-weight: 400;
  text-transform: uppercase;
  line-height: 0.9;
  letter-spacing: 0.005em;
  margin: 0;
}

h1 { font-size: clamp(46px, 8.4vw, 132px); }
h2 { font-size: clamp(36px, 6vw, 92px); }
h3 { font-size: clamp(20px, 2vw, 26px); }

p { margin: 0 0 1em; }

.grad {
  background: var(--flame);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.grad-mint {
  background: var(--mint);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--red);
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--flame);
}

.lead {
  font-size: clamp(16px, 1.25vw, 19px);
  color: var(--muted);
  max-width: 46ch;
}

/* ---------------- Préloader ---------------- */

#preloader {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  background: #080506;
  transition: opacity 0.7s var(--ease), visibility 0.7s;
}

.is-loaded #preloader {
  opacity: 0;
  visibility: hidden;
}

.pre-inner { display: grid; justify-items: center; gap: 26px; }

.pre-logo {
  width: 108px;
  height: 108px;
  filter: drop-shadow(0 0 30px rgba(255, 47, 69, 0.6));
  animation: prePulse 2.2s ease-in-out infinite;
}

@keyframes prePulse {
  0%, 100% { transform: scale(1); opacity: 0.92; }
  50% { transform: scale(1.06); opacity: 1; }
}

.pre-num {
  font-family: var(--display);
  font-size: 54px;
  letter-spacing: 0.06em;
  color: var(--ink);
}

.pre-word {
  font-size: 11px;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--muted);
}

.pre-bar {
  width: min(260px, 60vw);
  height: 2px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.pre-bar i {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--flame);
  transform-origin: 0 50%;
  animation: preBar 1.6s var(--ease) infinite;
}

@keyframes preBar {
  0% { transform: scaleX(0); }
  60% { transform: scaleX(1); }
  100% { transform: scaleX(1) translateX(100%); }
}

/* Voile de transition entre pages */
#veil {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: #080506;
  transform: scaleY(0);
  transform-origin: 50% 100%;
  pointer-events: none;
  transition: transform 0.6s var(--ease);
}

.leaving #veil {
  transform: scaleY(1);
  transform-origin: 50% 0%;
}

/* ---------------- Curseur ---------------- */

.has-cursor,
.has-cursor a,
.has-cursor button { cursor: none; }

.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 190;
  pointer-events: none;
  border-radius: 50%;
}

/* marges en pixels : un pourcentage se résoudrait sur la largeur du conteneur */
.cursor-dot {
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  background: var(--red);
  transition: opacity 0.2s;
}

.cursor-ring {
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  border: 1px solid rgba(255, 47, 69, 0.6);
  transition: width 0.28s var(--ease), height 0.28s var(--ease),
              margin 0.28s var(--ease), background 0.28s, border-color 0.28s;
}

.cursor-hot .cursor-ring {
  width: 62px;
  height: 62px;
  margin: -31px 0 0 -31px;
  background: rgba(255, 47, 69, 0.14);
  border-color: rgba(255, 47, 69, 0.9);
}

/* ---------------- Navigation ---------------- */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 90;
  transition: transform 0.45s var(--ease), background 0.4s, backdrop-filter 0.4s, border-color 0.4s;
  border-bottom: 1px solid transparent;
}

.nav.shrunk {
  background: rgba(10, 6, 8, 0.72);
  backdrop-filter: blur(18px);
  border-bottom-color: var(--border);
}

.nav.hidden { transform: translateY(-104%); }

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 84px;
  transition: height 0.4s var(--ease);
}

.nav.shrunk .nav-inner { height: 68px; }

.logo { display: inline-flex; align-items: center; gap: 11px; }

.logo img { width: 34px; height: 34px; }

.logo-word {
  font-family: var(--display);
  font-size: 24px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2vw, 30px);
  font-size: 13.5px;
  font-weight: 500;
}

.nav-links > a {
  color: var(--muted);
  position: relative;
  padding: 4px 0;
  transition: color 0.25s;
}

.nav-links > a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: 100% 50%;
  transition: transform 0.4s var(--ease);
}

.nav-links > a:hover { color: var(--ink); }
.nav-links > a:hover::after { transform: scaleX(1); transform-origin: 0 50%; }
.nav-links > a[aria-current="page"] { color: var(--ink); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s var(--ease), box-shadow 0.3s, color 0.3s, border-color 0.3s;
}

.btn-primary {
  background: var(--flame);
  color: #fff;
  box-shadow: 0 14px 40px -14px rgba(255, 47, 69, 0.95);
}

.btn-primary:hover { box-shadow: 0 18px 46px -12px rgba(255, 47, 69, 1); }

.btn-ghost {
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--ink);
}

.btn-ghost:hover { border-color: var(--red); color: var(--red); }

.btn-dark {
  background: #14090c;
  color: #fff;
}

.btn-lg { padding: 18px 34px; font-size: 15px; }

.nav-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  font-size: 17px;
  cursor: pointer;
}

/* Barre de progression */
#progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 100%;
  z-index: 95;
  background: var(--flame);
  transform: scaleX(0);
  transform-origin: 0 50%;
}

/* ---------------- Apparitions ---------------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: calc(var(--delay, 0) * 1ms);
}

[data-reveal].in { opacity: 1; transform: none; }

.split { display: inline; }

/* un mot ne doit jamais se couper entre deux lettres */
.u-w { display: inline-block; white-space: nowrap; }

.u {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  /* marge haute pour les accents (É, À) et basse pour les jambages */
  padding: 0.2em 0.03em 0.1em;
  margin: -0.2em -0.03em -0.1em;
}

.u-in {
  display: inline-block;
  transform: translateY(110%) rotate(4deg);
  opacity: 0;
  transition:
    transform 0.95s var(--ease),
    opacity 0.6s ease;
  transition-delay: calc(var(--i) * 34ms);
}

[data-split].in .u-in { transform: none; opacity: 1; }

[data-split="chars"] .u-in { transition-delay: calc(var(--i) * 22ms); }

/* ---------------- Scène narrative ---------------- */

.story {
  position: relative;
  height: 460vh;
}

.story-inner {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}

#scene-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1.2s var(--ease) 0.2s;
  -webkit-mask-image:
    linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%),
    linear-gradient(180deg, transparent 0, #000 5%, #000 95%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%),
    linear-gradient(180deg, transparent 0, #000 5%, #000 95%, transparent 100%);
  mask-composite: intersect;
}

.is-ready.webgl-ok #scene-canvas { opacity: 1; }

/* Repli si WebGL indisponible */
.scene-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding-top: 60px;
  background: radial-gradient(38% 42% at 62% 48%, rgba(226, 26, 60, 0.28), transparent 70%);
}

.scene-fallback img {
  width: clamp(90px, 14vw, 170px);
  height: auto;
  filter: drop-shadow(0 0 40px rgba(255, 47, 69, 0.6));
  animation: floaty 7s ease-in-out infinite;
}

@keyframes floaty {
  0%, 100% { transform: translateY(-10px); }
  50% { transform: translateY(10px); }
}

.webgl-ok .scene-fallback { display: none; }

/* Voile latéral : garantit la lisibilité du texte par-dessus la scène */
.story-inner::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(94deg,
    rgba(10, 6, 8, 0.94) 0%,
    rgba(10, 6, 8, 0.78) 26%,
    rgba(10, 6, 8, 0.28) 46%,
    transparent 62%);
}

.acts {
  position: relative;
  z-index: 2;
  height: 100%;
}

.act {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad);
  padding-top: 60px;
  opacity: 0;
  transform: translateY(40px);
  pointer-events: none;
  transition: opacity 0.7s var(--ease), transform 0.9s var(--ease);
}

.act.on { opacity: 1; transform: none; pointer-events: auto; }

.act-body { max-width: 52ch; }
.act h1, .act h2 { margin: 18px 0 20px; }

.act-list {
  list-style: none;
  padding: 0;
  margin: 22px 0 0;
  display: grid;
  gap: 10px;
  max-width: 42ch;
}

.act-list li {
  position: relative;
  padding-left: 26px;
  color: var(--muted);
  font-size: 15px;
}

.act-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: var(--flame);
  box-shadow: 0 0 14px rgba(255, 47, 69, 0.7);
}

.act-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 32px;
}

.act-meta {
  display: flex;
  gap: 28px;
  margin-top: 42px;
  flex-wrap: wrap;
  max-width: 58ch;
}

.act-meta b {
  display: block;
  font-family: var(--display);
  font-size: clamp(26px, 2.6vw, 38px);
  line-height: 1;
}

.act-meta span {
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Chapitres */
.chapters {
  position: absolute;
  right: var(--pad);
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  display: grid;
  gap: 18px;
  list-style: none;
  margin: 0;
  padding: 0;
  text-align: right;
}

.chapters li {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.28);
  transition: color 0.4s;
}

.chapters li::after {
  content: "";
  width: 22px;
  height: 2px;
  background: currentColor;
  transition: width 0.5s var(--ease);
}

.chapters li.on { color: var(--red); }
.chapters li.on::after { width: 46px; }

/* Indice de défilement */
.scroll-hint {
  position: absolute;
  right: var(--pad);
  bottom: 28px;
  z-index: 3;
  display: grid;
  justify-items: end;
  gap: 8px;
  opacity: calc(1 - var(--story-p, 0) * 6);
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
  transition: opacity 0.5s;
}

.scroll-hint i {
  width: 1px;
  height: 42px;
  background: linear-gradient(180deg, var(--red), transparent);
  animation: hint 2s ease-in-out infinite;
}

@keyframes hint {
  0% { transform: scaleY(0); transform-origin: 50% 0; }
  50% { transform: scaleY(1); transform-origin: 50% 0; }
  51% { transform: scaleY(1); transform-origin: 50% 100%; }
  100% { transform: scaleY(0); transform-origin: 50% 100%; }
}

/* ---------------- Bandeaux défilants ---------------- */

.marquee {
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: rgba(255, 47, 69, 0.045);
  padding: 18px 0;
  position: relative;
  z-index: 2;
}

.marquee-track {
  display: flex;
  gap: 42px;
  width: max-content;
  will-change: transform;
  font-family: var(--display);
  font-size: clamp(20px, 2.6vw, 34px);
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.24);
  white-space: nowrap;
  align-items: center;
}

.marquee-track .hot { color: var(--red); }
.marquee-track .dot { color: rgba(255, 255, 255, 0.16); font-size: 0.7em; }

.marquee.light {
  background: var(--bone);
  border-color: rgba(18, 8, 10, 0.12);
}
.marquee.light .marquee-track { color: rgba(18, 8, 10, 0.35); }
.marquee.light .marquee-track .hot { color: var(--red-deep); }

/* ---------------- Sections ---------------- */

section { position: relative; z-index: 2; }

.section {
  padding: clamp(90px, 12vh, 160px) 0;
}

.section-head {
  max-width: 900px;
  margin-bottom: clamp(40px, 6vw, 72px);
}

.section-head p { color: var(--muted); font-size: clamp(16px, 1.3vw, 19px); margin-top: 20px; }

.section.light {
  background: var(--bone);
  color: #12080a;
}

.section.light .section-head p,
.section.light .muted { color: rgba(18, 8, 10, 0.62); }

.section.light .eyebrow { color: var(--red-deep); }

/* Piliers */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2vw, 26px);
}

.pillar {
  position: relative;
  padding: clamp(26px, 3vw, 40px);
  border-radius: 26px;
  background: var(--panel);
  border: 1px solid var(--border);
  overflow: hidden;
  backdrop-filter: blur(8px);
  transition: transform 0.4s var(--ease), border-color 0.4s;
  transform-style: preserve-3d;
}

.pillar::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.4s;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%),
              rgba(255, 47, 69, 0.18), transparent 62%);
}

.pillar:hover { border-color: rgba(255, 47, 69, 0.45); }
.pillar:hover::before { opacity: 1; }

.pillar .num {
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: 0.2em;
  color: var(--red);
}

.pillar h3 { margin: 18px 0 12px; }
.pillar p { color: var(--muted); font-size: 15px; margin: 0; }

.pillar .ic {
  width: 30px;
  height: 30px;
  margin-bottom: 22px;
  color: var(--red);
}

.pillar.mint .num, .pillar.mint .ic { color: var(--green); }
.pillar.gold .num, .pillar.gold .ic { color: var(--gold); }

/* Bande de chiffres */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding: clamp(30px, 4vw, 48px) 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.stats div { text-align: center; }

.stats b {
  display: block;
  font-family: var(--display);
  font-size: clamp(34px, 5vw, 68px);
  line-height: 1;
  background: var(--flame);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stats span {
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Duo texte / visuel */
.duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(30px, 5vw, 84px);
  align-items: center;
}

.duo.rev > :first-child { order: 2; }

.checks {
  list-style: none;
  padding: 0;
  margin: 30px 0 0;
  display: grid;
  gap: 14px;
}

.checks li {
  position: relative;
  padding-left: 34px;
  color: var(--muted);
}

.checks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 18px;
  height: 18px;
  border-radius: 6px;
  background: var(--flame);
}

.checks li::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 9px;
  width: 8px;
  height: 4px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg);
}

.checks b { color: var(--ink); }
.section.light .checks li { color: rgba(18, 8, 10, 0.7); }
.section.light .checks b { color: #12080a; }

/* Maquettes */
.mock {
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(36, 25, 29, 0.96), rgba(18, 12, 14, 0.96));
  border: 1px solid var(--border);
  padding: 20px;
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.95);
}

.mock-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.mock-head h4 { font-size: 24px; }

.row {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--border);
  margin-bottom: 10px;
}

.row:last-child { margin-bottom: 0; }
.row .grow { flex: 1; min-width: 0; }
.row b { font-size: 14.5px; display: block; }
.row small { font-size: 11.5px; color: var(--muted); display: block; }

.av {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 15px;
  color: #fff;
  background: var(--flame);
}

.av.on::after {
  content: "";
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--green);
  border: 2px solid #191114;
}

.pill {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 8px;
  white-space: nowrap;
}

.pill.red { background: var(--red); color: #fff; }
.pill.mint { background: rgba(61, 220, 132, 0.14); color: var(--green); border: 1px solid rgba(61, 220, 132, 0.35); }
.pill.gold { background: rgba(245, 185, 60, 0.16); color: var(--gold); border: 1px solid rgba(245, 185, 60, 0.35); }

/* Carte de classement (section claire) */
.ladder {
  border-radius: 26px;
  background: #fff;
  border: 1px solid rgba(18, 8, 10, 0.1);
  padding: 22px;
  box-shadow: 0 40px 80px -50px rgba(18, 8, 10, 0.6);
}

.ladder .row {
  background: rgba(18, 8, 10, 0.035);
  border-color: rgba(18, 8, 10, 0.08);
}

.ladder .row small { color: rgba(18, 8, 10, 0.55); }
.ladder .row b { color: #12080a; }

.ladder .row.me {
  background: rgba(255, 47, 69, 0.1);
  border-color: rgba(255, 47, 69, 0.4);
}

.ladder .rank {
  font-family: var(--display);
  font-size: 26px;
  width: 30px;
  color: rgba(18, 8, 10, 0.4);
}

.ladder .row.me .rank { color: var(--red); }

.elo {
  font-family: var(--display);
  font-size: 20px;
  color: #12080a;
}

.delta { color: #12a05a; font-weight: 800; font-size: 14px; }

/* Rubans de témoignage produit */
.speech {
  display: grid;
  gap: 16px;
}

.bubble {
  padding: 16px 20px;
  border-radius: 20px;
  background: var(--panel);
  border: 1px solid var(--border);
  font-size: 15px;
  max-width: 78%;
}

.bubble small { display: block; color: var(--muted); font-size: 11.5px; margin-bottom: 4px; }
.bubble.me { margin-left: auto; background: rgba(255, 47, 69, 0.14); border-color: rgba(255, 47, 69, 0.35); }

/* ---------------- Appel final ---------------- */

.final {
  position: relative;
  padding: clamp(100px, 16vh, 200px) 0;
  text-align: center;
  overflow: hidden;
}

.final h2 {
  font-size: clamp(52px, 12vw, 190px);
  line-height: 0.86;
}

.final .lead { margin: 26px auto 40px; text-align: center; }

.store {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.store .btn { min-width: 210px; }

/* Barre flottante de téléchargement */
#dock {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 88;
  transform: translate(-50%, 160%);
  transition: transform 0.6s var(--ease);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 10px 10px 22px;
  border-radius: 999px;
  background: rgba(18, 11, 14, 0.86);
  border: 1px solid var(--border);
  backdrop-filter: blur(16px);
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.9);
  max-width: calc(100vw - 32px);
}

#dock.on { transform: translate(-50%, 0); }
#dock p { margin: 0; font-size: 13.5px; }
#dock b { font-family: var(--display); font-size: 17px; letter-spacing: 0.04em; }

/* ---------------- Pied de page ---------------- */

footer {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--border);
  padding: 56px 0 40px;
  color: var(--muted);
  font-size: 14px;
  background: rgba(8, 5, 6, 0.7);
}

.foot-top {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
  align-items: flex-start;
  margin-bottom: 40px;
}

.foot-links { display: flex; gap: 26px; flex-wrap: wrap; }
.foot-links a { transition: color 0.25s; }
.foot-links a:hover { color: var(--ink); }

.foot-bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 12.5px;
}

/* ---------------- Pages de contenu ---------------- */

#ambient-canvas {
  position: fixed;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  opacity: 0.6;
  pointer-events: none;
}

/* voile qui calme la constellation sous les textes longs */
html::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(72% 62% at 50% 42%,
              rgba(10, 6, 8, 0.9) 0%, rgba(10, 6, 8, 0.55) 58%, rgba(10, 6, 8, 0) 100%);
}

.page-head {
  padding: clamp(120px, 18vh, 200px) 0 40px;
  border-bottom: 1px solid var(--border);
  position: relative;
  z-index: 2;
}

.page-head h1 { font-size: clamp(38px, 6.4vw, 92px); margin: 20px 0 16px; }
.page-head .meta { color: var(--muted); font-size: 14px; margin: 0; }

.doc {
  position: relative;
  z-index: 2;
  padding: 54px 0 110px;
  max-width: 880px;
}

.doc h2 { font-size: clamp(24px, 2.6vw, 34px); margin: 54px 0 16px; }
.doc h3 { font-size: 19px; margin: 32px 0 10px; }
.doc p, .doc li { color: #d5cbce; font-size: 16.5px; }
.doc ul { padding-left: 22px; }
.doc li { margin-bottom: 9px; }
.doc a { color: var(--red); text-decoration: underline; text-underline-offset: 3px; }
.doc strong { color: var(--ink); }

.callout {
  margin: 32px 0;
  padding: 22px 26px;
  border-radius: 20px;
  border: 1px solid rgba(255, 47, 69, 0.42);
  background: rgba(255, 47, 69, 0.08);
}

.callout.info {
  border-color: rgba(61, 220, 132, 0.35);
  background: rgba(61, 220, 132, 0.07);
}

.callout p:first-child { margin-top: 0; }
.callout p:last-child { margin-bottom: 0; }

.toc {
  margin: 36px 0;
  padding: 24px 28px;
  border-radius: 20px;
  background: var(--panel);
  border: 1px solid var(--border);
}

.toc strong {
  font-family: var(--display);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 15px;
}

.toc ol { margin: 12px 0 0; padding-left: 20px; }
.toc a { color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--ink); text-decoration: underline; }

/* ---------------- Responsive ---------------- */

@media (max-width: 1024px) {
  .pillars { grid-template-columns: 1fr; }
  .duo { grid-template-columns: 1fr; }
  .duo.rev > :first-child { order: 0; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 30px 20px; }
  .chapters { display: none; }

  .nav-toggle { display: grid; place-items: center; }

  .nav-links {
    position: fixed;
    inset: 0 0 auto;
    top: 0;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 6px;
    height: 100vh;
    height: 100svh;
    padding: 90px var(--pad) 40px;
    background: rgba(8, 5, 6, 0.97);
    backdrop-filter: blur(20px);
    transform: translateY(-100%);
    transition: transform 0.6s var(--ease);
    font-size: 26px;
    font-family: var(--display);
    text-transform: uppercase;
  }

  .nav-links.open { transform: none; }
  .nav-links > a { padding: 12px 0; color: var(--ink); }
  .nav-links .btn { margin-top: 22px; font-family: var(--font); font-size: 15px; }

  .act { padding-top: 0; align-content: end; padding-bottom: 8vh; }
  .act-body { max-width: none; }
  .story-inner::before { background: none; }
  .story-inner::after {
    content: "";
    position: absolute;
    inset: 40% 0 0;
    background: linear-gradient(180deg, transparent, rgba(10, 6, 8, 0.86) 55%, rgba(10, 6, 8, 0.96));
    pointer-events: none;
    z-index: 1;
  }
  .story { height: 420vh; }
}

@media (max-width: 620px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .act-meta { gap: 22px; }
  .bubble { max-width: 92%; }
  #dock { padding: 8px 8px 8px 16px; gap: 10px; }
  #dock p { display: none; }
  .store .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  [data-reveal], .u-in, .act { opacity: 1 !important; transform: none !important; }
  .story { height: auto; }
  .story-inner { position: relative; height: auto; padding: 40px 0 60px; }
  #scene-canvas { position: relative; height: 70vh; }
  .acts { height: auto; display: grid; gap: 60px; padding: 40px 0; }
  .act { position: relative; inset: auto; }
}
