/* =========================================================
   BUZZER — Feuille de style (thème "soirée quiz")
   ========================================================= */
:root {
  --bg: #0e0b1a;
  --bg-soft: #171325;
  --card: #1e1b2e;
  --card-hover: #272238;
  --text: #f5f3ff;
  --text-dim: #a89fc4;
  --accent: #8b5cf6;
  --accent2: #22d3ee;
  --pink: #db2777;
  --green: #22c55e;
  --red: #ef4444;
  --gold: #fbbf24;
  --radius: 16px;
  --shadow: 0 12px 40px rgba(0,0,0,.45);
}

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

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: radial-gradient(1200px 800px at 50% -10%, #1b1536 0%, var(--bg) 55%);
  color: var(--text);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  -webkit-tap-highlight-color: transparent;
}

.wrap { width: 100%; max-width: 640px; margin: auto; }

h1 { font-size: 1.6rem; text-align: center; margin-bottom: 4px; }
.sub { text-align: center; color: var(--text-dim); margin-bottom: 22px; font-size: .95rem; }

.card {
  background: var(--card);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  margin-bottom: 16px;
}

label { display: block; font-size: .85rem; color: var(--text-dim); margin: 0 0 6px 2px; }

input[type="text"] {
  width: 100%;
  padding: 14px 16px;
  font-size: 1.05rem;
  color: var(--text);
  background: var(--bg-soft);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 12px;
  margin-bottom: 16px;
  outline: none;
}
input[type="text"]:focus { border-color: var(--accent); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%;
  padding: 14px 18px;
  font-size: 1.05rem; font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--pink));
  border: none; border-radius: 12px;
  cursor: pointer;
  transition: transform .08s ease, filter .15s ease;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: scale(.98); }
.btn.ghost { background: transparent; border: 1px solid rgba(255,255,255,.18); font-weight: 600; }
.btn.small { width: auto; padding: 8px 14px; font-size: .9rem; }

.hidden { display: none !important; }

/* ---------- Bouton BUZZ ---------- */
.buzz-stage { text-align: center; padding: 10px 0 4px; }
.buzz-btn {
  width: min(72vw, 320px);
  height: min(72vw, 320px);
  border-radius: 50%;
  border: none;
  cursor: pointer;
  font-size: 2.6rem; font-weight: 900; letter-spacing: 2px;
  color: #fff;
  background: radial-gradient(circle at 50% 35%, #34d399, #16a34a 60%, #065f46);
  box-shadow: 0 18px 60px rgba(34,197,94,.45), inset 0 -10px 30px rgba(0,0,0,.3);
  transition: transform .06s ease, filter .15s ease;
  touch-action: manipulation;
  user-select: none;
}
.buzz-btn:active { transform: scale(.95); }
.buzz-btn.pulse { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse {
  0%,100% { box-shadow: 0 18px 60px rgba(34,197,94,.35), inset 0 -10px 30px rgba(0,0,0,.3); }
  50%     { box-shadow: 0 18px 80px rgba(34,197,94,.75), inset 0 -10px 30px rgba(0,0,0,.3); }
}
/* état : déjà buzzé */
.buzz-btn.sent {
  background: radial-gradient(circle at 50% 35%, #fcd34d, #f59e0b 60%, #b45309);
  box-shadow: 0 18px 60px rgba(245,158,11,.5), inset 0 -10px 30px rgba(0,0,0,.3);
  cursor: default;
}
/* état : trop tard / verrouillé */
.buzz-btn.locked {
  background: radial-gradient(circle at 50% 35%, #64748b, #475569 60%, #334155);
  box-shadow: 0 12px 40px rgba(0,0,0,.4), inset 0 -10px 30px rgba(0,0,0,.35);
  cursor: not-allowed;
  filter: grayscale(.3);
}

.status {
  margin-top: 18px; font-size: 1.15rem; font-weight: 700; min-height: 1.6em;
}
.status .rank-1 { color: var(--gold); }
.status .late { color: var(--text-dim); }

/* ---------- Listes ---------- */
.section-title { font-size: 1rem; font-weight: 700; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.muted { color: var(--text-dim); font-size: .85rem; }

.order-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.order-list li {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; border-radius: 12px;
  background: var(--bg-soft);
}
.order-list li.first { background: linear-gradient(90deg, rgba(251,191,36,.22), transparent); border: 1px solid rgba(251,191,36,.4); }
.order-list .pos { font-weight: 900; width: 32px; text-align: center; font-size: 1.15rem; }
.order-list .rank {
  min-width: 34px; text-align: center; font-weight: 800; font-size: .82rem;
  padding: 2px 8px; border-radius: 999px;
  background: rgba(255,255,255,.08); color: var(--text-dim);
}
.order-list li.first .rank { background: rgba(251,191,36,.25); color: var(--gold); }
.order-list .who { flex: 1; font-weight: 600; }
.order-list .ms { color: var(--text-dim); font-size: .82rem; font-variant-numeric: tabular-nums; }

/* ---------- Scores ---------- */
.score-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.score-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px 8px 14px; border-radius: 12px; background: var(--bg-soft);
}
.score-row .name { flex: 1; font-weight: 600; }
.score-row .pts { font-weight: 900; font-size: 1.2rem; min-width: 44px; text-align: center; font-variant-numeric: tabular-nums; }
.score-row.leader .pts { color: var(--gold); }
.score-row .dot { width: 9px; height: 9px; border-radius: 50%; background: #475569; }
.score-row .dot.on { background: var(--green); box-shadow: 0 0 8px var(--green); }
.stepper { display: flex; gap: 6px; }
.stepper button {
  width: 38px; height: 38px; border-radius: 10px; border: none; cursor: pointer;
  font-size: 1.3rem; font-weight: 900; color: #fff; line-height: 1;
}
.stepper .minus { background: #7f1d1d; }
.stepper .plus  { background: #14532d; }
.stepper button:active { transform: scale(.94); }

.row { display: flex; gap: 10px; flex-wrap: wrap; }
.row .btn { flex: 1; }

.share {
  display: flex; gap: 8px; align-items: center;
  background: var(--bg-soft); border-radius: 12px; padding: 10px 12px; margin-top: 6px;
}
.share code { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .85rem; color: var(--accent2); }

.banner {
  border-radius: 12px; padding: 12px 14px; margin-bottom: 16px; font-size: .9rem;
  background: rgba(239,68,68,.12); border: 1px solid rgba(239,68,68,.4); color: #fecaca;
}
.pill { font-size: .78rem; padding: 3px 10px; border-radius: 999px; background: var(--bg-soft); color: var(--text-dim); }
