/* Ribambelle — système de design commun (jeux.rev.moe).
   Variables, thème clair/sombre automatique, composants. Mobile d'abord : zones tactiles ≥ 44 px, champs en 16 px,
   safe-area, jamais de débordement horizontal. Documentation : GUIDE-JEU.md, section « Interface ». */
:root {
  --fond: #fff7ef;
  --fond-motif: #ffeedd;
  --surface: #ffffff;
  --surface-2: #fff3e8;
  --surface-3: #fbe6d4;
  --texte: #2b1b2f;
  --texte-doux: #6e5a72;
  --texte-pale: #9a879c;
  --bord: #f0dccb;
  --bord-fort: #e2c4ad;
  --primaire: #e2522c;
  --primaire-fonce: #c23f1c;
  --primaire-doux: #ffe2d7;
  --sur-primaire: #ffffff;
  --menthe: #0f8f7e;
  --menthe-doux: #d7f3ee;
  --soleil: #f2a900;
  --soleil-doux: #fff0c7;
  --prune: #8b3c8e;
  --prune-doux: #f6e1f4;
  --ciel: #2b78c5;
  --ciel-doux: #ddebfa;
  --ok: #157a46;
  --ok-doux: #dcf3e6;
  --danger: #c0303c;
  --danger-doux: #fde3e5;
  --sur-couleur: #ffffff;
  --ombre-1: 0 1px 2px rgba(60, 25, 40, .07), 0 2px 8px rgba(60, 25, 40, .06);
  --ombre-2: 0 2px 6px rgba(60, 25, 40, .08), 0 10px 30px rgba(60, 25, 40, .10);
  --rayon-s: 10px;
  --rayon: 16px;
  --rayon-l: 24px;
  --rayon-rond: 999px;
  --e-1: 4px;
  --e-2: 8px;
  --e-3: 12px;
  --e-4: 16px;
  --e-5: 24px;
  --e-6: 32px;
  --tactile: 44px;
  --largeur: 720px;
  --police: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --police-titre: ui-rounded, "SF Pro Rounded", "Nunito", "Varela Round", system-ui, -apple-system, "Segoe UI", sans-serif;
  --police-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --haut-sur: env(safe-area-inset-top, 0px);
  --bas-sur: env(safe-area-inset-bottom, 0px);
  --gauche-sur: env(safe-area-inset-left, 0px);
  --droite-sur: env(safe-area-inset-right, 0px);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --fond: #19121e;
    --fond-motif: #21182a;
    --surface: #251b2c;
    --surface-2: #2e2236;
    --surface-3: #3a2c44;
    --texte: #f7ecf3;
    --texte-doux: #c7b3c8;
    --texte-pale: #957f98;
    --bord: #3d2f47;
    --bord-fort: #54415f;
    --primaire: #ff7a52;
    --primaire-fonce: #ff9874;
    --primaire-doux: #48251f;
    --sur-primaire: #1d0f0b;
    --menthe: #3cc7b1;
    --menthe-doux: #173a35;
    --soleil: #ffc53d;
    --soleil-doux: #3d3115;
    --prune: #e08ee0;
    --prune-doux: #3f2140;
    --ciel: #7db6f2;
    --ciel-doux: #1b2c40;
    --ok: #4fd18b;
    --ok-doux: #163526;
    --danger: #ff7a85;
    --danger-doux: #43181d;
    --sur-couleur: #140d17;
    --ombre-1: 0 1px 2px rgba(0, 0, 0, .35), 0 2px 8px rgba(0, 0, 0, .25);
    --ombre-2: 0 2px 6px rgba(0, 0, 0, .35), 0 10px 30px rgba(0, 0, 0, .35);
  }
}

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; overflow-x: hidden; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--police);
  font-size: 16px;
  line-height: 1.5;
  color: var(--texte);
  background: var(--fond);
  background-image: radial-gradient(circle at 12% -10%, var(--fond-motif) 0, transparent 45%), radial-gradient(circle at 110% 30%, var(--fond-motif) 0, transparent 40%);
  background-attachment: fixed;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
img, svg { max-width: 100%; }
h1, h2, h3 { font-family: var(--police-titre); line-height: 1.2; margin: 0 0 var(--e-3); letter-spacing: -.01em; }
h1 { font-size: 1.9rem; font-weight: 800; }
h2 { font-size: 1.3rem; font-weight: 750; }
h3 { font-size: 1.05rem; font-weight: 700; }
p { margin: 0 0 var(--e-3); }
a { color: var(--primaire-fonce); }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--ciel); outline-offset: 2px; }
.visuellement-cache { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.doux { color: var(--texte-doux); }
.pale { color: var(--texte-pale); }
.petit { font-size: .875rem; }
.centre { text-align: center; }
.mono { font-family: var(--police-mono); }
.pile { display: flex; flex-direction: column; gap: var(--e-3); }
.ligne { display: flex; align-items: center; gap: var(--e-2); flex-wrap: wrap; }
.ligne.serree { gap: var(--e-1); }
.ligne.etale { justify-content: space-between; }
.grandit { flex: 1 1 auto; min-width: 0; }
.coupe { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

/* ------------------------------------------------------------------ mise en page */
.page {
  width: 100%;
  max-width: var(--largeur);
  margin: 0 auto;
  padding: calc(var(--e-4) + var(--haut-sur)) calc(var(--e-4) + var(--droite-sur)) calc(var(--e-6) + 64px + var(--bas-sur)) calc(var(--e-4) + var(--gauche-sur));
}
.page.large { max-width: 1040px; }
.entete {
  display: flex;
  align-items: center;
  gap: var(--e-3);
  margin-bottom: var(--e-4);
  min-height: var(--tactile);
}
.logo { display: inline-flex; align-items: center; gap: var(--e-2); text-decoration: none; color: var(--texte); font-family: var(--police-titre); font-weight: 800; font-size: 1.25rem; letter-spacing: -.02em; min-height: var(--tactile); }
.logo img { width: 34px; height: 34px; }
.section { margin: var(--e-5) 0; }
.section > h2 { display: flex; align-items: center; gap: var(--e-2); }

/* ------------------------------------------------------------------ cartes */
.carte {
  background: var(--surface);
  border: 1px solid var(--bord);
  border-radius: var(--rayon);
  box-shadow: var(--ombre-1);
  padding: var(--e-4);
  min-width: 0;
}
.carte.plate { box-shadow: none; }
.carte.douce { background: var(--surface-2); box-shadow: none; }
.carte.accent { border-color: var(--primaire); box-shadow: 0 0 0 2px var(--primaire-doux), var(--ombre-1); }
.carte-titre { display: flex; align-items: center; gap: var(--e-2); font-family: var(--police-titre); font-weight: 750; font-size: 1.05rem; margin-bottom: var(--e-2); }

/* ------------------------------------------------------------------ boutons */
.btn {
  -webkit-appearance: none;
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--e-2);
  min-height: var(--tactile);
  min-width: var(--tactile);
  padding: 10px 18px;
  border: 2px solid transparent;
  border-radius: var(--rayon-rond);
  background: var(--surface-3);
  color: var(--texte);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  transition: transform .08s ease, background-color .15s ease, box-shadow .15s ease, opacity .15s;
}
.btn:active:not(:disabled) { transform: scale(.97); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.btn.primaire { background: var(--primaire); color: var(--sur-primaire); box-shadow: 0 3px 0 var(--primaire-fonce); }
.btn.primaire:active:not(:disabled) { box-shadow: 0 1px 0 var(--primaire-fonce); transform: translateY(2px); }
.btn.secondaire { background: var(--surface); border-color: var(--bord-fort); }
.btn.menthe { background: var(--menthe); color: var(--sur-couleur); }
.btn.fantome { background: transparent; border-color: transparent; color: var(--texte-doux); }
.btn.fantome:hover { background: var(--surface-2); }
.btn.danger { background: var(--danger-doux); color: var(--danger); }
.btn.bloc { display: flex; width: 100%; }
.btn.grand { min-height: 56px; font-size: 1.1rem; padding: 12px 24px; }
.btn.petit { min-height: 36px; padding: 6px 12px; font-size: .9rem; }
.btn.rond { padding: 0; width: var(--tactile); border-radius: 50%; }
.btn .emoji { font-size: 1.2em; line-height: 1; }
.btn.charge { position: relative; color: transparent !important; }
.btn.charge::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--sur-primaire); border-right-color: transparent; animation: tourne .7s linear infinite; }
@keyframes tourne { to { transform: rotate(360deg); } }
.barre-boutons { display: flex; gap: var(--e-2); flex-wrap: wrap; }
.barre-boutons > .btn { flex: 1 1 140px; }

/* ------------------------------------------------------------------ champs */
.champ { display: flex; flex-direction: column; gap: var(--e-1); min-width: 0; }
.champ > label, .etiquette-champ { font-weight: 650; font-size: .9rem; color: var(--texte-doux); }
.entree {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  min-height: var(--tactile);
  padding: 10px 14px;
  font-size: 16px; /* jamais moins : sinon iOS zoome */
  border: 2px solid var(--bord-fort);
  border-radius: var(--rayon-s);
  background: var(--surface);
  color: var(--texte);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.entree:focus { border-color: var(--primaire); box-shadow: 0 0 0 3px var(--primaire-doux); }
.entree.code { font-family: var(--police-mono); text-transform: uppercase; letter-spacing: .25em; font-size: 1.25rem; text-align: center; }
.entree::placeholder { color: var(--texte-pale); }
.erreur-champ { color: var(--danger); font-size: .875rem; }
.form-ligne { display: flex; gap: var(--e-2); }
.form-ligne > .entree { flex: 1 1 auto; min-width: 0; }

/* ------------------------------------------------------------------ onglets / choix */
.onglets { display: flex; gap: 4px; padding: 4px; background: var(--surface-3); border-radius: var(--rayon-rond); overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.onglets::-webkit-scrollbar { display: none; }
.onglet { flex: 1 0 auto; min-height: 40px; padding: 6px 14px; border: 0; border-radius: var(--rayon-rond); background: transparent; color: var(--texte-doux); font-weight: 700; cursor: pointer; touch-action: manipulation; white-space: nowrap; }
.onglet[aria-selected="true"] { background: var(--surface); color: var(--texte); box-shadow: var(--ombre-1); }
.onglet:disabled { cursor: default; }
.puces { display: flex; flex-wrap: wrap; gap: var(--e-2); }
.puce { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 14px; border-radius: var(--rayon-rond); border: 2px solid var(--bord-fort); background: var(--surface); font-weight: 650; cursor: pointer; touch-action: manipulation; }
.puce[aria-pressed="true"] { border-color: var(--primaire); background: var(--primaire-doux); color: var(--primaire-fonce); }
.puce:disabled { cursor: default; opacity: .85; }
.etiquette { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: var(--rayon-rond); font-size: .8rem; font-weight: 700; background: var(--surface-3); color: var(--texte-doux); white-space: nowrap; }
.etiquette.coop { background: var(--menthe-doux); color: var(--menthe); }
.etiquette.versus { background: var(--primaire-doux); color: var(--primaire-fonce); }
.etiquette.solo { background: var(--ciel-doux); color: var(--ciel); }
.etiquette.equipes { background: var(--prune-doux); color: var(--prune); }
.etiquette.ambiance, .etiquette.bluff { background: var(--soleil-doux); color: #8a5a00; }
@media (prefers-color-scheme: dark) { .etiquette.ambiance, .etiquette.bluff { color: var(--soleil); } }

/* ------------------------------------------------------------------ catalogue */
.catalogue { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: var(--e-3); }
.carte-jeu { position: relative; display: flex; flex-direction: column; gap: var(--e-2); text-align: left; width: 100%; cursor: pointer; text-decoration: none; color: inherit; border: 2px solid var(--bord); transition: transform .12s ease, border-color .15s; touch-action: manipulation; font: inherit; }
.carte-jeu:hover { border-color: var(--bord-fort); }
.carte-jeu:active { transform: scale(.985); }
.carte-jeu[aria-pressed="true"] { border-color: var(--primaire); box-shadow: 0 0 0 3px var(--primaire-doux); }
.carte-jeu .tete { display: flex; align-items: center; gap: var(--e-3); }
.vignette { flex: 0 0 auto; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; font-size: 30px; background: var(--surface-3); }
.carte-jeu .nom { font-family: var(--police-titre); font-weight: 800; font-size: 1.15rem; }
.carte-jeu .accroche { color: var(--texte-doux); font-size: .95rem; margin: 0; }
.carte-jeu .meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; color: var(--texte-doux); font-size: .85rem; }
.carte-jeu .externe { position: absolute; top: 10px; right: 12px; font-size: .8rem; color: var(--texte-pale); }
.catalogue.compact { grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }
.catalogue.compact .carte-jeu { padding: var(--e-3); }
.catalogue.compact .accroche { display: none; }

/* ------------------------------------------------------------------ joueurs */
.joueurs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.joueur { display: flex; align-items: center; gap: var(--e-2); min-height: var(--tactile); padding: 4px 8px 4px 4px; border-radius: var(--rayon-s); background: var(--surface-2); min-width: 0; }
.joueur.moi { background: var(--primaire-doux); }
.joueur.absent { opacity: .55; }
.avatar { flex: 0 0 auto; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; font-weight: 800; color: #fff; font-family: var(--police-titre); text-transform: uppercase; }
.avatar.petit { width: 26px; height: 26px; font-size: .8rem; }
.joueur .pseudo { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 650; }
.joueur .badge { font-size: .8rem; color: var(--texte-doux); white-space: nowrap; }
.point-connexion { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); flex: 0 0 auto; }
.absent .point-connexion { background: var(--texte-pale); }

/* ------------------------------------------------------------------ bandeau de partie */
.bandeau {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: var(--e-2);
  margin: calc(-1 * var(--e-4) - var(--haut-sur)) calc(-1 * var(--e-4) - var(--droite-sur)) var(--e-3) calc(-1 * var(--e-4) - var(--gauche-sur));
  padding: calc(6px + var(--haut-sur)) calc(var(--e-3) + var(--droite-sur)) 6px calc(var(--e-3) + var(--gauche-sur));
  background: color-mix(in srgb, var(--fond) 88%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--bord);
  min-height: calc(56px + var(--haut-sur));
}
.bandeau .titre { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.bandeau .titre b { font-family: var(--police-titre); font-size: 1.05rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bandeau .titre span { font-size: .8rem; color: var(--texte-doux); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bandeau .emoji-jeu { font-size: 26px; flex: 0 0 auto; }

/* ------------------------------------------------------------------ minuterie circulaire */
.minuterie { position: relative; flex: 0 0 auto; width: var(--taille, 48px); height: var(--taille, 48px); display: grid; place-items: center; font-weight: 800; font-variant-numeric: tabular-nums; font-size: calc(var(--taille, 48px) * .3); }
.minuterie svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.minuterie .fond-cercle { fill: none; stroke: var(--surface-3); }
.minuterie .arc { fill: none; stroke: var(--menthe); stroke-linecap: round; transition: stroke-dashoffset .25s linear, stroke .3s; }
.minuterie.presse .arc { stroke: var(--soleil); }
.minuterie.urgent .arc { stroke: var(--danger); }
.minuterie.urgent { color: var(--danger); animation: battement 1s ease-in-out infinite; }
@keyframes battement { 50% { transform: scale(1.08); } }

/* ------------------------------------------------------------------ toasts */
.toasts { position: fixed; left: 0; right: 0; top: calc(var(--e-3) + var(--haut-sur)); z-index: 100; display: flex; flex-direction: column; align-items: center; gap: var(--e-2); pointer-events: none; padding: 0 var(--e-3); }
.toast { max-width: min(92vw, 480px); padding: 10px 16px; border-radius: var(--rayon); background: var(--texte); color: var(--fond); box-shadow: var(--ombre-2); font-weight: 650; pointer-events: auto; animation: arrive .2s ease-out; overflow-wrap: anywhere; }
.toast.erreur { background: var(--danger); color: var(--sur-couleur); }
.toast.succes { background: var(--ok); color: var(--sur-couleur); }
@keyframes arrive { from { opacity: 0; transform: translateY(-8px); } }

/* ------------------------------------------------------------------ modale */
.voile { position: fixed; inset: 0; z-index: 90; display: grid; place-items: end center; background: rgba(25, 10, 25, .45); animation: fondu .15s; padding: 0; }
@media (min-width: 640px) { .voile { place-items: center; padding: var(--e-4); } }
@keyframes fondu { from { opacity: 0; } }
.modale { width: 100%; max-width: 520px; max-height: min(88vh, 88dvh); overflow-y: auto; background: var(--surface); border-radius: var(--rayon-l) var(--rayon-l) 0 0; padding: var(--e-5) var(--e-4) calc(var(--e-4) + var(--bas-sur)); box-shadow: var(--ombre-2); animation: monte .2s ease-out; }
@media (min-width: 640px) { .modale { border-radius: var(--rayon-l); } }
@keyframes monte { from { transform: translateY(24px); opacity: .6; } }
.modale h2 { margin-bottom: var(--e-3); }
.modale .actions { display: flex; gap: var(--e-2); margin-top: var(--e-4); flex-wrap: wrap; }
.modale .actions .btn { flex: 1 1 120px; }

/* ------------------------------------------------------------------ clavier virtuel de lettres */
.clavier { display: flex; flex-direction: column; gap: 6px; user-select: none; -webkit-user-select: none; touch-action: manipulation; width: 100%; max-width: 560px; margin: 0 auto; }
.clavier .rang { display: flex; gap: 5px; justify-content: center; }
.touche { flex: 1 1 0; min-width: 0; height: 52px; padding: 0; border: 0; border-radius: 8px; background: var(--surface-3); color: var(--texte); font-weight: 800; font-size: 1.05rem; cursor: pointer; touch-action: manipulation; box-shadow: 0 2px 0 var(--bord-fort); }
.touche:active { transform: translateY(1px); box-shadow: none; }
.touche.large { flex: 1.6 1 0; font-size: .8rem; }
.touche.bien { background: var(--menthe); color: var(--sur-couleur); box-shadow: 0 2px 0 color-mix(in srgb, var(--menthe) 70%, #000); }
.touche.mal { background: var(--soleil-doux); color: var(--texte); box-shadow: inset 0 0 0 3px var(--soleil), 0 2px 0 var(--bord-fort); }
.touche.absent { background: transparent; color: var(--texte-pale); box-shadow: inset 0 0 0 1px var(--bord); }
.touche:disabled { opacity: .5; }

/* ------------------------------------------------------------------ résultats */
.resultats { text-align: center; }
.podium { display: flex; align-items: flex-end; justify-content: center; gap: var(--e-2); margin: var(--e-4) 0; }
.marche { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 30%; max-width: 140px; min-width: 0; }
.marche .socle { width: 100%; border-radius: 12px 12px 4px 4px; display: grid; place-items: center; font-family: var(--police-titre); font-weight: 800; font-size: 1.4rem; color: var(--sur-couleur); }
.marche.r1 .socle { height: 96px; background: var(--soleil); }
.marche.r2 .socle { height: 70px; background: var(--ciel); }
.marche.r3 .socle { height: 52px; background: var(--prune); }
.marche .nom { font-weight: 750; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.marche .pts { font-size: .85rem; color: var(--texte-doux); }
.classement { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; text-align: left; }
.classement li { display: flex; align-items: center; gap: var(--e-2); padding: 8px 12px; border-radius: var(--rayon-s); background: var(--surface-2); min-width: 0; }
.classement li.moi { background: var(--primaire-doux); }
.classement .rang { width: 28px; font-weight: 800; text-align: center; flex: 0 0 auto; }
.classement .pseudo { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 650; }
.classement .pts { font-variant-numeric: tabular-nums; font-weight: 750; white-space: nowrap; }
.gain { color: var(--ok); font-weight: 800; font-size: .85rem; white-space: nowrap; }
.bandeau-coop { font-family: var(--police-titre); font-size: 1.6rem; font-weight: 800; margin: var(--e-3) 0; }
.bandeau-coop.reussi { color: var(--ok); }
.bandeau-coop.rate { color: var(--danger); }

/* ------------------------------------------------------------------ réactions */
.reactions-bouton { position: fixed; right: calc(var(--e-4) + var(--droite-sur)); bottom: calc(var(--e-4) + var(--bas-sur)); z-index: 40; width: 52px; height: 52px; border-radius: 50%; border: 0; background: var(--surface); box-shadow: var(--ombre-2); font-size: 26px; cursor: pointer; touch-action: manipulation; }
.reactions-barre { position: fixed; right: calc(var(--e-4) + var(--droite-sur)); bottom: calc(var(--e-4) + 60px + var(--bas-sur)); z-index: 40; display: grid; grid-template-columns: repeat(4, 48px); gap: 4px; padding: 6px; border-radius: var(--rayon); background: var(--surface); box-shadow: var(--ombre-2); }
.reactions-barre button { width: 48px; height: 48px; border: 0; border-radius: 12px; background: transparent; font-size: 26px; cursor: pointer; touch-action: manipulation; }
.reactions-barre button:active { background: var(--surface-3); }
.en-partie .reactions-bouton { display: none; }
.en-partie .reactions-barre { top: calc(60px + var(--haut-sur)); bottom: auto; }
.bulle-reaction { position: fixed; z-index: 80; bottom: calc(80px + var(--bas-sur)); display: flex; flex-direction: column; align-items: center; pointer-events: none; animation: envol 2.6s ease-out forwards; }
.bulle-reaction .e { font-size: 40px; line-height: 1; }
.bulle-reaction .p { font-size: .75rem; font-weight: 750; padding: 1px 8px; border-radius: var(--rayon-rond); background: var(--surface); box-shadow: var(--ombre-1); max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@keyframes envol { 0% { transform: translateY(20px) scale(.6); opacity: 0; } 12% { transform: translateY(0) scale(1.1); opacity: 1; } 80% { opacity: 1; } 100% { transform: translateY(-220px) scale(1); opacity: 0; } }

/* ------------------------------------------------------------------ confettis */
.confettis { position: fixed; inset: 0; z-index: 95; pointer-events: none; width: 100vw; height: 100vh; }

/* ------------------------------------------------------------------ divers */
.bandeau-info { display: flex; align-items: center; gap: var(--e-2); padding: 10px 14px; border-radius: var(--rayon-s); background: var(--ciel-doux); color: var(--texte); font-weight: 600; margin-bottom: var(--e-3); }
.bandeau-info.alerte { background: var(--soleil-doux); }
.bandeau-info.erreur { background: var(--danger-doux); color: var(--danger); }
.connexion-perdue { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--e-4) + var(--bas-sur)); z-index: 60; padding: 8px 16px; border-radius: var(--rayon-rond); background: var(--texte); color: var(--fond); font-weight: 700; font-size: .9rem; box-shadow: var(--ombre-2); white-space: nowrap; }
.code-soiree { font-family: var(--police-mono); font-weight: 800; letter-spacing: .18em; font-size: 1.05rem; padding: 4px 10px; border-radius: var(--rayon-s); background: var(--surface-3); }
.qr { display: block; width: 200px; height: 200px; margin: var(--e-3) auto; border-radius: var(--rayon-s); background: #fff; padding: 6px; }
.regles { margin: 0; padding-left: 1.3em; display: flex; flex-direction: column; gap: 4px; }
.regles li::marker { color: var(--primaire); font-weight: 800; }
.vide { padding: var(--e-5); text-align: center; color: var(--texte-doux); }
.attente { display: inline-block; width: 1em; text-align: left; }
.attente::after { content: "…"; animation: points 1.2s steps(4) infinite; overflow: hidden; display: inline-block; vertical-align: bottom; width: 0; }
@keyframes points { to { width: 1em; } }
.zone-jeu { min-height: 40vh; }
.resume-lignes { list-style: none; padding: 0; margin: var(--e-3) 0; display: flex; flex-direction: column; gap: 4px; }
.separateur { height: 1px; background: var(--bord); margin: var(--e-4) 0; border: 0; }
.pied { margin-top: var(--e-6); text-align: center; color: var(--texte-pale); font-size: .8rem; }
.pied a { color: inherit; }
.duo { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: var(--e-5); align-items: end; }
.equipes-grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: var(--e-2); }
.equipe-col { border-radius: var(--rayon-s); padding: var(--e-2); background: var(--surface-2); border: 2px solid transparent; min-width: 0; }
.equipe-col h3 { font-size: .95rem; margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
.equipe-col.miennne, .equipe-col.mienne { border-color: var(--primaire); }
.puce-couleur { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
