/* =====================================================================
   REFLEXIGO — COMPOSANTS (copiés de « DESIGN Reflexigo/components.css »)
   Ajoutés étape par étape (lot 4) : Boutons (4.1) ; Ligne cliquable, Étiquettes, Jauges, Statistiques (4.2) ; Feuille du bas (4.3) ; tampon, pastille record, combo du Run (4.4) ; puces de la barre haute (5.1).
   Les autres parties du fichier du design réutilisent des noms de classes déjà pris par le jeu
   (.card, .tab, .tag, .choice…) : elles arrivent avec l'étape qui remplace ces composants.
   Chargé après tokens.css, avant style.css.
   ===================================================================== */

/* ---------- Boutons ---------- */
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; border: 0; cursor: pointer; text-decoration: none; }
.btn svg { width: 20px; height: 20px; }
.btn-primary { height: var(--h-cta); border-radius: var(--r-pill); background: linear-gradient(var(--cta-grad-top), var(--cta-grad-bottom)); border: 2px solid var(--cta-border); box-shadow: var(--glow-cta); color: var(--text-on-cta); font: var(--t-cta); text-transform: uppercase; letter-spacing: .02em; }
.btn-secondary { height: var(--h-btn); border-radius: var(--r-m); background: var(--surface); border: 1.5px solid var(--c-nav); color: var(--text); font: 700 15px/1 var(--font-ui); }
.btn-ghost { height: var(--h-touch); color: var(--c-nav); font: 600 15px/1 var(--font-ui); background: none; }
.btn-danger { height: var(--h-btn); border-radius: var(--r-m); background: rgba(255,77,109,.12); border: 1.5px solid var(--c-danger); color: #ffd3dc; font: 700 15px/1 var(--font-ui); }
.btn:active { transform: scale(var(--press-scale)); }
.btn-secondary:active, .btn-danger:active { background: var(--surface-pressed); }
.btn .ic { width: 1.1em; height: 1.1em; }
/* Reflet animé : réservé au bouton Jouer de l'accueil (6.1) */
.btn-sheen { position: relative; overflow: hidden; }
.btn-sheen::after { content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .35), transparent); animation: sheen 2.8s infinite; }
@keyframes sheen { 60%, 100% { transform: translateX(475%); } }

/* ---------- Ligne cliquable (liste) ---------- */
/* adaptation : « .row .txt span » du design devient « .row .txt > span:not([class]) » (le sous-titre seulement) */
.row { display: flex; align-items: center; gap: var(--sp-3); min-height: 64px; padding: var(--sp-3) var(--sp-3) var(--sp-3) var(--sp-3); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); }
.row .ico { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(25,230,255,.08); color: var(--c-nav); border: 1px solid rgba(25,230,255,.25); }
.row .ico svg { width: 22px; height: 22px; }
.row .ico.img { background: rgba(47,107,255,.18); border-color: var(--line); overflow: hidden; }
.row .ico.img img { width: 34px; height: 34px; object-fit: contain; }
.row .num { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--line-strong); font: 800 14px/1 var(--font-ui); color: var(--text-2); }
.row .num.done { border-color: var(--c-success); color: var(--c-success); }
.row .num.now { border-color: var(--c-nav); color: var(--c-nav); box-shadow: var(--glow-1); }
.row .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.row .txt b { font: var(--t-title); }
.row .txt > span:not([class]) { font: var(--t-body-s); color: var(--text-2); }
.row .end { flex: none; display: flex; align-items: center; gap: var(--sp-2); color: var(--c-nav); }
.row .end svg { width: 20px; height: 20px; }
.row.locked { opacity: 1; background: rgba(11,21,70,.55); }
.row.locked .txt b, .row.locked .txt > span:not([class]) { color: var(--text-3); }
.row.locked .end { color: var(--text-3); }
.row.active { border-color: var(--c-nav); box-shadow: var(--glow-1); }
.row.alert .ico { color: var(--state-fragile); background: rgba(255,111,138,.1); border-color: rgba(255,111,138,.35); }

/* ---------- Étiquettes de statut (tags) ---------- */
.tag { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 9px; border-radius: var(--r-pill); font: var(--t-label); letter-spacing: var(--ls-label); text-transform: uppercase; border: 1px solid currentColor; white-space: nowrap; }
.tag svg { width: 12px; height: 12px; }
.tag.new { color: var(--c-nav); } .tag.done { color: var(--c-success); } .tag.todo { color: var(--c-score); } .tag.soon { color: var(--text-3); } .tag.xp { color: var(--c-xp); } .tag.danger { color: var(--state-fragile); }
.tag.fill.new { background: rgba(25,230,255,.12); }

/* ---------- Jauges ---------- */
.gauge { height: 8px; border-radius: var(--r-pill); background: var(--surface-sunken); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; display: flex; }
.gauge i { display: block; height: 100%; }
.gauge.lg { height: 10px; }
.gauge .fill { background: linear-gradient(90deg, var(--c-cyan-400), var(--gauge-end)); box-shadow: 0 0 8px rgba(25,230,255,.6); border-radius: var(--r-pill); }
.gauge .xp { background: linear-gradient(90deg, var(--gauge-xp-start), var(--gauge-xp-end)); border-radius: var(--r-pill); }
.s-new { background: var(--state-new); } .s-learn { background: var(--state-learning); } .s-frag { background: var(--state-fragile); } .s-mast { background: var(--state-mastered); }

/* ---------- Statistiques ---------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-2); }
.stats.two { grid-template-columns: 1fr 1fr; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); padding: var(--sp-3); display: flex; flex-direction: column; gap: 6px; }
.stat .k { font: var(--t-label); letter-spacing: var(--ls-label); text-transform: uppercase; color: var(--text-2); }
.stat .v { font: var(--t-score-m); }
.stat .s { font: var(--t-body-s); color: var(--text-2); }   /* 13 px : minimum du design system (13 nov. 2026) */

/* ---------- Feuille du bas (remplace les modales de confirmation) ---------- */
.scrim { position: absolute; inset: 0; z-index: 8; background: var(--scrim); }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 9; padding: var(--sp-3) var(--gutter) var(--sp-6); border-radius: var(--r-l) var(--r-l) 0 0; background: var(--surface-sheet); border-top: 1px solid var(--c-nav); box-shadow: 0 -10px 40px rgba(0,0,0,.5); display: flex; flex-direction: column; gap: var(--sp-3); }
.sheet { max-height: 75%; }   /* v1.6 : hauteur maximum ; au-delà, la liste défile */
.sheet-list { display: flex; flex-direction: column; gap: var(--sp-2); flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: none; }
.sheet .grab { width: 40px; height: 4px; border-radius: 4px; background: var(--line-strong); align-self: center; }

/* ---------- Tampons de réponse (extrait de la partie « Jeu : HUD, mot, choix ») ---------- */
.stamp { position: absolute; top: -14px; right: 12px; padding: 5px 12px; border-radius: 10px; font: 900 italic 20px/1 var(--font-display); transform: rotate(-4deg); }
.stamp.reflex { background: linear-gradient(90deg, var(--c-pink-400), var(--c-violet-600)); color: #fff; box-shadow: 0 0 20px rgba(255,79,216,.6); }
.stamp.miss { background: #a3122f; color: #fff; border: 1.5px solid #ff8fa5; }

/* ---------- v1.1 · Pastille record (remplace le sticker incliné) ---------- */
.rec { flex: none; display: flex; flex-direction: column; gap: 4px; padding: 6px 10px; border-radius: 12px; background: rgba(255,207,58,.08); border: 1px solid rgba(255,207,58,.5); font: 700 13px/1 var(--font-ui); font-variant-numeric: tabular-nums; }
.rec span { display: flex; align-items: center; gap: 6px; } .rec svg { width: 14px; height: 14px; }
.rec .c { color: var(--c-score); } .rec .tm { color: var(--c-nav); }

/* ---------- v1.1 · Combo du Run (badge riche, droit) ---------- */
.combo-box { flex: 0 0 140px; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 10px; border-radius: var(--r-m); background: rgba(70,20,130,.55); border: 1.5px solid var(--c-combo); box-shadow: 0 0 20px rgba(255,79,216,.45); }
.combo-box .k { font: var(--t-label); letter-spacing: var(--ls-label); text-transform: uppercase; color: #ffd6f4; }
.combo-box .v { font: 900 italic 34px/1 var(--font-display); color: var(--c-score); text-shadow: 0 0 14px rgba(255,190,40,.8); }
.combo-box .bar { width: 100%; height: 5px; border-radius: 3px; background: rgba(255,255,255,.18); overflow: hidden; } .combo-box .bar i { display: block; height: 100%; background: var(--c-score); }
.combo-box .mult { font: 800 11px/1 var(--font-ui); color: var(--c-success); }
.combo-box.off { border-color: var(--line-strong); box-shadow: none; background: rgba(40,10,100,.4); } .combo-box.off .v { color: var(--text-3); text-shadow: none; } .combo-box.off .mult { color: var(--text-3); }
.combo-box.hot { border-color: #fff; background: rgba(150,40,20,.65); box-shadow: 0 0 34px rgba(255,90,40,.9); }

/* ---------- Barre haute : puces série et niveau (extrait de la partie « Barre haute ») ---------- */
.chip-stat { display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 10px; border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--line); font: 700 13px/1 var(--font-ui); }
.chip-stat svg { width: 16px; height: 16px; }
.chip-stat.streak svg { color: var(--c-score); } .chip-stat.lvl svg { color: var(--c-xp); }
.chip-stat.flame-on { color: var(--c-score); border-color: rgba(255,207,58,.6); }

/* ---------- Barre du bas (5 onglets, « Jouer » au centre) ---------- */
.tabbar { position: absolute; left: 0; right: 0; bottom: 0; height: var(--h-tabbar); z-index: 5; display: flex; align-items: center; padding: 0 var(--sp-2); background: var(--bar-bg); border-top: 1px solid var(--line); }
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--text-2); font: var(--t-tab); position: relative; }
.tab svg { width: 24px; height: 24px; }
.tab.on { color: var(--c-nav); }
.tab.on::before { content: ""; position: absolute; top: -11px; width: 24px; height: 3px; border-radius: 3px; background: var(--c-nav); box-shadow: var(--glow-2); }
.tab.play { color: var(--text); }
.tab.play .disc { width: 52px; height: 52px; margin-top: -22px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(var(--cta-grad-top), var(--cta-grad-bottom)); border: 2px solid var(--cta-border); box-shadow: var(--glow-cta); color: var(--text-on-cta); }
.tab.play .disc svg { width: 26px; height: 26px; }
.badge-n { position: absolute; top: -6px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; display: grid; place-items: center; background: var(--c-score); color: var(--text-on-score); font: 800 11px/1 var(--font-ui); }

/* ---------- Moi et Paramètres (maquettes 20 et 22 : règles écrites dans maquettes.html, pas encore dans components.css du design) ---------- */
.eyebrow { font: var(--t-label); letter-spacing: var(--ls-label); text-transform: uppercase; color: var(--text-2); margin: 0; }
.lead { font: var(--t-body-s); color: var(--text-2); margin: 0; }
.card.hero { background: var(--surface-raised); border-color: var(--c-nav); box-shadow: var(--glow-2); border-radius: var(--r-l); padding: var(--sp-4); }
.lvl-ring { --p: 0%; flex: none; width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--c-xp) 0 var(--p), rgba(255,255,255,.08) var(--p) 100%); }
.lvl-ring div { width: 70px; height: 70px; border-radius: 50%; background: var(--surface-raised); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.lvl-ring b { font: var(--t-score-l); color: var(--c-xp); }
.lvl-ring small { font: var(--t-label); letter-spacing: .08em; color: var(--text-2); }
.kv { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-3); width: 100%; min-height: var(--h-touch); padding: 10px 0; border-bottom: 1px solid var(--line); font: 500 15px/1.2 var(--font-ui); color: var(--text); text-align: left; }
.kv:last-child { border-bottom: 0; }
.kv b { font: 700 15px/1 var(--font-ui); }
.toggle { flex: none; width: 46px; height: 28px; border-radius: 14px; background: var(--c-nav); position: relative; }
.toggle::after { content: ""; position: absolute; right: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--text); }
.toggle.off { background: var(--surface-sunken); border: 1px solid var(--line-strong); } .toggle.off::after { left: 3px; right: auto; background: var(--text-3); }

/* ---------- Accueil (6.1) : en-tête, titres, bandeau, infos (extraits de components.css du design) ---------- */
.grow { flex: 1; }
.head { display: flex; flex-direction: column; gap: 4px; }
.head.center { align-items: center; text-align: center; }
.h-l { font: var(--t-display-l); text-transform: uppercase; margin: 0; letter-spacing: var(--ls-display); text-shadow: 0 0 14px rgba(25,230,255,.45); }
.h-m { font: var(--t-display-m); text-transform: uppercase; margin: 0; }
.banner { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-2) var(--sp-3); border-radius: var(--r-m); background: rgba(255,207,58,.08); border: 1px solid rgba(255,207,58,.4); font: 500 13px/1.3 var(--font-ui); color: var(--text-2); }
.banner svg { width: 20px; height: 20px; color: var(--c-score); flex: none; }
.banner a { margin-left: auto; color: var(--c-score); font-weight: 700; white-space: nowrap; }
.pill-info { display: inline-flex; align-items: center; gap: 6px; font: 600 13px/1 var(--font-ui); color: var(--text-2); }
.pill-info svg { width: 16px; height: 16px; color: var(--c-nav); }
/* règles de la maquette m01 (<style> de maquettes.html) */
.continue .art { position: absolute; right: -6px; top: -14px; width: 120px; height: 120px; object-fit: contain; filter: drop-shadow(0 6px 16px rgba(0,0,0,.5)); }
.continue .meta { display: flex; gap: 12px; margin: 6px 0 14px; }
.mini-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-2); }
.mini { min-height: 92px; display: flex; flex-direction: column; justify-content: space-between; }
.mini .big { font: var(--t-score-l); }

/* ---------- Révision du jour (6.2) : carte or, traits de sessions, bouton or (partie v1.1 de components.css du design) ---------- */
.pillar { position: relative; border-radius: var(--r-l); padding: 14px 16px 16px; background: var(--surface-raised); border: 1.5px solid var(--line-strong); display: flex; flex-direction: column; gap: 10px; overflow: hidden; }
.pillar.mem { border-color: var(--line-memory); box-shadow: var(--glow-memory); }
.pillar .top { display: flex; justify-content: space-between; align-items: center; }
.pillar .kind { display: inline-flex; align-items: center; gap: 6px; font: var(--t-label); letter-spacing: var(--ls-label); text-transform: uppercase; }
.pillar .kind svg { width: 16px; height: 16px; }
.pillar .mid { display: flex; align-items: center; gap: 14px; min-height: 64px; }
.pillar .big { font: 900 italic 54px/1 var(--font-display); color: var(--c-memory); text-shadow: var(--glow-score); }
.pillar .t b { display: block; font: var(--t-title); } .pillar .t span { font: var(--t-body-s); color: var(--text-2); }
.pillar.mem .kind { color: var(--c-memory); }
.pips { display: flex; gap: 5px; align-items: center; } .pips i { width: 22px; height: 6px; border-radius: 3px; background: var(--surface-sunken); box-shadow: inset 0 0 0 1px var(--line-strong); } .pips i.on { background: var(--c-memory); box-shadow: var(--glow-memory-btn); }
.pips span { font: 600 12px/1 var(--font-ui); color: var(--text-2); margin-left: 6px; }
.btn-mem { height: var(--h-btn); border-radius: var(--r-pill); background: linear-gradient(var(--mem-grad-top), var(--mem-grad-bottom)); border: 2px solid var(--mem-border); color: var(--text-on-memory); font: 900 italic 18px/1 var(--font-display); text-transform: uppercase; box-shadow: var(--glow-memory-btn); }
.section-title { display: flex; justify-content: space-between; align-items: baseline; margin: var(--sp-2) 2px 0; }
.section-title a { font: 600 13px/1 var(--font-ui); color: var(--c-nav); }
/* règles de la maquette 12c (<style> de maquettes.html) */
.score-big { font: var(--t-score-xl); color: var(--c-score); text-shadow: var(--glow-score); text-align: center; }
.result-head { text-align: center; display: flex; flex-direction: column; gap: 6px; align-items: center; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- Sélecteur à 2 choix (6.3a, components.css du design ; les choix sont des <button>, voir style.css) ---------- */
.seg { display: flex; padding: 4px; gap: 4px; border-radius: var(--r-pill); background: var(--surface-sunken); border: 1px solid var(--line); }

/* ---------- Légende chiffrée (6.3b, .legend de components.css du design, renommée : .legend existe déjà pour « Progression des mots », refaite plus tard) ---------- */
.dot-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font: 600 12.5px/1 var(--font-ui); color: var(--text-2); }
.dot-legend span { display: inline-flex; align-items: center; gap: 6px; }
.dot-legend i { width: 9px; height: 9px; border-radius: 50%; }
.dot-legend b { color: var(--text); }
/* règles de la maquette 03 (<style> de maquettes.html) */
.theme-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-2); }
.theme { height: 128px; display: flex; flex-direction: column; justify-content: space-between; padding: var(--sp-3); }
.theme svg { width: 34px; height: 34px; color: var(--c-nav); }
.theme b { font: var(--t-display-m); font-size: 18px; text-transform: uppercase; }
.theme.soon svg, .theme.soon b { color: var(--text-3); }
.theme.soon { background: var(--surface-sunken); border-style: dashed; }   /* maquette : rgba(11,21,70,.5) → token le plus proche */

/* ---------- Conformité Google Play (maquettes C1 à C9, plan G.1) : liste groupée, puces, case à cocher, code, état, bouton danger plein ---------- */
.list { padding: 0 !important; overflow: hidden; flex: none; }   /* flex: none : dans un écran en colonne, overflow:hidden laisserait la carte s'écraser */
.li { display: flex; align-items: center; gap: var(--sp-3); width: 100%; min-height: var(--h-btn); padding: var(--sp-3) var(--sp-4); border: 0; border-bottom: 1px solid var(--line); background: none; font: var(--t-body); color: var(--text); text-align: left; text-decoration: none; }
.li:last-child { border-bottom: 0; }
.li > .ic, .li > svg { width: var(--icon-row); height: var(--icon-row); flex: none; color: var(--c-nav); }
.li .t { flex: 1; display: flex; flex-direction: column; gap: var(--sp-1); min-width: 0; }
.li .t b { font-weight: 700; }
.li .t span { font: var(--t-body-s); color: var(--text-2); }
.li .end { color: var(--c-nav); display: grid; place-items: center; }
.li .end .ic, .li .end svg { width: var(--icon-row); height: var(--icon-row); }
.li:is(button):active { background: var(--surface-pressed); }
.li.danger > .ic, .li.danger > svg, .li.danger .t b, .li.danger .end { color: var(--c-danger); }
.facts { display: flex; flex-direction: column; gap: var(--sp-2); margin: 0; padding: 0; list-style: none; }
.facts li { display: flex; gap: var(--sp-2); font: var(--t-body); color: var(--text); }
.facts li .ic, .facts li svg { width: var(--icon-row); height: var(--icon-row); flex: none; }
.facts.del .ic, .facts.del svg { color: var(--c-danger); } .facts.keep .ic, .facts.keep svg { color: var(--c-success); } .facts.info .ic, .facts.info svg { color: var(--c-nav); }
.checkline { display: flex; align-items: center; gap: var(--sp-3); min-height: var(--h-touch); font: var(--t-body); }
.checkline i { width: var(--icon-m); height: var(--icon-m); flex: none; border-radius: var(--r-xs); border: 2px solid var(--line-strong); display: grid; place-items: center; }
.checkline i.on { background: var(--c-danger); border-color: var(--c-danger); color: var(--text); }
.checkline i svg, .checkline i .ic { width: var(--icon-s); height: var(--icon-s); }
.code { display: flex; gap: var(--sp-2); justify-content: center; }
.code i { width: var(--code-cell-w); height: var(--code-cell-h); border-radius: var(--r-s); border: 2px solid var(--line-strong); background: var(--surface-sunken); display: grid; place-items: center; font: var(--t-score-m); font-style: normal; }
.code i.f { border-color: var(--c-nav); box-shadow: var(--glow-1); }
.state { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--sp-3); }
.state .ring { width: var(--state-ring); height: var(--state-ring); border-radius: var(--r-pill); display: grid; place-items: center; border: 2px solid currentColor; }
.state .ring .ic, .state .ring svg { width: var(--icon-l); height: var(--icon-l); }
.btn-danger.solid { background: var(--danger-solid); color: var(--text); border-color: var(--danger-solid); }
.btn-danger.off { opacity: .45; }

/* ---------- Frise (charte v1.8 « Onboarding & Premium », reprise telle quelle ; entrée dans le jeu le 21 nov. 2026 avec la page Niveaux) ----------
   Une étape = .st : pastille .dot + texte. États : .done = atteint (coche verte) · .next = la prochaine (violet = XP / niveau, ajout du 21 nov.)
   · .lock = plus tard (cadenas gris, ajout du 21 nov.) · .bell = rappel (cyan, paywall). */
.timeline { display: flex; flex-direction: column; gap: 0; }
.timeline .st { display: grid; grid-template-columns: var(--timeline-dot) 1fr; gap: var(--sp-3); position: relative; padding-bottom: var(--sp-3); }
.timeline .st:not(:last-child)::after { content: ""; position: absolute; left: calc(var(--timeline-dot) / 2 - 1px); top: var(--timeline-dot); bottom: 0; width: 2px; background: var(--line-strong); }
.timeline .dot { width: var(--timeline-dot); height: var(--timeline-dot); border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--line-strong); background: var(--surface); color: var(--text-2); }
.timeline .dot svg { width: 15px; height: 15px; }
.timeline .st.done .dot { background: var(--c-success); border-color: var(--c-success); color: var(--text-on-cta); }
.timeline .st.bell .dot { border-color: var(--c-nav); color: var(--c-nav); }
.timeline .st.next .dot { border-color: var(--c-xp); color: var(--c-xp); }
.timeline .st.lock .dot { color: var(--text-3); }
.timeline b { font: 700 14px/1.3 var(--font-ui); display: block; } .timeline span { font: var(--t-body-s); color: var(--text-2); }

/* ---------- Succès et badges (v1.9, 22 nov. 2026, maquette 12-succes/) ----------
   Badge = écusson .bdg (taille .s / défaut / .l, palier data-t="1".."6", verrouillé .off) : 6 évolutions
   I bronze, II argent : sans cercle · III or, IV améthyste : cercle épais · V saphir, VI néon : double cercle (VI : cadre dégradé + halo).
   Structure : <span class="bdg" data-t="4"><span class="inner"></span><span class="core">icône</span><span class="rk">IV</span></span> (aria-hidden ; le palier est écrit en toutes lettres à côté).
   Les icônes du jeu arrivent dans un <span class="ic"> : c'est lui qu'on dimensionne, et son dessin doit être centré dans son cadre (planche d'icônes). */
.bdg { --w: var(--badge-m); --m: var(--medal-bronze); --mb: color-mix(in srgb, var(--m) 40%, var(--text)); --ms: color-mix(in srgb, var(--m) 45%, var(--bg-app));
  --outline: linear-gradient(145deg, var(--mb), var(--m) 26%, var(--ms) 54%, var(--m) 78%, var(--mb));
  --shape: polygon(50% 0, 93% 20%, 93% 67%, 75% 87%, 50% 100%, 25% 87%, 7% 67%, 7% 20%);
  position: relative; isolation: isolate; flex: none; display: grid; place-items: center; width: var(--w); height: calc(var(--w) * 128 / 118); }
.bdg.s { --w: var(--badge-s); } .bdg.l { --w: var(--badge-l); }
.bdg[data-t="2"] { --m: var(--medal-silver); }
.bdg[data-t="3"] { --m: var(--medal-gold); }
.bdg[data-t="4"] { --m: var(--medal-amethyst); }
.bdg[data-t="5"] { --m: var(--medal-sapphire); }
.bdg[data-t="6"] { --m: var(--medal-neon); --mb: var(--text); --outline: var(--medal-neon-frame);
  filter: drop-shadow(-2px -2px 5px color-mix(in srgb, var(--c-cyan-400) 40%, transparent)) drop-shadow(3px 4px 5px color-mix(in srgb, var(--c-pink-400) 33%, transparent)); }
.bdg.off { --m: var(--text-3); --mb: color-mix(in srgb, var(--text-3) 40%, var(--text)); --outline: linear-gradient(145deg, var(--mb), var(--m) 26%, var(--ms) 54%, var(--m) 78%, var(--mb)); filter: none; opacity: var(--badge-off-opacity); }
.bdg::before, .bdg::after, .bdg .inner, .bdg .inner::after { content: ""; position: absolute; clip-path: var(--shape); }
.bdg::before { inset: 0; z-index: -3; background: var(--outline); }
.bdg::after { inset: calc(var(--w) * 5 / 118); z-index: -2; background: linear-gradient(135deg, color-mix(in srgb, var(--m) 14%, var(--bg-app)), var(--bg-app) 65%, color-mix(in srgb, var(--m) 12%, var(--bg-app))); }
.bdg .inner { inset: calc(var(--w) * 10 / 118); z-index: -1; background: var(--outline); opacity: .55; }
.bdg[data-t="6"] .inner { opacity: .9; }
.bdg .inner::after { inset: 1.5px; background: linear-gradient(130deg, color-mix(in srgb, var(--m) 12%, var(--c-night-900)) 15%, color-mix(in srgb, var(--m) 22%, var(--c-night-800)) 35%, var(--c-night-900) 51%, var(--bg-app) 75%); }
.bdg .core { position: relative; width: 54%; aspect-ratio: 1; margin-top: -12%; display: grid; place-items: center; border-radius: 50%; color: var(--mb); }
.bdg .core > svg, .bdg .core > .ic { width: 56%; height: 56%; display: grid; place-items: center; }
.bdg .core > .ic svg { width: 100%; height: 100%; display: block; }
.bdg[data-t="3"] .core::before, .bdg[data-t="4"] .core::before, .bdg[data-t="5"] .core::before, .bdg[data-t="6"] .core::before { content: ""; position: absolute; inset: 0; border-radius: 50%;
  padding: calc(var(--w) * 4 / 118); background: var(--outline); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
.bdg[data-t="3"] .core, .bdg[data-t="4"] .core { background: radial-gradient(circle at 30% 20%, color-mix(in srgb, var(--text) 15%, transparent), transparent 75%); }
.bdg[data-t="5"] .core, .bdg[data-t="6"] .core { background: radial-gradient(circle at 30% 20%, color-mix(in srgb, var(--m) 25%, transparent), transparent 75%); }
.bdg[data-t="5"] .core::after, .bdg[data-t="6"] .core::after { content: ""; position: absolute; inset: calc(var(--w) * -5 / 118); border: 1px solid var(--m); border-radius: 50%; opacity: .8; }
.bdg[data-t="6"] .core::after { border-color: var(--c-violet-400); box-shadow: 0 0 6px color-mix(in srgb, var(--c-cyan-400) 33%, transparent); }
.bdg .rk { position: absolute; bottom: 13%; font: var(--t-badge-rank); color: var(--mb); }
.bdg.s .rk { display: none; } .bdg.s .core { margin-top: -4%; width: 60%; } .bdg.s .core > svg, .bdg.s .core > .ic { width: 62%; height: 62%; }

/* Grille de 3 tuiles (Succès) : badge, nom, intitulé du compteur, état. « À récupérer » = bord violet, XP en violet. */
.bdg-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-2); }
.bdg-tile { display: flex; flex-direction: column; align-items: center; gap: var(--sp-1); padding: var(--sp-2) var(--sp-1); text-align: center; color: var(--text);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-s); font: var(--t-body-s); }
.bdg-tile b { font: var(--t-body-s); font-weight: 700; }
.bdg-tile .lbl { color: var(--text-2); }
.bdg-tile .st { margin-top: auto; }
.bdg-tile .xp, .bdg-xp { color: var(--c-xp); font-weight: 700; }
.bdg-tile.ready { border-color: var(--c-xp); }

/* Bloc « À la une » (Moi) : 3 places, place libre en pointillé, une phrase d'aide si une place est libre */
.bdg-une { display: flex; flex-direction: column; gap: var(--sp-2); padding: var(--sp-3); }
.bdg-une .slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-2); }
.bdg-une .slot { display: flex; flex-direction: column; align-items: center; gap: var(--sp-1); padding: var(--sp-1) 0; text-align: center; font: var(--t-body-s); font-weight: 700; color: var(--text); }
.bdg-une .slot.free { min-height: 100%; border: 1px dashed var(--line-strong); border-radius: var(--r-s); }
.bdg-une .hint { margin: 0; font: var(--t-body-s); color: var(--text-2); }

/* Page d'un badge : en-tête (grand badge, intitulé, nom, progression, bouton) puis une ligne .row par palier */
.bdg-hero { display: flex; flex-direction: column; align-items: center; gap: var(--sp-2); padding: var(--sp-4); text-align: center; }
.bdg-hero .name { font: var(--t-display-m); text-transform: uppercase; margin: 0; }
.bdg-prog { align-self: stretch; display: flex; flex-direction: column; gap: var(--sp-2); text-align: left; margin-top: var(--sp-1); }
.bdg-prog .hd { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--sp-2); }
.bdg-prog .hd .lbl { font: var(--t-body-s); color: var(--text-2); }
.bdg-prog .cnt { white-space: nowrap; color: var(--text); }
.bdg-prog .cnt b { font: var(--t-score-m); }
.bdg-prog .cnt span { font: var(--t-title); color: var(--text-2); }
.bdg-prog .ft { margin: 0; font: var(--t-body-s); color: var(--text); }
.bdg-hero .btn { margin-top: var(--sp-2); }
.bdg-tiers { display: flex; flex-direction: column; gap: var(--sp-2); }
.bdg-tiers .row { text-align: left; width: 100%; color: var(--text); }
.bdg-tiers .row .end, .bdg-tiers .row.locked .end { font: var(--t-body-s); font-weight: 700; color: var(--c-xp); }   /* les XP restent violets, même verrouillés */
.bdg-tiers .row.ready { border-color: var(--line-xp); }

/* ---------- Distinctions (v1.10, 22 nov. 2026, maquette 12-succes/MAQUETTES-DISTINCTIONS.html) ----------
   Badges uniques, sans palier ni XP. Un seul cercle autour de l'icône : obtenue = violet (identité des Succès) ; pas encore = trait neutre estompé ;
   aucune couleur par rareté (écrite en texte). Tuile = .bdg-tile ; détail = feuille du bas .dst-sheet (sans bouton). */
.dst { flex: none; width: var(--dst-s); height: var(--dst-s); border-radius: 50%; display: grid; place-items: center;
  border: 2px solid var(--c-xp); background: color-mix(in srgb, var(--c-xp) 16%, var(--bg-app)); color: var(--c-xp); }
.dst > svg, .dst > .ic { width: 22px; height: 22px; display: grid; place-items: center; }
.dst > .ic svg { width: 100%; height: 100%; display: block; }
.dst.off { border-color: var(--line-strong); background: transparent; color: var(--text-2); opacity: var(--badge-off-opacity); }
.dst.l { width: var(--dst-l); height: var(--dst-l); } .dst.l > svg, .dst.l > .ic { width: 30px; height: 30px; }
.dst-tile .st { color: var(--text); font-weight: 600; }          /* rareté : en texte blanc (les états s'écrivent en blanc) */
.dst-tile.got { border-color: var(--line-xp); }
.sheet.dst-sheet .dst-head { display: flex; align-items: center; text-align: left; gap: var(--sp-3); padding-right: var(--h-touch); }
.sheet.dst-sheet .dst-head .eyebrow { margin: 0 0 var(--sp-1); color: var(--c-xp); }
.sheet.dst-sheet h2 { text-align: left; }
.sheet.dst-sheet .dst-cond { margin: 0; text-align: left; font: var(--t-body); color: var(--text-2); }
.sheet.dst-sheet .dst-state { margin: 0; display: flex; align-items: center; gap: var(--sp-2); font: var(--t-body); font-weight: 600; color: var(--text); }
.sheet.dst-sheet .dst-state svg, .dst-sheet .dst-state .ic { width: 20px; height: 20px; color: var(--text-2); }
.sheet.dst-sheet .dst-state.got svg, .dst-sheet .dst-state.got .ic { color: var(--c-success); }
