/* Polices hébergées avec le jeu (licence SIL OFL, voir polices/LICENCE.txt) : aucune requête vers un service tiers. */
@font-face { font-family: 'Lilita One'; src: url('polices/lilita-one.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Space Grotesk'; src: url('polices/space-grotesk-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Space Grotesk'; src: url('polices/space-grotesk-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }
:root { --nuit: #1b1330; --nuit2: #2a1f47; --papier: #fff4dc; --papier2: #f6e6c2; --encre: #241a3a; --doux: #6a5f80; --jaune: #ffd23f; --a: #9b5de5; --b: #1fb37e; --vit: #e5484d; --souffle: #3a8fe0; --moral: #f2a900; --alerte: #b3261e; --titre: 'Lilita One', 'Arial Rounded MT Bold', 'Trebuchet MS', sans-serif; --texte: 'Space Grotesk', system-ui, 'Segoe UI', sans-serif; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--nuit); color: var(--papier); font: 16px/1.45 var(--texte); }
main { max-width: 1180px; margin: 0 auto; padding: 14px 16px 40px; }
h1, h2, h3 { font-family: var(--titre); font-weight: 400; letter-spacing: .01em; }
.tete { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin: 4px 0 14px; }
h1 { font-size: 30px; margin: 0; color: var(--jaune); text-shadow: 0 3px 0 var(--encre); }
.tete p { margin: 0; color: #cdbfe6; font-size: 15px; max-width: 64ch; }
h2 { font-size: 20px; margin: 22px 0 10px; color: var(--papier); }
button { font: inherit; font-weight: 700; min-height: 44px; padding: 8px 16px; border: 3px solid var(--encre); border-radius: 12px; background: var(--papier); color: var(--encre); cursor: pointer; box-shadow: 0 4px 0 var(--encre); transition: transform .06s, box-shadow .06s; }
button:hover { background: #fff; }
button:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--encre); }
button.principal { background: var(--jaune); font-family: var(--titre); font-weight: 400; font-size: 19px; padding: 8px 22px; }
button.principal:hover { background: #ffe07a; }
button:disabled { opacity: .5; cursor: default; transform: none; }
button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid var(--jaune); outline-offset: 2px; }
input, select { font: inherit; min-height: 44px; padding: 8px 10px; border: 3px solid var(--encre); border-radius: 12px; background: #fff; color: var(--encre); }

/* Écurie */
.ecurie { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.ecurie button { display: grid; grid-template-rows: auto auto; justify-items: center; gap: 4px; padding: 8px 6px 10px; min-width: 0; text-align: center; font-weight: 400; background: var(--nuit2); color: var(--papier); border-color: #000; box-shadow: 0 4px 0 #000; }
.ecurie button:hover { background: #352759; }
.ecurie button[aria-pressed="true"] { background: var(--papier); color: var(--encre); border-color: var(--jaune); box-shadow: 0 4px 0 var(--jaune); }
.ecurie .portrait { width: 74px; height: 74px; border-radius: 50%; background: var(--a); border: 3px solid var(--encre); }
.ecurie button.repos .portrait { filter: grayscale(.9); opacity: .7; }
.ecurie strong { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--titre); font-weight: 400; font-size: 16px; }
.ecurie small { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; opacity: .85; }
.ecurie .infos { min-width: 0; max-width: 100%; }
.ecurie button.libre { border-style: dashed; border-color: #6a5f80; box-shadow: none; color: #cdbfe6; align-content: center; min-height: 150px; }
.ecurie button.libre[aria-pressed="true"] { background: #3a2b62; color: var(--papier); border-color: var(--jaune); box-shadow: none; }
.ecurie .plus { font-family: var(--titre); font-size: 38px; line-height: 1; color: var(--jaune); }
.etat { display: inline-block; margin-top: 4px; padding: 1px 9px; border-radius: 10px; font-size: 12px; font-weight: 700; background: #c9f2d9; color: #0c5136; }
.etat.blesse { background: #ffe2a8; color: #6b4300; }
.etat.repos { background: #ffc9c2; color: #7a1a13; }
.barre-ecurie { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 12px 0 0; }

/* Arène */
.scene { margin-top: 18px; border: 4px solid #000; border-radius: 18px; overflow: hidden; background: var(--encre); container-type: inline-size; box-shadow: 0 8px 0 #000; }
.ecran { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #000; }
.ecran > svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.fx-texte { font-family: var(--titre); paint-order: stroke; stroke: var(--encre); stroke-width: 10px; stroke-linejoin: round; }
.pansement.grave rect { fill: #ff9d94; }
.hud { position: absolute; inset: 1.6cqw 1.8cqw auto; display: grid; grid-template-columns: 1fr auto 1fr; gap: 1.6cqw; align-items: start; pointer-events: none; }
.hud-cote { display: flex; gap: 1cqw; align-items: center; min-width: 0; }
.hud-cote.b { flex-direction: row-reverse; text-align: right; }
.hud .portrait { width: 6.4cqw; height: 6.4cqw; flex: none; border-radius: 50%; border: .35cqw solid var(--encre); background: var(--a); }
.hud-cote.b .portrait { background: var(--b); transform: scaleX(-1); }
.hud-infos { flex: 1; min-width: 0; }
.hud-nom { font-family: var(--titre); font-size: clamp(13px, 2.3cqw, 30px); line-height: 1.1; color: #fff; text-shadow: 0 .2cqw 0 var(--encre), 0 0 .6cqw var(--encre); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hud-sous { font-size: clamp(10px, 1.25cqw, 15px); font-weight: 700; color: #f3e9ff; text-shadow: 0 1px 0 var(--encre), 0 0 4px var(--encre); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: .3cqw; }
.hud-vie { position: relative; height: 2.1cqw; min-height: 12px; border: .3cqw solid var(--encre); border-radius: 1.2cqw; background: #3b2f57; overflow: hidden; }
.hud-vie i { position: absolute; inset: 0 auto 0 0; width: 100%; border-radius: 1cqw; }
.hud-cote.b .hud-vie i { inset: 0 0 0 auto; }
.hud-vie .fantome { background: #fff4dc; transition: width .5s .35s; }
.hud-vie .plein { background: linear-gradient(#ff7a6b, var(--vit)); transition: width .14s; }
.hud-vie b { position: absolute; inset: 0 .8cqw; font-size: clamp(9px, 1.2cqw, 14px); line-height: 1.5cqw; color: #fff; text-shadow: 0 1px 0 var(--encre); }
.hud-mini { display: grid; grid-template-columns: 1fr 1fr; gap: .6cqw; margin-top: .45cqw; }
.hud-mini div { height: 1cqw; min-height: 6px; border: .22cqw solid var(--encre); border-radius: 1cqw; background: #3b2f57; overflow: hidden; display: flex; }
.hud-cote.b .hud-mini div { flex-direction: row-reverse; }
.hud-mini i { width: 100%; transition: width .2s; }
.hud-mini .souffle i { background: #6ab6ff; }
.hud-mini .moral i { background: var(--jaune); }
.hud-legende { display: grid; grid-template-columns: 1fr 1fr; gap: .6cqw; font-size: clamp(9px, 1cqw, 12px); font-weight: 700; color: #fff; text-shadow: 0 1px 0 var(--encre), 0 0 3px var(--encre); }
.hud-centre { display: grid; justify-items: center; gap: .3cqw; padding-top: .2cqw; }
.hud-centre b { display: grid; place-items: center; min-width: 6.6cqw; height: 4.6cqw; padding: 0 1cqw; font-family: var(--titre); font-weight: 400; font-size: clamp(14px, 2.6cqw, 34px); color: var(--encre); background: var(--jaune); border: .35cqw solid var(--encre); border-radius: 1.4cqw; box-shadow: 0 .4cqw 0 var(--encre); }
.hud-centre span { font-size: clamp(10px, 1.2cqw, 14px); font-weight: 700; color: #fff; text-shadow: 0 1px 0 var(--encre), 0 0 4px var(--encre); white-space: nowrap; }
.commentaire { display: grid; place-items: center; min-height: 3.3em; margin: 0; padding: 6px 16px; font-size: clamp(13px, 1.7cqw, 19px); line-height: 1.3; font-weight: 700; text-align: center; color: var(--papier); background: var(--encre); border-top: 4px solid #000; }
.commentaire.critique, .commentaire.blessure { color: #ffb3a8; }
.commentaire.evenement, .commentaire.arme, .commentaire.effet { color: var(--jaune); }
.commentaire.fin { color: var(--jaune); font-family: var(--titre); font-weight: 400; }
.bandeau, .annonce { position: absolute; left: 50%; top: 17%; transform: translate(-50%, -30%) scale(.9); opacity: 0; transition: opacity .16s, transform .16s; pointer-events: none; text-align: center; }
.bandeau.visible, .annonce.visible { opacity: 1; transform: translate(-50%, 0) scale(1); }
.bandeau { display: grid; gap: .2cqw; padding: .8cqw 2.4cqw 1cqw; background: var(--jaune); color: var(--encre); border: .35cqw solid var(--encre); border-radius: 1.4cqw; box-shadow: 0 .5cqw 0 var(--encre); rotate: -2deg; }
.bandeau b { font-family: var(--titre); font-weight: 400; font-size: clamp(15px, 2.6cqw, 32px); }
.bandeau span { font-size: clamp(11px, 1.4cqw, 17px); font-weight: 700; }
.annonce { top: 24%; padding: .5cqw 2.2cqw .7cqw; font-family: var(--titre); font-size: clamp(16px, 3.2cqw, 42px); color: #fff; background: var(--a); border: .35cqw solid var(--encre); border-radius: 1.4cqw; box-shadow: 0 .5cqw 0 var(--encre); rotate: -3deg; white-space: nowrap; }
.annonce.b { background: var(--b); rotate: 3deg; }
.scene.vide .hud { display: none; }
.issue { margin-top: 12px; padding: 12px 18px 8px; background: var(--papier); color: var(--encre); border: 4px solid var(--encre); border-radius: 18px; box-shadow: 0 6px 0 #000; display: grid; grid-template-columns: auto 1fr; gap: 0 18px; align-items: baseline; }
.issue .bilan { grid-column: 1 / -1; }
.issue h3 { margin: 0; font-size: 30px; }
.issue h3.defaite { color: var(--alerte); }
.issue p { margin: 2px 0 10px; color: var(--doux); font-size: 14px; }
.bilan { margin: 0 0 12px; padding: 0; list-style: none; text-align: left; }
.bilan li { padding: 5px 10px; margin: 4px 0; border-left: 6px solid #d9c9a0; background: var(--papier2); border-radius: 6px; font-size: 15px; }
.bilan .niveau, .bilan .art { border-color: var(--a); font-weight: 700; }
.bilan .arme { border-color: var(--b); font-weight: 700; }
.bilan .repos { border-color: var(--alerte); }
/* Révélation d'une arme rare ou légendaire : bord coloré et léger halo. */
.bilan .arme.r-rare, .bilan .arme.r-legendaire { border-color: var(--c); border-left-width: 6px; }
.bilan .arme.r-legendaire { box-shadow: 0 0 0 1px var(--c), 0 0 12px -4px var(--c); }

/* Pastille de rareté */
.pastille-rarete { display: inline-block; margin-left: 2px; padding: 0 8px; border-radius: 10px; border: 2px solid var(--c); color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); font-size: 12px; font-weight: 700; vertical-align: middle; white-space: nowrap; }
.pastille-rarete.r-legendaire { background: color-mix(in srgb, var(--c) 20%, transparent); }

.commandes { display: flex; gap: 12px 14px; flex-wrap: wrap; align-items: center; margin: 18px 0 6px; }
.commandes label { font-size: 14px; color: #cdbfe6; display: flex; gap: 8px; align-items: center; }
.commandes input { width: 120px; }
.vitesses { display: flex; }
.vitesses button { border-radius: 0; margin-left: -3px; padding: 8px 12px; }
.vitesses button:first-child { border-radius: 12px 0 0 12px; margin-left: 0; }
.vitesses button:last-child { border-radius: 0 12px 12px 0; }
.vitesses button[aria-pressed="true"] { background: var(--encre); color: var(--jaune); }

/* Fiches */
.fiches { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 16px; }
.carte, .creation, .journal-bloc { background: var(--papier); color: var(--encre); border: 4px solid var(--encre); border-radius: 18px; box-shadow: 0 6px 0 #000; padding: 14px 16px; min-width: 0; }
.carte.a { border-top: 12px solid var(--a); }
.carte.b { border-top: 12px solid var(--b); }
.entete { display: flex; gap: 12px; align-items: center; }
.entete .portrait { width: 84px; height: 84px; flex: none; border-radius: 16px; border: 3px solid var(--encre); background: var(--a); }
.carte.b .entete .portrait { background: var(--b); }
.entete > div { flex: 1; min-width: 0; }
.role { margin: 0 0 4px; font-size: 13px; font-weight: 700; color: var(--doux); }
.nom { display: flex; gap: 8px; flex-wrap: wrap; }
.nom input { flex: 1 1 170px; min-width: 0; font-weight: 700; }
.nom strong { flex: 1 1 170px; font-family: var(--titre); font-weight: 400; font-size: 22px; align-self: center; }
.erreur { color: var(--alerte); font-size: 14px; min-height: 20px; margin: 4px 0 0; }
.identite { margin: 0 0 10px; color: var(--doux); font-size: 14px; }
.jauges { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 8px 0; }
.jauges div { border-radius: 10px; padding: 4px 8px; color: #fff; font-size: 13px; font-weight: 700; }
.jauges b { display: block; font-family: var(--titre); font-weight: 400; font-size: 22px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.jauges .vit { background: var(--vit); } .jauges .souffle { background: #2c78c4; } .jauges .moral { background: #9a6b00; }
.xp { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; font-size: 13px; font-weight: 700; margin: 8px 0; }
.xp div { height: 12px; background: #e3d6b8; border: 2px solid var(--encre); border-radius: 8px; overflow: hidden; }
.xp i { display: block; height: 100%; background: var(--a); }
.grille { display: grid; grid-template-columns: repeat(8, 1fr); gap: 5px; margin: 10px 0; }
.grille div { border: 2px solid var(--encre); border-radius: 9px; padding: 3px 2px; text-align: center; background: #fff; }
.grille b { display: block; font-size: 18px; line-height: 1.15; font-variant-numeric: tabular-nums; }
.grille small { color: var(--doux); font-size: 11px; font-weight: 700; }
dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; margin: 8px 0 0; font-size: 14px; }
dt { color: var(--doux); font-weight: 700; } dd { margin: 0; }
.pied-carte { margin-top: 14px; display: flex; gap: 8px; flex-wrap: wrap; }
summary { cursor: pointer; font-family: var(--titre); font-size: 18px; }
.journal-bloc { margin-top: 18px; }
.journal { max-height: 340px; overflow-y: auto; margin-top: 8px; }
.journal p { margin: 3px 0; font-size: 15px; }
.journal .n { display: inline-block; min-width: 34px; color: var(--doux); font-variant-numeric: tabular-nums; }
.journal .critique, .journal .blessure { font-weight: 700; color: var(--alerte); }
.journal .evenement, .journal .arme, .journal .effet { color: #7a4b00; font-weight: 700; }
/* Panache : coup d'éclat d'une arme rare (doré) ou coup qui glisse (terne). */
.journal .coup-eclat { font-weight: 700; color: #a9760a; }
.journal .coup-glisse { color: var(--doux); }
.journal .fin { font-weight: 700; }
.journal .rate, .journal .garde, .journal .feinte, .journal .deplacement, .journal .perdu, .journal .saignement, .vide { color: var(--doux); }
.bas { margin: 26px 0 8px; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; color: #cdbfe6; font-size: 14px; }

/* Création */
.creation { margin-top: 18px; border-top: 12px solid var(--a); display: grid; grid-template-columns: 1fr 240px; gap: 6px 20px; align-items: start; }
.creation h2 { margin: 0 0 4px; color: var(--encre); grid-column: 1 / -1; }
.creation .etapes { min-width: 0; }
.apercu { position: sticky; top: 12px; border: 3px solid var(--encre); border-radius: 16px; background: linear-gradient(#cdb8f2, #f6e6c2 78%, #b9a57c 78%); overflow: hidden; }
.apercu svg { display: block; width: 100%; height: auto; }
.apercu p { margin: 0; padding: 6px 10px; font-size: 13px; font-weight: 700; text-align: center; background: var(--encre); color: var(--papier); }
.etape { border-top: 2px solid #e3d2a6; padding: 10px 0; }
.etape h3 { margin: 0 0 4px; font-size: 18px; }
.etape p { margin: 4px 0; }
.lignees { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.lignees button { display: grid; grid-template-columns: 62px 1fr; gap: 2px 10px; align-items: start; align-content: start; text-align: left; font-weight: 400; min-width: 0; padding: 8px 10px; }
.lignees .portrait { width: 62px; height: 62px; grid-row: span 3; border-radius: 12px; border: 3px solid var(--encre); background: #d9c8f5; }
.lignees strong { font-family: var(--titre); font-weight: 400; font-size: 18px; }
.lignees small { color: var(--doux); font-size: 12.5px; line-height: 1.25; }
.lignees button.destin { background: var(--encre); color: var(--papier); grid-template-columns: 1fr; }
.lignees button.destin small { color: #e6def5; }
.tirage { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.tirage th, .tirage td { border: 1px solid #d9c9a0; padding: 4px 6px; text-align: center; }
.tirage th:first-child, .tirage td:first-child { text-align: left; font-weight: 700; }
.tirage td:last-child { font-weight: 700; background: #fff; }
.table-defilante { overflow-x: auto; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
[hidden] { display: none !important; }
@media (max-width: 900px) { .ecurie { grid-template-columns: repeat(3, 1fr); } .grille { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 720px) { .fiches { grid-template-columns: 1fr; } .creation { grid-template-columns: 1fr; } .apercu { position: static; max-width: 220px; justify-self: center; grid-row: 2; } .scene { border-radius: 12px; } }
@container (max-width: 560px) { .hud-sous, .hud-legende, .hud-vie b { display: none; } .hud-centre span { display: none; } }
@media (prefers-reduced-motion: reduce) { .bandeau, .annonce, button { transition: none; } }

/* Barre d'outils : joueurs en ligne, compte, son */
.tete { align-items: center; }
.tete > p { flex-basis: 100%; }
.outils { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.outils button { min-height: 40px; padding: 4px 12px; font-size: 14px; }
.outils button[aria-pressed="false"] { background: var(--nuit2); color: #a99cc4; text-decoration: line-through; }
.volume { display: flex; gap: 6px; align-items: center; font-size: 13px; color: #cdbfe6; }
.volume input { width: 90px; min-height: 0; padding: 0; border: 0; background: none; accent-color: var(--jaune); }
.enligne { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 20px; background: var(--nuit2); border: 2px solid #000; font-size: 14px; font-weight: 700; color: #c9f2d9; }
.enligne::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: #35d68a; box-shadow: 0 0 0 3px rgba(53, 214, 138, .25); }
.avis { margin: 0 0 12px; padding: 10px 14px; border: 3px solid var(--encre); border-radius: 12px; background: #ffe2a8; color: #4d3200; font-weight: 700; }
.avis.erreur { background: #ffc9c2; color: #6d140d; min-height: 0; }
#duel.recherche { background: var(--encre); color: var(--jaune); }
.bas a { color: var(--jaune); }

/* Fenêtre du compte */
dialog.compte { width: min(94vw, 520px); max-height: 92vh; padding: 0; border: 4px solid var(--encre); border-radius: 18px; background: var(--papier); color: var(--encre); box-shadow: 0 8px 0 #000; }
dialog.compte::backdrop { background: rgba(27, 19, 48, .78); }
.compte-tete { display: flex; align-items: center; gap: 10px; padding: 14px 18px 0; }
.compte-tete h2 { flex: 1; margin: 0; color: var(--encre); font-size: 24px; }
.compte-tete button { min-height: 40px; padding: 4px 12px; }
.compte-corps { padding: 6px 18px 18px; }
.compte form, .compte section { display: grid; gap: 10px; padding: 12px 0; border-top: 2px solid #e3d2a6; }
.compte form:first-child, .compte section:first-child { border-top: 0; }
.compte h3 { margin: 0; font-size: 18px; }
.compte label { display: grid; gap: 3px; font-size: 14px; font-weight: 700; }
.compte label.case { grid-template-columns: 24px 1fr; align-items: start; gap: 8px; font-weight: 400; }
.compte label.case input { min-height: 0; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--a); }
.compte input:not([type="checkbox"]) { width: 100%; }
.compte small, .compte p { margin: 0; font-size: 13.5px; color: var(--doux); }
.compte a { color: #5b2bb0; }
.compte .message { min-height: 20px; font-weight: 700; color: var(--alerte); }
.compte .message.bon { color: #0c6b45; }
.compte .liens { display: flex; gap: 14px; flex-wrap: wrap; }
.compte .liens button, .compte button.lien { min-height: 0; padding: 0; border: 0; box-shadow: none; background: none; color: #5b2bb0; text-decoration: underline; font-weight: 700; }
.compte button.danger { background: #ffc9c2; }

/* Bouton sous forme de lien (tableau de bord admin) */
a.bouton { display: inline-flex; align-items: center; min-height: 40px; padding: 4px 12px; border: 3px solid var(--encre); border-radius: 12px; background: var(--papier); color: var(--encre); font-weight: 700; font-size: 14px; text-decoration: none; box-shadow: 0 4px 0 var(--encre); }
a.bouton:hover { background: #fff; }
a.bouton:focus-visible { outline: 3px solid var(--jaune); outline-offset: 2px; }
#bouton-admin { background: var(--jaune); }
.compte .actions-compte { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* Annonce des administrateurs, visible par tous */
.annonce-site { margin: 0 0 12px; padding: 10px 14px; border: 3px solid var(--encre); border-radius: 12px; background: var(--jaune); color: var(--encre); font-weight: 700; }

/* Sans compte : places fermées et combats du jour */
.ecurie button.verrou { border-style: dashed; border-color: #6a5f80; box-shadow: none; background: transparent; color: #cdbfe6; align-content: center; min-height: 150px; grid-column: span 5; }
.ecurie button.verrou:hover:not(:disabled) { background: #2a1f47; color: var(--papier); }
.ecurie button.verrou .plus { font-size: 30px; }
@media (max-width: 900px) { .ecurie button.verrou { grid-column: span 2; } }
.quota { font-size: 14px; font-weight: 700; color: #c9f2d9; padding: 6px 12px; border-radius: 20px; background: var(--nuit2); border: 2px solid #000; }
.quota.epuise { color: #ffc9c2; }
.vitesses button:disabled { opacity: .35; }

/* Outil admin sur la carte du combattant : forcer l'arme */
.admin-arme { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 12px; padding: 8px 10px; border: 2px dashed #b89a3c; border-radius: 10px; background: #fff7de; }
.admin-arme span { font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 8px; background: var(--jaune); border: 2px solid var(--encre); }
.admin-arme select { flex: 1 1 200px; min-width: 0; max-width: 100%; min-height: 40px; }
.admin-arme button { min-height: 40px; padding: 4px 12px; font-size: 14px; }

/* Trophées et flèches de classement (jeu et page des classements) */
.badge-trophee { display: inline-flex; align-items: center; gap: 4px; vertical-align: middle; }
/* Le rond : couleur de la médaille ; le cercle : couleur de la rareté (plus épais à partir de rare, lueur pour les légendaires). */
.badge-trophee .rond { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--c); color: #fff; border: 2px solid var(--encre); box-shadow: 0 0 0 2px var(--r), 0 2px 0 2px var(--encre); margin: 2px; }
.badge-trophee.quotidien .rond { color: var(--encre); }
.badge-trophee.r-rare .rond { box-shadow: 0 0 0 3px var(--r), 0 2px 0 3px var(--encre); }
.badge-trophee.r-legendaire .rond { box-shadow: 0 0 0 3px var(--r), 0 0 10px 3px color-mix(in srgb, var(--r) 70%, transparent), 0 2px 0 3px var(--encre); background: linear-gradient(135deg, var(--c) 0%, var(--c) 40%, #fff6c8 50%, var(--c) 60%, var(--c) 100%); background-size: 260% 260%; animation: medaille-brille 3.2s ease-in-out infinite; }
@keyframes medaille-brille { 0%, 55% { background-position: 100% 100%; } 100% { background-position: 0% 0%; } }
@media (prefers-reduced-motion: reduce) { .badge-trophee.r-legendaire .rond { animation: none; } }
.badge-trophee.complet .rond { width: 32px; height: 32px; }
.badge-trophee .nom-trophee { font-weight: 700; }
.badge-trophee .fois { font-size: 12px; font-weight: 700; padding: 0 6px; border-radius: 9px; background: var(--encre); color: var(--jaune); }
.badge-trophee.verrouille { opacity: .45; filter: grayscale(1); }
.plus-medailles { display: inline-grid; place-items: center; min-width: 26px; height: 22px; padding: 0 6px; margin-left: 2px; border-radius: 11px; font-size: 12px; font-weight: 700; background: rgba(36, 26, 58, .12); color: inherit; cursor: help; }
.insigne-grade { flex: none; vertical-align: middle; filter: drop-shadow(0 2px 0 rgba(0, 0, 0, .35)); }
.insigne-grade.g6 { filter: drop-shadow(0 2px 0 rgba(0, 0, 0, .35)) drop-shadow(0 0 6px rgba(216, 58, 63, .7)); }
.ecurie strong .insigne-grade { margin-right: 4px; vertical-align: -2px; }
.carte-grade { display: flex; align-items: center; gap: 14px; margin: 6px 0 12px; padding: 10px 14px; border: 3px solid var(--encre); border-left: 8px solid var(--g); border-radius: 14px; background: color-mix(in srgb, var(--g) 10%, var(--papier)); }
.carte-grade p { margin: 0; }
.carte-grade .nom-grade { font-family: var(--titre); font-size: 21px; }
.carte-grade .renommee { font-weight: 700; font-size: 14px; }
.carte-grade .suite-grade { font-size: 13px; color: var(--doux); }
.jauge-grade { width: min(260px, 60vw); height: 10px; margin: 5px 0 3px; border: 2px solid var(--encre); border-radius: 6px; background: #fff; overflow: hidden; }
.jauge-grade span { display: block; height: 100%; background: var(--g); }
.vitrine-medailles { display: grid; gap: 10px; margin-bottom: 8px; }
.rangee-vitrine { padding: 4px 0 2px 12px; border-left: 4px solid var(--r); }
.rangee-vitrine h4 { margin: 0 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .12em; color: var(--r); filter: brightness(.8); }
.vitrine-medailles .medailles { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.a-gagner summary { cursor: pointer; font-weight: 700; color: var(--doux); }
.a-gagner .medailles { margin-top: 8px; }
.bilan li.grade { font-weight: 700; color: #6b2fb3; }
.groupe-trophees .intro { margin: 0 0 8px; font-size: 14px; color: var(--doux); }
.groupe-trophees:not(.grades) li { display: block; }
.groupe-trophees .tete-medaille { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.groupe-trophees li > p { margin: 2px 0 0 44px; }
.groupe-trophees .paliers { font-size: 13px; color: var(--doux); font-style: italic; }
.groupe-trophees .nom-grade { display: inline-flex; align-items: center; gap: 8px; }
.groupe-trophees.grades li strong { font-family: var(--titre); font-weight: 400; font-size: 17px; }
.mouvement { display: inline-flex; align-items: center; gap: 3px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mouvement .triangle { font-size: 11px; }
.mouvement.monte { color: #0b7a4b; }
.mouvement.descend { color: #b3261e; }
.mouvement.egal { color: #6a5f80; }
.mouvement.nouveau { font-size: 11px; padding: 1px 7px; border-radius: 9px; background: #1d5fa8; color: #fff; }

/* Page des classements */
.page-classement .tete p { max-width: 80ch; }
.hier-cartes { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.hier-carte { display: flex; gap: 14px; align-items: center; padding: 12px 16px; background: var(--papier); color: var(--encre); border: 4px solid var(--encre); border-radius: 18px; box-shadow: 0 6px 0 #000; }
.hier-carte .grand-rond { flex: none; display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; background: var(--c); color: var(--encre); border: 3px solid var(--encre); box-shadow: 0 3px 0 var(--encre); }
.hier-carte p { margin: 0; }
.hier-nom-trophee { font-family: var(--titre); font-size: 20px; }
.hier-qui { font-size: 15px; }
.hier-detail { font-size: 14px; color: var(--doux); font-weight: 700; }
.hier-vide { margin: 0; color: #cdbfe6; }
.onglets { display: flex; gap: 8px; flex-wrap: wrap; margin: 24px 0 10px; }
.onglets button { min-height: 40px; padding: 6px 14px; background: var(--nuit2); color: var(--papier); border-color: #000; box-shadow: 0 4px 0 #000; }
.onglets button:hover { background: #352759; }
.onglets button[aria-selected="true"] { background: var(--jaune); color: var(--encre); border-color: var(--encre); box-shadow: 0 4px 0 var(--encre); }
.filtres { min-height: 8px; margin-bottom: 12px; }
.filtres label { display: inline-flex; gap: 8px; align-items: center; font-weight: 700; }
table.classement { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--papier); color: var(--encre); border: 4px solid var(--encre); border-radius: 18px; box-shadow: 0 6px 0 #000; overflow: hidden; font-variant-numeric: tabular-nums; }
.legende-table { margin: 0 0 8px; color: #cdbfe6; font-weight: 700; }
table.classement th { background: var(--encre); color: var(--papier); font-size: 13px; text-align: left; padding: 8px 10px; }
table.classement td { padding: 7px 10px; border-top: 2px solid #ead9b0; vertical-align: middle; }
table.classement tr.moi td { background: #fff0b8; }
table.classement .rang { width: 3.5em; font-family: var(--titre); font-size: 20px; text-align: center; }
table.classement th.rang { font-family: var(--texte); font-size: 13px; }
table.classement tbody tr:nth-child(1) .rang { color: #c48a00; }
table.classement .evol { width: 6em; }
table.classement .nombre { text-align: right; white-space: nowrap; }
table.classement .fort { font-weight: 700; }
table.classement .vide { text-align: center; color: var(--doux); padding: 18px; }
.qui { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.qui strong { font-family: var(--titre); font-weight: 400; font-size: 17px; }
.qui .badges { display: inline-flex; gap: 3px; flex-wrap: wrap; }
.a-moi { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 9px; background: var(--a); color: #fff; }
.anonyme { color: var(--doux); font-style: italic; }
#miens { margin-top: 14px; }
.legende-trophees { margin-top: 28px; }
.legende-trophees > p { color: #cdbfe6; max-width: 70ch; }
.grille-trophees { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; align-items: start; }
.groupe-trophees { padding: 6px 16px 12px; background: var(--papier); color: var(--encre); border: 4px solid var(--encre); border-radius: 18px; box-shadow: 0 6px 0 #000; }
.groupe-trophees h3 { margin: 8px 0 6px; font-size: 19px; }
.groupe-trophees ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.groupe-trophees li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 14px; }
.groupe-trophees .desc { color: var(--doux); }
@media (max-width: 720px) {
  table.classement .large { display: none; }
  table.classement td, table.classement th { padding: 6px 6px; }
  table.classement .evol { width: auto; }
  .groupe-trophees li { grid-template-columns: 1fr; gap: 2px; }
}
/* Téléphone : la colonne Écurie et la colonne Hier disparaissent, l'écurie passe sous le nom et la flèche sous le rang. */
.qui .ecurie-tel, .rang .evol-tel { display: none; }
.qui strong .insigne-grade { margin-right: 5px; vertical-align: -3px; }
@media (max-width: 480px) {
  /* Vitrine de l'écurie : trois tuiles par ligne, plus basses, pour voir les combattants sans trop descendre. */
  main .vitrine { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  main .vitrine .tuile { padding: 6px 8px; border-radius: 10px; min-width: 0; }
  main .vitrine .tuile b { font-size: 19px; }
  main .vitrine .tuile span { font-size: 12px; }
  main .vitrine .tuile small { font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  table.classement .ecurie-col, table.classement .evol { display: none; }
  .qui .ecurie-tel { display: block; flex-basis: 100%; font-size: 13px; color: var(--doux); font-weight: 700; }
  .rang .evol-tel { display: block; font-size: 12px; }
  .rang .evol-tel .mouvement.vide { display: none; }
  .qui strong { font-size: 16px; }
  table.classement td.rang { width: 2.6em; }
}

/* Fiche du combattant : rang et trophées */
.rang-fiche { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 6px 0 4px; font-size: 14px; font-weight: 700; }
.rang-fiche a { color: var(--encre); }
.rang-fiche .badges { display: inline-flex; gap: 3px; flex-wrap: wrap; }
.bilan li.trophee { font-weight: 700; color: #8a5a00; }

/* ======== Deux pages : Écurie et Combat (novembre 2026) ======== */
.pages { display: flex; gap: 6px; padding: 4px; border-radius: 16px; background: var(--nuit2); border: 2px solid #000; }
.pages a { display: inline-flex; align-items: center; min-height: 40px; padding: 4px 16px; border-radius: 12px; color: var(--papier); font-family: var(--titre); font-size: 19px; text-decoration: none; }
.pages a:hover { background: #352759; }
.pages a[aria-current="page"] { background: var(--jaune); color: var(--encre); box-shadow: 0 3px 0 var(--encre); }
.pages a:focus-visible { outline: 3px solid var(--jaune); outline-offset: 2px; }
.titre-page { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; margin-bottom: 10px; }
.titre-page h2 { margin: 8px 0 0; font-size: 26px; }
.sous-titre { margin: 0; color: #cdbfe6; font-size: 14.5px; max-width: 80ch; }
.note { color: var(--doux); font-size: 14px; margin: 4px 0; }
.page .bas, footer.bas { margin-top: 26px; }
.bas .note { color: #cdbfe6; }

/* Vitrine */
.vitrine { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-bottom: 14px; }
.vitrine .tuile { display: grid; gap: 0; padding: 8px 12px; border-radius: 14px; background: var(--nuit2); border: 2px solid #000; box-shadow: 0 4px 0 #000; }
.vitrine .tuile b { font-family: var(--titre); font-weight: 400; font-size: 24px; line-height: 1.15; color: var(--jaune); font-variant-numeric: tabular-nums; }
.vitrine .tuile span { font-size: 13px; font-weight: 700; color: var(--papier); }
.vitrine .tuile small { font-size: 12.5px; color: #cdbfe6; }
.vitrine .tuile.attente b { color: #ffc9c2; font-size: 20px; }
.vitrine .tuile.attente .rebours { font-size: 13px; color: #ffc9c2; }

/* Cartes de l'écurie : favori et compte à rebours */
.ecurie button { position: relative; }
.etoile { position: absolute; top: 4px; right: 8px; font-size: 20px; color: var(--jaune); text-shadow: 0 2px 0 var(--encre); }
.ecurie button[aria-pressed="true"] .etoile { color: #d19a1f; }
.etat .rebours { font-variant-numeric: tabular-nums; }

/* Fiche en onglets */
.fiche { margin-top: 18px; background: var(--papier); color: var(--encre); border: 4px solid var(--encre); border-top: 12px solid var(--a); border-radius: 18px; box-shadow: 0 6px 0 #000; padding: 14px 16px; }
.fiche-tete { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; }
.fiche-tete > .portrait { width: 96px; height: 96px; border-radius: 18px; border: 3px solid var(--encre); background: var(--a); }
.fiche-nom { min-width: 0; }
.fiche-actions { display: grid; gap: 8px; justify-items: end; }
.fiche-actions .rangee { display: flex; gap: 6px; }
.fiche-actions .fleche { min-width: 44px; padding: 4px 8px; }
button.favori { padding: 4px 12px; }
button.favori.actif { background: var(--jaune); }
.dispo { margin: 4px 0 0; font-size: 14px; font-weight: 700; color: #0c6b45; }
.dispo.repos { color: #7a1a13; }
.onglets-fiche { margin: 14px 0 0; border-bottom: 3px solid var(--encre); padding-bottom: 10px; }
.fiche .onglets button, .encyclopedie .onglets button { background: var(--papier2); color: var(--encre); border-color: var(--encre); box-shadow: 0 3px 0 var(--encre); }
.fiche .onglets button[aria-selected="true"], .encyclopedie .onglets button[aria-selected="true"] { background: var(--encre); color: var(--jaune); }
.panneau { padding-top: 10px; min-height: 180px; }
.panneau h3 { margin: 14px 0 6px; font-size: 18px; }
.panneau h3:first-child { margin-top: 4px; }
.identite-grille { display: grid; grid-template-columns: 200px 1fr; gap: 16px; align-items: start; }
.identite-grille .apercu { position: static; }
.grille-large { grid-template-columns: repeat(4, 1fr); }
.grille-large div { padding: 6px 4px; }
.grille-large span { display: block; font-size: 12px; color: var(--doux); line-height: 1.2; }
.art { padding: 8px 12px; margin: 6px 0; border-left: 6px solid var(--a); background: var(--papier2); border-radius: 8px; }
.art h4 { margin: 0 0 2px; font-family: var(--titre); font-weight: 400; font-size: 17px; }
.art p { margin: 2px 0; font-size: 14px; }
.penchant { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; }
.penchant li { display: grid; grid-template-columns: minmax(130px, 220px) 1fr 3.5em; gap: 10px; align-items: center; font-size: 14px; font-weight: 700; }
.penchant div { height: 14px; background: #e3d6b8; border: 2px solid var(--encre); border-radius: 8px; overflow: hidden; }
.penchant i { display: block; height: 100%; background: linear-gradient(90deg, var(--a), #c49bff); }
.penchant b { text-align: right; font-variant-numeric: tabular-nums; }
.bloc-courbe { border: 2px solid var(--encre); border-radius: 12px; background: #fff; padding: 6px 8px 2px; }
svg.courbe { display: block; width: 100%; height: auto; font: 12px var(--texte); }
svg.courbe text { fill: var(--doux); }
svg.courbe .grille-courbe { stroke: #eadfc6; stroke-width: 1; }
svg.courbe .trace { fill: none; stroke: var(--a); stroke-width: 3; stroke-linejoin: round; }
svg.courbe circle { stroke: var(--encre); stroke-width: 1.5; }
svg.courbe circle.v { fill: #13a868; }
svg.courbe circle.d { fill: #e5484d; }
.legende-courbe { display: flex; gap: 14px; margin: 2px 0 4px; font-size: 12.5px; font-weight: 700; }
.legende-courbe .v { color: #13a868; } .legende-courbe .d { color: #e5484d; }
.historique { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 6px; }
.historique li { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 6px 10px; border-radius: 10px; background: var(--papier2); border-left: 6px solid #d9c9a0; }
.historique li.v { border-color: #13a868; } .historique li.d { border-color: #e5484d; }
.historique li.note, .historique li.erreur { display: block; border: 0; background: none; padding: 0; }
.issue-courte { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; font-family: var(--titre); color: #fff; border: 2px solid var(--encre); }
li.v .issue-courte { background: #13a868; } li.d .issue-courte { background: #e5484d; }
.historique .quoi { display: grid; min-width: 0; }
.historique .quoi small { color: var(--doux); }
.historique .gestes { display: flex; gap: 6px; flex-wrap: wrap; justify-content: end; }
.historique .gestes .bouton, .historique .gestes button { min-height: 36px; padding: 2px 10px; font-size: 14px; }

/* Page Combat : avant le combat */
.rediffusion { display: block; margin: 0 0 12px; padding: 10px 14px; border: 3px solid var(--encre); border-radius: 12px; background: #c9e4ff; color: var(--encre); }
.rediffusion button { display: block; min-height: 36px; padding: 2px 12px; margin-top: 8px; }
.avant-combat { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 16px; align-items: start; }
.avant-combat h3 { margin: 0 0 6px; font-size: 17px; color: var(--papier); }
.choix-combattant { min-width: 0; }
.choix-combattant .note { color: #cdbfe6; }
.mini-ecurie { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; }
.mini-ecurie button { position: relative; display: flex; gap: 8px; align-items: center; flex: none; padding: 4px 12px 4px 4px; text-align: left; font-weight: 400; background: var(--nuit2); color: var(--papier); border-color: #000; box-shadow: 0 4px 0 #000; }
.mini-ecurie button[aria-pressed="true"] { background: var(--papier); color: var(--encre); border-color: var(--jaune); box-shadow: 0 4px 0 var(--jaune); }
.mini-ecurie .portrait { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--encre); background: var(--a); }
.mini-ecurie button.repos .portrait { filter: grayscale(.9); opacity: .7; }
.mini-ecurie .infos { display: grid; line-height: 1.15; }
.mini-ecurie strong { font-family: var(--titre); font-weight: 400; font-size: 16px; }
.mini-ecurie small { font-size: 12px; opacity: .9; }
.mini-ecurie .pret { color: #13a868; font-weight: 700; opacity: 1; }
.mini-ecurie .rebours-mini { color: #e5484d; font-weight: 700; opacity: 1; }
.mini-ecurie .etoile { top: -6px; right: -4px; font-size: 16px; }
.modes { display: flex; align-self: end; margin-bottom: 8px; }
.modes button { border-radius: 0; margin-left: -3px; min-height: 40px; padding: 4px 14px; }
.modes button:first-child { border-radius: 12px 0 0 12px; margin-left: 0; }
.modes button:last-child { border-radius: 0 12px 12px 0; }
.modes button[aria-selected="true"] { background: var(--encre); color: var(--jaune); }
.adversaires { grid-column: 1 / -1; }
.deux { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.carte-adv { display: grid; grid-template-columns: 64px 1fr; gap: 10px; align-items: center; text-align: left; font-weight: 400; background: var(--nuit2); color: var(--papier); border-color: #000; box-shadow: 0 4px 0 #000; padding: 8px 12px; min-width: 0; }
.carte-adv:hover { background: #352759; }
.carte-adv[aria-pressed="true"] { background: var(--papier); color: var(--encre); border-color: var(--b); box-shadow: 0 4px 0 var(--b), 0 0 0 3px var(--b); }
.carte-adv .portrait { width: 64px; height: 64px; border-radius: 14px; border: 3px solid var(--encre); background: var(--b); transform: scaleX(-1); }
.carte-adv .infos { display: grid; min-width: 0; }
.carte-adv strong { font-family: var(--titre); font-weight: 400; font-size: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.carte-adv small { font-size: 13px; opacity: .9; }
.chiffres { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.chiffres > span { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; padding: 0 7px; border-radius: 8px; background: rgba(155, 93, 229, .18); }
.chiffres .mouvement { font-size: 12px; }
.chiffres .mouvement .triangle { font-size: 9px; }
/* Fiche du combattant choisi (page Combat), comparée à l'adversaire retenu */
.carte-moi { margin-top: 6px; max-width: 560px; border: 3px solid var(--a); border-radius: 12px; background: var(--papier); color: var(--encre); box-shadow: 0 4px 0 var(--a); }
.carte-moi:hover { background: var(--papier); }
.carte-moi .portrait { background: var(--a); transform: none; }
.carte-moi .chiffres > span { background: rgba(155, 93, 229, .14); }
.carte-moi .face-a { margin-top: 3px; font-size: 12px; color: var(--doux); opacity: 1; }
.carte-moi .detail-fiche { margin-top: 4px; font-size: 12px; }
.carte-moi .detail-fiche summary { cursor: pointer; width: max-content; font-family: var(--texte); font-size: 12px; font-weight: 700; color: var(--doux); }
.carte-moi .detail-fiche .chiffres { margin-top: 2px; }
/* Rapport de force sur les cartes adversaires : pastille claire, lisible sur la carte sombre comme sur la carte retenue */
.rapport { display: inline-flex; align-items: center; gap: 8px; width: max-content; margin-top: 5px; padding: 1px 9px; border-radius: 9px; background: var(--papier); color: var(--encre); border: 2px solid var(--encre); font-size: 12px; font-weight: 700; }
.rapport .mouvement { font-size: 12px; }
.rapport .mouvement .triangle { font-size: 9px; }
/* Face-à-face avant le combat : sa fiche, « VS », les adversaires */
.face-a-face { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 0 14px; align-items: start; }
.face-a-face .gauche .carte-moi { margin-top: 0; max-width: none; }
.face-a-face .vs { align-self: center; font-family: var(--titre); font-size: 34px; color: var(--jaune); text-shadow: 0 3px 0 #000; padding-top: 28px; }
.face-a-face.seul .vs { visibility: hidden; }
.face-a-face .droite { min-width: 0; }
.face-a-face .deux { grid-template-columns: 1fr; }
.face-a-face .deux.defis { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
@media (max-width: 720px) {
  .face-a-face { grid-template-columns: 1fr; }
  .face-a-face .vs { justify-self: center; padding: 6px 0 0; font-size: 26px; }
  .face-a-face.seul .vs { display: none; }
}
.indispo-panneau, .salle-attente { padding: 12px 16px; border-radius: 14px; background: var(--nuit2); border: 2px solid #000; }
.indispo-panneau strong { color: #ffc9c2; }
.indispo-panneau p, .salle-attente p { margin: 4px 0 0; color: #cdbfe6; }
.attente-anim { display: flex; gap: 8px; margin-top: 10px; }
.attente-anim i { width: 12px; height: 12px; border-radius: 50%; background: var(--jaune); animation: attente 1.2s infinite ease-in-out; }
.attente-anim i:nth-child(2) { animation-delay: .2s; } .attente-anim i:nth-child(3) { animation-delay: .4s; }
@keyframes attente { 0%, 80%, 100% { transform: scale(.5); opacity: .4; } 40% { transform: scale(1); opacity: 1; } }
#combat.recherche { background: var(--encre); color: var(--jaune); }

/* Arène : plein écran, silhouettes, écran de fin */
.plein-ecran { position: absolute; right: 1.2cqw; bottom: 1.2cqw; min-height: 0; width: 40px; height: 40px; padding: 0; font-size: 20px; line-height: 1; border-radius: 10px; opacity: .8; box-shadow: 0 3px 0 var(--encre); }
.plein-ecran:hover { opacity: 1; }
.scene.plein, .scene.plein-page { display: flex; flex-direction: column; justify-content: center; background: #000; border: 0; border-radius: 0; margin: 0; }
.scene.plein .ecran, .scene.plein-page .ecran { width: min(100vw, calc((100vh - 4em) * 16 / 9)); margin: 0 auto; }
.scene.plein-page { position: fixed; inset: 0; z-index: 50; }
.silhouette { flex: none; width: 3.2cqw; min-width: 18px; }
.silhouette svg { display: block; width: 100%; height: auto; overflow: visible; }
.silhouette [data-zone] { fill: rgba(255, 244, 220, .55); stroke: var(--encre); stroke-width: 1.6; transition: fill .2s; }
.silhouette .blesse { fill: #ffa24a; }
.silhouette .grave { fill: #e5484d; animation: palpite 1s infinite; }
@keyframes palpite { 50% { fill: #ff8a80; } }
.fin-combat { position: absolute; inset: 0; display: grid; place-items: center; padding: 3cqw; background: rgba(27, 19, 48, .62); backdrop-filter: blur(3px); animation: apparait .35s ease-out; }
@keyframes apparait { from { opacity: 0; } }
.fin-boite { width: min(560px, 100%); max-height: 100%; overflow: auto; padding: 14px 18px; text-align: center; background: var(--papier); color: var(--encre); border: 4px solid var(--encre); border-radius: 18px; box-shadow: 0 6px 0 #000; animation: monte .45s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes monte { from { transform: translateY(24px) scale(.94); opacity: 0; } }
.fin-boite h3 { margin: 0; font-size: clamp(26px, 4.4cqw, 44px); }
.fin-boite h3.v { color: #13a868; text-shadow: 0 3px 0 var(--encre); -webkit-text-stroke: 1px var(--encre); }
.fin-boite h3.d { color: var(--alerte); }
.fin-boite p { margin: 4px 0; font-size: 15px; color: var(--doux); }
.fin-boite .fin-repos { color: #7a1a13; font-weight: 700; }
.fin-boite .gestes { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 10px; }
.xp-fin { margin: 10px auto; max-width: 420px; }
.xp-fin i { transition: width .8s cubic-bezier(.3, .7, .3, 1); background: linear-gradient(90deg, var(--a), #c49bff); }
.xp-fin.monte span { color: var(--a); animation: bondit .5s; }
@keyframes bondit { 40% { transform: scale(1.25); } }

/* Journal : temps forts, statistiques */
.apres-combat { display: grid; gap: 0; }
.filtre-forts { display: inline-flex; gap: 8px; align-items: center; margin-top: 6px; font-size: 14px; font-weight: 700; }
.filtre-forts input { min-height: 0; width: 20px; height: 20px; accent-color: var(--a); }
.journal.forts p:not(.fort) { display: none; }
table.stats { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 14.5px; font-variant-numeric: tabular-nums; }
table.stats th, table.stats td { padding: 5px 8px; border-bottom: 1px solid #e3d2a6; text-align: center; }
table.stats tbody th { text-align: left; color: var(--doux); }
table.stats thead th.a { color: var(--a); } table.stats thead th.b { color: #0f8a5f; }
table.stats td.mieux { font-weight: 700; background: #fff0b8; }

/* Encyclopédie */
dialog.encyclopedie { width: min(96vw, 820px); }
.encyclopedie .onglets { padding: 0 18px 10px; margin: 10px 0 0; }
.encyclopedie .compte-corps { max-height: 70vh; overflow-y: auto; }
.encyclopedie .entree { display: block; padding: 10px 0; border-top: 2px solid #e3d2a6; }
.encyclopedie .entree::after { content: ""; display: block; clear: both; }
.encyclopedie .entree h3 { margin: 0 0 4px; }
.encyclopedie .entree.rarete h3 { color: var(--c); }
.encyclopedie .vignette { float: left; width: 64px; height: 64px; margin: 0 12px 4px 0; border-radius: 12px; border: 3px solid var(--encre); background: #d9c8f5; overflow: hidden; }
.encyclopedie .vignette .portrait { width: 100%; height: 100%; }
.encyclopedie .vignette.arme { background: radial-gradient(circle, #fff, color-mix(in srgb, var(--c) 30%, #fff)); }
.encyclopedie .vignette svg { width: 100%; height: 100%; }
.encyclopedie .compte-corps > p { margin: 8px 0; }

/* Cérémonie de l'arme */
.ceremonie { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; overflow: hidden; color: var(--papier); background: radial-gradient(ellipse at 50% 55%, #3a2668 0%, #1b1330 55%, #0b0716 100%); opacity: 0; transition: opacity .35s; }
.ceremonie.ouverte, .ceremonie.revelee { opacity: 1; }
.ceremonie.fermee { opacity: 0; }
.ceremonie .contenu { position: relative; z-index: 2; width: min(980px, 100vw); padding: 16px; display: grid; justify-items: center; gap: 14px; text-align: center; }
.cer-tete { display: flex; gap: 14px; align-items: center; }
.cer-tete .portrait { width: 72px; height: 72px; border-radius: 50%; border: 3px solid var(--encre); background: var(--a); box-shadow: 0 0 0 4px var(--jaune); }
.cer-tete h2 { margin: 0; font-size: clamp(22px, 4vw, 36px); color: var(--jaune); text-shadow: 0 3px 0 var(--encre); }
.sur-titre { margin: 0; font-weight: 700; letter-spacing: .3em; text-transform: uppercase; color: #cdbfe6; font-size: 13px; }
.roue { position: relative; width: 100%; height: 190px; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent); mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent); transition: height .5s, opacity .5s; }
.roue-bande { display: flex; height: 100%; align-items: center; will-change: transform; }
.repere { position: absolute; left: 50%; top: 0; bottom: 0; width: 4px; margin-left: -2px; background: var(--jaune); box-shadow: 0 0 12px var(--jaune); }
.repere::before, .repere::after { content: ""; position: absolute; left: -9px; border: 11px solid transparent; }
.repere::before { top: 0; border-top-color: var(--jaune); }
.repere::after { bottom: 0; border-bottom-color: var(--jaune); }
.carte-arme { flex: none; display: grid; justify-items: center; gap: 4px; width: 116px; margin: 0 8px; padding: 10px 6px 8px; border-radius: 16px; background: linear-gradient(170deg, #fff8e8, #f1e0b8); color: var(--encre); border: 4px solid var(--c); box-shadow: 0 5px 0 #000, inset 0 0 0 2px #fff; transition: transform .4s, opacity .4s, box-shadow .4s; }
.carte-arme .dessin-arme { width: 84px; height: 84px; }
.carte-arme span { font-family: var(--titre); font-size: 15px; line-height: 1.1; min-height: 2.2em; display: grid; place-items: center; }
.roue.arretee .carte-arme { opacity: .25; }
.roue.arretee .carte-arme.cible { opacity: 1; transform: scale(1.12); box-shadow: 0 0 0 4px var(--c), 0 0 40px var(--c), 0 5px 0 #000; }
.ceremonie.revelee .roue { height: 0; opacity: 0; }
.revelation { display: grid; justify-items: center; gap: 4px; max-width: 560px; animation: surgit .7s cubic-bezier(.2, 1.5, .35, 1); }
@keyframes surgit { from { transform: scale(.3) rotate(-8deg); opacity: 0; } }
.carte-arme.grande { width: 220px; padding: 18px 10px 14px; border-width: 6px; box-shadow: 0 0 0 4px #000, 0 0 60px var(--c), 0 0 140px color-mix(in srgb, var(--c) 60%, transparent); }
.carte-arme.grande .dessin-arme { width: 170px; height: 170px; filter: drop-shadow(0 6px 0 rgba(0, 0, 0, .25)); animation: flotte 3s ease-in-out infinite; }
.carte-arme.grande span { font-size: 24px; }
@keyframes flotte { 50% { transform: translateY(-8px) rotate(2deg); } }
.revelation .rarete { margin: 10px 0 0; padding: 2px 14px; border-radius: 20px; font-weight: 700; letter-spacing: .25em; text-transform: uppercase; color: #fff; background: var(--c); border: 2px solid var(--encre); text-shadow: 0 1px 0 var(--encre); }
.revelation h3 { margin: 2px 0; font-size: clamp(28px, 5vw, 46px); color: #fff; text-shadow: 0 3px 0 var(--encre), 0 0 24px var(--c); }
.revelation p { margin: 0; color: #e6def5; font-size: 16px; }
.cer-gestes { display: flex; gap: 10px; min-height: 48px; }
.cer-gestes .passer { background: transparent; color: #cdbfe6; border-color: #6a5f80; box-shadow: none; }
.rayons { position: absolute; left: 50%; top: 55%; width: 220vmax; height: 220vmax; margin: -110vmax 0 0 -110vmax; border-radius: 50%; opacity: 0; background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--c) 55%, transparent) 0deg 7deg, transparent 7deg 20deg); -webkit-mask-image: radial-gradient(circle, #000 0%, transparent 46%); mask-image: radial-gradient(circle, #000 0%, transparent 46%); transition: opacity 1s; animation: tourne 40s linear infinite; }
.ceremonie.revelee .rayons { opacity: .9; }
.ceremonie.legendaire.revelee .rayons { animation-duration: 18s; opacity: 1; }
@keyframes tourne { to { transform: rotate(360deg); } }
.eclair { position: absolute; inset: 0; background: radial-gradient(circle at 50% 55%, #fff, color-mix(in srgb, var(--c) 70%, #fff) 30%, transparent 70%); opacity: 0; pointer-events: none; }
.ceremonie.revelee .eclair { animation: eclair .9s ease-out; }
@keyframes eclair { 0% { opacity: 0; } 12% { opacity: 1; } 100% { opacity: 0; } }
.eclats { position: absolute; left: 50%; top: 52%; z-index: 3; pointer-events: none; }
.eclats i { position: absolute; width: var(--t); height: var(--t); border-radius: 50%; box-shadow: 0 0 8px currentColor; animation: eclat var(--d) cubic-bezier(.1, .7, .3, 1) forwards; }
@keyframes eclat { from { transform: translate(0, 0) scale(1.4); opacity: 1; } to { transform: translate(var(--x), calc(var(--y) + 60px)) scale(.2); opacity: 0; } }
.ceremonie.legendaire.revelee .revelation h3 { background: linear-gradient(90deg, #fff 0%, #ffe07a 30%, #fff 50%, #ffd23f 70%, #fff 100%); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: miroite 2.4s linear infinite; text-shadow: none; filter: drop-shadow(0 3px 0 var(--encre)) drop-shadow(0 0 18px var(--c)); }
@keyframes miroite { to { background-position: -200% 0; } }
.lecteur { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

@media (max-width: 900px) {
  .avant-combat { grid-template-columns: 1fr; }
  .modes { justify-self: start; }
  .identite-grille { grid-template-columns: 1fr; }
  .identite-grille .apercu { max-width: 200px; justify-self: center; }
}
@media (max-width: 720px) {
  .tete { gap: 8px; }
  .pages { order: 3; width: 100%; justify-content: stretch; }
  .pages a { flex: 1; justify-content: center; }
  /* Quatre pages (boutique et tournoi ouverts) : deux par ligne plutôt qu'une ligne qui déborde de l'écran. */
  /* L'en-tête garde 92 px à droite pour les drapeaux : la barre des pages, plus bas, reprend toute la largeur. */
  .pages { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); width: calc(100% + 92px); margin-right: -92px; }
  .pages a { min-width: 0; padding: 4px 8px; font-size: 17px; white-space: nowrap; justify-content: center; }
  .outils { margin-left: 0; }
  .fiche-tete { grid-template-columns: auto 1fr; }
  .fiche-tete > .portrait { width: 72px; height: 72px; }
  .fiche-actions { grid-column: 1 / -1; grid-template-columns: 1fr auto; justify-items: stretch; }
  .deux { grid-template-columns: 1fr; }
  .penchant li { grid-template-columns: 1fr 3.5em; }
  .penchant li div { grid-column: 1 / -1; grid-row: 2; }
  .historique li { grid-template-columns: auto 1fr; }
  .historique .gestes { grid-column: 1 / -1; justify-content: start; }
  .grille-large { grid-template-columns: repeat(2, 1fr); }
  .fin-boite { padding: 8px 10px; }
  .fin-boite p { font-size: 13px; }
  .roue { height: 160px; }
  .carte-arme { width: 96px; }
  .carte-arme .dessin-arme { width: 66px; height: 66px; }
}
@container (max-width: 560px) { .silhouette { display: none; } .fin-combat { padding: 6px; } .fin-boite { padding: 6px 8px; border-width: 3px; } .fin-boite h3 { font-size: 22px; } .fin-boite .gestes button { min-height: 34px; padding: 2px 10px; font-size: 14px; } .fin-boite .xp-fin { margin: 4px auto; } .plein-ecran { width: 32px; height: 32px; font-size: 16px; } }
@media (prefers-reduced-motion: reduce) {
  .ceremonie, .ceremonie *, .fin-combat, .fin-boite, .xp-fin i, .attente-anim i, .silhouette .grave { animation: none !important; transition: none !important; }
}

/* Piège à robots des formulaires : hors de l'écran, jamais vu ni lu par un humain. */
.piege { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Classements : place réservée pendant le chargement (la page ne saute pas quand le tableau arrive). */
.page-classement .table-defilante.chargement { min-height: 440px; }
.page-classement #hier-cartes:empty { min-height: 92px; }
.attente { visibility: hidden; }
.page-classement .legende-table { min-height: 1.5em; }
.page-classement #onglets:empty { min-height: 50px; }
@media (max-width: 720px) { .page-classement #onglets:empty { min-height: 150px; } }

/* Bouton de combat sous le choix des combattants (avant le combat) */
.lancement { grid-column: 1 / -1; display: flex; justify-content: center; margin-top: 4px; }
.lancement #combat { min-width: min(100%, 320px); font-size: 22px; padding: 10px 28px; }
.lancement { align-items: center; gap: 12px; flex-wrap: wrap; }

/* ---- Défi d'un joueur absent, nouveautés, défis reçus */
.recherche-defi { display: flex; gap: 8px; margin: 6px 0 10px; max-width: 520px; }
.recherche-defi input { flex: 1; min-width: 0; }
.deux.defis { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.carte-adv small.joueur { font-weight: 700; opacity: 1; color: var(--b); }
.carte-adv[aria-pressed="true"] small.joueur { color: var(--encre); }
.info .compte-corps { max-height: 72vh; overflow-y: auto; }
.info ul { margin: 6px 0 14px; padding-left: 20px; display: grid; gap: 10px; font-size: 14.5px; }
.info ul.defis-recus { list-style: none; padding: 0; }
.info .defis-recus li { display: grid; gap: 6px; justify-items: start; padding-bottom: 10px; border-bottom: 2px solid #e3d2a6; }
.info .defis-recus p { color: var(--encre); font-size: 14.5px; }
.info .defis-recus .note { color: var(--doux); }
.info .actions-compte { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
@media (max-width: 640px) { .modes button { padding: 4px 10px; } }

/* ---- Notifications : proposition sur l'écran de fin, aide pas à pas */
.proposition-notif { margin-top: 12px; padding-top: 12px; border-top: 2px dashed rgba(255, 255, 255, .25); }
.proposition-notif p { margin: 0 0 8px; }
.aide-notif { text-align: left; margin: 8px 0; padding: 10px 12px; border-radius: 12px; background: rgba(240, 178, 60, .14); border: 2px solid #f0b23c; }
.aide-notif strong { display: block; margin-bottom: 4px; }
.aide-notif ol { margin: 0; padding-left: 20px; display: grid; gap: 4px; font-size: 14px; }
.compte .aide-notif { color: var(--encre); }

/* Boutique (osselets, armures, entretien, potions, destin) */
.pages .bourse-mini { display: inline-block; white-space: nowrap; margin-left: 4px; padding: 0 7px; border-radius: 9px; background: var(--jaune); color: var(--encre); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
#page-boutique .fermee { color: #cdbfe6; }
.bourse { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 14px; }
.bourse .tuile { display: grid; padding: 8px 16px; border-radius: 14px; background: var(--nuit2); border: 2px solid #000; box-shadow: 0 4px 0 #000; min-width: 150px; }
.bourse .tuile b { font-family: var(--titre); font-weight: 400; font-size: 30px; line-height: 1.1; color: var(--jaune); font-variant-numeric: tabular-nums; }
.bourse .tuile span { font-size: 13px; font-weight: 700; }
.bareme { flex: 1 1 320px; background: var(--nuit2); border: 2px solid #000; border-radius: 14px; padding: 8px 14px; }
.bareme summary { cursor: pointer; font-weight: 700; color: var(--jaune); }
.bareme ul { margin: 8px 0 2px; padding-left: 20px; color: #e8dcff; font-size: 14.5px; }
.choix-boutique { display: flex; flex-wrap: wrap; gap: 8px; }
.choix-boutique button { display: flex; gap: 8px; align-items: center; padding: 4px 12px 4px 4px; font-weight: 400; text-align: left; background: var(--nuit2); color: var(--papier); border-color: #000; box-shadow: 0 4px 0 #000; }
.choix-boutique button:hover { background: #352759; }
.choix-boutique button[aria-pressed="true"] { background: var(--papier); color: var(--encre); border-color: var(--jaune); box-shadow: 0 4px 0 var(--jaune); }
.choix-boutique .portrait { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--encre); background: var(--a); }
.choix-boutique strong { display: block; font-family: var(--titre); font-weight: 400; }
.choix-boutique small { display: block; font-size: 12.5px; opacity: .85; }
.equipement-boutique { margin-top: 14px; background: var(--papier); color: var(--encre); border: 4px solid var(--encre); border-top: 10px solid var(--a); border-radius: 16px; box-shadow: 0 5px 0 #000; padding: 6px 16px 10px; }
.equipement-boutique h3 { margin: 6px 0; }
.ligne-equipement { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; margin: 4px 0; }
.ligne-equipement span { min-width: 140px; color: var(--doux); font-weight: 700; font-size: 14px; }
.ligne-equipement button { min-height: 34px; padding: 2px 12px; font-size: 14px; box-shadow: 0 3px 0 var(--encre); }
#page-boutique .onglets { margin-top: 18px; }
.articles { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.intro-rayon { grid-column: 1 / -1; margin: 0; color: #cdbfe6; font-size: 14.5px; max-width: 90ch; }
.article { display: flex; flex-direction: column; gap: 6px; background: var(--papier); color: var(--encre); border: 3px solid var(--encre); border-radius: 16px; box-shadow: 0 5px 0 #000; padding: 10px 14px 12px; }
.article.porte { border-color: var(--b); box-shadow: 0 5px 0 var(--b); }
.article.destin { grid-column: 1 / -1; max-width: 640px; border-top: 10px solid #d19a1f; }
.article header { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.article h4 { margin: 0; font-family: var(--titre); font-weight: 400; font-size: 19px; }
.article .prix { flex: none; padding: 1px 10px; border-radius: 10px; background: var(--encre); color: var(--jaune); font-weight: 700; font-variant-numeric: tabular-nums; }
.article .description { margin: 0; font-style: italic; color: var(--doux); font-size: 14.5px; }
.article .effets { margin: 0; padding: 0; list-style: none; font-size: 14.5px; }
.article .effets li::before { display: inline-block; width: 1.2em; font-weight: 700; }
.article .effets .plus { color: #0c6b45; }
.article .effets .plus::before { content: '+'; }
.article .effets .moins { color: var(--alerte); }
.article .effets .moins::before { content: '−'; }
.article .note { margin: 0; font-size: 13.5px; color: var(--doux); }
.article .gestes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 4px; }
.article .gestes button { min-height: 40px; padding: 4px 14px; }
.article button.confirmer { background: #ffc9c2; }
.bilan .osselets { border-color: var(--jaune); font-weight: 700; }
.bilan .potion, .bilan .boutique { border-color: var(--b); }

/* Drapeaux de langue, en haut à droite : le drapeau de la langue en cours est entouré, l'autre est un peu terni. */
.tete { position: relative; padding-right: 92px; }
.langues { position: absolute; top: 2px; right: 0; display: flex; gap: 6px; align-items: center; }
.langues button { min-height: 0; padding: 3px; line-height: 0; border-radius: 7px; border: 2px solid transparent; background: transparent; box-shadow: none; cursor: pointer; }
.langues button img { display: block; width: 30px; height: 20px; border-radius: 3px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .5); }
.langues button[aria-pressed="false"] img { opacity: .55; filter: saturate(.6); }
.langues button[aria-pressed="false"]:hover img { opacity: 1; filter: none; }
.langues button[aria-pressed="true"] { border-color: var(--jaune); cursor: default; }
.langues button:focus-visible { outline: 3px solid var(--jaune); outline-offset: 2px; }

/* Présentation du jeu en bas de l'accueil (lisible aussi par les moteurs de recherche) et liens vers l'encyclopédie. */
.presentation { margin: 34px 0 0; max-width: 74ch; color: #e8dcf6; }
.presentation h2 { color: var(--jaune); }
.presentation p { margin: 8px 0; }
.liens-encyclopedie { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; font-weight: 700; }
.liens-encyclopedie a { color: var(--jaune); }

/* ---- Page Tournoi : calendrier, mes combats, tableaux par journée, inscription, palmarès, règlement. */
#page-tournoi .note { color: #cdbfe6; }
.bloc-tournoi { margin: 18px 0; }
.bloc-tournoi h3 { font-family: var(--titre); font-weight: 400; font-size: 21px; color: var(--jaune); margin: 10px 0 8px; }
.bloc-tournoi h4 { font-family: var(--titre); font-weight: 400; font-size: 17px; margin: 14px 0 8px; }
.calendrier { font-size: 18px; font-weight: 700; margin: 4px 0; }
.badge-admin { display: inline-block; background: var(--alerte); color: #fff; border-radius: 999px; padding: 3px 12px; font-size: 14px; font-weight: 700; }
.present { color: var(--b); font-weight: 700; }
.grille-matchs { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.match-tournoi { background: var(--papier); color: var(--encre); border: 3px solid var(--encre); border-radius: 14px; box-shadow: 0 4px 0 #000; padding: 8px 12px 10px; display: flex; flex-direction: column; gap: 4px; }
.match-tournoi header { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.match-tournoi h4 { margin: 0; font-size: 15px; }
.match-tournoi .journee { font-size: 13px; color: var(--doux); font-weight: 700; }
.match-tournoi.etat-pret { border-color: var(--a); box-shadow: 0 4px 0 var(--a); }
.match-tournoi.etat-attente { background: var(--papier2); box-shadow: 0 4px 0 #000; }
.match-tournoi .participant { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; padding: 3px 6px; border-radius: 8px; }
.match-tournoi .participant .niveau, .match-tournoi .participant .qui { font-size: 13px; color: var(--doux); }
.match-tournoi .participant.gagnant { background: #d8f5e8; }
.match-tournoi .participant.perdant { opacity: .6; }
.match-tournoi .participant.moi b { text-decoration: underline; text-decoration-color: var(--a); text-decoration-thickness: 3px; }
.match-tournoi .participant.inconnu { color: var(--doux); font-style: italic; }
.match-tournoi footer { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 4px; font-size: 14px; }
.match-tournoi footer a { color: var(--a); font-weight: 700; }
.match-tournoi footer .note, #page-tournoi .match-tournoi .note { color: #5b5070; }
.lien-admin a { color: var(--jaune); font-weight: 700; }
.match-tournoi .issue-match { font-weight: 700; }
.journee-tournoi.en-cours > h4 { color: var(--jaune); }
.choix-inscription { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.choix-inscription button.choisi { background: var(--jaune); }
.bloc-tournoi .case { display: flex; align-items: center; gap: 6px; margin-top: 10px; }
.podium { padding-left: 22px; }
.podium li { margin: 4px 0; }
.podium .participant { display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: baseline; }
.podium .participant .niveau, .podium .participant .qui { color: #cdbfe6; font-size: 14px; }
.palmares ul { padding-left: 20px; margin: 4px 0; }
.reglement summary { cursor: pointer; font-family: var(--titre); font-size: 20px; color: var(--jaune); }
.reglement ol { padding-left: 22px; }
.reglement li { margin: 6px 0; max-width: 80ch; }

/* Plan du tableau (double élimination) : principal en haut, repêchage en bas, finales à droite, traits en SVG. */
.barre-plan { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 10px 0; }
.bascule-vue { display: flex; gap: 6px; }
.bascule-vue button { min-height: 38px; padding: 4px 14px; background: var(--nuit2); color: var(--papier); border-color: #000; box-shadow: 0 3px 0 #000; }
.bascule-vue button[aria-pressed="true"] { background: var(--jaune); color: var(--encre); border-color: var(--encre); box-shadow: 0 3px 0 var(--encre); }
.direct { margin: 0; font-size: 14px; color: #cdbfe6; display: flex; align-items: center; gap: 6px; }
.direct::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--b); box-shadow: 0 0 0 0 rgba(31, 179, 126, .7); animation: pouls-direct 2s infinite; }
.direct.coupe::before { background: var(--doux); animation: none; }
@keyframes pouls-direct { 70% { box-shadow: 0 0 0 8px rgba(31, 179, 126, 0); } 100% { box-shadow: 0 0 0 0 rgba(31, 179, 126, 0); } }
.plan { position: relative; background: #140e26; border: 3px solid #000; border-radius: 16px; padding: 46px 0 0; }
.plan-defile { overflow: auto; padding: 4px 14px 14px; }
.plan:fullscreen .plan-defile { height: 100%; }
.plan:fullscreen { padding-top: 50px; }
.plan .plan-plein { position: absolute; top: 8px; right: 10px; width: auto; height: auto; min-height: 32px; padding: 2px 12px; font-size: 14px; white-space: nowrap; z-index: 2; }
.plan-contenu { position: relative; display: flex; align-items: center; gap: 36px; width: max-content; }
.plan-contenu svg.traits { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.plan-contenu svg.traits path { fill: none; stroke: #4a3d6e; stroke-width: 2.5; }
.plan-contenu svg.traits path.joue { stroke: var(--jaune); }
.plan-gauche { display: flex; flex-direction: column; gap: 22px; }
.plan-tableau h4, .plan-droite h4 { margin: 0 0 6px; color: var(--jaune); font-family: var(--titre); font-weight: 400; font-size: 17px; }
.colonnes-plan { display: flex; gap: 36px; }
.colonne-plan { width: 200px; }
.colonne-plan h5 { margin: 0 0 6px; font-size: 13px; color: #cdbfe6; display: flex; justify-content: space-between; gap: 6px; font-weight: 700; }
.colonne-plan h5 small { font-weight: 400; opacity: .8; }
.colonne-plan .cases { display: flex; flex-direction: column; justify-content: space-around; }
.carte-plan { position: relative; background: var(--papier); color: var(--encre); border: 2px solid var(--encre); border-radius: 10px; box-shadow: 0 3px 0 #000; padding: 4px 6px 3px; font-size: 13px; z-index: 1; }
.carte-plan .numero { position: absolute; top: -9px; left: 8px; background: var(--nuit2); color: #cdbfe6; font-size: 10px; border-radius: 6px; padding: 0 5px; }
.carte-plan .place { display: flex; align-items: baseline; gap: 5px; padding: 1px 4px; border-radius: 5px; white-space: nowrap; line-height: 1.35; text-align: left; }
.carte-plan .np-tete { min-width: 14px; font-size: 10px; color: var(--doux); text-align: right; }
.carte-plan .np-nom { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; font-weight: 700; text-align: left; }
.carte-plan .np-niv { font-size: 11px; color: var(--doux); }
.carte-plan .place.gardien .np-nom { font-weight: 400; }
.carte-plan .place.moi .np-nom { color: var(--a); }
.carte-plan .place.gagnant { background: #d8f5e8; }
.carte-plan .place.perdant { opacity: .5; text-decoration: line-through; text-decoration-color: rgba(0, 0, 0, .35); }
.carte-plan .place.vide { color: var(--doux); font-style: italic; font-size: 12px; }
.carte-plan .pied { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: 11px; color: var(--doux); min-height: 16px; line-height: 1.2; }
.carte-plan .pied a { color: var(--a); font-weight: 700; }
.carte-plan .pied .a-jouer { color: var(--a); font-weight: 700; }
.carte-plan .pied button.lancer { min-height: 22px; padding: 0 8px; font-size: 12px; border-width: 2px; box-shadow: 0 2px 0 var(--encre); background: var(--jaune); }
.carte-plan.etat-attente { background: var(--papier2); }
.carte-plan.du-jour { border-color: var(--a); box-shadow: 0 3px 0 var(--a); }
.carte-plan.nouveau { animation: nouveau-resultat 1.2s ease-out 3; }
@keyframes nouveau-resultat { 0% { box-shadow: 0 0 0 0 var(--jaune); transform: scale(1.04); } 100% { box-shadow: 0 0 0 14px rgba(255, 210, 63, 0); transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .carte-plan.nouveau, .direct::before { animation: none; } .carte-plan.nouveau { outline: 3px solid var(--jaune); } }
