:root {
  --bg: #0b1622;
  --bg2: #102233;
  --card: rgba(255, 255, 255, .055);
  --card-2: rgba(255, 255, 255, .09);
  --line: rgba(255, 255, 255, .1);
  --text: #f2f6fa;
  --muted: #9db0c3;
  --red: #ce1126;
  --yellow: #fcd116;
  --green: #009460;
  --green-2: #2bd48a;
  --ok: #22c57a;
  --bad: #ff5a5f;
  --radius: 20px;
  --tab-h: 74px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --font: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Baloo 2', 'Outfit', system-ui, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 var(--font);
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
input { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.1; margin: 0 0 .4em; letter-spacing: -.01em; }
p { margin: 0 0 .7em; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.grow { flex: 1; min-width: 0; }
kbd { font: 600 .7rem var(--font); padding: 2px 6px; border-radius: 6px; background: rgba(255,255,255,.12); color: var(--muted); }

.bg-deco {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60vmax 50vmax at 110% -10%, rgba(0, 148, 96, .22), transparent 60%),
    radial-gradient(50vmax 40vmax at -20% 30%, rgba(206, 17, 38, .16), transparent 60%),
    radial-gradient(50vmax 40vmax at 50% 120%, rgba(252, 209, 22, .10), transparent 60%),
    var(--bg);
}
.flag-text {
  background: linear-gradient(90deg, #ff3b4f, var(--yellow) 50%, var(--green-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Barre du haut ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  padding: calc(10px + var(--safe-t)) 16px 10px;
  background: linear-gradient(var(--bg) 60%, rgba(11, 22, 34, 0));
  max-width: 760px; margin: 0 auto;
}
.tb-player { display: flex; align-items: center; gap: 10px; text-align: left; min-width: 0; }
.avatar {
  width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; font-size: 24px;
  background: linear-gradient(135deg, rgba(255,255,255,.16), rgba(255,255,255,.04));
  border: 1px solid var(--line); flex: none;
}
.avatar.xl { width: 72px; height: 72px; font-size: 42px; border-radius: 22px; }
.tb-id { display: flex; flex-direction: column; min-width: 0; }
.tb-id b { font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-id small { color: var(--muted); font-size: .75rem; white-space: nowrap; }
.tb-xp { flex: 1; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; min-width: 60px; }
.tb-xp-bar { width: 100%; max-width: 160px; height: 8px; border-radius: 99px; background: rgba(255,255,255,.1); overflow: hidden; }
.tb-xp-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--yellow), var(--green-2)); border-radius: inherit; transition: width .6s; }
.tb-xp small { font-size: .7rem; color: var(--muted); }
.tb-stars { font-weight: 700; color: var(--yellow); background: rgba(252, 209, 22, .12); padding: 6px 10px; border-radius: 99px; white-space: nowrap; }

/* ---------- Vue principale ---------- */
.view {
  max-width: 760px; margin: 0 auto;
  padding: 6px 16px calc(var(--tab-h) + 28px + var(--safe-b));
  transition: opacity .3s, transform .3s;
}
.view.enter { opacity: 0; transform: translateY(10px); }
.page-title { font-size: 2rem; margin: 6px 0 14px; }
.section-title { font-size: 1.25rem; margin: 26px 0 12px; }
.eyebrow { font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin: 0 0 4px; }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; margin: 14px 0; backdrop-filter: blur(10px);
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 20px; border-radius: 14px; font-weight: 700; letter-spacing: .01em;
  transition: transform .15s, filter .15s, background .2s;
}
.btn:active { transform: scale(.97); }
.btn.sm { padding: 8px 14px; font-size: .9rem; border-radius: 12px; }
.btn.full { width: 100%; margin-top: 12px; }
.btn.primary { background: linear-gradient(135deg, var(--green), var(--green-2)); color: #032; box-shadow: 0 8px 22px rgba(0, 148, 96, .35), inset 0 -3px 0 rgba(0,0,0,.18); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: var(--card-2); border: 1px solid var(--line); }
.btn.danger { background: var(--bad); color: #fff; }
.danger-text { color: var(--bad); }
.btn kbd { background: rgba(0,0,0,.18); color: inherit; }
.row { display: flex; gap: 10px; margin-top: 16px; }
.row .btn { flex: 1; }
.pill { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: .75rem; font-weight: 700; color: #071018; }
.pill.ok { background: var(--ok); }
.pill.new { background: var(--yellow); vertical-align: middle; margin-left: 4px; }
.chev { font-size: 1.6rem; color: var(--muted); }
.round {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-weight: 700;
  background: rgba(11, 22, 34, .75); border: 1px solid var(--line); backdrop-filter: blur(8px);
}
.back { color: var(--muted); font-weight: 600; margin: 4px 0 10px; }

.star { color: rgba(255,255,255,.18); font-size: .95rem; }
.star.on { color: var(--yellow); text-shadow: 0 0 8px rgba(252, 209, 22, .55); }
.stars-row { display: inline-flex; gap: 1px; }
.stars-row.big .star { font-size: 1.35rem; }

/* ---------- Accueil ---------- */
.hero { display: grid; grid-template-columns: 1fr; gap: 6px; margin: 4px 0 6px; position: relative; }
.hero h1 { font-size: clamp(2rem, 8vw, 2.9rem); }
.hero-map { height: 230px; margin: -6px -10px 0; }
.hero-map .gmap { width: 100%; height: 100%; }
@media (min-width: 640px) {
  .hero { grid-template-columns: 1fr 1.1fr; align-items: center; }
  .hero-map { height: 280px; }
}
.gmap.float { animation: float 6s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-8px); } }

.continue { display: flex; align-items: center; gap: 14px; cursor: pointer; position: relative; overflow: hidden;
  background: linear-gradient(120deg, color-mix(in srgb, var(--rc) 35%, transparent), var(--card) 70%); }
.continue h2 { font-size: 1.35rem; margin: 0 0 2px; }
.continue p { margin: 0 0 4px; }
.continue-badge { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; font: 800 1.7rem var(--display); background: var(--rc); color: #0b1622; box-shadow: 0 8px 20px color-mix(in srgb, var(--rc) 50%, transparent); flex: none; }
.daily { display: flex; align-items: center; gap: 14px; cursor: pointer; border-color: rgba(252, 209, 22, .35); background: linear-gradient(120deg, rgba(252, 209, 22, .14), var(--card) 70%); }
.daily.done { cursor: default; opacity: .85; }
.daily h3 { margin: 0 0 2px; font-size: 1.1rem; }
.daily p { margin: 0; font-size: .85rem; }
.daily-icon { font-size: 2rem; }

.modes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 640px) { .modes { grid-template-columns: repeat(3, 1fr); } }
.mode {
  position: relative; overflow: hidden; text-align: left; border-radius: var(--radius); padding: 16px 14px 14px; min-height: 128px;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 2px;
  background: linear-gradient(145deg, var(--c1), var(--c2)); color: #fff;
  box-shadow: 0 10px 24px -10px var(--c1), inset 0 -4px 0 rgba(0,0,0,.18);
  transition: transform .18s;
}
.mode::after { content: ''; position: absolute; inset: 0; background: radial-gradient(120px 80px at 90% 0, rgba(255,255,255,.35), transparent 70%); }
.mode:hover { transform: translateY(-3px); }
.mode:active { transform: scale(.97); }
.mode-ic { position: absolute; top: 10px; right: 12px; font-size: 2.2rem; filter: drop-shadow(0 4px 6px rgba(0,0,0,.25)); }
.mode b { font: 800 1.15rem var(--display); }
.mode small { opacity: .9; font-size: .8rem; line-height: 1.25; }

.level-card { display: flex; align-items: center; gap: 16px; }
.level-card h3 { margin: 0; }
.level-card p { margin: 0; font-size: .85rem; }
.lv-ring {
  --p: 0; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: conic-gradient(var(--yellow) calc(var(--p) * 360deg), rgba(255,255,255,.1) 0);
}
.lv-ring span { width: 50px; height: 50px; border-radius: 50%; background: var(--bg2); display: grid; place-items: center; font: 800 1.4rem var(--display); }

.install { display: flex; align-items: center; gap: 12px; border-color: rgba(43, 212, 138, .4); }
.install small { display: block; color: var(--muted); font-size: .8rem; line-height: 1.3; }
.inst-ic img { width: 44px; height: 44px; border-radius: 12px; display: block; }

/* ---------- Carte ---------- */
.gmap { display: block; width: 100%; height: 100%; touch-action: none; user-select: none; -webkit-user-select: none; }
.gm-base path { fill: #08121c; }
.gm-fill path { stroke: rgba(8, 18, 28, .55); stroke-width: calc(var(--k) * 1px); stroke-linejoin: round; transition: filter .2s, opacity .2s; }
.gm-hit { cursor: pointer; }
@media (hover: hover) { .gm-hit:hover { filter: brightness(1.18) saturate(1.1); } }
.gm-off { opacity: .55; }
.gm-lines path { fill: none; pointer-events: none; stroke-linejoin: round; }
.gm-prefline { stroke: rgba(8, 18, 28, .7); stroke-width: calc(var(--k) * 1.6px); }
.gm-regline { stroke: #fff; stroke-opacity: .85; stroke-width: calc(var(--k) * 2.4px); }
.gm-marks path { pointer-events: none; stroke-width: calc(var(--k) * 3px); }
.gm-mark.ok { fill: var(--ok); stroke: #fff; animation: blink .9s ease-in-out 2; }
.gm-mark.bad { fill: var(--bad); stroke: #fff; }
.gm-mark.sel { fill: var(--yellow); stroke: #fff; }
@keyframes blink { 50% { opacity: .55; } }
.gm-pin circle { fill: #fff; stroke: #0b1622; stroke-width: calc(var(--k) * 3px); pointer-events: none; }
.gm-pin .gm-pin-pulse { fill: none; stroke: #fff; animation: pulse 1.4s ease-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes pulse { to { transform: scale(3.5); opacity: 0; } }
.gm-label { fill: #fff; paint-order: stroke; stroke: rgba(6, 14, 22, .85); stroke-linejoin: round; text-anchor: middle; dominant-baseline: middle; pointer-events: none; font-family: var(--font); font-weight: 600; }
.gm-reg { font-family: var(--display); font-weight: 800; }

/* ---------- Campagne ---------- */
.trail { display: flex; flex-direction: column; align-items: stretch; padding: 10px 0 20px; }
.trail-node { display: flex; align-items: center; gap: 14px; width: 82%; padding: 10px; border-radius: 22px; position: relative; text-align: left; transition: transform .15s; }
.trail-node.left { align-self: flex-start; }
.trail-node.right { align-self: flex-end; flex-direction: row-reverse; text-align: right; }
.trail-node:not(.locked):hover { transform: scale(1.03); }
.node-disc {
  width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; font-size: 2rem; position: relative; flex: none;
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--rc) 70%, #fff), var(--rc));
  box-shadow: 0 8px 0 color-mix(in srgb, var(--rc) 55%, #000), 0 14px 26px rgba(0,0,0,.4);
}
.node-disc i { position: absolute; bottom: -6px; right: -4px; font: 800 .85rem var(--display); font-style: normal; background: var(--bg); border: 2px solid var(--rc); border-radius: 99px; padding: 0 7px; }
.trail-node.locked .node-disc { filter: grayscale(1) brightness(.5); }
.trail-node.locked { cursor: not-allowed; opacity: .7; }
.node-info { display: flex; flex-direction: column; }
.node-info b { font: 800 1.25rem var(--display); }
.node-info small { color: var(--muted); }
.node-stamp { position: absolute; top: 4px; left: 64px; background: var(--ok); color: #fff; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: .75rem; font-weight: 800; }
.trail-node.right .node-stamp { left: auto; right: 64px; }
.trail-dots { align-self: center; width: 4px; height: 26px; background: repeating-linear-gradient(var(--muted) 0 4px, transparent 4px 10px); opacity: .4; border-radius: 4px; }

.region-hero { position: relative; border-radius: 26px; overflow: hidden; min-height: 260px; display: flex; align-items: flex-end;
  background: linear-gradient(160deg, color-mix(in srgb, var(--rc) 30%, var(--bg2)), var(--bg)); border: 1px solid var(--line); }
.rh-map { position: absolute; inset: 0; opacity: .95; }
.rh-text { position: relative; padding: 18px; width: 100%; background: linear-gradient(transparent, rgba(6, 12, 20, .92) 45%); }
.rh-text h1 { font-size: 2.3rem; margin: 8px 0 0; }
.tagline { font-size: 1.05rem; font-weight: 600; margin: 0 0 2px; }
.rh-text p { margin: 0; }
.stages { display: grid; gap: 10px; margin: 16px 0; }
.stage { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); text-align: left; transition: transform .15s, background .2s; }
.stage:not(.locked):hover { background: var(--card-2); transform: translateX(3px); }
.stage.locked { opacity: .5; cursor: not-allowed; }
.stage-ic { font-size: 1.8rem; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 16px; background: rgba(255,255,255,.07); flex: none; }
.stage small { color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; }
.stage b { display: block; font: 800 1.15rem var(--display); }
.stage em { font-style: normal; color: var(--muted); font-size: .85rem; }
.guide h4 { margin: 18px 0 6px; font-size: 1rem; color: var(--yellow); }
.sites { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.sites li { padding: 10px 12px; border-radius: 14px; background: rgba(255,255,255,.04); border-left: 3px solid var(--green-2); }
.sites b { display: block; }
.sites span { color: var(--muted); font-size: .9rem; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 6px 12px; border-radius: 99px; background: rgba(255,255,255,.08); border: 1px solid var(--line); font-size: .88rem; font-weight: 500; }
button.chip:hover { background: rgba(255,255,255,.16); }
.chip.urban { border-color: rgba(252, 209, 22, .45); }

/* ---------- Explorateur ---------- */
body.in-explore .view { max-width: none; padding: 0; }
body.in-explore .topbar { position: fixed; left: 0; right: 0; max-width: none; background: linear-gradient(rgba(11,22,34,.95), rgba(11,22,34,0)); }
.explore { position: fixed; inset: 0; bottom: calc(var(--tab-h) + var(--safe-b)); }
.ex-map { position: absolute; inset: 0; background: radial-gradient(circle at 50% 40%, #13314a, #08131e 75%); }
.ex-top { position: absolute; top: calc(66px + var(--safe-t)); left: 12px; right: 12px; display: flex; flex-direction: column; gap: 8px; z-index: 3; max-width: 520px; }
.crumbs { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: .85rem; }
.crumbs button, .crumbs span { padding: 5px 10px; border-radius: 99px; background: rgba(11, 22, 34, .8); border: 1px solid var(--line); backdrop-filter: blur(8px); font-weight: 600; }
.crumbs i { color: var(--muted); font-style: normal; }
.search { position: relative; }
.search input { width: 100%; padding: 12px 16px; border-radius: 14px; border: 1px solid var(--line); background: rgba(11, 22, 34, .85); backdrop-filter: blur(10px); outline: none; }
.search input:focus { border-color: var(--green-2); }
.results { position: absolute; left: 0; right: 0; top: calc(100% + 6px); background: #0f2131; border-radius: 14px; overflow: hidden; box-shadow: 0 18px 40px rgba(0,0,0,.5); }
.results:empty { display: none; }
.results button { display: block; width: 100%; text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.results button:hover { background: rgba(255,255,255,.06); }
.results small { display: block; color: var(--muted); font-size: .78rem; }
.results p { padding: 10px 14px; margin: 0; }
.ex-tools { position: absolute; right: 12px; top: calc(170px + var(--safe-t)); display: flex; flex-direction: column; gap: 8px; z-index: 3; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 4; max-height: 44%; overflow-y: auto; overscroll-behavior: contain;
  background: rgba(13, 27, 41, .96); backdrop-filter: blur(16px); border-radius: 26px 26px 0 0; border-top: 1px solid var(--line);
  padding: 8px 18px 22px; transition: max-height .35s cubic-bezier(.2,.8,.2,1);
  box-shadow: 0 -18px 40px rgba(0,0,0,.4);
}
.sheet.full { max-height: 82%; }
.grab { width: 100%; height: 22px; display: grid; place-items: center; cursor: pointer; position: sticky; top: -8px; background: inherit; }
.grab::before { content: ''; width: 46px; height: 5px; border-radius: 9px; background: rgba(255,255,255,.25); }
@media (min-width: 900px) {
  .sheet { left: auto; top: 12px; right: 12px; bottom: 12px; width: 400px; max-height: none; border-radius: 24px; border: 1px solid var(--line); top: calc(70px + var(--safe-t)); }
  .sheet.full { max-height: none; }
  .grab { display: none; }
  .ex-tools { right: 424px; top: calc(80px + var(--safe-t)); }
}
.sh-head { display: flex; gap: 12px; align-items: center; margin: 4px 0 10px; }
.sh-head h2 { margin: 0; font-size: 1.5rem; }
.sh-head p { margin: 0; }
.sh-num { width: 48px; height: 48px; border-radius: 15px; background: var(--rc); color: #0b1622; display: grid; place-items: center; font: 800 1.4rem var(--display); flex: none; }
.sheet h4 { margin: 16px 0 8px; color: var(--yellow); }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0; }
.facts div { background: rgba(255,255,255,.05); border-radius: 14px; padding: 10px; }
.facts small { display: block; color: var(--muted); font-size: .72rem; }
.facts b { font-size: .92rem; }
.natural { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0; }
.natural div { padding: 10px; background: rgba(255,255,255,.05); border-radius: 14px; }
.natural small { display: block; color: var(--muted); font-size: .78rem; line-height: 1.3; }
.reg-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.reg-list button { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; background: rgba(255,255,255,.05); font-weight: 600; text-align: left; }
.reg-list i { font-style: normal; width: 28px; height: 28px; border-radius: 9px; background: var(--rc); color: #0b1622; display: grid; place-items: center; font-weight: 800; }
.howto { margin-top: 12px; background: rgba(255,255,255,.04); border-radius: 14px; padding: 10px 14px; }
.howto summary { cursor: pointer; font-weight: 600; }
.howto p { margin: 8px 0 0; color: var(--muted); font-size: .9rem; }
.note { font-size: .85rem; padding: 10px 12px; border-radius: 12px; background: rgba(252, 209, 22, .1); border: 1px solid rgba(252, 209, 22, .3); }

/* ---------- Partie ---------- */
body.in-game .topbar, body.in-game .tabbar { display: none; }
body.in-game .view { padding-top: calc(10px + var(--safe-t)); padding-bottom: 20px; }
.game { display: flex; flex-direction: column; min-height: calc(100dvh - 40px); }
.g-top { display: flex; align-items: center; gap: 12px; }
.g-prog { flex: 1; display: flex; gap: 4px; }
.g-prog i { flex: 1; height: 8px; border-radius: 9px; background: rgba(255,255,255,.12); transition: background .3s; }
.g-prog i.cur { background: rgba(255,255,255,.45); }
.g-prog i.ok { background: var(--ok); }
.g-prog i.bad { background: var(--bad); }
.g-score { text-align: right; min-width: 64px; }
.g-score b { font: 800 1.4rem var(--display); display: block; line-height: 1; }
.g-score small { color: var(--muted); font-size: .7rem; }
.g-score.bump b { animation: bump .4s; }
@keyframes bump { 40% { transform: scale(1.35); color: var(--yellow); } }
.g-meta { display: flex; justify-content: space-between; align-items: center; margin: 10px 2px; min-height: 26px; }
.g-title { color: var(--muted); font-size: .85rem; font-weight: 600; }
.combo { font-weight: 800; color: var(--yellow); animation: bump .4s; }
.g-stage { flex: 1; display: flex; flex-direction: column; gap: 14px; }
.q-card { background: linear-gradient(160deg, rgba(255,255,255,.1), rgba(255,255,255,.03)); border: 1px solid var(--line); border-radius: 24px; padding: 18px 18px 20px; position: relative; overflow: hidden; }
.q-num { color: var(--muted); font-size: .8rem; font-weight: 600; margin: 8px 0 6px; }
.q-text { font-size: clamp(1.3rem, 5vw, 1.7rem); margin: 0; }
.q-card .muted { margin: 6px 0 0; }
.timer { height: 6px; border-radius: 9px; background: rgba(255,255,255,.1); overflow: hidden; }
.timer i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--green-2), var(--yellow)); border-radius: inherit; }
.timer i.low { background: var(--bad); }
.timer.big { height: 10px; margin: 14px 0; }
.options { display: grid; gap: 10px; }
@media (min-width: 640px) { .options { grid-template-columns: 1fr 1fr; } }
.opt {
  display: flex; align-items: center; gap: 12px; text-align: left; padding: 16px; border-radius: 18px; font-weight: 600; font-size: 1.05rem;
  background: var(--card-2); border: 2px solid var(--line); box-shadow: inset 0 -4px 0 rgba(0,0,0,.2);
  animation: rise .4s both; animation-delay: var(--d);
  transition: transform .12s, background .2s, border-color .2s;
}
.opt:hover:not(:disabled) { border-color: rgba(255,255,255,.35); transform: translateY(-2px); }
.opt:active:not(:disabled) { transform: scale(.98); }
.opt kbd { flex: none; }
.opt.right { background: rgba(34, 197, 122, .22); border-color: var(--ok); }
.opt.right kbd { background: var(--ok); color: #fff; }
.opt.wrong { background: rgba(255, 90, 95, .2); border-color: var(--bad); animation: shake .4s; }
.opt:disabled:not(.right):not(.wrong) { opacity: .5; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.pop { animation: pop .35s cubic-bezier(.2,1.4,.4,1) both; }
@keyframes pop { from { opacity: 0; transform: scale(.94); } }
.g-map { flex: 1; min-height: 340px; border-radius: 24px; overflow: hidden; background: radial-gradient(circle at 50% 40%, #13314a, #08131e 75%); border: 1px solid var(--line); }

.feedback {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; max-width: 760px; margin: 0 auto;
  padding: 18px 18px calc(18px + var(--safe-b)); border-radius: 26px 26px 0 0;
  background: #0f2131; border-top: 3px solid var(--line); box-shadow: 0 -20px 40px rgba(0,0,0,.45);
  transform: translateY(110%); transition: transform .35s cubic-bezier(.2,.9,.25,1); max-height: 70dvh; overflow-y: auto;
}
.feedback.show { transform: none; }
.feedback.ok { border-top-color: var(--ok); }
.feedback.bad { border-top-color: var(--bad); }
.fb-head { display: flex; align-items: center; gap: 10px; font: 800 1.35rem var(--display); }
.fb-ic { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-size: 1.1rem; }
.ok .fb-ic { background: var(--ok); }
.bad .fb-ic { background: var(--bad); }
.ok .fb-head b { color: var(--ok); }
.bad .fb-head b { color: var(--bad); }
.gain { margin-left: auto; color: var(--yellow); }
.fb-answer { margin: 8px 0 4px; }
.fb-explain { color: var(--muted); margin: 6px 0 0; }
.fb-map { height: 180px; border-radius: 16px; overflow: hidden; margin-top: 10px; background: #08131e; }

/* Blitz */
.blitz-clock { flex: 1; text-align: center; font: 800 2.4rem var(--display); }
.blitz-clock small { font-size: 1rem; color: var(--muted); }
.blitz-card { min-height: 200px; display: grid; place-items: center; text-align: center; padding: 24px; border-radius: 26px; background: linear-gradient(160deg, rgba(255,255,255,.1), rgba(255,255,255,.03)); border: 1px solid var(--line); font: 700 clamp(1.3rem, 5vw, 1.7rem)/1.25 var(--display); }
.blitz-card p { margin: 0; }
.blitz-card.in { animation: pop .3s both; }
.blitz-card.flash-ok { box-shadow: 0 0 0 3px var(--ok), 0 0 40px rgba(34, 197, 122, .4); }
.blitz-card.flash-bad { box-shadow: 0 0 0 3px var(--bad), 0 0 40px rgba(255, 90, 95, .4); }
#bExplain { min-height: 1.5em; margin: 12px 0; }
.tf { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: auto; }
.tf-btn { padding: 22px 10px; border-radius: 22px; font: 800 2rem var(--display); display: flex; flex-direction: column; align-items: center; color: #fff; box-shadow: inset 0 -6px 0 rgba(0,0,0,.2); transition: transform .1s; }
.tf-btn small { font: 700 .95rem var(--font); }
.tf-btn:active { transform: scale(.96); }
.tf-btn.no { background: linear-gradient(145deg, #d6283a, #ff5a5f); }
.tf-btn.yes { background: linear-gradient(145deg, #00845a, #22c57a); }

/* Résultats */
.results { position: relative; text-align: center; padding-top: 30px; }
.results h1 { font-size: 2.4rem; }
#confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 40; }
.big-stars { display: flex; justify-content: center; gap: 10px; margin: 10px 0 18px; }
.bstar { font-size: 4rem; color: var(--yellow); text-shadow: 0 0 24px rgba(252, 209, 22, .6); animation: starIn .6s cubic-bezier(.2,1.6,.4,1) both; animation-delay: var(--d); }
.bstar:nth-child(2) { transform: translateY(-14px); font-size: 4.8rem; }
@keyframes starIn { from { opacity: 0; transform: scale(0) rotate(-90deg); } }
.res-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0; }
.res-grid div { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 14px; }
.res-grid small { display: block; color: var(--muted); font-size: .8rem; }
.res-grid b { font: 800 1.8rem var(--display); }
.res-grid em { display: block; color: var(--yellow); font-style: normal; font-weight: 700; font-size: .8rem; }
.levelup, .badge-won { margin: 10px 0; padding: 12px 16px; border-radius: 16px; background: rgba(252, 209, 22, .12); border: 1px solid rgba(252, 209, 22, .35); animation: pop .5s .6s both; }
.badge-won { display: flex; align-items: center; gap: 12px; text-align: left; }
.badge-won > span { font-size: 2rem; }
.badge-won small { display: block; color: var(--muted); }
.stamp-won { margin: 14px 0; animation: pop .5s .9s both; }
.stamp-won .stamp { margin: 0 auto 6px; animation: stampIn .5s 1s both; }
@keyframes stampIn { from { transform: scale(2.4) rotate(-20deg); opacity: 0; } }

/* ---------- Passeport ---------- */
.passport { background: linear-gradient(160deg, #0f3b2c, #0b1f2b); border: 1px solid rgba(43, 212, 138, .3); border-radius: 26px; padding: 18px; }
.pp-cover { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.pp-cover small { display: block; letter-spacing: .14em; color: var(--yellow); font-size: .7rem; font-weight: 700; }
.pp-cover b { font: 800 1.3rem var(--display); display: block; }
.pp-cover em { font-style: normal; color: var(--muted); font-size: .85rem; }
.pp-cover > div { flex: 1; }
.pp-flag { display: inline-flex; width: 42px; height: 30px; border-radius: 6px; overflow: hidden; flex: none; box-shadow: 0 4px 10px rgba(0,0,0,.3); }
.pp-flag i { flex: 1; }
.pp-flag i:nth-child(1) { background: var(--red); }
.pp-flag i:nth-child(2) { background: var(--yellow); }
.pp-flag i:nth-child(3) { background: var(--green); }
.stamps { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 12px; }
.stamp {
  aspect-ratio: 1; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  border: 3px dashed rgba(255,255,255,.18); color: rgba(255,255,255,.3); font-size: 1.8rem; width: 100%; max-width: 120px; margin: 0 auto;
}
.stamp b { font: 800 .85rem var(--display); }
.stamp small { font-size: .62rem; letter-spacing: .06em; }
.stamp.got, .stamp-won .stamp { border: 3px double var(--rc); color: var(--rc); background: color-mix(in srgb, var(--rc) 14%, transparent); transform: rotate(var(--rot, -6deg)); box-shadow: inset 0 0 0 5px color-mix(in srgb, var(--rc) 25%, transparent); }
.stamp-won .stamp { width: 120px; height: 120px; }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.badge { padding: 14px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); text-align: center; opacity: .45; filter: grayscale(1); }
.badge.got { opacity: 1; filter: none; border-color: rgba(252, 209, 22, .4); background: linear-gradient(160deg, rgba(252, 209, 22, .12), var(--card)); }
.badge span { font-size: 2rem; display: block; }
.badge b { display: block; }
.badge small { color: var(--muted); font-size: .78rem; line-height: 1.3; display: block; }

/* ---------- Profil ---------- */
.profile-card { display: flex; align-items: center; gap: 14px; }
.profile-card h2 { margin: 0; }
.profile-card p { margin: 0; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.stats div { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px 6px; text-align: center; }
.stats b { font: 800 1.3rem var(--display); display: block; }
.stats small { color: var(--muted); font-size: .72rem; }
.settings { display: grid; gap: 4px; }
.switch { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; cursor: pointer; border-bottom: 1px solid var(--line); }
.switch input { display: none; }
.switch i { width: 48px; height: 28px; border-radius: 99px; background: rgba(255,255,255,.15); position: relative; transition: background .2s; }
.switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch input:checked + i { background: var(--green); }
.switch input:checked + i::after { transform: translateX(20px); }

/* ---------- Barre d’onglets ---------- */
.tabbar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(10px + var(--safe-b)); z-index: 25;
  width: min(560px, calc(100% - 20px)); height: var(--tab-h);
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
  background: rgba(13, 27, 41, .88); backdrop-filter: blur(16px); border: 1px solid var(--line); border-radius: 26px;
  box-shadow: 0 16px 40px rgba(0,0,0,.45);
}
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--muted); text-decoration: none; font-size: .7rem; font-weight: 600; transition: color .2s, transform .2s; }
.tabbar a span { font-size: 1.35rem; transition: transform .2s; }
.tabbar a.active { color: #fff; }
.tabbar a.active span { transform: translateY(-2px) scale(1.12); }
.tab-main span { width: 54px; height: 54px; margin-top: -30px; border-radius: 18px; display: grid; place-items: center; background: linear-gradient(145deg, var(--red), #ff6b3d); box-shadow: 0 10px 22px rgba(206, 17, 38, .45), inset 0 -4px 0 rgba(0,0,0,.2); }
.tab-main.active span { transform: translateY(-2px) scale(1.05); }

/* ---------- Modale & toast ---------- */
.modal-wrap { position: fixed; inset: 0; z-index: 50; display: none; align-items: center; justify-content: center; padding: 16px; background: rgba(3, 8, 14, .7); backdrop-filter: blur(6px); }
.modal-wrap.show { display: flex; }
.modal-card { width: min(460px, 100%); max-height: 90dvh; overflow-y: auto; background: #10233a; border: 1px solid var(--line); border-radius: 26px; padding: 22px; box-shadow: 0 30px 60px rgba(0,0,0,.5); }
.modal-card h2 { font-size: 1.6rem; }
.theme-list { display: grid; gap: 8px; }
.theme { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: rgba(255,255,255,.06); text-align: left; font-size: 1.5rem; }
.theme:hover { background: rgba(255,255,255,.12); }
.theme b { display: block; font-size: 1rem; }
.theme small { color: var(--muted); font-size: .82rem; }
.onb { text-align: center; }
.onb-logo { margin: 4px 0 10px; }
.onb-logo .pp-flag { width: 64px; height: 44px; }
.field { display: block; text-align: left; margin: 16px 0 8px; }
.field span, .field-label { display: block; font-size: .85rem; color: var(--muted); margin-bottom: 6px; text-align: left; }
.field input { width: 100%; padding: 13px 16px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255,255,255,.06); outline: none; }
.field input:focus { border-color: var(--green-2); }
.avatars { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.av { aspect-ratio: 1; font-size: 1.6rem; border-radius: 14px; background: rgba(255,255,255,.06); border: 2px solid transparent; transition: transform .15s; }
.av.sel { border-color: var(--green-2); background: rgba(43, 212, 138, .15); transform: scale(1.06); }
.ios-steps { padding-left: 20px; line-height: 1.8; }
.toast { position: fixed; left: 50%; bottom: calc(var(--tab-h) + 26px + var(--safe-b)); transform: translate(-50%, 30px); opacity: 0; z-index: 60; padding: 12px 18px; border-radius: 14px; background: #fff; color: #0b1622; font-weight: 600; transition: all .3s; pointer-events: none; max-width: calc(100% - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* =========================================================
   Portail de jeux (v2)
   ========================================================= */
.view.wide { max-width: 1240px; }
.brand { display: none; align-items: center; gap: 10px; text-decoration: none; color: var(--text); flex: none; }
.brand .pp-flag { width: 34px; height: 24px; }
.brand b { font: 800 1.35rem var(--display); letter-spacing: -.02em; }
.brand b span { color: var(--yellow); margin-left: 3px; }
.tb-search { flex: 1; display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px; border-radius: 14px; background: rgba(255,255,255,.07); border: 1px solid var(--line); color: var(--muted); text-align: left; min-width: 44px; max-width: 520px; transition: background .2s, border-color .2s; }
.tb-search:hover { background: rgba(255,255,255,.11); border-color: rgba(255,255,255,.2); }
.tb-search em { font-style: normal; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; font-size: .9rem; }
.tb-player .tb-xp-bar { display: block; width: 100%; height: 5px; margin-top: 3px; }
.topbar { max-width: 1240px; }
.tb-xp { display: none; }
@media (max-width: 640px) {
  .tb-search { flex: 0 0 44px; padding: 0; justify-content: center; }
  .tb-search em, .tb-search kbd { display: none; }
  .tb-player { flex: 1; }
}

/* Barre latérale (bureau), inspirée des grands portails */
@media (min-width: 1000px) {
  :root { --side: 92px; }
  .brand { display: flex; }
  .topbar { padding-left: calc(var(--side) + 20px); max-width: none; }
  .view { margin-left: var(--side); padding-bottom: 40px; }
  .view.wide { margin-left: calc(var(--side) + max(0px, (100vw - var(--side) - 1240px) / 2)); }
  .view:not(.wide) { margin-left: calc(var(--side) + max(0px, (100vw - var(--side) - 760px) / 2)); }
  .tabbar {
    left: 0; top: 0; bottom: 0; transform: none; width: var(--side); height: auto; border-radius: 0; border-width: 0 1px 0 0;
    grid-template-columns: 1fr; grid-auto-rows: 78px; align-content: start; padding-top: 86px; box-shadow: none; background: rgba(9, 19, 30, .92);
  }
  .tabbar a { padding: 8px 0; border-radius: 16px; margin: 0 10px; }
  .tabbar a:hover { background: rgba(255,255,255,.06); color: #fff; }
  .tabbar a.active { background: rgba(255,255,255,.08); }
  .tab-main span { width: 44px; height: 44px; margin-top: 0; border-radius: 14px; }
  body.in-explore .explore { left: var(--side); bottom: 0; }
  body.in-explore .topbar { padding-left: calc(var(--side) + 20px); }
  .toast { bottom: 30px; }
}

/* Mot d’accueil */
.welcome { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin: 6px 0 16px; }
.welcome h1 { font-size: clamp(1.8rem, 5vw, 2.6rem); margin: 0; }
.w-stats { display: flex; gap: 8px; }
.w-stats div { padding: 8px 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); text-align: center; }
.w-stats b { display: block; font: 800 1.2rem var(--display); line-height: 1; }
.w-stats small { color: var(--muted); font-size: .7rem; }
@media (max-width: 640px) { .w-stats { width: 100%; } .w-stats div { flex: 1; padding: 8px 4px; } }

/* Tuiles de jeu */
.tile { position: relative; display: block; border-radius: 18px; overflow: hidden; aspect-ratio: 4 / 3; background: #13263a;
  box-shadow: 0 10px 24px -12px rgba(0,0,0,.7); transition: transform .22s cubic-bezier(.2,.9,.3,1.3), box-shadow .22s; isolation: isolate; }
.tile .thumb { width: 100%; height: 100%; display: block; transition: transform .4s; }
.tile:hover { transform: translateY(-4px) scale(1.025); box-shadow: 0 18px 34px -12px rgba(0,0,0,.8), 0 0 0 3px rgba(255,255,255,.85); z-index: 2; }
.tile:hover .thumb { transform: scale(1.07); }
.tile:active { transform: scale(.98); }
.t-badge { position: absolute; top: 10px; left: 10px; padding: 3px 9px; border-radius: 8px; background: var(--yellow); color: #1b1300; font: 800 .68rem var(--font); letter-spacing: .06em; box-shadow: 0 4px 10px rgba(0,0,0,.3); }
.t-done { position: absolute; top: 10px; right: 10px; padding: 3px 9px; border-radius: 8px; background: var(--ok); color: #fff; font-weight: 800; font-size: .7rem; }
.t-best { position: absolute; bottom: 8px; right: 8px; padding: 3px 8px; border-radius: 8px; background: rgba(6, 12, 20, .78); font-size: .72rem; font-weight: 700; backdrop-filter: blur(6px); }
.t-hover { position: absolute; inset: 0; background: rgba(4, 10, 18, .25); opacity: 0; transition: opacity .25s; }
.t-hover b { font: 800 1.15rem var(--display); }
.t-hover small { color: #c9d6e3; font-size: .8rem; }
.t-play { position: absolute; top: 50%; left: 50%; width: 58px; height: 58px; margin: -40px 0 0 -29px; border-radius: 50%; display: grid; place-items: center;
  background: #fff; color: #0b1622; font-size: 1.4rem; padding-left: 4px; box-shadow: 0 8px 20px rgba(0,0,0,.4); transform: scale(.6); transition: transform .25s cubic-bezier(.2,1.6,.4,1); }
@media (hover: hover) { .tile:hover .t-hover { opacity: 1; } .tile:hover .t-play { transform: scale(1); } }

/* Mosaïque d’ouverture (style Poki) */
.mosaic { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
.mosaic .big { grid-column: span 2; }
.mosaic .wide { grid-column: span 2; aspect-ratio: auto; }
.mosaic .wide .thumb { aspect-ratio: 2 / 1; object-fit: cover; }
@media (min-width: 760px) {
  .mosaic { grid-template-columns: repeat(4, 1fr); grid-auto-rows: clamp(150px, 15vw, 200px); }
  .mosaic .big { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
  .mosaic .wide { grid-column: span 2; }
  .mosaic .tile { aspect-ratio: auto; min-height: 150px; }
  .mosaic .tile .thumb { height: 100%; }
}
.mosaic .thumb { object-fit: cover; }
@media (max-width: 759px) { .mosaic .hide-sm { display: none; } }
.mosaic .tile svg { width: 100%; height: 100%; }
.mosaic .tile svg.thumb { display: block; }
.t-title { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 12px 10px; text-align: left; display: flex; flex-direction: column;
  background: linear-gradient(transparent, rgba(4, 10, 18, .88)); pointer-events: none; }
.t-title b { font: 800 1.1rem/1.1 var(--display); text-shadow: 0 2px 6px rgba(0,0,0,.5); }
.t-title small { color: #c9d6e3; font-size: .76rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mosaic .big .t-title b { font-size: clamp(1.5rem, 3vw, 2.2rem); }
.mosaic .big .t-title { padding: 40px 18px 16px; }
.mosaic .big .t-hover { opacity: 1; background: none; }
.mosaic .big .t-play { transform: scale(1.15); }
.t-best { bottom: auto; top: 10px; right: 10px; }


/* Humeurs / catégories (style CrazyGames) */
.moods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 18px 0 6px; }
@media (min-width: 900px) { .moods { grid-template-columns: repeat(6, 1fr); } }
.mood { display: flex; flex-direction: column; justify-content: space-between; gap: 6px; min-height: 84px; padding: 12px; border-radius: 16px; text-align: left; position: relative; overflow: hidden;
  background: linear-gradient(145deg, color-mix(in srgb, var(--mc) 55%, #13263a), #13263a); border: 1px solid rgba(255,255,255,.08); transition: transform .2s, border-color .2s; }
.mood span { font-size: 1.7rem; align-self: flex-end; filter: drop-shadow(0 4px 6px rgba(0,0,0,.3)); }
.mood b { font-size: .88rem; line-height: 1.15; }
.mood:hover, .mood.on { transform: translateY(-2px); border-color: rgba(255,255,255,.5); }
.moods.small { grid-template-columns: none; display: flex; overflow-x: auto; scrollbar-width: none; margin: 10px -16px 16px; padding: 0 16px; }
.moods.small .mood { min-height: 0; flex-direction: row; align-items: center; flex: none; padding: 8px 14px; border-radius: 99px; }
.moods.small .mood span { font-size: 1.1rem; }

/* Étagères horizontales */
.shelf { margin: 26px 0 0; }
.shelf-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.shelf-head h2 { font-size: 1.3rem; margin: 0; }
.shelf-head a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: .9rem; }
.shelf-head a:hover { color: #fff; }
.shelf-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 1fr); gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px 16px 14px; margin: -6px -16px 0; scrollbar-width: none; }
.shelf-row::-webkit-scrollbar { display: none; }
.shelf-row .tile { scroll-snap-align: start; }
@media (max-width: 640px) { .shelf-row { grid-auto-columns: 62%; } }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
@media (max-width: 640px) { .grid { grid-template-columns: 1fr 1fr; gap: 10px; } }
.foot { text-align: center; margin: 30px 0 10px; }
.cat-hero { display: flex; align-items: center; gap: 16px; padding: 22px; border-radius: 24px; background: linear-gradient(135deg, var(--mc), #13263a 80%); margin-bottom: 4px; }
.cat-hero > span { font-size: 3rem; }
.cat-hero h1 { margin: 0; font-size: 2rem; }

/* Page de lancement */
.lobby { display: grid; gap: 20px; align-items: start; }
@media (min-width: 860px) { .lobby { grid-template-columns: 1.15fr 1fr; } }
.lb-art { position: relative; border-radius: 24px; overflow: hidden; box-shadow: 0 24px 50px -20px rgba(0,0,0,.8); }
.lb-art .thumb { display: block; width: 100%; height: auto; }
.lb-info h1 { font-size: clamp(2rem, 6vw, 2.8rem); margin: 8px 0 2px; }
.lb-cats { display: flex; gap: 6px; flex-wrap: wrap; }
.lb-cats .chip { text-decoration: none; color: var(--text); font-size: .8rem; }
.how { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 6px; }
.how li { padding-left: 28px; position: relative; }
.how li::before { content: '✓'; position: absolute; left: 0; width: 20px; height: 20px; border-radius: 50%; background: rgba(34,197,122,.2); color: var(--ok); display: grid; place-items: center; font-size: .75rem; font-weight: 800; top: 2px; }
.lb-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0; }
.lb-stats div { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.lb-stats small { display: block; color: var(--muted); font-size: .75rem; }
.lb-stats b { font: 800 1.2rem var(--display); }
.lb-opts h4 { margin: 12px 0 8px; color: var(--yellow); }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; padding: 5px; border-radius: 16px; background: rgba(255,255,255,.05); border: 1px solid var(--line); }
.seg[data-opt="theme"] { grid-auto-flow: row; grid-template-columns: 1fr 1fr; }
.seg button { padding: 10px 8px; border-radius: 12px; display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; transition: background .2s; }
.seg button small { color: var(--muted); font-size: .7rem; line-height: 1.2; }
.seg button.on { background: #fff; color: #0b1622; box-shadow: 0 4px 12px rgba(0,0,0,.3); }
.seg button.on small { color: #47596b; }
.select { width: 100%; padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.07); border: 1px solid var(--line); color: var(--text); font: inherit; }
.select option { background: #10233a; }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.duo .field { margin: 0; }
.btn.play { width: 100%; margin-top: 18px; padding: 18px; font: 800 1.35rem var(--display); letter-spacing: .04em; border-radius: 18px; color: #032;
  background: linear-gradient(135deg, #36e39a, var(--green)); box-shadow: 0 12px 30px rgba(0, 148, 96, .45), inset 0 -5px 0 rgba(0,0,0,.2); animation: glowPulse 2.4s ease-in-out infinite; }
@keyframes glowPulse { 50% { box-shadow: 0 12px 40px rgba(43, 212, 138, .7), inset 0 -5px 0 rgba(0,0,0,.2); } }

/* Recherche */
.search-modal input { width: 100%; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255,255,255,.07); outline: none; font-size: 1.05rem; }
.search-modal input:focus { border-color: var(--green-2); }
.s-list { margin-top: 10px; display: grid; gap: 4px; max-height: 60dvh; overflow-y: auto; }
.s-list button { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; text-align: left; padding: 10px 12px; border-radius: 12px; }
.s-list button:hover, .s-list button:focus { background: rgba(255,255,255,.07); outline: none; }
.s-list span { grid-row: span 2; font-size: .72rem; color: var(--muted); align-self: center; width: 92px; }
.s-list small { color: var(--muted); font-size: .8rem; }
.modal-card:has(.search-modal) { width: min(620px, 100%); align-self: flex-start; margin-top: 8vh; }

/* Résultats communs */
.score-hero { margin: 0 0 8px; }
.score-hero b { font: 800 clamp(2.4rem, 10vw, 3.4rem) var(--display); background: linear-gradient(90deg, var(--yellow), #fff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.score-hero em, .score-hero small { display: block; font-style: normal; font-weight: 700; }
.score-hero em { color: var(--yellow); }
.score-hero small { color: var(--muted); }
.res-grid { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.res-grid b { font-size: 1.4rem; }

/* En-tête de jeu commun */
.g-center { flex: 1; display: flex; justify-content: center; }
.g-round { font-weight: 700; color: var(--muted); }
.blitz-clock.small { font-size: 1.8rem; }
.game { max-width: 820px; margin: 0 auto; }

/* GuinéeGuessr */
.guessr .gz-prompt { margin: 10px 0; padding: 14px 18px; }
.guessr .gz-prompt .q-num { margin: 0; }
.gz-map { position: relative; flex: 1; min-height: 380px; border-radius: 22px; overflow: hidden; background: radial-gradient(circle at 50% 40%, #1a4466, #08131e 80%); border: 1px solid var(--line); }
.gz-cursor { cursor: crosshair; }
.gz-help { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); padding: 6px 14px; border-radius: 99px; background: rgba(6,12,20,.8); font-size: .85rem; font-weight: 600; pointer-events: none; transition: opacity .3s; z-index: 2; white-space: nowrap; }
.gz-help.hide { opacity: 0; }
.gz-bar { position: sticky; bottom: 0; padding: 12px 0 calc(6px + var(--safe-b)); background: linear-gradient(transparent, var(--bg) 30%); }
.gz-bar .btn.full { margin-top: 0; }
.gz-result { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 12px 16px; border-radius: 18px; background: var(--card-2); border: 1px solid var(--line); animation: pop .4s both; }
.gz-result small { display: block; color: var(--muted); font-size: .72rem; }
.gz-result b { font: 800 1.4rem var(--display); }
.gz-meter { height: 30px; border-radius: 99px; background: rgba(255,255,255,.08); position: relative; overflow: hidden; }
.gz-meter i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #ff5a5f, var(--yellow), var(--ok)); border-radius: inherit; animation: grow 1s cubic-bezier(.2,.8,.2,1) both; }
.gz-meter span { position: relative; display: grid; place-items: center; height: 100%; font-weight: 700; font-size: .8rem; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
@keyframes grow { from { width: 0; } }
.gz-result + p { margin: 8px 0 0; }
.gz-line { animation: dash 1s linear both; }

/* Préfecture mystère */
.my-map { height: 260px; border-radius: 22px; overflow: hidden; margin: 12px 0; background: radial-gradient(circle at 50% 40%, #241a52, #0a0f1f 80%); border: 1px solid var(--line); }
.my-input { position: relative; }
.my-input input { width: 100%; padding: 15px 18px; border-radius: 16px; border: 2px solid rgba(123, 77, 255, .5); background: rgba(255,255,255,.06); font-size: 1.05rem; outline: none; }
.my-input input:focus { border-color: #a685ff; }
.my-input .results { z-index: 5; }
.my-input .results button.sel { background: rgba(123, 77, 255, .25); }
.my-head, .my-row { display: grid; grid-template-columns: 1.6fr .9fr .5fr 1.2fr; gap: 8px; align-items: center; }
.my-head { margin: 14px 4px 6px; color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; }
.my-rows { display: grid; gap: 6px; }
.my-row { padding: 10px 12px; border-radius: 14px; background: var(--card-2); border: 1px solid var(--line); font-weight: 600; }
.my-row.flip { animation: flipIn .5s both; }
@keyframes flipIn { from { transform: rotateX(90deg); opacity: 0; } }
.my-name i { display: inline-block; font-style: normal; font-size: .65rem; padding: 1px 6px; border-radius: 6px; background: rgba(34,197,122,.2); color: var(--ok); vertical-align: middle; }
.my-dir { font-size: 1.3rem; text-align: center; }
.my-prox { position: relative; height: 26px; border-radius: 9px; background: rgba(255,255,255,.08); overflow: hidden; }
.my-prox i { position: absolute; inset: 0 auto 0 0; background: var(--c); animation: grow .8s both; }
.my-prox b { position: relative; display: grid; place-items: center; height: 100%; font-size: .82rem; text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.my-end { text-align: center; margin-top: 16px; }
.my-end.win { border-color: var(--ok); background: linear-gradient(160deg, rgba(34,197,122,.15), var(--card)); }
.my-end h2 { font-size: 2rem; }

/* Rush */
.ru-prompt { text-align: center; margin: 8px 0 10px; }
.ru-prompt small { display: block; color: var(--muted); font-weight: 600; }
.ru-prompt b { display: inline-block; font: 800 clamp(1.8rem, 7vw, 2.4rem) var(--display); color: var(--yellow); }
.ru-prompt .combo { display: block; min-height: 1.3em; }
.ru-map, .li-map { flex: 1; min-height: 360px; border-radius: 22px; overflow: hidden; background: radial-gradient(circle at 50% 40%, #13314a, #08131e 75%); border: 1px solid var(--line); }

/* Chrono-Liste */
.li-input input { width: 100%; padding: 15px 18px; border-radius: 16px; border: 2px solid rgba(43, 212, 138, .5); background: rgba(255,255,255,.06); font-size: 1.1rem; outline: none; margin-bottom: 10px; }
.li-input input:focus { border-color: var(--green-2); }
.li-map { min-height: 300px; }
.li-found { margin: 12px 0; }
.chip.ok { background: rgba(34,197,122,.2); border-color: var(--ok); }
.chip.bad { background: rgba(255,90,95,.18); border-color: var(--bad); }
.gm-filled { transition: fill .4s; }

/* Puzzle */
.pz-board { border-radius: 22px; overflow: hidden; background: radial-gradient(circle at 50% 45%, #1b3a57, #08131e 80%); border: 1px solid var(--line); touch-action: none; }
.pz-board svg { display: block; width: 100%; height: auto; max-height: calc(100dvh - 160px); touch-action: none; user-select: none; }
.pz-slots path { fill: rgba(255,255,255,.06); stroke: rgba(255,255,255,.35); stroke-width: 2.5; stroke-dasharray: 8 6; }
.pz-piece { cursor: grab; filter: url(#pz-sh); }
.pz-piece path { stroke: #fff; stroke-width: 3; }
.pz-piece.drag { cursor: grabbing; }
.pz-piece.drag path { stroke-width: 5; }
.pz-piece.done { filter: none; cursor: default; pointer-events: none; animation: snap .45s; }
.pz-piece.done path { stroke: rgba(8,18,28,.6); stroke-width: 2; }
@keyframes snap { 40% { opacity: .6; } }
.pz-label { font-family: var(--display); font-weight: 800; fill: #fff; paint-order: stroke; stroke: rgba(6,14,22,.8); stroke-width: 8px; text-anchor: middle; dominant-baseline: middle; pointer-events: none; }

/* Memory */
.mm-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; perspective: 900px; max-width: 620px; margin: 6px auto 0; width: 100%; }
.mm-card { aspect-ratio: 3 / 4; animation: rise .4s both; animation-delay: var(--d); }
.mm-inner { position: relative; display: block; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .45s cubic-bezier(.2,.8,.3,1.2); }
.mm-card.flipped .mm-inner { transform: rotateY(180deg); }
.mm-back, .mm-front { position: absolute; inset: 0; border-radius: 14px; backface-visibility: hidden; -webkit-backface-visibility: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 6px; text-align: center; }
.mm-back { background: linear-gradient(145deg, #4c2a85, #a06cff); border: 3px solid rgba(255,255,255,.25); box-shadow: inset 0 -5px 0 rgba(0,0,0,.2); }
.mm-back .pp-flag { width: 40%; height: auto; aspect-ratio: 3 / 2; }
.mm-front { transform: rotateY(180deg); background: #f4f0ff; color: #1a1033; border: 3px solid #fff; }
.mm-front.reg { background: var(--rc); color: #0b1622; }
.mm-front b { font: 800 clamp(.72rem, 2.6vw, 1rem)/1.1 var(--display); word-break: break-word; }
.mm-front small { font-size: .6rem; opacity: .7; }
.mc-ic { font-size: clamp(1.2rem, 5vw, 1.8rem); }
.mm-card.matched .mm-front { box-shadow: 0 0 0 3px var(--ok), 0 0 24px rgba(34,197,122,.6); animation: bump .5s; }

/* Duel */
.duel { position: fixed; inset: 0; z-index: 30; display: grid; grid-template-rows: 1fr auto 1fr; background: var(--bg); }
.du-half { display: flex; flex-direction: column; gap: 10px; padding: 16px; position: relative; overflow: hidden; transition: background .3s; }
.du-p1 { background: linear-gradient(0deg, rgba(206,17,38,.35), rgba(206,17,38,.08)); }
.du-p2 { background: linear-gradient(0deg, rgba(0,148,96,.35), rgba(0,148,96,.08)); transform: rotate(180deg); }
.du-head { display: flex; justify-content: space-between; align-items: center; font-weight: 800; }
.du-score { font: 800 2rem var(--display); }
.du-q { font: 700 clamp(1rem, 3.6vw, 1.3rem)/1.25 var(--display); margin: 0; flex: 1; display: flex; align-items: center; }
.du-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.du-opts button { padding: 14px 8px; border-radius: 14px; background: rgba(255,255,255,.1); border: 2px solid rgba(255,255,255,.15); font-weight: 700; font-size: .95rem; box-shadow: inset 0 -4px 0 rgba(0,0,0,.2); }
.du-opts button:active { transform: scale(.97); }
.du-opts button.right { background: var(--ok); border-color: #fff; }
.du-opts button.wrong { background: var(--bad); border-color: #fff; }
.du-half.out .du-opts { opacity: .45; pointer-events: none; }
.du-half.won { box-shadow: inset 0 0 0 4px var(--yellow); }
.du-flash { position: absolute; inset: 0; display: grid; place-items: center; font: 800 3rem var(--display); background: rgba(6,12,20,.55); animation: pop .4s both; pointer-events: none; }
.du-half.lost .du-flash, .du-half.none .du-flash { font-size: 2rem; color: var(--muted); }
.du-mid { display: flex; align-items: center; gap: 12px; padding: 6px 12px; background: #08131e; border-block: 1px solid var(--line); position: relative; }
.du-mid span { flex: 1; text-align: center; font-weight: 700; color: var(--muted); }
.du-mid i { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--yellow); }
.du-final { margin: auto; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.du-final > span { font-size: 3rem; }
.du-final b { font: 800 2rem var(--display); }
.du-final em { font-style: normal; font: 800 1.4rem var(--display); color: var(--muted); }
.duel #confetti { position: fixed; }

/* Jeux plein écran : la carte occupe l’espace restant */
.game.guessr, .game.rush { height: calc(100dvh - 30px - var(--safe-t) - var(--safe-b)); min-height: 0; }
.game.guessr .gz-map, .game.rush .ru-map { min-height: 180px; flex: 1 1 0; }
.gz-bar { position: static; background: none; padding-bottom: 0; }
body.in-game .view { padding-bottom: calc(10px + var(--safe-b)); }
.pz-tray { fill: rgba(255,255,255,.04); stroke: rgba(255,255,255,.18); stroke-width: 3; stroke-dasharray: 14 10; }
.pz-board svg { margin: 0 auto; }
.pz-piece.drag { filter: url(#pz-sh) drop-shadow(0 0 12px rgba(252,209,22,.6)); }

/* =========================================================
   v3 : icônes, portefeuille GNF, culture, jeux de mots
   ========================================================= */
.ic { width: 1.25em; height: 1.25em; flex: none; vertical-align: -0.22em; }
.ic.inl { width: 1em; height: 1em; vertical-align: -0.12em; }
.btn .ic { width: 1.15em; height: 1.15em; }
.tabbar a span { display: grid; place-items: center; }
.tabbar a span .ic { width: 24px; height: 24px; }
.tab-main span .ic { color: #fff; }
.round .ic { width: 20px; height: 20px; }
.tb-search .ic { width: 20px; height: 20px; color: var(--muted); }
.tb-stars { display: flex; align-items: center; gap: 5px; }
.tb-stars .ic { width: 16px; height: 16px; fill: var(--yellow); }
.tb-wallet { display: flex; align-items: baseline; gap: 5px; padding: 7px 12px; border-radius: 99px; background: linear-gradient(135deg, rgba(252,209,22,.2), rgba(0,148,96,.2)); border: 1px solid rgba(252,209,22,.4); font-weight: 800; white-space: nowrap; }
.tb-wallet .ic { width: 17px; height: 17px; color: var(--yellow); align-self: center; }
.tb-wallet small { color: var(--yellow); font-size: .68rem; }
@media (max-width: 640px) { .tb-stars { display: none; } .tb-id small { display: none; } }
@media (max-width: 380px) { .tb-wallet small { display: none; } }

/* Avatars à initiales */
.avatar { background: linear-gradient(145deg, color-mix(in srgb, var(--av, #ce1126) 85%, #fff), var(--av, #ce1126)); color: #fff; font: 800 1rem var(--display); letter-spacing: .02em; border: 2px solid rgba(255,255,255,.15); text-shadow: 0 1px 2px rgba(0,0,0,.3); }
.avatar.xl { font-size: 1.7rem; }
.avatar.frame-bronze { box-shadow: 0 0 0 3px #cd7f32, 0 0 14px rgba(205,127,50,.5); }
.avatar.frame-argent { box-shadow: 0 0 0 3px #d9dee5, 0 0 14px rgba(217,222,229,.5); }
.avatar.frame-or { box-shadow: 0 0 0 3px #ffd43b, 0 0 18px rgba(255,212,59,.7); }
.avatar.frame-drapeau { box-shadow: 0 0 0 3px transparent; border: 3px solid transparent; background: linear-gradient(145deg, color-mix(in srgb, var(--av) 85%, #fff), var(--av)) padding-box, linear-gradient(90deg, var(--red) 33%, var(--yellow) 33% 66%, var(--green) 66%) border-box; }
.avatar.frame-diamant { box-shadow: 0 0 0 3px #7dd3fc, 0 0 22px rgba(125,211,252,.8); animation: shine 2.5s ease-in-out infinite; }
@keyframes shine { 50% { box-shadow: 0 0 0 3px #e0f2fe, 0 0 30px rgba(125,211,252,1); } }
.av { border-radius: 50%; background: var(--av); }
.av.sel { border-color: #fff; box-shadow: 0 0 0 3px var(--av); }
.onb-preview { display: flex; justify-content: center; margin: 4px 0 12px; }

/* Catégories et étagères */
.mood > span { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(255,255,255,.14); }
.mood > span .ic { width: 22px; height: 22px; }
.moods.small .mood > span { width: 26px; height: 26px; border-radius: 8px; }
.moods.small .mood > span .ic { width: 15px; height: 15px; }
.shelf-head h2 { display: flex; align-items: center; gap: 8px; }
.shelf-head h2 .ic { color: var(--yellow); }
.cat-hero > span { width: 64px; height: 64px; border-radius: 18px; background: rgba(255,255,255,.16); display: grid; place-items: center; }
.cat-hero > span .ic { width: 34px; height: 34px; }
.t-play .ic { width: 26px; height: 26px; fill: #0b1622; }
.t-best, .t-done { display: flex; align-items: center; gap: 4px; }
.t-best .ic, .t-done .ic { width: 13px; height: 13px; }
.back { display: inline-flex; align-items: center; gap: 4px; }
.chip { display: inline-flex; align-items: center; gap: 5px; }
.chip .ic { width: 14px; height: 14px; }
.chip em.new, .chips em.new { font-style: normal; font-size: .65rem; font-weight: 800; padding: 1px 6px; border-radius: 6px; background: var(--yellow); color: #1b1300; text-transform: uppercase; }
.node-disc .ic { width: 34px; height: 34px; color: #0b1622; }
.node-stamp .ic { width: 13px; height: 13px; }
.stage-ic .ic { width: 26px; height: 26px; }
.sh-num .ic { width: 24px; height: 24px; }
.fb-ic .ic { width: 20px; height: 20px; color: #fff; }
.tf-btn .ic { width: 42px; height: 42px; stroke-width: 3; }
.badge > span { display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto 6px; border-radius: 50%; background: rgba(255,255,255,.08); }
.badge > span .ic { width: 28px; height: 28px; }
.badge.got > span { background: linear-gradient(145deg, #ffe066, #e0a100); color: #3b2500; }
.badge-won > span { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(145deg, #ffe066, #e0a100); color: #3b2500; flex: none; }
.badge-won > span .ic { width: 24px; height: 24px; }
.stamp .ic { width: 30px; height: 30px; }
.levelup { display: flex; align-items: center; justify-content: center; gap: 8px; }
.pp-flag.mini { width: 18px; height: 12px; border-radius: 3px; vertical-align: -1px; display: inline-flex; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 4px; }
.dot.red { background: var(--red); } .dot.green { background: var(--green); }
.du-ic .ic { width: 54px; height: 54px; color: var(--yellow); }
.my-dir i { display: inline-grid; transition: transform .5s; }
.my-dir .ic { width: 22px; height: 22px; }
.mc-ic .ic { width: 1.6em; height: 1.6em; }
.mc-ic.num { width: 2em; height: 2em; border-radius: 50%; background: rgba(11,22,34,.85); color: #fff; display: grid; place-items: center; font: 800 1rem var(--display); }
.switch span { display: flex; align-items: center; gap: 8px; }

/* Joker 50:50 */
.joker { margin-top: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 99px; font-weight: 700; font-size: .85rem; background: rgba(252,209,22,.14); border: 1px solid rgba(252,209,22,.45); color: var(--yellow); }
.joker:hover { background: rgba(252,209,22,.24); }
.opt.gone { opacity: .15 !important; transform: scale(.96); }

/* Portefeuille */
.wallet { display: flex; align-items: center; gap: 14px; cursor: pointer; border-color: rgba(252,209,22,.35); background: linear-gradient(120deg, rgba(252,209,22,.16), rgba(0,148,96,.12) 60%, var(--card)); }
.w-ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: linear-gradient(145deg, #ffe066, #e0a100); color: #3b2500; flex: none; }
.w-ic .ic { width: 28px; height: 28px; }
.w-amount { font: 800 1.5rem var(--display); display: block; }
.w-goal { height: 6px; border-radius: 9px; background: rgba(255,255,255,.1); margin: 4px 0 2px; overflow: hidden; }
.w-goal i { display: block; height: 100%; background: linear-gradient(90deg, var(--yellow), var(--green-2)); }
.gain-card { display: flex; align-items: center; gap: 14px; text-align: left; margin: 12px 0; padding: 14px 16px; border-radius: 18px; background: linear-gradient(120deg, rgba(252,209,22,.2), rgba(0,148,96,.14)); border: 1px solid rgba(252,209,22,.45); animation: pop .5s .3s both; }
.gain-card .coin { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(145deg, #ffe066, #e0a100); color: #3b2500; flex: none; animation: spin 1.2s .3s ease-out both; }
.gain-card .coin .ic { width: 26px; height: 26px; }
@keyframes spin { from { transform: rotateY(0) scale(.6); } to { transform: rotateY(720deg) scale(1); } }
.gain-card small { display: block; color: var(--muted); font-size: .75rem; }
.gain-card b { font: 800 1.5rem var(--display); color: var(--yellow); }
.gain-card em { margin-left: auto; font-style: normal; color: var(--muted); font-size: .8rem; text-align: right; }
.burst { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 70; }
.bonus { text-align: center; }
.bonus-ic { width: 74px; height: 74px; border-radius: 22px; margin: 0 auto 10px; display: grid; place-items: center; background: linear-gradient(145deg, #ffe066, #e0a100); color: #3b2500; animation: bump 1.2s ease-in-out infinite; }
.bonus-ic .ic { width: 40px; height: 40px; }
.bonus-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; margin: 14px 0; }
.bonus-days div { padding: 8px 2px; border-radius: 10px; background: rgba(255,255,255,.06); border: 1px solid var(--line); }
.bonus-days small { display: block; font-size: .6rem; color: var(--muted); }
.bonus-days b { font-size: .85rem; }
.bonus-days .past { background: rgba(34,197,122,.2); border-color: var(--ok); }
.bonus-days .cur { background: var(--yellow); color: #1b1300; border-color: #fff; transform: scale(1.08); }
.bonus-days .cur small { color: #5a4300; }
.btn.play .ic { width: 1.1em; height: 1.1em; }

/* Boutique */
.shop-hero { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 20px; border-radius: 24px; background: linear-gradient(135deg, rgba(252,209,22,.22), rgba(0,148,96,.2)); border: 1px solid rgba(252,209,22,.35); }
.shop-hero h1 { margin: 0; font-size: clamp(1.8rem, 6vw, 2.6rem); }
.shop-hero p { margin: 0; }
.earn-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 10px 0; }
.earn-grid div { padding: 12px; border-radius: 14px; background: rgba(255,255,255,.05); }
.earn-grid .ic { color: var(--yellow); width: 24px; height: 24px; }
.earn-grid b { display: block; margin-top: 4px; }
.earn-grid small { color: var(--muted); font-size: .8rem; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.shop-item { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 16px 12px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); }
.shop-item.owned { border-color: rgba(34,197,122,.5); }
.shop-item small { color: var(--muted); font-size: .8rem; flex: 1; }
.si-ic { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.08); }
.si-ic .ic { width: 28px; height: 28px; }
.frame-demo.frame-bronze { box-shadow: 0 0 0 3px #cd7f32; color: #cd7f32; }
.frame-demo.frame-argent { box-shadow: 0 0 0 3px #d9dee5; color: #d9dee5; }
.frame-demo.frame-or { box-shadow: 0 0 0 3px #ffd43b; color: #ffd43b; }
.frame-demo.frame-drapeau { box-shadow: 0 0 0 3px var(--green); color: var(--yellow); }
.frame-demo.frame-diamant { box-shadow: 0 0 0 3px #7dd3fc; color: #7dd3fc; }

/* Encyclopédie */
.culture-promo { display: flex; align-items: center; gap: 14px; cursor: pointer; margin-top: 24px; background: linear-gradient(120deg, rgba(180,83,9,.35), var(--card) 70%); border-color: rgba(245,158,11,.35); }
.cp-ic { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: #f59e0b; color: #3b1d00; flex: none; }
.cp-ic .ic { width: 30px; height: 30px; }
.culture-promo h3 { margin: 0 0 2px; }
.culture-promo p { margin: 0; font-size: .85rem; }
.enc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin: 16px 0; }
@media (max-width: 640px) { .enc-grid { grid-template-columns: 1fr 1fr; gap: 10px; } }
.enc-card { display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: 20px; text-align: left; background: linear-gradient(160deg, color-mix(in srgb, var(--mc) 40%, #13263a), #13263a 75%); border: 1px solid rgba(255,255,255,.08); transition: transform .2s, border-color .2s; }
.enc-card:hover { transform: translateY(-3px); border-color: rgba(255,255,255,.4); }
.enc-ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--mc); margin-bottom: 6px; }
.enc-ic .ic { width: 24px; height: 24px; }
.enc-card b { font: 800 1.1rem var(--display); }
.enc-card small { color: #c9d6e3; font-size: .8rem; line-height: 1.3; flex: 1; }
.enc-card em { font-style: normal; font-size: .72rem; color: var(--yellow); font-weight: 700; margin-top: 4px; }
.fiches { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; margin: 14px 0; }
.fiche { display: flex; gap: 12px; padding: 14px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.f-ini { width: 46px; height: 46px; border-radius: 50%; flex: none; display: grid; place-items: center; font: 800 1rem var(--display); background: linear-gradient(145deg, color-mix(in srgb, var(--mc) 70%, #fff), var(--mc)); }
.fiche b { display: block; font-size: 1.02rem; }
.fiche small { display: block; color: var(--yellow); font-size: .8rem; font-weight: 600; margin: 1px 0 4px; }
.fiche p { margin: 0; color: var(--muted); font-size: .88rem; }
.timeline { list-style: none; padding: 0 0 0 4px; margin: 18px 0; position: relative; }
.timeline::before { content: ''; position: absolute; left: 44px; top: 8px; bottom: 8px; width: 3px; background: linear-gradient(var(--red), var(--yellow), var(--green)); border-radius: 3px; }
.timeline li { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 16px; position: relative; }
.tl-year { width: 82px; flex: none; text-align: center; font: 800 .95rem var(--display); padding: 6px 0; border-radius: 99px; background: #13263a; border: 2px solid var(--yellow); position: relative; z-index: 1; }
.timeline b { display: block; font-size: 1.02rem; }
.timeline p { margin: 2px 0 0; color: var(--muted); font-size: .9rem; }

/* Jeux de mots */
.pill.cat { background: rgba(34, 211, 238, .18); color: #a5f3fc; border: 1px solid rgba(34,211,238,.4); font-size: .8rem; }
.pe-stage { display: flex; align-items: center; gap: 14px; margin: 8px 0; }
.pe-draw { width: 150px; height: 165px; flex: none; }
.pe-draw path, .pe-draw circle { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.pe-base { stroke: rgba(255,255,255,.55); stroke-width: 7; }
.pe-p { stroke: var(--bad); stroke-width: 6; opacity: 0; transition: opacity .3s; }
.pe-p.on { opacity: 1; }
.pe-info { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.pe-info p { margin: 0; }
.pe-word { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 10px 0 16px; }
.pe-l { width: clamp(26px, 7.5vw, 40px); height: clamp(34px, 9vw, 48px); border-radius: 9px; background: rgba(255,255,255,.08); border-bottom: 3px solid rgba(255,255,255,.5); display: grid; place-items: center; font: 800 clamp(1.1rem, 4.5vw, 1.6rem) var(--display); }
.pe-l.on { background: rgba(34,197,122,.22); border-color: var(--ok); animation: pop .3s; }
.pe-gap { width: 14px; display: grid; place-items: center; font-weight: 800; }
.kb { display: grid; gap: 6px; }
.kb div { display: flex; justify-content: center; gap: 5px; }
.kb button { flex: 1; max-width: 46px; height: 46px; border-radius: 10px; background: var(--card-2); border: 1px solid var(--line); font: 800 1rem var(--font); box-shadow: inset 0 -3px 0 rgba(0,0,0,.25); }
.kb button:active { transform: scale(.95); }
.kb button.ok { background: var(--ok); color: #fff; }
.kb button.bad { background: rgba(255,90,95,.25); color: rgba(255,255,255,.4); }
.pe-res, .qsj-fb, .fr-res { margin-top: 14px; text-align: center; }
.pe-res.win, .qsj-fb.win { border-color: var(--ok); }
.pe-res.lose, .qsj-fb.lose { border-color: var(--bad); }
.ml-slots { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin: 18px 0; }
.ml-slot { width: clamp(30px, 9vw, 48px); height: clamp(38px, 11vw, 56px); border-radius: 10px; border: 2px dashed rgba(255,255,255,.3); font: 800 clamp(1.2rem, 5vw, 1.7rem) var(--display); }
.ml-slot.on { border-style: solid; border-color: #22d3ee; background: rgba(34,211,238,.15); }
.ml-slots.win .ml-slot { border-color: var(--ok); background: rgba(34,197,122,.3); animation: bump .5s; }
.ml-slots.shake { animation: shake .4s; }
.ml-tiles { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin: 10px 0 18px; }
.ml-tile { width: clamp(40px, 11vw, 56px); height: clamp(46px, 12.5vw, 62px); border-radius: 12px; background: #fff; color: #155e75; font: 800 clamp(1.3rem, 5.5vw, 1.9rem) var(--display); box-shadow: inset 0 -5px 0 rgba(0,0,0,.15), 0 6px 14px rgba(0,0,0,.3); transition: transform .12s, opacity .2s; }
.ml-tile:active { transform: scale(.93); }
.ml-tile:disabled { opacity: .15; }

/* Qui suis-je */
.qsj-card { background: linear-gradient(160deg, rgba(245,158,11,.18), rgba(255,255,255,.03)); border: 1px solid rgba(245,158,11,.35); border-radius: 24px; padding: 18px; margin: 10px 0 14px; }
.qsj-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.qsj-head .eyebrow { margin: 0; }
.qsj-ava { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: rgba(0,0,0,.3); border: 2px solid #f59e0b; }
.qsj-ava .ic { width: 28px; height: 28px; color: #f59e0b; }
.qsj-clues { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 8px; }
.qsj-clues li { padding: 10px 12px; border-radius: 12px; background: rgba(0,0,0,.2); font-size: 1.02rem; }
.qsj-clues span { display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: #f59e0b; font-weight: 700; }
.qsj-fb small { display: block; color: var(--yellow); }
.qsj-fb p { margin: 6px 0 0; }

/* Frise */
.fr-line { list-style: none; padding: 0; margin: 14px 0; display: grid; gap: 6px; counter-reset: fr; }
.fr-line li { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 12px; background: rgba(255,255,255,.04); border: 1px dashed rgba(255,255,255,.15); min-height: 44px; }
.fr-line li b { width: 56px; text-align: center; font-family: var(--display); color: var(--muted); }
.fr-line li.on { background: rgba(234,88,12,.18); border: 1px solid #ea580c; }
.fr-line li.on b { color: var(--yellow); }
.fr-cards { display: grid; gap: 8px; }
.fr-card { text-align: left; padding: 14px; border-radius: 16px; background: var(--card-2); border: 2px solid var(--line); box-shadow: inset 0 -4px 0 rgba(0,0,0,.2); transition: transform .12s, border-color .2s; }
.fr-card:hover { border-color: rgba(255,255,255,.35); }
.fr-card b { display: block; font-size: 1.02rem; }
.fr-card small { color: var(--muted); font-size: .82rem; }
.fr-card.shake { animation: shake .4s; border-color: var(--bad); }
.shop-hero { display: grid; grid-template-columns: auto 1fr; align-items: center; }
.shop-hero > .grow { min-width: 0; }
.shop-hero > .btn { grid-column: 1 / -1; }
@media (min-width: 700px) { .shop-hero { grid-template-columns: auto 1fr auto; } .shop-hero > .btn { grid-column: auto; } }
.av.sel { background: var(--av) !important; border-color: #fff; box-shadow: 0 0 0 3px var(--av), 0 0 0 5px rgba(255,255,255,.25); }
.field-err { color: var(--bad); font-size: .85rem; margin: -4px 0 8px; text-align: left; }
.creator { display: flex; align-items: center; gap: 14px; margin-top: 14px; padding: 14px; border-radius: 16px; background: linear-gradient(120deg, rgba(206,17,38,.18), rgba(252,209,22,.12), rgba(0,148,96,.16)); border: 1px solid var(--line); }
.cr-ava { width: 52px; height: 52px; border-radius: 50%; flex: none; display: grid; place-items: center; font: 800 1.1rem var(--display); background: linear-gradient(145deg, #ff4d5e, var(--red)); box-shadow: 0 0 0 3px var(--yellow); }
.creator small { display: block; color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; }
.creator b { font: 800 1.15rem var(--display); }
.creator em { display: block; font-style: normal; color: var(--yellow); font-weight: 600; font-size: .9rem; }
.creator a, .foot a { color: var(--green-2); text-decoration: none; font-weight: 600; }
.creator a { display: inline-flex; align-items: center; gap: 5px; margin-top: 4px; font-size: .9rem; }
.cr-links { display: flex; flex-wrap: wrap; gap: 4px 16px; }
img.cr-ava { width: 88px; height: 88px; object-fit: cover; object-position: center 30%; display: block; background: #0b1622; box-shadow: 0 0 0 3px var(--yellow), 0 8px 20px rgba(0,0,0,.4); }
@media (max-width: 480px) { .creator { flex-direction: column; text-align: center; } .cr-links { justify-content: center; } }

/* Publicité */
.sponsor { display: flex; align-items: center; gap: 12px; margin: 18px 0; padding: 12px 14px; border-radius: 18px; text-decoration: none; color: var(--text); position: relative;
  background: linear-gradient(120deg, color-mix(in srgb, var(--sc, #0e7490) 30%, #13263a), #13263a 80%); border: 1px solid rgba(255,255,255,.1); }
.sponsor.house { --sc: #0e7490; border-style: dashed; }
.sponsor:hover { border-color: rgba(255,255,255,.35); }
.sp-tag { position: absolute; top: -9px; left: 14px; font-size: .62rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; padding: 2px 8px; border-radius: 6px; background: #0b1622; color: var(--muted); border: 1px solid var(--line); }
.sponsor img { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; flex: none; }
.sp-logo { width: 52px; height: 52px; border-radius: 14px; flex: none; display: grid; place-items: center; font: 800 1.1rem var(--display); background: var(--sc, #0e7490); }
.sp-logo .ic { width: 26px; height: 26px; }
.sp-text { flex: 1; min-width: 0; }
.sp-text b { display: block; }
.sp-text small { color: var(--muted); font-size: .82rem; }
.sp-cta { background: #fff; color: #0b1622; flex: none; }
@media (max-width: 480px) { .sp-cta { display: none; } }
.region-sponsor { display: block; margin: 10px 0 0; padding: 8px 14px; border-radius: 12px; background: rgba(255,255,255,.05); color: var(--muted); text-decoration: none; font-size: .85rem; text-align: center; }
.region-sponsor b { color: var(--text); }
.ad-reward { border-color: rgba(252,209,22,.5); color: var(--yellow); }
.foot a { margin: 0 2px; }
body.ad-playing { overflow: hidden; }
.gm-site { cursor: pointer; filter: drop-shadow(0 2px 3px rgba(0,0,0,.5)); }
.gm-site-hit { fill: transparent; }
.gm-site:hover path { fill: #fff; }
.gm-site-label { font: 700 10px var(--font); fill: #fff; paint-order: stroke; stroke: rgba(6,14,22,.9); stroke-width: 3px; text-anchor: middle; }
.round.on { background: var(--yellow); color: #1b1300; }
.sites li.clickable { cursor: pointer; transition: background .2s; }
.sites li.clickable:hover { background: rgba(255,255,255,.09); }
.sm-map { position: relative; height: clamp(220px, 40vh, 380px); border-radius: 22px; overflow: hidden; margin: 10px 0 12px; background: radial-gradient(circle at 50% 40%, #13314a, #08131e 75%); border: 1px solid var(--line); }
.sm-hud { position: absolute; left: 10px; right: 10px; top: 10px; display: flex; justify-content: space-between; z-index: 2; pointer-events: none; }
.sm-hud span { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; background: rgba(6,12,20,.8); font-size: .78rem; font-weight: 700; }
.sm-hud .ic { width: 14px; height: 14px; color: var(--yellow); }
.sm-bar { position: absolute; left: 10px; right: 10px; bottom: 10px; height: 8px; border-radius: 9px; background: rgba(255,255,255,.12); overflow: hidden; z-index: 2; }
.sm-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #64748b, var(--yellow)); }
.sm-fb { margin: 10px 0 0; padding: 10px 14px; border-radius: 12px; font-weight: 600; }
.sm-fb.ok { background: rgba(34,197,122,.15); color: #86efac; }
.sm-fb.bad { background: rgba(255,90,95,.12); color: #fca5a5; }

/* =========================================================
   Hyper-responsive téléphone
   ========================================================= */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
button, a, .opt, .tile, .mood, .chip { touch-action: manipulation; }
.row { flex-wrap: wrap; }
.row > .btn { min-width: 0; }
.btn { max-width: 100%; white-space: normal; text-align: center; overflow-wrap: anywhere; }
input, select, textarea { font-size: max(16px, 1em); } /* évite le zoom auto d’iOS */
img, svg { max-width: 100%; }
@media (max-width: 400px) {
  .view { padding-left: 12px; padding-right: 12px; }
  .topbar { padding-left: 12px; padding-right: 12px; gap: 8px; }
  .card { padding: 14px; }
  .welcome h1 { font-size: 1.7rem; }
  .w-stats div { padding: 6px 2px; }
  .w-stats b { font-size: 1.05rem; }
  .page-title { font-size: 1.7rem; }
  .moods { grid-template-columns: repeat(2, 1fr); }
  .mood { min-height: 72px; }
  .shelf-row { grid-auto-columns: 72%; }
  .grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .t-title { padding: 18px 8px 8px; }
  .t-title b { font-size: .95rem; }
  .t-title small { display: none; }
  .mosaic .big .t-title b { font-size: 1.4rem; }
  .q-text { font-size: 1.2rem; }
  .opt { padding: 13px 12px; font-size: .98rem; }
  .facts { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .res-grid b { font-size: 1.2rem; }
  .bstar { font-size: 3rem; } .bstar:nth-child(2) { font-size: 3.6rem; }
  .gain-card { flex-wrap: wrap; } .gain-card em { margin-left: 0; text-align: left; }
  .lb-info h1 { font-size: 1.8rem; }
  .seg { grid-auto-flow: row; grid-template-columns: 1fr 1fr; }
  .duo { grid-template-columns: 1fr; }
  .bonus-days b { font-size: .72rem; }
  .bonus-days small { font-size: .5rem; }
  .my-head, .my-row { grid-template-columns: 1.4fr .9fr .45fr 1fr; gap: 5px; font-size: .85rem; }
  .kb button { height: 42px; font-size: .9rem; }
  .kb div { gap: 3px; }
  .pe-draw { width: 110px; height: 120px; }
  .mm-grid { gap: 6px; }
  .tabbar { width: calc(100% - 12px); bottom: calc(6px + var(--safe-b)); }
  .tabbar a { font-size: .62rem; }
  .ex-top { left: 8px; right: 8px; }
  .shop-grid { grid-template-columns: 1fr 1fr; }
  .enc-grid { grid-template-columns: 1fr; }
  .timeline li { gap: 10px; } .tl-year { width: 64px; font-size: .85rem; } .timeline::before { left: 34px; }
  .du-opts button { padding: 10px 6px; font-size: .85rem; }
  .du-q { font-size: .95rem; }
  .sponsor { padding: 12px; }
}
@media (max-height: 640px) {
  .sm-map { height: 190px; }
  .g-map, .ru-map, .li-map { min-height: 240px; }
}
html, body { overflow-x: clip; }
@media (max-width: 400px) {
  .shelf-row { margin: -6px -12px 0; padding: 6px 12px 14px; }
  .moods.small { margin: 10px -12px 16px; padding: 0 12px; }
}
.sm-hud em { font-style: normal; }
@media (max-width: 400px) { .sm-hud span { font-size: .66rem; padding: 3px 8px; } .sm-hud em { display: none; } }

/* Qui suis-je ? en photos */
.qsj.photo .qsj-stage { margin: 8px 0 12px; }
.qsj-photo { position: relative; width: min(100%, 340px); aspect-ratio: 4 / 5; margin: 0 auto 10px; border-radius: 24px; overflow: hidden; background: #0d1b2a; border: 3px solid rgba(255,255,255,.12); box-shadow: 0 20px 40px -15px rgba(0,0,0,.7); transition: border-color .3s, box-shadow .3s; }
.qsj-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; display: block; will-change: filter, transform; }
.qsj-photo.win { border-color: var(--ok); box-shadow: 0 0 0 4px rgba(34,197,122,.35), 0 20px 40px -15px rgba(0,0,0,.7); }
.qsj-photo.lose { border-color: var(--bad); }
.qsj-pts { position: absolute; top: 10px; right: 10px; padding: 4px 10px; border-radius: 99px; background: rgba(6,12,20,.8); color: var(--yellow); font: 800 .95rem var(--display); }
.qsj-cat { position: absolute; left: 10px; bottom: 10px; padding: 4px 10px; border-radius: 99px; background: rgba(6,12,20,.8); font-size: .75rem; font-weight: 700; }
.qsj-hint { text-align: center; color: var(--yellow); font-weight: 600; min-height: 1.5em; margin: 8px 0 0; }
.qsj.photo .timer { max-width: 340px; margin: 0 auto; }
.credit { font-size: .72rem; color: var(--muted); margin: 6px 0 0; }
@media (max-height: 700px) { .qsj-photo { width: min(100%, 250px); } }
/* Fiches avec photo */
.f-photo { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; object-position: center 20%; flex: none; border: 2px solid var(--mc); }
.credits-list { display: grid; gap: 8px; }
.credits-list div { display: flex; gap: 10px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; font-size: .85rem; }
.credits-list img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.challenge { max-width: 560px; margin: 10px auto; text-align: center; }
.challenge h1 { font-size: clamp(1.8rem, 7vw, 2.6rem); }
.challenge .lead { font-size: 1.05rem; color: #dce6ef; }
.ch-art { border-radius: 22px; overflow: hidden; margin-bottom: 14px; box-shadow: 0 20px 40px -18px rgba(0,0,0,.8); }
.ch-art .thumb { display: block; width: 100%; height: auto; }
.versus { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 12px 0; padding: 12px 16px; border-radius: 16px; font-weight: 800; animation: pop .5s .4s both; }
.versus.win { background: rgba(34,197,122,.18); border: 1px solid var(--ok); color: #86efac; }
.versus.lose { background: rgba(255,90,95,.14); border: 1px solid var(--bad); color: #fca5a5; }
.wheel-page { text-align: center; max-width: 520px; margin: 0 auto; }
.wheel-wrap { position: relative; width: min(86vw, 360px); margin: 16px auto; }
.wheel { width: 100%; height: auto; display: block; filter: drop-shadow(0 18px 30px rgba(0,0,0,.5)); }
.wheel .wl { fill: #fff; font: 800 15px var(--display); text-anchor: middle; dominant-baseline: middle; paint-order: stroke; stroke: rgba(0,0,0,.35); stroke-width: 3px; }
.wheel-pointer { position: absolute; top: -8px; left: 50%; transform: translateX(-50%); width: 0; height: 0; border-left: 18px solid transparent; border-right: 18px solid transparent; border-top: 34px solid #fff; z-index: 2; filter: drop-shadow(0 3px 4px rgba(0,0,0,.5)); }
.btn.play:disabled { opacity: .6; animation: none; cursor: default; }
.wheel-card { display: flex; align-items: center; gap: 14px; cursor: pointer; border-color: rgba(219,39,119,.45); background: linear-gradient(120deg, rgba(219,39,119,.22), rgba(138,63,252,.14) 60%, var(--card)); }
.wheel-card h3 { margin: 0; }
.wheel-card p { margin: 0; font-size: .85rem; }
.wc-ic { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; flex: none; background: conic-gradient(#ce1126 0 25%, #e0a100 0 50%, #009460 0 75%, #8a3ffc 0); animation: spinSlow 6s linear infinite; }
.wc-ic .ic { width: 24px; height: 24px; color: #fff; }
@keyframes spinSlow { to { transform: rotate(360deg); } }
.tb-music { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; background: rgba(255,255,255,.07); border: 1px solid var(--line); color: var(--muted); }
.tb-music .ic { width: 20px; height: 20px; }
.tb-music.on { color: var(--yellow); border-color: rgba(252,209,22,.5); background: rgba(252,209,22,.12); animation: bump 1.15s ease-in-out infinite; }
@media (max-width: 360px) { .tb-music { width: 36px; height: 36px; } }
/* Locomotive TransGuinéen */
.sm-loco { position: relative; height: 64px; margin: 0 0 8px; overflow: hidden; border-radius: 14px; background: linear-gradient(#173049, #0f2235); border: 1px solid var(--line); }
.sm-rail { position: absolute; left: 0; right: 0; bottom: 6px; height: 4px; background: repeating-linear-gradient(90deg, #94a3b8 0 14px, transparent 14px 20px); opacity: .6; }
.sm-loco img { position: absolute; bottom: 8px; left: 50%; height: 52px; transform: translateX(-50%); filter: drop-shadow(0 4px 4px rgba(0,0,0,.5)); animation: chug .5s ease-in-out infinite; }
@keyframes chug { 50% { transform: translateX(-50%) translateY(-1px); } }
.sm-loco.go img { animation: roll 1.1s cubic-bezier(.5,0,.3,1) both; }
@keyframes roll { 0% { transform: translateX(-50%); } 45% { transform: translateX(-160%); } 46% { transform: translateX(130%); } 100% { transform: translateX(-50%); } }
.sm-loco.slow img { animation: shakeLoco .5s 2; }
@keyframes shakeLoco { 25% { transform: translateX(-52%); } 75% { transform: translateX(-48%); } }
.sm-smoke { position: absolute; left: 50%; bottom: 52px; width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.25); opacity: 0; }
.sm-loco.go .sm-smoke { animation: smoke 1s ease-out; }
@keyframes smoke { 0% { opacity: .7; transform: translate(-60px, 0) scale(.6); } 100% { opacity: 0; transform: translate(-90px, -22px) scale(2.4); } }
@media (max-height: 700px) { .sm-loco { height: 50px; } .sm-loco img { height: 40px; } }
/* Quartiers de Conakry */
.kq-card { text-align: center; margin: 12px 0 14px; }
.street-sign { display: inline-flex; flex-direction: column; align-items: center; min-width: 240px; padding: 14px 28px; border-radius: 12px; background: #1d4ed8; border: 4px solid #fff; box-shadow: 0 0 0 3px #1d4ed8, 0 16px 30px -12px rgba(0,0,0,.7); }
.street-sign small { letter-spacing: .18em; font-size: .7rem; color: #bfdbfe; font-weight: 700; }
.street-sign b { font: 800 clamp(1.6rem, 7vw, 2.2rem) var(--display); }
.street-sign span { font-size: .75rem; color: #bfdbfe; }
.commune-sign { display: inline-flex; flex-direction: column; min-width: 240px; padding: 14px 28px; border-radius: 18px; background: linear-gradient(135deg, var(--cc), color-mix(in srgb, var(--cc) 55%, #0b1622)); box-shadow: 0 16px 30px -12px rgba(0,0,0,.7); }
.commune-sign small { font-size: .78rem; opacity: .85; font-weight: 700; }
.commune-sign b { font: 800 clamp(1.8rem, 8vw, 2.4rem) var(--display); }
.cdot { width: 14px; height: 14px; border-radius: 50%; flex: none; box-shadow: 0 0 0 2px rgba(255,255,255,.3); }
/* Le Million guinéen */
.million .g-top .btn { flex: none; }
.mi-ladder { display: flex; flex-direction: column; gap: 2px; margin: 10px 0; padding: 8px; border-radius: 16px; background: #120a2a; border: 1px solid rgba(168,85,247,.35); max-height: 28vh; overflow-y: auto; font-size: .8rem; }
.mi-ladder span { display: flex; justify-content: space-between; padding: 3px 10px; border-radius: 8px; color: #c4b5fd; }
.mi-ladder span i { font-style: normal; opacity: .6; }
.mi-ladder span.safe { color: #fff; font-weight: 800; }
.mi-ladder span.done { color: #6d28d9; }
.mi-ladder span.cur { background: linear-gradient(90deg, #f59e0b, #fcd116); color: #1b1300; font-weight: 800; }
.mi-jokers { display: flex; gap: 8px; justify-content: center; margin: 6px 0 10px; }
.mi-jokers button { display: flex; align-items: center; gap: 5px; padding: 8px 12px; border-radius: 99px; border: 2px solid #a855f7; background: rgba(168,85,247,.15); font-weight: 700; font-size: .85rem; }
.mi-jokers button:disabled { opacity: .3; text-decoration: line-through; }
.mi-q { padding: 18px; border-radius: 40px; background: linear-gradient(180deg, #1e1b4b, #0f0a2e); border: 2px solid #a855f7; text-align: center; font: 700 clamp(1.05rem, 4.2vw, 1.35rem)/1.3 var(--display); box-shadow: 0 0 30px rgba(168,85,247,.35); }
.mi-q p { margin: 0; }
.mi-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
@media (max-width: 480px) { .mi-opts { grid-template-columns: 1fr; } }
.mi-opt { position: relative; display: flex; align-items: center; gap: 10px; text-align: left; padding: 12px 16px; border-radius: 30px; border: 2px solid #a855f7; background: #170f3a; font-weight: 600; overflow: hidden; }
.mi-opt b { color: #fcd116; }
.mi-opt.sel, .mi-opt.wait { background: #f59e0b; color: #1b1300; border-color: #fcd116; }
.mi-opt.wait { animation: blink .5s infinite; }
.mi-opt.right { background: var(--ok); border-color: #fff; color: #fff; }
.mi-opt.wrong { background: var(--bad); border-color: #fff; }
.mi-opt.gone { opacity: .2; }
.mi-vote { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); width: 70px; height: 16px; border-radius: 8px; background: rgba(255,255,255,.12); font-style: normal; font-size: .7rem; font-weight: 800; text-align: center; overflow: hidden; }
.mi-vote i { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(252,209,22,.6); z-index: -1; }
/* Tirs au but */
.pe-board { gap: 10px; align-items: center; font-weight: 800; }
.pe-board b { font: 800 1.6rem var(--display); padding: 2px 12px; border-radius: 10px; background: #0b1622; border: 1px solid var(--line); }
.pe-board .team { display: flex; align-items: center; gap: 5px; font-size: .85rem; }
.pe-dots { display: flex; justify-content: space-between; margin: 4px 2px 8px; }
.pe-dots div { display: flex; gap: 4px; }
.pe-dots i { width: 12px; height: 12px; border-radius: 50%; background: rgba(255,255,255,.15); }
.pe-dots i.g { background: var(--ok); } .pe-dots i.m { background: var(--bad); }
.pe-pitch { position: relative; border-radius: 20px; overflow: hidden; border: 1px solid var(--line); }
.pe-pitch svg { display: block; width: 100%; height: auto; max-height: 42vh; }
.pe-keeper, .pe-ball { transition: transform .55s cubic-bezier(.2,.8,.3,1); }
.pe-keeper.opp rect { fill: #e5e7eb; }
#pZones .pe-zone { opacity: 0; pointer-events: none; cursor: pointer; }
#pZones.on .pe-zone { opacity: 1; pointer-events: all; }
.pe-zone rect { fill: rgba(252,209,22,.18); stroke: #fcd116; stroke-width: 2; stroke-dasharray: 6 5; }
.pe-zone:hover rect { fill: rgba(252,209,22,.35); }
.pe-zone text { fill: #fff; font: 800 13px var(--display); text-anchor: middle; paint-order: stroke; stroke: rgba(0,0,0,.6); stroke-width: 3px; }
.pe-msg { position: absolute; left: 50%; top: 8px; transform: translateX(-50%); padding: 6px 14px; border-radius: 99px; background: rgba(6,12,20,.85); font-weight: 800; opacity: 0; transition: opacity .2s; white-space: nowrap; }
.pe-msg.show { opacity: 1; }
.pe-msg.ok { color: #86efac; } .pe-msg.bad { color: #fca5a5; }
.pe-ask { color: var(--muted); font-weight: 600; margin: 10px 0 4px; }
.pe-q { font-size: 1.15rem; margin: 0 0 10px; }
/* Fleuves sur la carte */
.gm-river { fill: none; stroke: #60a5fa; stroke-width: calc(var(--k) * 2px); stroke-linecap: round; stroke-linejoin: round; opacity: .85; pointer-events: none; }
.gm-river.hl { stroke: #22d3ee; stroke-width: calc(var(--k) * 6px); opacity: 1; filter: drop-shadow(0 0 4px rgba(34,211,238,.9)); animation: flow 1.2s ease-in-out infinite alternate; }
@keyframes flow { to { stroke-width: calc(var(--k) * 8px); } }
.gm-river-label { fill: #bae6fd; font-family: var(--font); font-weight: 700; font-style: italic; paint-order: stroke; stroke: rgba(6,14,22,.85); text-anchor: middle; pointer-events: none; }
.tr-map { height: clamp(240px, 44vh, 420px); border-radius: 22px; overflow: hidden; margin: 10px 0 12px; background: radial-gradient(circle at 50% 40%, #13314a, #08131e 75%); border: 1px solid var(--line); }
@media (max-height: 680px) { .tr-map { height: 220px; } }

/* ---------- Avatars illustrés ---------- */
.avatar.has-img { padding: 0; overflow: hidden; background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--av) 70%, #fff), var(--av)); }
.avatar.has-img svg { width: 100%; height: 100%; display: block; }
.avatars .av { padding: 0; overflow: hidden; display: grid; place-items: end center; background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--av) 70%, #fff), var(--av)) !important; }
.avatars .av svg { width: 100%; height: 100%; display: block; }
.avatars .av:not(.sel) { opacity: .82; }
.onb-preview .avatar.xl { width: 96px; height: 96px; border-radius: 28px; }
@media (max-width: 400px) { .avatars { grid-template-columns: repeat(4, 1fr); gap: 8px; } }

/* ---------- Sensation « appli de jeu » sur téléphone ---------- */
body.in-game { overscroll-behavior-y: none; }
body.in-game .game { -webkit-user-select: none; user-select: none; }
.btn, .opt, .tile, .mood, .av, .t-card, .round, .mi-opt, .du-opts button, .kb button { transition: transform .12s ease, background .2s, border-color .2s; }
.btn:active, .opt:active:not(:disabled), .tile:active, .mood:active, .av:active, .round:active, .mi-opt:active, .du-opts button:active, .kb button:active { transform: scale(.95); }
.opt { min-height: 54px; }
.opt.right { animation: goodPop .45s cubic-bezier(.3, 1.6, .5, 1); box-shadow: 0 0 0 3px rgba(34, 197, 122, .35), 0 8px 24px rgba(34, 197, 122, .25); }
@keyframes goodPop { 40% { transform: scale(1.04); } }
.qsj-fb { animation: pop .3s ease-out; }
@media (max-width: 640px) {
  /* Le bouton « Suivant » reste toujours sous le pouce. */
  body.in-game .qsj-fb { position: sticky; bottom: calc(8px + var(--safe-b)); z-index: 6; box-shadow: 0 -10px 30px rgba(0, 0, 0, .45); backdrop-filter: blur(10px); }
  body.in-game .qsj-fb p { max-height: 30vh; overflow-y: auto; }
  body.in-game #trGo { position: sticky; bottom: calc(8px + var(--safe-b)); z-index: 6; box-shadow: 0 8px 26px rgba(0, 0, 0, .5); }
  .btn { min-height: 48px; }
}
@media (prefers-reduced-motion: reduce) { .opt.right, .qsj-fb { animation: none; } }
