/* Style du party game : règles et raisons dans ../STYLE.md (Mila, 18.11.2026). */
:root {
  --fond: #160C33;      /* nuit violette : filme bien, fait ressortir les couleurs */
  --carte: #261752;
  --carte2: #33206B;
  --texte: #FFFFFF;
  --doux: #CBC3EE;
  --encre: #160C33;     /* texte posé sur une couleur vive */
  --rose: #FF4F8B;      /* l'action principale de l'écran, et elle seule */
  --menthe: #3DEBB4;    /* vrai, bonne réponse */
  --ciel: #4CC2FF;
  --lilas: #A98BFF;
  --r: 22px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--fond); color: var(--texte); }
body {
  font: 600 18px/1.35 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  min-height: 100dvh;
  background:
    radial-gradient(circle at 15% 10%, #3B1F80 0, transparent 40%),
    radial-gradient(circle at 90% 85%, #0E4B6E 0, transparent 45%),
    var(--fond);
  background-attachment: fixed;
}
main { max-width: 520px; margin: 0 auto; padding: max(18px, env(safe-area-inset-top)) 16px 32px; min-height: 100dvh; display: flex; flex-direction: column; gap: 16px; }
.ecran main { max-width: 760px; }
.chargement { text-align: center; color: var(--doux); margin-top: 40vh; }

h1, h2 { margin: 0; line-height: 1.05; letter-spacing: -0.02em; }
.logo { font-size: clamp(48px, 15vw, 76px); font-weight: 900; margin-top: 8vh; }
.logo span { display: inline-block; padding: 2px 14px 8px; border-radius: 18px; color: var(--encre); }
.logo .l1 { background: var(--rose); transform: rotate(-3deg); }
.logo .l2 { background: var(--menthe); transform: rotate(2deg); margin-top: 8px; }
.accroche { color: var(--doux); font-size: 20px; margin: 4px 0 12px; }
h2 { font-size: 28px; font-weight: 850; }
.petit { color: var(--doux); font-size: 15px; font-weight: 500; }
.centre { text-align: center; }
.espace { flex: 1; }

button, .bouton {
  font: inherit; font-weight: 800; font-size: 20px; border: 0; border-radius: 999px; padding: 18px 22px;
  cursor: pointer; width: 100%; color: var(--encre); background: var(--ciel);
  box-shadow: 0 6px 0 rgba(0,0,0,.35); transition: transform .08s;
  text-decoration: none; display: block; text-align: center;
}
button:active { transform: translateY(3px); box-shadow: 0 3px 0 rgba(0,0,0,.35); }
button.principal { background: var(--rose); }
button.discret, .bouton.discret { background: var(--carte2); color: var(--texte); box-shadow: none; font-size: 17px; padding: 14px; }
button:disabled { opacity: .45; cursor: default; }
:focus-visible { outline: 3px solid var(--menthe); outline-offset: 3px; }

label.champ { display: flex; flex-direction: column; gap: 6px; font-size: 16px; color: var(--doux); }
input[type=text] {
  font: inherit; font-size: 22px; font-weight: 700; color: var(--texte); background: var(--carte);
  border: 2px solid var(--carte2); border-radius: 16px; padding: 14px 16px; width: 100%;
}
input[type=text]:focus { border-color: var(--ciel); outline: none; }
input.code { font-size: 40px; letter-spacing: .3em; text-align: center; font-weight: 900; }

.puces { display: flex; flex-wrap: wrap; gap: 10px; }
.puce {
  width: auto; font-size: 16px; padding: 12px 16px; background: var(--carte); color: var(--texte);
  box-shadow: none; border: 2px solid var(--carte2); text-align: left;
}
.puce small { display: block; font-weight: 500; color: var(--doux); font-size: 13px; }
.puce.oui { background: var(--menthe); color: var(--encre); border-color: var(--menthe); }
.puce.oui small { color: var(--encre); }

.carte { background: var(--carte); border-radius: var(--r); padding: 18px; }
.tuiles { display: flex; justify-content: center; gap: 10px; }
.tuile { width: 64px; height: 80px; border-radius: 16px; background: var(--texte); color: var(--encre); font-size: 48px; font-weight: 900; display: grid; place-items: center; }
.tuile:nth-child(odd) { transform: rotate(-4deg); }
.tuile:nth-child(even) { transform: rotate(3deg); }
.ecran .tuile { width: 96px; height: 120px; font-size: 72px; }

.joueurs { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.joueur { display: flex; align-items: center; gap: 8px; background: var(--carte2); border-radius: 999px; padding: 6px 14px 6px 6px; animation: pop .35s ease-out; }
.av { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; color: var(--encre); flex: none; }
.joueur.vote { outline: 3px solid var(--menthe); }
.joueur button.retirer { width: auto; min-width: 32px; padding: 2px 8px; margin-left: 2px; background: none; color: var(--doux); box-shadow: none; font-size: 22px; line-height: 1; border-radius: 999px; }  /* retirer un joueur (téléphone qui mène, salle d'attente) */
.c0 { background: #FF4F8B; } .c1 { background: #3DEBB4; } .c2 { background: #4CC2FF; } .c3 { background: #A98BFF; }
.c4 { background: #FF9BD2; } .c5 { background: #66E0FF; } .c6 { background: #8CF5C8; } .c7 { background: #C7B3FF; }

.haut { display: flex; justify-content: space-between; align-items: center; color: var(--doux); font-size: 15px; }
.badge { display: inline-block; background: var(--lilas); color: var(--encre); font-weight: 900; border-radius: 999px; padding: 8px 16px; font-size: 18px; transform: rotate(-2deg); align-self: flex-start; }
.badge.vf { background: var(--ciel); }
.question { background: var(--texte); color: var(--encre); border-radius: 28px; padding: 26px 22px; font-size: clamp(26px, 7.5vw, 38px); font-weight: 850; line-height: 1.15; transform: rotate(-1deg); box-shadow: 8px 8px 0 var(--rose); animation: entre .4s ease-out; }
.ecran .question { font-size: 48px; }
.minuteur { height: 10px; border-radius: 99px; background: var(--carte2); overflow: hidden; }
.minuteur div { height: 100%; background: var(--menthe); transition: width 1s linear; }

.choix { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choix button { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 8px; background: var(--carte2); color: var(--texte); font-size: 18px; box-shadow: 0 5px 0 rgba(0,0,0,.35); border-radius: 22px; }
.choix button .av { width: 54px; height: 54px; font-size: 24px; }
.choix button.pris { background: var(--texte); color: var(--encre); }
.vf-choix { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.vf-choix button { font-size: 30px; padding: 30px 10px; border-radius: 26px; }
.vf-choix .vrai { background: var(--menthe); }
.vf-choix .faux { background: var(--rose); }
.vf-choix button.pas-pris { opacity: .35; }

.gagnant { text-align: center; animation: pop .5s ease-out; }
.gagnant .av { width: 110px; height: 110px; font-size: 52px; margin: 0 auto 10px; transform: rotate(-4deg); border-radius: 32px; }
.gagnant .nom { font-size: clamp(40px, 12vw, 64px); font-weight: 900; line-height: 1; }
.ecran .gagnant .nom { font-size: 88px; }
.barres { display: flex; flex-direction: column; gap: 8px; }
.barre { display: grid; grid-template-columns: 110px 1fr 28px; align-items: center; gap: 8px; font-size: 16px; }
.barre .fond-b { background: var(--carte2); border-radius: 99px; height: 16px; overflow: hidden; }
.barre .plein { height: 100%; border-radius: 99px; }  /* couleur du joueur : classe c0 à c7 */
.barre .n { text-align: right; color: var(--doux); }
.verdict { font-size: clamp(56px, 18vw, 96px); font-weight: 900; text-align: center; line-height: 1; transform: rotate(-3deg); animation: pop .45s ease-out; }
.verdict.vrai { color: var(--menthe); } .verdict.faux { color: var(--rose); }
.source { color: var(--doux); font-size: 14px; font-weight: 500; word-break: break-all; }

.podium { display: flex; flex-direction: column; gap: 10px; }
.place { display: flex; align-items: center; gap: 12px; background: var(--carte2); border-radius: 20px; padding: 12px 16px; font-size: 22px; font-weight: 850; }
.place .rang { font-size: 30px; font-weight: 900; color: var(--menthe); width: 34px; }
.place .pts { margin-left: auto; color: var(--doux); font-size: 16px; }
.place:first-child { background: var(--texte); color: var(--encre); transform: rotate(-1.5deg); }
.place:first-child .rang { color: var(--rose); }
.place:first-child .pts { color: var(--encre); }

.erreur { background: var(--rose); color: var(--encre); border-radius: 14px; padding: 12px 14px; font-weight: 800; }
.confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 5; }
.confetti i { position: absolute; top: -20px; width: 10px; height: 16px; border-radius: 3px; animation: tombe 1.8s ease-in forwards; }

.calme .question, .calme .gagnant, .calme .verdict { animation: none; }
.calme .joueur { animation: none; }
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 70% { transform: scale(1.06); } 100% { transform: scale(1); opacity: 1; } }
@keyframes entre { from { transform: translateY(20px) rotate(-1deg); opacity: 0; } to { transform: rotate(-1deg); opacity: 1; } }
@keyframes tombe { to { transform: translateY(110vh) rotate(540deg); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } .confetti { display: none; } }

/* 18.11.2026 : quiz, jeu par équipes, revanche (STYLE.md, section « Nouveaux jeux ») */
.jeux { display: flex; flex-direction: column; gap: 10px; }
.jeu { text-align: left; background: var(--carte); color: var(--texte); box-shadow: none; border: 2px solid var(--carte2); border-radius: 20px; padding: 14px 16px; font-size: 19px; }
.jeu small { display: block; font-weight: 500; font-size: 14px; color: var(--doux); margin-top: 2px; }
.jeu.oui { background: var(--texte); color: var(--encre); border-color: var(--texte); transform: rotate(-1deg); }
.jeu.oui small { color: var(--encre); }

.quiz-choix { display: grid; grid-template-columns: 1fr; gap: 10px; }
.quiz-choix > * { display: flex; align-items: center; gap: 12px; text-align: left; font-size: 19px; font-weight: 800; padding: 14px 16px; border-radius: 20px; color: var(--encre); }
.quiz-choix .lettre { width: 34px; height: 34px; flex: none; border-radius: 10px; background: rgba(22,12,51,.18); display: grid; place-items: center; font-weight: 900; }
.quiz-choix .r0 { background: var(--menthe); } .quiz-choix .r1 { background: var(--ciel); }
.quiz-choix .r2 { background: var(--lilas); } .quiz-choix .r3 { background: #FF9BD2; }
.quiz-choix button:disabled { opacity: 1; cursor: default; }
.quiz-choix .pas-pris { opacity: .35 !important; }
.quiz-choix .pris { outline: 4px solid var(--texte); outline-offset: 2px; }
.quiz-choix.fini .juste { outline: 4px solid var(--texte); outline-offset: 2px; transform: rotate(-1deg); animation: pop .4s ease-out; }
.quiz-choix .nb { margin-left: auto; font-size: 15px; }
.ecran .quiz-choix > * { font-size: 28px; }
.place.petite { font-size: 18px; padding: 8px 14px; }
.place.petite .av { width: 30px; height: 30px; font-size: 15px; }
.place .theme { display: block; font-size: 13px; font-weight: 600; color: var(--doux); }
.place:first-child .theme { color: var(--encre); }

.equipes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.eq { border-radius: 20px; padding: 10px 14px; color: var(--encre); display: flex; flex-direction: column; opacity: .55; }
.eq.e0 { background: #FF9BD2; } .eq.e1 { background: var(--menthe); }
.eq.active, .eq:only-child { opacity: 1; transform: rotate(-1.5deg); }
.eq .nom-eq { font-weight: 900; font-size: 16px; }
.eq .score-eq { font-weight: 900; font-size: 40px; line-height: 1; }
.eq .membres { font-size: 13px; font-weight: 600; }
.question.mot { text-align: center; font-size: clamp(34px, 11vw, 54px); }
.question.mot small { display: block; font-size: 20px; font-weight: 700; margin-top: 6px; color: #4A3A7A; }
.centre-auto { align-self: center; }
.centre-puces { justify-content: center; }
.ecran .eq .score-eq { font-size: 64px; }
