/* ==========================================================
   Blind Test MONCONCERT — styles partagés (écran, téléphones, animateur)
   Charte reprise du jukebox, en plus coloré pour le jeu.
   ========================================================== */
@import url('https://fonts.googleapis.com/css2?family=Unbounded:wght@500;700;800;900&family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,700;9..40,800&display=swap');

:root {
  --bg: #0b0816;
  --bg2: #120d24;
  --card: #1b1433;
  --card2: #241b45;
  --card3: #2e2457;
  --line: rgba(255, 255, 255, .09);
  --text: #f6f1ff;
  --muted: #a99fcb;
  --dim: #6f6596;
  --pink: #ff3d9a;
  --violet: #8b5cf6;
  --cyan: #2be2e8;
  --yellow: #ffd23f;
  --green: #45e08a;
  --red: #ff5a64;
  --orange: #ff9a3d;
  --grad: linear-gradient(135deg, #ff3d9a 0%, #a24dff 55%, #4f6bff 100%);
  --grad-warm: linear-gradient(135deg, #ffd23f 0%, #ff7a3d 50%, #ff3d9a 100%);
  --grad-gold: linear-gradient(135deg, #fff1a8 0%, #ffd23f 40%, #ff9a3d 100%);
  /* Les 4 réponses : une couleur ET une forme, pour qu'on s'y retrouve sans lire (et en cas de daltonisme) */
  --a1: #ff3d6e; --a2: #2f7bff; --a3: #ffb800; --a4: #18c97a;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .45);
  --font-title: 'Unbounded', system-ui, sans-serif;
  --font: 'DM Sans', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font); color: var(--text); background: var(--bg);
  min-height: 100dvh; line-height: 1.4; -webkit-tap-highlight-color: transparent;
}
body.party-bg {
  background:
    radial-gradient(600px 400px at 0% 0%, rgba(255, 61, 154, .22), transparent 60%),
    radial-gradient(500px 380px at 100% 20%, rgba(43, 226, 232, .14), transparent 60%),
    radial-gradient(700px 500px at 50% 110%, rgba(139, 92, 246, .25), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
a { color: var(--cyan); }
h1, h2, h3, .title-font { font-family: var(--font-title); letter-spacing: -.01em; }

/* ---------- Primitives ---------- */
.card { background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,0)), var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.muted { color: var(--muted); } .dim { color: var(--dim); }
.small { font-size: 13px; } .tiny { font-size: 11.5px; }
.row { display: flex; align-items: center; gap: 10px; }
.col { display: flex; flex-direction: column; gap: 10px; }
.grow { flex: 1; min-width: 0; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hidden { display: none !important; }
.section-title { font-family: var(--font-title); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 18px 2px 8px; display: flex; align-items: center; gap: 8px; }
.grad-text { background: var(--grad-warm); -webkit-background-clip: text; background-clip: text; color: transparent; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 16px; border-radius: 14px; font-weight: 700;
  background: var(--card2); border: 1px solid var(--line); transition: transform .08s ease, filter .15s; min-height: 44px; }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--grad); border: 0; box-shadow: 0 6px 22px rgba(255, 61, 154, .35); }
.btn-warm { background: var(--grad-warm); color: #1a0f00; border: 0; }
.btn-danger { background: rgba(255, 90, 100, .14); color: #ff8b92; border-color: rgba(255, 90, 100, .35); }
.btn-ghost { background: transparent; }
.btn-sm { padding: 7px 11px; min-height: 34px; border-radius: 10px; font-size: 13.5px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.disabled { opacity: .4; pointer-events: none; }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; background: var(--card2); border: 1px solid var(--line); white-space: nowrap; }
.chip-pink { background: rgba(255, 61, 154, .16); color: #ff7fbd; border-color: rgba(255, 61, 154, .3); }
.chip-cyan { background: rgba(43, 226, 232, .13); color: var(--cyan); border-color: rgba(43, 226, 232, .3); }
.chip-yellow { background: rgba(255, 210, 63, .14); color: var(--yellow); border-color: rgba(255, 210, 63, .3); }
.chip-green { background: rgba(69, 224, 138, .13); color: var(--green); border-color: rgba(69, 224, 138, .3); }
.chip-red { background: rgba(255, 90, 100, .14); color: #ff8b92; border-color: rgba(255, 90, 100, .3); }

.input { width: 100%; padding: 14px 16px; border-radius: 14px; background: var(--bg2); border: 1px solid var(--line); outline: none; font-size: 16px; }
.input:focus { border-color: var(--pink); box-shadow: 0 0 0 3px rgba(255, 61, 154, .2); }

/* Pochette fictive générée */
.cover { flex: none; border-radius: 10px; position: relative; overflow: hidden; display: grid; place-items: center;
  font-family: var(--font-title); font-weight: 800; color: rgba(255,255,255,.92); box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.cover::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 70% 25%, rgba(255,255,255,.35), transparent 45%); }

/* Formes des réponses */
.shape { display: inline-block; flex: none; background: #fff; }
.shape.s1 { clip-path: polygon(50% 6%, 96% 92%, 4% 92%); }
.shape.s2 { clip-path: polygon(50% 2%, 98% 50%, 50% 98%, 2% 50%); }
.shape.s3 { border-radius: 50%; }
.shape.s4 { border-radius: 14%; }
.ans-1 { --c: var(--a1); } .ans-2 { --c: var(--a2); } .ans-3 { --c: var(--a3); } .ans-4 { --c: var(--a4); }

/* QR fictif */
.qr { background: #fff; padding: 8px; border-radius: 12px; display: inline-block; line-height: 0; }
.qr svg { display: block; width: 100%; height: 100%; }

.pulse-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); flex: none; box-shadow: 0 0 0 0 rgba(69, 224, 138, .6); animation: pulse 1.8s infinite; }
.pulse-dot.red { background: var(--red); }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(69, 224, 138, 0); } 100% { box-shadow: 0 0 0 0 rgba(69, 224, 138, 0); } }

/* Égaliseur animé (pendant l'extrait) */
.eq { display: inline-flex; gap: 3px; align-items: flex-end; height: 1em; }
.eq i { width: .2em; background: currentColor; border-radius: 2px; animation: eq 1s infinite ease-in-out; }
.eq i:nth-child(2) { animation-delay: -.4s; } .eq i:nth-child(3) { animation-delay: -.7s; } .eq i:nth-child(4) { animation-delay: -.2s; }
@keyframes eq { 0%, 100% { height: 25%; } 50% { height: 100%; } }

/* Toasts */
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; width: min(400px, calc(100% - 32px)); pointer-events: none; }
.toast { padding: 12px 14px; border-radius: 14px; font-weight: 500; font-size: 14.5px; background: #2a2150; border: 1px solid var(--line); box-shadow: var(--shadow); display: flex; gap: 10px; align-items: flex-start; animation: toastIn .25s ease; }
.toast.err { background: #3a1630; border-color: rgba(255, 90, 100, .45); }
.toast.ok { background: #123629; border-color: rgba(69, 224, 138, .45); }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } }

@keyframes popIn { from { opacity: 0; transform: scale(.6); } 70% { transform: scale(1.06); } }
@keyframes slideUp { from { opacity: 0; transform: translateY(24px); } }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Connexion admin (écran et animateur) */
.login-box { max-width: 380px; margin: 12vh auto 0; padding: 0 16px; text-align: center; }
.login-box img { width: 64px; height: 64px; }
.login-box h1 { font-size: 26px; margin: 8px 0 16px; }
.login-box form { display: flex; flex-direction: column; gap: 10px; }

/* Bandeau de connexion perdue */
.offline { position: fixed; top: 0; left: 0; right: 0; z-index: 300; padding: 8px 12px; text-align: center; font-weight: 700; font-size: 14px;
  background: #3a1630; border-bottom: 1px solid rgba(255, 90, 100, .45); }
