/* ============================================================
   PALMARÈS — style.css (v0.1)
   DA : musée du football. Ivoire, encre, or, vert bouteille.
   Typo : Playfair Display (titres) + Inter (corps).
   Mobile-first, colonne centrale 540px.
   ============================================================ */

:root {
  --ivory: #f6f1e7;
  /* AAA : les « panneaux » remplacent le papier — sombre profond, or ciselé */
  --paper: rgba(10, 25, 17, 0.86);
  --panel-solid: #0b1a12;
  --ink: #f2ecdd;
  --ink-soft: #b9c8bd;
  --gold: #d4ab2a;
  --gold-deep: #a9861a;
  --gold-ink: #8a6d12;
  --gold-pale: #e8d48b;
  --green: #123b2a;
  --green-deep: #0d2b1e;
  --red: #c23a52;
  --line: rgba(212, 171, 42, 0.24);
  --edge: rgba(212, 171, 42, 0.45);
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.5);
  --radius: 12px;
  --cut: 16px;
  --serif: "Playfair Display", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--green-deep);
  min-height: 100vh;
  line-height: 1.5;
}
/* Background illustré (stade nocturne) — calque fixe, assombri pour la lisibilité */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(6, 16, 11, 0.55) 0%, rgba(6, 16, 11, 0.42) 40%, rgba(6, 16, 11, 0.88) 100%),
    url("../assets/img/bg-stadium.jpg") center / cover no-repeat;
}

/* ---------- Écrans ---------- */
.screen {
  display: none;
  max-width: 540px;
  margin: 0 auto;
  padding: 22px 18px calc(40px + env(safe-area-inset-bottom));
  min-height: 100vh;
}
.screen.active { display: block; animation: fadeIn 0.35s ease; }
@keyframes fadeIn { from { transform: translateY(8px); } to { transform: none; } }

.hidden { display: none !important; }

/* ---------- Accueil ---------- */
.home-hero { text-align: center; padding: 40px 0 26px; }
.laurel { color: var(--gold); font-size: 30px; margin-bottom: 6px; }
.brand-emblem { width: 56px; height: 56px; border-radius: 15px; filter: drop-shadow(0 4px 14px rgba(212, 171, 42, 0.35)); }
.wordmark { display: flex; flex-direction: column; align-items: center; color: var(--ivory); }
.wm-top {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--sans, Inter, sans-serif);
  font-weight: 700;
  font-size: clamp(13px, 2.6vw, 17px);
  letter-spacing: 0.5em;
  text-indent: 0.5em; /* compense le tracking du dernier caractère */
  color: var(--gold);
  text-transform: uppercase;
}
.wm-top::before, .wm-top::after {
  content: "";
  width: clamp(26px, 6vw, 54px); height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}
.wm-top::after { background: linear-gradient(90deg, var(--gold), transparent); }
.wm-main {
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(46px, 12vw, 84px);
  line-height: 1;
  letter-spacing: 0.02em;
  margin-top: 2px;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.4), 0 14px 44px rgba(212, 171, 42, 0.22);
  text-wrap: balance;
}
.wordmark::after {
  content: "";
  display: block;
  width: 120px; height: 3px;
  margin: 10px auto 0;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.tagline { color: #cfdcd2; font-size: 15.5px; margin-top: 14px; }
.tagline em { color: var(--gold-pale); font-style: italic; font-family: var(--serif); font-size: 17px; }

.home-actions { display: flex; flex-direction: column; gap: 12px; margin: 10px 0 22px; }

/* ---------- Sélecteur de sport ---------- */
.sport-tabs { display: flex; gap: 8px; justify-content: center; margin-top: 18px; }
.sport-tab {
  display: inline-block; text-decoration: none;
  background: rgba(246, 241, 231, 0.08); color: var(--ink-soft);
  border: 1px solid rgba(246, 241, 231, 0.22); border-radius: 999px;
  padding: 10px 20px; font-weight: 800; font-size: 13.5px; letter-spacing: 0.04em;
}
.sport-tab.on {
  background: rgba(212, 171, 42, 0.2); color: var(--gold-pale);
  border-color: var(--gold);
  box-shadow: 0 0 22px rgba(212, 171, 42, 0.25);
}
.sport-tab:hover { color: var(--ivory); }

.home-card {
  background: var(--paper);
  backdrop-filter: blur(10px);
  border-radius: 0;
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  box-shadow: var(--shadow);
  padding: 56px 22px 24px;
  position: relative;
  text-align: center;
  margin-bottom: 20px;
  border: 1px solid var(--edge);
}
.card-ribbon {
  position: absolute; top: 0; left: 0; right: 0;
  text-align: left;
  background: linear-gradient(90deg, rgba(212, 171, 42, 0.2), rgba(212, 171, 42, 0.02) 70%);
  color: var(--gold-pale);
  font-family: var(--serif);
  font-weight: 700; font-size: 14px; letter-spacing: 0.2em; text-transform: uppercase;
  padding: 12px 20px 11px 26px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card-ribbon::before { content: "◆ "; color: var(--gold); font-size: 10px; vertical-align: 2px; }
@media (max-width: 430px) {
  .card-ribbon { font-size: 12px; letter-spacing: 0.14em; padding-left: 20px; }
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 10px; }
.chip {
  background: rgba(246, 241, 231, 0.07); border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 999px; padding: 7px 14px; font-size: 13.5px; font-weight: 600;
}
.daily-status { color: var(--ink-soft); font-size: 13.5px; margin-bottom: 14px; }

.home-footer { text-align: center; color: rgba(246, 241, 231, 0.78); font-size: 12px; margin-top: 26px; }

/* ---------- Rangée méta (profil/boutique/badges/panthéon) ---------- */
.meta-row { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.meta-btn {
  flex: 1; min-width: 105px;
  background: rgba(246, 241, 231, 0.1); color: var(--ivory);
  border: 1px solid rgba(246, 241, 231, 0.25); border-radius: 12px;
  padding: 10px 8px; font-family: var(--sans); font-weight: 700; font-size: 13px;
  cursor: pointer; transition: background 0.12s ease;
}
.meta-btn:hover { background: rgba(246, 241, 231, 0.2); }
.avatar-mini { width: 20px; height: 20px; border-radius: 50%; vertical-align: -5px; object-fit: cover; border: 1px solid var(--gold); }

/* Bandeaux par mode : seule la teinte du losange change */
.card-ribbon.rb-brown::before { color: #d8a35c; }
.card-ribbon.rb-dark::before { color: #7fd6a4; }
.card-ribbon.rb-gold::before { color: var(--gold); }
.daily-card .card-ribbon::before { color: #f08c9d; }
.btn-dark { background: rgba(246, 241, 231, 0.08); color: var(--ivory); border: 1px solid rgba(246, 241, 231, 0.25); }

/* Quêtes */
.quests-list { list-style: none; text-align: left; margin-bottom: 10px; }
.quests-list li { padding: 8px 2px; font-size: 14px; border-bottom: 1px dashed rgba(246, 241, 231, 0.12); display: flex; justify-content: space-between; gap: 8px; }
.quests-list li:last-child { border-bottom: none; }
.quests-list li em { font-style: normal; color: var(--gold-pale); font-weight: 800; font-size: 12.5px; }
.quests-list li.done { color: #7fd6a4; text-decoration: line-through; text-decoration-color: rgba(127, 214, 164, 0.5); }
.quest-earned { text-align: center; color: var(--gold-pale); font-weight: 800; font-size: 14px; margin-top: 14px; }

/* Histoire */
.story-item {
  padding: 13px; margin-bottom: 10px;
  background: rgba(246, 241, 231, 0.05);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.story-item:last-child { margin-bottom: 2px; }
.story-item .btn { font-size: 12.5px; white-space: normal; line-height: 1.35; text-transform: none; letter-spacing: 0.02em; }
.story-name { font-size: 15.5px; margin-bottom: 2px; }
.story-name strong { font-family: var(--serif); }
.story-goal { font-size: 12.5px; color: var(--ink-soft); margin-bottom: 9px; font-weight: 600; }

/* Duel */
.duel-banner { border: 2px solid var(--gold); }

/* Boutique */
.shop-note { color: #cfdcd2; text-align: center; font-size: 13.5px; margin-bottom: 14px; line-height: 1.55; }
.perk-item {
  display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 4px 12px;
  background: var(--paper); backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  border-radius: 10px; padding: 14px 15px; margin-bottom: 10px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}
.perk-item .btn { grid-column: 1 / -1; margin-top: 8px; }
.perk-item.owned { border-color: var(--gold); }
.btn-slim { width: auto; padding: 9px 14px; font-size: 12px; }
.perk-item .btn[disabled] { opacity: 0.9; filter: grayscale(0.65); cursor: not-allowed; }

/* Badges (collection) */
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.badge-cell {
  background: var(--paper); border: 1px solid rgba(246, 241, 231, 0.14);
  border-radius: 10px; padding: 14px 10px; text-align: center;
  display: flex; flex-direction: column; gap: 4px; opacity: 0.66;
}
.badge-cell.got { opacity: 1; border-color: var(--gold); box-shadow: 0 4px 16px rgba(201, 162, 39, 0.25); }
.badge-ic { font-size: 26px; }
.badge-cell strong { font-size: 13.5px; font-family: var(--serif); }
.badge-cell small { font-size: 11.5px; color: var(--ink-soft); line-height: 1.35; }

/* Panthéon */
.pantheon-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--paper); backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  border-radius: 10px; padding: 12px 14px; margin-bottom: 9px;
}
.pantheon-item.top { border: 2px solid var(--gold); box-shadow: 0 6px 20px rgba(201, 162, 39, 0.3); }
.pt-rank { font-weight: 900; font-family: var(--serif); color: var(--gold-pale); min-width: 34px; text-align: center; }
.pantheon-item .cc-body { flex: 1; }
.pt-score { font-family: var(--serif); font-weight: 900; font-size: 20px; color: var(--gold); }

/* Profil */
.profile-block { text-align: center; }
.avatar-wrap { margin-bottom: 10px; }
.avatar-big { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; border: 3px solid var(--gold); display: inline-block; }
.avatar-emoji { font-size: 44px; line-height: 78px; background: rgba(246, 241, 231, 0.1); text-align: center; }
.preset-row { display: flex; gap: 6px; justify-content: center; margin: 12px 0; flex-wrap: wrap; }
.preset-btn { font-size: 20px; background: rgba(246, 241, 231, 0.08); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; min-width: 44px; min-height: 44px; cursor: pointer; }
.preset-btn:hover { border-color: var(--gold); }
.name-input {
  width: 100%; margin-top: 6px;
  border: 1px solid rgba(246, 241, 231, 0.25); border-radius: 10px;
  padding: 12px; font-family: var(--sans); font-size: 15px; text-align: center;
  background: rgba(6, 16, 11, 0.65); color: var(--ivory);
}
.name-input::placeholder { color: rgba(242, 236, 221, 0.55); }
.profile-block .btn-slim { margin: 0 auto; }
.name-create {
  font-family: var(--serif); font-size: 21px; font-weight: 700;
  padding: 16px 12px; margin-bottom: 4px;
  background: rgba(6, 16, 11, 0.75); border: 2px solid var(--gold);
}
#btn-name-random { align-self: center; width: auto; }

/* Verdicts duel / histoire */
.mode-verdict { text-align: center; font-weight: 700; font-size: 15px; }
.mode-verdict p { margin-bottom: 10px; }
.mode-verdict .btn-slim { margin: 0 auto; }
.verdict-win { border: 2px solid #2e7d4f; }
.verdict-lose { border: 2px solid var(--red); }

.flag {
  width: 1.3em; height: auto;
  border-radius: 2px;
  vertical-align: -0.18em;
  box-shadow: 0 0 0 1px rgba(28, 26, 22, 0.12);
}
.flag-lg { width: 30px; border-radius: 3px; }
.cc-icon .flag-lg { display: block; }
.end-name .flag { width: 1.05em; vertical-align: -0.08em; }

.lang-toggle {
  position: fixed; top: 14px; right: 14px; z-index: 50;
  background: rgba(246, 241, 231, 0.12); color: var(--ivory);
  border: 1px solid rgba(246, 241, 231, 0.3);
  border-radius: 999px; padding: 11px 17px; min-height: 44px;
  font-family: var(--sans); font-weight: 800; font-size: 13px; letter-spacing: 0.08em;
  cursor: pointer; backdrop-filter: blur(6px);
}
/* Pas de bascule de langue pendant une partie (collision header sticky mobile) */
body:has(#screen-game.active) .lang-toggle { display: none; }
.lang-toggle:hover { background: rgba(246, 241, 231, 0.22); }

/* ---------- Boutons ---------- */
.btn {
  display: block; width: 100%;
  border: none; cursor: pointer;
  border-radius: 14px;
  padding: 15px 18px;
  font-family: var(--sans); font-weight: 800; font-size: 15px;
  letter-spacing: 0.04em; text-transform: uppercase;
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}
.btn:active { transform: scale(0.98); }
.btn:hover { filter: brightness(1.06); }

.btn-primary { background: rgba(212, 171, 42, 0.13); color: var(--ivory); border: 1px solid var(--edge); box-shadow: var(--shadow); }
.btn-primary:hover { background: rgba(212, 171, 42, 0.24); }
.btn-gold {
  background: linear-gradient(160deg, #e9c64a 0%, var(--gold) 45%, var(--gold-deep) 100%);
  color: #131007; box-shadow: 0 10px 30px rgba(201, 162, 39, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(255, 230, 150, 0.5);
}
.btn-red { background: linear-gradient(160deg, #d24a63, #a4243b); color: #fff; box-shadow: 0 10px 28px rgba(164, 36, 59, 0.4); border: 1px solid rgba(255, 170, 185, 0.35); }
.btn-ghost { background: transparent; color: rgba(246, 241, 231, 0.75); border: 1px solid rgba(246, 241, 231, 0.25); }
#screen-create .btn-ghost { margin-top: 16px; }

/* ---------- Création ---------- */
.create-head { text-align: center; padding: 34px 0 18px; }
.create-title { font-family: var(--serif); font-weight: 700; font-size: 26px; color: var(--ivory); }
.dots { display: flex; gap: 8px; justify-content: center; margin-top: 12px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: rgba(246, 241, 231, 0.25); transition: background 0.2s; }
.dot.on { background: var(--gold); }

.create-list { display: flex; flex-direction: column; gap: 11px; }
.choice-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--paper); backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  border-radius: 10px; padding: 16px 17px;
  cursor: pointer; text-align: left;
  font-family: var(--sans);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}
.choice-card:hover { transform: translateY(-2px); border-color: var(--gold); background: rgba(18, 40, 28, 0.9); }
.choice-card:active { transform: scale(0.985); }
.cc-icon { font-size: 27px; flex-shrink: 0; }
.cc-body { display: flex; flex-direction: column; gap: 2px; }
.cc-body strong { font-size: 15.5px; color: var(--ivory); font-family: var(--serif); letter-spacing: 0.01em; }
.cc-body small { font-size: 12.8px; color: var(--ink-soft); line-height: 1.4; }

/* ---------- En-tête de jeu ---------- */
.game-header {
  background: rgba(8, 20, 14, 0.94);
  backdrop-filter: blur(12px);
  border-radius: 10px;
  border: 1px solid var(--edge);
  box-shadow: var(--shadow);
  padding: 14px 16px 12px;
  margin-bottom: 16px;
  position: sticky; top: 10px; z-index: 20;
}
.hd-row1 { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.hd-id { display: flex; flex-direction: column; }
.hd-id strong { font-family: var(--serif); font-size: 18px; font-weight: 700; color: var(--ivory); }
.hd-id span { font-size: 12.5px; color: var(--ink-soft); }
.hd-right { display: flex; align-items: center; gap: 7px; }
.hd-exit {
  background: none; border: 1px solid rgba(246, 241, 231, 0.22); border-radius: 10px;
  color: var(--ink-soft); font-size: 17px; line-height: 1;
  padding: 9px 11px; cursor: pointer; min-height: 42px;
}
.hd-exit:hover { border-color: var(--gold); color: var(--ink); }
.hd-ovr {
  display: flex; flex-direction: column; align-items: center;
  background: linear-gradient(160deg, rgba(212, 171, 42, 0.25), rgba(212, 171, 42, 0.06));
  color: var(--ivory);
  border-radius: 10px; padding: 5px 13px; min-width: 56px;
  border: 1px solid var(--gold);
}
.hd-ovr em { font-style: normal; font-size: 9.5px; letter-spacing: 0.12em; color: var(--gold-pale); }
.hd-ovr strong { font-size: 21px; font-family: var(--serif); }
.hd-row2 { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-top: 7px; flex-wrap: wrap; }
.hd-club { font-weight: 700; font-size: 14px; }
.hd-club small { color: var(--ink-soft); font-weight: 600; margin-left: 4px; }
.hd-meta { font-size: 12.5px; color: var(--ink-soft); font-weight: 600; }
.trait { cursor: help; }
.hd-bars { display: flex; gap: 10px; margin-top: 9px; }
.stat { flex: 1; }
.stat span { font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); font-weight: 700; }
.bar { height: 6px; background: rgba(246, 241, 231, 0.14); border-radius: 3px; overflow: hidden; margin-top: 3px; }
.bar i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--gold-deep), var(--gold)); border-radius: 3px; transform-origin: left center; transition: transform 0.5s ease; }

/* ---------- Cartes de jeu ---------- */
.card-zone { min-height: 320px; }
.game-card {
  background: var(--paper);
  backdrop-filter: blur(10px);
  border-radius: 0;
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  border: 1px solid var(--edge);
  box-shadow: var(--shadow);
  padding: 24px 22px;
  text-align: center;
}
.game-card.pop { animation: cardPop 0.3s ease; }
@keyframes cardPop { from { transform: translateY(14px) scale(0.98); } to { transform: none; } }
.game-card.good { border-color: #4dab77; box-shadow: 0 10px 34px rgba(46, 125, 79, 0.4); }
.game-card.bad { border-color: var(--red); box-shadow: 0 10px 34px rgba(164, 36, 59, 0.38); }
.game-card.moment {
  background: linear-gradient(165deg, rgba(24, 20, 6, 0.94), rgba(10, 25, 17, 0.92));
  border: 2px solid var(--gold);
  box-shadow: 0 0 60px rgba(212, 171, 42, 0.25), var(--shadow);
}

.season-tag {
  display: inline-block;
  font-size: 11px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--gold-pale); background: rgba(212, 171, 42, 0.1);
  border: 1px solid var(--line);
  border-radius: 999px; padding: 6px 15px; margin-bottom: 14px;
}
.ev-icon { font-size: 40px; margin-bottom: 10px; }
.ev-text { font-size: 16.5px; line-height: 1.6; color: var(--ink); margin-bottom: 18px; }
.game-card.moment .ev-text { font-family: var(--serif); font-size: 18px; }

.ev-options { display: flex; flex-direction: column; gap: 10px; }
.btn-choice {
  background: rgba(246, 241, 231, 0.06); color: var(--ivory);
  text-transform: none; letter-spacing: 0; font-size: 15px; font-weight: 700;
  border: 1px solid rgba(212, 171, 42, 0.4);
}
.btn-choice:hover { background: rgba(212, 171, 42, 0.16); }
.btn-choice small { display: block; font-weight: 500; font-size: 12px; color: var(--gold-pale); margin-top: 3px; }
.btn-choice.gold { background: linear-gradient(135deg, var(--gold) 0%, var(--gold-deep) 100%); color: var(--green-deep); }
.btn-choice.gold small { color: rgba(13, 43, 30, 0.95); }

.km-img, .meta-banner {
  height: auto; aspect-ratio: 1376 / 721; /* illustrations entières, jamais recadrées */
  border-radius: 12px;
  background-size: cover; background-position: center;
  border: 1px solid rgba(201, 162, 39, 0.5);
  margin-bottom: 14px;
}
.km-banner {
  font-family: var(--serif); font-weight: 900; font-size: 22px;
  letter-spacing: 0.08em; color: var(--gold-pale); margin-bottom: 12px;
}
.km-banner.good { color: #7fd6a4; }
.km-banner.bad { color: #f08c9d; }

/* ---------- Pastilles d'effets & OVR ---------- */
.fx-chips { display: flex; flex-wrap: wrap; gap: 7px; justify-content: center; margin: -6px 0 16px; }
.fx-chip {
  font-size: 12.5px; font-weight: 800;
  border-radius: 999px; padding: 5px 12px;
  letter-spacing: 0.02em;
}
.fx-chip.pos { background: rgba(46, 125, 79, 0.22); color: #8fdcae; border: 1px solid rgba(127, 214, 164, 0.4); }
.fx-chip.neg { background: rgba(164, 36, 59, 0.2); color: #f4a3b1; border: 1px solid rgba(240, 140, 157, 0.4); }
.fx-chip.trait-chip { background: rgba(212, 171, 42, 0.18); color: var(--gold-pale); border: 1px solid var(--gold); }
.ovr-up, .ovr-down { font-style: normal; font-size: 12px; margin-left: 3px; vertical-align: 2px; }
.ovr-up { color: #7fd6a4; }
.ovr-down { color: #f08c9d; }

/* ---------- Bilan de saison ---------- */
.report { list-style: none; text-align: left; margin-bottom: 18px; }
.report li {
  padding: 9px 4px; font-size: 14.5px;
  border-bottom: 1px dashed rgba(246, 241, 231, 0.14);
}
.report li:last-child { border-bottom: none; }
.report li.stat-line { font-weight: 700; }
.report li.ok { color: #7fd6a4; }
.report li.ko { color: #f08c9d; }
.report li.trophy {
  font-weight: 800; color: var(--gold-pale);
  background: linear-gradient(90deg, rgba(212, 171, 42, 0.2), rgba(212, 171, 42, 0.04));
  border: 1px solid var(--line);
  border-radius: 8px; padding-left: 10px;
}
.report li.trophy.big { font-size: 17px; font-family: var(--serif); }

/* ---------- Fin de carrière ---------- */
#screen-end { padding-top: 34px; }
.end-head { text-align: center; margin-bottom: 18px; }
.end-sub { color: rgba(246, 241, 231, 0.6); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 700; margin: 8px 0 10px; }
.end-name { font-family: var(--serif); font-weight: 900; font-size: 34px; color: var(--ivory); }
.end-title { font-family: var(--serif); font-style: italic; font-size: 19px; color: var(--gold-pale); margin-top: 6px; }
.end-score {
  display: inline-flex; flex-direction: column; align-items: center;
  margin-top: 16px; padding: 14px 40px;
  background: linear-gradient(165deg, rgba(24, 20, 6, 0.95), rgba(10, 25, 17, 0.92));
  border: 2px solid var(--gold); border-radius: 0;
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
  box-shadow: 0 0 50px rgba(212, 171, 42, 0.3), var(--shadow);
}
.end-score span { font-size: 10.5px; letter-spacing: 0.18em; font-weight: 800; color: var(--gold-pale); }
.end-score strong { font-family: var(--serif); font-size: 48px; color: var(--gold); line-height: 1.1; text-shadow: 0 0 26px rgba(212, 171, 42, 0.5); }
.end-story { color: #cfdcd2; text-align: center; font-size: 15px; line-height: 1.6; margin: 14px 4px 20px; }

.end-block {
  background: var(--paper); backdrop-filter: blur(10px);
  border-radius: 0;
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  border: 1px solid var(--edge);
  box-shadow: var(--shadow);
  padding: 20px; margin-bottom: 16px;
}
.end-block h3 {
  font-family: var(--serif);
  font-size: 13px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--gold-pale); text-align: center; margin-bottom: 13px; font-weight: 700;
}
.pal-table { width: 100%; border-collapse: collapse; }
.pal-table td { padding: 7px 4px; font-size: 14.5px; border-bottom: 1px dashed rgba(246, 241, 231, 0.14); }
.pal-table tr:last-child td { border-bottom: none; }
.pal-table td:last-child { text-align: right; font-weight: 800; font-family: var(--serif); font-size: 16px; color: var(--gold-pale); }
.club-path { margin-top: 12px; font-size: 12.5px; color: var(--ink-soft); text-align: center; line-height: 1.6; }

.end-pct { color: var(--gold-pale); font-size: 13.5px; font-weight: 700; margin-top: 10px; }
.pal-table tr.zero td { color: rgba(242, 236, 221, 0.5); }
.pal-table tr.zero td:last-child { color: #f08c9d; }

.journey { list-style: none; }
.journey li { padding: 6px 4px; font-size: 14px; border-bottom: 1px dashed rgba(246, 241, 231, 0.12); }
.journey li:last-child { border-bottom: none; }
.journey li em { font-style: normal; font-weight: 800; font-family: var(--serif); color: var(--gold-pale); margin-right: 8px; }
.journey li small { color: var(--ink-soft); margin-left: 6px; }

.fo-table { width: 100%; border-collapse: collapse; text-align: center; }
.fo-table th { font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); padding: 4px; }
.fo-table td { padding: 7px 4px; font-size: 14.5px; border-bottom: 1px dashed rgba(246, 241, 231, 0.14); }
.fo-table td:first-child { text-align: left; color: var(--ink-soft); font-size: 13px; }
.fo-table td.win { font-weight: 800; font-family: var(--serif); font-size: 16px; color: var(--gold-pale); }
.fo-verdict { margin-top: 12px; text-align: center; font-family: var(--serif); font-style: italic; font-size: 15.5px; color: var(--ink); }

.end-regret {
  text-align: center; color: #e9e3d4;
  font-style: italic; font-size: 14px; margin: 18px 6px 4px;
  font-family: var(--serif);
  background: rgba(13, 43, 30, 0.65); border-radius: 12px; padding: 12px 16px;
}

.badge-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.badge {
  background: rgba(212, 171, 42, 0.16); border: 1px solid var(--gold);
  color: var(--gold-pale); font-weight: 700; font-size: 13px;
  border-radius: 999px; padding: 6px 13px; cursor: help;
}
.end-actions { display: flex; flex-direction: column; gap: 11px; margin-top: 20px; }

/* ---------- Révélation « grand soir » (finales, Étoile d'Or) ---------- */
.reveal-ov {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(1100px 700px at 50% 42%, rgba(18, 59, 42, 0.97), rgba(4, 12, 8, 0.995));
  animation: rvIn 0.5s ease;
  cursor: pointer;
  transition: background 0.6s ease, opacity 0.45s ease;
}
.rv-tension {
  color: var(--gold-pale); font-family: var(--serif); font-style: italic;
  font-size: 20px; text-align: center; padding: 0 30px; line-height: 1.5;
  animation: rvPulse 1.15s ease-in-out infinite;
}
.rv-burst { display: none; text-align: center; padding: 0 24px; }
.reveal-ov.phase2 { background: radial-gradient(900px 600px at 50% 45%, rgba(201, 162, 39, 0.30), rgba(4, 12, 8, 0.995)); }
.reveal-ov.phase2 .rv-tension { display: none; }
.reveal-ov.phase2 .rv-burst { display: block; animation: rvBurst 0.55s cubic-bezier(0.19, 1, 0.22, 1); }
.rv-burst h2 {
  font-family: var(--serif); font-weight: 900;
  font-size: clamp(36px, 9vw, 66px); line-height: 1.1;
  color: var(--gold); letter-spacing: 0.04em;
  text-shadow: 0 0 44px rgba(201, 162, 39, 0.6), 0 2px 0 rgba(0, 0, 0, 0.4);
  text-wrap: balance;
}
.rv-burst p { color: var(--ivory); margin-top: 14px; font-size: 16.5px; font-family: var(--serif); font-style: italic; }
.reveal-ov.lose.phase2 { background: radial-gradient(900px 600px at 50% 45%, rgba(164, 36, 59, 0.22), rgba(4, 12, 8, 0.995)); }
.reveal-ov.lose .rv-burst h2 { color: #e8798d; text-shadow: 0 0 34px rgba(164, 36, 59, 0.55); }
.reveal-ov.out { opacity: 0; }
@keyframes rvIn { from { transform: scale(1.02); } }
@keyframes rvPulse { 0%, 100% { opacity: 0.55; transform: scale(1); } 50% { opacity: 1; transform: scale(1.035); } }
@keyframes rvBurst { from { transform: scale(0.55); } }

@media (prefers-reduced-motion: reduce) {
  .reveal-ov, .game-card.pop { animation: none; }
  .rv-tension { animation: none; }
  .bar i { transition: none; }
  .screen.active { animation: none; }
}

/* ---------- Modale ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(13, 43, 30, 0.75);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; backdrop-filter: blur(4px);
}
.modal {
  background: var(--panel-solid); border-radius: 12px;
  border: 1px solid var(--gold);
  padding: 24px 20px; max-width: 380px; width: 100%;
  text-align: center; box-shadow: var(--shadow);
}
.modal-icon { font-size: 34px; margin-bottom: 8px; }
.modal h3 { font-family: var(--serif); font-size: 20px; margin-bottom: 8px; }
.modal p { color: var(--ink-soft); font-size: 14.5px; margin-bottom: 18px; }
.modal-actions { display: flex; gap: 10px; }
.modal-actions .btn { flex: 1; padding: 12px; font-size: 13.5px; }
.modal-actions .btn-ghost { color: var(--ink-soft); border-color: rgba(246, 241, 231, 0.25); }

/* ---------- Desktop : pleine largeur AAA ---------- */
@media (min-width: 760px) {
  .screen { max-width: 640px; padding-top: 40px; }
  .ev-text { font-size: 17.5px; }
  .wm-main { font-size: 96px; }
}
@media (min-width: 1060px) {
  /* Accueil : hub en grille 2 colonnes */
  #screen-home { max-width: 1100px; }
  #screen-home.active { display: grid; grid-template-columns: 1fr 1fr; gap: 0 26px; align-content: start; }
  #screen-home .home-hero, #screen-home .home-actions, #screen-home .meta-row,
  #screen-home #duel-banner, #screen-home .home-footer { grid-column: 1 / -1; }
  #screen-home .home-actions { flex-direction: row; }
  #screen-home .home-actions .btn { flex: 1; }
  #screen-home .home-card { margin-bottom: 26px; }

  /* Création : choix sur 2 colonnes */
  #screen-create { max-width: 980px; }
  #screen-create .create-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  #screen-create .create-list .name-input, #screen-create .create-list .btn { grid-column: 1 / -1; }
  #screen-create .btn-ghost { max-width: 420px; margin-left: auto; margin-right: auto; }

  /* Jeu : colonne de lecture généreuse */
  #screen-game { max-width: 760px; }
  .ev-text { max-width: 58ch; margin-left: auto; margin-right: auto; }

  /* Fin de carrière : blocs en 2 colonnes */
  #screen-end { max-width: 1100px; }
  #screen-end.active { display: grid; grid-template-columns: 1fr 1fr; gap: 0 26px; align-content: start; }
  #screen-end #end-content { display: contents; }
  #screen-end .end-head, #screen-end .end-story, #screen-end .end-regret,
  #screen-end .end-actions, #screen-end .mode-verdict { grid-column: 1 / -1; }
  #screen-end .end-actions { flex-direction: row; }
  #screen-end .end-actions .btn { flex: 1; }
  #screen-end .end-block { margin-bottom: 26px; }

  /* Méta : profils/boutique plus large */
  #screen-meta { max-width: 980px; }
  #screen-meta .perk-item { max-width: 100%; }
  #meta-content { display: grid; grid-template-columns: 1fr 1fr; gap: 0 22px; align-content: start; }
  #meta-content > * { grid-column: auto; }
  #meta-content > .shop-note, #meta-content > .meta-banner, #meta-content > .badge-grid { grid-column: 1 / -1; }
  #meta-content .end-block { margin-bottom: 22px; }
}


/* ---------- Monétisation ---------- */
.shop-h3 {
  font-family: var(--serif); font-size: 13px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--gold-pale); text-align: center; margin: 22px 0 12px; font-weight: 700;
}
.offer-block {
  background: var(--paper); backdrop-filter: blur(8px);
  border: 1px solid var(--gold); border-radius: 10px;
  padding: 15px; margin: 10px 0; text-align: center;
}
.offer-block strong { font-family: var(--serif); font-size: 16px; color: var(--gold-pale); display: block; margin-bottom: 5px; }
.offer-block p { font-size: 13px; color: var(--ink-soft); margin-bottom: 10px; line-height: 1.5; }
.offer-block.founder { box-shadow: 0 0 34px rgba(212, 171, 42, 0.25); }
#eur-list { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
#eur-list .offer-block { flex: 1 1 100%; }
.joker-btn { margin: 12px auto 0; font-size: 11.5px; opacity: 0.85; }
#btn-ad-daily { margin: 10px auto 0; font-size: 12px; }
.quest-earned .btn-slim { margin-left: 8px; vertical-align: 1px; }
.frame-select {
  display: flex; flex-wrap: wrap; gap: 7px; align-items: center; justify-content: center;
  margin: 4px 0 14px; grid-column: 1 / -1;
}
.frame-select span { color: var(--ink-soft); font-size: 12.5px; font-weight: 700; }
.frame-chip {
  background: rgba(246, 241, 231, 0.07); border: 1px solid var(--line); color: var(--ivory);
  border-radius: 999px; padding: 7px 13px; font-size: 12.5px; font-weight: 700; cursor: pointer;
}
.frame-chip.on { background: rgba(212, 171, 42, 0.25); border-color: var(--gold); color: var(--gold-pale); }

/* Aperçu Fondateur : le nom doré au classement */
.preview-label { font-size: 12px; color: var(--ink-soft); margin: 10px 0 6px; font-weight: 700; }
.flair-preview { margin-bottom: 12px; }
.flair-preview .pantheon-item { margin-bottom: 5px; padding: 8px 12px; }
.pantheon-item.is-founder { border-color: var(--gold); box-shadow: 0 0 22px rgba(212, 171, 42, 0.3); }
.founder-name {
  color: var(--gold);
  text-shadow: 0 0 14px rgba(212, 171, 42, 0.55);
  letter-spacing: 0.02em;
}

/* ---------- Recap « Wrapped » ---------- */
.recap-ov {
  position: fixed; inset: 0; z-index: 210;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: radial-gradient(900px 700px at 50% 40%, rgba(18, 59, 42, 0.97), rgba(4, 12, 8, 0.995));
  cursor: pointer; padding: 60px 26px 40px;
  transition: opacity 0.4s ease;
}
.recap-ov.out { opacity: 0; }
.rc-bars {
  position: absolute; top: 18px; left: 20px; right: 20px;
  display: flex; gap: 6px;
}
.rc-bars i { flex: 1; height: 3px; border-radius: 2px; background: rgba(246, 241, 231, 0.22); }
.rc-bars i.done { background: var(--gold); }
.rc-bars i.run { background: var(--gold-pale); animation: rvPulse 1.1s ease-in-out infinite; }
.rc-slide { text-align: center; max-width: 560px; }
.rc-slide.pop { animation: rvBurst 0.5s cubic-bezier(0.19, 1, 0.22, 1); }
.rc-icon { font-size: 56px; margin-bottom: 14px; }
.rc-big {
  font-family: var(--serif); font-weight: 900;
  font-size: clamp(56px, 16vw, 110px); line-height: 1;
  color: var(--ivory);
}
.rc-big.gold { color: var(--gold); text-shadow: 0 0 46px rgba(212, 171, 42, 0.6); }
.rc-label {
  font-family: var(--serif); letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--gold-pale); font-size: 14px; margin-top: 12px;
}
.rc-sub { color: var(--ink); font-size: 17px; margin-top: 16px; line-height: 1.55; font-family: var(--serif); font-style: italic; }
.rc-skip { position: absolute; bottom: 16px; color: rgba(246, 241, 231, 0.45); font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; }
.rc-replay { margin: 6px auto 12px; grid-column: 1 / -1; }

/* ---------- Sliding Doors ---------- */
.sliding-block {
  background: rgba(246, 241, 231, 0.05);
  border: 1px solid var(--line); border-radius: 10px;
  padding: 13px 15px; margin-bottom: 12px; text-align: left;
}
.sliding-block h4 { font-family: var(--serif); letter-spacing: 0.18em; font-size: 12.5px; color: var(--gold-pale); margin-bottom: 8px; }
.sd-line { font-size: 13.5px; color: var(--ink); margin: 5px 0; line-height: 1.5; }
.sd-line.gold { color: var(--gold-pale); font-weight: 700; }

/* ---------- Ligues privées ---------- */
.lg-code { color: var(--gold); letter-spacing: 0.18em; font-family: var(--sans); font-weight: 800; }
.lg-span { grid-column: 1 / -1; }
#lg-name, #lg-code { margin-bottom: 10px; }

#create-banner { max-width: 980px; margin: 0 auto 14px; }
#create-banner .meta-banner { margin-bottom: 0; }
.cc-img {
  display: block; height: 110px;
  background-size: cover; background-position: center 28%;
  border-radius: 9px 9px 0 0; margin: -16px -17px 12px;
  width: calc(100% + 34px);
  border-bottom: 1px solid var(--line);
}
.pos-card { flex-wrap: wrap; }
.pos-card .cc-img {
  flex: 1 1 100%;
  height: auto;
  aspect-ratio: 1376 / 721; /* ratio natif des illustrations : image entière, zéro recadrage */
  background-position: center;
}

/* ============================================================
   THÈME BASKET — « la salle US la nuit » : parquet sombre,
   orange ballon incandescent, ambre chaud. Zéro vert : le vert
   est la signature du foot.
   ============================================================ */
body.sport-basket {
  --paper: rgba(27, 13, 5, 0.88);
  --panel-solid: #1a0d05;
  --ink: #f5ead9;
  --ink-soft: #c9b39d;
  --gold: #f28b30;
  --gold-deep: #c96a1a;
  --gold-ink: #a05515;
  --gold-pale: #ffc08a;
  --green: #3a1d0c;
  --green-deep: #170b04;
  --line: rgba(242, 139, 48, 0.26);
  --edge: rgba(242, 139, 48, 0.48);
}
body.sport-basket::before {
  background:
    linear-gradient(180deg, rgba(16, 8, 3, 0.58) 0%, rgba(16, 8, 3, 0.46) 40%, rgba(16, 8, 3, 0.9) 100%),
    url("../assets/img/bg-arena.jpg?i=2") center / cover no-repeat,
    radial-gradient(1000px 600px at 50% 30%, #2a1710, #0d0603);
}
body.sport-basket .btn-gold {
  background: linear-gradient(160deg, #ffab52 0%, #f28b30 45%, #c96a1a 100%);
  border-color: rgba(255, 205, 155, 0.5);
  box-shadow: 0 10px 30px rgba(242, 139, 48, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  color: #1c0d03;
}
body.sport-basket .card-ribbon { background: linear-gradient(90deg, rgba(242, 139, 48, 0.22), rgba(242, 139, 48, 0.02) 70%); }
body.sport-basket .season-tag { background: rgba(242, 139, 48, 0.12); color: var(--gold-pale); border-color: var(--line); }
body.sport-basket .hd-ovr { background: linear-gradient(160deg, rgba(242, 139, 48, 0.3), rgba(242, 139, 48, 0.08)); }
body.sport-basket .game-card.moment {
  background: linear-gradient(165deg, rgba(33, 16, 4, 0.95), rgba(27, 13, 5, 0.92));
  box-shadow: 0 0 60px rgba(242, 139, 48, 0.3), var(--shadow);
}
body.sport-basket .end-score {
  background: linear-gradient(165deg, rgba(33, 16, 4, 0.95), rgba(27, 13, 5, 0.92));
  box-shadow: 0 0 50px rgba(242, 139, 48, 0.35), var(--shadow);
}
body.sport-basket .report li.trophy { background: linear-gradient(90deg, rgba(242, 139, 48, 0.22), rgba(242, 139, 48, 0.05)); border-color: var(--line); }
body.sport-basket .fx-chip.trait-chip { background: rgba(242, 139, 48, 0.2); }
body.sport-basket .wordmark::after { background: linear-gradient(90deg, transparent, #f28b30, transparent); }
body.sport-basket .laurel { color: #f28b30; }
body.sport-basket .wm-top { color: #f28b30; }
body.sport-basket .wm-top::before { background: linear-gradient(90deg, transparent, #f28b30); }
body.sport-basket .wm-top::after { background: linear-gradient(90deg, #f28b30, transparent); }
body.sport-basket .wm-main { text-shadow: 0 3px 0 rgba(0, 0, 0, 0.4), 0 14px 44px rgba(242, 139, 48, 0.25); }
body.sport-basket .brand-emblem { filter: drop-shadow(0 4px 14px rgba(242, 139, 48, 0.4)) hue-rotate(-14deg) saturate(1.4); }
body.sport-basket .tagline { color: #d8c2ac; }
body.sport-basket .tagline em { color: var(--gold-pale); }
body.sport-basket .reveal-ov { background: radial-gradient(1100px 700px at 50% 42%, rgba(58, 29, 12, 0.97), rgba(10, 5, 2, 0.995)); }
body.sport-basket .reveal-ov.phase2 { background: radial-gradient(900px 600px at 50% 45%, rgba(242, 139, 48, 0.32), rgba(10, 5, 2, 0.995)); }
body.sport-basket .reveal-ov.goldwin.phase2 {
  background:
    radial-gradient(900px 600px at 50% 45%, rgba(242, 139, 48, 0.3), rgba(10, 5, 2, 0.92)),
    url("../assets/img/bk-end-gala.jpg?i=2") center / cover no-repeat;
}
body.sport-basket .recap-ov { background: radial-gradient(900px 700px at 50% 40%, rgba(58, 29, 12, 0.97), rgba(10, 5, 2, 0.995)); }
body.sport-basket .meta-banner.gala { background-image: url("../assets/img/bk-end-gala.jpg?i=2"), url("../assets/img/end-gala.jpg"); }
body.sport-basket .sport-tab.on { background: rgba(242, 139, 48, 0.22); box-shadow: 0 0 22px rgba(242, 139, 48, 0.3); }
body.sport-basket .quests-list li.done { color: #ffb37c; text-decoration-color: rgba(255, 179, 124, 0.5); }
body.sport-basket .report li.ok { color: #ffb37c; }
body.sport-basket .km-banner.good { color: #ffb37c; }

/* ---------- Bouton retour flottant (création + écrans méta) ---------- */
.back-fab {
  display: none;
  position: fixed; top: 14px; left: 14px; z-index: 60;
  width: 46px; height: 46px; border-radius: 50%;
  align-items: center; justify-content: center;
  background: rgba(8, 20, 14, 0.85); color: var(--ivory);
  border: 1px solid var(--edge);
  font-size: 20px; cursor: pointer;
  backdrop-filter: blur(8px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}
.back-fab:hover { background: rgba(212, 171, 42, 0.25); }
body:has(#screen-create.active) .back-fab,
body:has(#screen-meta.active) .back-fab { display: flex; }

/* Images des offres et bannière gala */
.offer-img {
  height: auto; aspect-ratio: 1376 / 721; /* image entière */
  border-radius: 8px;
  background-size: cover; background-position: center;
  border: 1px solid var(--line); margin-bottom: 10px;
}
.meta-banner.gala { background-image: url("../assets/img/end-gala.jpg"); grid-column: 1 / -1; }
.reveal-ov.goldwin.phase2 {
  background:
    radial-gradient(900px 600px at 50% 45%, rgba(201, 162, 39, 0.25), rgba(4, 12, 8, 0.9)),
    url("../assets/img/end-gala.jpg") center / cover no-repeat;
}

/* ---------- Focus clavier visible (AA) ---------- */
:is(button, input, a):focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ---------- Compte mis en avant + seconde carrière ---------- */
.acc-banner { border: 1px solid rgba(212, 171, 42, 0.45); }
.acc-glow { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 10px; transition: outline-color 0.4s; }
.choice-sub { display: block; font-size: 12.5px; font-weight: 400; opacity: 0.75; margin-top: 3px; letter-spacing: 0; text-transform: none; }
