:root{
  --bg:#FAF7FF; --ink:#1B1340; --muted:#5E5780; --card:#FFFFFF; --line:#1B1340;
  --quiz:#FFD23F; --lyrics:#FF5DA2; --me:#5B6CFF; --teal:#19C3B1; --good:#19C3B1; --bad:#FF5DA2;
  --display:"Bowlby One","Arial Black",Impact,sans-serif;
  --body:"Work Sans",system-ui,-apple-system,"Segoe UI",Arial,sans-serif;
}
@media (prefers-color-scheme: dark){ :root{ --bg:#150F33; --ink:#F4F0FF; --muted:#B5ABDD; --card:#211A4A; --line:#F4F0FF; } }
*{ box-sizing:border-box; }
html{ height:100%; }
body{ margin:0; min-height:100%; background:var(--bg); color:var(--ink); font-family:var(--body); font-size:17px; line-height:1.4; -webkit-tap-highlight-color:transparent; }
button,input,textarea,select{ font:inherit; color:inherit; }
button{ cursor:pointer; }
:focus-visible{ outline:4px solid var(--me); outline-offset:3px; }
h1,h2,h3,p{ margin:0; }
#app{ max-width:520px; margin:0 auto; min-height:100vh; min-height:100dvh; padding:env(safe-area-inset-top,0px) 16px calc(28px + env(safe-area-inset-bottom,0px)); }
#app.has-nav{ padding-bottom:calc(96px + env(safe-area-inset-bottom,0px)); }
.sr{ position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); }

/* catégories : couleur portée par data-cat */
[data-cat=quiz]{ --cc:var(--quiz); --on:#1B1340; }
[data-cat=lyrics]{ --cc:var(--lyrics); --on:#1B1340; }
[data-cat=me]{ --cc:var(--me); --on:#FFFFFF; }
.t0{ --tc:var(--lyrics); } .t1{ --tc:var(--teal); } .t2{ --tc:var(--quiz); } .t3{ --tc:var(--me); } .t4{ --tc:#FF8A3D; } .t5{ --tc:#8BD450; }

/* boutons */
.btn{ display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:48px; border:3px solid var(--line); background:var(--card); color:var(--ink); padding:10px 20px; border-radius:999px; font-weight:800; box-shadow:4px 4px 0 var(--line); transition:transform .08s, box-shadow .08s; text-align:center; }
a.btn{ text-decoration:none; }
.btn:active{ transform:translate(3px,3px); box-shadow:1px 1px 0 var(--line); }
.btn.big{ width:100%; min-height:58px; background:var(--quiz); color:#1B1340; font-size:1.12rem; }
.btn.ghost{ background:transparent; box-shadow:none; min-height:44px; padding:6px 14px; font-size:.92rem; }
.btn.small{ min-height:40px; padding:4px 14px; font-size:.9rem; box-shadow:3px 3px 0 var(--line); }
.btn.danger{ background:var(--bad); color:#1B1340; }
.btn:disabled{ opacity:.45; box-shadow:none; }
.stack{ display:grid; gap:12px; }
.row{ display:flex; flex-wrap:wrap; gap:10px; align-items:center; }
@media (prefers-reduced-motion: reduce){ .btn{ transition:none; } }

/* blocs */
.card{ border:3px solid var(--line); border-radius:20px; background:var(--card); padding:18px; box-shadow:5px 5px 0 var(--line); margin-bottom:16px; }
.card h2{ font-family:var(--display); font-weight:400; font-size:1.5rem; line-height:1.12; margin-bottom:8px; }
.title{ font-family:var(--display); font-weight:400; font-size:1.8rem; line-height:1.1; margin:16px 0 12px; }
.hint{ color:var(--muted); font-weight:600; font-size:.93rem; }
.err{ background:var(--bad); color:#1B1340; border:3px solid var(--line); border-radius:12px; padding:8px 12px; font-weight:800; margin-bottom:12px; }
.banner{ margin:10px 0 0; padding:8px 12px; border:3px solid var(--line); border-radius:12px; background:var(--quiz); color:#1B1340; font-weight:800; }
label.f{ display:grid; gap:6px; font-weight:800; margin-bottom:12px; }
input[type=text],input[type=number],input[type=password],textarea,select{ width:100%; background:var(--card); border:3px solid var(--line); border-radius:14px; padding:11px 13px; font-weight:600; font-size:1.02rem; }
textarea{ min-height:84px; resize:vertical; }

/* accueil */
.hero{ position:relative; overflow:hidden; border:3px solid var(--line); border-radius:24px; background:var(--card); padding:26px 22px 20px; box-shadow:6px 6px 0 var(--line); margin:16px 0 20px; }
.hero h1{ font-family:var(--display); font-weight:400; font-size:6.4rem; line-height:.85; letter-spacing:-.02em; text-shadow:.05em .05em 0 var(--lyrics); position:relative; }
.hero p{ margin-top:10px; font-weight:800; font-size:1.1rem; position:relative; max-width:17ch; }
.hero .c{ position:absolute; width:96px; height:96px; border-radius:50%; background:var(--teal); border:3px solid var(--line); right:-24px; top:-24px; }
.hero .d{ position:absolute; width:104px; height:66px; right:14px; bottom:14px; background-image:radial-gradient(var(--me) 3px,transparent 3.5px); background-size:16px 16px; }

/* pastille d'équipe */
.team{ position:relative; overflow:hidden; display:flex; align-items:center; gap:10px; padding:10px 14px 10px 34px; background:var(--card); border:3px solid var(--line); border-radius:16px; font-weight:800; }
.team::before{ content:""; position:absolute; left:0; top:0; bottom:0; width:18px; background:var(--tc); border-right:3px solid var(--line); }
.team .nm{ flex:1; min-width:0; overflow-wrap:anywhere; }
.team b{ font-family:var(--display); font-weight:400; font-size:1.4rem; line-height:1; }
button.team{ width:100%; text-align:left; min-height:56px; font-size:1.1rem; box-shadow:4px 4px 0 var(--line); }
button.team:active{ transform:translate(3px,3px); box-shadow:1px 1px 0 var(--line); }
.team.mine{ background:var(--quiz); color:#1B1340; }
.list{ list-style:none; margin:0 0 16px; padding:0; display:grid; gap:10px; }
.rk{ font-family:var(--display); font-size:1.3rem; width:1.7ch; }
.round{ width:38px; height:38px; flex:none; border-radius:50%; border:3px solid var(--line); background:var(--bg); font-weight:800; font-size:1.2rem; line-height:1; padding:0; }
.chips{ display:flex; flex-wrap:wrap; gap:8px; }
.chip{ padding:4px 12px; border:3px solid var(--line); border-radius:999px; font-weight:800; font-size:.9rem; background:var(--card); }

/* barre du haut */
.bar{ display:flex; align-items:center; justify-content:space-between; gap:10px; padding:14px 0 10px; }
.brand{ font-family:var(--display); font-size:1.15rem; }
.conn{ font-size:.8rem; font-weight:800; color:var(--muted); display:flex; align-items:center; gap:6px; }
.conn i{ width:10px; height:10px; border-radius:50%; background:var(--good); border:2px solid var(--line); }
.conn.off i{ background:var(--bad); }

/* question */
.band{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin:6px 0 12px; }
.tag{ padding:6px 14px; border:3px solid var(--line); border-radius:999px; font-weight:800; background:var(--cc); color:var(--on); }
.x2{ padding:2px 10px; border:3px solid var(--line); border-radius:999px; background:var(--lyrics); color:#1B1340; font-weight:800; }
.timer{ display:flex; align-items:center; gap:10px; margin-bottom:14px; }
.timer .track{ position:relative; flex:1; height:20px; border:3px solid var(--line); border-radius:999px; overflow:hidden; background:var(--card); }
.timer i{ position:absolute; left:0; top:0; bottom:0; width:100%; background:var(--cc,var(--quiz)); }
.timer span{ flex:none; min-width:4.6ch; text-align:right; font-weight:800; font-size:.95rem; }
.q{ font-family:var(--display); font-weight:400; font-size:1.45rem; line-height:1.2; margin-bottom:14px; white-space:pre-line; overflow-wrap:anywhere; }
.q.lyr{ font-family:var(--body); font-weight:800; font-size:1.35rem; line-height:1.45; letter-spacing:.04em; }
.choices{ display:grid; gap:12px; margin-bottom:12px; }
.choice{ display:flex; align-items:center; gap:14px; width:100%; text-align:left; min-height:60px; padding:12px 16px; border:3px solid var(--line); border-radius:16px; background:var(--card); font-weight:800; font-size:1.08rem; box-shadow:4px 4px 0 var(--line); }
.choice i{ font-style:normal; font-family:var(--display); flex:none; width:38px; height:38px; display:grid; place-items:center; border:3px solid var(--line); border-radius:50%; background:var(--bg); color:var(--ink); }
.choice[aria-pressed=true]{ background:var(--cc); color:var(--on); }
.choice:disabled{ opacity:.6; box-shadow:none; }
div.choice{ box-shadow:none; min-height:0; padding:9px 12px; font-size:1rem; }
div.choice.right{ background:var(--good); color:#1B1340; }
.sent{ min-height:1.5em; font-weight:800; margin-top:8px; }
.ans{ font-family:var(--display); font-size:1.45rem; line-height:1.2; margin-bottom:6px; white-space:pre-line; overflow-wrap:anywhere; }
.ans.lyr{ font-family:var(--body); font-weight:800; font-size:1.2rem; }
.res{ border:3px solid var(--line); border-radius:20px; padding:18px; margin-bottom:16px; font-weight:800; font-size:1.1rem; box-shadow:5px 5px 0 var(--line); }
.res.good{ background:var(--good); color:#1B1340; } .res.bad{ background:var(--bad); color:#1B1340; } .res.wait{ background:var(--card); }
.res b{ display:block; font-family:var(--display); font-weight:400; font-size:2rem; line-height:1.05; margin-bottom:4px; }
.res small{ display:block; font-weight:600; font-size:.93rem; margin-top:6px; overflow-wrap:anywhere; }
