:root {
  --bg1: #120d24;
  --bg2: #070812;
  --panel: rgba(255, 255, 255, 0.06);
  --panel-line: rgba(255, 255, 255, 0.14);
  --fg: #f4f5ff;
  --fg-dim: #a9aed1;
  --accent: #ff5da2;
  --accent2: #4cc9f0;
  --ok: #2ee6a8;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--fg);
  background:
    radial-gradient(1200px 700px at 15% -10%, #241242 0%, transparent 60%),
    radial-gradient(1000px 700px at 100% 0%, #0a2842 0%, transparent 55%),
    linear-gradient(160deg, var(--bg1), var(--bg2));
  background-attachment: fixed;
  min-height: 100%;
}

.ecran { display: none; padding: 16px clamp(12px, 3vw, 40px) 60px; }
.ecran.actif { display: block; animation: apparait .35s ease; }
@keyframes apparait { from { opacity: 0; transform: translateY(8px);} to {opacity:1;transform:none;} }

/* ---------- MOTS VOLANTS (fond accueil) ---------- */
#mots-volants {
  position: fixed; inset: 0; z-index: 0; overflow: hidden;
  pointer-events: none; user-select: none;
}
.accueil-boite { position: relative; z-index: 1; }
.mot-volant {
  position: absolute; white-space: nowrap; font-weight: 800;
  letter-spacing: .5px; will-change: transform, opacity;
  color: transparent; paint-order: stroke fill;
}

@property --angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

/* ---------- ACCUEIL ---------- */
.accueil-boite { max-width: 760px; margin: 7vh auto 0; text-align: center; }
.logo {
  font-size: clamp(48px, 9vw, 96px); margin: 0; letter-spacing: -2px; font-weight: 900;
  /* Matrice LED (points sombres) + arc-en-ciel + reflet qui balaie */
  background-image:
    linear-gradient(105deg, transparent 43%, rgba(255,255,255,.9) 50%, transparent 57%),
    radial-gradient(circle, rgba(0,0,0,.6) 0 1.3px, transparent 1.6px),
    linear-gradient(90deg, #ff5da2, #ffd166, #4cc9f0, #2ee6a8, #9b5de5, #ff5da2);
  background-size: 250% 100%, 7px 7px, 300% 100%;
  background-position: -60% 0, 0 0, 0 50%;
  background-repeat: no-repeat, repeat, no-repeat;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 8px rgba(120,160,255,.35));
  animation: logo-sweep 6s linear infinite;
}
@keyframes logo-sweep {
  0%   { background-position: -60% 0, 0 0, 0 50%; }
  100% { background-position: 160% 0, 0 0, 0 50%; }
}
@media (prefers-reduced-motion: reduce) { .logo { animation: none; } }
.sous-titre { color: var(--fg-dim); font-size: clamp(14px, 2vw, 18px); margin: 6px 0 28px; }
.choix-joueurs {
  display: grid; grid-template-columns: 1fr;
  gap: 10px; margin: 0 auto 22px; max-width: 320px;
}
/* A/B/C/E : bouton joueur - anneau neon, tilt magnetique, texte anime */
.btn-joueur {
  border: 0; cursor: pointer; color: #fff; font-weight: 800; font-size: 16px;
  padding: 13px 10px; border-radius: 13px;
  transition: transform .22s cubic-bezier(.2,1.3,.4,1), box-shadow .25s, filter .3s, opacity .25s;
  box-shadow: 0 8px 22px rgba(0,0,0,.32); position: relative; overflow: visible;
  z-index: 0; --mx: 0px; --my: 0px; --rx: 0deg; --ry: 0deg;
}
/* Balayage lumineux (clip pour rester dans le bouton) */
.btn-joueur::after {
  content: ""; position: absolute; top: 0; left: -140%; width: 80%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.55), transparent);
  transform: skewX(-20deg); pointer-events: none; z-index: 1; opacity: 0;
  clip-path: inset(0 round 13px);
}
.btn-joueur:hover::after { opacity: 1; animation: btn-shine .75s ease; }
@keyframes btn-shine { from { left: -140%; } to { left: 160%; } }

/* A. Anneau neon conic-gradient qui tourne */
.btn-joueur::before {
  content: ""; position: absolute; inset: -3px; border-radius: 16px; padding: 3px;
  z-index: 2; pointer-events: none; opacity: 0;
  background: conic-gradient(from var(--angle, 0deg), var(--halo), #4cc9f0, #2ee6a8, #ffd166, #9b5de5, var(--halo));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  transition: opacity .3s;
}
.btn-joueur:hover::before { opacity: 1; animation: ring-spin 3s linear infinite; }
@keyframes ring-spin { to { --angle: 360deg; } }

.btn-joueur:hover {
  transform: perspective(700px)
    translateY(-7px) translate(var(--mx), var(--my))
    scale(1.18) rotateX(var(--rx)) rotateY(var(--ry));
  filter: brightness(1.16);
  box-shadow: 0 16px 40px rgba(0,0,0,.45), 0 0 34px var(--halo), 0 0 8px var(--halo);
  z-index: 5;
}
.btn-joueur:active { transform: translateY(-1px) scale(0.98); }

.btn-joueur:nth-child(1) { --halo: #ff5da2;
  background-image:
    repeating-linear-gradient(115deg, transparent 0 17px, rgba(190,235,255,.45) 17px 18px, transparent 18px 44px),
    repeating-linear-gradient(65deg,  transparent 0 23px, rgba(255,255,255,.28) 23px 24px, transparent 24px 52px),
    linear-gradient(135deg,#ff5da2,#c81d64);
  background-size: 44px 44px, 52px 52px, 100% 100%;
  background-position: 0 0, 6px 6px, 0 0;
  background-repeat: repeat, repeat, no-repeat;
}

.btn-joueur:nth-child(2) { --halo: #4cc9f0;
  background-image:
    repeating-linear-gradient(115deg, transparent 0 17px, rgba(190,235,255,.45) 17px 18px, transparent 18px 44px),
    repeating-linear-gradient(65deg,  transparent 0 23px, rgba(255,255,255,.28) 23px 24px, transparent 24px 52px),
    linear-gradient(135deg,#4cc9f0,#0077b6);
  background-size: 44px 44px, 52px 52px, 100% 100%;
  background-position: 0 0, 6px 6px, 0 0;
  background-repeat: repeat, repeat, no-repeat;
}

.btn-joueur:nth-child(3) { --halo: #2ee6a8;
  background-image:
    repeating-linear-gradient(115deg, transparent 0 17px, rgba(190,235,255,.45) 17px 18px, transparent 18px 44px),
    repeating-linear-gradient(65deg,  transparent 0 23px, rgba(255,255,255,.28) 23px 24px, transparent 24px 52px),
    linear-gradient(135deg,#2ee6a8,#0a8f63);
  background-size: 44px 44px, 52px 52px, 100% 100%;
  background-position: 0 0, 6px 6px, 0 0;
  background-repeat: repeat, repeat, no-repeat;
}

.btn-joueur:nth-child(4) { --halo: #ffd166;
  background-image:
    repeating-linear-gradient(115deg, transparent 0 17px, rgba(190,235,255,.45) 17px 18px, transparent 18px 44px),
    repeating-linear-gradient(65deg,  transparent 0 23px, rgba(255,255,255,.28) 23px 24px, transparent 24px 52px),
    linear-gradient(135deg,#ffd166,#e08a00);
  background-size: 44px 44px, 52px 52px, 100% 100%;
  background-position: 0 0, 6px 6px, 0 0;
  background-repeat: repeat, repeat, no-repeat;
}

.btn-joueur:nth-child(5) { --halo: #9b5de5;
  background-image:
    repeating-linear-gradient(115deg, transparent 0 17px, rgba(190,235,255,.45) 17px 18px, transparent 18px 44px),
    repeating-linear-gradient(65deg,  transparent 0 23px, rgba(255,255,255,.28) 23px 24px, transparent 24px 52px),
    linear-gradient(135deg,#9b5de5,#5a2ea6);
  background-size: 44px 44px, 52px 52px, 100% 100%;
  background-position: 0 0, 6px 6px, 0 0;
  background-repeat: repeat, repeat, no-repeat;
}


/* C. Les voisins s'ecartent quand on survole un prenom */
.choix-joueurs:has(.btn-joueur:hover) .btn-joueur:not(:hover) {
  transform: scale(.92) translateY(2px); opacity: .68; filter: saturate(.75) brightness(.9);
}

/* E. Texte anime au survol */
.btn-joueur .lbl {
  display: inline-block; position: relative; z-index: 3;
  background: linear-gradient(100deg, #fff 0%, #fff 38%, #ffe3f1 50%, #fff 62%, #fff 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}
.btn-joueur:hover .lbl { animation: text-shine 1.4s linear infinite; }
@keyframes text-shine { from { background-position: 130% 0; } to { background-position: -130% 0; } }

/* G. Sparkles */
#sparkles { position: fixed; inset: 0; pointer-events: none; z-index: 60; overflow: hidden; }
.sparkle { position: absolute; width: 7px; height: 7px; border-radius: 50%; pointer-events: none; will-change: transform, opacity; }

.btn-maitre {
  background: transparent; color: var(--fg); border: 1px solid var(--panel-line);
  padding: 12px 22px; border-radius: 12px; cursor: pointer; font-size: 15px;
}
.btn-maitre:hover { border-color: var(--accent2); color: var(--accent2); }
.etat-cnx { margin-top: 22px; color: var(--fg-dim); font-size: 13px; display: flex; gap: 8px; align-items: center; justify-content: center; }
.pastille { width: 10px; height: 10px; border-radius: 50%; background: #f59e0b; display: inline-block; }
.pastille.on { background: var(--ok); box-shadow: 0 0 12px var(--ok); }
.pastille.off { background: #ef4444; }

/* ---------- BARRE ---------- */
.barre { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.btn-retour {
  background: var(--panel); border: 1px solid var(--panel-line); color: var(--fg);
  width: 42px; height: 42px; border-radius: 12px; font-size: 24px; line-height: 1;
  cursor: pointer; flex: none;
}
.btn-retour:hover { border-color: var(--accent); }
.qui { font-weight: 800; font-size: clamp(18px, 3vw, 26px); }
.partie { margin-left: auto; color: var(--fg-dim); font-size: 14px; }
.btn-reset {
  margin-left: auto; background: linear-gradient(135deg,#ff5da2,#c81d64);
  color: #fff; border: 0; padding: 11px 18px; border-radius: 12px; font-weight: 700;
  cursor: pointer; font-size: 14px;
}
.btn-reset:hover { filter: brightness(1.1); }

/* ---------- LAYOUT JEU : gauche (autres) | centre (moi) | droite (chat) ---------- */
.jeu-layout {
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(300px, 620px) minmax(340px, 520px);
  gap: 18px; align-items: start; justify-content: center;
}
.centre { min-width: 0; }
.cotes {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; align-content: start;
}
.cotes .carte-mini { padding: 6px; }

/* ---------- CARTE ---------- */
.carte {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px;
  max-width: 620px; margin: 0 auto;
}
.case {
  position: relative; aspect-ratio: 1 / 1; border-radius: 12px; cursor: pointer;
  background: #161b24; border: 2px solid rgba(255,255,255,.18);
  display: flex; align-items: center; justify-content: center; text-align: center;
  padding: 8px; font-size: clamp(10px, 1.5vw, 13.5px); font-weight: 600; line-height: 1.2;
  user-select: none; transition: transform .12s, background .2s, border-color .2s;
  overflow: hidden;
}
.case .barre-cat { position: absolute; top: 0; left: 0; right: 0; height: 5px; }
.case:hover { transform: scale(1.03); border-color: rgba(255,255,255,.4); }
.case.coche {
  background: rgba(46,230,168,.18); border-color: var(--ok);
  box-shadow: inset 0 0 0 1px var(--ok), 0 0 18px rgba(46,230,168,.25);
  animation: pop .28s ease;
}
.case.coche .mot { opacity: .55; }
.case.coche::after {
  content: "✓"; position: absolute; font-size: 30px; color: var(--ok);
  text-shadow: 0 2px 8px rgba(0,0,0,.5);
}
@keyframes pop { 0%{transform:scale(.85);} 60%{transform:scale(1.08);} 100%{transform:scale(1);} }
.case.libre {
  background: #232b38; border-color: rgba(148,163,184,.45); cursor: default;
  color: var(--fg-dim); font-weight: 800; letter-spacing: 1px;
}
.case.libre::after { content: none; }

/* ---------- SCORE JOUEUR ---------- */
.zone-score {
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin: 4px 0 18px;
}
.pilule {
  background: var(--panel); border: 1px solid var(--panel-line); border-radius: 14px;
  padding: 10px 18px; text-align: center; min-width: 96px;
}
.pilule .val { font-size: 26px; font-weight: 900; }
.pilule .lab { font-size: 11px; color: var(--fg-dim); text-transform: uppercase; letter-spacing: .5px; }
.pilule.lignes .val { color: var(--accent2); }
.pilule.bingo { border-color: var(--ok); box-shadow: 0 0 20px rgba(46,230,168,.3); }
.pilule.bingo .val { color: var(--ok); }

/* ---------- LEGENDE ---------- */
.legende {
  display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin: 20px 4px 6px;
  font-size: 12px; color: var(--fg-dim);
}
.legende .item { display: flex; align-items: center; gap: 6px; }
.legende .pt { width: 12px; height: 12px; border-radius: 3px; }

/* ---------- SCOREBOARD ---------- */
.scoreboard { max-width: 620px; margin: 30px auto 0; }
.scoreboard.large { max-width: 100%; }
.scoreboard h2 { font-size: 15px; text-transform: uppercase; letter-spacing: 1px; color: var(--fg-dim); margin: 0 0 10px; }
.classement { display: grid; gap: 8px; }
.ligne-score {
  display: grid; grid-template-columns: 40px 1fr auto auto; align-items: center; gap: 12px;
  background: var(--panel); border: 1px solid var(--panel-line); border-radius: 12px;
  padding: 10px 14px; transition: border-color .2s;
}
.ligne-score.leader { border-color: #ffd166; box-shadow: 0 0 18px rgba(255,209,102,.2); }
.rang { font-weight: 900; font-size: 18px; color: var(--fg-dim); }
.ligne-score.leader .rang { color: #ffd166; }
.nom { font-weight: 700; }
.badge {
  padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 800;
  background: rgba(76,201,240,.2); color: var(--accent2);
}
.badge.bingo { background: rgba(46,230,168,.22); color: var(--ok); }
.mots { color: var(--fg-dim); font-size: 13px; min-width: 62px; text-align: right; }

/* ---------- VUE GLOBALE (maitre) ---------- */
.partie-maitre { text-align: center; color: var(--fg-dim); margin-bottom: 14px; font-size: 14px; }
.cartes-maitre {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px; max-width: 1400px; margin: 0 auto;
}
.cartes-maitre .carte-mini { display: flex; flex-direction: column; }
.cartes-maitre .grille { flex: 1; }

/* ---------- MINI-GRILLES (autres joueurs) ---------- */
.carte-mini {
  background: #10141c; border: 1px solid rgba(255,255,255,.16); border-radius: 11px;
  padding: 6px;
}
.carte-mini h3 {
  margin: 0 0 5px; font-size: 11px; text-align: center;
  display: flex; flex-direction: column; gap: 0; align-items: center;
}
.carte-mini h3 .mini-nom { font-weight: 800; }
.carte-mini h3 .mini-mots { color: var(--fg-dim); font-weight: 500; font-size: 9px; }
.carte-mini .grille { display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; }
.mini-case {
  aspect-ratio: 1/1; border-radius: 2px; background: #232b38;
  border: 1px solid rgba(255,255,255,.14); position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center; padding: 0;
  font-size: 0; text-align: center; line-height: 1.05; color: var(--fg-dim);
}
.mini-case .barre-cat { position: absolute; top: 0; left: 0; right: 0; height: 2px; }
.mini-case.coche { background: rgba(46,230,168,.16); border-color: var(--ok); color: var(--fg); }
.mini-case.coche::after {
  content: "✓"; position: absolute; font-size: 9px; color: var(--ok); font-weight: 900;
}
.mini-case.libre { background: #2f3947; }
.mini-case.libre::after { content: none; }
/* Variante detaillee (vue maitre) : mots visibles */
.carte-mini.detaillee { padding: 12px; border-radius: 16px; }
.carte-mini.detaillee h3 { font-size: 14px; margin-bottom: 10px; }
.carte-mini.detaillee h3 .mini-mots { font-size: 11.5px; }
.carte-mini.detaillee .grille { gap: 4px; }
.carte-mini.detaillee .mini-case { border-radius: 5px; padding: 3px; font-size: 7.5px; }
.carte-mini.detaillee .mini-case.coche::after { font-size: 15px; }

/* ---------- CHAT ---------- */
.chat {
  position: relative;
  display: flex; flex-direction: column;
  background: rgba(0,0,0,.28); border: 1px solid var(--panel-line); border-radius: 16px;
  height: 560px; max-height: 78vh; overflow: hidden;
}
.chat-titre {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border-bottom: 1px solid var(--panel-line);
  font-weight: 800; letter-spacing: .5px; text-transform: uppercase; font-size: 13px;
  color: var(--fg-dim);
}
.chat-qui { color: var(--accent2); text-transform: none; letter-spacing: 0; font-size: 12.5px; }
.chat-messages {
  flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px;
  scroll-behavior: smooth;
}
.chat-vide { color: var(--fg-dim); font-size: 13px; text-align: center; margin: auto; }

/* Message : avatar + bulle */
.chat-msg { display: flex; gap: 8px; align-items: flex-end; max-width: 100%; animation: msg-in .28s ease both; }
.chat-msg.moi { flex-direction: row-reverse; }
@keyframes msg-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.chat-msg.noanim { animation: none; }
.chat-avatar {
  flex: none; width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 13px; color: #10121a;
}
.chat-corps { display: flex; flex-direction: column; max-width: 78%; }
.chat-msg.moi .chat-corps { align-items: flex-end; }
.chat-auteur { font-size: 11px; font-weight: 800; margin: 0 4px 2px; }
.chat-bulle {
  position: relative; padding: 8px 12px; border-radius: 14px; font-size: 13.5px; line-height: 1.35;
  word-break: break-word;
}
.chat-bulle .heure { display: block; font-size: 10px; opacity: .55; margin-top: 3px; text-align: right; }
.chat-msg.autre .chat-bulle { background: rgba(255,255,255,.08); border: 1px solid var(--panel-line); border-bottom-left-radius: 4px; }
.chat-msg.moi .chat-bulle { background: rgba(76,201,240,.18); border: 1px solid rgba(76,201,240,.4); border-bottom-right-radius: 4px; }
/* Regroupement : messages consecutifs sans avatar */
.chat-msg.groupe { margin-top: -4px; }
.chat-msg.groupe .chat-avatar { visibility: hidden; }
.chat-msg.groupe .chat-auteur { display: none; }

/* Reactions */
.chat-reactions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.chat-reactions button {
  background: rgba(255,255,255,.08); border: 1px solid var(--panel-line); color: var(--fg);
  border-radius: 999px; padding: 1px 8px; font-size: 12.5px; cursor: pointer; line-height: 1.6;
}
.chat-reactions button:hover { border-color: var(--accent2); }
.chat-reactions button.mienne { background: rgba(76,201,240,.22); border-color: var(--accent2); }
/* Selecteur au survol */
.chat-pick {
  position: absolute; top: -14px; display: none; gap: 2px;
  background: var(--panel); border: 1px solid var(--panel-line); border-radius: 999px;
  padding: 3px 5px; box-shadow: 0 6px 18px rgba(0,0,0,.4); z-index: 5;
}
.chat-msg.autre .chat-pick { right: 0; }
.chat-msg.moi .chat-pick { left: 0; }
.chat-msg:hover .chat-pick { display: flex; }
.chat-pick button {
  background: none; border: 0; cursor: pointer; font-size: 15px; padding: 1px 2px; border-radius: 6px;
}
.chat-pick button:hover { background: rgba(255,255,255,.12); }

/* Indicateur de saisie */
.chat-typing {
  min-height: 18px; padding: 0 16px 4px; font-size: 11.5px; color: var(--fg-dim);
  font-style: italic; display: flex; align-items: center; gap: 6px;
}
.chat-typing .dots { display: inline-flex; gap: 3px; }
.chat-typing .dots i {
  width: 5px; height: 5px; border-radius: 50%; background: var(--accent2);
  animation: dots 1s infinite ease-in-out;
}
.chat-typing .dots i:nth-child(2) { animation-delay: .15s; }
.chat-typing .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dots { 0%,60%,100% { transform: translateY(0); opacity: .4; } 30% { transform: translateY(-3px); opacity: 1; } }

/* Formulaire */
.chat-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--panel-line); }
.chat-form input {
  flex: 1; background: rgba(255,255,255,.07); border: 1px solid var(--panel-line);
  color: var(--fg); border-radius: 10px; padding: 10px 12px; font-size: 14px; outline: none;
}
.chat-form input:focus { border-color: var(--accent2); }
.chat-form button {
  background: linear-gradient(135deg,#4cc9f0,#0077b6); color: #fff; border: 0;
  border-radius: 10px; width: 46px; font-size: 18px; cursor: pointer;
}
.chat-form button:hover { filter: brightness(1.1); }

/* Bouton "nouveaux messages" */
.chat-jump {
  position: absolute; left: 50%; transform: translateX(-50%); bottom: 66px;
  background: var(--accent2); color: #10121a; border: 0; border-radius: 999px;
  padding: 6px 14px; font-size: 12.5px; font-weight: 800; cursor: pointer;
  box-shadow: 0 8px 22px rgba(0,0,0,.45); z-index: 6;
}
.chat-jump.hidden { display: none; }

/* ---------- CONFETTIS ---------- */
#confettis { position: fixed; inset: 0; pointer-events: none; z-index: 999; overflow: hidden; }
.confetti {
  position: absolute; width: 10px; height: 16px; top: -20px; opacity: .95;
  animation: tombe linear forwards;
}
@keyframes tombe { to { transform: translateY(110vh) rotate(720deg); opacity: .8; } }

/* ---------- VICTOIRE (eclatement) ---------- */
#victoire {
  position: fixed; inset: 0; z-index: 1000; overflow: hidden; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 45%, rgba(24,10,46,.9), rgba(3,3,10,.97));
  animation: vfade .3s ease both;
}
@keyframes vfade { from { opacity: 0; } to { opacity: 1; } }
#victoire.fin { animation: vfade .4s ease reverse both; }
.victoire-rayons {
  position: absolute; left: 50%; top: 50%; width: 170vmax; height: 170vmax;
  transform: translate(-50%, -50%);
  background: repeating-conic-gradient(
    from 0deg,
    rgba(255, 209, 102, .18) 0deg 6deg,
    transparent 6deg 16deg);
  -webkit-mask-image: radial-gradient(circle, #000 0%, transparent 62%);
  mask-image: radial-gradient(circle, #000 0%, transparent 62%);
  animation: vspin 18s linear infinite;
}
@keyframes vspin { to { transform: translate(-50%, -50%) rotate(360deg); } }
.victoire-carte {
  position: relative; text-align: center; padding: clamp(28px, 5vw, 52px) clamp(34px, 7vw, 80px);
  border-radius: 30px;
  background: linear-gradient(160deg, #16324a 0%, #231338 100%);
  border: 3px solid var(--ok);
  box-shadow: 0 0 80px rgba(46,230,168,.6), inset 0 0 60px rgba(46,230,168,.15);
  animation: vpop .65s cubic-bezier(.2, 1.55, .4, 1) both;
}
@keyframes vpop {
  0% { transform: scale(0) rotate(-10deg); opacity: 0; }
  55% { transform: scale(1.14) rotate(3deg); }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}
.victoire-titre {
  font-size: clamp(42px, 10vw, 104px); font-weight: 900; letter-spacing: 3px; line-height: .95;
  background: linear-gradient(90deg, #ff5da2, #ffd166, #2ee6a8);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: vpulse 1s ease-in-out infinite alternate;
}
@keyframes vpulse { to { filter: brightness(1.35) drop-shadow(0 0 22px rgba(255,209,102,.75)); } }
.victoire-nom {
  font-size: clamp(24px, 5vw, 50px); font-weight: 800; color: #fff; margin-top: 8px;
  text-shadow: 0 4px 24px rgba(0,0,0,.8);
}
.victoire-sous { color: #eef1ff; margin-top: 14px; font-size: clamp(14px, 2vw, 18px); font-weight: 600; }
.victoire-aide { margin-top: 24px; font-size: 12px; color: #cdd3ee; opacity: .85; }
.burst {
  position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; border-radius: 50%;
  pointer-events: none; will-change: transform, opacity;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1100px) {
  .jeu-layout { grid-template-columns: 1fr; }
  .cotes { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
  .chat { height: 420px; max-height: 60vh; }
}
@media (max-width: 560px) {
  .case { font-size: 9px; padding: 3px; border-radius: 9px; }
  .case.coche::after { font-size: 22px; }
  .ligne-score { grid-template-columns: 32px 1fr auto; }
  .ligne-score .mots { display: none; }
}

/* ---------- TOASTS ---------- */
.toasts {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%);
  z-index: 1200; display: flex; flex-direction: column; gap: 8px; align-items: center;
  pointer-events: none; width: max-content; max-width: 92vw;
}
.toast {
  background: rgba(12,14,22,.94); border: 1px solid var(--panel-line);
  border-left: 4px solid var(--accent2); border-radius: 12px;
  padding: 9px 16px; font-size: 14px; color: var(--fg);
  box-shadow: 0 12px 30px rgba(0,0,0,.45);
  animation: toast-in .3s cubic-bezier(.2,1.3,.4,1) both;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.toast .qui { font-weight: 900; }
.toast .quoi { color: var(--fg-dim); }
.toast.out { animation: toast-out .35s ease forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-14px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(-10px) scale(.96); } }

/* ---------- CONTROLE SON ---------- */
.son-ctrl {
  position: fixed; right: 14px; bottom: 14px; z-index: 1100;
  display: flex; align-items: center; gap: 8px;
  background: rgba(12,14,22,.9); border: 1px solid var(--panel-line);
  border-radius: 999px; padding: 6px 10px; box-shadow: 0 10px 24px rgba(0,0,0,.4);
}
.son-btn {
  background: none; border: 0; cursor: pointer; font-size: 18px; line-height: 1;
  color: var(--fg); padding: 2px;
}
.son-btn.muet { opacity: .5; }
.son-range { width: 90px; accent-color: var(--accent2); cursor: pointer; }

/* ---------- LANCEMENT (distribution des cartes) ---------- */
#lancement {
  position: fixed; inset: 0; z-index: 1300; overflow: hidden; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 40%, rgba(30,12,55,.96), rgba(3,3,10,.98));
  animation: vfade .3s ease both;
}
#lancement.fin { animation: vfade .35s ease reverse both; }

/* Fond anime du lancement */
.lancement-rayons {
  position: absolute; left: 50%; top: 45%; width: 180vmax; height: 180vmax;
  transform: translate(-50%, -50%);
  background: repeating-conic-gradient(from 0deg,
    rgba(255,93,162,.10) 0deg 5deg, transparent 5deg 14deg,
    rgba(76,201,240,.10) 14deg 19deg, transparent 19deg 28deg);
  -webkit-mask-image: radial-gradient(circle, #000 0%, transparent 60%);
  mask-image: radial-gradient(circle, #000 0%, transparent 60%);
  animation: vspin 26s linear infinite; pointer-events: none;
}
.lancement-halo {
  position: absolute; left: 50%; top: 45%; width: 90vmin; height: 90vmin;
  transform: translate(-50%, -50%); border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--halo, #9b5de5) 32%, transparent), transparent 62%);
  animation: halo-pulse 3.2s ease-in-out infinite; pointer-events: none;
}
@keyframes halo-pulse { 0%,100% { transform: translate(-50%,-50%) scale(.9); opacity: .55; } 50% { transform: translate(-50%,-50%) scale(1.12); opacity: .85; } }
.lancement-particule {
  position: absolute; width: 8px; height: 8px; border-radius: 50%;
  pointer-events: none; will-change: transform, opacity;
}
.lancement-contenu { position: relative; z-index: 2; text-align: center; width: min(92vw, 560px); }
.lancement-nom {
  font-size: clamp(28px, 6vw, 52px); font-weight: 900; letter-spacing: 1px;
  min-height: 1.12em; color: #fff; text-shadow: 0 4px 24px rgba(0,0,0,.6);
}
.lancement-nom .curseur { color: var(--accent2); animation: clignote .7s steps(1) infinite; }
@keyframes clignote { 50% { opacity: 0; } }
.lancement-sous { color: var(--fg-dim); margin: 6px 0 18px; font-size: 14px; }
.lancement-grille { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.lancement-case {
  position: relative; aspect-ratio: 1/1; border-radius: 10px;
  border: 2px solid rgba(255,255,255,.35); background: #1b2029;
  display: flex; align-items: center; justify-content: center; text-align: center;
  padding: 6px; font-size: clamp(8px, 1.6vw, 13px); font-weight: 700;
  color: var(--fg); overflow: hidden;
}
.lancement-case .barre { position: absolute; top: 0; left: 0; right: 0; height: 3px; }
.lancement-case.locked { color: #fff; animation: cell-lock .35s cubic-bezier(.2,1.4,.4,1); }
.lancement-case.locked.libre { color: var(--fg-dim); }
@keyframes cell-lock { 0% { transform: scale(1.28) rotate(-6deg); } 60% { transform: scale(.94); } 100% { transform: scale(1); } }
.lancement-go {
  margin-top: 20px; font-size: clamp(20px, 4vw, 34px); font-weight: 900;
  background: linear-gradient(90deg, #ff5da2, #ffd166, #2ee6a8);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  opacity: 0; transform: scale(.7); transition: opacity .3s, transform .35s cubic-bezier(.2,1.4,.4,1);
}
.lancement-go.on { opacity: 1; transform: scale(1); }
.lancement-aide { margin-top: 14px; font-size: 11px; color: var(--fg-dim); opacity: .7; }

/* ---------- FOND ANIME PAGE DE JEU ---------- */
#ecran-joueur { position: relative; }
#ecran-joueur > *:not(#fond-jeu) { position: relative; z-index: 1; }
#fond-jeu {
  position: fixed; inset: 0; z-index: 0; overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(1000px 700px at 50% 120%, color-mix(in srgb, var(--pc, #9b5de5) 9%, transparent), transparent 62%),
    linear-gradient(180deg, #0a0a14, #07070e);
}
/* Mot rebondissant facon "DVD" (sobre) */
.dvd {
  position: absolute; left: 0; top: 0;
  font-weight: 900; letter-spacing: 1px; white-space: nowrap;
  font-size: clamp(20px, 2.8vw, 36px);
  opacity: .16; will-change: transform; user-select: none;
}
@media (prefers-reduced-motion: reduce) { .dvd { opacity: .12; } }

/* ---------- PAGE DE JEU : identite couleur par joueur ---------- */
#ecran-joueur { --pc: #ff5da2; }

/* En-tete neon */
.barre { position: relative; }
.qui {
  position: relative; font-weight: 900; color: var(--pc);
}
.qui::after {
  content: ""; position: absolute; left: 0; right: 8px; bottom: -5px; height: 2px;
  background: linear-gradient(90deg, var(--pc), transparent);
  box-shadow: 0 0 10px var(--pc); border-radius: 2px;
}
.partie {
  color: var(--fg); font-size: 13px; font-weight: 700;
  background: var(--panel); border: 1px solid var(--panel-line);
  border-radius: 999px; padding: 6px 14px;
}
.btn-retour:hover {
  border-color: var(--pc); color: var(--pc);
  box-shadow: 0 0 14px color-mix(in srgb, var(--pc) 45%, transparent);
}

/* Cadre de la carte principale */
.centre {
  position: relative; padding: 14px; border-radius: 20px;
  border: 1px solid color-mix(in srgb, var(--pc) 42%, var(--panel-line));
  background: rgba(0,0,0,.20);
  box-shadow: 0 0 30px color-mix(in srgb, var(--pc) 20%, transparent), inset 0 0 46px rgba(0,0,0,.28);
  animation: cadre-respire 5.5s ease-in-out infinite;
}
@keyframes cadre-respire {
  50% { box-shadow: 0 0 42px color-mix(in srgb, var(--pc) 32%, transparent), inset 0 0 46px rgba(0,0,0,.28); }
}

/* Cases : halo de la categorie au survol */
.case:hover { box-shadow: 0 0 14px color-mix(in srgb, var(--cat, #ffffff) 55%, transparent); }
/* Case centrale LIBRE : pulsation douce */
.case.libre { animation: libre-pulse 3.2s ease-in-out infinite; }
@keyframes libre-pulse {
  50% { box-shadow: inset 0 0 0 1px rgba(148,163,184,.5), 0 0 16px rgba(148,163,184,.35); }
}

/* Score : la valeur "mots" prend la couleur du joueur */
.pilule.mots .val { color: var(--pc); }

/* Cartes adversaires : cadre + nom a leur couleur */
.carte-mini { border-color: color-mix(in srgb, var(--pc, #4cc9f0) 50%, var(--panel-line)); }
.carte-mini .mini-nom { color: var(--pc, var(--fg)); }

@media (prefers-reduced-motion: reduce) {
  .centre, .case.libre { animation: none; }
}

/* ---------- THEME SOMBRE ALLEGE (page de jeu, sans glow) ---------- */
/* Fond ardoise plus doux + teinte joueur tres legere */
#ecran-joueur #fond-jeu {
  background:
    radial-gradient(1000px 700px at 50% 120%, color-mix(in srgb, var(--pc, #9b5de5) 7%, transparent), transparent 62%),
    linear-gradient(180deg, #232833, #1a1e27);
}
/* En-tete : plus de lueur sous le nom ni au survol du retour */
#ecran-joueur .qui::after { box-shadow: none; }
#ecran-joueur .btn-retour:hover { box-shadow: none; }
/* Cadre de carte : plat, sans halo ni pulsation */
#ecran-joueur .centre {
  border-color: color-mix(in srgb, var(--pc) 30%, var(--panel-line));
  background: #20252f;
  box-shadow: none;
  animation: none;
}
/* Cases plus claires, sans halo de categorie ni pulsation LIBRE */
#ecran-joueur .case { background: #2b313d; border-color: rgba(255,255,255,.20); }
#ecran-joueur .case:hover { box-shadow: none; }
#ecran-joueur .case.libre { background: #3a4250; animation: none; box-shadow: none; }
/* Grilles adverses plus claires */
#ecran-joueur .carte-mini { background: #1d222b; }
#ecran-joueur .mini-case { background: #2b313d; border-color: rgba(255,255,255,.16); }
#ecran-joueur .mini-case.libre { background: #3a4250; }
/* Chat : fond translucide pour laisser passer le mot qui rebondit */
#ecran-joueur .chat { background: rgba(24,29,39,.42); }
/* Pilule bingo : sans halo */
#ecran-joueur .pilule.bingo { box-shadow: none; }
/* Mot rebondissant : un peu plus visible sur fond plus clair */
#ecran-joueur #dvd { opacity: .20; }

/* ---------- CURSEUR PERSONNALISE : boule de bingo ---------- */
:root {
  --cur-default: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cg stroke='%234cc9f0' stroke-width='1.6' fill='none'%3E%3Ccircle cx='14' cy='14' r='7'/%3E%3Cline x1='14' y1='1' x2='14' y2='5'/%3E%3Cline x1='14' y1='23' x2='14' y2='27'/%3E%3Cline x1='1' y1='14' x2='5' y2='14'/%3E%3Cline x1='23' y1='14' x2='27' y2='14'/%3E%3C/g%3E%3Ccircle cx='14' cy='14' r='1.3' fill='%23ff5da2'/%3E%3C/svg%3E") 14 14, crosshair;
  --cur-pointer: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3E%3Cpath d='M8 13 V7 a2.2 2.2 0 0 1 4.4 0 v5 M12.4 11 V5 a2.2 2.2 0 0 1 4.4 0 v7 M16.8 11 V6 a2.2 2.2 0 0 1 4.4 0 v7 M21.2 12 v-3 a2.2 2.2 0 0 1 4.4 0 v10 c0 6 -3.6 9.4 -9 9.4 h-1.4 c-3.2 0 -5.4 -1.2 -7 -3.8 l-3.2 -5.4 a2.3 2.3 0 0 1 3.4 -3 l1.4 1.6 z' fill='%234cc9f0' stroke='%230b0e13' stroke-width='1.3' stroke-linejoin='round'/%3E%3C/svg%3E") 9 5, pointer
}
body { cursor: var(--cur-default); }
a, button, .btn-joueur, .btn-maitre, .btn-retour, .btn-reset,
.chat-form button, .chat-jump, .chat-reactions button, .chat-pick button,
.son-btn, .son-range, .case:not(.libre) { cursor: var(--cur-pointer); }

/* ---------- MOT AFFICHE AU CLIC (crosshair) ---------- */
#mots-clic { position: fixed; inset: 0; z-index: 55; pointer-events: none; overflow: hidden; }
.mot-clic {
  position: fixed; transform: translate(-50%, -50%);
  font-weight: 900; letter-spacing: .5px; white-space: nowrap;
  font-size: clamp(18px, 2.4vw, 30px);
  padding: 6px 14px; border-radius: 12px;
  background: rgba(10,12,18,.72); border: 1.5px solid currentColor;
  text-shadow: 0 0 10px currentColor;
  animation: mot-clic-anim 3.5s ease forwards;
}
@keyframes mot-clic-anim {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(.6); }
  12%  { opacity: 1; transform: translate(-50%, -50%) scale(1.08); }
  22%  { transform: translate(-50%, -50%) scale(1); }
  80%  { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.04); }
}

/* ---------- BOUTON SECRET ---------- */
.btn-secret {
  position: fixed; left: 0; top: 0; z-index: 1100;
  width: 30px; height: 30px; border-radius: 50%; cursor: var(--cur-pointer, pointer);
  background: rgba(24,28,40,.82); border: 1px solid rgba(255,255,255,.28);
  color: #d6dcec; font-size: 14px; line-height: 1; padding: 0;
  opacity: .5; transition: opacity .3s, color .3s, border-color .3s;
  will-change: left, top; transform: none;
  animation: secret-respire 3.4s ease-in-out infinite;
}
@keyframes secret-respire {
  0%, 100% { box-shadow: 0 0 4px rgba(255,209,102,.15), 0 0 2px rgba(255,255,255,.12); border-color: rgba(255,255,255,.20); }
  50%      { box-shadow: 0 0 18px rgba(255,209,102,.75), 0 0 34px rgba(255,209,102,.35); border-color: rgba(255,209,102,.9); }
}
.btn-secret:hover { opacity: 1; border-color: #ffd166; color: #ffd166; animation: none; box-shadow: 0 0 22px rgba(255,209,102,.85); }
@media (prefers-reduced-motion: reduce) { .btn-secret { animation: none; } }

/* ---------- PETITE NOTE (astuce) ---------- */
.astuce {
  position: fixed; left: 50%; bottom: 12px; transform: translateX(-50%);
  z-index: 1090; pointer-events: none;
  font-size: 12px; color: #c7cede; letter-spacing: .3px;
  background: rgba(12,14,22,.55); border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px; padding: 5px 14px; opacity: .55;
}
.astuce b { color: #ffd166; font-weight: 800; }

/* ---------- GIF (chat) ---------- */
.gif-btn {
  flex: none; background: rgba(255,255,255,.08); border: 1px solid var(--panel-line);
  color: var(--fg); border-radius: 10px; padding: 0 10px; font-weight: 800; font-size: 12px;
  cursor: pointer; letter-spacing: .5px;
}
.gif-btn:hover { border-color: var(--accent2); color: var(--accent2); }
.gif-panel {
  border-top: 1px solid var(--panel-line); background: rgba(8,10,16,.92);
  padding: 10px; display: flex; flex-direction: column; gap: 8px; max-height: 46%; overflow: hidden;
}
.gif-panel.hidden { display: none; }
.gif-head { display: flex; gap: 8px; }
.gif-head input {
  flex: 1; background: rgba(255,255,255,.07); border: 1px solid var(--panel-line);
  color: var(--fg); border-radius: 9px; padding: 8px 10px; font-size: 13px; outline: none;
}
.gif-head input:focus { border-color: var(--accent2); }
.gif-close {
  background: none; border: 1px solid var(--panel-line); color: var(--fg-dim);
  border-radius: 9px; width: 34px; cursor: pointer; font-size: 13px;
}
.gif-close:hover { color: var(--fg); border-color: var(--accent2); }
.gif-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 6px;
  overflow-y: auto; padding-right: 2px;
}
.gif-cell {
  aspect-ratio: 1/1; border-radius: 8px; overflow: hidden; cursor: pointer;
  border: 2px solid transparent; background: rgba(255,255,255,.05); position: relative;
}
.gif-cell:hover { border-color: var(--accent2); }
.gif-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gif-vide { color: var(--fg-dim); font-size: 12px; text-align: center; padding: 14px; grid-column: 1/-1; }
.gif-pied { font-size: 10px; color: var(--fg-dim); text-align: right; letter-spacing: .5px; }
.gif-pied b { color: var(--accent2); }
.chat-gif { display: block; max-width: 200px; width: 100%; border-radius: 10px; margin-top: 2px; }
.chat-bulle.gifsans { padding: 4px; }

/* ===== Accueil v2 (salons) — ajout 2026-10-26 ===== */
.accueil-v2 { gap: 14px; max-width: 460px; }
.accueil-sous {
  margin: -4px 0 6px; text-align: center; font-size: 13px;
  color: rgba(255,255,255,.62); line-height: 1.4;
}
.accueil-v2 .champ { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.accueil-v2 .champ > span {
  font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
  color: rgba(255,255,255,.5); font-weight: 700;
}
.accueil-v2 input[type="text"] {
  width: 100%; box-sizing: border-box; padding: 12px 14px;
  border-radius: 12px; border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06); color: inherit;
  font-family: inherit; font-size: 15px; outline: none;
  transition: border-color .15s, background .15s;
}
.accueil-v2 input[type="text"]:focus {
  border-color: rgba(255,255,255,.38); background: rgba(255,255,255,.1);
}
.accueil-v2 input::placeholder { color: rgba(255,255,255,.32); }

.accueil-actions { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.action-bloc { width: 100%; }
.rejoindre-ligne { display: flex; gap: 8px; width: 100%; }
.champ-code {
  flex: 1 1 auto; text-align: center; letter-spacing: .28em;
  font-weight: 800; text-transform: uppercase;
}
.btn-principal, .btn-secondaire, .btn-copier {
  border-radius: 12px; border: 1px solid rgba(255,255,255,.16);
  font-family: inherit; font-weight: 800; cursor: pointer;
  transition: transform .12s, background .15s, border-color .15s;
}
.btn-principal {
  width: 100%; padding: 14px 18px; font-size: 15px;
  background: linear-gradient(135deg, #ff5da2, #9b5de5); color: #fff;
  border-color: transparent;
}
.btn-principal:hover { transform: translateY(-1px); }
.btn-secondaire {
  flex: 0 0 auto; padding: 12px 18px; font-size: 14px;
  background: rgba(255,255,255,.08); color: inherit;
}
.btn-secondaire:hover { background: rgba(255,255,255,.14); }
.btn-copier {
  padding: 9px 14px; font-size: 12px; align-self: flex-start;
  background: rgba(255,255,255,.08); color: inherit;
}
.btn-copier:hover { background: rgba(255,255,255,.14); }

.accueil-erreur {
  min-height: 18px; font-size: 13px; color: #ff8fa3;
  text-align: center; font-weight: 600;
}
.carte-lien {
  width: 100%; box-sizing: border-box; display: flex; flex-direction: column;
  gap: 8px; padding: 14px; border-radius: 14px;
  border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.045);
}
.carte-lien input[readonly] { font-size: 12px; font-family: ui-monospace, monospace; }
.carte-partage { border-color: rgba(155,93,229,.45); }
.carte-lien .aide {
  margin: 0; font-size: 11.5px; line-height: 1.45;
  color: rgba(255,255,255,.55);
}
.carte-lien .aide b { color: rgba(255,255,255,.85); letter-spacing: .1em; }
#form-rejoindre.prioritaire .btn-secondaire {
  background: linear-gradient(135deg, #4cc9f0, #2ee6a8); color: #06202a;
  border-color: transparent;
}
@media (max-width: 420px) {
  .rejoindre-ligne { flex-direction: column; }
  .btn-secondaire { width: 100%; }
}

/* ===== Accueil v3 : trois cadres — ajout 2026-10-26 ===== */
.accueil-v2 { max-width: 460px; gap: 12px; }

.cadre {
  width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.045);
}
.cadre[hidden] { display: none !important; }

.cadre .champ { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.cadre .champ > span {
  font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
  color: rgba(255,255,255,.55); font-weight: 700;
}
.cadre .requis { color: #ff5da2; font-weight: 900; }

.accueil-v2 input[type="text"] {
  width: 100%; box-sizing: border-box; padding: 12px 14px;
  border-radius: 10px; border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.22); color: inherit;
  font-family: inherit; font-size: 15px; outline: none;
  transition: border-color .15s, background .15s;
}
.accueil-v2 input[type="text"]:focus {
  border-color: rgba(255,255,255,.4); background: rgba(0,0,0,.3);
}
.accueil-v2 input::placeholder { color: rgba(255,255,255,.3); }

#lien-rejoindre {
  font-size: 12.5px; font-family: ui-monospace, SFMono-Regular, monospace;
}

.cadre-partage { border-color: rgba(155,93,229,.5); background: rgba(155,93,229,.08); }
.cadre .aide {
  margin: 0; font-size: 11.5px; line-height: 1.45; color: rgba(255,255,255,.55);
}
.cadre .aide b { color: rgba(255,255,255,.85); letter-spacing: .1em; }

#zone-partage { display: flex; flex-direction: column; gap: 10px; width: 100%; }
#zone-partage[hidden] { display: none !important; }

#cadre-rejoindre.prioritaire { border-color: rgba(76,201,240,.55); }

.btn-principal {
  width: 100%; padding: 14px 18px; font-size: 15px; border-radius: 11px;
  border: 1px solid transparent; font-family: inherit; font-weight: 800;
  cursor: pointer; color: #fff;
  background: linear-gradient(135deg, #ff5da2, #9b5de5);
  transition: transform .12s, filter .15s;
}
.btn-principal:hover { transform: translateY(-1px); filter: brightness(1.1); }
.btn-secondaire {
  width: 100%; padding: 12px 18px; font-size: 14px; border-radius: 11px;
  border: 1px solid rgba(255,255,255,.18); font-family: inherit; font-weight: 800;
  cursor: pointer; color: inherit; background: rgba(255,255,255,.08);
  transition: background .15s;
}
.btn-secondaire:hover { background: rgba(255,255,255,.15); }
.btn-copier {
  align-self: flex-start; padding: 8px 14px; font-size: 12px; border-radius: 9px;
  border: 1px solid rgba(255,255,255,.18); font-family: inherit; font-weight: 700;
  cursor: pointer; color: inherit; background: rgba(255,255,255,.06);
}
.btn-copier:hover { background: rgba(255,255,255,.14); }

.accueil-erreur {
  min-height: 16px; font-size: 13px; color: #ff8fa3;
  text-align: center; font-weight: 600;
}

/* ===== Salle d'attente (partie pas encore lancee) — 2026-10-26 ===== */
.attente {
  max-width: 620px; margin: 0 auto 22px; padding: 22px 20px;
  border-radius: 18px; border: 1px solid rgba(155,93,229,.45);
  background: rgba(155,93,229,.09); text-align: center;
  animation: apparait .35s ease;
}
.attente[hidden] { display: none !important; }
.attente-titre {
  font-size: clamp(19px, 3vw, 26px); font-weight: 900; letter-spacing: -.5px;
  background: linear-gradient(90deg, #ff5da2, #ffd166, #4cc9f0);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.attente-sous { margin: 8px 0 16px; font-size: 13.5px; color: var(--fg-dim); }
.attente-liste {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 16px;
}
.attente-joueur {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 12px 6px 6px; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--pc, #4cc9f0) 45%, transparent);
  background: rgba(255,255,255,.05); font-size: 13px; font-weight: 700;
}
.attente-avatar {
  width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  background: var(--pc, #4cc9f0); color: #0b0b12; font-weight: 900; font-size: 12px;
}
.attente-badge {
  font-size: 10px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--pc, #4cc9f0); border: 1px solid currentColor; border-radius: 6px; padding: 1px 5px;
}
#partage-jeu { max-width: 620px; margin: 0 auto 16px; }
#partage-jeu[hidden] { display: none !important; }

/* ===== Bingo v3 — en-tete, panneau de partage, messages systeme ===== */
.entete-droite {
  display: flex; align-items: center; gap: 8px; margin-left: auto;
}
.salon-code {
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 11px; font-weight: 800; letter-spacing: .18em;
  padding: 4px 8px; border-radius: 7px;
  background: rgba(255,255,255,.07); color: rgba(255,255,255,.55);
  border: 1px solid rgba(255,255,255,.1);
}
.btn-partage {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 11px; border-radius: 9px; font-size: 12px; font-weight: 700;
  font-family: inherit; cursor: pointer; color: inherit;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16);
  transition: background .15s;
}
.btn-partage:hover { background: rgba(255,255,255,.16); }

.panneau-partage {
  position: fixed; top: 64px; right: 14px; z-index: 60;
  width: min(360px, calc(100vw - 28px));
  display: flex; flex-direction: column; gap: 9px;
  padding: 14px; border-radius: 14px;
  background: #171426; border: 1px solid rgba(155,93,229,.5);
  box-shadow: 0 18px 46px rgba(0,0,0,.55);
}
.panneau-partage[hidden] { display: none !important; }
.panneau-partage .champ { display: flex; flex-direction: column; gap: 5px; }
.panneau-partage .champ > span {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em;
  color: rgba(255,255,255,.55); font-weight: 700;
}
.panneau-partage input {
  width: 100%; box-sizing: border-box; padding: 9px 11px; border-radius: 8px;
  font-size: 11.5px; font-family: ui-monospace, monospace;
  background: rgba(0,0,0,.32); color: inherit;
  border: 1px solid rgba(255,255,255,.14); outline: none;
}
.panneau-partage .aide {
  margin: 0; font-size: 11px; line-height: 1.45; color: rgba(255,255,255,.5);
}
.panneau-partage .aide b { color: rgba(255,255,255,.85); letter-spacing: .1em; }
.btn-fermer-partage {
  position: absolute; top: 8px; right: 8px;
  width: 24px; height: 24px; border-radius: 7px; cursor: pointer;
  background: rgba(255,255,255,.08); border: none; color: inherit;
  font-size: 12px; line-height: 1;
}
.btn-fermer-partage:hover { background: rgba(255,255,255,.18); }

/* Messages systeme dans le chat */
.chat-systeme {
  align-self: center; max-width: 88%; margin: 5px auto;
  padding: 4px 11px; border-radius: 999px;
  font-size: 11px; font-weight: 600; text-align: center;
  color: rgba(255,255,255,.52); background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.07);
}
