/* =====================================================================
   Thème "Soirée" — mobile first, lisible en lumière tamisée
   ===================================================================== */
:root {
  --bg-1: #1a0e2e;
  --bg-2: #2d1b4e;
  --surface: rgba(255, 255, 255, 0.06);
  --surface-bord: rgba(255, 255, 255, 0.12);
  --texte: #f4f0ff;
  --texte-doux: #b9add6;
  --accent: #2dd4bf;     /* turquoise */
  --accent-2: #fb7185;   /* corail */
  --ok: #4ade80;
  --rayon: 18px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--texte);
  background: linear-gradient(160deg, var(--bg-1), var(--bg-2));
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-tap-highlight-color: transparent;
}

/* --- En-tête fixe score / rang --- */
.barre {
  position: sticky;
  top: 0;
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(15, 8, 28, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--surface-bord);
  z-index: 10;
}
.pill {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--surface-bord);
  border-radius: var(--rayon);
  padding: 8px 12px;
  text-align: center;
}
.pill .label { font-size: 11px; color: var(--texte-doux); text-transform: uppercase; letter-spacing: 0.5px; }
.pill .valeur { font-size: 22px; font-weight: 700; }
.pill.score .valeur { color: var(--accent); }
.pill.rang .valeur { color: var(--accent-2); }

/* --- Zone centrale --- */
.zone {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 24px 20px;
  gap: 18px;
}
.num-question { font-size: 15px; color: var(--texte-doux); letter-spacing: 1px; text-transform: uppercase; }
.titre-question { font-size: 26px; font-weight: 700; line-height: 1.25; }
.image-question { max-width: 100%; max-height: 38vh; border-radius: var(--rayon); border: 1px solid var(--surface-bord); }

.attente { color: var(--texte-doux); font-size: 18px; }
.attente .point { animation: clignote 1.4s infinite; }
@keyframes clignote { 0%,100%{opacity:.3} 50%{opacity:1} }

/* --- Champ réponse --- */
.form-reponse { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 12px; }
.champ {
  width: 100%;
  padding: 16px;
  font-size: 18px;
  color: var(--texte);
  background: var(--surface);
  border: 1px solid var(--surface-bord);
  border-radius: var(--rayon);
  outline: none;
}
.champ:focus { border-color: var(--accent); }
.champ:disabled { opacity: 0.5; }

.btn {
  width: 100%;
  padding: 16px;
  font-size: 18px;
  font-weight: 700;
  color: #0c1a18;
  background: var(--accent);
  border: none;
  border-radius: var(--rayon);
  cursor: pointer;
  transition: transform .05s ease, opacity .2s;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.4; cursor: default; }
.btn.secondaire { background: var(--accent-2); color: #2a0a12; }

.confirme { color: var(--ok); font-size: 15px; min-height: 20px; }

/* --- Écran de connexion --- */
.carte {
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  border: 1px solid var(--surface-bord);
  border-radius: 24px;
  padding: 28px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.logo { font-size: 30px; font-weight: 800; text-align: center; letter-spacing: -0.5px; }
.logo .accent { color: var(--accent); }
.sous-titre { text-align: center; color: var(--texte-doux); margin-bottom: 6px; }
.erreur { color: var(--accent-2); font-size: 14px; min-height: 18px; text-align: center; }

/* --- Écran de fin --- */
.podium { font-size: 60px; }
.fin-rang { font-size: 40px; font-weight: 800; color: var(--accent); }
