/* Le mode jeu : plateau, pions, tables, tuiles. Reprend la charte de style.css (fond noir, couleurs de la boîte).
   Aucun style en ligne n'est permis par le serveur : tout ce qui est dynamique passe par des classes ou des attributs SVG. */

main.large { max-width: 1560px; }

/* ------------------------------ boutons, champs, petits éléments */
.btn {
  display: inline-block; padding: 10px 18px; border-radius: 999px; border: 2px solid var(--texte);
  background: var(--texte); color: #07070a; font: inherit; font-weight: 800; font-size: 15px; cursor: pointer;
  text-decoration: none; line-height: 1.2;
}
.btn:hover { filter: brightness(1.1); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; filter: none; }
.btn.grand { padding: 14px 28px; font-size: 18px; background: var(--rose); border-color: var(--rose); margin-top: 14px; }
.btn.discret { background: transparent; color: var(--texte); border-color: var(--bord); }
.btn.discret:hover { border-color: var(--texte-doux); }
.btn.petit { padding: 6px 13px; font-size: 13px; }
.btn:focus-visible, .champ:focus-visible, .tuile:focus-visible, .pion:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }

.champ {
  width: 100%; padding: 11px 14px; border-radius: 12px; border: 2px solid var(--bord); background: var(--fond-carte-2);
  color: var(--texte); font: inherit; font-size: 17px;
}
.champ.code { text-transform: uppercase; letter-spacing: 0.3em; font-size: 22px; text-align: center; font-family: "Lilita One", sans-serif; }
.etiquette { display: block; font-size: 13px; font-weight: 700; color: var(--texte-doux); text-transform: uppercase; letter-spacing: 0.06em; margin: 0 0 12px; }
.etiquette .champ { margin-top: 5px; text-transform: none; letter-spacing: normal; }
.etiquette .champ.code { text-transform: uppercase; letter-spacing: 0.3em; }
.rang { display: flex; flex-wrap: wrap; gap: 9px; margin: 8px 0; align-items: center; }
.espace { margin-top: 22px; }
.reprises { display: flex; flex-wrap: wrap; gap: 9px; }
.mention { color: var(--texte-doux); font-size: 14px; max-width: 80ch; }
.jeu-erreur { color: var(--rouge); font-weight: 700; min-height: 1.4em; }
.attente-texte { color: var(--texte-doux); font-size: 17px; padding: 8px 0; }
.vide { color: var(--texte-doux); padding: 20px 0; }

.jeu-toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 100; background: var(--rouge); color: #fff;
  padding: 11px 20px; border-radius: 12px; font-weight: 700; max-width: 90vw; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
}

/* ------------------------------ barre de la partie */
.jeu-barre {
  display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; padding: 8px 14px; margin: 0 0 14px;
  background: var(--fond-carte); border: 1px solid var(--bord); border-radius: 14px;
}
.jeu-code b { font-family: "Lilita One", sans-serif; letter-spacing: 0.16em; color: var(--jaune); font-size: 18px; }
.jeu-phase { font-weight: 800; }
.badge-spec { background: var(--violet); color: #07070a; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.jeu-droite { margin-left: auto; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.vitesse { border: 2px solid var(--bord); background: transparent; color: var(--texte-doux); border-radius: 999px; padding: 3px 11px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.vitesse.on { background: var(--texte); color: #07070a; border-color: var(--texte); }
.jeu-bandeau { background: var(--orange); color: #07070a; padding: 8px 14px; border-radius: 10px; font-weight: 800; margin: 0 0 12px; }
.jeu-bandeau[hidden] { display: none; }
.minuteur { font-family: "Lilita One", sans-serif; font-size: 20px; color: var(--cyan); min-width: 3.2em; text-align: right; }
.minuteur.urgent { color: var(--rouge); animation: clignote 0.8s steps(2) infinite; }
@keyframes clignote { 50% { opacity: 0.35; } }

/* ------------------------------ pastilles des joueurs (la couleur de leurs pions sur le plateau) */
.pastille { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; color: #07070a; font-weight: 800; font-size: 13px; flex: none; }
.pastille.s0 { background: #ff3ea5; } .pastille.s1 { background: #3fb9e8; } .pastille.s2 { background: #ffd21e; }
.pastille.s3 { background: #2fc06a; } .pastille.s4 { background: #a259e6; } .pastille.s5 { background: #ff8a1e; }

/* ------------------------------ salon */
.salon-haut { display: flex; flex-wrap: wrap; gap: 28px; align-items: center; margin: 6px 0 10px; }
.etiquette-code { margin: 0 0 4px; color: var(--texte-doux); font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; }
.code-grand { font-family: "Lilita One", sans-serif; font-size: clamp(46px, 11vw, 84px); letter-spacing: 0.14em; color: var(--jaune); line-height: 1; margin: 0 0 8px; }
.qr { border-radius: 10px; display: block; }
.sieges { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 8px; max-width: 640px; }
.siege { display: flex; align-items: center; gap: 10px; background: var(--fond-carte); border: 1px solid var(--bord); border-radius: 12px; padding: 10px 14px; }
.siege-nom { font-weight: 800; flex: 1; }
.siege-nom em { color: var(--texte-doux); font-weight: 400; }
.tag { font-size: 12px; font-weight: 800; padding: 2px 9px; border-radius: 999px; background: var(--fond-carte-2); color: var(--texte-doux); border: 1px solid var(--bord); }
.tag.ok { color: var(--vert); border-color: var(--vert); } .tag.off { color: var(--orange); border-color: var(--orange); }
.tag.bot { color: var(--cyan); border-color: var(--cyan); }
.retirer { border: 0; background: transparent; color: var(--texte-doux); font-size: 18px; cursor: pointer; padding: 2px 8px; }
.retirer:hover { color: var(--rouge); }
.reglages { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; max-width: 900px; margin: 0 0 12px; }
.option { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 700; color: var(--texte-doux); text-transform: uppercase; letter-spacing: 0.05em; }
.option .champ { text-transform: none; letter-spacing: normal; font-weight: 400; }

/* ------------------------------ tuiles d'athlètes */
.tuiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin: 8px 0 14px; }
.tuile {
  display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding: 12px 12px 14px; cursor: default;
  background: var(--fond-carte); border: 2px solid var(--bord); border-top: 5px solid var(--teinte-lien, var(--bord)); border-radius: 14px;
}
div.tuile[role="button"] { cursor: pointer; }
div.tuile[role="button"]:hover { border-color: var(--teinte-lien); }
.tuile.choisie { border-color: var(--teinte-lien); background: color-mix(in srgb, var(--teinte-lien) 16%, var(--fond-carte)); box-shadow: 0 0 0 3px var(--teinte-lien); }
.tuile-img { height: 120px; width: auto; max-width: 100%; object-fit: contain; }
.tuile-nom { font-family: "Lilita One", sans-serif; font-size: 20px; color: var(--teinte-lien); line-height: 1.1; }
.tuile-carte { font-size: 13px; color: var(--texte-doux); margin: 4px 0 6px; line-height: 1.35; font-style: italic; }
.tuile.mini { padding: 4px 6px; flex-direction: row; gap: 6px; border-top-width: 2px; }
.tuile.mini .tuile-img { height: 34px; }
.tuile.mini .tuile-nom { font-size: 13px; text-align: left; }
.tour-de { font-size: 19px; font-weight: 800; margin: 6px 0; display: flex; gap: 10px; align-items: center; }
.tour-de.a-moi { color: var(--jaune); }
.equipes { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.equipe { background: var(--fond-carte); border: 1px solid var(--bord); border-radius: 12px; padding: 10px; }
.equipe-nom { font-weight: 800; margin-bottom: 6px; display: flex; gap: 6px; align-items: center; }
.equipe-cartes { display: flex; flex-wrap: wrap; gap: 6px; }
.vide-mini { color: var(--texte-doux); }
.etat-choix { list-style: none; padding: 0; margin: 8px 0 12px; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.etat-choix li { display: flex; align-items: center; gap: 6px; color: var(--texte-doux); }
.etat-choix li.fait { color: var(--vert); }

/* ------------------------------ la course */
.course-titre { font-family: "Lilita One", sans-serif; font-size: clamp(22px, 4vw, 34px); margin: 4px 0 10px; text-transform: uppercase; }
.plateau-conteneur { position: relative; background: #0c0c11; border: 1px solid var(--bord); border-radius: 18px; padding: 6px; }
.plateau-svg { width: 100%; height: auto; display: block; max-height: 78vh; font-family: "Lilita One", ui-sans-serif, sans-serif; user-select: none; }
.plateau-svg.vertical { width: min(100%, 520px); margin: 0 auto; max-height: none; }
.plateau-svg .cadre { fill: #14141b; stroke: #f4f4f8; stroke-width: 3; }
.plateau-svg .centre { fill: #07070a; stroke: #ffd21e; stroke-width: 2; }
.plateau-svg .depart { fill: #5c9dd5; stroke: #f4f4f8; stroke-width: 3; }
.plateau-svg .depart-texte { font-size: 44px; fill: #ee4b2b; stroke: #14141b; stroke-width: 3; paint-order: stroke; }
.plateau-svg .depart-texte.vertical { font-size: 24px; }
.plateau-svg .podium { fill: #1e1e28; stroke: #ffd21e; stroke-width: 3; }
.plateau-svg .podium-1, .plateau-svg .podium-2 { font-size: 30px; fill: #ffd21e; opacity: 0.85; }
.plateau-svg .podium-2 { fill: #c8c8d4; }
.plateau-svg .case { stroke: #14141b; stroke-width: 2; }
.plateau-svg .c-rose { fill: #d688bf; } .plateau-svg .c-jaune { fill: #f7b844; } .plateau-svg .c-vert { fill: #4f9d4a; }
.plateau-svg .c-bleu { fill: #5c9dd5; } .plateau-svg .c-rouge { fill: #ee4b2b; }
.plateau-svg .numero { font-size: 40px; fill: #ffe36e; stroke: #7a1d0a; stroke-width: 3; paint-order: stroke; }
.plateau-svg .case.special { fill: #8f5bb7; stroke: #14141b; }
.plateau-svg .etoile.e1 { fill: #ee4b2b; } .plateau-svg .etoile.e2 { fill: #f7b844; } .plateau-svg .etoile.e3 { fill: #d688bf; }
.plateau-svg .etoile { stroke: #14141b; stroke-width: 2; stroke-linejoin: round; }
.plateau-svg .chiffre-etoile { font-size: 30px; fill: #14141b; }
.plateau-svg .fond-oups { fill: #f7b844; } .plateau-svg .eclat { fill: #ee4b2b; stroke: #14141b; stroke-width: 2; }
.plateau-svg .oups { font-size: 24px; fill: #5c9dd5; stroke: #14141b; stroke-width: 4; paint-order: stroke; }
.plateau-svg .fond-fleche { stroke: #14141b; stroke-width: 2; }
.plateau-svg .f-jaune { fill: #f7b844; } .plateau-svg .f-rose { fill: #d688bf; } .plateau-svg .f-vert { fill: #4f9d4a; } .plateau-svg .f-bleu { fill: #5c9dd5; }
.plateau-svg .fleche { stroke: #14141b; stroke-width: 2; stroke-linejoin: round; }
.plateau-svg .a-vert { fill: #4f9d4a; } .plateau-svg .a-bleu { fill: #5c9dd5; } .plateau-svg .a-rose { fill: #d688bf; } .plateau-svg .a-rouge { fill: #ee4b2b; }
.plateau-svg .chiffre-fleche { font-size: 32px; fill: #fff; stroke: #14141b; stroke-width: 4; paint-order: stroke; }

.plateau-svg .pion { cursor: pointer; }
.plateau-svg .anneau { stroke: #07070a; stroke-width: 2; opacity: 0.9; }
.plateau-svg .badge { stroke: #07070a; stroke-width: 2; }
.plateau-svg .badge-texte { font-size: 19px; fill: #07070a; }
.plateau-svg .pion.actif .anneau { stroke: #fff; stroke-width: 5; animation: pouls 1s ease-in-out infinite; }
.plateau-svg .pion.brille { filter: drop-shadow(0 0 12px #ffd21e) drop-shadow(0 0 22px #ffd21e); }
.plateau-svg .pion.vise .anneau { stroke: #ffd21e; stroke-width: 7; animation: pouls 0.7s ease-in-out infinite; }
.plateau-svg .case-g.vise { cursor: pointer; }
.plateau-svg .case-g.vise .case { stroke: #ffd21e; stroke-width: 8; animation: pouls 0.7s ease-in-out infinite; }
@keyframes pouls { 50% { opacity: 0.45; } }
.plateau-svg .de-face { fill: #fff; stroke-width: 10; }
.plateau-svg .pip { fill: #14141b; }
.plateau-svg .annonce { font-size: 34px; fill: #fff; stroke: #07070a; stroke-width: 7; paint-order: stroke; }

.course-bas { display: grid; grid-template-columns: minmax(300px, 5fr) minmax(260px, 4fr); gap: 16px; margin-top: 14px; align-items: start; }
@media (max-width: 860px) { .course-bas { grid-template-columns: 1fr; } }
.decision { margin: 0 0 12px; }
.question { background: var(--fond-carte); border: 2px solid var(--teinte-lien, var(--jaune)); border-radius: 16px; padding: 14px; position: sticky; bottom: 8px; z-index: 5; box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.6); }
.question-tete { display: flex; gap: 12px; align-items: center; }
.question-img { height: 64px; width: auto; }
.question-tete strong { font-family: "Lilita One", sans-serif; font-size: 20px; color: var(--teinte-lien); }
.question-texte { margin: 2px 0 0; font-size: 17px; }
.question-tete .minuteur { margin-left: auto; }
.options-rep { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.options-rep .btn { text-align: left; }
.scores { display: grid; gap: 6px; }
.score { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: var(--fond-carte); border: 1px solid var(--bord); border-radius: 12px; padding: 7px 10px; }
.score.moi { border-color: var(--jaune); }
.score-nom { font-weight: 800; min-width: 6.5em; }
.score-nom em { font-weight: 400; color: var(--texte-doux); }
.score-equipe { display: inline-flex; gap: 2px; }
.mini-pion { height: 34px; width: auto; }
.score-trophees { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.chip { font-size: 12px; font-weight: 800; padding: 1px 7px; border-radius: 999px; background: var(--fond-carte-2); border: 1px solid var(--bord); }
.chip.or { color: var(--jaune); border-color: var(--jaune); } .chip.argent { color: #cfd2dc; } .chip.bronze { color: var(--orange); border-color: var(--orange); }
.score-total { margin-left: auto; font-family: "Lilita One", sans-serif; font-size: 24px; color: var(--jaune); }
.journal-titre { margin: 0 0 6px; font-size: 14px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--texte-doux); }
.journal-liste { list-style: none; margin: 0; padding: 8px; max-height: 380px; overflow-y: auto; background: var(--fond-carte); border: 1px solid var(--bord); border-radius: 12px; font-size: 14px; }
.journal-liste li { padding: 3px 0; border-bottom: 1px solid #1d1d26; }
.journal-liste .j-ico { display: inline-block; width: 1.5em; }
.journal-liste .j-resultat, .journal-liste .j-fin_partie, .journal-liste .j-arrivee { color: var(--jaune); font-weight: 700; }
.journal-liste .j-tour { color: var(--cyan); font-weight: 700; }
.journal-liste .j-trebuche, .journal-liste .j-elimine { color: var(--rouge); }
.journal-liste .j-boucle { color: var(--orange); }

.info-pion { margin: 0 0 12px; }
.info-pion[hidden] { display: none; }
.info-corps { display: flex; gap: 12px; align-items: center; background: var(--fond-carte); border: 2px solid var(--teinte-lien); border-radius: 14px; padding: 10px 14px; position: relative; }
.info-img { height: 70px; width: auto; }
.info-corps p { margin: 4px 0; font-style: italic; color: var(--texte-doux); font-size: 14px; }
.info-corps a { font-size: 13px; color: var(--cyan); }
.fermer { position: absolute; top: 6px; right: 8px; border: 0; background: transparent; color: var(--texte-doux); font-size: 17px; cursor: pointer; }

.bilan, .fin { background: var(--fond-carte); border: 2px solid var(--jaune); border-radius: 16px; padding: 14px 18px; }
.bilan h3, .fin h3 { margin: 0 0 8px; font-family: "Lilita One", sans-serif; font-size: 26px; }
.podium-liste, .classement { padding-left: 0; list-style: none; display: grid; gap: 6px; margin: 0 0 8px; }
.classement li { display: flex; align-items: center; gap: 8px; font-size: 18px; }
.classement li.gagnant { color: var(--jaune); font-weight: 800; }
@media (prefers-reduced-motion: reduce) { .minuteur.urgent, .plateau-svg .pion.actif .anneau, .plateau-svg .pion.vise .anneau { animation: none; } }

/* Sur un téléphone, l'en-tête collant du site mangerait un tiers de l'écran : pendant une partie, il défile avec la page. */
@media (max-width: 900px) { body.en-jeu header.site { position: static; } }

/* ------------------------------ un bot joue à la place d'un joueur absent */
.jeu-remplace { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; background: color-mix(in srgb, var(--cyan) 18%, var(--fond-carte)); border: 2px solid var(--cyan); border-radius: 12px; padding: 9px 14px; margin: 0 0 12px; font-weight: 700; }
.jeu-remplace[hidden] { display: none; }
.jeu-remplace span { flex: 1 1 260px; }

/* ------------------------------ à son tour : les cartes de ses athlètes, avec leur pouvoir */
.vos-athletes { margin: 12px 0 2px; padding-top: 10px; border-top: 1px dashed var(--bord); }
.vos-titre { margin: 0 0 8px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--texte-doux); }
.vos-grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.vos-carte { display: flex; gap: 10px; align-items: flex-start; background: var(--fond-carte-2); border: 2px solid var(--bord); border-left: 5px solid var(--teinte-lien, var(--bord)); border-radius: 12px; padding: 8px 10px; }
.vos-carte.en-cours { border-color: var(--teinte-lien); box-shadow: 0 0 0 2px var(--teinte-lien); }
.vos-img { height: 58px; width: auto; flex: none; }
.vos-texte { min-width: 0; }
.vos-entete { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.vos-entete strong { font-family: "Lilita One", sans-serif; font-size: 18px; color: var(--teinte-lien); line-height: 1.1; }
.vos-pouvoir, .vos-copie { margin: 4px 0 0; font-size: 13px; line-height: 1.35; color: var(--texte-doux); font-style: italic; }
.vos-copie { color: var(--cyan); }
@media (max-width: 520px) { .vos-grille { grid-template-columns: 1fr 1fr; } .vos-carte { flex-direction: column; } .vos-img { height: 48px; } }
@media (max-width: 380px) { .vos-grille { grid-template-columns: 1fr; } .vos-carte { flex-direction: row; } }

/* ------------------------------ fin de manche : qui a validé */
.attente-texte.valide { color: var(--vert); font-weight: 700; }
.validations-titre { margin: 12px 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--texte-doux); }
.validations { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 5px; }
.validations li { display: flex; align-items: center; gap: 8px; background: var(--fond-carte-2); border: 1px solid var(--bord); border-radius: 10px; padding: 5px 10px; }
.val-nom { font-weight: 800; }
.val-etat { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--texte-doux); }
.val-pret { border-color: var(--vert); } .val-pret .val-etat { color: var(--vert); }
.val-attendu .val-etat { color: var(--orange); }

/* ------------------------------ fin de partie : podium et feu d'artifice */
.pastille.grande { width: 46px; height: 46px; font-size: 22px; font-family: "Lilita One", sans-serif; }
.fin { scroll-margin-top: 90px; text-align: center; padding: 18px 14px 22px; margin-bottom: 18px; overflow: hidden; }
.fin-titre { font-size: clamp(30px, 6vw, 46px); color: var(--jaune); margin: 0 0 4px; }
.fin-sous { margin: 0 0 18px; font-size: clamp(17px, 3vw, 22px); font-weight: 800; }
.podium { display: flex; justify-content: center; align-items: flex-end; gap: clamp(6px, 2vw, 18px); margin: 0 auto 16px; max-width: 900px; }
.marche { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; justify-content: flex-end; }
.laureats { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 8px; }
.laureat { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; padding: 0 2px; }
.laureat.moi .laureat-nom { text-decoration: underline; text-decoration-color: var(--jaune); text-decoration-thickness: 3px; text-underline-offset: 4px; }
.laureat-nom { font-family: "Lilita One", sans-serif; font-size: clamp(16px, 3.4vw, 24px); overflow-wrap: anywhere; line-height: 1.1; }
.laureat-equipe { display: flex; justify-content: center; gap: 2px; flex-wrap: wrap; }
.laureat-chips { display: flex; justify-content: center; gap: 4px; flex-wrap: wrap; }
.couronne { font-size: 34px; line-height: 1; transform-origin: 50% 100%; }
.socle { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 2px; padding-top: 8px; border-radius: 12px 12px 0 0; border: 2px solid var(--teinte-socle); border-bottom: 0; background: color-mix(in srgb, var(--teinte-socle) 22%, var(--fond-carte-2)); transform-origin: 50% 100%; }
.socle-rang { font-family: "Lilita One", sans-serif; font-size: clamp(34px, 7vw, 54px); line-height: 1; color: var(--teinte-socle); }
.socle-pts { font-weight: 800; font-size: 15px; }
.marche-1 { --teinte-socle: var(--jaune); } .marche-2 { --teinte-socle: #cfd2dc; } .marche-3 { --teinte-socle: var(--orange); }
.marche-1 .socle { height: 150px; } .marche-2 .socle { height: 112px; } .marche-3 .socle { height: 84px; }
.fin-actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px; margin-top: 8px; }
.fin-actions .btn.grand { margin-top: 0; }
.fin .classement { max-width: 420px; margin: 0 auto 8px; text-align: left; }
.fin .mention { margin-left: auto; margin-right: auto; }

.feu-artifice { position: fixed; left: 0; top: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 90; }

/* La montée du podium : 3ᵉ marche, puis 2ᵉ, puis la 1ʳᵉ, puis les lauréats (et la couronne) apparaissent. */
@keyframes monter { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes apparaitre { from { opacity: 0; transform: translateY(18px) scale(0.9); } to { opacity: 1; transform: none; } }
@keyframes couronne { 0%, 100% { transform: rotate(-8deg); } 50% { transform: rotate(8deg) scale(1.1); } }
.marche .socle { animation: monter 0.7s cubic-bezier(0.2, 0.9, 0.3, 1.1) both; }
.marche .laureats { animation: apparaitre 0.6s ease-out both; }
.marche-3 .socle { animation-delay: 0.2s; } .marche-3 .laureats { animation-delay: 0.8s; }
.marche-2 .socle { animation-delay: 0.7s; } .marche-2 .laureats { animation-delay: 1.3s; }
.marche-1 .socle { animation-delay: 1.3s; } .marche-1 .laureats { animation-delay: 1.9s; }
.couronne { animation: couronne 1.6s ease-in-out 2.4s infinite; }
@media (prefers-reduced-motion: reduce) {
  .marche .socle, .marche .laureats, .couronne { animation: none; }
}


/* ------------------------------ le dé lancé : ombre, éclat des 1 et des 6 */
.plateau-svg .de-ombre { fill: #000; }
.plateau-svg .de.extreme .de-face { animation: eclat-de 0.7s ease-out 2; }
@keyframes eclat-de { 0%, 100% { filter: none; } 40% { filter: drop-shadow(0 0 16px #ffd21e) drop-shadow(0 0 30px #ffd21e); } }

/* ------------------------------ la question « dé » : un gros bouton, et la case « lancer automatiquement » */
.btn.bouton-de { margin: 0; font-size: 22px; padding: 14px 34px; background: var(--jaune); border-color: var(--jaune); color: #07070a; animation: appel 1.4s ease-in-out infinite; }
@keyframes appel { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 210, 30, 0.55); } 50% { box-shadow: 0 0 0 10px rgba(255, 210, 30, 0); } }
.btn.bouton-de:disabled { animation: none; }
.case-auto { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 14px; color: var(--texte-doux); cursor: pointer; }
.case-auto input { width: 18px; height: 18px; accent-color: var(--jaune); }

/* ------------------------------ « c'est à vous ! » : la carte de la décision pulse doucement */
.question.a-vous { animation: a-vous 1.6s ease-in-out 3; }
@keyframes a-vous { 0%, 100% { box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.6); } 50% { box-shadow: 0 0 0 4px var(--teinte-lien, var(--jaune)), 0 -8px 30px rgba(0, 0, 0, 0.6); } }

/* ------------------------------ la carte du pouvoir qui se déclenche, au centre du plateau */
.carte-pouvoir { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 8; pointer-events: none; display: flex; align-items: center; gap: 14px;
  max-width: min(86%, 520px); background: color-mix(in srgb, var(--teinte-lien) 14%, #101017); border: 3px solid var(--teinte-lien); border-radius: 18px; padding: 12px 18px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7), 0 0 28px color-mix(in srgb, var(--teinte-lien) 55%, transparent); animation: carte-entre 0.35s cubic-bezier(0.2, 1.3, 0.4, 1) both; }
.carte-pouvoir-img { height: 84px; width: auto; flex: none; }
.carte-pouvoir strong { font-family: "Lilita One", sans-serif; font-size: 24px; color: var(--teinte-lien); }
.carte-pouvoir p { margin: 4px 0 0; font-size: 14px; font-style: italic; color: var(--texte); line-height: 1.35; }
@keyframes carte-entre { from { opacity: 0; transform: translate(-50%, -40%) scale(0.7) rotate(-4deg); } to { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(0); } }

/* ------------------------------ barre d'outils : réactions, dé automatique, son */
.barre-outils { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -4px 0 12px; }
.barre-outils[hidden] { display: none; }
.reactions-btns { display: inline-flex; gap: 6px; }
.reaction-btn { font-size: 22px; line-height: 1; width: 42px; height: 42px; border-radius: 50%; border: 2px solid var(--bord); background: var(--fond-carte); cursor: pointer; }
.reaction-btn:hover { border-color: var(--jaune); transform: scale(1.1); }
.barre-outils.calme .reaction-btn { opacity: 0.45; cursor: default; transform: none; }
.outil-btn { border: 2px solid var(--bord); background: transparent; color: var(--texte-doux); border-radius: 999px; padding: 6px 13px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.outil-btn.on { background: var(--jaune); border-color: var(--jaune); color: #07070a; }
.outil-btn:focus-visible, .reaction-btn:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }

/* ------------------------------ les réactions qui montent à l'écran de toute la table */
.reaction { position: fixed; bottom: 14vh; z-index: 95; pointer-events: none; display: flex; flex-direction: column; align-items: center; animation: flotte 2.7s ease-out forwards; }
.reaction-emoji { font-size: 56px; line-height: 1; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.6)); }
.reaction-nom { font-size: 12px; font-weight: 800; padding: 1px 9px; border-radius: 999px; color: #07070a; background: var(--texte); }
.reaction-nom.s0 { background: #ff3ea5; } .reaction-nom.s1 { background: #3fb9e8; } .reaction-nom.s2 { background: #ffd21e; }
.reaction-nom.s3 { background: #2fc06a; } .reaction-nom.s4 { background: #a259e6; } .reaction-nom.s5 { background: #ff8a1e; }
.voie-0 { left: 10%; } .voie-1 { left: 24%; } .voie-2 { left: 38%; } .voie-3 { left: 52%; } .voie-4 { left: 66%; } .voie-5 { left: 80%; }
@keyframes flotte { 0% { opacity: 0; transform: translateY(20px) scale(0.5); } 12% { opacity: 1; transform: translateY(0) scale(1.15); } 100% { opacity: 0; transform: translateY(-46vh) scale(1); } }

/* ------------------------------ les petits prix de la fin de partie */
.prix { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 0 auto 14px; max-width: 900px; }
.prix-carte { display: flex; align-items: center; gap: 12px; text-align: left; background: var(--fond-carte-2); border: 2px solid var(--bord); border-radius: 14px; padding: 8px 16px; flex: 1 1 280px; }
.prix-carte .mini-pion { height: 52px; }
.prix-ico { font-size: 36px; line-height: 1; }
.prix-carte strong { font-family: "Lilita One", sans-serif; font-size: 18px; color: var(--jaune); }
.prix-carte p { margin: 2px 0 0; font-size: 14px; color: var(--texte-doux); }

/* ------------------------------ sur téléphone : l'action principale reste dans une barre en bas de l'écran, sous le pouce */
@media (max-width: 900px) {
  .jeu-corps { padding-bottom: 104px; }
  .action-bas { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; margin: 0; justify-content: center; gap: 8px; max-height: 45vh; overflow-y: auto;
    background: var(--fond-carte); border-top: 3px solid var(--jaune); padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.65); }
  .action-bas .btn.grand { margin-top: 0; }
  .reaction { bottom: 22vh; }
}
@media (prefers-reduced-motion: reduce) {
  .btn.bouton-de, .question.a-vous, .plateau-svg .de.extreme .de-face, .carte-pouvoir { animation: none; }
  .reaction { animation-duration: 2.2s; }
}
