/* Vue participant — mobile d'abord */
:root {
  --bg: #f4f3ee;
  --card: #ffffff;
  --ink: #16181d;
  --muted: #6b7280;
  --line: #e7e5de;
  --lemon: #ffd23f;
  --lemon-ink: #3d3000;
  --ai: #7c3aed;
  --ai-soft: #efe7ff;
  --real: #0e9f6e;
  --real-soft: #e0f6ec;
  --ok: #12a150;
  --bad: #e5484d;
  --radius: 20px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101216;
    --card: #1a1d23;
    --ink: #f2f2ef;
    --muted: #9aa1ad;
    --line: #2a2e36;
    --ai-soft: #2a1d4a;
    --real-soft: #0f3326;
    color-scheme: dark;
  }
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.4 system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}
body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  padding-top: max(12px, env(safe-area-inset-top));
  font-weight: 600;
  font-size: 15px;
}
.brand {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dot {
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #c7c7c7;
}
.dot.ws {
  background: var(--ok);
}
.dot.poll {
  background: #f5a524;
}
.dot.offline {
  background: var(--bad);
  animation: blink 1s infinite;
}
@keyframes blink {
  50% {
    opacity: 0.3;
  }
}
main {
  flex: 1;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 8px 16px 16px;
}
.foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  padding-bottom: max(10px, env(safe-area-inset-bottom));
  color: var(--muted);
  font-size: 14px;
}
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 22px 18px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.05);
  animation: pop 0.25s ease-out;
}
@keyframes pop {
  from {
    transform: translateY(6px);
    opacity: 0;
  }
}
.card.center {
  text-align: center;
  padding: 40px 20px;
}
.card h1 {
  font-size: 24px;
  line-height: 1.2;
  margin: 0 0 8px;
}
.card h1.prompt {
  margin-bottom: 16px;
}
.emoji {
  font-size: 52px;
  line-height: 1;
  margin-bottom: 12px;
}
.emoji.big {
  font-size: 84px;
}
.muted {
  color: var(--muted);
  margin: 6px 0;
}
.muted.strong {
  font-weight: 600;
  text-align: center;
  margin-top: 14px;
}
.small {
  font-size: 13px;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.btn {
  appearance: none;
  border: 0;
  border-radius: 14px;
  padding: 16px 18px;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  background: var(--bg);
  color: var(--ink);
  transition: transform 0.08s, opacity 0.2s, background 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active:not(:disabled) {
  transform: scale(0.97);
}
.btn:disabled {
  cursor: default;
}
.btn.primary {
  background: var(--ink);
  color: var(--card);
}
.btn.ghost {
  background: transparent;
  border: 1px solid var(--line);
}
.btn.small {
  padding: 10px 14px;
  font-size: 15px;
  width: 100%;
  margin-top: 8px;
}
.btn.option {
  text-align: left;
  border: 2px solid var(--line);
  background: var(--card);
}
.btn.option.chosen {
  border-color: var(--ink);
  background: var(--lemon);
  color: var(--lemon-ink);
}
.btn.option:disabled:not(.chosen) {
  opacity: 0.55;
}
.link {
  background: none;
  border: 0;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
  padding: 6px;
}
input,
textarea {
  width: 100%;
  font: inherit;
  font-size: 18px;
  padding: 14px 14px;
  border-radius: 12px;
  border: 2px solid var(--line);
  background: var(--card);
  color: var(--ink);
}
input:focus,
textarea:focus {
  outline: none;
  border-color: var(--ink);
}
textarea {
  resize: vertical;
}
.error {
  color: var(--bad);
  font-weight: 600;
  min-height: 1em;
  margin: 4px 0 0;
}
.ok-line {
  color: var(--ok);
  font-weight: 700;
  text-align: center;
  margin: 14px 0 4px;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  background: var(--lemon);
  color: var(--lemon-ink);
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 650;
}
blockquote {
  margin: 0;
  padding: 12px 14px;
  border-left: 4px solid var(--lemon);
  background: var(--bg);
  border-radius: 8px;
}
/* Quiz */
.card.quiz {
  padding: 14px 14px 18px;
}
.quiz-head {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  margin: 2px 4px 10px;
}
.media {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: #0d0f12;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 140px;
}
.media img,
.media video {
  display: block;
  width: 100%;
  max-height: 44dvh;
  object-fit: contain;
}
.media.small {
  margin-top: 14px;
  min-height: 0;
}
.media.small img {
  max-height: 18dvh;
}
.media-ph {
  color: #fff;
  font-size: 48px;
  padding: 30px;
  text-align: center;
}
.media-ph.audio {
  font-size: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
}
.media-ph.audio strong {
  font-size: 18px;
}
.media-tag {
  position: absolute;
  left: 8px;
  bottom: 8px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 13px;
  padding: 4px 8px;
  border-radius: 8px;
}
.wait-line {
  text-align: center;
  font-weight: 600;
  margin: 14px 0 6px;
}
.countdown {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 2px 4px;
}
.countdown .bar {
  flex: 1;
  height: 10px;
  border-radius: 99px;
  background: var(--line);
  overflow: hidden;
  padding: 0;
}
.countdown .bar i {
  display: block;
  height: 100%;
  background: var(--ink);
  border-radius: 99px;
  transition: width 0.1s linear;
}
.countdown.urgent .bar i {
  background: var(--bad);
}
.countdown .secs {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  min-width: 3.2em;
  text-align: right;
}
.votes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}
.btn.vote {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 18px 10px;
  font-size: 22px;
  color: #fff;
  min-height: 108px;
  justify-content: center;
}
.btn.vote .e {
  font-size: 38px;
}
.btn.vote.ai {
  background: var(--ai);
}
.btn.vote.real {
  background: var(--real);
}
.btn.vote:disabled {
  opacity: 0.4;
}
.btn.vote.chosen {
  opacity: 1;
  outline: 4px solid var(--lemon);
  outline-offset: 2px;
}
.btn.vote.dim {
  opacity: 0.25;
}
.result {
  text-align: center;
  padding: 14px 0 4px;
}
.result h1 {
  font-size: 28px;
}
.result.good h1 {
  color: var(--ok);
}
.result.bad h1 {
  color: var(--bad);
}
.pts {
  font-size: 22px;
  font-weight: 800;
  margin: 4px 0;
}
.answer-line {
  text-align: center;
  font-size: 18px;
}
.tag {
  padding: 4px 10px;
  border-radius: 10px;
  color: #fff;
}
.tag.ai {
  background: var(--ai);
}
.tag.real {
  background: var(--real);
}
.explain {
  background: var(--bg);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 15px;
}
.score-line {
  text-align: center;
  font-size: 17px;
  margin: 12px 0 0;
}
.card.winner {
  background: linear-gradient(160deg, var(--lemon), #ffe98a);
  color: var(--lemon-ink);
}
.phone-video {
  width: 100%;
  max-height: 44dvh;
}

/* Quiz à options A, B, C… */
.quiz-prompt {
  font-size: 21px;
  margin: 0 4px 12px;
}
.stack.abc {
  margin-top: 12px;
}
.btn.vote-abc {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  color: #fff;
  padding: 14px 14px;
  min-height: 64px;
}
.btn.vote-abc .letter {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.22);
  display: grid;
  place-items: center;
  font-weight: 900;
}
.btn.vote-abc:disabled {
  opacity: 0.45;
}
.btn.vote-abc.chosen {
  opacity: 1;
  outline: 4px solid var(--lemon);
  outline-offset: 2px;
}
.btn.vote-abc.dim {
  opacity: 0.25;
}
.c0 {
  background: #2563eb;
}
.c1 {
  background: #db2777;
}
.c2 {
  background: #059669;
}
.c3 {
  background: #d97706;
}
.c4 {
  background: #7c3aed;
}
.c5 {
  background: #0891b2;
}
.tag.c0,
.tag.c1,
.tag.c2,
.tag.c3,
.tag.c4,
.tag.c5 {
  color: #fff;
}
