/* ============================================================
   PRODIGE — Direction « Manga / Halftone »
   Encre sur papier, trame de points, lignes de vitesse, ombres
   BD dures, rouge shonen. Monde volontairement clair (page de
   manga). Pilote uniquement le rendu de game.js (contrat DOM
   inchangé). Mobile first.
   ============================================================ */

/* ---------- 1. Jetons ---------- */
:root {
  color-scheme: light;

  --paper:   #f4efe4;
  --paper-2: #ece4d3;
  --paper-3: #e2d8c2;
  --ink:     #14110c;
  --ink-2:   #2c261c;
  --ink-soft:#544c3c;
  --muted:   #7b7360;
  --faint:   #9a9280;
  --hair:    rgba(20,17,12,.16);

  --red:      #e5231b;
  --red-deep: #b3160f;
  --red-soft: #fbe3df;

  /* Système de tons du moteur (bold flats, lisibles) */
  --t-great:   #e5231b;
  --t-good:    #1f8f4d;
  --t-neutral: #4a4a4a;
  --t-bad:     #e08a1e;
  --t-terrible:#b3160f;
  --t-moment:  #2b6cff;

  --bd:   2px solid var(--ink);
  --bd-3: 3px solid var(--ink);
  --sh:    4px 4px 0 var(--ink);
  --sh-sm: 3px 3px 0 var(--ink);
  --sh-lg: 7px 7px 0 var(--ink);
  --sh-red:4px 4px 0 var(--red);

  --r:  10px;
  --r-lg: 16px;

  --f-display: "Anton", "Archivo", system-ui, sans-serif;
  --f-head:    "Archivo", system-ui, sans-serif;
  --f-body:    "Instrument Sans", system-ui, sans-serif;
  --f-mono:    ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --maxw: 640px;
  --gutter: clamp(16px, 4.5vw, 28px);
}

/* ---------- 2. Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 16px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
h1, h2, h3, p { margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }
a { color: inherit; }
::selection { background: var(--red); color: #fff; }

/* ---------- 3. Ambiance manga (couche fixe) ---------- */
.stage { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; background: var(--paper); }
/* Lignes de vitesse depuis le coin haut-droit */
.stage-speed {
  position: absolute; inset: 0;
  background: repeating-conic-gradient(from 0deg at 92% 4%,
    rgba(20,17,12,.05) 0 1.1deg, transparent 1.1deg 7deg);
  -webkit-mask-image: radial-gradient(60% 45% at 92% 4%, #000, transparent 72%);
          mask-image: radial-gradient(60% 45% at 92% 4%, #000, transparent 72%);
}
/* Trame de points partout, très discrète */
.stage-halftone {
  position: absolute; inset: 0;
  background-image: radial-gradient(var(--ink) 1px, transparent 1.3px);
  background-size: 7px 7px;
  opacity: .05;
}
.stage-edge {
  position: absolute; inset: 0;
  background: radial-gradient(120% 100% at 50% 0%, transparent 60%, rgba(20,17,12,.06) 100%);
}

/* ---------- 4. App + écrans ---------- */
.app {
  position: relative; z-index: 1;
  max-width: var(--maxw); margin: 0 auto; min-height: 100dvh;
  padding: clamp(16px,4vw,30px) var(--gutter) calc(env(safe-area-inset-bottom,0px) + 44px);
}
.screen { display: none; }
.screen.active {
  display: flex; flex-direction: column; gap: 18px;
  animation: screen-in .38s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes screen-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- 5. Typo utilitaire ---------- */
.eyebrow {
  font-family: var(--f-mono); font-size: .7rem; font-weight: 600;
  letter-spacing: .2em; text-transform: uppercase; color: var(--red);
  display: inline-flex; align-items: center; gap: 9px;
}
.eyebrow::before { content: ""; width: 20px; height: 3px; background: var(--red); }

/* ---------- 6. Boutons ---------- */
.btn {
  --btn-bg: var(--paper); --btn-fg: var(--ink);
  appearance: none;
  border: var(--bd); background: var(--btn-bg); color: var(--btn-fg);
  font-family: var(--f-head); font-weight: 800; font-style: italic;
  font-size: 1rem; letter-spacing: .01em; text-transform: uppercase;
  padding: 13px 20px; border-radius: var(--r);
  box-shadow: var(--sh-sm);
  transition: transform .1s ease, box-shadow .1s ease, background .15s ease, color .15s ease;
}
.btn:hover { transform: translate(-1px,-1px); box-shadow: var(--sh); }
.btn:active { transform: translate(3px,3px); box-shadow: 0 0 0 var(--ink); }
.btn:focus-visible { outline: none; box-shadow: var(--sh), 0 0 0 3px var(--red); }

.btn-primary { --btn-bg: var(--red); --btn-fg: #fff; }
.btn-primary:hover { --btn-bg: var(--red-deep); }
.btn-secondary { --btn-bg: var(--paper); }
.btn-ghost {
  border: 2px solid transparent; box-shadow: none; background: none;
  color: var(--ink-soft); font-weight: 700;
}
.btn-ghost:hover { color: var(--red); box-shadow: none; transform: none; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }
.btn-ghost:active { transform: none; box-shadow: none; }
.btn.danger { --btn-bg: var(--ink); --btn-fg: var(--paper); }
.btn.danger:hover { --btn-bg: var(--red-deep); --btn-fg: #fff; }

.btn-back {
  align-self: flex-start; background: none; border: none; box-shadow: none;
  color: var(--ink); font-family: var(--f-head); font-weight: 800; font-style: italic;
  text-transform: uppercase; font-size: .84rem; letter-spacing: .04em; padding: 6px 2px;
  transition: color .12s ease, transform .12s ease;
}
.btn-back:hover { color: var(--red); transform: translateX(-3px); }
.btn-back:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; border-radius: 6px; }

/* ---------- 7. ACCUEIL ---------- */
.screen-home { gap: 22px; padding-top: clamp(16px,5vh,52px); align-items: center; }
.home-hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; width: 100%; }

.brand-logo { width: clamp(58px,16vw,82px); height: auto; }
.brand-arc { stroke-dasharray: 130; stroke-dashoffset: 130; animation: draw 1.2s cubic-bezier(.6,.05,.2,1) .2s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

.wordmark {
  font-family: var(--f-display); font-weight: 400;
  font-size: clamp(3.4rem, 17vw, 6rem); line-height: .84;
  letter-spacing: .01em; text-transform: uppercase; color: var(--ink);
  transform: skewX(-7deg);
  text-shadow: var(--sh);
  padding: 2px 0;
}
.wm-accent { color: var(--red); }

.brand-credit { font-family: var(--f-mono); font-size: .72rem; letter-spacing: .03em; color: var(--muted); max-width: 34ch; margin-top: 4px; }
.home-cta { display: flex; flex-direction: column; gap: 10px; width: min(340px,100%); margin-top: 10px; }
.home-cta .btn { padding: 15px 22px; font-size: 1.05rem; }
.home-meta { font-family: var(--f-mono); font-size: .76rem; color: var(--ink-soft); letter-spacing: .02em; }

.reminder {
  width: 100%;
  background: var(--red-soft); border: var(--bd); border-radius: var(--r);
  box-shadow: var(--sh-sm); padding: 11px 15px; font-size: .9rem; color: var(--red-deep); text-align: center;
}
.reminder strong { color: var(--red-deep); }

/* Grille des modes */
.mode-grid { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mode-panel {
  position: relative; text-align: left; background: var(--paper);
  border: var(--bd); border-radius: var(--r-lg); box-shadow: var(--sh-sm);
  padding: 15px; min-height: 138px; display: flex; flex-direction: column; gap: 9px; overflow: hidden;
  transition: transform .12s ease, box-shadow .12s ease;
}
.mode-panel::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(var(--ink) 1px, transparent 1.2px);
  background-size: 7px 7px; opacity: .05; pointer-events: none;
}
.mode-panel > * { position: relative; z-index: 1; } /* le contenu passe au-dessus de la trame */
.mode-panel:hover { transform: translate(-2px,-2px); box-shadow: var(--sh); }
.mode-panel:focus-visible { outline: none; box-shadow: var(--sh), 0 0 0 3px var(--red); }

.hc-head { font-family: var(--f-head); font-weight: 800; font-style: italic; text-transform: uppercase; font-size: 1rem; color: var(--ink); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hc-body { color: var(--ink-soft); font-size: .84rem; line-height: 1.4; flex: 1; display: flex; flex-direction: column; gap: 9px; }
.hc-lines { display: flex; flex-direction: column; gap: 3px; font-size: .82rem; color: var(--ink-2); }
.hc-text { color: var(--ink-soft); font-size: .84rem; }
.hc-cta { margin-top: auto; font-family: var(--f-mono); font-size: .7rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--red); }
.hc-streak { font-family: var(--f-display); color: var(--red); font-size: 1.2rem; transform: skewX(-6deg); }
.daily-brief { display: flex; flex-wrap: wrap; gap: 6px; }
.daily-chip {
  display: inline-flex; align-items: center; gap: 5px; max-width: 100%;
  font-family: var(--f-mono); font-size: .68rem; padding: 3px 8px; border-radius: 6px;
  background: #fff; border: 2px solid var(--ink); color: var(--ink); white-space: nowrap;
}
.daily-chip.done { background: var(--t-good); color: #fff; }
/* Lignes de statut (record / objectif) : pas des chips, des lignes propres */
.daily-best, .story-best {
  display: flex; align-items: center; gap: 7px;
  font-family: var(--f-mono); font-size: .72rem; color: var(--ink-soft); line-height: 1.35;
}
.daily-best::before, .story-best::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); border: 1.5px solid var(--ink); }
.daily-best.done, .story-best.done { color: var(--t-good); font-weight: 600; }
.daily-best.done::before, .story-best.done::before { background: var(--t-good); }

/* Navigation collections */
.home-nav { width: 100%; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.nav-chip {
  display: inline-flex; align-items: center; gap: 7px; background: var(--paper);
  border: var(--bd); box-shadow: var(--sh-sm); color: var(--ink);
  font-family: var(--f-head); font-weight: 800; font-style: italic; text-transform: uppercase;
  font-size: .82rem; padding: 9px 15px; border-radius: 999px;
  transition: transform .1s ease, box-shadow .1s ease, background .15s ease, color .15s ease;
}
.nav-chip:hover { transform: translate(-1px,-1px); box-shadow: var(--sh); background: var(--ink); color: var(--paper); }
.nav-chip:active { transform: translate(3px,3px); box-shadow: 0 0 0; }
.nav-chip:focus-visible { outline: none; box-shadow: var(--sh), 0 0 0 3px var(--red); }
.nav-ico { width: 18px; height: 18px; }

.home-foot { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 6px; }
.foot-sig { font-family: var(--f-head); font-style: italic; font-weight: 700; color: var(--ink-soft); font-size: .9rem; }
.foot-links { display: flex; gap: 6px 14px; flex-wrap: wrap; justify-content: center; }
.foot-link { color: var(--muted); font-family: var(--f-mono); font-size: .72rem; text-decoration: none; border-bottom: 1.5px solid transparent; }
.foot-link:hover { color: var(--red); border-bottom-color: var(--red); }

/* ---------- 8. Création ---------- */
.screen-create { gap: 20px; }
.create-head { display: flex; flex-direction: column; gap: 7px; }
.create-title {
  font-family: var(--f-display); font-weight: 400; text-transform: uppercase;
  font-size: clamp(1.9rem, 8vw, 2.7rem); line-height: .92; letter-spacing: .01em;
  transform: skewX(-6deg); transform-origin: left;
}
.create-sub { color: var(--ink-soft); font-size: .95rem; max-width: 46ch; }

.nationality-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 11px; }
.nat-card {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  background: var(--paper); border: var(--bd); border-radius: var(--r); box-shadow: var(--sh-sm);
  padding: 15px 8px;
  transition: transform .1s ease, box-shadow .1s ease;
}
.nat-card:hover { transform: translate(-2px,-2px); box-shadow: var(--sh); }
.nat-card:active { transform: translate(2px,2px); box-shadow: 0 0 0; }
.nat-card:focus-visible { outline: none; box-shadow: var(--sh), 0 0 0 3px var(--red); }
.nat-flag { font-size: 1.9rem; line-height: 1; }
.nat-flag-img { width: 44px; height: auto; border: 1.5px solid var(--ink); border-radius: 3px; }
.nat-name { font-family: var(--f-head); font-weight: 700; font-size: .88rem; }

.option-list { display: flex; flex-direction: column; gap: 11px; }
.origin-card {
  text-align: left; background: var(--paper); border: var(--bd); border-radius: var(--r);
  box-shadow: var(--sh-sm); padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; position: relative;
  transition: transform .1s ease, box-shadow .1s ease;
}
.origin-card::after {
  content: ""; position: absolute; left: -2px; top: 12px; bottom: 12px; width: 5px; background: transparent;
  transition: background .12s ease;
}
.origin-card:hover { transform: translate(-2px,-2px); box-shadow: var(--sh); }
.origin-card:hover::after { background: var(--red); }
.origin-card:active { transform: translate(2px,2px); box-shadow: 0 0 0; }
.origin-card:focus-visible { outline: none; box-shadow: var(--sh), 0 0 0 3px var(--red); }
.origin-name { font-family: var(--f-head); font-weight: 800; font-style: italic; text-transform: uppercase; font-size: 1.02rem; color: var(--ink); }
.origin-desc { color: var(--ink-soft); font-size: .87rem; line-height: 1.42; }
.origin-stats { font-family: var(--f-mono); font-size: .74rem; color: var(--red-deep); margin-top: 3px; }
.academy-card::after { background: transparent; }

/* ---------- 9. HUD ---------- */
.screen-game { gap: 0; }
.hud {
  position: sticky; top: 0; z-index: 20;
  margin: 0 calc(-1 * var(--gutter));
  padding: 12px var(--gutter) 10px;
  background: var(--paper);
  border-bottom: var(--bd-3);
  display: flex; flex-direction: column; gap: 10px;
}
.hud-row { display: flex; align-items: center; }
.hud-row-top { gap: 11px; }
.hud-pos {
  flex: none; width: 40px; height: 40px; display: grid; place-items: center; font-size: 1.15rem;
  background: var(--paper-2); border: var(--bd); border-radius: 9px;
}
.hud-idblock { display: flex; flex-direction: column; min-width: 0; margin-right: auto; }
.hud-player { font-family: var(--f-head); font-weight: 800; font-style: italic; text-transform: uppercase; font-size: 1.02rem; line-height: 1.05; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hud-age { font-family: var(--f-mono); font-size: .7rem; color: var(--muted); letter-spacing: .03em; }
.hud-club { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; justify-content: flex-end; font-size: .78rem; color: var(--ink-2); text-align: right; max-width: 46%; }
.club-logo { width: 20px; height: 20px; border-radius: 4px; border: 1.5px solid var(--ink); object-fit: cover; }
.flag-mini { display: inline-block; width: 1.35em; height: .9em; vertical-align: -.08em; border-radius: 2px; border: 1px solid var(--ink); object-fit: cover; }

.hud-row-stats { gap: 8px; }
.hud-stat { flex: 1; display: flex; flex-direction: column; gap: 0; background: var(--paper); border: var(--bd); border-radius: 8px; padding: 6px 9px; }
.hud-k { font-family: var(--f-mono); font-size: .54rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.hud-v { font-family: var(--f-display); font-weight: 400; font-size: 1.15rem; color: var(--ink); display: flex; align-items: center; gap: 4px; line-height: 1; margin-top: 2px; }
.hud-rep { font-family: var(--f-body); font-size: .9rem; color: var(--red); letter-spacing: -.04em; }
.ovr-up { color: var(--t-good); font-size: .7rem; }
.ovr-down { color: var(--t-terrible); font-size: .7rem; }

.hud-gauges { display: flex; gap: 11px; }
.gauge { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.gauge-lbl { font-family: var(--f-mono); font-size: .58rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.gauge-track { height: 8px; border-radius: 999px; background: var(--paper-3); border: 1.5px solid var(--ink); overflow: hidden; }
.gauge-fill { height: 100%; width: 50%; transition: width .5s cubic-bezier(.2,.8,.2,1); }
.gauge-form { background: var(--red); }
.gauge-moral { background: var(--t-moment); }

.age-progress { height: 4px; border-radius: 999px; background: var(--paper-3); border: 1.5px solid var(--ink); overflow: hidden; }
.age-progress-fill { height: 100%; width: 0%; background: var(--ink); transition: width .5s ease; }

/* Étiquettes de niveau */
.level-tag {
  display: inline-block; font-family: var(--f-mono); font-size: .56rem; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase; padding: 2px 6px; border-radius: 4px;
  border: 1.5px solid var(--ink); line-height: 1.3; vertical-align: middle; color: #fff;
}
.level-elite    { background: var(--red); }
.level-d1       { background: var(--t-good); }
.level-d2       { background: var(--t-moment); }
.level-regional { background: var(--muted); }
.loan-tag { display: inline-block; font-family: var(--f-mono); font-size: .56rem; text-transform: uppercase; letter-spacing: .05em; padding: 2px 6px; border-radius: 4px; color: var(--ink); border: 1.5px dashed var(--ink); }

/* Profil détaillé */
.profile-toggle {
  margin-top: 10px; display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--paper); border: var(--bd); box-shadow: var(--sh-sm); color: var(--ink);
  font-family: var(--f-head); font-weight: 800; font-style: italic; text-transform: uppercase; font-size: .76rem; letter-spacing: .03em;
  padding: 8px; border-radius: 8px; transition: transform .1s ease, box-shadow .1s ease;
}
.profile-toggle:hover { transform: translate(-1px,-1px); box-shadow: var(--sh); }
.profile-toggle:focus-visible { outline: none; box-shadow: var(--sh), 0 0 0 3px var(--red); }
.profile-toggle-caret { transition: transform .25s ease; }
.hud:has(.profile-panel.open) .profile-toggle-caret { transform: rotate(180deg); }
.profile-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s ease, margin .3s ease, opacity .3s ease; opacity: 0; overflow: hidden; }
.profile-panel.open { grid-template-rows: 1fr; opacity: 1; margin-top: 10px; }
.profile-panel > * { min-height: 0; }

.profile-bars { display: flex; flex-direction: column; gap: 7px; padding-top: 2px; }
.pbar-row { display: grid; grid-template-columns: 82px 1fr 32px; align-items: center; gap: 9px; }
.pbar-label { font-family: var(--f-mono); font-size: .66rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.pbar { height: 9px; border-radius: 999px; background: var(--paper-3); border: 1.5px solid var(--ink); overflow: hidden; }
.pbar-fill { height: 100%; background: var(--ink); transition: width .5s ease; }
.pbar-val { font-family: var(--f-mono); font-size: .82rem; font-weight: 600; text-align: right; color: var(--ink); }
.profile-meta { font-family: var(--f-mono); font-size: .76rem; color: var(--ink-soft); margin-top: 10px; line-height: 1.5; }
.pot-stars { color: var(--red); letter-spacing: .08em; }

.profile-traits, .final-traits { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.trait-chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--f-head); font-weight: 700; font-style: italic; font-size: .76rem;
  padding: 4px 10px; border-radius: 999px; background: var(--ink); color: var(--paper); border: 1.5px solid var(--ink);
}
.trait-none { color: var(--faint); font-size: .8rem; font-style: italic; }

/* ---------- 10. Carte de jeu ---------- */
.game-card {
  --tone: var(--ink);
  position: relative; margin-top: 20px;
  background: var(--paper);
  border: var(--bd-3); border-radius: var(--r-lg);
  box-shadow: var(--sh-lg);
  padding: 20px 18px 18px; overflow: hidden;
}
.game-card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 8px; background: var(--tone);
  border-bottom: 2px solid var(--ink);
}
.game-card::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: repeating-conic-gradient(from 0deg at 88% 0%, rgba(20,17,12,.06) 0 1.1deg, transparent 1.1deg 7deg);
  -webkit-mask-image: radial-gradient(50% 40% at 88% 0%, #000, transparent 70%);
          mask-image: radial-gradient(50% 40% at 88% 0%, #000, transparent 70%);
}
.card-in { animation: card-smash .34s cubic-bezier(.2,.9,.25,1) both; }
@keyframes card-smash { 0% { opacity: 0; transform: translateY(12px) scale(.97) skewX(1.5deg); } 60% { transform: translateY(-2px) scale(1.005); } 100% { opacity: 1; transform: none; } }

.game-card.tone-great    { --tone: var(--t-great); }
.game-card.tone-good     { --tone: var(--t-good); }
.game-card.tone-neutral  { --tone: var(--t-neutral); }
.game-card.tone-bad      { --tone: var(--t-bad); }
.game-card.tone-terrible { --tone: var(--t-terrible); }
.game-card.tone-moment   { --tone: var(--t-moment); }
.game-card.tone-great::after, .game-card.tone-moment::after { opacity: 1; }

.card-tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--f-head); font-weight: 800; font-style: italic; text-transform: uppercase;
  font-size: .72rem; letter-spacing: .04em; color: #fff; background: var(--tone);
  padding: 4px 11px; border: 2px solid var(--ink); border-radius: 6px; box-shadow: var(--sh-sm);
  transform: skewX(-6deg); margin-bottom: 14px;
}
.card-tag > * { transform: skewX(6deg); }
.card-icon { font-size: 2rem; line-height: 1; display: block; margin-bottom: 8px; }
.event-text { font-size: 1.06rem; line-height: 1.5; color: var(--ink); margin-bottom: 16px; }
.event-text strong { color: var(--red-deep); font-weight: 700; }
.result-text { font-size: 1rem; line-height: 1.5; color: var(--ink-2); margin-bottom: 12px; }

.event-options { display: flex; flex-direction: column; gap: 10px; }
.opt-btn {
  position: relative; text-align: left; background: var(--paper);
  border: var(--bd); border-radius: var(--r); box-shadow: var(--sh-sm);
  padding: 13px 15px; font-family: var(--f-body); font-size: .96rem; color: var(--ink); line-height: 1.35;
  transition: transform .1s ease, box-shadow .1s ease, background .12s ease;
}
.opt-btn:hover { transform: translate(-2px,-2px); box-shadow: var(--sh); background: var(--red-soft); }
.opt-btn:active { transform: translate(2px,2px); box-shadow: 0 0 0; }
.opt-btn:focus-visible { outline: none; box-shadow: var(--sh), 0 0 0 3px var(--red); }
.opt-btn.thinking { pointer-events: none; opacity: .5; animation: think 1s ease-in-out infinite; }
@keyframes think { 0%,100% { opacity: .4; } 50% { opacity: .7; } }
.opt-hint {
  display: inline-block; font-family: var(--f-mono); font-size: .62rem; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase; padding: 2px 7px; margin-right: 8px;
  border-radius: 4px; background: var(--red); color: #fff; vertical-align: middle;
}

.fx-chips { display: flex; flex-wrap: wrap; gap: 7px; margin: 4px 0 16px; }
.fx-chip {
  --k: var(--muted);
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--f-mono); font-size: .76rem; font-weight: 600;
  padding: 3px 10px; border-radius: 6px; background: #fff; border: 2px solid var(--ink);
  color: var(--ink); box-shadow: 2px 2px 0 var(--k);
  animation: chip-pop .3s cubic-bezier(.2,.9,.25,1) both;
}
@keyframes chip-pop { 0% { opacity: 0; transform: translateY(6px) scale(.85); } 100% { opacity: 1; transform: none; } }
.fx-good    { --k: var(--t-good); }
.fx-bad     { --k: var(--t-terrible); }
.fx-money   { --k: var(--t-bad); }
.fx-trait   { --k: var(--t-moment); }
.fx-trophy  { --k: var(--red); }
.fx-neutral { --k: var(--muted); }

#btn-next, #btn-wc { margin-top: 6px; width: 100%; }

/* ---------- 11. Récap ---------- */
.recap-headline { font-family: var(--f-head); font-weight: 800; font-style: italic; text-transform: uppercase; font-size: 1.3rem; line-height: 1.08; color: var(--red-deep); margin-bottom: 14px; }
.recap-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 9px; margin-bottom: 16px; }
.recap-cell { background: var(--paper); border: var(--bd); border-radius: var(--r); box-shadow: var(--sh-sm); padding: 11px 6px; text-align: center; }
.recap-num { font-family: var(--f-display); font-weight: 400; font-size: 1.9rem; color: var(--ink); line-height: 1; }
.recap-lbl { font-family: var(--f-mono); font-size: .6rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }
.recap-line { font-size: .94rem; color: var(--ink-2); margin: 6px 0; }
.recap-line strong { color: var(--ink); }
.recap-trophies { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; padding: 12px; border-radius: var(--r); background: var(--red-soft); border: var(--bd); box-shadow: var(--sh-sm); color: var(--red-deep); font-weight: 700; font-size: .92rem; }
.recap-objective { font-size: .9rem; color: var(--t-good); font-weight: 600; margin: 6px 0; }
.recap-bonus { font-size: .9rem; color: var(--red-deep); font-weight: 600; margin: 6px 0; }
.recap-warn { font-size: .9rem; color: var(--t-bad); font-weight: 600; margin: 6px 0; }
.recap-money { font-family: var(--f-mono); font-size: .92rem; color: var(--t-good); margin: 6px 0; }
.recap-micro { font-size: .88rem; color: var(--muted); font-style: italic; margin: 10px 0 6px; }
.recap-news { font-size: .88rem; color: var(--ink-2); border-left: 3px solid var(--ink); padding-left: 12px; margin-top: 12px; }

/* ---------- 12. Coupe du Monde ---------- */
.wc-stage { font-family: var(--f-head); font-weight: 800; font-style: italic; text-transform: uppercase; font-size: 1.1rem; color: var(--t-moment); margin-bottom: 8px; }
.wc-champion { font-family: var(--f-display); font-size: 1.7rem; color: var(--red-deep); text-align: center; margin: 10px 0; transform: skewX(-6deg); text-transform: uppercase; }
.wc-golden { text-align: center; color: var(--red); font-weight: 700; margin: 6px 0; }
.wc-stats { font-family: var(--f-mono); font-size: .86rem; color: var(--ink-2); text-align: center; }

/* ---------- 13. Duel ---------- */
.screen-duel { padding-top: 6vh; }
.duel-body { background: var(--paper); border: var(--bd-3); border-radius: var(--r-lg); box-shadow: var(--sh-lg); padding: 24px 20px; display: flex; flex-direction: column; gap: 12px; }
.duel-intro-line, .duel-result-title { font-family: var(--f-display); font-size: 1.6rem; color: var(--red-deep); line-height: 1; text-transform: uppercase; transform: skewX(-6deg); transform-origin: left; }
.duel-intro-sub { color: var(--ink-2); font-size: .95rem; }
.duel-intro-hint { color: var(--muted); font-size: .85rem; font-style: italic; }
.duel-body .btn { margin-top: 6px; }

.rival-block { margin-top: 8px; }
.rival-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.rival-col { background: var(--paper); border: var(--bd); border-radius: var(--r); box-shadow: var(--sh-sm); padding: 13px; text-align: center; }
.rival-col-name { font-family: var(--f-head); font-weight: 800; font-style: italic; font-size: .92rem; margin-bottom: 4px; }
.rival-col-tier { font-family: var(--f-mono); font-size: .7rem; color: var(--red); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 8px; }
.rival-col-stats { font-family: var(--f-mono); font-size: .82rem; color: var(--ink-2); line-height: 1.7; }
.rival-verdict { text-align: center; margin-top: 12px; font-family: var(--f-head); font-weight: 800; font-style: italic; text-transform: uppercase; font-size: 1.05rem; color: var(--ink); }

.legend-wrap { position: relative; }
.legend-line { color: var(--red-deep); font-style: italic; font-size: .9rem; margin: 8px 0; }
.legend-moments { color: var(--ink-2); font-size: .88rem; line-height: 1.6; }
.legend-reveal { margin-top: 12px; padding: 14px; border-radius: var(--r); background: var(--red-soft); border: var(--bd); box-shadow: var(--sh-sm); color: var(--red-deep); font-size: .95rem; line-height: 1.5; }

/* ---------- 14. Écran final : carte joueur ---------- */
.screen-final { position: relative; gap: 16px; padding-top: 22px; }
.confetti-layer { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 5; }
.confetti-piece { position: absolute; top: -12px; width: 9px; height: 13px; border: 1px solid var(--ink); opacity: .95; animation: confetti-fall 3.1s linear forwards; }
@keyframes confetti-fall { 0% { transform: translateY(-20px) rotate(0); opacity: 1; } 100% { transform: translateY(105vh) rotate(680deg); opacity: 0; } }

.player-card {
  --tier: var(--ink);
  position: relative; background: var(--paper);
  border: var(--bd-3); border-radius: var(--r-lg);
  box-shadow: var(--sh-lg); padding: 22px 18px 20px; overflow: hidden; z-index: 1;
}
.player-card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-conic-gradient(from 0deg at 50% -6%, rgba(20,17,12,.05) 0 1deg, transparent 1deg 6.5deg);
  -webkit-mask-image: radial-gradient(70% 46% at 50% -2%, #000, transparent 72%);
          mask-image: radial-gradient(70% 46% at 50% -2%, #000, transparent 72%);
}
.player-card::after {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 10px; background: var(--tier); border-bottom: 2px solid var(--ink);
}
.player-card.tier-icone   { --tier: var(--t-moment); }
.player-card.tier-legende { --tier: var(--red); }
.player-card.tier-or      { --tier: var(--t-bad); }
.player-card.tier-argent  { --tier: var(--muted); }
.player-card.tier-bronze  { --tier: #a9713f; }

.pc-ribbon { display: flex; justify-content: center; margin-bottom: 14px; margin-top: 4px; }
.final-tier { font-family: var(--f-head); font-weight: 800; font-style: italic; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; padding: 5px 16px; border-radius: 999px; color: #fff; background: var(--tier); border: 2px solid var(--ink); box-shadow: var(--sh-sm); }
.pc-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 12px; position: relative; z-index: 1; }
.pc-rating { display: flex; flex-direction: column; }
.final-ovr { font-family: var(--f-display); font-size: clamp(3.6rem,17vw,5.2rem); line-height: .8; color: var(--ink); transform: skewX(-7deg); transform-origin: left; }
.pc-rating-lbl { font-family: var(--f-mono); font-size: .6rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-top: 8px; }
.pc-posbox { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.final-flag-img { width: 54px; border: 2px solid var(--ink); border-radius: 4px; }
.final-pos { font-family: var(--f-display); font-size: 1rem; padding: 4px 12px; border-radius: 7px; background: var(--ink); border: 2px solid var(--ink); color: var(--paper); }
.final-name { font-family: var(--f-display); font-size: clamp(1.8rem,9vw,2.6rem); line-height: .9; text-transform: uppercase; text-align: center; margin-bottom: 6px; transform: skewX(-5deg); position: relative; z-index: 1; }
.final-nickname { text-align: center; color: var(--red-deep); font-style: italic; font-weight: 700; font-size: 1rem; margin-bottom: 4px; }
.final-title { text-align: center; font-family: var(--f-head); font-weight: 800; font-style: italic; text-transform: uppercase; color: var(--ink); font-size: 1.05rem; margin: 8px 0; }
.final-age, .final-club, .final-trajectory, .final-percentile { text-align: center; font-size: .88rem; color: var(--ink-soft); margin: 3px 0; }
.final-club { color: var(--ink-2); }
.final-percentile { color: var(--red); font-family: var(--f-mono); font-size: .82rem; }

.pc-section { margin-top: 20px; position: relative; z-index: 1; }
.pc-section-label { font-family: var(--f-mono); font-size: .64rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding-bottom: 6px; margin-bottom: 8px; border-bottom: var(--bd); }
.final-stats { display: flex; flex-direction: column; }
.stat-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 2px; border-bottom: 1.5px dashed var(--hair); }
.stat-row:last-child { border-bottom: none; }
.stat-label { color: var(--ink-soft); font-size: .9rem; }
.stat-value { font-family: var(--f-mono); font-weight: 600; color: var(--ink); font-size: .95rem; }
.stat-row.trophy-earned .stat-value { color: var(--red-deep); }
.final-trophies { display: flex; flex-direction: column; }
.final-awards { display: flex; flex-direction: column; }

.final-path { display: flex; flex-direction: column; gap: 7px; }
.path-step { display: grid; grid-template-columns: 46px 1fr auto; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 8px; background: var(--paper); border: var(--bd); box-shadow: var(--sh-sm); }
.path-age { font-family: var(--f-mono); font-weight: 700; font-size: .8rem; color: var(--red); }
.path-club { font-family: var(--f-head); font-weight: 700; font-size: .92rem; color: var(--ink); }
.path-country { font-size: .84rem; }

.seasons-toggle { margin-top: 16px; width: 100%; }
.final-seasons { margin-top: 12px; display: flex; flex-direction: column; gap: 5px; }
.season-row { display: grid; grid-template-columns: 36px 1fr auto auto; align-items: center; gap: 8px; padding: 7px 9px; border-radius: 8px; font-size: .82rem; background: var(--paper); border: 1.5px solid var(--ink); }
.season-age { font-family: var(--f-mono); color: var(--muted); font-size: .78rem; }
.season-club { font-weight: 700; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.season-stats { font-family: var(--f-mono); font-size: .76rem; color: var(--muted); }
.season-icons { font-size: .82rem; }
.season-up { color: var(--t-good); }
.season-down { color: var(--t-terrible); }

.final-story { margin-top: 20px; padding: 16px 18px; border-radius: var(--r); background: #fff; border: var(--bd); box-shadow: var(--sh-sm); border-left: 5px solid var(--red); font-size: .95rem; line-height: 1.6; color: var(--ink-2); font-style: italic; }
.final-untaken { margin-top: 12px; font-size: .88rem; color: var(--muted); font-style: italic; text-align: center; }
.final-note { margin-top: 10px; text-align: center; font-size: .88rem; color: var(--t-good); font-weight: 600; }
#final-badge-note { color: var(--red-deep); }
#final-jeton-note { color: var(--t-bad); font-family: var(--f-mono); }
#final-legend-note { color: var(--t-moment); }

.final-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; position: relative; z-index: 1; }
.final-actions .btn-primary { grid-column: 1 / -1; }

/* ---------- 15. Écrans collection ---------- */
.screen-collection { gap: 18px; }
.coll-head { display: flex; flex-direction: column; gap: 5px; }
.coll-title { font-family: var(--f-display); font-size: clamp(2rem,9vw,2.8rem); line-height: .9; text-transform: uppercase; transform: skewX(-6deg); transform-origin: left; }
.coll-meta { font-family: var(--f-mono); font-size: .78rem; color: var(--ink-soft); letter-spacing: .01em; }

/* ---------- 16. Badges ---------- */
.badge-grid { display: flex; flex-direction: column; gap: 20px; }
.badge-progress { height: 10px; border-radius: 999px; background: var(--paper-3); border: var(--bd); overflow: hidden; margin-bottom: 3px; }
.badge-progress-fill { height: 100%; background: var(--red); transition: width .5s ease; }
.badge-progress-label { font-family: var(--f-mono); font-size: .74rem; color: var(--muted); margin-bottom: 8px; }
.badge-cat-header { display: flex; align-items: center; justify-content: space-between; font-family: var(--f-head); font-weight: 800; font-style: italic; text-transform: uppercase; font-size: 1rem; color: var(--ink); margin-bottom: 10px; }
.badge-cat-count { font-family: var(--f-mono); font-size: .74rem; color: var(--red); }
.badge-cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(94px,1fr)); gap: 10px; }
.badge-item { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 5px; padding: 13px 8px; border-radius: var(--r); background: var(--paper); border: var(--bd); box-shadow: var(--sh-sm); transition: transform .1s ease, box-shadow .1s ease; }
.badge-item.unlocked { background: var(--red-soft); }
.badge-item.unlocked:hover { transform: translate(-2px,-2px); box-shadow: var(--sh); }
.badge-item.locked { opacity: .5; filter: grayscale(1); box-shadow: none; }
.badge-item.badge-platine { background: #e7efff; border-color: var(--t-moment); box-shadow: var(--sh); }
.badge-icon { font-size: 1.9rem; line-height: 1; }
.badge-name { font-family: var(--f-head); font-weight: 700; font-size: .78rem; color: var(--ink); line-height: 1.2; }
.badge-hint { font-size: .7rem; color: var(--muted); line-height: 1.3; }
.badge-context { font-family: var(--f-mono); font-size: .64rem; color: var(--red); }

/* ---------- 17. Boutique ---------- */
.shop-balance { color: var(--red-deep) !important; font-family: var(--f-mono); font-weight: 600; }
.shop-balance span { color: var(--red); font-weight: 700; }
.shop-list { display: flex; flex-direction: column; gap: 11px; }
.perk-card { display: grid; grid-template-columns: auto 1fr auto; gap: 13px; align-items: center; padding: 14px 15px; border-radius: var(--r); background: var(--paper); border: var(--bd); box-shadow: var(--sh-sm); }
.perk-card.perk-equipped-card { background: #eafaf0; border-color: var(--t-good); }
.perk-icon { font-size: 1.8rem; }
.perk-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.perk-name { font-family: var(--f-head); font-weight: 800; font-style: italic; text-transform: uppercase; font-size: 1rem; color: var(--ink); }
.perk-desc { font-size: .84rem; color: var(--ink-soft); line-height: 1.4; }
.perk-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.perk-cost { font-family: var(--f-mono); font-size: .82rem; color: var(--red); white-space: nowrap; }
.perk-btn { background: var(--paper); border: var(--bd); box-shadow: var(--sh-sm); color: var(--ink); font-family: var(--f-head); font-weight: 700; font-style: italic; text-transform: uppercase; font-size: .78rem; padding: 7px 13px; border-radius: 8px; white-space: nowrap; transition: transform .1s ease, box-shadow .1s ease; }
.perk-btn:hover { transform: translate(-1px,-1px); box-shadow: var(--sh); }
.perk-btn:active { transform: translate(2px,2px); box-shadow: 0 0 0; }
.perk-btn:focus-visible { outline: none; box-shadow: var(--sh), 0 0 0 3px var(--red); }
.perk-equip { background: var(--t-good); color: #fff; }
.perk-equip.on { background: var(--t-good); color: #fff; }

/* ---------- 18. Panthéon ---------- */
.pantheon-list { display: flex; flex-direction: column; gap: 11px; }
.pantheon-empty { text-align: center; color: var(--muted); font-style: italic; padding: 30px 10px; }
.pantheon-card { padding: 14px 16px; border-radius: var(--r); background: var(--paper); border: var(--bd); box-shadow: var(--sh-sm); border-left: 5px solid var(--red); display: flex; flex-direction: column; gap: 4px; }
.pantheon-name { font-family: var(--f-head); font-weight: 800; font-style: italic; text-transform: uppercase; font-size: 1.05rem; color: var(--ink); }
.pantheon-title { font-size: .86rem; color: var(--red-deep); }
.pantheon-trophies { font-family: var(--f-mono); font-size: .8rem; color: var(--muted); }

/* ---------- 19. Mode Histoire ---------- */
.story-list { display: flex; flex-direction: column; gap: 13px; }
.story-card { position: relative; padding: 17px; border-radius: var(--r-lg); background: var(--paper); border: var(--bd-3); box-shadow: var(--sh); display: flex; flex-direction: column; gap: 8px; overflow: hidden; }
.story-card::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(var(--ink) 1px, transparent 1.2px); background-size: 7px 7px; opacity: .05; pointer-events: none; }
.story-card.locked { opacity: .62; }
.story-head { display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; }
.story-icon { font-size: 2rem; }
.story-id { font-family: var(--f-display); font-size: 1.2rem; color: var(--ink); text-transform: uppercase; transform: skewX(-5deg); }
.story-alias { font-family: var(--f-mono); font-size: .74rem; color: var(--red); letter-spacing: .03em; }
.story-era { font-family: var(--f-mono); font-size: .72rem; color: var(--muted); }
.story-teaser { font-size: .9rem; color: var(--ink-2); line-height: 1.5; position: relative; z-index: 1; }
.story-goal { font-size: .85rem; color: var(--t-good); font-weight: 600; }
.story-record { font-family: var(--f-mono); font-size: .78rem; color: var(--muted); }
.story-cost { font-family: var(--f-mono); font-size: .8rem; color: var(--red); }
.story-free { font-family: var(--f-mono); font-size: .8rem; color: var(--t-good); }
.story-play { margin-top: 6px; }
.story-play.btn { width: 100%; }

/* ---------- 20. Quêtes ---------- */
.quest-hero { background: var(--paper); border: var(--bd-3); border-radius: var(--r-lg); box-shadow: var(--sh); padding: 18px; display: flex; flex-direction: column; gap: 16px; }
.streak-flame { display: flex; align-items: center; gap: 14px; }
.sf-emoji { font-size: 2.6rem; line-height: 1; filter: grayscale(1) opacity(.5); transition: filter .3s ease; }
.streak-flame.streak-alive .sf-emoji { filter: none; animation: flame 1.6s ease-in-out infinite; }
@keyframes flame { 0%,100% { transform: scale(1) rotate(-3deg); } 50% { transform: scale(1.12) rotate(3deg); } }
.sf-num { font-family: var(--f-display); font-size: 2.6rem; color: var(--red); line-height: 1; transform: skewX(-6deg); }
.sf-unit { font-family: var(--f-mono); font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.streak-dots { display: flex; gap: 6px; flex-wrap: wrap; }
.streak-dot { width: 13px; height: 13px; border-radius: 50%; background: var(--paper-3); border: 2px solid var(--ink); }
.streak-dot.on { background: var(--red); }
.streak-cycle-note, .streak-next { font-family: var(--f-mono); font-size: .74rem; color: var(--muted); }
.streak-next { color: var(--red); }
.quest-hero-stats { display: flex; gap: 10px; }
.qh-stat { flex: 1; text-align: center; background: var(--paper); border: var(--bd); border-radius: 8px; box-shadow: var(--sh-sm); padding: 10px 6px; }
.qh-val { font-family: var(--f-display); font-size: 1.5rem; color: var(--ink); display: block; line-height: 1; }
.qh-lbl { font-family: var(--f-mono); font-size: .6rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

.quest-screen-body { display: flex; flex-direction: column; gap: 11px; }
.quest-section-label { font-family: var(--f-head); font-weight: 800; font-style: italic; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: var(--red-deep); margin-top: 10px; }
.quest-hint-note { font-size: .82rem; color: var(--faint); font-style: italic; }
.quest-card { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 13px 15px; border-radius: var(--r); background: var(--paper); border: var(--bd); box-shadow: var(--sh-sm); }
.quest-card.quest-card-done { background: #eafaf0; border-color: var(--t-good); }
.qc-icon { font-size: 1.5rem; }
.qc-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.qc-name { font-family: var(--f-head); font-weight: 800; font-style: italic; font-size: .95rem; color: var(--ink); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.qc-desc { font-size: .82rem; color: var(--ink-soft); line-height: 1.4; }
.qc-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.qc-check { font-size: 1.2rem; color: var(--t-good); }
.qc-pts { font-family: var(--f-mono); font-size: .8rem; color: var(--red); white-space: nowrap; }
.qc-tier { font-family: var(--f-mono); font-size: .56rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 2px 7px; border-radius: 4px; border: 1.5px solid var(--ink); color: #fff; }
.qc-tier-easy { background: var(--t-good); }
.qc-tier-med  { background: var(--t-bad); }
.qc-tier-hard { background: var(--t-terrible); }
.retention-row { display: grid; grid-template-columns: 90px 1fr auto; gap: 10px; align-items: center; padding: 6px 0; }
.retention-row.retention-done .retention-label { color: var(--t-good); }
.retention-label { font-family: var(--f-mono); font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.retention-bar { height: 8px; border-radius: 999px; background: var(--paper-3); border: 1.5px solid var(--ink); overflow: hidden; }
.retention-fill { height: 100%; background: var(--red); transition: width .5s ease; }
.retention-val { font-family: var(--f-mono); font-size: .76rem; color: var(--ink-2); }

/* ---------- 21. Modale + consentement ---------- */
.modal-overlay { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px; background: rgba(20,17,12,.5); animation: fade-in .18s ease both; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.modal { width: min(400px,100%); background: var(--paper); border: var(--bd-3); border-radius: var(--r-lg); padding: 24px 22px 20px; text-align: center; box-shadow: var(--sh-lg); animation: modal-pop .26s cubic-bezier(.2,.9,.25,1) both; }
@keyframes modal-pop { 0% { opacity: 0; transform: translateY(14px) scale(.94) skewX(1.5deg); } 100% { opacity: 1; transform: none; } }
.modal-icon { font-size: 2.4rem; margin-bottom: 10px; }
.modal-title { font-family: var(--f-head); font-weight: 800; font-style: italic; text-transform: uppercase; font-size: 1.25rem; margin-bottom: 8px; }
.modal-message { color: var(--ink-soft); font-size: .92rem; line-height: 1.5; margin-bottom: 20px; }
.modal-actions { display: flex; gap: 10px; }
.modal-actions .btn { flex: 1; }

.consent-banner { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 90; width: min(560px, calc(100% - 24px)); display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 16px; border-radius: var(--r-lg); background: var(--paper); border: var(--bd-3); box-shadow: var(--sh-lg); }
.consent-text { flex: 1; min-width: 200px; font-size: .84rem; color: var(--ink-2); }
.consent-actions { display: flex; gap: 8px; }
.consent-actions .btn { padding: 9px 15px; font-size: .82rem; }

/* ---------- 21b. Hub multi-sports ---------- */
.sport-hub { position: fixed; inset: 0; z-index: 200; background: var(--paper); overflow-y: auto; animation: fade-in .25s ease both; }
.sport-hub::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(var(--ink) 1px, transparent 1.3px); background-size: 7px 7px; opacity: .05; pointer-events: none; }
.sport-hub::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-conic-gradient(from 0deg at 92% 4%, rgba(20,17,12,.05) 0 1.1deg, transparent 1.1deg 7deg); -webkit-mask-image: radial-gradient(60% 45% at 92% 4%, #000, transparent 72%); mask-image: radial-gradient(60% 45% at 92% 4%, #000, transparent 72%); }
.hub-inner { position: relative; z-index: 1; max-width: 640px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 12px; padding: clamp(24px,6vh,56px) var(--gutter) 44px; }
.hub-logo { width: clamp(52px,14vw,74px); height: auto; }
.hub-word { font-size: clamp(3rem,15vw,5rem); margin-top: 2px; }
.hub-sub { font-family: var(--f-head); font-style: italic; font-weight: 700; color: var(--ink-soft); font-size: 1rem; margin-bottom: 6px; }
.hub-grid { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 6px; }
@media (min-width: 560px) { .hub-grid { grid-template-columns: repeat(3,1fr); } }
.hub-tile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 9px; padding: 20px 10px; background: var(--paper); border: var(--bd); border-radius: var(--r-lg); box-shadow: var(--sh-sm); transition: transform .12s ease, box-shadow .12s ease; }
.hub-tile svg { width: 38px; height: 38px; color: var(--ink); }
.hub-tile-name { font-family: var(--f-head); font-weight: 800; font-style: italic; text-transform: uppercase; font-size: .92rem; }
.hub-badge { font-family: var(--f-mono); font-size: .56rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 2px 9px; border-radius: 999px; border: 2px solid var(--ink); }
.hub-tile.playable { cursor: pointer; }
.hub-tile.playable .hub-badge { background: var(--red); color: #fff; }
.hub-tile.playable:hover { transform: translate(-2px,-2px); box-shadow: var(--sh); }
.hub-tile.playable:active { transform: translate(2px,2px); box-shadow: 0 0 0; }
.hub-tile.soon { opacity: .8; }
.hub-tile.soon svg { color: var(--muted); }
.hub-tile.soon .hub-badge { background: var(--paper-2); color: var(--muted); }
.hub-tile.soon:hover { transform: translate(-1px,-1px); box-shadow: var(--sh-sm); border-color: var(--red); }
.hub-tile:focus-visible { outline: none; box-shadow: var(--sh), 0 0 0 3px var(--red); }
.hub-note { min-height: 1.4em; font-family: var(--f-mono); font-size: .78rem; color: var(--red-deep); }
.hub-reopen { background: none; border: none; color: var(--muted); font-family: var(--f-mono); font-size: .72rem; letter-spacing: .04em; cursor: pointer; padding: 2px 4px; }
.hub-reopen:hover { color: var(--red); }
body.hub-open { overflow: hidden; }

/* ---------- 22. Responsive ---------- */
@media (max-width: 400px) {
  .nationality-grid { grid-template-columns: repeat(2,1fr); }
  .recap-grid { gap: 7px; }
  .recap-num { font-size: 1.6rem; }
}
@media (min-width: 720px) {
  .mode-grid { grid-template-columns: repeat(4,1fr); }
}

/* ---------- 23. Accessibilité ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .brand-arc { stroke-dashoffset: 0; }
}
