:root {
  --bg: #fff8ee;
  --ink: #2d2a4a;
  --soft: #6f6a8f;
  --card: #ffffff;
  --line: #eadfcf;
  --primary: #6c5ce7;
  --primary-d: #5446c9;
  --good: #1fb57a;
  --good-bg: #d9f7ea;
  --bad: #ef5b5b;
  --bad-bg: #ffe0e0;
  --gold: #ffb800;
  --c: #6c5ce7;
  --radius: 22px;
  --shadow: 0 6px 0 rgba(45, 42, 74, .12), 0 12px 24px rgba(45, 42, 74, .10);
  font-family: "Nunito", "Trebuchet MS", "Segoe UI", system-ui, -apple-system, "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font-size: 18px; line-height: 1.35; overscroll-behavior: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; touch-action: manipulation; }
button:focus-visible, input:focus-visible { outline: 4px solid #ffd54a; outline-offset: 2px; }
#app { min-height: 100dvh; }
.screen { min-height: 100dvh; display: flex; flex-direction: column; padding: 16px clamp(14px, 4vw, 40px) 28px; max-width: 980px; margin: 0 auto; animation: fadein .25s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
h1, h2, h3 { margin: 0; line-height: 1.15; }
h1 { font-size: clamp(28px, 6vw, 44px); }
h2 { font-size: clamp(22px, 4.5vw, 30px); }
h3 { font-size: 20px; }
.muted { color: var(--soft); }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 12px; }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.hidden { display: none !important; }

/* Boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 12px 26px; border-radius: 999px; background: var(--primary); color: #fff; font-weight: 800; font-size: 20px; box-shadow: 0 5px 0 var(--primary-d); transition: transform .08s, box-shadow .08s; }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--primary-d); }
.btn.ghost { background: #fff; color: var(--ink); box-shadow: 0 5px 0 var(--line); border: 2px solid var(--line); }
.btn.ghost:active { box-shadow: 0 1px 0 var(--line); }
.btn.good { background: var(--good); box-shadow: 0 5px 0 #138a5c; }
.btn.danger { background: var(--bad); box-shadow: 0 5px 0 #c24141; }
.btn.small { min-height: 44px; padding: 8px 18px; font-size: 16px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.icon-btn { width: 52px; height: 52px; border-radius: 50%; background: #fff; border: 2px solid var(--line); font-size: 24px; display: grid; place-items: center; box-shadow: 0 4px 0 var(--line); }
.icon-btn:active { transform: translateY(3px); box-shadow: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px; background: #fff; border: 2px solid var(--line); font-weight: 800; }
.chip.gold { background: #fff3c4; border-color: #ffe08a; }
.chip.fire { background: #ffe5d6; border-color: #ffc9a8; }

/* Choix du profil */
.hero { text-align: center; padding: 18px 0 6px; }
.hero .logo { font-size: 64px; animation: float 3s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-8px) rotate(3deg); } }
.profiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 18px; margin: 22px 0; }
.profile-card { background: var(--card); border-radius: var(--radius); padding: 22px 12px; text-align: center; box-shadow: var(--shadow); font-weight: 800; font-size: 24px; transition: transform .1s; }
.profile-card:active { transform: scale(.96); }
.profile-card .av { font-size: 76px; line-height: 1; display: block; margin-bottom: 6px; }
.profile-card small { display: block; font-size: 15px; color: var(--soft); font-weight: 700; }
.footer-link { margin-top: auto; padding-top: 20px; text-align: center; }
.footer-link button { color: var(--soft); font-weight: 700; text-decoration: underline; padding: 10px; }

/* Pavé de code */
.pinpad { max-width: 330px; margin: 16px auto; }
.pin-dots { display: flex; gap: 14px; justify-content: center; margin: 12px 0 20px; }
.pin-dots i { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--primary); display: block; transition: background .1s; }
.pin-dots i.on { background: var(--primary); }
.pin-dots.shake { animation: shake .4s; }
.keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.key { height: 68px; border-radius: 20px; background: #fff; font-size: 30px; font-weight: 800; box-shadow: 0 4px 0 var(--line); border: 2px solid var(--line); }
.key:active { transform: translateY(3px); box-shadow: none; background: #f5efff; }
.key.fn { font-size: 24px; background: #f6f1e8; }
.error { color: var(--bad); font-weight: 800; min-height: 1.4em; text-align: center; }

/* Accueil */
.topbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.me { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 190px; }
.me .av { font-size: 54px; line-height: 1; }
.me h1 { font-size: clamp(24px, 5vw, 34px); }
.mission { background: linear-gradient(135deg, #7c6cf0, #5b8cff); color: #fff; border-radius: var(--radius); padding: 16px 20px; display: flex; align-items: center; gap: 16px; box-shadow: var(--shadow); margin-bottom: 18px; }
.mission .big { font-size: 44px; }
.mission .dots { display: flex; gap: 8px; margin-top: 6px; }
.mission .dots i { width: 26px; height: 26px; border-radius: 50%; background: rgba(255,255,255,.3); display: grid; place-items: center; font-style: normal; font-size: 15px; }
.mission .dots i.on { background: #ffd54a; color: #5a4400; }
.section-title { margin: 14px 0 10px; display: flex; align-items: center; gap: 10px; }
.games { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.game-card { position: relative; text-align: left; border-radius: var(--radius); padding: 16px 16px 14px; color: var(--ink); box-shadow: var(--shadow); background: linear-gradient(160deg, var(--bg1), var(--bg2)); border: 3px solid #fff; transition: transform .1s; overflow: hidden; }
.game-card:active { transform: scale(.97); }
.game-card .emo { font-size: 54px; line-height: 1; display: block; margin-bottom: 6px; filter: drop-shadow(0 4px 0 rgba(0,0,0,.08)); }
.game-card b { display: block; font-size: 21px; line-height: 1.15; }
.game-card span { font-size: 15px; color: rgba(45,42,74,.75); font-weight: 700; }
.pips { display: flex; gap: 4px; margin-top: 8px; }
.pips i { width: 16px; height: 16px; border-radius: 50%; background: rgba(255,255,255,.7); border: 2px solid rgba(45,42,74,.18); display: block; }
.pips i.on { background: var(--gold); border-color: #e09b00; }
.pips.big i { width: 22px; height: 22px; }
.bottom-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 22px; }
.bottom-actions .btn { flex: 1; min-width: 200px; }

/* Partie */
.round { min-height: 100dvh; background: linear-gradient(180deg, var(--bg1), var(--bg2)); }
.round .screen { animation: none; }
.round-top { display: flex; align-items: center; gap: 12px; }
.progress { flex: 1; height: 22px; border-radius: 999px; background: rgba(255,255,255,.65); overflow: hidden; border: 2px solid rgba(255,255,255,.9); }
.progress > div { height: 100%; width: 0; background: var(--c); border-radius: 999px; transition: width .4s ease; }
.stage { display: flex; align-items: flex-end; justify-content: center; gap: 14px; margin: 10px 0 6px; min-height: 120px; }
.mascot { font-size: 86px; line-height: 1; transition: transform .2s; user-select: none; }
.mascot.bounce { animation: bounce .6s; }
.mascot.shake { animation: shake .45s; }
.bubble { background: #fff; border-radius: 20px; padding: 10px 16px; font-weight: 800; font-size: 20px; max-width: 60%; box-shadow: 0 4px 0 rgba(0,0,0,.08); position: relative; min-height: 46px; display: flex; align-items: center; }
.bubble::before { content: ""; position: absolute; left: -9px; bottom: 16px; border: 10px solid transparent; border-right-color: #fff; border-left: 0; }
.bubble.good { background: var(--good-bg); color: #0d7a4f; } .bubble.good::before { border-right-color: var(--good-bg); }
.bubble.bad { background: #fff0cc; color: #8a5a00; } .bubble.bad::before { border-right-color: #fff0cc; }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 30% { transform: translateY(-28px) scale(1.1); } 60% { transform: translateY(0) scale(.95); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-12px); } 40% { transform: translateX(12px); } 60% { transform: translateX(-8px); } 80% { transform: translateX(8px); } }
.qcard { background: #fff; border-radius: var(--radius); padding: 18px 18px 22px; text-align: center; box-shadow: var(--shadow); margin: 8px 0 14px; }
.qcard .title { font-size: 15px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--c); }
.qcard .expr { font-size: clamp(44px, 12vw, 84px); font-weight: 900; letter-spacing: .02em; margin: 6px 0; font-variant-numeric: tabular-nums; }
.qcard .pic { font-size: clamp(74px, 20vw, 128px); line-height: 1.1; }
.qcard .bigtext { font-size: clamp(54px, 15vw, 110px); font-weight: 900; line-height: 1.1; color: var(--c); }
.qcard .bigtext.word { color: var(--ink); letter-spacing: .04em; }
.qcard .sentence { font-size: clamp(28px, 6.5vw, 46px); font-weight: 800; margin: 10px 0; line-height: 1.25; }
.qcard .instr { font-size: 19px; color: var(--soft); font-weight: 700; }
.speak { margin-top: 8px; }
.bigspeaker { width: 130px; height: 130px; border-radius: 50%; background: var(--c); color: #fff; font-size: 62px; margin: 6px auto; display: grid; place-items: center; box-shadow: 0 8px 0 rgba(0,0,0,.18); animation: pulse 2s infinite; }
.bigspeaker:active { transform: translateY(5px); box-shadow: 0 3px 0 rgba(0,0,0,.18); }
@keyframes pulse { 50% { transform: scale(1.05); } }
.choices { display: grid; gap: 14px; grid-template-columns: repeat(2, 1fr); }
.choices.three { grid-template-columns: repeat(3, 1fr); }
.choice { background: #fff; border-radius: 22px; min-height: 88px; padding: 10px; font-weight: 900; font-size: clamp(30px, 8vw, 48px); box-shadow: 0 6px 0 rgba(0,0,0,.14); border: 3px solid transparent; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; transition: transform .08s; }
.choice:active { transform: translateY(4px); box-shadow: 0 2px 0 rgba(0,0,0,.14); }
.choice .e { font-size: clamp(54px, 14vw, 88px); line-height: 1.1; }
.choice .e.small { font-size: clamp(40px, 10vw, 64px); }
.choice .l { font-size: 18px; font-weight: 800; color: var(--soft); }
.choice.words { font-size: clamp(28px, 7vw, 42px); letter-spacing: .03em; }
.choice.right { background: var(--good-bg); border-color: var(--good); animation: bounce .6s; }
.choice.wrong { background: var(--bad-bg); border-color: var(--bad); animation: shake .45s; }
.choice[disabled] { pointer-events: none; }
.answer-box { background: #fff; border: 4px solid var(--c); border-radius: 20px; height: 84px; display: grid; place-items: center; font-size: 52px; font-weight: 900; margin: 0 auto 12px; max-width: 330px; font-variant-numeric: tabular-nums; }
.answer-box.right { background: var(--good-bg); border-color: var(--good); }
.answer-box.wrong { background: var(--bad-bg); border-color: var(--bad); animation: shake .45s; }
.answer-box .ph { color: #c9c3df; }
.numpad { max-width: 330px; margin: 0 auto; }
.numpad .key { height: 64px; }
.numpad .key.ok { background: var(--good); color: #fff; border-color: var(--good); }
.slots { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 6px 0 14px; min-height: 76px; }
.slot { min-width: 78px; height: 72px; border-radius: 18px; border: 4px dashed var(--c); background: rgba(255,255,255,.7); font-size: 34px; font-weight: 900; display: grid; place-items: center; padding: 0 12px; }
.slot.filled { border-style: solid; background: #fff; }
.slot.right { background: var(--good-bg); border-color: var(--good); }
.slot.wrong { background: var(--bad-bg); border-color: var(--bad); animation: shake .45s; }
.tiles { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.tile { min-width: 78px; height: 72px; padding: 0 16px; border-radius: 18px; background: var(--c); color: #fff; font-size: 34px; font-weight: 900; box-shadow: 0 6px 0 rgba(0,0,0,.22); }
.tile:active { transform: translateY(4px); box-shadow: 0 2px 0 rgba(0,0,0,.22); }
.tile.used { visibility: hidden; }
.plus-one { position: fixed; z-index: 30; pointer-events: none; font-size: 34px; font-weight: 900; color: #b07a00; text-shadow: 0 2px 0 #fff; }

/* Résultats */
.result { text-align: center; align-items: center; justify-content: center; gap: 14px; }
.result .mascot { font-size: 110px; }
.stars-big { font-size: 56px; font-weight: 900; color: #b07a00; }
.result-lines { display: grid; gap: 8px; width: 100%; max-width: 420px; }
.result-line { background: #fff; border-radius: 16px; padding: 10px 16px; font-weight: 800; box-shadow: 0 3px 0 var(--line); display: flex; justify-content: space-between; gap: 10px; }
.sticker-new { font-size: 90px; animation: bounce 1s infinite; }
.btns { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }

/* Album, progrès */
.album { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 12px; margin-top: 14px; }
.sticker { aspect-ratio: 1; border-radius: 22px; display: grid; place-items: center; font-size: 46px; background: #fff; box-shadow: 0 4px 0 var(--line); border: 2px solid var(--line); position: relative; }
.sticker.locked { background: #f1ebe0; color: #c2b8a5; font-size: 30px; }
.sticker.locked small { position: absolute; bottom: 4px; font-size: 12px; font-weight: 800; }
.sticker.fresh { animation: bounce 1s 2; border-color: var(--gold); }
.panel { background: #fff; border-radius: var(--radius); padding: 16px 18px; box-shadow: 0 4px 0 var(--line); border: 2px solid var(--line); margin-top: 14px; }
.skill-row { display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 2px dashed var(--line); }
.skill-row:last-child { border-bottom: 0; }
.skill-row .e { font-size: 38px; text-align: center; }
.meter { height: 12px; background: #efe8da; border-radius: 99px; overflow: hidden; margin-top: 4px; }
.meter > i { display: block; height: 100%; background: var(--good); border-radius: 99px; }
.tables-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 10px; }
.table-tile { border-radius: 18px; padding: 12px 6px; text-align: center; font-weight: 900; font-size: 26px; background: #f1ebe0; border: 3px solid transparent; box-shadow: 0 4px 0 rgba(0,0,0,.1); }
.table-tile small { display: block; font-size: 13px; font-weight: 800; color: var(--soft); }
.table-tile.m0 { background: #f1ebe0; } .table-tile.m1 { background: #ffd9d9; } .table-tile.m2 { background: #ffe9bf; } .table-tile.m3 { background: #cdf3e1; }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.badge { text-align: center; padding: 12px 8px; border-radius: 18px; background: #fff6d6; border: 2px solid #ffe08a; font-weight: 800; font-size: 15px; }
.badge .e { font-size: 40px; display: block; }
.badge.off { background: #f1ebe0; border-color: var(--line); filter: grayscale(1); opacity: .6; }
.badge small { display: block; font-weight: 700; color: var(--soft); font-size: 12px; }

/* Parents */
.pgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 16px; margin-top: 12px; }
.pcard { text-align: left; background: #fff; border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); border: 2px solid var(--line); }
.pcard .head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.pcard .av { font-size: 48px; line-height: 1; }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; font-size: 16px; }
.kv b { text-align: right; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 110px; margin-top: 10px; }
.bars div { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; font-size: 11px; color: var(--soft); }
.bars i { display: block; width: 100%; background: var(--primary); border-radius: 6px 6px 0 0; min-height: 3px; }
.bars span { margin-top: 3px; }
table.t { width: 100%; border-collapse: collapse; font-size: 16px; }
table.t th, table.t td { padding: 8px 6px; text-align: left; border-bottom: 1px solid var(--line); }
table.t th { color: var(--soft); font-size: 13px; text-transform: uppercase; }
.field { display: grid; gap: 6px; margin: 10px 0; }
.field label { font-weight: 800; font-size: 15px; }
.field input, .field select { font: inherit; padding: 12px 14px; border-radius: 14px; border: 2px solid var(--line); background: #fff; min-height: 50px; }
.avatars { display: flex; flex-wrap: wrap; gap: 8px; }
.avatars button { font-size: 32px; width: 56px; height: 56px; border-radius: 16px; border: 3px solid var(--line); background: #fff; }
.avatars button.on { border-color: var(--primary); background: #efeaff; }
.tag { display: inline-block; padding: 2px 10px; border-radius: 99px; background: #efeaff; color: var(--primary-d); font-weight: 800; font-size: 14px; }
.tag.warn { background: #fff0cc; color: #8a5a00; }
.advice li { margin: 6px 0; }
.modal-bg { position: fixed; inset: 0; background: rgba(30, 24, 60, .55); display: grid; place-items: center; z-index: 50; padding: 20px; animation: fadein .15s; }
.modal { background: #fff; border-radius: 26px; padding: 24px; max-width: 420px; width: 100%; text-align: center; box-shadow: var(--shadow); }
.modal .btns { margin-top: 18px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 22px; border-radius: 999px; font-weight: 800; z-index: 60; max-width: 90vw; text-align: center; }
.loader { text-align: center; padding: 60px 0; font-size: 60px; animation: float 1.5s infinite; }

/* Accueil : arcade et concours */
.hub { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; margin-bottom: 6px; }
.hub-card { position: relative; text-align: left; border-radius: var(--radius); padding: 16px; color: #fff; box-shadow: var(--shadow); border: 3px solid #fff; display: grid; grid-template-columns: auto 1fr; column-gap: 14px; align-items: center; transition: transform .1s; }
.hub-card:active { transform: scale(.97); }
.hub-card.arcade { background: linear-gradient(135deg, #ff7eb3, #ff9f43); }
.hub-card.versus { background: linear-gradient(135deg, #f7b733, #fc4a1a); }
.hub-card .emo { font-size: 52px; line-height: 1; grid-row: span 2; }
.hub-card b { font-size: 23px; line-height: 1.15; }
.hub-card span { font-size: 15px; font-weight: 700; opacity: .95; }
.notif { position: absolute; top: -10px; right: -8px; min-width: 34px; height: 34px; padding: 0 8px; border-radius: 99px; background: var(--bad); color: #fff; font-style: normal; font-weight: 900; display: grid; place-items: center; border: 3px solid #fff; animation: pulse 1.6s infinite; }
.game-card.dark { color: #fff; }
.game-card.dark span { color: rgba(255,255,255,.85); }
.game-card.last { border-color: var(--gold); }
.tag3d { position: absolute; top: 10px; right: 10px; font-style: normal; font-weight: 900; font-size: 14px; padding: 2px 10px; border-radius: 99px; background: rgba(255,255,255,.9); color: var(--ink); }

/* Nouveaux types de questions */
.choices.list { grid-template-columns: 1fr; }
.choice.text { font-size: clamp(21px, 5.2vw, 30px); min-height: 68px; padding: 10px 16px; }
.clock { width: min(52vw, 230px); margin: 6px auto; }
.clock svg { display: block; width: 100%; height: auto; }

.cols { display: inline-grid; margin: 8px auto 4px; font-size: clamp(38px, 10vw, 64px); font-weight: 900; font-variant-numeric: tabular-nums; letter-spacing: .22em; line-height: 1.2; }
.cols div { display: flex; justify-content: space-between; gap: .6em; padding: 0 0 0 .2em; }
.cols div.last { border-bottom: 5px solid var(--ink); }
.cols i { font-style: normal; color: var(--c); min-width: .7em; letter-spacing: 0; }
.timer { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-size: 17px; }
.timer .track { flex: 1; height: 12px; border-radius: 99px; background: rgba(255,255,255,.65); overflow: hidden; }
.timer .track i { display: block; height: 100%; width: 100%; background: var(--good); border-radius: 99px; transition: width .2s linear; }
.timer b { min-width: 74px; text-align: right; font-variant-numeric: tabular-nums; }
.timer.hurry .track i { background: var(--bad); }
.timer.hurry b { color: #b3261e; }

/* Arcade */
.round.arcade.dark { color: #fff; }
.round.arcade.dark .icon-btn, .round.arcade.dark .chip { color: var(--ink); }
.arcade-q { text-align: center; font-size: clamp(34px, 9vw, 62px); font-weight: 900; margin: 10px 0 0; font-variant-numeric: tabular-nums; line-height: 1.1; }
.arcade-q.pop { animation: bounce .5s; }
.arcade-msg { text-align: center; min-height: 1.5em; font-weight: 800; font-size: 20px; margin-bottom: 6px; }
.arcade-msg.good { color: #0d7a4f; } .arcade-msg.bad { color: #b3261e; }
.dark .arcade-msg.good { color: #8dffcb; } .dark .arcade-msg.bad { color: #ffb4a8; }
.arcade-stage { position: relative; flex: 1; min-height: 340px; border-radius: var(--radius); overflow: hidden; }
.arcade-stage.ballons { background: linear-gradient(180deg, #8fd3ff, #e8f7ff); border: 3px solid #fff; touch-action: manipulation; }
.balloon { position: absolute; bottom: -170px; width: clamp(78px, 21vw, 124px); aspect-ratio: 1 / 1.18; border-radius: 50% 50% 50% 50% / 46% 46% 54% 54%; background: radial-gradient(circle at 32% 28%, rgba(255,255,255,.75) 0 9%, transparent 22%), var(--col); color: #fff; font-weight: 900; font-size: clamp(26px, 6.6vw, 42px); text-shadow: 0 2px 0 rgba(0,0,0,.25); box-shadow: inset -8px -10px 0 rgba(0,0,0,.12); display: grid; place-items: center; }
.balloon::after { content: ""; position: absolute; top: 100%; left: 50%; width: 2px; height: 46px; background: rgba(45,42,74,.45); }
.balloon.pop { animation: balloon-pop .35s forwards; }
.balloon.wrong { filter: grayscale(1); opacity: .5; }
.balloon.right { outline: 6px solid var(--good); outline-offset: 3px; }
@keyframes balloon-pop { to { scale: 1.7; opacity: 0; } }
.arcade-stage.taupes { background: linear-gradient(180deg, #a8e06a, #6fbf3b); border: 3px solid #fff; display: grid; place-items: center; padding: 12px; }
.holes { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(8px, 2.5vw, 20px); width: min(100%, 560px); }
.hole { position: relative; aspect-ratio: 1 / .95; overflow: hidden; border-radius: 50% 50% 46% 46% / 30% 30% 70% 70%; background: radial-gradient(ellipse at 50% 100%, #3b2a14 0 58%, #5b4322 60% 100%); }
.mole { position: absolute; inset: 12% 8% -4% 8%; display: flex; flex-direction: column; align-items: center; transform: translateY(105%); transition: transform .22s cubic-bezier(.3,1.5,.6,1); }
.mole.up { transform: translateY(0); }
.mole .face { font-size: clamp(34px, 10vw, 62px); line-height: 1; }
.mole .sign { background: #fff; color: var(--ink); border-radius: 12px; padding: 0 10px; font-weight: 900; font-size: clamp(22px, 6vw, 36px); border: 3px solid var(--ink); margin-top: -4px; min-width: 56%; }
.mole.hit .sign, .mole.right .sign { background: var(--good-bg); border-color: var(--good); }
.mole.wrong .sign { background: var(--bad-bg); border-color: var(--bad); }
.mole.hit .face { animation: bounce .5s; }
.arcade-stage.memory { overflow: visible; display: grid; place-items: center; }
.mgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(8px, 2vw, 14px); width: min(100%, 640px); perspective: 900px; }
@media (max-width: 520px) { .mgrid { grid-template-columns: repeat(3, 1fr); } }
.mcard { aspect-ratio: 1 / 1.05; padding: 0; }
.mcard .inner { display: block; position: relative; width: 100%; height: 100%; transition: transform .45s; transform-style: preserve-3d; }
.mcard.open .inner, .mcard.found .inner { transform: rotateY(180deg); }
.mcard .back, .mcard .front { position: absolute; inset: 0; border-radius: 18px; display: grid; place-items: center; backface-visibility: hidden; -webkit-backface-visibility: hidden; font-weight: 900; box-shadow: 0 5px 0 rgba(0,0,0,.18); border: 3px solid #fff; }
.mcard .back { background: linear-gradient(135deg, #7c6cf0, #5b8cff); font-size: clamp(30px, 8vw, 46px); }
.mcard .front { background: #fff; color: var(--ink); transform: rotateY(180deg); font-size: clamp(17px, 4.4vw, 28px); padding: 4px; text-align: center; line-height: 1.1; }
.mcard.res .front { background: #fff6d6; font-size: clamp(24px, 6.5vw, 40px); }
.mcard.found .front { background: var(--good-bg); border-color: var(--good); }
.arcade-stage.course, .arcade-stage.asteroides { display: flex; flex-direction: column; overflow: visible; }
.arcade-canvas { display: block; width: 100%; flex: 1; min-height: 320px; height: min(58vh, 560px); border-radius: var(--radius); border: 3px solid rgba(255,255,255,.5); touch-action: none; cursor: pointer; }
.pad { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.pad .btn { min-width: 96px; font-size: 30px; }
.pad .hint { font-weight: 700; font-size: 15px; opacity: .85; text-align: center; }

/* Concours */
.champion { background: linear-gradient(135deg, #f7b733, #fc4a1a); color: #fff; border-radius: var(--radius); padding: 14px 18px; display: flex; align-items: center; gap: 14px; box-shadow: var(--shadow); }
.champion .big { font-size: 44px; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.tab { padding: 8px 16px; border-radius: 99px; background: #f6f1e8; border: 2px solid var(--line); font-weight: 800; font-size: 16px; }
.tab.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.podium { display: flex; align-items: flex-end; justify-content: center; gap: 10px; margin: 14px 0 6px; }
.podium .step { flex: 1; max-width: 170px; text-align: center; display: flex; flex-direction: column; align-items: center; font-size: 17px; }
.podium .av { font-size: 50px; line-height: 1.1; }
.podium .pts { font-weight: 800; color: #8a5a00; }
.podium .block { width: 100%; margin-top: 6px; border-radius: 14px 14px 0 0; display: grid; place-items: center; font-size: 34px; background: #ffe08a; height: 96px; }
.podium .r2 .block { height: 70px; background: #dfe4ea; } .podium .r3 .block { height: 50px; background: #f3c9a5; }
.podium .me b { color: var(--primary); }
.rank-list { display: grid; gap: 8px; margin-top: 10px; }
.rank-row, .ch-row { display: grid; grid-template-columns: 40px 46px 1fr auto; gap: 10px; align-items: center; padding: 8px 12px; border-radius: 16px; background: #faf6ee; border: 2px solid var(--line); }
.ch-row { grid-template-columns: 46px 1fr auto; margin-top: 8px; }
.rank-row.me { background: #efeaff; border-color: var(--primary); }
.rank-row .n { font-weight: 900; font-size: 22px; text-align: center; }
.rank-row .av, .ch-row .av { font-size: 34px; line-height: 1; }
.who small { display: block; color: var(--soft); font-size: 13px; font-weight: 700; }
.rank-row .pts { font-size: 19px; white-space: nowrap; }
.ch-row.win { background: var(--good-bg); border-color: #a5e5c8; } .ch-row.lose { background: #f6f1e8; }

/* Duel à deux */
.duel { position: fixed; inset: 0; display: grid; grid-template-rows: 1fr 1fr; background: var(--ink); gap: 6px; z-index: 5; }
.duel.side { grid-template-rows: 1fr; grid-template-columns: 1fr 1fr; }
.dside { background: linear-gradient(160deg, #d6e4ff, #b3cdff); padding: clamp(8px, 2vh, 18px) clamp(10px, 3vw, 28px); display: flex; flex-direction: column; justify-content: center; gap: clamp(4px, 1.2vh, 12px); min-height: 0; min-width: 0; }
.dside:first-child { background: linear-gradient(160deg, #ffe1c7, #ffc79a); }
.duel.face .dside:first-child { transform: rotate(180deg); }
.dside.locked { filter: grayscale(.8); }
.dside.locked .dbtn { pointer-events: none; opacity: .6; }
.dhead { display: flex; align-items: center; gap: 10px; font-size: 20px; }
.dhead .av { font-size: 36px; line-height: 1; }
.ddots { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
.ddots i { width: clamp(12px, 2.4vw, 20px); height: clamp(12px, 2.4vw, 20px); border-radius: 50%; background: rgba(255,255,255,.75); border: 2px solid rgba(45,42,74,.25); }
.ddots i.on { background: var(--gold); border-color: #e09b00; }
.dq { text-align: center; font-weight: 900; font-size: clamp(30px, 7vmin, 60px); font-variant-numeric: tabular-nums; line-height: 1.1; }
.dnote { text-align: center; min-height: 1.3em; font-weight: 800; color: #b3261e; }
.dopts { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(8px, 2vw, 16px); }
.dbtn { background: #fff; border-radius: 20px; min-height: clamp(56px, 11vh, 96px); font-weight: 900; font-size: clamp(26px, 6vmin, 46px); box-shadow: 0 6px 0 rgba(0,0,0,.16); }
.dbtn:active { transform: translateY(4px); box-shadow: 0 2px 0 rgba(0,0,0,.16); }
.dbtn.wrong { background: var(--bad-bg); }
.dquit { position: absolute; top: 50%; left: 6px; transform: translateY(-50%); z-index: 2; width: 44px; height: 44px; font-size: 20px; }
.duel.side .dquit { top: 6px; left: 50%; transform: translateX(-50%); }
.dcount { position: absolute; inset: 0; display: grid; place-items: center; font-size: 160px; font-weight: 900; color: #fff; background: rgba(30,24,60,.6); z-index: 3; }

@media (max-width: 520px) {
  body { font-size: 17px; }
  .bubble { font-size: 17px; max-width: 64%; }
  .mascot { font-size: 70px; }
  .choices { gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
