/* ═══════════════════════════════════════════════════════════════════════════
   Site vitrine Kapy Kart.

   Meme charte que l'accueil et le salon du jeu (public/css/kapy-ui.css) :
     · l'encre   — un contour noir epais sur tout ce qui est encadre ;
     · le papier — un creme casse qui porte le texte sombre ;
     · le jaune  — reserve a l'action principale, jamais decoratif.
   Le relief se fait par une ombre dure posee en dessous, jamais par un flou.
   Les titres sont en Barlow Condensed gras italique, comme les bandeaux du
   salon. Un seul motif propre au site : le vibreur rouge et blanc de la piste,
   qui separe l'affiche du contenu et le contenu du pied de page.
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --kk-ink: #16110c;
  --kk-paper: #fffdf7;
  --kk-paper-2: #f6eee0;
  --kk-paper-hot: #ffe9a8;
  --kk-yellow: #ffc31d;
  --kk-yellow-hi: #ffd84a;
  --kk-yellow-lo: #f79a08;
  --kk-orange: #e2660d;
  --kk-link: #a8430a;
  --kk-red: #e63946;
  --kk-green: #2f9e4f;
  --kk-sky: #2f96e4;
  --kk-violet: #7b4bd6;
  --kk-night: #0a1426;
  --kk-text: #241c12;
  --kk-text-soft: #5b4c3a;
  --kk-light: #eaf4ff;
  --kk-display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --kk-body: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  --kk-radius: 16px;
  --kk-radius-s: 12px;
  --kk-lift: 0 4px 0 rgba(22, 17, 12, 0.45);
  --kk-lift-lg: 0 6px 0 rgba(22, 17, 12, 0.55), 0 18px 34px rgba(22, 17, 12, 0.2);
  --header-height: 68px;
  --accent: var(--kk-text-soft);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--kk-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--kk-text);
  background: linear-gradient(180deg, #59b5ee 0%, #9ad6f7 30%, #e3d7bd 62%, #c9b28a 100%) fixed;
}
img { max-width: 100%; height: auto; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; }
a { color: var(--kk-link); text-underline-offset: 3px; }
a:hover { color: var(--kk-ink); }
:focus-visible { outline: 3px solid var(--kk-sky); outline-offset: 3px; border-radius: 4px; }
[id] { scroll-margin-top: calc(var(--header-height) + 20px); }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -80px; z-index: 200;
  padding: 10px 16px; border: 3px solid var(--kk-ink); border-radius: var(--kk-radius-s);
  background: var(--kk-yellow); color: var(--kk-ink); font-weight: 800; text-decoration: none;
}
.skip-link:focus { top: 12px; }

kbd {
  display: inline-grid; place-items: center;
  min-width: 1.7em; height: 1.7em; padding: 0 0.4em; margin: 0 1px;
  border: 2px solid var(--kk-ink); border-radius: 6px;
  background: var(--kk-paper-hot); color: #2b2118;
  font: 700 0.78em/1 var(--kk-body);
  box-shadow: 0 2px 0 var(--kk-ink);
  vertical-align: 0.08em;
}

/* ── Boutons ───────────────────────────────────────────────────────────────
   Le bouton JOUER de l'accueil du jeu, tel quel : c'est la seule piece jaune
   du site. */
.btn-play {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 208px; height: 68px; padding: 0 28px;
  border: 3px solid var(--kk-ink); border-radius: 14px;
  background: linear-gradient(180deg, var(--kk-yellow-hi), var(--kk-yellow) 45%, var(--kk-yellow-lo));
  color: #2b1c00; text-decoration: none; text-transform: uppercase;
  font-family: var(--kk-display); font-size: 1.75rem; font-weight: 900; font-style: italic; letter-spacing: 0.08em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
  box-shadow: 0 6px 0 var(--kk-ink), 0 14px 26px rgba(22, 17, 12, 0.3);
  transition: transform 0.12s, box-shadow 0.18s;
}
.btn-play:hover { color: #2b1c00; transform: translateY(-2px); box-shadow: 0 8px 0 var(--kk-ink), 0 20px 34px rgba(22, 17, 12, 0.34); }
.btn-play:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--kk-ink); }
.btn-play--compact { min-width: 0; height: 44px; padding: 0 20px; font-size: 1.25rem; border-radius: var(--kk-radius-s); box-shadow: 0 4px 0 var(--kk-ink); }
.btn-play--compact:hover { box-shadow: 0 5px 0 var(--kk-ink); transform: translateY(-1px); }

.btn-paper {
  display: inline-flex; align-items: center; justify-content: center;
  height: 68px; padding: 0 24px;
  border: 3px solid var(--kk-ink); border-radius: 14px;
  background: var(--kk-paper); color: #2b2118; text-decoration: none;
  font-weight: 700; font-size: 1.02rem;
  box-shadow: 0 6px 0 rgba(22, 17, 12, 0.55);
  transition: background 0.16s, transform 0.12s;
}
.btn-paper:hover { background: var(--kk-paper-hot); color: #2b2118; transform: translateY(-2px); }

.link-arrow { font-weight: 700; }
.link-arrow::after { content: ''; display: inline-block; width: 0.5em; height: 0.5em; margin-left: 0.45em; border-top: 3px solid currentColor; border-right: 3px solid currentColor; transform: rotate(45deg) translateY(-1px); }

/* ── Vibreur ───────────────────────────────────────────────────────────── */
.curb {
  height: 18px;
  border-block: 4px solid var(--kk-ink);
  background: repeating-linear-gradient(90deg, var(--kk-red) 0 36px, var(--kk-paper) 36px 72px);
}

/* ── En-tete ───────────────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(7, 22, 51, 0.94);
  -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 4px solid var(--kk-ink);
  transition: background 0.35s, border-color 0.35s, box-shadow 0.35s;
}
/* Jauge de lecture sous l'en-tete : le vibreur se deroule avec la page. */
.site-header::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -4px; height: 4px;
  background: repeating-linear-gradient(90deg, var(--kk-red) 0 22px, var(--kk-paper) 22px 44px);
  transform: scaleX(0); transform-origin: left;
}
@supports (animation-timeline: scroll()) {
  .site-header::after { animation: read-progress linear both; animation-timeline: scroll(root); }
  @keyframes read-progress { to { transform: scaleX(1); } }
}
/* Sur l'accueil, l'en-tete flotte au-dessus de la video, et ne prend son fond
   qu'une fois l'affiche depassee (site.js, wireHeader). */
.home .site-header { position: fixed; left: 0; right: 0; }
.has-js .home .site-header:not(.is-solid) {
  background: linear-gradient(180deg, rgba(2, 8, 22, 0.7), rgba(2, 8, 22, 0));
  -webkit-backdrop-filter: none; backdrop-filter: none; border-bottom-color: transparent;
}
.site-header.is-solid { box-shadow: 0 10px 30px rgba(2, 8, 22, 0.35); }
.site-header-inner {
  display: flex; align-items: center; gap: 20px;
  max-width: 1180px; height: var(--header-height); margin: 0 auto; padding: 0 20px;
}
.site-brand { display: block; flex: none; }
.site-brand img { display: block; width: 132px; height: auto; }
.site-nav { margin-left: auto; }
.site-nav ul { display: flex; gap: 4px; list-style: none; }
.site-nav a {
  display: block; padding: 8px 12px; border-radius: 8px;
  color: var(--kk-light); text-decoration: none; text-transform: uppercase;
  font-family: var(--kk-display); font-size: 1.2rem; font-weight: 700; font-style: italic; letter-spacing: 0.05em;
}
.site-nav a { position: relative; }
.site-nav a::after {
  content: ''; position: absolute; left: 12px; right: 12px; bottom: 3px; height: 3px; border-radius: 2px;
  background: var(--kk-yellow); transform: scaleX(0) skewX(-20deg); transform-origin: left; transition: transform 0.3s var(--ease-out, ease);
}
.site-nav a:hover { color: var(--kk-yellow-hi); }
.site-nav a:hover::after { transform: scaleX(1) skewX(-20deg); }
.site-nav a[aria-current='page'] { color: var(--kk-ink); background: var(--kk-yellow); transform: skewX(-8deg); }
.site-nav a[aria-current='page']::after { display: none; }
.site-header :focus-visible { outline-color: var(--kk-yellow-hi); }
.site-menu { display: none; position: relative; }
.site-menu summary {
  display: grid; place-items: center; width: 44px; height: 44px; cursor: pointer; list-style: none;
  border: 3px solid var(--kk-paper); border-radius: var(--kk-radius-s);
}
.site-menu summary::-webkit-details-marker { display: none; }
.site-menu-bars, .site-menu-bars::before, .site-menu-bars::after {
  display: block; width: 20px; height: 3px; border-radius: 2px; background: var(--kk-paper);
}
.site-menu-bars { position: relative; }
.site-menu-bars::before, .site-menu-bars::after { content: ''; position: absolute; left: 0; }
.site-menu-bars::before { top: -7px; }
.site-menu-bars::after { top: 7px; }
/* Ouvert, le bouton montre une croix : il dit qu'il referme. */
.site-menu[open] .site-menu-bars { background: transparent; }
.site-menu[open] .site-menu-bars::before { top: 0; transform: rotate(45deg); }
.site-menu[open] .site-menu-bars::after { top: 0; transform: rotate(-45deg); }
.site-menu[open] summary { background: rgba(255, 250, 240, 0.14); }
.site-menu nav {
  position: absolute; right: 0; top: calc(100% + 14px); width: min(280px, 86vw);
  border: 4px solid var(--kk-ink); border-radius: var(--kk-radius);
  background: var(--kk-paper); box-shadow: var(--kk-lift-lg); overflow: hidden;
}
.site-menu ul { list-style: none; }
.site-menu li + li { border-top: 2px solid var(--kk-paper-2); }
.site-menu a { display: block; padding: 13px 18px; color: var(--kk-ink); font-weight: 700; text-decoration: none; }
.site-menu a:hover, .site-menu a[aria-current='page'] { background: var(--kk-paper-hot); }

/* Selecteur de langue : une liste deroulante, quel que soit le nombre de
   langues. Le globe est un dessin en ligne, comme sur l'accueil du jeu. */
.lang-menu { position: relative; flex: none; }
.lang-menu summary {
  display: flex; align-items: center; gap: 6px; height: 44px; padding: 0 12px; cursor: pointer; list-style: none;
  border: 3px solid var(--kk-paper); border-radius: var(--kk-radius-s);
  color: var(--kk-paper); font-family: var(--kk-display); font-size: 1.15rem; font-weight: 700; letter-spacing: 0.05em;
}
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary:hover, .lang-menu[open] summary { background: rgba(255, 250, 240, 0.14); }
.lang-menu-globe {
  width: 18px; height: 18px; flex: none;
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fffdf7' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cellipse cx='12' cy='12' rx='4' ry='9'/%3E%3Cpath d='M3 12h18'/%3E%3C/svg%3E");
}
.lang-menu ul {
  position: absolute; right: 0; top: calc(100% + 14px); min-width: 170px; list-style: none;
  border: 4px solid var(--kk-ink); border-radius: var(--kk-radius); overflow: hidden;
  background: var(--kk-paper); box-shadow: var(--kk-lift-lg);
}
.lang-menu li + li { border-top: 2px solid var(--kk-paper-2); }
.lang-menu a { display: block; padding: 12px 18px; color: var(--kk-ink); font-weight: 700; text-decoration: none; }
.lang-menu a:hover, .lang-menu a[aria-current] { background: var(--kk-paper-hot); }

/* ── Bandes de l'accueil ───────────────────────────────────────────────── */
.band { padding-block: clamp(52px, 7vw, 96px); }
.band--sky { background: linear-gradient(180deg, #59b5ee 0%, #a5dbf8 100%); }
.band--dust { background: linear-gradient(180deg, #e9dfc8 0%, #cdb891 100%); }
.band--paper { background: var(--kk-paper); }
.band--night { background: var(--kk-night); color: var(--kk-light); }
.band + .band { border-top: 4px solid var(--kk-ink); }

.wrap { width: min(1120px, 100%); margin-inline: auto; padding-inline: 20px; }
.wrap--narrow { width: min(820px, 100%); }
.page-body { padding-block: clamp(28px, 5vw, 56px) clamp(48px, 7vw, 88px); }

.display {
  display: inline-block; margin-bottom: 18px; padding-bottom: 2px;
  border-bottom: 6px solid var(--kk-yellow);
  color: var(--kk-ink); text-transform: uppercase;
  font-family: var(--kk-display); font-size: clamp(2rem, 4vw, 3rem); font-weight: 900; font-style: italic;
  line-height: 1; letter-spacing: 0.03em;
}
.band--night .display { color: var(--kk-yellow-hi); border-bottom-color: var(--kk-paper); }
.lede { max-width: 68ch; font-size: 1.14rem; }
.more { margin-top: 26px; display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.split-text p + p { margin-top: 14px; }

.chapter-list { display: grid; gap: 12px; margin-top: 26px; list-style: none; counter-reset: chapter; }
.chapter-list a {
  counter-increment: chapter;
  display: grid; grid-template-columns: 48px minmax(0, 220px) minmax(0, 1fr); align-items: center; gap: 4px 18px;
  padding: 14px 20px 14px 14px; text-decoration: none; color: var(--kk-text);
  border: 4px solid var(--kk-ink); border-radius: var(--kk-radius);
  background: var(--kk-paper); box-shadow: var(--kk-lift);
  transition: background 0.16s, transform 0.12s;
}
.chapter-list a::before {
  content: counter(chapter); display: grid; place-items: center; width: 48px; height: 48px;
  border-radius: 10px; background: var(--kk-ink); color: var(--kk-yellow-hi);
  font-family: var(--kk-display); font-size: 1.7rem; font-weight: 900; font-style: italic;
}
.chapter-list a:hover { background: var(--kk-paper-hot); transform: translateX(4px); color: var(--kk-text); }
.chapter-list strong { color: var(--kk-ink); font-family: var(--kk-display); font-size: 1.5rem; font-weight: 900; font-style: italic; line-height: 1.05; text-transform: uppercase; letter-spacing: 0.03em; }

.faq { display: grid; gap: 10px; margin-top: 22px; }
.faq-item { border: 3px solid var(--kk-ink); border-radius: var(--kk-radius-s); background: var(--kk-paper); box-shadow: var(--kk-lift); overflow: hidden; }
.band--paper .faq-item { background: var(--kk-paper-2); }
.faq-item summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 18px; cursor: pointer; font-weight: 700; color: var(--kk-ink); list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; flex: none; display: grid; place-items: center; width: 28px; height: 28px; border: 2px solid var(--kk-ink); border-radius: 50%; background: var(--kk-yellow); font-weight: 900; line-height: 1; }
.faq-item[open] summary { background: var(--kk-paper-hot); border-bottom: 3px solid var(--kk-ink); }
.faq-item[open] summary::after { content: '−'; }
.faq-item p { padding: 14px 18px 18px; }
.faq-group + .faq-group { margin-top: 40px; }
.faq-group h2 { display: inline-block; border-bottom: 5px solid var(--kk-yellow); color: var(--kk-ink); font-family: var(--kk-display); font-size: 1.9rem; font-weight: 900; font-style: italic; line-height: 1.05; text-transform: uppercase; letter-spacing: 0.03em; }
.faq-group > p { margin-top: 14px; padding: 18px 20px; border: 3px solid var(--kk-ink); border-radius: var(--kk-radius-s); background: var(--kk-paper); }

/* ── Bandeau de titre des pages interieures ────────────────────────────── */
.page-hero {
  position: relative; isolation: isolate;
  border-bottom: 4px solid var(--kk-ink);
  overflow: hidden;
  background: var(--kk-night) var(--page-shot, url('/site/media/shot-drone.webp')) center 45% / cover no-repeat;
}
/* Voile bleu et lignes de vitesse : la capture du jeu reste un decor. */
.page-hero::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background:
    repeating-linear-gradient(100deg, rgba(255, 255, 255, 0) 0 46px, rgba(255, 255, 255, 0.05) 46px 48px),
    linear-gradient(90deg, rgba(7, 22, 51, 0.94) 0%, rgba(7, 22, 51, 0.78) 55%, rgba(7, 22, 51, 0.45) 100%);
}
@media (prefers-reduced-motion: no-preference) {
  .page-hero { animation: page-shot 14s ease-out both; }
  .page-hero h1 { animation: page-title 0.8s 0.1s cubic-bezier(0.16, 1, 0.3, 1) both; }
  .page-hero-lede, .breadcrumb { animation: page-fade 0.7s 0.35s ease both; }
  @keyframes page-shot { from { background-size: auto 140%; } to { background-size: auto 120%; } }
  @keyframes page-title { from { opacity: 0; clip-path: inset(-20% 100% -20% 0); transform: translateX(-30px) skewX(-8deg); } to { opacity: 1; clip-path: inset(-20% -5% -20% 0); transform: none; } }
  @keyframes page-fade { from { opacity: 0; transform: translateY(10px); } }
}
.page-hero-inner { width: min(1180px, 100%); margin: 0 auto; padding: clamp(28px, 5vw, 56px) 20px clamp(30px, 5vw, 52px); }
.page-hero h1 {
  color: var(--kk-yellow-hi); text-transform: uppercase; text-wrap: balance;
  font-family: var(--kk-display); font-size: clamp(2.4rem, 6.4vw, 4.6rem); font-weight: 900; font-style: italic;
  line-height: 0.94; letter-spacing: 0.02em;
  -webkit-text-stroke: 2px var(--kk-ink); paint-order: stroke fill;
  text-shadow: 4px 5px 0 var(--kk-ink), 0 14px 30px rgba(4, 10, 22, 0.6);
}
.page-hero-lede { max-width: 60ch; margin-top: 12px; color: var(--kk-light); font-size: 1.14rem; font-weight: 600; text-shadow: 0 2px 10px rgba(4, 10, 22, 0.8); }
.breadcrumb { margin-bottom: 14px; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 4px 0; list-style: none; font-size: 0.86rem; font-weight: 700; color: var(--kk-light); }
.breadcrumb li + li::before { content: '/'; margin: 0 9px; opacity: 0.6; }
.breadcrumb a { color: var(--kk-yellow-hi); }
.breadcrumb a:hover { color: #fff; }

/* ── Mise en page du guide ─────────────────────────────────────────────── */
.guide-layout {
  display: grid; grid-template-columns: 264px minmax(0, 1fr); gap: 32px; align-items: start;
  width: min(1180px, 100%); margin-inline: auto; padding: clamp(24px, 4vw, 44px) 20px clamp(48px, 7vw, 88px);
}
.guide-side { position: sticky; top: calc(var(--header-height) + 20px); display: grid; gap: 18px; max-height: calc(100vh - var(--header-height) - 40px); overflow-y: auto; padding: 0 6px 10px 0; }
.guide-toc, .guide-chapters { border: 4px solid var(--kk-ink); border-radius: var(--kk-radius); background: var(--kk-paper); box-shadow: var(--kk-lift); overflow: hidden; }
.guide-side h2 { padding: 8px 14px 7px; background: var(--kk-ink); color: var(--kk-yellow-hi); font-family: var(--kk-display); font-size: 1.12rem; font-weight: 900; font-style: italic; letter-spacing: 0.06em; text-transform: uppercase; }
.guide-side ol { list-style: none; padding: 8px 0; }
.guide-side ol ol { padding: 0 0 4px; }
.guide-side a { display: block; padding: 5px 14px; color: var(--kk-text); font-size: 0.92rem; font-weight: 700; line-height: 1.3; text-decoration: none; border-left: 5px solid transparent; }
.guide-side ol ol a { padding-left: 24px; font-weight: 500; font-size: 0.87rem; color: var(--kk-text-soft); }
.guide-side a:hover { background: var(--kk-paper-hot); color: var(--kk-ink); }
.guide-side a[aria-current='page'], .guide-side a.is-active { border-left-color: var(--kk-yellow-lo); background: var(--kk-paper-hot); color: var(--kk-ink); }

/* ── Texte courant ─────────────────────────────────────────────────────── */
.prose {
  min-width: 0; padding: clamp(20px, 4vw, 46px);
  border: 4px solid var(--kk-ink); border-radius: var(--kk-radius);
  background: var(--kk-paper); box-shadow: var(--kk-lift-lg);
}
.prose > p, .prose > ul, .prose > ol, .prose > dl { max-width: 74ch; }
.prose > * + * { margin-top: 16px; }
.prose > h2 {
  display: table; margin-top: 46px; padding-bottom: 2px; border-bottom: 5px solid var(--kk-yellow);
  color: var(--kk-ink); font-family: var(--kk-display); font-size: clamp(1.7rem, 3.2vw, 2.2rem); font-weight: 900; font-style: italic;
  line-height: 1.05; letter-spacing: 0.03em; text-transform: uppercase;
}
.prose > h2:first-child { margin-top: 0; }
.prose > h3 { margin-top: 30px; color: var(--kk-ink); font-size: 1.24rem; font-weight: 800; line-height: 1.25; }
.prose > ul, .prose > ol { padding-left: 1.4em; }
.prose > ul > li + li, .prose > ol > li + li { margin-top: 8px; }
.prose > ul > li::marker { color: var(--kk-orange); }
.prose > ol > li::marker { font-weight: 800; color: var(--kk-ink); }
.intro { font-size: 1.2rem; font-weight: 600; line-height: 1.5; color: var(--kk-ink); }
.updated { color: var(--kk-text-soft); font-size: 0.9rem; }
.todo { padding: 1px 8px; border: 2px dashed var(--kk-ink); border-radius: 6px; background: var(--kk-paper-hot); font-weight: 700; }

.keyfacts, .combos { display: grid; border-top: 3px solid var(--kk-ink); }
.keyfacts > div, .combos > div { display: grid; grid-template-columns: minmax(120px, 210px) minmax(0, 1fr); gap: 4px 20px; padding: 11px 2px; border-bottom: 2px solid var(--kk-paper-2); }
.keyfacts dt, .combos dt { font-weight: 800; color: var(--kk-ink); }

.tiers { list-style: none; padding-left: 0 !important; display: grid; gap: 8px; }
.tiers li { margin: 0 !important; padding: 10px 14px; border: 3px solid var(--kk-ink); border-left-width: 14px; border-radius: var(--kk-radius-s); background: var(--kk-paper-2); }
.tiers [data-tier='1'] { border-left-color: var(--kk-sky); }
.tiers [data-tier='2'] { border-left-color: var(--kk-yellow-lo); }
.tiers [data-tier='3'] { border-left-color: var(--kk-violet); }

.track { padding: 18px 20px 20px; border: 3px solid var(--kk-ink); border-radius: var(--kk-radius-s); background: var(--kk-paper-2); }
.track h3 { margin-bottom: 8px; color: var(--kk-ink); font-family: var(--kk-display); font-size: 1.7rem; font-weight: 900; font-style: italic; line-height: 1; text-transform: uppercase; letter-spacing: 0.03em; }
.track p { margin-top: 10px; max-width: 72ch; }

.kart-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 8px; list-style: none; padding-left: 0 !important; max-width: none !important; }
.kart-grid li { margin: 0 !important; display: flex; align-items: center; gap: 8px; padding: 8px 12px; border: 3px solid var(--kk-ink); border-radius: var(--kk-radius-s); background: var(--kk-paper-2); font-weight: 700; }
.kart-grid span { font-size: 1.3rem; line-height: 1; }
.color-row { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding-left: 0 !important; }
.color-row li { margin: 0 !important; width: 40px; height: 40px; border: 4px solid var(--kk-ink); border-radius: 50%; background: var(--chip); box-shadow: var(--kk-lift); }

/* ── Tableaux ──────────────────────────────────────────────────────────── */
.table-scroll { overflow-x: auto; border: 3px solid var(--kk-ink); border-radius: var(--kk-radius-s); background: var(--kk-paper); }
table { width: 100%; border-collapse: collapse; font-size: 0.96rem; }
caption { padding: 10px 14px; text-align: left; font-size: 0.88rem; color: var(--kk-text-soft); caption-side: bottom; border-top: 2px solid var(--kk-paper-2); }
thead th { padding: 9px 14px 8px; background: var(--kk-ink); color: var(--kk-yellow-hi); text-align: left; white-space: nowrap; font-family: var(--kk-display); font-size: 1.08rem; font-weight: 900; font-style: italic; letter-spacing: 0.05em; text-transform: uppercase; }
tbody th, tbody td { padding: 9px 14px; text-align: left; vertical-align: top; border-top: 2px solid var(--kk-paper-2); }
tbody th { font-weight: 800; color: var(--kk-ink); white-space: nowrap; }
tbody tr:nth-child(even) { background: #fbf6ea; }
.points-table { max-width: 320px; }
.table-scroll:has(.points-table) { max-width: 320px; }
.drop-table td { white-space: nowrap; font-variant-numeric: tabular-nums; }
.meter { display: inline-block; width: 70px; height: 10px; margin-right: 10px; border: 2px solid var(--kk-ink); border-radius: 999px; background: var(--kk-paper-2); overflow: hidden; vertical-align: -1px; }
.meter i { display: block; height: 100%; width: min(100%, calc(var(--share) * 3.6%)); background: var(--kk-yellow-lo); }
.rarity-dot { display: inline-block; width: 12px; height: 12px; margin-right: 8px; border: 2px solid var(--kk-ink); border-radius: 50%; background: var(--accent); vertical-align: -1px; }
.trap-table td:nth-child(2), .trap-table td:nth-child(3) { white-space: nowrap; }

/* ── Fiches d'objet et de piege ────────────────────────────────────────── */
.fiche { margin-top: 26px; border: 4px solid var(--kk-ink); border-radius: var(--kk-radius); background: var(--kk-paper); box-shadow: var(--kk-lift); overflow: hidden; }
.fiche-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 10px 16px 9px; background: var(--kk-ink); border-left: 14px solid var(--accent); }
.fiche-head h3 { color: var(--kk-yellow-hi); font-family: var(--kk-display); font-size: 1.7rem; font-weight: 900; font-style: italic; line-height: 1; letter-spacing: 0.05em; text-transform: uppercase; }
.fiche-chips { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; }
.fiche-chips li { padding: 2px 10px; border: 2px solid var(--kk-ink); border-radius: 999px; background: var(--kk-paper); color: var(--kk-ink); font-size: 0.78rem; font-weight: 800; line-height: 1.5; }
.fiche-head .fiche-chips li { border-color: var(--kk-paper); }
.fiche-chips [data-tone='good'] { background: var(--kk-green); color: #fff; }
.fiche-chips [data-tone='rarity'] { background: var(--accent); color: #fff; }
.fiche-body { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 8px 24px; padding: 20px; }
.fiche-icon { width: 150px; height: 150px; object-fit: contain; padding: 10px; border: 3px solid var(--kk-ink); border-radius: var(--kk-radius-s); background: radial-gradient(circle at 50% 40%, #fff, var(--kk-paper-2)); }
.fiche-text > * + * { margin-top: 12px; }
.fiche-text p { max-width: 68ch; }
.fiche-pitch { font-size: 1.14rem; font-weight: 700; color: var(--kk-ink); }
.fiche-advice h4 { color: var(--kk-ink); font-size: 1rem; font-weight: 800; }
.fiche-advice h4::before { content: ''; display: inline-block; width: 10px; height: 10px; margin-right: 8px; background: var(--kk-yellow-lo); border: 2px solid var(--kk-ink); transform: rotate(45deg); }
.fiche-advice p { margin-top: 2px; }
.fiche-stats { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; margin-top: 10px; }
.fiche-stats > div { padding: 8px 12px 9px; border: 2px solid var(--kk-ink); border-radius: 10px; background: var(--kk-paper-2); }
.fiche-stats dt { font-size: 0.8rem; font-weight: 700; color: var(--kk-text-soft); }
.fiche-stats dd { font-weight: 800; color: var(--kk-ink); line-height: 1.3; }

.guide-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 48px; }
.guide-pager-link { display: grid; gap: 2px; padding: 14px 18px; text-decoration: none; border: 3px solid var(--kk-ink); border-radius: var(--kk-radius-s); background: var(--kk-paper-2); box-shadow: var(--kk-lift); transition: background 0.16s, transform 0.12s; }
.guide-pager-link:hover { background: var(--kk-paper-hot); transform: translateY(-2px); }
.guide-pager-link span { font-size: 0.84rem; font-weight: 700; color: var(--kk-text-soft); }
.guide-pager-link strong { color: var(--kk-ink); font-family: var(--kk-display); font-size: 1.5rem; font-weight: 900; font-style: italic; line-height: 1.05; text-transform: uppercase; letter-spacing: 0.03em; }
.guide-pager-link--next { text-align: right; }

.prose--wide { width: 100%; }
.prose .chapter-list { max-width: none; padding-left: 0; }
.prose .chapter-list > li + li { margin-top: 0; }

/* ── Publicite ─────────────────────────────────────────────────────────── */
.ad-slot { margin-block: 34px; padding: 10px; border: 2px dashed #cbbd9f; border-radius: var(--kk-radius-s); text-align: center; }
.ad-slot-label { display: block; margin-bottom: 6px; font-size: 0.74rem; color: var(--kk-text-soft); }
.ad-slot ins { display: block; min-height: 120px; }

/* ── Pied de page ──────────────────────────────────────────────────────── */
.site-footer {
  color: var(--kk-light);
  background: radial-gradient(ellipse 60% 80% at 10% 0%, rgba(42, 127, 216, 0.22), transparent 60%), var(--kk-stage-deep, #071633);
}
.site-footer-inner { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 0.7fr); gap: 36px; width: min(1180px, 100%); margin: 0 auto; padding: 48px 20px 30px; }
.site-footer-brand img { display: block; width: 190px; margin-bottom: 12px; }
.site-footer-brand p { max-width: 40ch; margin-bottom: 18px; color: #cfdcea; font-size: 0.96rem; }
.site-footer h2 { margin-bottom: 10px; color: var(--kk-yellow-hi); font-family: var(--kk-display); font-size: 1.3rem; font-weight: 900; font-style: italic; letter-spacing: 0.06em; text-transform: uppercase; }
.site-footer ul { list-style: none; display: grid; gap: 7px; }
.site-footer nav a { color: var(--kk-light); text-decoration: none; font-size: 0.96rem; }
.site-footer nav a:hover { color: var(--kk-yellow-hi); text-decoration: underline; }
.site-footer :focus-visible { outline-color: var(--kk-yellow-hi); }
.site-footer-legal { width: min(1180px, 100%); margin: 0 auto; padding: 16px 20px 26px; border-top: 2px solid rgba(255, 255, 255, 0.1); color: #a9b8c8; font-size: 0.86rem; }

/* ═══════════════════════════════════════════════════════════════════════════
   Accueil grand ecran (site/lib/showcase.js).

   Le trailer donne le ton : titres jaunes en italique cernes d'encre, scenes
   sur le bleu du generateur de circuits, vibreur rouge et blanc. Un seul
   moment orchestre au chargement — les feux de depart, puis le logo — et des
   mouvements qui repondent au defilement ou a la main. Tout s'arrete avec
   `prefers-reduced-motion` ou le bouton « pause » du bandeau.
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --kk-stage: #0b2350;
  --kk-stage-deep: #071633;
  --kk-stage-hi: #2a7fd8;
  --kk-flame: #ff7a1a;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-snap: cubic-bezier(0.2, 0.9, 0.25, 1.25);
}

body.home { background: var(--kk-stage-deep); }
/* Le bandeau incline et les sections en biais depassent un peu des bords :
   rogne sans creer de conteneur de defilement (la scene reste collante). */
.home main { overflow-x: clip; }

/* Titre de section sur fond sombre : le carton de titre du trailer. Le
   soulignement devient un vibreur qui se trace a l'entree dans l'ecran. */
.display--light {
  position: relative; border-bottom: 0; padding-bottom: 14px;
  color: var(--kk-yellow-hi);
  font-size: clamp(2.4rem, 6vw, 4.6rem); line-height: 0.92;
  -webkit-text-stroke: 2px var(--kk-ink); paint-order: stroke fill;
  text-shadow: 4px 5px 0 var(--kk-ink), 0 18px 40px rgba(0, 0, 0, 0.45);
}
.display--light::after {
  content: ''; position: absolute; left: 0; bottom: 0; width: min(100%, 260px); height: 8px;
  border: 2px solid var(--kk-ink); border-radius: 2px;
  background: repeating-linear-gradient(90deg, var(--kk-red) 0 18px, var(--kk-paper) 18px 36px);
  transform-origin: left;
}
.lede--light { color: #d8e6fb; }
.link-arrow--light { color: var(--kk-yellow-hi); }
.link-arrow--light:hover { color: #fff; }

/* ── Hero ──────────────────────────────────────────────────────────────── */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; place-items: end center;
  min-height: max(100svh, 620px);
  padding: calc(var(--header-height) + 40px) 20px clamp(84px, 12vh, 132px);
  background: var(--kk-stage-deep); color: #fff;
}
.hero-media {
  position: absolute; inset: 0; z-index: -3;
  transform: scale(calc(1.06 + var(--hero-p, 0) * 0.14)) translateY(calc(var(--hero-p, 0) * 6%));
  transform-origin: 50% 40%;
}
.hero-still, .hero-video { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; }
.hero-video { opacity: 0; transition: opacity 0.9s ease; }
.hero-video.is-playing { opacity: 1; }
/* Voile : le haut reste lumineux (le ciel du jeu), le bas s'assombrit sous le
   texte, et un bleu froid ramene la video a la charte. */
.hero::before {
  content: ''; position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(ellipse 70% 55% at 50% 78%, rgba(4, 12, 32, 0.82), transparent 72%),
    linear-gradient(180deg, rgba(7, 22, 51, 0.55) 0%, rgba(7, 22, 51, 0) 26%, rgba(7, 22, 51, 0.15) 55%, rgba(7, 22, 51, 0.96) 100%);
}
/* Flash blanc du « Partez ! ». */
.hero::after {
  content: ''; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: radial-gradient(circle at 50% 42%, #fff, rgba(255, 246, 214, 0.75) 40%, rgba(255, 195, 29, 0) 75%);
  opacity: 0;
}
.hero-speedlines {
  position: absolute; inset: -20%;
  background: repeating-conic-gradient(from 0deg at 50% 46%, rgba(255, 255, 255, 0) 0deg 2.6deg, rgba(255, 255, 255, 0.5) 2.6deg 3deg);
  -webkit-mask: radial-gradient(circle at 50% 46%, transparent 0 22%, #000 62%);
  mask: radial-gradient(circle at 50% 46%, transparent 0 22%, #000 62%);
  opacity: 0; mix-blend-mode: overlay;
}
.hero-bars span {
  position: absolute; left: 0; right: 0; z-index: 4; height: 14vh; background: #02060f;
}
.hero-bars span:first-child { top: 0; transform-origin: top; }
.hero-bars span:last-child { bottom: 0; transform-origin: bottom; }

.hero-start {
  position: absolute; inset: 0; z-index: 5; pointer-events: none;
  display: grid; place-items: center; align-content: center; gap: 18px;
  opacity: 0;
}
.hero-lights {
  display: flex; gap: clamp(10px, 2vw, 18px); padding: 14px 18px;
  border: 4px solid var(--kk-ink); border-radius: 22px;
  background: linear-gradient(180deg, #2b2f3a, #12151d);
  box-shadow: 0 8px 0 var(--kk-ink), 0 30px 60px rgba(0, 0, 0, 0.6);
}
.hero-lights i {
  display: block; width: clamp(38px, 6vw, 62px); aspect-ratio: 1; border-radius: 50%;
  border: 3px solid #05070b; background: radial-gradient(circle at 35% 30%, #3a3f4b, #1b1e26 70%);
}
.hero-go {
  position: absolute; top: 50%; left: 50%;
  color: var(--kk-yellow-hi); white-space: nowrap; text-transform: uppercase;
  font-family: var(--kk-display); font-size: clamp(5rem, 22vw, 17rem); font-weight: 900; font-style: italic; line-height: 0.8;
  -webkit-text-stroke: 5px var(--kk-ink); paint-order: stroke fill;
  text-shadow: 10px 12px 0 var(--kk-ink);
  transform: translate(-50%, -50%) scale(0.3); opacity: 0;
}

.hero-content {
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  width: min(820px, 100%); text-align: center;
  opacity: calc(1 - var(--hero-p, 0) * 1.4);
  transform: translateY(calc(var(--hero-p, 0) * -60px));
}
.hero-logo { width: min(500px, 76vw); filter: drop-shadow(0 16px 30px rgba(0, 0, 0, 0.5)); }
.hero h1 {
  max-width: 21ch; margin: 0;
  color: #fff; text-transform: uppercase; text-wrap: balance;
  font-family: var(--kk-display); font-size: clamp(2.1rem, 5.2vw, 3.9rem); font-weight: 900; font-style: italic;
  line-height: 0.96; letter-spacing: 0.01em;
  -webkit-text-stroke: 1.5px var(--kk-ink); paint-order: stroke fill;
  text-shadow: 0 5px 0 var(--kk-ink), 0 12px 30px rgba(4, 10, 22, 0.7);
}
.hero-sub { max-width: 46ch; color: var(--kk-light); font-size: 1.14rem; font-weight: 600; text-shadow: 0 2px 10px rgba(4, 10, 22, 0.9); }
.hero-launch { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 8px; }
.hero-hint { color: rgba(234, 244, 255, 0.85); font-size: 0.86rem; font-weight: 600; text-shadow: 0 2px 8px rgba(4, 10, 22, 0.8); }
.hero-hint--touch { display: none; }
@media (pointer: coarse), (hover: none) {
  .hero-hint--keys { display: none; }
  .hero-hint--touch { display: block; }
}

.btn-trailer {
  display: inline-flex; align-items: center; gap: 12px; height: 68px; padding: 0 26px 0 12px; cursor: pointer;
  border: 3px solid rgba(255, 253, 247, 0.9); border-radius: 14px;
  background: rgba(7, 22, 51, 0.45); color: #fff;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  font: 900 italic 1.5rem/1 var(--kk-display); letter-spacing: 0.06em; text-transform: uppercase;
  box-shadow: 0 6px 0 rgba(2, 6, 15, 0.7);
  transition: transform 0.14s, background 0.2s, border-color 0.2s;
}
.btn-trailer:hover { background: rgba(255, 253, 247, 0.16); border-color: var(--kk-yellow-hi); transform: translateY(-2px); }
.btn-trailer:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(2, 6, 15, 0.7); }
.btn-trailer-icon {
  position: relative; display: grid; place-items: center; width: 44px; height: 44px; flex: none;
  border: 3px solid var(--kk-ink); border-radius: 50%; background: var(--kk-yellow);
}
.btn-trailer-icon::before {
  content: ''; margin-left: 4px;
  border-left: 14px solid var(--kk-ink); border-block: 9px solid transparent;
}
.btn-trailer:focus-visible, .motion-toggle:focus-visible { outline-color: var(--kk-yellow-hi); }

.motion-toggle {
  position: absolute; right: 18px; bottom: 26px; z-index: 6;
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px 0 10px; cursor: pointer;
  border: 2px solid rgba(255, 253, 247, 0.55); border-radius: 999px;
  background: rgba(7, 22, 51, 0.55); color: #fff; font: 700 0.82rem/1 var(--kk-body);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.motion-toggle:hover { border-color: #fff; }
.motion-toggle-icon { position: relative; width: 12px; height: 14px; }
.motion-toggle-icon::before, .motion-toggle-icon::after {
  content: ''; position: absolute; top: 0; width: 4px; height: 14px; border-radius: 1px; background: currentColor;
}
.motion-toggle-icon::before { left: 0; }
.motion-toggle-icon::after { right: 0; }
.motion-toggle[aria-pressed='true'] .motion-toggle-icon::before { width: 0; height: 0; border-left: 12px solid currentColor; border-block: 7px solid transparent; background: none; border-radius: 0; }
.motion-toggle[aria-pressed='true'] .motion-toggle-icon::after { display: none; }
@media (max-width: 560px) { .motion-toggle-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } .motion-toggle { padding: 0 12px; } }

.hero-scroll {
  position: absolute; left: 50%; bottom: 22px; z-index: 6; translate: -50% 0;
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
}
.hero-scroll span, .hero-scroll span::after {
  display: block; width: 14px; height: 14px; border-right: 4px solid #fff; border-bottom: 4px solid #fff; rotate: 45deg;
}
.hero-scroll span { position: relative; margin-top: -10px; }
.hero-scroll span::after { content: ''; position: absolute; left: 4px; top: 4px; opacity: 0.55; }

/* Le vibreur qui defile sous l'affiche, a la vitesse d'un kart. */
.curb--run { position: relative; z-index: 2; background-size: 72px 100%; }

/* ── Sequence de depart ────────────────────────────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
  .hero-bars span { animation: bars-open 0.7s 1s var(--ease-out) both; }
  .hero-start { animation: start-show 1.35s linear both; }
  .hero-lights i:nth-child(1) { animation: light-red 0.9s 0.12s steps(1) both, light-green 0.3s 0.92s steps(1) both; }
  .hero-lights i:nth-child(2) { animation: light-red 0.65s 0.37s steps(1) both, light-green 0.3s 0.92s steps(1) both; }
  .hero-lights i:nth-child(3) { animation: light-red 0.4s 0.62s steps(1) both, light-green 0.3s 0.92s steps(1) both; }
  .hero-lights { animation: lights-out 0.35s 1s ease-in both; }
  .hero-go { animation: go-pop 0.75s 0.9s var(--ease-out) both; }
  .hero::after { animation: flash 0.7s 0.9s ease-out both; }
  .hero-speedlines { animation: boost 1.6s 0.9s ease-out both, speed-flicker 0.12s 0.9s steps(2) 14; }
  .hero-media { animation: media-punch 1.4s 0.9s var(--ease-out) both; }
  .hero-logo { animation: logo-slam 0.75s 1.05s var(--ease-snap) both; }
  .hero h1 { animation: wipe-in 0.7s 1.25s var(--ease-out) both; }
  .hero-sub { animation: rise-in 0.6s 1.45s var(--ease-out) both; }
  .hero-launch { animation: rise-in 0.6s 1.55s var(--ease-out) both; }
  .hero-hint, .motion-toggle, .hero-scroll { animation: fade-in 0.6s 1.8s ease both; }
  .hero-scroll span { animation: nudge 1.6s 2.4s ease-in-out infinite; }
  .curb--run { animation: curb-run 0.9s linear infinite; }

  @keyframes bars-open { to { transform: scaleY(0); } }
  @keyframes start-show { 0% { opacity: 1; } 85% { opacity: 1; } 100% { opacity: 0; } }
  @keyframes light-red { from { background: radial-gradient(circle at 35% 30%, #ffb0a8, #ff2a1f 45%, #9b0e08); box-shadow: 0 0 26px 6px rgba(255, 42, 31, 0.75); } }
  @keyframes light-green { from, to { background: radial-gradient(circle at 35% 30%, #d6ffd0, #3dff52 45%, #109a24); box-shadow: 0 0 34px 10px rgba(61, 255, 82, 0.8); } }
  @keyframes lights-out { to { opacity: 0; transform: translateY(-40px) scale(0.85); } }
  @keyframes go-pop {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.3) rotate(-8deg); }
    35% { opacity: 1; transform: translate(-50%, -50%) scale(1.08) rotate(-4deg); }
    70% { opacity: 1; transform: translate(-50%, -50%) scale(1.14) rotate(-4deg); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(1.9) rotate(-4deg); filter: blur(8px); }
  }
  @keyframes flash { 0% { opacity: 0; } 12% { opacity: 0.85; } 100% { opacity: 0; } }
  @keyframes boost { 0% { opacity: 0; transform: scale(1.4); } 15% { opacity: 0.9; } 100% { opacity: 0; transform: scale(1); } }
  @keyframes speed-flicker { 50% { rotate: 1.4deg; } }
  @keyframes media-punch { from { scale: 1.12; filter: saturate(1.5) brightness(1.15); } }
  @keyframes logo-slam {
    0% { opacity: 0; transform: scale(2.2) rotate(-6deg); filter: blur(14px); }
    60% { opacity: 1; transform: scale(0.94) rotate(1deg); filter: blur(0); }
    100% { opacity: 1; transform: none; }
  }
  @keyframes wipe-in {
    from { opacity: 0; clip-path: inset(-20% 100% -20% 0); transform: translateX(-30px) skewX(-8deg); }
    to { opacity: 1; clip-path: inset(-20% -5% -20% 0); transform: none; }
  }
  @keyframes rise-in { from { opacity: 0; transform: translateY(18px); } }
  @keyframes fade-in { from { opacity: 0; } }
  @keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(8px); } }
  @keyframes curb-run { to { background-position: -72px 0; } }
}

/* ── Bandeau de chiffres ───────────────────────────────────────────────── */
.ticker {
  position: relative; z-index: 3; overflow: hidden;
  margin: -14px -2vw 0; padding: 14px 0 12px;
  border-block: 4px solid var(--kk-ink);
  background: linear-gradient(180deg, var(--kk-yellow-hi), var(--kk-yellow) 60%, var(--kk-yellow-lo));
  rotate: -1.6deg; box-shadow: 0 14px 0 rgba(2, 6, 15, 0.35);
}
.ticker-track { display: flex; width: max-content; }
.ticker-run { display: flex; align-items: center; flex: none; }
.ticker span {
  padding-inline: 28px; color: var(--kk-ink); white-space: nowrap; text-transform: uppercase;
  font-family: var(--kk-display); font-size: clamp(1.8rem, 4.2vw, 3.2rem); font-weight: 900; font-style: italic; line-height: 1;
}
/* Separateur : les chevrons des glissieres du jeu. */
.ticker i { display: flex; gap: 2px; flex: none; }
.ticker i::before, .ticker i::after {
  content: ''; width: 16px; height: 16px; rotate: 45deg;
  border-top: 6px solid var(--kk-red); border-right: 6px solid var(--kk-red);
}
@media (prefers-reduced-motion: no-preference) {
  .ticker-track { animation: ticker 32s linear infinite; }
  @keyframes ticker { to { transform: translateX(-50%); } }
}

/* ── Bandes sombres ────────────────────────────────────────────────────── */
.band--stage, .band--biomes, .band--gallery, .band--trailer, .band--hud, .band--chaos, .band--finale { color: #e6effc; }
.band + .band { border-top: 0; }
.band--stage {
  position: relative; padding-top: clamp(90px, 11vw, 150px);
  background:
    radial-gradient(ellipse 80% 60% at 75% 20%, rgba(42, 127, 216, 0.35), transparent 70%),
    linear-gradient(180deg, var(--kk-stage-deep), var(--kk-stage) 60%, var(--kk-stage-deep));
}

/* Ecran fixe et trois temps qui defilent a cote. */
.stage {
  display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(28px, 5vw, 72px);
  grid-template-areas: 'steps screen'; margin-top: 30px;
}
.stage-sticky { grid-area: screen; position: sticky; top: calc(var(--header-height) + 6vh); align-self: start; }
.stage-steps { grid-area: steps; list-style: none; counter-reset: step; }
.stage-frame {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden;
  border: 5px solid var(--kk-ink); border-radius: 22px; background: #000;
  box-shadow: 0 10px 0 var(--kk-ink), 0 40px 90px rgba(0, 0, 0, 0.55), 0 0 0 10px rgba(255, 255, 255, 0.04);
  transform: perspective(1600px) rotateY(-7deg) rotateX(2deg);
  transition: transform 0.9s var(--ease-out);
}
.stage:hover .stage-frame { transform: perspective(1600px) rotateY(-2deg); }
.stage-screen {
  position: absolute; inset: 0;
  clip-path: inset(0 0 0 100%);
  transition: clip-path 0.8s var(--ease-out);
}
.stage-screen.is-active { clip-path: inset(0); z-index: 1; }
.stage-screen video { width: 100%; height: 100%; object-fit: cover; display: block; transform: scale(1.12); transition: transform 1.6s var(--ease-out); }
.stage-screen.is-active video { transform: none; }
.stage-screen figcaption {
  position: absolute; left: 16px; bottom: 16px;
  padding: 6px 14px 5px; border: 3px solid var(--kk-ink); border-radius: 8px;
  background: var(--kk-ink); color: #fff; transform: skewX(-10deg);
  font: 900 italic 1.1rem/1 var(--kk-display); letter-spacing: 0.06em; text-transform: uppercase;
  box-shadow: 4px 4px 0 var(--kk-yellow);
}
.stage-hud {
  position: absolute; inset: 14px 16px auto; z-index: 2; display: flex; justify-content: space-between; align-items: center;
  color: #fff; font: 900 italic 1.3rem/1 var(--kk-display); text-shadow: 0 2px 0 var(--kk-ink);
}
.stage-hud-rec { width: 14px; height: 14px; border: 2px solid var(--kk-ink); border-radius: 50%; background: var(--kk-red); }
.stage-hud-count b { color: var(--kk-yellow-hi); font-size: 1.8rem; }
.stage-progress { display: flex; gap: 8px; margin-top: 22px; }
.stage-progress i {
  flex: 1; height: 8px; border: 2px solid var(--kk-ink); border-radius: 99px; background: rgba(255, 255, 255, 0.14);
  overflow: hidden; position: relative;
}
.stage-progress i::after { content: ''; position: absolute; inset: 0; background: var(--kk-yellow); transform: scaleX(0); transform-origin: left; transition: transform 0.6s var(--ease-out); }
.stage-progress i.is-active::after, .stage-progress i.is-done::after { transform: none; }

.stage-step {
  counter-increment: step;
  display: flex; flex-direction: column; justify-content: center; min-height: 72vh;
  opacity: 0.32; transition: opacity 0.5s, transform 0.6s var(--ease-out);
  transform: translateX(-12px);
}
.has-js .stage-step.is-active, html:not(.has-js) .stage-step { opacity: 1; transform: none; }
.stage-step:first-child { min-height: 52vh; justify-content: flex-start; padding-top: 6vh; }
.stage-step:last-child { min-height: 60vh; }
.stage-step h3 {
  display: flex; align-items: baseline; gap: 16px; margin-bottom: 14px;
  color: #fff; text-transform: uppercase;
  font-family: var(--kk-display); font-size: clamp(2rem, 3.6vw, 3rem); font-weight: 900; font-style: italic; line-height: 1;
}
.stage-step h3::before {
  content: counter(step); flex: none;
  color: transparent; -webkit-text-stroke: 2px var(--kk-yellow-hi);
  font-size: 1.9em; line-height: 0.8;
}
.stage-step.is-active h3::before { color: var(--kk-yellow); -webkit-text-stroke-color: var(--kk-ink); text-shadow: 3px 4px 0 var(--kk-ink); }
.stage-step p { max-width: 42ch; color: #d4e2f7; font-size: 1.12rem; }
.band--stage .more { margin-top: 10px; }

/* ── Pieges ────────────────────────────────────────────────────────────── */
.band--chaos {
  position: relative; isolation: isolate; overflow: hidden;
  padding-block: clamp(110px, 14vw, 190px);
  background: var(--kk-stage-deep);
  z-index: 1;
  clip-path: polygon(0 5vw, 100% 0, 100% calc(100% - 5vw), 0 100%);
  margin-block: -2vw;
}
.chaos-bg { position: absolute; inset: 0; z-index: -2; }
.chaos-bg video { width: 100%; height: 100%; object-fit: cover; filter: saturate(1.25) contrast(1.05); }
.band--chaos::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(7, 22, 51, 0.96) 0%, rgba(7, 22, 51, 0.82) 42%, rgba(7, 22, 51, 0.25) 75%, rgba(7, 22, 51, 0.5) 100%),
    linear-gradient(180deg, rgba(7, 22, 51, 0.6), transparent 30%, transparent 70%, rgba(7, 22, 51, 0.6));
}
.band--chaos .split-text p:not(.more) { color: #dbe7f8; font-size: 1.1rem; max-width: 52ch; }

.hand { display: flex; justify-content: center; padding: 24px 0 12px; perspective: 1200px; }
.hand > div { width: 33%; max-width: 230px; margin-inline: -2%; transition: transform 0.9s var(--ease-snap), opacity 0.5s; }
.hand > div:nth-child(1) { transform: rotate(-9deg) translateY(18px); }
.hand > div:nth-child(2) { z-index: 1; transform: translateY(-6px); }
.hand > div:nth-child(3) { transform: rotate(9deg) translateY(18px); }
.has-js .hand:not(.is-dealt) > div { opacity: 0; transform: translate(60%, 70%) rotate(30deg) scale(0.7); }
.hand.is-dealt > div:nth-child(2) { transition-delay: 0.12s; }
.hand.is-dealt > div:nth-child(3) { transition-delay: 0.24s; }
.hand-card {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%;
  padding: 0 12px 16px; text-align: center; text-decoration: none; color: var(--kk-text);
  border: 4px solid var(--kk-ink); border-radius: var(--kk-radius);
  background: var(--kk-paper); box-shadow: 0 8px 0 var(--kk-ink), 0 30px 50px rgba(0, 0, 0, 0.45); overflow: hidden;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--lift, 0px));
  transform-style: preserve-3d;
  transition: transform 0.25s var(--ease-out);
}
.hand-card:hover, .hand-card:focus-visible { --lift: -18px; color: var(--kk-text); }
/* Reflet qui suit le pointeur, comme une carte holographique. */
.hand-card::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.25s;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 30%), rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0) 45%),
    linear-gradient(115deg, transparent 30%, rgba(255, 216, 74, 0.25) 45%, rgba(47, 150, 228, 0.2) 55%, transparent 70%);
  mix-blend-mode: soft-light;
}
.hand-card:hover::after { opacity: 1; }
.hand-card-rarity {
  align-self: stretch; margin: 0 -12px 6px; padding: 5px 8px 4px;
  background: var(--accent); color: #fff;
  font-family: var(--kk-display); font-size: 1rem; font-weight: 900; font-style: italic; letter-spacing: 0.06em; text-transform: uppercase;
}
.hand-card img { width: 78%; transition: transform 0.4s var(--ease-snap); }
.hand-card:hover img { transform: translateZ(30px) scale(1.08) rotate(-4deg); }
.hand-card strong { font-family: var(--kk-display); font-size: 1.45rem; font-weight: 900; font-style: italic; line-height: 1; text-transform: uppercase; color: var(--kk-ink); }
.hand-card-pitch { font-size: 0.82rem; line-height: 1.35; color: var(--kk-text-soft); }

[data-rarity='common'] { --accent: #6b5b47; }
[data-rarity='uncommon'] { --accent: var(--kk-green); }
[data-rarity='rare'] { --accent: var(--kk-sky); }
[data-rarity='epic'] { --accent: var(--kk-orange); }
[data-rarity='special'] { --accent: var(--kk-violet); }

/* ── Biomes ────────────────────────────────────────────────────────────── */
.band--biomes {
  padding-top: clamp(100px, 12vw, 160px);
  background: radial-gradient(ellipse 90% 70% at 50% 40%, #3f93e6 0%, #1f63b8 45%, #0d3a7e 100%);
}
.biomes-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px 40px; }
.biomes-head > div:first-child { flex: 1 1 420px; }
.seed { display: grid; justify-items: end; gap: 4px; }
.seed-count {
  color: #fff; font-family: var(--kk-display); font-size: clamp(3.4rem, 7vw, 5.6rem); font-weight: 900; font-style: italic; line-height: 0.85;
  -webkit-text-stroke: 3px var(--kk-ink); paint-order: stroke fill; text-shadow: 5px 6px 0 var(--kk-ink);
  font-variant-numeric: tabular-nums;
}
.seed-label {
  padding: 4px 12px 3px; background: var(--kk-ink); color: var(--kk-yellow-hi); transform: skewX(-10deg);
  font: 900 italic 1.05rem/1 var(--kk-display); letter-spacing: 0.08em; text-transform: uppercase;
}
.btn-reroll {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 12px; height: 50px; padding: 0 18px; cursor: pointer;
  border: 3px solid var(--kk-ink); border-radius: 12px; background: var(--kk-paper); color: var(--kk-ink);
  font: 900 italic 1.2rem/1 var(--kk-display); letter-spacing: 0.05em; text-transform: uppercase;
  box-shadow: 0 5px 0 var(--kk-ink); transition: transform 0.12s, background 0.16s;
}
.btn-reroll:hover { background: var(--kk-paper-hot); transform: translateY(-2px); }
.btn-reroll:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--kk-ink); }
.btn-reroll span {
  width: 22px; height: 22px; border: 4px solid var(--kk-ink); border-right-color: transparent; border-radius: 50%;
  transition: rotate 0.6s var(--ease-out);
}
.btn-reroll.is-spinning span { rotate: 360deg; }

.biome-list { display: flex; gap: 14px; height: clamp(340px, 46vw, 560px); margin-top: 34px; list-style: none; }
.biome { flex: 1 1 0; min-width: 0; transition: flex-grow 0.8s var(--ease-out); }
.biome.is-active { flex-grow: 3.4; }
.biome-pick {
  position: relative; display: block; width: 100%; height: 100%; padding: 0; overflow: hidden; cursor: pointer;
  border: 4px solid var(--kk-ink); border-radius: 20px; background: #0d3a7e;
  box-shadow: 0 8px 0 var(--kk-ink), 0 26px 50px rgba(2, 10, 30, 0.45);
}
.biome-pick video {
  display: block; width: 100%; height: 100%; object-fit: cover;
  filter: saturate(0.75) brightness(0.72);
  transition: filter 0.6s;
}
.biome.is-active .biome-pick video { filter: none; }
.biome-pick:hover video { filter: saturate(1) brightness(0.95); }
.biome-name {
  position: absolute; left: 14px; bottom: 16px;
  padding: 6px 14px 5px; background: var(--kk-ink); color: #fff; transform: skewX(-10deg);
  font: 900 italic clamp(1.3rem, 2.4vw, 2rem)/1 var(--kk-display); letter-spacing: 0.04em; text-transform: uppercase;
  box-shadow: 4px 4px 0 var(--kk-yellow);
  transition: transform 0.5s var(--ease-out);
}
.biome:not(.is-active) .biome-name { left: 50%; bottom: 50%; transform: translate(-50%, 50%) rotate(-90deg) skewX(-10deg); white-space: nowrap; }

/* ── Objets ────────────────────────────────────────────────────────────── */
.band--items {
  position: relative;
  background:
    radial-gradient(circle at 15% 20%, rgba(255, 195, 29, 0.25), transparent 40%),
    var(--kk-paper);
  border-top: 4px solid var(--kk-ink);
}
.item-rail { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 12px; margin-top: 28px; list-style: none; }
.item-rail a {
  display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; padding: 16px 8px 12px;
  border: 3px solid var(--kk-ink); border-radius: var(--kk-radius-s);
  background: var(--kk-paper-2); color: var(--kk-ink); text-align: center; text-decoration: none;
  font-weight: 700; font-size: 0.92rem; line-height: 1.2;
  box-shadow: var(--kk-lift); transition: background 0.16s, transform 0.12s;
}
.item-rail a:hover { background: var(--kk-paper-hot); transform: translateY(-2px); }
.item-rail img { width: 72px; height: 72px; object-fit: contain; }

/* ── Galerie ───────────────────────────────────────────────────────────── */
.band--gallery {
  overflow: hidden; padding-block: clamp(80px, 10vw, 130px);
  background: linear-gradient(180deg, var(--kk-stage-deep), #0a1a3c);
  border-top: 4px solid var(--kk-ink);
}
.reels { display: grid; gap: 18px; margin-top: 36px; }
.reel { display: flex; gap: 18px; width: max-content; padding: 6px 20px 14px; list-style: none; transform: translateX(var(--shift, 0px)); will-change: transform; }
html:not(.has-js) .reels, .reels.is-focused { overflow-x: auto; }
.reels.is-focused .reel { transform: none; }
.shot {
  display: block; width: clamp(260px, 30vw, 460px); aspect-ratio: 16 / 9; padding: 0; overflow: hidden; cursor: zoom-in;
  border: 4px solid var(--kk-ink); border-radius: 16px; background: #000;
  box-shadow: 0 8px 0 var(--kk-ink), 0 24px 40px rgba(0, 0, 0, 0.45);
  transition: transform 0.35s var(--ease-out), border-color 0.2s;
}
.shot img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease-out), filter 0.3s; filter: saturate(0.9); }
.shot:hover, .shot:focus-visible { transform: translateY(-6px) rotate(-1deg); border-color: var(--kk-yellow); }
.shot:hover img { transform: scale(1.08); filter: saturate(1.15); }
.shot:focus-visible { outline-color: var(--kk-yellow-hi); }

/* ── Trailer ───────────────────────────────────────────────────────────── */
.band--trailer {
  padding-block: clamp(80px, 10vw, 130px);
  background:
    radial-gradient(ellipse 60% 50% at 50% 60%, rgba(255, 122, 26, 0.25), transparent 70%),
    #0a1a3c;
}
.band--trailer .wrap { text-align: center; }
.band--trailer .display--light::after { left: 50%; translate: -50% 0; }
.band--trailer .lede { margin-inline: auto; }
.trailer-card {
  position: relative; display: block; width: min(1040px, 100%); aspect-ratio: 16 / 9; margin: 36px auto 0; padding: 0; overflow: hidden; cursor: pointer;
  border: 5px solid var(--kk-ink); border-radius: 26px; background: #000; color: #fff;
  box-shadow: 0 12px 0 var(--kk-ink), 0 50px 100px rgba(0, 0, 0, 0.6), 0 0 120px rgba(255, 122, 26, 0.25);
}
.trailer-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease-out), filter 0.4s; filter: brightness(0.8); }
.trailer-card:hover img, .trailer-card:focus-visible img { transform: scale(1.05); filter: brightness(0.95); }
.trailer-play {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%;
  display: grid; place-items: center; width: clamp(84px, 11vw, 130px); aspect-ratio: 1; border-radius: 50%;
  border: 5px solid var(--kk-ink); background: var(--kk-yellow); box-shadow: 0 8px 0 var(--kk-ink);
  transition: transform 0.3s var(--ease-snap);
}
.trailer-play::before { content: ''; margin-left: 10%; border-left: 34px solid var(--kk-ink); border-block: 22px solid transparent; }
.trailer-play::after { content: ''; position: absolute; inset: -14px; border: 4px solid rgba(255, 216, 74, 0.8); border-radius: 50%; }
.trailer-card:hover .trailer-play { transform: scale(1.1); }
.trailer-label {
  position: absolute; left: 50%; bottom: 8%; translate: -50% 0;
  padding: 6px 16px 5px; background: var(--kk-ink); transform: skewX(-10deg);
  font: 900 italic 1.3rem/1 var(--kk-display); letter-spacing: 0.08em; text-transform: uppercase;
}
.trailer-card:focus-visible { outline: 4px solid var(--kk-yellow-hi); outline-offset: 6px; }
@media (prefers-reduced-motion: no-preference) {
  .trailer-play::after { animation: ring 1.8s ease-out infinite; }
  @keyframes ring { from { transform: scale(0.85); opacity: 1; } to { transform: scale(1.45); opacity: 0; } }
}

/* ── Fiche technique, facon HUD ────────────────────────────────────────── */
.band--hud {
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0 2px, transparent 2px 4px),
    linear-gradient(180deg, #0a1a3c, var(--kk-stage));
  border-top: 4px solid var(--kk-ink);
}
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; margin-top: 30px; }
.facts > div {
  position: relative; padding: 20px 22px 22px;
  border: 3px solid rgba(255, 255, 255, 0.14); border-left: 8px solid var(--kk-yellow); border-radius: 6px 18px 18px 6px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.02));
  transition: border-color 0.2s, transform 0.3s var(--ease-out), background 0.2s;
}
.facts > div:hover { border-color: rgba(255, 216, 74, 0.6); border-left-color: var(--kk-yellow); transform: translateY(-4px); background: linear-gradient(135deg, rgba(255, 216, 74, 0.14), rgba(255, 255, 255, 0.03)); }
.facts dt { margin-bottom: 8px; color: var(--kk-yellow-hi); font-family: var(--kk-display); font-size: 1.5rem; font-weight: 900; font-style: italic; line-height: 1.05; text-transform: uppercase; letter-spacing: 0.02em; }
.facts dd { color: #cfdcf0; font-size: 0.98rem; }

/* ── Depart final ──────────────────────────────────────────────────────── */
.band--finale {
  position: relative; isolation: isolate; overflow: hidden; text-align: center;
  padding-block: clamp(110px, 14vw, 200px);
  background: var(--kk-stage-deep);
}
.finale-bg { position: absolute; inset: 0; z-index: -3; }
.finale-bg video { width: 100%; height: 100%; object-fit: cover; }
.band--finale::before { content: ''; position: absolute; inset: 0; z-index: -2; background: radial-gradient(ellipse 60% 70% at 50% 50%, rgba(7, 22, 51, 0.55), rgba(7, 22, 51, 0.92)); }
/* Drapeau a damier qui ondule derriere l'appel. */
.finale-flag {
  position: absolute; inset: -10% -10%; z-index: -1; opacity: 0.16;
  background: conic-gradient(#fff 25%, #000 0 50%, #fff 0 75%, #000 0) 0 0 / 80px 80px;
  -webkit-mask: radial-gradient(ellipse 50% 45% at 50% 50%, #000, transparent 75%);
  mask: radial-gradient(ellipse 50% 45% at 50% 50%, #000, transparent 75%);
  transform: perspective(900px) rotateX(55deg) translateY(-8%);
}
.band--finale .display--light { font-size: clamp(2.8rem, 8vw, 6rem); }
.band--finale .display--light::after { left: 50%; translate: -50% 0; }
.band--finale p { max-width: 52ch; margin: 6px auto 34px; font-size: 1.18rem; color: #e1ebfa; }
.btn-play--huge { min-width: 280px; height: 84px; font-size: 2.3rem; border-radius: 18px; }
@media (prefers-reduced-motion: no-preference) {
  .finale-flag { animation: flag 6s linear infinite; }
  @keyframes flag { to { background-position: 160px 80px; } }
  .btn-play--huge { animation: glow 2.2s ease-in-out infinite; }
  @keyframes glow { 50% { box-shadow: 0 6px 0 var(--kk-ink), 0 0 60px rgba(255, 195, 29, 0.65); } }
}

/* ── Boites de dialogue ────────────────────────────────────────────────── */
.viewer {
  width: min(1200px, 94vw); max-width: none; padding: 0; overflow: visible;
  border: 4px solid var(--kk-ink); border-radius: 18px; background: #000; color: #fff;
  box-shadow: 0 30px 120px rgba(0, 0, 0, 0.7);
}
.viewer::backdrop { background: rgba(3, 8, 20, 0.86); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.viewer video, .viewer img { display: block; width: 100%; height: auto; max-height: 86vh; object-fit: contain; border-radius: 14px; background: #000; }
.viewer-close {
  position: absolute; right: -14px; top: -14px; z-index: 2; width: 48px; height: 48px; cursor: pointer;
  border: 3px solid var(--kk-ink); border-radius: 50%; background: var(--kk-yellow); box-shadow: 0 4px 0 var(--kk-ink);
}
.viewer-close::before, .viewer-close::after { content: ''; position: absolute; left: 50%; top: 50%; width: 22px; height: 4px; border-radius: 2px; background: var(--kk-ink); translate: -50% -50%; rotate: 45deg; }
.viewer-close::after { rotate: -45deg; }
.viewer-close:focus-visible { outline-color: #fff; }
@media (prefers-reduced-motion: no-preference) {
  .viewer[open] { animation: viewer-in 0.45s var(--ease-out) both; }
  .viewer[open]::backdrop { animation: fade-in 0.3s ease both; }
  @keyframes viewer-in { from { opacity: 0; transform: scale(0.9) translateY(30px); } }
}

/* ── Entrees au defilement ─────────────────────────────────────────────────
   Uniquement la ou le navigateur sait lier une animation au defilement :
   ailleurs, tout est simplement visible. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .home .display--light, .home .band--items .display { animation: title-in linear both; animation-timeline: view(); animation-range: entry 10% cover 30%; }
    .home .display--light::after { animation: draw linear both; animation-timeline: view(); animation-range: entry 20% cover 35%; }
    .facts > div { animation: slide-in linear both; animation-timeline: view(); animation-range: entry 0% entry 80%; }
    .trailer-card { animation: zoom-in linear both; animation-timeline: view(); animation-range: entry 0% cover 40%; }
    .chapter-list li, .home .faq-item { animation: slide-in linear both; animation-timeline: view(); animation-range: entry 0% entry 70%; }
    @keyframes title-in { from { opacity: 0; clip-path: inset(-30% 100% -30% 0); transform: translateX(-40px) skewX(-10deg); } to { opacity: 1; clip-path: inset(-30% -10% -30% 0); transform: none; } }
    @keyframes draw { from { transform: scaleX(0); } }
    @keyframes slide-in { from { opacity: 0; transform: translateX(-50px); } }
    @keyframes zoom-in { from { opacity: 0.2; transform: scale(0.82) rotate(-2deg); } }
  }
}

/* Pause demandee par le visiteur : les animations en boucle s'arretent. */
.motion-off .ticker-track, .motion-off .curb--run,
.motion-off .finale-flag, .motion-off .btn-play--huge, .motion-off .trailer-play::after,
.motion-off .hero-scroll span { animation-play-state: paused !important; }

/* ── Ecrans etroits (accueil) ──────────────────────────────────────────── */
@media (max-width: 900px) {
  .stage { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'screen' 'steps'; }
  .stage-sticky { top: var(--header-height); z-index: 2; padding-block: 10px; background: linear-gradient(180deg, var(--kk-stage) 80%, transparent); }
  .stage-frame, .stage:hover .stage-frame { transform: none; border-radius: 16px; }
  .stage-progress { margin-top: 12px; }
  .stage-step, .stage-step:first-child, .stage-step:last-child { min-height: 46vh; padding-top: 0; justify-content: center; }
  .biome-list { flex-direction: column; height: auto; }
  .biome { flex: none; height: 76px; transition: height 0.7s var(--ease-out); }
  .biome.is-active { height: min(78vw, 440px); }
  .biome:not(.is-active) .biome-name { left: 14px; bottom: 50%; transform: translateY(50%) skewX(-10deg); }
  .seed { justify-items: start; }
}
@media (max-width: 560px) {
  .hero { padding-bottom: 96px; }
  .hero-launch { width: 100%; flex-direction: column; }
  .hero-launch .btn-play, .hero-launch .btn-trailer { width: 100%; justify-content: center; }
  .hand > div { width: 36%; margin-inline: -3%; }
  .hand-card-pitch { display: none; }
  .hand-card strong { font-size: 1.15rem; }
  .ticker span { padding-inline: 18px; }
  .viewer-close { right: 6px; top: -58px; }
}

/* ── Ecrans etroits ────────────────────────────────────────────────────── */
@media (max-width: 960px) {
  .guide-layout { grid-template-columns: minmax(0, 1fr); }
  .guide-side { position: static; max-height: none; overflow: visible; padding: 0; }
  .guide-side ol ol, .guide-chapters { display: none; }
  .split { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 820px) {
  .site-nav { display: none; }
  .site-menu { display: block; }
  .site-header-inner { gap: 12px; }
  .site-header .lang-menu { margin-left: auto; }
  .site-header .lang-menu ~ .btn-play { margin-left: 0; }
  .site-header .btn-play { margin-left: auto; }
  .site-footer-inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .site-footer-brand { grid-column: 1 / -1; }
  .chapter-list a { grid-template-columns: 48px minmax(0, 1fr); }
  .chapter-list a span { grid-column: 2; }
}
@media (max-width: 560px) {
  body { font-size: 1rem; }
  .fiche-body { grid-template-columns: minmax(0, 1fr); padding: 16px; }
  .fiche-icon { width: 120px; height: 120px; margin-inline: auto; }
  .keyfacts > div, .combos > div { grid-template-columns: minmax(0, 1fr); }
  .guide-pager { grid-template-columns: minmax(0, 1fr); }
  .guide-pager-link--next { text-align: left; }
  .hand > div { width: 36%; margin-inline: -3%; }
  .hand-card-pitch { display: none; }
  .hand-card strong { font-size: 1.15rem; }
  .site-footer-inner { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

@media print {
  .site-header, .site-footer, .curb, .guide-side, .guide-pager, .ad-slot, .skip-link { display: none !important; }
  body { background: #fff; }
  .prose, .fiche { box-shadow: none; }
}
