:root {
  --yellow: #FFCD17;
  --ink: #111111;
  --muted: #5A5A5A;
  --paper: #FFFFFF;
  --soft: #F3F3F3;
  --good: #1E8E4E;
  --bad: #C0392B;
  --radius: 22px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: 'Sora', Arial, sans-serif;
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; cursor: pointer; border: 0; }
.hidden { display: none !important; }

/* Onglet jaune façon présentation B17 */
.tab {
  display: inline-flex; flex-direction: column; gap: 4px;
  background: var(--yellow); padding: 18px 28px 16px;
  border-radius: 0 0 26px 0;
}
.tab small { font-size: 14px; }
.tab strong { font-size: 20px; font-weight: 600; }
.logo { height: 44px; width: auto; }

/* ---------- Joueur (mobile) ---------- */
.player { min-height: 100%; display: flex; flex-direction: column; }
.player header { display: flex; justify-content: space-between; align-items: flex-start; }
.player header .logo { margin: 14px 16px 0 0; }
.player main { flex: 1; display: flex; flex-direction: column; gap: 18px; padding: 24px 18px 28px; }
.player h1 { font-size: 26px; line-height: 1.2; font-weight: 700; }
.player p.lead { font-size: 17px; color: var(--muted); line-height: 1.45; }
.player input {
  font: inherit; font-size: 20px; padding: 16px 18px; width: 100%;
  border: 2px solid #D9D9D9; border-radius: 16px; outline: none;
}
.player input:focus { border-color: var(--ink); }
.btn {
  background: var(--ink); color: #fff; font-size: 19px; font-weight: 600;
  padding: 18px; border-radius: 16px; width: 100%;
}
.btn:disabled { opacity: .5; }
.choices { display: grid; gap: 14px; }
.choice {
  background: var(--yellow); color: var(--ink); font-size: 30px; font-weight: 700;
  padding: 26px 16px; border-radius: var(--radius); border: 4px solid transparent;
  transition: transform .08s;
}
.choice:active { transform: scale(.97); }
.choice.picked { border-color: var(--ink); }
.choice:disabled:not(.picked) { opacity: .35; }
.pill {
  align-self: flex-start; font-size: 14px; font-weight: 700; letter-spacing: 1px;
  background: var(--ink); color: #fff; padding: 6px 12px; border-radius: 999px;
}
.qtext { font-size: 22px; font-weight: 600; line-height: 1.3; }
.timer { height: 10px; background: var(--soft); border-radius: 999px; overflow: hidden; }
.timer > i { display: block; height: 100%; background: var(--ink); width: 100%; transition: width .25s linear; }
.card { background: var(--soft); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 10px; }
.card.good { background: #E4F5EA; }
.card.bad { background: #FBE7E4; }
.big { font-size: 40px; font-weight: 700; line-height: 1.1; }
.card .why { font-size: 16px; color: var(--muted); line-height: 1.45; }
.score-line { font-size: 18px; }
.center { text-align: center; align-items: center; }
.muted { color: var(--muted); }
.error { color: var(--bad); font-size: 15px; }

/* ---------- Animateur (écran projeté 16:9) ---------- */
.host { height: 100vh; display: flex; flex-direction: column; overflow: hidden; }
.host header { display: flex; justify-content: space-between; align-items: flex-start; }
.host .tab { padding: 2.2vh 3vw 2vh; border-radius: 0 0 3vh 0; }
.host .tab small { font-size: 1.6vw; }
.host .tab strong { font-size: 2.4vw; }
.host header .logo { height: 7vh; margin: 2.5vh 3vw 0 0; }
.host main { flex: 1; padding: 3vh 6vw 2vh; display: flex; flex-direction: column; gap: 3vh; min-height: 0; }
.host main.centered { justify-content: center; padding-bottom: 8vh; }
.host footer {
  display: flex; gap: 12px; justify-content: space-between; align-items: center;
  padding: 1.6vh 6vw 2.4vh; font-size: 15px; color: var(--muted);
}
.host footer .actions { display: flex; gap: 10px; }
.hbtn { background: var(--ink); color: #fff; font-size: 17px; font-weight: 600; padding: 12px 22px; border-radius: 12px; }
.hbtn.ghost { background: var(--soft); color: var(--ink); }
.hbtn.primary { background: var(--yellow); color: var(--ink); }

.lobby { display: grid; grid-template-columns: 1fr auto; gap: 4vw; flex: 1; min-height: 0; }
.lobby h1 { font-size: 4.6vw; line-height: 1.05; font-weight: 700; }
.lobby .url { font-size: 2.2vw; font-weight: 600; background: var(--soft); padding: 1.2vh 1.4vw; border-radius: 14px; align-self: flex-start; word-break: break-all; }
.lobby .left { display: flex; flex-direction: column; gap: 3vh; min-height: 0; }
.qr { background: #fff; padding: 1.5vh; border: 6px solid var(--yellow); border-radius: 24px; align-self: start; }
.qr svg, .qr img { display: block; width: 38vh; height: 38vh; }
.names { display: flex; flex-wrap: wrap; gap: 10px; align-content: flex-start; overflow: hidden; }
.names span { background: var(--yellow); padding: 8px 16px; border-radius: 999px; font-size: 1.5vw; font-weight: 600; animation: pop .35s ease-out; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.hq { font-size: 3.6vw; font-weight: 600; line-height: 1.2; }
.hchoices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2vw; }
.hchoice {
  position: relative; background: var(--soft); border-radius: 24px; padding: 6vh 1vw;
  text-align: center; font-size: 3.4vw; font-weight: 700; border: 6px solid transparent;
  overflow: hidden;
}
.hchoice .bar { position: absolute; left: 0; bottom: 0; height: 1.2vh; background: var(--ink); opacity: .85; transition: width .6s; }
.hchoice .count { display: block; font-size: 1.6vw; font-weight: 600; color: var(--muted); margin-top: 1vh; }
.hchoice.right { background: var(--yellow); border-color: var(--ink); }
.hchoice.wrong { opacity: .45; }
.hmeta { display: flex; align-items: center; gap: 2vw; font-size: 1.8vw; }
.countdown { font-size: 5vw; font-weight: 700; min-width: 7vw; }
.htimer { flex: 1; height: 1.6vh; background: var(--soft); border-radius: 999px; overflow: hidden; }
.htimer > i { display: block; height: 100%; background: var(--yellow); width: 100%; transition: width .25s linear; }
.why-box { background: var(--ink); color: #fff; border-radius: 20px; padding: 2.4vh 2vw; font-size: 1.9vw; line-height: 1.4; }
.why-box b { color: var(--yellow); }

.board { display: flex; flex-direction: column; gap: 1.2vh; }
.row { display: grid; grid-template-columns: 5vw 1fr auto auto; gap: 2vw; align-items: center; background: var(--soft); border-radius: 16px; padding: 1.4vh 2vw; font-size: 2vw; }
.row .rk { font-weight: 700; }
.row .pts { font-weight: 700; }
.row .dl { color: var(--good); font-size: 1.5vw; font-weight: 600; min-width: 6vw; text-align: right; }
.row:first-child { background: var(--yellow); }

.podium { display: flex; justify-content: center; align-items: flex-end; gap: 2vw; flex: 1; }
.step { width: 20vw; display: flex; flex-direction: column; align-items: center; gap: 1.4vh; }
.step .who { font-size: 2.2vw; font-weight: 700; text-align: center; }
.step .sc { font-size: 1.6vw; color: var(--muted); }
.step .block { width: 100%; border-radius: 20px 20px 0 0; display: flex; align-items: flex-start; justify-content: center; padding-top: 2vh; font-size: 5vw; font-weight: 700; }
.step.p1 .block { height: 34vh; background: var(--yellow); }
.step.p2 .block { height: 24vh; background: var(--ink); color: #fff; }
.step.p3 .block { height: 17vh; background: #D9D9D9; }
.gift { text-align: center; font-size: 2.2vw; font-weight: 700; }
.warn { background: #FBE7E4; color: var(--bad); padding: 8px 14px; border-radius: 10px; font-size: 14px; font-weight: 600; }

.login { max-width: 420px; margin: 18vh auto; padding: 0 20px; display: flex; flex-direction: column; gap: 16px; }
.login input { font: inherit; font-size: 18px; padding: 14px 16px; border: 2px solid #D9D9D9; border-radius: 14px; }
