/* =====================================================================
   LE QQ+ — direction artistique « jeu télé »
   Bleu du logo en couleur dominante (fond), cartes blanches, boutons en relief
   comme les lettres épaisses du logo.
   Logo : bleu roi #014DDC, bleu nuit #012F9B, cyan #0BA5FE.
   ===================================================================== */
:root {
  /* Couleurs de marque */
  --blue-light: #3d95ff;
  --blue: #0b62e0;
  --blue-rgb: 11, 98, 224;
  --navy: #012f9b;
  --navy-dark: #011d63;
  --cyan: #2ab4ff;
  --cyan-rgb: 42, 180, 255;
  --ink: #0b1f52;             /* texte sur fond blanc */
  --ink-muted: #5b6d98;

  /* Jetons « sur fond bleu » (valeurs par défaut) */
  --text: #ffffff;
  --muted: rgba(255, 255, 255, .78);
  --surface: rgba(255, 255, 255, .1);
  --surface-2: rgba(255, 255, 255, .14);
  --surface-solid: #0a3a9e;
  --border: rgba(255, 255, 255, .24);
  --field: rgba(255, 255, 255, .14);

  /* Anciens noms, gardés pour l'overlay et le panneau */
  --accent: var(--blue);
  --accent-rgb: var(--blue-rgb);
  --accent-2: var(--cyan);
  --accent-2-rgb: var(--cyan-rgb);
  --accent-deep: var(--navy);

  --ok: #22c55e;
  --ok-dark: #15803d;
  --bad: #f43f5e;
  --bad-dark: #be123c;
  --gold: #fbbf24;
  --silver: #cbd5e1;
  --bronze: #d97745;
  --c0: #e11d48;
  --c1: #2563eb;
  --c2: #d97706;
  --c3: #059669;
  --radius: 22px;
  --font: "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  color: var(--text);
  font: 17px/1.45 var(--font);
  background:
    radial-gradient(1100px 620px at 50% -12%, rgba(120, 190, 255, .55), transparent 62%),
    radial-gradient(900px 600px at 0% 100%, rgba(1, 29, 99, .55), transparent 70%),
    radial-gradient(900px 600px at 100% 100%, rgba(1, 29, 99, .45), transparent 70%),
    linear-gradient(165deg, #1a74f5 0%, #0b5ae0 38%, #0846c4 70%, #06339a 100%);
  background-attachment: fixed;
}
/* Motif de points discret, comme un plateau de jeu */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: -1;
  background: radial-gradient(rgba(255, 255, 255, .13) 1.4px, transparent 1.6px) 0 0 / 24px 24px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 75%);
  mask-image: linear-gradient(180deg, #000 0%, transparent 75%);
}
code { background: var(--surface-2); padding: 1px 6px; border-radius: 6px; }
img { max-width: 100%; }

.wrap { max-width: 760px; margin: 0 auto; padding: 16px; }
.wrap.wide { max-width: 1240px; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.brand {
  display: flex; align-items: center; gap: 10px; margin: 0; font-size: 1.5rem; font-weight: 800; letter-spacing: -.01em;
  text-shadow: 0 3px 0 var(--navy-dark);
}
.brand-logo { width: 50px; height: 50px; flex: none; filter: drop-shadow(0 6px 14px rgba(1, 29, 99, .45)); }
.hero-logo { display: block; width: 160px; height: 160px; margin: 0 auto 10px; filter: drop-shadow(0 14px 28px rgba(1, 47, 155, .35)); animation: float 4s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-7px); } }
.brand small { font-weight: 500; color: var(--muted); font-size: .9rem; text-shadow: none; }
.me { display: flex; align-items: center; gap: 10px; font-size: .95rem; font-weight: 600; }
.avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex: none; background: var(--surface-2); border: 2px solid rgba(255, 255, 255, .6); }

/* ---------- Page joueur : méduse posée en bas, après le contenu ---------- */
.wrap.app { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.app-mascot {
  display: block; width: min(230px, 55vw); height: auto; margin: auto auto 0; padding-top: 18px;
  pointer-events: none; user-select: none;
  filter: drop-shadow(0 0 20px rgba(var(--cyan-rgb), .55)) drop-shadow(0 10px 14px rgba(1, 29, 99, .35));
  animation: mascot 5s ease-in-out infinite;
}
@keyframes mascot { 50% { transform: translateY(-5px); } }
/* Changement d'humeur : petit saut de joie, ou affaissement triste, puis flottement normal. */
.app-mascot.react.happy { animation: happy .8s cubic-bezier(.2, .8, .2, 1.3), mascot 5s ease-in-out .8s infinite; }
.app-mascot.react.sad { animation: sad .9s ease-out, mascot 5s ease-in-out .9s infinite; }
.app-mascot.react.calm { animation: calm .5s ease-out, mascot 5s ease-in-out .5s infinite; }
@keyframes happy { 0% { transform: scale(.85); } 35% { transform: translateY(-26px) scale(1.08) rotate(-4deg); } 60% { transform: translateY(0) scale(.97); } 80% { transform: translateY(-8px) rotate(3deg); } }
@keyframes sad { 0% { transform: scale(1.04); } 40% { transform: translateY(10px) scale(.96, .94) rotate(2deg); } 100% { transform: none; } }
@keyframes calm { from { opacity: .4; transform: scale(.94); } }

/* ---------- Cartes blanches ---------- */
.card {
  /* À l'intérieur d'une carte, le texte passe en bleu marine */
  --text: var(--ink);
  --muted: var(--ink-muted);
  --surface: #f4f7ff;
  --surface-2: #eef3ff;
  --surface-solid: #ffffff;
  --border: #d7e2fb;
  --field: #f6f9ff;
  --accent-2: #1a73f0;
  color: var(--text);
  background: #fff; border: 0; border-radius: var(--radius);
  padding: 22px; margin-bottom: 16px;
  box-shadow: 0 8px 0 rgba(1, 29, 99, .25), 0 22px 50px rgba(1, 29, 99, .35);
}
.card h2 { margin: 0 0 12px; font-size: 1.3rem; }
/* Écran de jeu (question) : directement sur le fond bleu, sans carte */
.card.play {
  --text: #ffffff;
  --muted: rgba(255, 255, 255, .8);
  --surface-2: rgba(255, 255, 255, .16);
  --border: rgba(255, 255, 255, .24);
  --accent-2: var(--cyan);
  background: transparent; box-shadow: none; padding: 4px 0 0;
}
.center { text-align: center; }
.muted { color: var(--muted); }
.lead { font-size: 1.15rem; }
.enter { animation: enter .4s cubic-bezier(.2, .8, .2, 1); }
@keyframes enter { from { opacity: 0; transform: translateY(14px) scale(.98); } }

/* ---------- Boutons (en relief) ---------- */
.btn {
  appearance: none; border: 2px solid var(--border); background: var(--surface-2); color: var(--text);
  padding: 9px 16px; border-radius: 12px; font: inherit; font-weight: 700; cursor: pointer;
  transition: border-color .15s, transform .08s, background .15s, box-shadow .08s, filter .15s;
}
.btn:hover:not(:disabled) { border-color: var(--accent-2); }
.btn:active:not(:disabled) { transform: translateY(2px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary {
  background: linear-gradient(180deg, var(--blue-light), var(--blue)); border-color: transparent; color: #fff;
  box-shadow: 0 4px 0 var(--navy);
}
.btn.primary:hover:not(:disabled) { filter: brightness(1.08); }
.btn.primary:active:not(:disabled) { box-shadow: 0 1px 0 var(--navy); transform: translateY(3px); }
.btn.twitch {
  background: linear-gradient(180deg, #a970ff, #9146ff); border-color: transparent; color: #fff; font-size: 1.08rem; padding: 13px 24px;
  box-shadow: 0 5px 0 #5b21b6;
}
.btn.twitch:active { box-shadow: 0 1px 0 #5b21b6; transform: translateY(4px); }
.btn.danger { background: transparent; border-color: var(--bad); color: var(--bad); }
.btn.small { padding: 5px 11px; font-size: .85rem; border-radius: 10px; }
.btn.icon { padding: 6px 10px; font-size: 1.05rem; line-height: 1; }
.link { background: none; border: 0; color: var(--muted); cursor: pointer; font: inherit; text-decoration: underline; padding: 0; }

.pill { display: inline-block; padding: 5px 12px; border-radius: 999px; background: var(--surface-2); color: var(--text); font-size: .85rem; font-weight: 700; letter-spacing: .02em; }
.st-question { background: var(--blue); color: #fff; }
.st-reveal { background: var(--ok); color: #fff; }
.st-leaderboard { background: var(--gold); color: #2a1f00; }

/* ---------- Attente ---------- */
.waiting { padding: 40px 22px; }
.waiting h2 { font-size: 1.55rem; }
.dots { display: inline-flex; gap: 8px; margin: 6px 0 16px; }
.dots span { width: 12px; height: 12px; border-radius: 50%; background: var(--blue); animation: bounce 1.2s infinite ease-in-out; }
.dots span:nth-child(2) { animation-delay: .15s; background: var(--cyan); }
.dots span:nth-child(3) { animation-delay: .3s; background: var(--navy); }
@keyframes bounce { 0%, 80%, 100% { transform: scale(.5); opacity: .5; } 40% { transform: scale(1); opacity: 1; } }

/* ---------- Question ---------- */
.qhead { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.ring { position: relative; width: 62px; height: 62px; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 4.5; }
.ring .ring-bg { stroke: rgba(255, 255, 255, .22); fill: rgba(1, 29, 99, .28); }
.ring .ring-fg { stroke: #fff; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 0; transition: stroke-dashoffset .1s linear, stroke .3s; }
.ring-num { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 800; font-size: 1.3rem; font-variant-numeric: tabular-nums; color: #fff; }
.urgent .ring-fg { stroke: #ffd23f; }
.urgent .ring-num { color: #ffd23f; animation: pulse .5s ease-in-out infinite alternate; }
@keyframes pulse { to { transform: scale(1.15); } }
.ring.done .ring-num { font-size: .8rem; color: rgba(255, 255, 255, .75); }

.qimg { display: block; width: 100%; max-height: 34vh; object-fit: contain; border-radius: 18px; margin: 0 0 16px; background: rgba(1, 29, 99, .3); border: 3px solid rgba(255, 255, 255, .9); }
.qtext { font-size: 1.55rem; font-weight: 800; line-height: 1.28; margin: 0 0 20px; overflow-wrap: anywhere; text-shadow: 0 3px 0 rgba(1, 29, 99, .45); }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .choices { grid-template-columns: 1fr; gap: 12px; } }

/* Réponses : gros boutons blancs en relief, pastille bleue A B C D (ou V F). */
.choice {
  position: relative; display: flex; align-items: center; gap: 14px; text-align: left; min-height: 64px;
  padding: 10px 18px 10px 10px; border: 0; border-radius: 18px;
  background: #fff; color: var(--ink); font: inherit; font-weight: 700; font-size: 1.08rem;
  box-shadow: 0 5px 0 #b9cdf7, 0 12px 24px rgba(1, 29, 99, .28);
  cursor: pointer; overflow: hidden; overflow-wrap: anywhere;
  transition: transform .1s, opacity .3s, box-shadow .1s, background .2s, color .2s;
  animation: enter .35s cubic-bezier(.2, .8, .2, 1) backwards;
}
.choice:nth-child(2) { animation-delay: .05s; }
.choice:nth-child(3) { animation-delay: .1s; }
.choice:nth-child(4) { animation-delay: .15s; }
.choice:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 7px 0 #b9cdf7, 0 16px 28px rgba(1, 29, 99, .32); }
.choice:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 1px 0 #b9cdf7, 0 6px 14px rgba(1, 29, 99, .25); }
.choice:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.choice:disabled { cursor: default; }
.letter {
  position: relative; display: grid; place-items: center; width: 44px; height: 44px; flex: none;
  border-radius: 13px; font-size: 1.2rem; font-weight: 800; color: #fff;
  background: linear-gradient(180deg, var(--blue-light), var(--blue) 60%, var(--navy));
  box-shadow: inset 0 -3px 0 rgba(1, 29, 99, .35);
  text-shadow: 0 2px 0 rgba(1, 29, 99, .45);
  transition: background .2s, color .2s;
}
.c0 { background: linear-gradient(135deg, #f43f5e, var(--c0)); }
.c1 { background: linear-gradient(135deg, #3b82f6, var(--c1)); }
.c2 { background: linear-gradient(135deg, #f59e0b, var(--c2)); }
.c3 { background: linear-gradient(135deg, #10b981, var(--c3)); }
.dot { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; font-size: .78rem; font-weight: 800; color: #fff; flex: none; }

/* Réponse choisie : le bouton devient bleu */
.choice.picked {
  background: linear-gradient(180deg, var(--blue-light), var(--blue)); color: #fff;
  box-shadow: 0 5px 0 var(--navy), 0 12px 24px rgba(1, 29, 99, .35), 0 0 0 3px #fff;
}
.choice.picked .letter { background: #fff; color: var(--blue); text-shadow: none; box-shadow: none; }
/* Réponses atténuées (non choisies / fausses) : gris-bleu net plutôt que transparent */
.choices.locked .choice:not(.picked):not(.correct),
.choices .choice.wrong:not(.picked) {
  background: #c7d8f7; color: rgba(11, 31, 82, .6);
  box-shadow: 0 5px 0 #9cb6e8, 0 8px 18px rgba(1, 29, 99, .18);
}
.choices.locked .choice:not(.picked):not(.correct) .letter,
.choices .choice.wrong:not(.picked) .letter { background: #8eaee6; box-shadow: none; text-shadow: none; }

/* Révélation */
.choices .choice.correct {
  opacity: 1; background: linear-gradient(180deg, #4ade80, var(--ok)); color: #fff;
  box-shadow: 0 5px 0 var(--ok-dark), 0 12px 26px rgba(21, 128, 61, .4), 0 0 0 3px #fff;
  animation: win .6s ease-out;
}
.choices .choice.correct .letter { background: #fff; color: var(--ok-dark); text-shadow: none; box-shadow: none; }
.choices .choice.picked.wrong {
  opacity: .95; background: linear-gradient(180deg, #fb7185, var(--bad)); color: #fff;
  box-shadow: 0 5px 0 var(--bad-dark), 0 0 0 3px rgba(255, 255, 255, .7);
}
.choices .choice.picked.wrong .letter { background: #fff; color: var(--bad-dark); }
.choice .mark { margin-left: auto; font-size: 1.4rem; color: #fff; font-weight: 800; }
@keyframes win { 30% { transform: scale(1.04); } }

.status { margin: 20px 0 0; text-align: center; font-weight: 700; min-height: 1.4em; }
.result {
  margin-top: 20px; padding: 16px; border-radius: 18px; text-align: center; font-weight: 800; font-size: 1.35rem;
  background: #fff; box-shadow: 0 5px 0 rgba(1, 29, 99, .3);
  animation: enter .4s cubic-bezier(.2, .8, .2, 1);
}
.result small { display: block; font-weight: 600; font-size: .95rem; color: var(--ink-muted); margin-top: 2px; }
.result.ok { color: var(--ok-dark); }
.result.bad { color: var(--bad-dark); }
.result.none { background: rgba(255, 255, 255, .16); color: #fff; box-shadow: none; }

/* ---------- Classement ---------- */
.board { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.board-row { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; background: var(--surface-2); animation: enter .35s backwards; }
.board-row .rank { width: 28px; font-weight: 800; text-align: center; color: var(--muted); }
.board-row.first .rank { color: var(--gold); }
.board-row .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.board-row .pts { font-variant-numeric: tabular-nums; font-weight: 800; }

.podium { display: grid; grid-template-columns: repeat(3, 1fr); align-items: end; gap: 10px; margin: 8px 0 16px; }
.pod { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; animation: rise .6s cubic-bezier(.2, .8, .2, 1) backwards; }
.pod.p1 { animation-delay: .25s; }
.pod.p3 { animation-delay: .1s; }
@keyframes rise { from { opacity: 0; transform: translateY(40px); } }
.pod .avatar { width: 52px; height: 52px; border: 3px solid var(--silver); }
.pod.p1 .avatar { width: 66px; height: 66px; border-color: var(--gold); box-shadow: 0 0 24px rgba(251, 191, 36, .5); }
.pod.p3 .avatar { border-color: var(--bronze); }
.pod .name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 800; }
.pod .pts { font-size: .85rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.pod .step {
  width: 100%; display: grid; place-items: center; border-radius: 14px 14px 4px 4px;
  font-size: 1.6rem; font-weight: 800; color: rgba(0, 0, 0, .5);
  background: linear-gradient(180deg, #eef2f7, var(--silver) 40%, #94a3b8); height: 70px;
  box-shadow: inset 0 -5px 0 rgba(0, 0, 0, .12);
}
.pod.p1 .step { background: linear-gradient(180deg, #fde68a, var(--gold) 40%, #d97706); height: 100px; }
.pod.p3 .step { background: linear-gradient(180deg, #f5b38b, var(--bronze) 40%, #9a4b25); height: 52px; }

.crown { font-size: 1.9rem; line-height: 1; animation: crown 1s ease-in-out infinite alternate; }
@keyframes crown { to { transform: translateY(-5px) rotate(-8deg); } }
.pod.p1 .name { color: var(--gold); }
.card .pod.p1 .name { color: #b7791f; }
.final-title {
  text-align: center; font-size: 2rem; font-weight: 800; margin: 0 0 4px;
  background: linear-gradient(90deg, var(--gold), #fff7d6, var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 3px 0 rgba(1, 29, 99, .5));
}
.card .final-title { background: linear-gradient(90deg, var(--navy), var(--blue), var(--navy)); -webkit-background-clip: text; background-clip: text; filter: none; }
.final-sub { text-align: center; color: var(--muted); margin: 0 0 14px; }
.my-final { text-align: center; font-weight: 800; font-size: 1.15rem; margin-top: 16px; animation: enter .4s 6s backwards; }

.static .enter, .static .choice, .static .board-row, .static .pod, .static .result { animation: none; }

/* ---------- Divers ---------- */
.toast {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); max-width: calc(100% - 32px);
  background: var(--navy-dark); color: #fff; border: 2px solid rgba(255, 255, 255, .2); padding: 10px 16px; border-radius: 12px; z-index: 30;
  box-shadow: 0 10px 30px rgba(1, 29, 99, .4);
  animation: enter .25s;
}
.toast.bad { border-color: var(--bad); }

.confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 25; }
.confetti i { position: absolute; top: -16px; width: 8px; height: 14px; border-radius: 2px; animation: fall linear forwards; }
@keyframes fall { to { transform: translate(var(--dx), 105vh) rotate(var(--r)); } }

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

/* ---------- Panneau streamer ---------- */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 900px) { .grid2 { grid-template-columns: 1fr; } }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row > .grow { flex: 1; min-width: 0; }
.between { justify-content: space-between; }
.row h2 { margin: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
label { display: block; font-size: .85rem; color: var(--muted); margin: 10px 0 4px; font-weight: 600; }
label.check { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: .95rem; margin-top: 14px; font-weight: 500; }
input[type=text], input[type=number], textarea, select {
  width: 100%; background: var(--field); color: var(--text); border: 2px solid var(--border);
  border-radius: 10px; padding: 8px 11px; font: inherit;
}
select { width: auto; max-width: 100%; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(var(--blue-rgb), .2); }
textarea { resize: vertical; min-height: 64px; }
select option { background: #fff; color: var(--ink); }
.qform { border-bottom: 2px solid var(--border); padding-bottom: 16px; margin-bottom: 16px; }
.qform h3 { margin: 0; }
.choice-input { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.choice-input input[type=radio] { width: 20px; height: 20px; accent-color: var(--ok); flex: none; }
.img-prev { display: block; max-height: 140px; border-radius: 10px; margin-top: 8px; }
.picker { margin-top: 8px; padding: 10px; border-radius: 12px; background: var(--surface-2); }
.pk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; margin-top: 8px; max-height: 320px; overflow: auto; }
.pk-item { padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; cursor: pointer; background: var(--surface); aspect-ratio: 1; }
.pk-item:hover, .pk-item:focus-visible { border-color: var(--blue); }
.pk-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rule-box {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px;
  margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); font-size: .9rem;
}
.theme-panel { margin-top: 10px; padding: 12px; border-radius: 12px; background: var(--surface-2); }
.theme-grid { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 6px 10px; border-radius: 999px;
  background: #fff; border: 2px solid var(--border); color: var(--text); font-size: .85rem; font-weight: 600; cursor: pointer;
}
.chip:has(input:checked) { border-color: var(--blue); background: rgba(var(--blue-rgb), .1); }
.chip input { accent-color: var(--blue); margin: 0; }
.chip-wrap { display: inline-flex; align-items: center; }
.chip-wrap .chip { border-radius: 999px 0 0 999px; }
.chip-del {
  padding: 6px 8px; border: 2px solid var(--border); border-left: 0; border-radius: 0 999px 999px 0;
  background: #fff; color: var(--muted); font-size: .8rem; cursor: pointer; line-height: 1.2;
}
.chip-del:hover { color: var(--bad); border-color: var(--bad); }
.theme-del { display: grid; gap: 6px; margin-top: 10px; padding: 12px; border-radius: 12px; border: 2px solid var(--bad); background: rgba(244, 63, 94, .06); }
.theme-del label.check { margin: 0; flex-wrap: wrap; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.theme-pill { background: #fff; color: var(--navy); }
.tag { display: inline-block; font-size: .72rem; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); vertical-align: middle; }
.qlist { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; }
.qitem { display: flex; align-items: center; gap: 8px; padding: 10px; border-radius: 12px; background: var(--surface-2); border: 2px solid transparent; }
.qitem.current { border-color: var(--blue); background: rgba(var(--blue-rgb), .08); }
.qitem.done { opacity: .5; }
.qitem.done .qn { color: var(--ok); }
#playlist { max-height: 420px; overflow: auto; }
#qlist { max-height: 55vh; overflow: auto; }
#fixList { max-height: 70vh; overflow: auto; }
.qitem.skipped { opacity: .4; }
.qitem .qn { width: 22px; text-align: center; color: var(--muted); font-weight: 800; flex: none; }
.thumb { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; flex: none; }
.qitem .qt { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.qitem .qt small { display: block; color: var(--muted); }
.qitem .qt b { color: var(--ok-dark); }
.mini { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 6px; }
.mini li { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 10px; background: var(--surface-2); }
.mini li.correct { box-shadow: inset 4px 0 0 var(--ok); }
.mini .cnt { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }
.live-img { max-height: 120px; border-radius: 10px; margin-top: 10px; }

/* ---------- Panneau streamer : version sombre (moins éblouissante) ---------- */
body.admin {
  background:
    radial-gradient(1000px 500px at 50% -15%, rgba(61, 149, 255, .35), transparent 65%),
    linear-gradient(170deg, #0b3a9c 0%, #082c7c 40%, #061f5c 100%);
  background-attachment: fixed;
}
body.admin::before { opacity: .5; }
.admin .card {
  --text: #eef3ff;
  --muted: #a9bbe3;
  --surface: rgba(255, 255, 255, .05);
  --surface-2: rgba(255, 255, 255, .075);
  --border: rgba(160, 195, 255, .2);
  --field: rgba(1, 15, 50, .45);
  --accent-2: var(--cyan);
  background: linear-gradient(180deg, #0f2d6e, #0b2459);
  border: 1px solid rgba(160, 195, 255, .16);
  box-shadow: 0 6px 0 rgba(1, 12, 40, .55), 0 18px 40px rgba(1, 12, 40, .4);
}
.admin .card h2 { color: #fff; }
.admin .chip, .admin .chip-del { background: var(--surface-2); }
.admin .chip:has(input:checked) { border-color: var(--cyan); background: rgba(var(--cyan-rgb), .16); }
.admin .qitem.current { border-color: var(--cyan); background: rgba(var(--cyan-rgb), .1); }
.admin .qitem .qt b { color: #4ade80; }
.admin .links a { color: var(--cyan); }
.admin input:focus, .admin textarea:focus, .admin select:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(var(--cyan-rgb), .2); }
.admin .autorun.on { border-color: var(--cyan); background: rgba(var(--cyan-rgb), .1); }
.admin .autorun-dot { background: var(--cyan); }
.admin .btn.danger { border-color: #fb7185; color: #fb7185; }
.admin .theme-del { border-color: #fb7185; background: rgba(244, 63, 94, .1); }
.admin .mini li.correct { box-shadow: inset 4px 0 0 #4ade80; }

/* Auto-run */
.autorun { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; font-size: .9rem; }
.autorun .muted { flex: 1; min-width: 220px; }
.autorun.on {
  padding: 12px 14px; border-radius: 14px; border: 2px solid var(--blue);
  background: linear-gradient(135deg, rgba(var(--blue-rgb), .1), rgba(var(--cyan-rgb), .08));
}
.autorun-dot {
  width: 12px; height: 12px; border-radius: 50%; background: var(--blue); flex: none;
  box-shadow: 0 0 0 0 rgba(var(--blue-rgb), .6); animation: runpulse 1.6s infinite;
}
@keyframes runpulse { 70% { box-shadow: 0 0 0 10px rgba(var(--blue-rgb), 0); } 100% { box-shadow: 0 0 0 0 rgba(var(--blue-rgb), 0); } }
.masked { margin: 8px 0; padding: 14px; border-radius: 12px; text-align: center; font-weight: 700; color: var(--muted); background: var(--surface-2); border: 2px dashed var(--border); list-style: none; }
.links a { color: var(--blue); font-weight: 600; word-break: break-all; }
.card .qtext { text-shadow: none; }
