/* =====================================================================
   XOO-X — Système de design
   Mobile d'abord, léger (aucune police téléchargée), clair et sombre.
   ===================================================================== */

:root {
  --brand: #0BB39B;
  --brand-600: #089A85;
  --brand-700: #077A6A;
  --brand-50: #E7F8F5;
  --violet: #6C5CE7;
  --violet-50: #EFEDFD;
  --amber: #F5A524;
  --amber-50: #FEF5E6;
  --rose: #E5484D;
  --rose-50: #FDECEC;
  --sky: #0EA5E9;
  --sky-50: #E6F6FD;

  --bg: #F5F6FA;
  --surface: #FFFFFF;
  --surface-2: #F0F2F7;
  --ink: #0F172A;
  --ink-2: #334155;
  --muted: #64748B;
  --line: #E2E8F0;
  --ok: #12A150;
  --ok-50: #E6F6EC;
  --bad: #E5484D;
  --bad-50: #FDECEC;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 8px 24px rgba(15, 23, 42, .06);
  --shadow-lg: 0 12px 40px rgba(15, 23, 42, .16);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --nav-h: 58px;
  --hdr-h: 54px;
  --top-h: 56px;
  /* Marges de sécurité (encoche, barres du téléphone). Dans l'application Android, la fenêtre native place déjà
     la page entre les barres : elles valent 0 (sinon l'espace est compté deux fois, en haut et en bas). */
  --sa-t: env(safe-area-inset-top, 0px);
  --sa-b: env(safe-area-inset-bottom, 0px);
  --sa-l: env(safe-area-inset-left, 0px);
  --sa-r: env(safe-area-inset-right, 0px);
  --safe-b: var(--sa-b);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B1120;
    --surface: #131B2E;
    --surface-2: #1B2540;
    --ink: #E8EDF7;
    --ink-2: #C3CCDC;
    --muted: #8A97AE;
    --line: #26314C;
    --brand-50: #0E2E2B;
    --violet-50: #221F45;
    --amber-50: #33270F;
    --rose-50: #3A1A1D;
    --sky-50: #0D2A3A;
    --ok-50: #0F2E1C;
    --bad-50: #3A1A1D;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0B1120;
  --surface: #131B2E;
  --surface-2: #1B2540;
  --ink: #E8EDF7;
  --ink-2: #C3CCDC;
  --muted: #8A97AE;
  --line: #26314C;
  --brand-50: #0E2E2B;
  --violet-50: #221F45;
  --amber-50: #33270F;
  --rose-50: #3A1A1D;
  --sky-50: #0D2A3A;
  --ok-50: #0F2E1C;
  --bad-50: #3A1A1D;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
:where(svg) { width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.2em; }
.hero-card .deco svg { width: 100%; height: 100%; }
a { color: var(--brand-600); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -0.02em; }
h1 { font-size: 1.6rem; font-weight: 800; }
h2 { font-size: 1.2rem; font-weight: 800; }
h3 { font-size: 1.02rem; font-weight: 700; }
p { margin: 0; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.xs { font-size: .78rem; }
.bold { font-weight: 700; }
.center { text-align: center; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nowrap { white-space: nowrap; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clamp3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 2px; border-radius: 6px; }

/* ------------------------------------------------------------------ Mise en page */
.app { min-height: 100dvh; display: flex; }
.sidebar { display: none; }
.main { flex: 1; min-width: 0; padding-bottom: calc(var(--nav-h) + var(--safe-b) + 16px); }
.page { max-width: 1080px; margin: 0 auto; padding: 16px; }
.page.narrow { max-width: 640px; }
.page.wide { max-width: 1240px; }
.stack > * + * { margin-top: 16px; }
.stack-sm > * + * { margin-top: 8px; }
.stack-lg > * + * { margin-top: 28px; }
.row { display: flex; align-items: center; gap: 12px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.start { align-items: flex-start; }
.grow { flex: 1; min-width: 0; }
.grid { display: grid; gap: 12px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.grid-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.topbar {
  position: sticky; top: 0; z-index: 30;
  height: var(--top-h);
  display: flex; align-items: center; gap: 8px;
  padding: 0 8px 0 16px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
}
.topbar.scrolled { border-bottom-color: var(--line); }
.topbar h1 { font-size: 1.1rem; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .logo { height: 22px; }

.bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  height: calc(var(--nav-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--surface);
  border-top: 1px solid var(--line);
}
.bottomnav a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--muted); font-size: .7rem; font-weight: 600;
}
.bottomnav a svg { width: 24px; height: 24px; }
.bottomnav a.active { color: var(--brand-600); }
.bottomnav a.fab span.fab-bubble {
  width: 52px; height: 52px; border-radius: 18px; margin-top: -22px;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(140deg, var(--brand), var(--violet));
  box-shadow: 0 8px 20px color-mix(in srgb, var(--brand) 45%, transparent);
}
.bottomnav a.fab.active { color: var(--brand-600); }

@media (min-width: 960px) {
  .bottomnav { display: none; }
  .main { padding-bottom: 32px; }
  .sidebar {
    display: flex; flex-direction: column; gap: 4px;
    position: sticky; top: 0; height: 100dvh; width: 248px; flex: none;
    padding: 20px 14px; border-right: 1px solid var(--line); background: var(--surface);
  }
  .sidebar .brand { padding: 6px 10px 18px; }
  .sidebar .brand img { height: 26px; }
  .sidebar a.nav {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px; border-radius: 12px; color: var(--ink-2); font-weight: 600;
  }
  .sidebar a.nav svg { width: 22px; height: 22px; color: var(--muted); }
  .sidebar a.nav:hover { background: var(--surface-2); }
  .sidebar a.nav.active { background: var(--brand-50); color: var(--brand-700); }
  .sidebar a.nav.active svg { color: var(--brand-600); }
  .sidebar .sep { height: 1px; background: var(--line); margin: 12px 8px; }
  .sidebar .foot { margin-top: auto; }
  .topbar { padding: 0 24px; }
  .topbar .logo { display: none; }
  .page { padding: 24px; }
  .grid-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .desk-2 { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px; align-items: start; }
}
@media (min-width: 640px) {
  .grid-2-sm { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3-sm { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ------------------------------------------------------------------ En-tête (logo à gauche, menus à droite) */
.hdr {
  position: sticky; top: 0; z-index: 40;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding-top: var(--sa-t);
}
.hdr-in { max-width: 1180px; margin: 0 auto; height: var(--hdr-h); padding: 0 12px 0 16px; display: flex; align-items: center; gap: 16px; }
.hdr-logo { display: flex; align-items: center; flex: none; }
.hdr-logo img { height: 24px; width: auto; }
.hdr-nav { display: none; gap: 4px; margin-left: 12px; }
.hdr-nav a { padding: 8px 14px; border-radius: 10px; font-weight: 700; color: var(--ink-2); font-size: .95rem; }
.hdr-nav a:hover { background: var(--surface-2); }
.hdr-nav a.active { color: var(--brand-700); background: var(--brand-50); }
.hdr-right { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.hdr-me { border: 0; background: none; padding: 3px; border-radius: 14px; }
.hdr-me:hover { background: var(--surface-2); }
img.avatar { object-fit: cover; background: var(--surface-2); }
.main { min-height: calc(100dvh - var(--hdr-h)); }
@media (min-width: 960px) { :root { --hdr-h: 60px; } .hdr-nav { display: flex; } .hdr-in { padding: 0 24px; } .hdr-rank { display: none !important; } }

.subbar { max-width: 1080px; margin: 0 auto; display: flex; align-items: center; gap: 6px; padding: 10px 12px 0; }
.subbar h1 { font-size: 1.15rem; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (min-width: 960px) { .subbar { padding: 16px 16px 0; } }

.menu-pop {
  position: fixed; z-index: 95; width: 270px; max-width: calc(100vw - 16px);
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-lg);
  padding: 8px; animation: fade .12s ease;
}
.menu-pop .menu-head { display: flex; gap: 10px; align-items: center; padding: 8px 8px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.menu-pop a, .menu-pop button {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px; border-radius: 10px;
  border: 0; background: none; color: var(--ink); font-weight: 600; font-size: .95rem; text-align: left;
}
.menu-pop a:hover, .menu-pop button:hover { background: var(--surface-2); }
.menu-pop svg { color: var(--muted); }
.menu-pop .danger { color: var(--rose); }
.menu-pop hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }

/* Sections repliables */
details.fold { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
details.fold > summary { list-style: none; cursor: pointer; padding: 14px 16px; display: flex; align-items: center; gap: 12px; font-weight: 700; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::after { content: ""; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .2s; }
details.fold[open] > summary::after { transform: rotate(-135deg); }
details.fold > .fold-body { padding: 0 16px 16px; }

.info-row { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.info-row:last-child { border-bottom: 0; }
.info-row span { color: var(--muted); }
.info-row b { text-align: right; overflow-wrap: anywhere; }

.block-title { display: flex; align-items: center; gap: 10px; margin: 0 2px 12px; }
.block-title h2 { font-size: 1.1rem; }
.block-title a { margin-left: auto; font-size: .9rem; font-weight: 700; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px; }

/* Jeux */
.game-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 16px; border-radius: var(--radius-lg); color: #fff; min-height: 150px; position: relative; overflow: hidden; }
.game-tile b { font-size: 1.1rem; }
.games-row .game-tile { width: 150px; min-height: 140px; }
.game-tile .emoji { font-size: 2.4rem; line-height: 1; }
.game-tile small { opacity: .9; }
.game-tile .best { position: absolute; top: 12px; right: 12px; background: rgba(255,255,255,.22); padding: 3px 9px; border-radius: 999px; font-size: .75rem; font-weight: 800; }
.gboard { touch-action: none; user-select: none; -webkit-user-select: none; margin: 0 auto; }
.ghud { display: flex; justify-content: space-between; align-items: center; gap: 8px; max-width: 480px; margin: 0 auto 12px; }
.ghud .box { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 6px 14px; text-align: center; min-width: 84px; }
.ghud .box small { display: block; font-size: .7rem; color: var(--muted); font-weight: 700; text-transform: uppercase; }
.ghud .box b { font-size: 1.2rem; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ Composants */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}
.card.flat { box-shadow: none; }
.card.pad-lg { padding: 20px; }
.card.link { display: block; color: inherit; transition: transform .15s ease, box-shadow .15s ease; }
.card.link.row, .card.link.cat-tile { display: flex; }
.card.link.stack-sm, .card.link.pack-card, .card.link.partner-card { display: flex; flex-direction: column; }
.card.link.stack-sm > * + * { margin-top: 0; }
.card.link.stack-sm { gap: 8px; }
button.card { font: inherit; color: inherit; }
.card.link:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.card.link:active { transform: scale(.99); }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 8px 2px 10px; }
.section-title a { font-size: .9rem; font-weight: 600; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px;
  border-radius: 14px; border: 1px solid transparent;
  font-weight: 700; font-size: 1rem; line-height: 1;
  background: var(--brand); color: var(--on-brand, #fff);
  transition: background .15s, transform .1s, opacity .15s;
  text-decoration: none; white-space: nowrap;
}
.btn:hover { background: var(--brand-600); }
.btn:active { transform: scale(.98); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }
.btn svg { width: 20px; height: 20px; }
.btn.block { width: 100%; }
.btn.sm { min-height: 38px; padding: 0 14px; font-size: .9rem; border-radius: 12px; }
.btn.xs { min-height: 32px; padding: 0 10px; font-size: .82rem; border-radius: 10px; }
.btn.secondary { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn.secondary:hover { background: var(--surface-2); }
.btn.ghost { background: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.violet { background: var(--violet); }
.btn.violet:hover { background: #5A4BD6; }
.btn.amber { background: var(--amber); color: #2A1A00; }
.btn.danger { background: var(--rose); }
.btn.danger.outline { background: transparent; color: var(--rose); border-color: color-mix(in srgb, var(--rose) 40%, transparent); }
.btn.whatsapp { background: #25D366; color: #06311A; }
.icon-btn {
  width: 42px; height: 42px; flex: none; border-radius: 12px; border: 0; background: transparent;
  display: inline-grid; place-items: center; color: var(--ink-2); position: relative;
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn svg { width: 22px; height: 22px; }
.dot { position: absolute; top: 8px; right: 8px; min-width: 9px; height: 9px; border-radius: 9px; background: var(--rose); border: 2px solid var(--bg); }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  font-size: .78rem; font-weight: 700;
  background: var(--surface-2); color: var(--ink-2);
}
.chip svg { width: 14px; height: 14px; }
.chip.brand { background: var(--brand-50); color: var(--brand-700); }
.chip.violet { background: var(--violet-50); color: var(--violet); }
.chip.amber { background: var(--amber-50); color: #A86200; }
.chip.rose { background: var(--rose-50); color: var(--rose); }
.chip.sky { background: var(--sky-50); color: #0369A1; }
.chip.ok { background: var(--ok-50); color: var(--ok); }
:root[data-theme="dark"] .chip.amber, :root:not([data-theme="light"]) .chip.amber { color: #F7B955; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .chip.amber { color: #A86200; } }

.pill-tabs { display: flex; gap: 6px; padding: 4px; background: var(--surface-2); border-radius: 14px; overflow-x: auto; scrollbar-width: none; }
.pill-tabs::-webkit-scrollbar { display: none; }
.pill-tabs button, .pill-tabs a {
  flex: 1 0 auto; border: 0; background: transparent; padding: 8px 14px; border-radius: 10px;
  font-weight: 700; font-size: .9rem; color: var(--muted); white-space: nowrap; text-align: center;
}
.pill-tabs .active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }

.progress { height: 8px; border-radius: 8px; background: var(--surface-2); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: var(--brand); transition: width .4s ease; }
.progress.thin { height: 5px; }
.progress.violet > span { background: var(--violet); }
.progress.amber > span { background: var(--amber); }

.avatar {
  width: 44px; height: 44px; flex: none; border-radius: 14px;
  display: grid; place-items: center; font-weight: 800; color: #fff;
  background: linear-gradient(140deg, var(--brand), var(--violet));
}
.avatar.lg { width: 72px; height: 72px; border-radius: 22px; font-size: 1.6rem; }
.avatar.sm { width: 34px; height: 34px; border-radius: 11px; font-size: .85rem; }

.icon-tile {
  width: 44px; height: 44px; flex: none; border-radius: 14px;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--c, var(--brand)) 14%, transparent);
  color: var(--c, var(--brand));
}
.icon-tile svg { width: 24px; height: 24px; }
.icon-tile.lg { width: 56px; height: 56px; border-radius: 18px; }
.icon-tile.lg svg { width: 30px; height: 30px; }

.stat { padding: 14px; }
.stat .v { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat .l { font-size: .8rem; color: var(--muted); font-weight: 600; }
.stat .ic { width: 20px; height: 20px; margin-bottom: 6px; color: var(--c, var(--brand)); }

.list { display: flex; flex-direction: column; }
.list > .item { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--line); color: inherit; }
.list > .item:last-child { border-bottom: 0; }
.list > a.item:hover { background: var(--surface-2); border-radius: 12px; }
.list .item .chev { color: var(--muted); width: 18px; height: 18px; flex: none; }

.banner {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 14px; font-size: .92rem; font-weight: 600;
  background: var(--amber-50); color: #8A5300;
}
.banner svg { width: 20px; height: 20px; flex: none; }
.banner:has(.btn) { flex-wrap: wrap; }
.banner > span { flex: 1 1 180px; }
.banner.info { background: var(--sky-50); color: #075985; }
.banner.ok { background: var(--ok-50); color: var(--ok); }
.banner.bad { background: var(--bad-50); color: var(--bad); }
:root[data-theme="dark"] .banner, :root[data-theme="dark"] .banner.info { color: var(--ink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .banner { color: var(--ink); } }

.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.empty svg { width: 48px; height: 48px; margin: 0 auto 12px; opacity: .6; display: block; }
.empty h3 { color: var(--ink); margin-bottom: 4px; }

.skeleton { background: linear-gradient(90deg, var(--surface-2) 25%, color-mix(in srgb, var(--surface-2) 50%, var(--surface)) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 12px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ------------------------------------------------------------------ Formulaires */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .label { font-weight: 700; font-size: .88rem; color: var(--ink-2); }
.field .hint { font-size: .8rem; color: var(--muted); }
.input, select.input, textarea.input {
  width: 100%; min-height: 50px; padding: 12px 14px;
  border: 1.5px solid var(--line); border-radius: 14px; background: var(--surface);
  font-size: 1rem; outline: none; transition: border-color .15s, box-shadow .15s;
}
textarea.input { min-height: 120px; resize: vertical; line-height: 1.5; }
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
.input.sm { min-height: 40px; padding: 8px 12px; border-radius: 11px; font-size: .92rem; }
.input-group { position: relative; }
.input-group .input { padding-left: 46px; }
.input-group > svg { position: absolute; left: 14px; top: 50%; translate: 0 -50%; width: 20px; height: 20px; color: var(--muted); pointer-events: none; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; }
.check input { width: 20px; height: 20px; accent-color: var(--brand); margin-top: 2px; flex: none; }
.form-error { color: var(--bad); font-size: .88rem; font-weight: 600; }

/* ------------------------------------------------------------------ Cartes métier */
.hero-card {
  position: relative; overflow: hidden;
  border-radius: var(--radius-lg); padding: 20px; color: #fff;
  background: radial-gradient(120% 140% at 100% 0%, #6C5CE7 0%, transparent 55%), linear-gradient(135deg, #0BB39B 0%, #077A6A 100%);
  box-shadow: 0 14px 30px color-mix(in srgb, var(--brand) 30%, transparent);
}
.hero-card h2 { font-size: 1.35rem; color: #fff; }
.hero-card p { opacity: .92; }
.hero-card .btn { background: #fff; color: #065F53; }
.hero-card .btn:hover { background: #F1FFFC; }
.hero-card .deco { position: absolute; right: -18px; bottom: -22px; width: 140px; height: 140px; opacity: .16; }
.hero-card .chip { background: rgba(255, 255, 255, .2); color: #fff; }
.hero-card.violet { background: radial-gradient(120% 140% at 100% 0%, #0BB39B 0%, transparent 50%), linear-gradient(135deg, #6C5CE7 0%, #4C3FC4 100%); box-shadow: 0 14px 30px rgba(108, 92, 231, .3); }
.hero-card.violet .btn { color: #3B2FB0; }
.hero-card.dark { background: radial-gradient(120% 140% at 100% 0%, #0BB39B55 0%, transparent 55%), linear-gradient(135deg, #0F172A 0%, #1E293B 100%); }

.hscroll { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 2px 16px 8px; margin: 0 -16px; scrollbar-width: none; }
.hscroll::-webkit-scrollbar { display: none; }
.hscroll > * { scroll-snap-align: start; flex: 0 0 auto; }
@media (min-width: 960px) { .hscroll { margin: 0; padding: 2px 0 8px; } }

.partner-card { width: 280px; display: flex; flex-direction: column; gap: 10px; }
.partner-card .media { height: 120px; border-radius: 12px; background: var(--surface-2) center/cover no-repeat; }
.partner-card .company { display: flex; align-items: center; gap: 8px; font-size: .82rem; font-weight: 700; color: var(--muted); }

.pack-card { display: flex; flex-direction: column; gap: 10px; height: 100%; }
.pack-card .top { display: flex; align-items: flex-start; gap: 12px; }
.pack-card .meta { display: flex; flex-wrap: wrap; gap: 6px; }
.pack-card .foot { margin-top: auto; }

.cat-tile { display: flex; align-items: center; gap: 12px; padding: 14px; }
.cat-tile .n { font-size: .8rem; color: var(--muted); font-weight: 600; }

.streak { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; color: #E8590C; }
.streak svg { width: 20px; height: 20px; }
.streak.off { color: var(--muted); }
.xp { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; color: var(--violet); }
.xp svg { width: 18px; height: 18px; }

/* ------------------------------------------------------------------ Lecteur de quiz */
.player { position: fixed; inset: 0; z-index: 60; background: var(--bg); display: flex; flex-direction: column; }
.player-top { display: flex; align-items: center; gap: 10px; padding: 10px 12px; padding-top: max(10px, var(--sa-t)); }
.player-top .progress { flex: 1; height: 10px; }
.player-body { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 8px 16px 24px; width: 100%; max-width: 680px; margin: 0 auto; }
.player-foot { padding: 12px 16px calc(12px + var(--safe-b)); width: 100%; max-width: 680px; margin: 0 auto; }
.q-count { font-size: .85rem; font-weight: 700; color: var(--muted); }
.q-body { font-size: 1.25rem; font-weight: 750; line-height: 1.35; margin: 10px 0 18px; letter-spacing: -0.01em; }
.choices { display: flex; flex-direction: column; gap: 10px; }
.choice {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  min-height: 58px; padding: 12px 14px; border-radius: 16px;
  background: var(--surface); border: 2px solid var(--line); border-bottom-width: 4px;
  font-size: 1rem; font-weight: 600; transition: transform .08s, border-color .15s, background .15s;
}
.choice:hover { border-color: color-mix(in srgb, var(--brand) 50%, var(--line)); }
.choice:active { transform: translateY(2px); border-bottom-width: 2px; margin-top: 2px; }
.choice .letter {
  width: 32px; height: 32px; flex: none; border-radius: 10px; display: grid; place-items: center;
  font-weight: 800; font-size: .9rem; background: var(--surface-2); color: var(--ink-2);
}
.choice.selected { border-color: var(--brand); background: var(--brand-50); }
.choice.selected .letter { background: var(--brand); color: var(--on-brand, #fff); }
.choice.correct { border-color: var(--ok); background: var(--ok-50); }
.choice.correct .letter { background: var(--ok); color: #fff; }
.choice.wrong { border-color: var(--bad); background: var(--bad-50); }
.choice.wrong .letter { background: var(--bad); color: #fff; }
.choice.dim { opacity: .55; }
.choice[disabled] { cursor: default; }
.timer { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.timer svg { width: 18px; height: 18px; }
.timer.low { color: var(--bad); animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .5; } }
.feedback {
  border-radius: 18px 18px 0 0; padding: 16px 16px calc(16px + var(--safe-b));
  animation: slideUp .22s ease;
}
.feedback.ok { background: var(--ok-50); }
.feedback.bad { background: var(--bad-50); }
.feedback h3 { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.feedback.ok h3 { color: var(--ok); }
.feedback.bad h3 { color: var(--bad); }
.feedback h3 svg { width: 24px; height: 24px; }
.feedback .btn { margin-top: 12px; }
.feedback.ok .btn { background: var(--ok); }
.feedback.bad .btn { background: var(--bad); }
@keyframes slideUp { from { transform: translateY(30%); opacity: 0; } }
.reading { font-size: 1.05rem; line-height: 1.7; white-space: pre-line; }

/* Résultat */
.score-ring { position: relative; width: 168px; height: 168px; margin: 8px auto; }
.score-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.score-ring .lbl { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.score-ring .lbl b { font-size: 2.4rem; font-weight: 900; letter-spacing: -0.03em; display: block; line-height: 1; }
.review-item { border-left: 4px solid var(--line); padding: 10px 12px; border-radius: 0 12px 12px 0; background: var(--surface); }
.review-item.ok { border-left-color: var(--ok); }
.review-item.bad { border-left-color: var(--bad); }
.burst { animation: pop .5s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes pop { from { transform: scale(.6); opacity: 0; } }

/* ------------------------------------------------------------------ Classement */
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: end; gap: 8px; text-align: center; }
.podium .p { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.podium .base { width: 100%; border-radius: 14px 14px 6px 6px; display: grid; place-items: center; font-weight: 900; font-size: 1.4rem; color: #fff; }
.podium .p1 .base { height: 96px; background: linear-gradient(180deg, #F5A524, #D98B0A); }
.podium .p2 .base { height: 72px; background: linear-gradient(180deg, #94A3B8, #64748B); }
.podium .p3 .base { height: 56px; background: linear-gradient(180deg, #D08A5B, #A86438); }
.podium .name { font-weight: 700; font-size: .85rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; }
.rank-row .r { width: 28px; text-align: center; font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; }
.rank-row.me { background: var(--brand-50); }

/* ------------------------------------------------------------------ Graphiques */
.bars { display: flex; align-items: flex-end; gap: 6px; height: 120px; }
.bars .b { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; height: 100%; min-width: 0; }
.bars .b span { width: 100%; max-width: 28px; border-radius: 6px 6px 3px 3px; background: var(--brand); min-height: 3px; transition: height .4s ease; }
.bars .b span.zero { background: var(--surface-2); }
.bars .b em { font-style: normal; font-size: .68rem; color: var(--muted); font-weight: 600; }
.hbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; }
.hbar .progress { grid-column: 1 / -1; }

/* ------------------------------------------------------------------ Tableaux (admin) */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--surface-2); white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.table tr.clickable { cursor: pointer; }
.table tr.clickable:hover td { background: var(--surface-2); }

/* ------------------------------------------------------------------ Fenêtres */
.overlay {
  position: fixed; inset: 0; z-index: 80; background: rgba(2, 6, 23, .5);
  display: flex; align-items: flex-end; justify-content: center;
  animation: fade .15s ease;
}
@keyframes fade { from { opacity: 0; } }
.sheet {
  width: 100%; max-width: 560px; max-height: 92dvh; overflow-y: auto;
  background: var(--surface); border-radius: 24px 24px 0 0;
  padding: 8px 18px calc(18px + var(--safe-b));
  animation: slideUp .22s ease;
}
.sheet .grab { width: 40px; height: 5px; border-radius: 5px; background: var(--line); margin: 4px auto 12px; }
.sheet.wide { max-width: 760px; }
@media (min-width: 640px) {
  .overlay { align-items: center; padding: 24px; }
  .sheet { border-radius: 24px; padding: 20px 22px 22px; }
  .sheet .grab { display: none; }
}
.toast-host { position: fixed; left: 0; right: 0; bottom: calc(var(--nav-h) + var(--safe-b) + 12px); z-index: 90; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
@media (min-width: 960px) { .toast-host { bottom: 24px; } }
.toast {
  pointer-events: auto; max-width: 480px; width: fit-content;
  background: var(--ink); color: var(--bg); padding: 12px 16px; border-radius: 14px;
  font-weight: 600; font-size: .92rem; box-shadow: var(--shadow-lg);
  animation: slideUp .2s ease;
}
.toast.bad { background: var(--bad); color: #fff; }
.toast.ok { background: var(--ok); color: #fff; }

.net-pill {
  position: fixed; top: calc(var(--sa-t) + var(--top-h) + 6px); left: 50%; translate: -50% 0; z-index: 70; white-space: nowrap;
  display: flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  background: var(--ink); color: var(--bg); font-size: .8rem; font-weight: 700; box-shadow: var(--shadow);
}
.net-pill svg { width: 16px; height: 16px; }

.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid color-mix(in srgb, currentColor 25%, transparent); border-top-color: currentColor; animation: spin .8s linear infinite; }
.spinner.lg { width: 44px; height: 44px; border-width: 4px; color: var(--brand); }
@keyframes spin { to { transform: rotate(360deg); } }

.steps { display: flex; gap: 6px; }
.steps span { flex: 1; height: 5px; border-radius: 5px; background: var(--surface-2); }
.steps span.on { background: var(--brand); }

.timeline { display: flex; flex-direction: column; gap: 0; }
.timeline .t { display: flex; gap: 12px; align-items: flex-start; position: relative; padding-bottom: 14px; }
.timeline .t::before { content: ""; position: absolute; left: 11px; top: 24px; bottom: 0; width: 2px; background: var(--line); }
.timeline .t:last-child::before { display: none; }
.timeline .t .d { width: 24px; height: 24px; border-radius: 50%; flex: none; background: var(--surface-2); display: grid; place-items: center; color: var(--muted); }
.timeline .t .d svg { width: 14px; height: 14px; }
.timeline .t.done .d { background: var(--brand); color: var(--on-brand, #fff); }
.timeline .t.now .d { background: var(--amber); color: #fff; }

/* ------------------------------------------------------------------ Accueil invité */
.welcome { min-height: 100dvh; display: flex; flex-direction: column; }
.welcome .wtop { padding: 20px; display: flex; align-items: center; justify-content: space-between; max-width: 1080px; width: 100%; margin: 0 auto; }
.welcome .wtop img { height: 26px; }
.welcome .whero { flex: 1; display: grid; gap: 28px; align-items: center; padding: 8px 20px 32px; max-width: 1080px; width: 100%; margin: 0 auto; }
@media (min-width: 900px) { .welcome .whero { grid-template-columns: 1.1fr 1fr; } }
.welcome h1 { font-size: clamp(2rem, 6vw, 3.2rem); font-weight: 900; letter-spacing: -0.035em; }
.welcome h1 em { font-style: normal; background: linear-gradient(90deg, var(--brand), var(--violet)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mock {
  border-radius: 28px; padding: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg);
  max-width: 380px; margin: 0 auto; width: 100%;
}
.feature { display: flex; gap: 12px; align-items: flex-start; }
.whero { display: grid; gap: 28px; align-items: center; }
@media (min-width: 900px) { .whero { grid-template-columns: 1.1fr 1fr; } }
em.grad { font-style: normal; background: linear-gradient(90deg, var(--brand), var(--violet)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.desk-only { display: none; }
@media (min-width: 900px) { .desk-only { display: block; } }

.logo-dark { display: none; }
:root[data-theme="dark"] .logo-light { display: none; }
:root[data-theme="dark"] .logo-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-light { display: none; }
  :root:not([data-theme="light"]) .logo-dark { display: block; }
}

/* =====================================================================
   v3 — composants ajoutés
   ===================================================================== */

/* Lisibilité : les tuiles de jeux restent en texte blanc (.card.link imposait la couleur du texte) */
.game-tile.card.link, .game-tile.card.link b, .game-tile.card.link small { color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.25); }
.game-tile.card.link { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }

.btn.lg { min-height: 56px; font-size: 1.08rem; border-radius: 16px; }
.btn.xl { min-height: 64px; font-size: 1.15rem; border-radius: 18px; }
.btn.ghost-light { background: rgba(255,255,255,.18); color: #fff; }
.btn.ghost-light:hover { background: rgba(255,255,255,.28); }
.btn.amber:hover { background: #E6951A; }
.avatar.xs { width: 24px; height: 24px; border-radius: 8px; font-size: .62rem; }

/* Chargement global entre les pages */
.route-bar { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 200; background: linear-gradient(90deg, var(--brand), var(--violet)); box-shadow: 0 0 8px color-mix(in srgb, var(--brand) 60%, transparent); opacity: 0; pointer-events: none; }
.route-bar.run { opacity: 1; animation: routebar 8s cubic-bezier(.1,.7,.1,1) forwards; }
.route-bar.end { width: 100% !important; opacity: 0; animation: none; transition: width .2s ease, opacity .3s .15s; }
@keyframes routebar { 0% { width: 0; } 10% { width: 35%; } 60% { width: 75%; } 100% { width: 92%; } }
.route-pill { position: fixed; top: calc(var(--sa-t) + 70px); left: 50%; translate: -50% -10px; z-index: 199; width: 40px; height: 40px; border-radius: 50%; background: var(--surface); box-shadow: var(--shadow-lg); display: grid; place-items: center; color: var(--brand); opacity: 0; pointer-events: none; transition: opacity .2s, translate .2s; }
.route-pill.on { opacity: 1; translate: -50% 0; }

/* Couvertures générées */
.cover { position: relative; overflow: hidden; border-radius: 14px; color: #fff; isolation: isolate; }
.cover.card { height: 92px; }
.pack-card .cover.card { margin: -16px -16px 2px; border-radius: 16px 16px 0 0; }
.cover.hero { min-height: 170px; border-radius: var(--radius-lg); display: flex; align-items: flex-end; padding: 20px; box-shadow: 0 14px 30px rgba(15,23,42,.18); }
.cover-art { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.cover-icon { position: absolute; right: 14px; top: 12px; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: rgba(255,255,255,.2); backdrop-filter: blur(4px); }
.cover-icon svg { width: 26px; height: 26px; }
.cover.hero .cover-icon { width: 64px; height: 64px; border-radius: 20px; top: 18px; right: 18px; }
.cover.hero .cover-icon svg { width: 36px; height: 36px; }
.cover-text small { display: block; font-weight: 700; opacity: .85; font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; }
.cover-text b { display: block; font-size: 1.6rem; font-weight: 900; line-height: 1.15; letter-spacing: -.02em; text-shadow: 0 2px 10px rgba(0,0,0,.2); }

/* Upsell et paiement */
.upsell-hero { text-align: center; padding: 22px 16px 18px; border-radius: 20px; color: #fff; background: radial-gradient(120% 140% at 100% 0%, #0BB39B 0%, transparent 55%), linear-gradient(135deg, #6C5CE7, #3E31B8); }
.upsell-hero h2 { color: #fff; font-size: 1.4rem; margin-top: 10px; }
.upsell-hero p { opacity: .92; margin-top: 4px; }
.upsell-badge { width: 60px; height: 60px; margin: 0 auto; border-radius: 20px; display: grid; place-items: center; background: rgba(255,255,255,.2); animation: float 3s ease-in-out infinite; }
.upsell-badge svg { width: 32px; height: 32px; }
@keyframes float { 50% { transform: translateY(-5px); } }
.benefits { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.benefits li { display: flex; gap: 12px; align-items: flex-start; }
.benefits li > svg { width: 22px; height: 22px; color: var(--violet); margin-top: 2px; }
.benefits b { display: block; }
.benefits span { font-size: .85rem; color: var(--muted); }
.plan-list { display: grid; gap: 10px; }
.plan { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 14px; border-radius: 16px; border: 2px solid var(--line); background: var(--surface); transition: border-color .15s, box-shadow .15s, transform .1s; }
.plan:active { transform: scale(.99); }
.plan small { display: block; font-size: .78rem; color: var(--muted); }
.plan .price { font-size: 1.15rem; white-space: nowrap; }
.plan .radio { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); flex: none; display: grid; place-items: center; }
.plan.on { border-color: var(--violet); box-shadow: 0 0 0 4px color-mix(in srgb, var(--violet) 16%, transparent); }
.plan.on .radio { border-color: var(--violet); }
.plan.on .radio::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--violet); }
.pay-head { text-align: center; }
.pay-amount { font-size: 2.4rem; font-weight: 900; letter-spacing: -.03em; margin-top: 8px; }
.pay-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.pay-steps li { display: flex; gap: 12px; }
.pay-steps li > span { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--brand), var(--violet)); }
.pay-steps small { display: block; color: var(--muted); font-size: .85rem; margin-top: 2px; }
.btn.whatsapp.xl { box-shadow: 0 10px 24px rgba(37,211,102,.35); animation: breathe 2.4s ease-in-out infinite; }
@keyframes breathe { 50% { box-shadow: 0 10px 34px rgba(37,211,102,.55); transform: translateY(-1px); } }

.premium-hero h1 { color: #fff; font-size: 1.7rem; margin: 10px 0 12px; }
.perks { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.perks li { display: flex; gap: 10px; align-items: center; font-weight: 600; }
.perks svg { width: 20px; height: 20px; flex: none; }
.sticky-cta { position: sticky; bottom: calc(var(--nav-h) + var(--safe-b) + 8px); z-index: 5; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); padding: 10px 0 4px; }
.sticky-cta > * + * { margin-top: 6px; }
@media (min-width: 960px) { .sticky-cta { bottom: 12px; } }

/* Défi du jour */
.hero-card h1 { color: #fff; font-size: 1.7rem; margin: 10px 0 6px; }
.hero-card h1 small { font-size: 1rem; opacity: .9; }
.hero-card > * + * { margin-top: 8px; }
.big-count { font-size: 2rem; font-weight: 900; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.score-pill { min-width: 52px; text-align: center; padding: 6px 8px; border-radius: 12px; font-weight: 800; font-variant-numeric: tabular-nums; }
.score-pill.ok { background: var(--ok-50); color: var(--ok); }
.score-pill.mid { background: var(--amber-50); color: #A86200; }
.score-pill.low { background: var(--rose-50); color: var(--rose); }

/* Bouton d'appel à l'action lumineux (bordure animée) */
.cta-glow { --g1: var(--violet); --g2: var(--brand); position: relative; display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 16px; border-radius: 20px; color: var(--ink); background: var(--surface); border: 0; isolation: isolate; font: inherit; }
.cta-glow::before { content: ""; position: absolute; inset: -2px; z-index: -2; border-radius: 22px; background: conic-gradient(from var(--a, 0deg), var(--g1), var(--g2), var(--g1)); animation: spinborder 3s linear infinite; }
.cta-glow::after { content: ""; position: absolute; inset: 1px; z-index: -1; border-radius: 19px; background: var(--surface); }
.cta-glow.rose { --g1: #F0506E; --g2: #F5A524; }
.cta-glow b { display: block; font-size: 1.05rem; }
.cta-glow small { display: block; color: var(--muted); font-size: .84rem; }
.cta-glow > svg { width: 22px; height: 22px; color: var(--g1); }
.cta-ic { width: 48px; height: 48px; flex: none; border-radius: 16px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--g1), var(--g2)); }
.cta-ic svg { width: 26px; height: 26px; }
@property --a { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@keyframes spinborder { to { --a: 360deg; } }

/* Fiche pack : deux grands boutons d'action */
.mode-actions { display: grid; gap: 14px; }
.mode-btn { --g1: #0BB39B; --g2: #34D399; position: relative; display: flex; align-items: center; gap: 14px; width: 100%; padding: 18px 16px; border: 0; border-radius: 22px; color: #fff; text-align: left; font: inherit; overflow: hidden; isolation: isolate;
  background: linear-gradient(120deg, var(--g1), var(--g2)); box-shadow: 0 12px 26px color-mix(in srgb, var(--g1) 40%, transparent); animation: modepulse 2.8s ease-in-out infinite; transition: transform .12s; }
.mode-btn.exam { --g1: #6C5CE7; --g2: #EC5DB8; animation-delay: 1.4s; }
.mode-btn.locked { --g1: #475569; --g2: #6C5CE7; }
.mode-btn:active { transform: scale(.98); }
.mode-btn::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%); transform: translateX(-100%); animation: shine 3.2s ease-in-out infinite; }
.mode-btn.exam::before { animation-delay: 1.6s; }
.mode-btn::after { content: ""; position: absolute; inset: 0; border-radius: inherit; border: 2px solid rgba(255,255,255,.55); animation: blinkborder 1.6s ease-in-out infinite; pointer-events: none; }
.mode-btn.exam::after { animation-duration: 1.1s; }
.mode-ic { width: 54px; height: 54px; flex: none; border-radius: 18px; display: grid; place-items: center; background: rgba(255,255,255,.22); }
.mode-ic svg { width: 30px; height: 30px; }
.mode-txt { flex: 1; min-width: 0; }
.mode-txt b { display: block; font-size: 1.35rem; font-weight: 900; letter-spacing: -.02em; }
.mode-txt i { display: block; font-size: .78rem; opacity: .92; margin-top: 2px; }
.mode-go { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.22); flex: none; }
@keyframes shine { 0%, 55% { transform: translateX(-100%); } 85%, 100% { transform: translateX(100%); } }
@keyframes blinkborder { 50% { border-color: rgba(255,255,255,.08); } }
@keyframes modepulse { 50% { box-shadow: 0 16px 34px color-mix(in srgb, var(--g1) 55%, transparent); } }
.quota { margin-top: -4px; }

/* Lecteur : barres de temps */
.steps-dots { flex: 1; display: flex; gap: 4px; min-width: 0; }
.steps-dots span { flex: 1; height: 6px; border-radius: 6px; background: var(--surface-2); transition: background .3s; }
.steps-dots span.done { background: var(--brand); }
.steps-dots span.now { background: color-mix(in srgb, var(--brand) 45%, var(--surface-2)); }
.steps-dots span.locked { opacity: .4; }
.qbar, .sbar, .live-bar { height: 12px; border-radius: 12px; background: var(--surface-2); overflow: hidden; margin: 0 16px; }
.qbar { max-width: 680px; margin: 2px auto 6px; width: calc(100% - 32px); }
.qbar > span, .sbar > span, .live-bar > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand), #34D399); }
.qbar.warn > span, .live-bar.warn > span { background: linear-gradient(90deg, #F5A524, #FBBF24); }
.qbar.danger > span, .live-bar.danger > span { background: linear-gradient(90deg, #E5484D, #F0506E); animation: blinkbar .5s steps(2) infinite; }
.qbar.danger, .sbar.danger, .live-bar.danger { box-shadow: 0 0 0 2px color-mix(in srgb, var(--rose) 35%, transparent), 0 0 16px color-mix(in srgb, var(--rose) 45%, transparent); }
.is-exam .qbar { height: 16px; }
.sbar-wrap { width: 100%; max-width: 680px; margin: 0 auto; padding: 8px 16px 0; }
.sbar-label { display: flex; justify-content: space-between; font-size: .78rem; font-weight: 700; color: var(--muted); margin-bottom: 4px; }
.sbar-label b { font-variant-numeric: tabular-nums; color: var(--ink); }
.sbar { height: 16px; margin: 0; }
.sbar > span { background: linear-gradient(90deg, var(--violet), #A78BFA); }
.sbar.warn > span { background: linear-gradient(90deg, #F5A524, #F97316); }
.sbar.danger > span { background: linear-gradient(90deg, #F97316, #E5484D); animation: blinkbar .6s steps(2) infinite; }
@keyframes blinkbar { 50% { opacity: .45; } }
.player-foot.slim { padding-top: 4px; }
.player[translate] .player-body { -webkit-user-select: none; user-select: none; }

/* Correction juste sous les réponses */
.feedback-inline { margin-top: 14px; padding: 14px; border-radius: 18px; animation: slideUp .2s ease; }
.feedback-inline.ok { background: var(--ok-50); }
.feedback-inline.bad { background: var(--bad-50); }
.feedback-inline h3 { display: flex; align-items: center; gap: 8px; }
.feedback-inline.ok h3 { color: var(--ok); }
.feedback-inline.bad h3 { color: var(--bad); }
.feedback-inline .expl { margin-top: 6px; color: var(--ink-2); }
.fb-actions { display: flex; gap: 8px; margin-top: 12px; }
.feedback-inline.ok [data-next] { background: var(--ok); }
.feedback-inline.bad [data-next] { background: var(--bad); }
[data-next].auto { position: relative; overflow: hidden; }
[data-next].auto::after { content: ""; position: absolute; left: 0; bottom: 0; height: 4px; width: 100%; background: rgba(255,255,255,.7); transform-origin: left; animation: autofill 1.8s linear forwards; }
@keyframes autofill { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* Entrée du mode examen */
.exam-intro h1 { margin-top: 12px; }
.exam-seal { width: 76px; height: 76px; margin: 0 auto; border-radius: 26px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--violet), #EC5DB8); box-shadow: 0 12px 26px rgba(108,92,231,.35); }
.exam-seal svg { width: 40px; height: 40px; }
.rules { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.rules li { display: flex; gap: 12px; padding: 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.rules svg { width: 22px; height: 22px; color: var(--violet); flex: none; margin-top: 2px; }
.exam-go { background: linear-gradient(120deg, var(--violet), #EC5DB8); }

/* Cours */
.lesson h1 { font-size: 1.5rem; margin: 12px 0 14px; }
.lesson-body { font-size: 1.05rem; line-height: 1.7; }
.lesson-body p + p { margin-top: 12px; }
.lesson-body b { color: var(--ink); }
.lesson-body sup, .lesson-body sub, .q-body sup, .q-body sub { font-size: .7em; }
.lesson-foot { display: flex; gap: 10px; }
.lesson-end { padding-top: 40px; }

/* EXETAT */
.exetat-strip { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 18px; color: #fff; background: linear-gradient(120deg, #1E1B4B, #4C3FC4 55%, #6C5CE7); box-shadow: 0 10px 24px rgba(76,63,196,.3); }
.exetat-strip b { display: block; font-size: 1.05rem; }
.exetat-strip small { display: block; opacity: .85; font-size: .82rem; }
.exetat-strip.big { padding: 18px; }
.es-ic { width: 46px; height: 46px; flex: none; border-radius: 15px; display: grid; place-items: center; background: linear-gradient(135deg, #F5A524, #FBBF24); color: #3B2300; }
.exetat-hero { position: relative; overflow: hidden; border-radius: 28px; padding: 28px 22px; color: #fff; background: linear-gradient(135deg, #0F0C29, #302B63 60%, #24243E); }
.exetat-hero > * + * { margin-top: 12px; }
.exetat-hero .chip { background: rgba(255,255,255,.14); color: #fff; }
.exetat-hero h1 { font-size: clamp(2rem, 8vw, 3rem); font-weight: 900; letter-spacing: -.04em; color: #fff; }
.exetat-hero h1 em { font-style: normal; background: linear-gradient(90deg, #FBBF24, #F5A524, #FDE68A); -webkit-background-clip: text; background-clip: text; color: transparent; }
.exetat-hero p { opacity: .88; max-width: 560px; }
.exetat-glow { position: absolute; width: 320px; height: 320px; right: -80px; top: -120px; border-radius: 50%; background: radial-gradient(circle, rgba(245,165,36,.45), transparent 65%); pointer-events: none; }
.exetat-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.exetat-stats div { padding: 12px; border-radius: 16px; background: rgba(255,255,255,.08); }
.exetat-stats b { display: block; font-size: 1.4rem; font-weight: 900; }
.exetat-stats span { font-size: .75rem; opacity: .8; }
.method { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.m-step { padding: 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.m-step span { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; background: var(--violet); margin-bottom: 8px; }
.m-step b { display: block; font-size: .95rem; }
.m-step small { color: var(--muted); font-size: .78rem; }
.exday { border-radius: 24px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-top: 5px solid var(--c); }
.exday-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.exday-n { flex: none; padding: 6px 10px; border-radius: 12px; font-weight: 900; font-size: .82rem; color: #fff; background: var(--c); }
.exday-packs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.expack { position: relative; display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); color: inherit; background: var(--bg); transition: transform .15s; }
.expack:active { transform: scale(.98); }
.expack .cover.card { margin: 0; border-radius: 0; height: 70px; }
.expack-body { padding: 10px; display: flex; flex-direction: column; gap: 4px; }
.expack .lock { position: absolute; top: 8px; left: 8px; width: 26px; height: 26px; border-radius: 9px; display: grid; place-items: center; background: rgba(0,0,0,.35); color: #fff; }
.expack .lock svg { width: 15px; height: 15px; }
.expack.soon { opacity: .6; border-style: dashed; justify-content: center; min-height: 80px; }
@media (max-width: 520px) { .method { grid-template-columns: 1fr; } }

/* Classement */
.lb-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.lb-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.lb-tabs::-webkit-scrollbar { display: none; }
.lb-tabs button { flex: none; padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-weight: 700; font-size: .88rem; color: var(--ink-2); }
.lb-tabs button.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.lb-me { display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: 20px; color: #fff; background: linear-gradient(120deg, var(--brand-700), var(--violet)); box-shadow: 0 12px 26px rgba(108,92,231,.25); }
.lb-me small { display: block; opacity: .85; font-size: .78rem; }
.lb-me b { display: block; font-size: 1.5rem; font-weight: 900; }
.lb-me .grow span { display: block; font-size: .8rem; opacity: .9; }
.lb-me > .avatar { box-shadow: 0 0 0 3px rgba(255,255,255,.6); }
.lb-me-xp { text-align: right; }
.lb-me-xp b { font-size: 1.4rem; }
.lb-me .btn { background: #fff; color: var(--violet); }
.podium2 { display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: end; gap: 8px; text-align: center; margin-top: 8px; }
.pd { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.pd-av { position: relative; }
.pd .medal { position: absolute; top: -14px; left: 50%; translate: -50% 0; font-size: 1.3rem; }
.pd.p1 .pd-av .avatar { box-shadow: 0 0 0 4px #FBBF24; }
.pd.p2 .pd-av .avatar { box-shadow: 0 0 0 3px #CBD5E1; width: 60px; height: 60px; }
.pd.p3 .pd-av .avatar { box-shadow: 0 0 0 3px #D08A5B; width: 56px; height: 56px; }
.pd-name { font-size: .85rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 6px; }
.pd-score { font-size: .75rem; color: var(--muted); font-weight: 700; }
.pd-base { width: 100%; border-radius: 14px 14px 6px 6px; display: grid; place-items: center; font-weight: 900; font-size: 1.4rem; color: #fff; margin-top: 4px; }
.pd.p1 .pd-base { height: 92px; background: linear-gradient(180deg, #FBBF24, #D98B0A); }
.pd.p2 .pd-base { height: 68px; background: linear-gradient(180deg, #94A3B8, #64748B); }
.pd.p3 .pd-base { height: 52px; background: linear-gradient(180deg, #D08A5B, #A86438); }
.pd.me .pd-name { color: var(--brand-600); }
.lb-list { display: flex; flex-direction: column; gap: 6px; }
.lb-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.lb-row.me { border-color: var(--brand); background: var(--brand-50); }
.lb-rank { width: 26px; text-align: center; font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; }
.lb-bar { height: 5px; border-radius: 5px; background: var(--surface-2); margin-top: 5px; overflow: hidden; }
.lb-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand), var(--violet)); }
.lb-row small { color: var(--muted); font-weight: 600; font-size: .72rem; }

/* Jeux : commun */
.game-player .player-body { max-width: 520px; }
.big-emoji { font-size: 3.4rem; line-height: 1; }
.end-score { font-size: 2.2rem; font-weight: 900; }
.mode-choose { max-width: 380px; margin: 40px auto; text-align: center; }
.bl-pop { position: absolute; z-index: 5; translate: -50% 0; font-weight: 900; color: var(--ink); font-size: 1rem; pointer-events: none; animation: popup 1s ease-out forwards; text-shadow: 0 2px 6px rgba(255,255,255,.6); white-space: nowrap; }
.bl-pop.big { font-size: 1.4rem; background: linear-gradient(90deg, var(--violet), #EC5DB8); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; }
@keyframes popup { from { transform: translateY(0) scale(.7); opacity: 0; } 20% { transform: translateY(-10px) scale(1.1); opacity: 1; } to { transform: translateY(-46px) scale(1); opacity: 0; } }

/* Blocs */
.bl-wrap { position: relative; width: max-content; margin: 0 auto; }
.bl-board { display: grid; padding: 8px; border-radius: 18px; background: linear-gradient(160deg, #1E1B4B, #312E81); box-shadow: inset 0 2px 10px rgba(0,0,0,.35), 0 10px 24px rgba(30,27,75,.25); }
.bl-float { position: absolute; inset: 0; pointer-events: none; }
.bl-cell { border-radius: 7px; background: rgba(255,255,255,.07); transition: background .12s, transform .12s; }
.bl-cell.filled { background: var(--c); box-shadow: inset 0 -4px 0 rgba(0,0,0,.22), inset 0 3px 0 rgba(255,255,255,.3); }
.bl-cell.preview { background: color-mix(in srgb, var(--p) 55%, transparent); box-shadow: 0 0 0 2px var(--p) inset; }
.bl-cell.will-clear { animation: willclear .5s ease-in-out infinite alternate; }
.bl-cell.land { animation: land .25s ease-out; }
.bl-cell.clearing { animation: clearing .32s ease-in forwards; }
.bl-board.over .bl-cell.filled { filter: grayscale(.8) brightness(.8); transition: filter .6s; }
@keyframes willclear { to { box-shadow: 0 0 0 2px #fff inset, 0 0 12px rgba(255,255,255,.8); } }
@keyframes land { from { transform: scale(.6); } 70% { transform: scale(1.08); } }
@keyframes clearing { 40% { transform: scale(1.15); background: #fff; } to { transform: scale(0); opacity: 0; } }
.bl-cell.vanish { animation: blVanish .3s var(--d, 0ms) cubic-bezier(.4,0,.8,.4) forwards; z-index: 2; position: relative; }
@keyframes blVanish { 0% { transform: scale(1) rotate(0); } 20% { transform: scale(1.25) rotate(-8deg); background: #fff; box-shadow: 0 0 18px #fff; } 55% { transform: scale(1.1) rotate(10deg); } 100% { transform: scale(0) rotate(45deg); opacity: 0; } }
.bl-cell.filled:active { transform: scale(.92); }
.bl-tray { display: flex; justify-content: space-around; align-items: center; margin: 16px auto 0; max-width: 440px; min-height: 120px; gap: 8px; }
.bl-slot { flex: 1; min-height: 110px; display: grid; place-items: center; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); touch-action: none; cursor: grab; transition: transform .15s, opacity .15s, box-shadow .15s; }
.bl-slot.sel { box-shadow: 0 0 0 3px var(--brand); }
.bl-slot.lifted { opacity: .25; transform: scale(.9); }
.bl-slot.dead { opacity: .35; }
.bl-slot.empty { background: transparent; border-style: dashed; }
.bl-piece { display: grid; }
.bl-piece span { border-radius: 5px; background: var(--c); box-shadow: inset 0 -3px 0 rgba(0,0,0,.22), inset 0 2px 0 rgba(255,255,255,.3); }
.bl-ghost { position: fixed; left: 0; top: 0; z-index: 300; pointer-events: none; filter: drop-shadow(0 12px 16px rgba(0,0,0,.35)); }
.bl-ghost .bl-piece span { border-radius: 7px; }

/* Bonbons */
.cd-board { position: relative; margin: 0 auto; border-radius: 20px; background: radial-gradient(circle at 30% 20%, #FCE7F3, #FBCFE8 40%, #F9A8D4); box-shadow: inset 0 3px 12px rgba(157,23,77,.25), 0 10px 24px rgba(236,72,153,.25); touch-action: none; overflow: hidden; user-select: none; }
:root[data-theme="dark"] .cd-board { background: radial-gradient(circle at 30% 20%, #4A1D3F, #2E1530); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cd-board { background: radial-gradient(circle at 30% 20%, #4A1D3F, #2E1530); } }
.cd-fx { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.cd { position: absolute; left: 0; top: 0; margin: 2px; transition: transform .24s cubic-bezier(.3,1.3,.6,1), opacity .2s; will-change: transform; }
.cd::before { content: ""; position: absolute; inset: 8%; background: var(--cc); box-shadow: inset 0 -5px 0 rgba(0,0,0,.2), inset 0 4px 6px rgba(255,255,255,.55), 0 3px 6px rgba(0,0,0,.2); }
.cd::after { content: ""; position: absolute; width: 26%; height: 18%; left: 26%; top: 18%; border-radius: 50%; background: rgba(255,255,255,.75); transform: rotate(-25deg); }
.cd.t0 { --cc: radial-gradient(circle at 35% 30%, #FF8A9B, #E11D48); } .cd.t0::before { border-radius: 50%; }
.cd.t1 { --cc: radial-gradient(circle at 35% 30%, #FDE68A, #F59E0B); } .cd.t1::before { border-radius: 26%; }
.cd.t2 { --cc: radial-gradient(circle at 35% 30%, #C4B5FD, #7C3AED); } .cd.t2::before { inset: 16%; border-radius: 18%; transform: rotate(45deg); }
.cd.t3 { --cc: radial-gradient(circle at 35% 30%, #86EFAC, #16A34A); } .cd.t3::before { clip-path: polygon(25% 5%, 75% 5%, 100% 50%, 75% 95%, 25% 95%, 0 50%); }
.cd.t4 { --cc: radial-gradient(circle at 35% 30%, #7DD3FC, #0284C7); } .cd.t4::before { border-radius: 50% 50% 50% 8%; transform: rotate(-45deg); inset: 14%; }
.cd.t5 { --cc: radial-gradient(circle at 35% 30%, #FDBA74, #EA580C); } .cd.t5::before { clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); inset: 4%; }
.cd.sel { filter: brightness(1.15) drop-shadow(0 0 6px #fff); z-index: 2; }
.cd.sel::before { animation: wobble .6s ease-in-out infinite; }
.cd.pop { opacity: 0; transition: transform .22s ease-in, opacity .22s; }
.cd.pop::before { transform: scale(1.4); transition: transform .22s; }
.cd.hint::before { animation: hintpulse .9s ease-in-out infinite; }
.cd.nope { animation: shake .3s; }
@keyframes wobble { 50% { scale: 1.08; } }
@keyframes hintpulse { 50% { scale: 1.15; filter: brightness(1.3); } }
@keyframes shake { 25% { margin-left: -4px; } 75% { margin-left: 6px; } }

/* Dames */
.dm-hud { display: flex; align-items: center; justify-content: space-between; gap: 8px; max-width: 440px; margin: 0 auto 12px; }
.dm-side { display: flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 14px; background: var(--surface); border: 2px solid var(--line); transition: border-color .2s; }
.dm-side.on { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.dm-side small { color: var(--muted); font-size: .7rem; }
.dm-dot { width: 16px; height: 16px; border-radius: 50%; }
.dm-dot.white { background: #F8FAFC; border: 1px solid #CBD5E1; }
.dm-dot.black { background: #1F2937; }
.dm-msg { flex: 1; text-align: center; font-weight: 800; font-size: .95rem; }
.dm-msg small { display: block; color: var(--rose); font-size: .75rem; }
.dm-msg.end { color: var(--brand-600); font-size: 1.05rem; }
.dm-board { display: grid; width: max-content; margin: 0 auto; padding: 8px; border-radius: 14px; background: linear-gradient(135deg, #7C4A1E, #4A2A10); box-shadow: 0 14px 30px rgba(74,42,16,.4), inset 0 2px 0 rgba(255,255,255,.15); touch-action: none; user-select: none; }
.sq { position: relative; display: grid; place-items: center; }
.sq.light { background: #F3DEB4; }
.sq.dark { background: linear-gradient(135deg, #A86B3C, #8B5530); }
.sq.last { box-shadow: inset 0 0 0 3px rgba(250,204,21,.65); }
.dm-target { position: absolute; width: 32%; height: 32%; border-radius: 50%; background: rgba(34,197,94,.85); box-shadow: 0 0 0 4px rgba(34,197,94,.3); animation: hintpulse 1s ease-in-out infinite; }
.pc { width: 80%; height: 80%; border-radius: 50%; display: grid; place-items: center; font-size: 1.1rem; position: relative; z-index: 1; transition: transform .15s; }
.pc.white { background: radial-gradient(circle at 35% 30%, #fff, #E2E8F0 60%, #CBD5E1); color: #B45309; box-shadow: 0 4px 0 #94A3B8, 0 6px 8px rgba(0,0,0,.35); }
.pc.black { background: radial-gradient(circle at 35% 30%, #4B5563, #1F2937 60%, #111827); color: #FACC15; box-shadow: 0 4px 0 #000, 0 6px 8px rgba(0,0,0,.4); }
.pc.can { cursor: pointer; }
.pc.sel { transform: translateY(-4px) scale(1.06); box-shadow: 0 0 0 3px #22C55E, 0 10px 14px rgba(0,0,0,.4); }
.pc.arrive { animation: land .3s ease-out; }
.pc.king::after { content: ""; position: absolute; inset: 18%; border-radius: 50%; border: 2px dashed currentColor; opacity: .7; }
.pc.gone { position: absolute; animation: gone .5s ease-in forwards; }
@keyframes gone { to { transform: scale(0) rotate(90deg); opacity: 0; } }

/* Sudoku */
.sd-levels { display: flex; gap: 4px; }
.sd-levels button { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 6px 10px; font-weight: 700; font-size: .78rem; text-transform: capitalize; color: var(--muted); }
.sd-levels button.on { background: var(--brand); color: var(--on-brand, #fff); border-color: var(--brand); }
.sd-grid { display: grid; width: max-content; margin: 0 auto; border: 3px solid var(--ink); border-radius: 12px; overflow: hidden; background: var(--surface); }
.sd-c { border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); font-size: 1.25rem; font-weight: 700; padding: 0; transition: background .1s; }
.sd-c.br { border-right: 2px solid var(--ink); }
.sd-c.bb { border-bottom: 2px solid var(--ink); }
.sd-c.fx { color: var(--ink); }
.sd-c.us { color: var(--violet); }
.sd-c.rel { background: var(--surface-2); }
.sd-c.same { background: color-mix(in srgb, var(--brand) 22%, var(--surface)); }
.sd-c.cur { background: color-mix(in srgb, var(--brand) 40%, var(--surface)); }
.sd-c.err { background: var(--bad-50); color: var(--bad); animation: shake .3s; }
.sd-pad { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; max-width: 420px; margin: 16px auto 0; }
.sd-pad button { min-height: 52px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); font-size: 1.3rem; font-weight: 800; color: var(--ink); box-shadow: inset 0 -3px 0 var(--line); }
.sd-pad button:active { transform: translateY(2px); box-shadow: none; }
.sd-pad button:disabled { opacity: .3; }

/* Mots mêlés */
.mm-theme { flex: 1; text-align: center; font-weight: 800; color: var(--violet); font-size: .95rem; }
.mm-grid { display: grid; width: max-content; margin: 0 auto; padding: 6px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); touch-action: none; user-select: none; }
.mm-c { display: grid; place-items: center; font-weight: 800; color: var(--ink-2); border-radius: 8px; transition: background .1s, transform .1s; }
.mm-c.sel { background: var(--brand); color: var(--on-brand, #fff); transform: scale(1.06); }
.mm-c.found { background: hsl(var(--h) 75% 55% / .28); color: hsl(var(--h) 65% 35%); }
.mm-words { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 14px; }
.mm-words span { padding: 5px 10px; border-radius: 999px; background: var(--surface-2); font-weight: 700; font-size: .8rem; letter-spacing: .04em; }
.mm-words span.done { text-decoration: line-through; background: hsl(var(--h) 75% 55% / .25); color: var(--muted); }

/* Mémoire */
.mm-cards { display: grid; gap: 10px; width: max-content; margin: 0 auto; perspective: 800px; }
.flip { position: relative; border: 0; padding: 0; background: none; transform-style: preserve-3d; transition: transform .45s cubic-bezier(.3,1.3,.6,1); }
.flip.open { transform: rotateY(180deg); }
.flip .face { position: absolute; inset: 0; border-radius: 16px; display: grid; place-items: center; backface-visibility: hidden; box-shadow: inset 0 -4px 0 rgba(0,0,0,.12); }
.flip .back { background: linear-gradient(135deg, #EC5DB8, #7C6CF0); }
.flip .back::after { content: "?"; color: rgba(255,255,255,.55); font-weight: 900; font-size: 1.6rem; }
.flip .front { background: var(--surface); transform: rotateY(180deg); border: 2px solid var(--line); }
.flip.done .front { border-color: var(--ok); background: var(--ok-50); animation: land .35s; }

/* Défis */
.ch-card { padding: 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.ch-card.live { border-color: var(--rose); box-shadow: 0 0 0 3px color-mix(in srgb, var(--rose) 14%, transparent); }
.live-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--rose); animation: blinkbar 1s steps(2) infinite; }
.rank-badge { min-width: 38px; height: 32px; padding: 0 8px; border-radius: 11px; display: inline-grid; place-items: center; font-weight: 900; background: var(--surface-2); color: var(--ink-2); }
.rank-badge.r1 { background: linear-gradient(180deg, #FBBF24, #D98B0A); color: #fff; }
.rank-badge.r2 { background: linear-gradient(180deg, #CBD5E1, #64748B); color: #fff; }
.rank-badge.r3 { background: linear-gradient(180deg, #D08A5B, #A86438); color: #fff; }
.step-n { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: var(--on-brand, #fff); font-size: .85rem; margin-right: 6px; vertical-align: 2px; }
.game-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.gp { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px; border-radius: 16px; border: 2px solid var(--line); background: var(--surface); text-align: left; font: inherit; color: inherit; }
.gp span { font-size: 1.6rem; }
.gp small { color: var(--muted); font-size: .75rem; line-height: 1.3; }
.gp.on { border-color: var(--brand); background: var(--brand-50); }
.player-chip { padding: 4px 4px 4px 4px; }
.player-chip button { border: 0; background: none; padding: 0 2px; display: grid; place-items: center; color: var(--muted); }
.lobby-hero { text-align: center; padding: 10px 0; }
.lobby-hero h1 { margin-top: 10px; }
.vs-ic { width: 72px; height: 72px; margin: 0 auto; border-radius: 24px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #F0506E, #F5A524); animation: float 3s ease-in-out infinite; }
.vs-ic svg { width: 38px; height: 38px; }
.waiting-dots { display: flex; justify-content: center; gap: 8px; padding: 18px; }
.waiting-dots span { width: 10px; height: 10px; border-radius: 50%; background: var(--brand); animation: bounce 1.2s infinite; }
.waiting-dots span:nth-child(2) { animation-delay: .15s; }
.waiting-dots span:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 40% { transform: translateY(-10px); opacity: .5; } }
.countdown { display: flex !important; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; }
.cd-num { font-size: 7rem; font-weight: 900; line-height: 1; background: linear-gradient(135deg, var(--brand), var(--violet)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cd-num.pulse { animation: cdpulse .9s ease-out; }
@keyframes cdpulse { from { transform: scale(1.8); opacity: 0; } 30% { opacity: 1; } }
.live-bar { height: 14px; margin: 0 12px; }
.live-rank { display: flex; gap: 6px; overflow-x: auto; padding: 8px 12px 4px; scrollbar-width: none; }
.live-rank::-webkit-scrollbar { display: none; }
.lr { flex: none; display: flex; align-items: center; gap: 6px; padding: 5px 10px 5px 5px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: .82rem; }
.lr.me { border-color: var(--brand); background: var(--brand-50); }
.lr-pos { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .72rem; background: var(--surface-2); }
.lr:first-child .lr-pos { background: #FBBF24; color: #fff; }
.lr-score { font-weight: 800; font-variant-numeric: tabular-nums; color: var(--violet); }
.me-row { background: var(--brand-50); border-radius: 12px; }

/* Épreuves EXETAT : origine, texte de lecture, figures, formules */
.q-source { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: .74rem; font-weight: 700; color: var(--violet); }
.q-source svg { width: 14px; height: 14px; }
.passage { margin: 12px 0 4px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--sky); }
.passage > summary { list-style: none; cursor: pointer; padding: 12px 14px; display: flex; align-items: center; gap: 8px; font-weight: 800; color: #0369A1; }
.passage > summary::-webkit-details-marker { display: none; }
.passage > summary::after { content: "Afficher"; margin-left: auto; font-size: .75rem; font-weight: 700; color: var(--muted); }
.passage[open] > summary::after { content: "Masquer"; }
.passage-body { padding: 0 14px 14px; max-height: 42vh; overflow-y: auto; font-size: .95rem; line-height: 1.65; color: var(--ink-2); }
.passage-body p + p { margin-top: 8px; }
.q-fig { margin: 0 0 16px; text-align: center; }
.q-img { max-width: 100%; max-height: 38vh; margin: 0 auto; border-radius: 12px; background: #fff; border: 1px solid var(--line); cursor: zoom-in; }
.q-img.sm { max-height: 160px; margin: 6px 0; }
.q-fig figcaption { font-size: .72rem; color: var(--muted); margin-top: 4px; }
.choices.with-img .choice { align-items: center; }
.c-txt { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.c-img { max-width: min(220px, 100%); max-height: 110px; border-radius: 10px; background: #fff; }
.choice .katex, .q-body .katex, .feedback-inline .katex { font-size: 1.08em; }
.tex.block { display: block; overflow-x: auto; margin: 6px 0; }
.q-body .katex-display, .tex .katex-display { margin: .4em 0; }
.choice .c-txt { overflow-x: auto; }
.link-btn { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; padding: 4px 0; border: 0; background: none; color: var(--muted); font-size: .8rem; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.link-btn svg { width: 15px; height: 15px; }
.zoom-view img { width: 100%; max-height: 75vh; object-fit: contain; border-radius: 12px; background: #fff; margin-bottom: 12px; }

/* =====================================================================
   v4 — comparaison, jeux vivants, univers Premium, modes distincts
   ===================================================================== */

/* Aucun glissement ne doit recharger la page : ni dans un jeu, ni ailleurs */
html, body { overscroll-behavior-y: none; }
.player-body, .gm-stage, .sheet { overscroll-behavior: contain; }
.gboard, .mm-grid, .cd-board, .bl-tray, .bl-slot { touch-action: none; }

/* ------------------------------------------------------------------ Effets */
.fx-canvas { position: fixed; inset: 0; z-index: 250; pointer-events: none; }
.fx-flash { position: fixed; inset: 0; z-index: 240; pointer-events: none; }
.fx-fly { position: fixed; z-index: 260; pointer-events: none; font-weight: 900; font-size: 1.35rem; color: #FDE68A; text-shadow: 0 2px 0 rgba(0,0,0,.35), 0 0 14px rgba(251,191,36,.8); white-space: nowrap; }
.fx-pop { animation: fxpop .34s cubic-bezier(.2,1.8,.4,1); }
@keyframes fxpop { 40% { transform: scale(1.22); } }
.fx-score { animation: fxscore .42s cubic-bezier(.2,1.8,.4,1); }
@keyframes fxscore { 30% { transform: scale(1.14) translateY(-2px); filter: brightness(1.4); } }
.fx-delta { animation: fxdelta .9s ease-out forwards; }
@keyframes fxdelta { from { opacity: 0; transform: translateY(6px) scale(.8); } 20% { opacity: 1; transform: translateY(0) scale(1.1); } to { opacity: 0; transform: translateY(-16px); } }
.fx-shake { animation: fxshake .34s ease; }
.fx-shake-hard { animation: fxshake .6s ease; }
@keyframes fxshake { 15% { transform: translate(-5px, 3px); } 30% { transform: translate(6px, -4px); } 45% { transform: translate(-6px, -2px); } 60% { transform: translate(5px, 4px); } 80% { transform: translate(-3px, 1px); } }
.fx-pulse { animation: fxpulsebd .4s ease; }
@keyframes fxpulsebd { 40% { box-shadow: 0 0 0 4px rgba(255,255,255,.5), 0 0 34px rgba(255,255,255,.45); } }
.fx-spin { animation: fxspin .3s ease; }
@keyframes fxspin { from { transform: rotate(-90deg) scale(.8); } }
.fx-rankup { animation: fxrank .7s cubic-bezier(.2,1.8,.4,1); }
@keyframes fxrank { 30% { transform: scale(1.25) rotate(-3deg); box-shadow: 0 0 0 4px #FBBF24, 0 0 26px #FBBF24; } }
.fx-inflate { animation: fxinflate .8s cubic-bezier(.2,1.8,.4,1); }
@keyframes fxinflate { 0% { transform: scale(.4); opacity: 0; } 45% { transform: scale(1.3); opacity: 1; } 70% { transform: scale(.94); } }
.xp-burst { display: inline-flex; align-items: baseline; gap: 6px; padding: 8px 20px; border-radius: 999px; color: #fff; background: linear-gradient(120deg, var(--violet), #EC5DB8); box-shadow: 0 10px 26px color-mix(in srgb, var(--violet) 45%, transparent); }
.xp-burst b { font-size: 1.6rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.xp-burst span { font-size: .8rem; font-weight: 800; letter-spacing: .08em; }
.end-xp { min-height: 8px; display: flex; justify-content: center; }
.rank-toast { position: fixed; top: calc(var(--sa-t) + 74px); left: 50%; translate: -50% 0; z-index: 220; padding: 10px 16px; border-radius: 999px; font-weight: 800; font-size: .9rem; color: #2A1A00; background: linear-gradient(120deg, #FDE68A, #FBBF24); box-shadow: 0 10px 26px rgba(251,191,36,.45); animation: rtoast 2.4s ease forwards; white-space: nowrap; pointer-events: none; }
@keyframes rtoast { 0% { opacity: 0; transform: translateY(-12px) scale(.9); } 10%, 85% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-8px); } }

/* ------------------------------------------------------------------ Fenêtres : apparaissent et disparaissent */
.overlay.leaving { animation: fadeout .22s ease forwards; pointer-events: none; }
.overlay.leaving .sheet { animation: slideOut .22s ease forwards; }
@keyframes fadeout { to { opacity: 0; } }
@keyframes slideOut { to { transform: translateY(40%); opacity: 0; } }
.sheet { position: relative; transition: transform .2s ease; touch-action: pan-y; }
.sheet-x { position: absolute; top: 10px; right: 10px; z-index: 2; width: 34px; height: 34px; border: 0; border-radius: 50%; display: grid; place-items: center; color: var(--muted); background: var(--surface-2); }
.sheet-x svg { width: 16px; height: 16px; }

/* ------------------------------------------------------------------ Partage */
.share-head { display: flex; gap: 12px; align-items: center; padding-right: 30px; }
.share-badge { width: 48px; height: 48px; flex: none; border-radius: 16px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--brand), var(--violet)); }
.share-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.share-opt { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); text-align: left; font: inherit; color: var(--ink); transition: transform .1s; }
.share-opt:active { transform: scale(.97); }
.share-opt .ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: #fff; margin-bottom: 6px; background: var(--muted); }
.share-opt small { color: var(--muted); font-size: .72rem; line-height: 1.25; }
.share-opt.wa .ic { background: #25D366; } .share-opt.wa2 .ic { background: #128C7E; } .share-opt.fb .ic { background: #1877F2; } .share-opt.tk .ic { background: #111; } .share-opt.sm .ic { background: var(--sky); } .share-opt.cp .ic { background: var(--violet); }
.tile-share { position: absolute; top: 10px; right: 10px; z-index: 3; width: 34px; height: 34px; border: 0; border-radius: 50%; display: grid; place-items: center; color: #fff; background: rgba(15,23,42,.42); backdrop-filter: blur(4px); }
.tile-share svg { width: 16px; height: 16px; }
.game-tile .best { top: auto; bottom: 12px; right: 12px; }
.pack-card { position: relative; }
.games-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.pack-stats { display: flex; gap: 12px; font-size: .74rem; color: var(--muted); font-weight: 700; }
.pack-stats span { display: inline-flex; align-items: center; gap: 4px; }
.pack-stats svg { width: 13px; height: 13px; }
.card-play { margin-top: 8px; }
.feed-row .pack-card { width: 240px; }
.feed-end { display: grid; place-items: center; padding: 18px; color: var(--muted); }
.btn.liked { color: var(--rose); border-color: var(--rose); }
.btn.liked svg { fill: currentColor; }
.pack-actions .btn { flex: 1 1 auto; }
.share-big { background: linear-gradient(120deg, var(--brand), var(--violet)); box-shadow: 0 12px 28px color-mix(in srgb, var(--violet) 40%, transparent); animation: breathe 2.4s ease-in-out infinite; }

/* ------------------------------------------------------------------ Aide des premières fois */
.coach { position: fixed; inset: 0; z-index: 85; display: flex; align-items: flex-end; justify-content: center; padding: 16px 16px calc(24px + var(--safe-b)); background: rgba(2,6,23,.55); animation: fade .2s ease; }
.coach-card { position: relative; overflow: hidden; width: 100%; max-width: 400px; padding: 16px; border-radius: 22px; background: var(--surface); box-shadow: var(--shadow-lg); animation: slideUp .25s ease; }
.coach-card p { font-weight: 700; margin: 10px 0 12px; text-align: center; }
.coach-foot { display: flex; align-items: center; justify-content: space-between; }
.coach-dots { display: flex; gap: 6px; }
.coach-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line); }
.coach-dots i.on { background: var(--brand); }
.coach-bar { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--brand); transform-origin: left; animation: autofill linear forwards; }
.coach-demo { position: relative; height: 96px; border-radius: 14px; background: var(--surface-2); overflow: hidden; }
.coach-hand { position: absolute; left: 50%; top: 50%; font-size: 2.2rem; line-height: 1; translate: -50% -50%; filter: drop-shadow(0 4px 6px rgba(0,0,0,.3)); }
.demo-tap .coach-hand { animation: handtap 1.1s ease-in-out infinite; }
.demo-swipe .coach-hand { animation: handswipe 1.5s ease-in-out infinite; }
.demo-swipe-down .coach-hand { animation: handdown 1.5s ease-in-out infinite; }
.demo-drag-up .coach-hand { animation: handup 1.6s ease-in-out infinite; }
.demo-row .coach-trail { position: absolute; left: 12%; right: 12%; top: 50%; height: 14px; translate: 0 -50%; border-radius: 8px; background: linear-gradient(90deg, var(--brand), var(--violet)); animation: trail 1.5s ease-in-out infinite; transform-origin: left; }
.demo-row .coach-hand { animation: handswipe 1.5s ease-in-out infinite; }
@keyframes handtap { 50% { transform: scale(.82); } }
@keyframes handswipe { 0%, 100% { transform: translateX(-70px); } 50% { transform: translateX(70px); } }
@keyframes handdown { 0%, 100% { transform: translateY(-26px); } 50% { transform: translateY(26px); } }
@keyframes handup { 0% { transform: translateY(34px); } 70%, 100% { transform: translateY(-26px); } }
@keyframes trail { 0% { transform: scaleX(0); } 60%, 100% { transform: scaleX(1); } }

/* ------------------------------------------------------------------ Tableau de score vivant */
.hud-grid { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; }
.hud-box { position: relative; padding: 6px 8px; border-radius: 14px; text-align: center; color: #fff; background: linear-gradient(160deg, rgba(255,255,255,.14), rgba(255,255,255,.04)); border: 1px solid rgba(255,255,255,.14); box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 6px 14px rgba(0,0,0,.25); }
.hud-box small { display: flex; align-items: center; justify-content: center; gap: 3px; font-size: .6rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; opacity: .78; }
.hud-box small svg { width: 11px; height: 11px; }
.hud-box b { display: block; font-size: 1.16rem; font-weight: 900; font-variant-numeric: tabular-nums; line-height: 1.15; text-shadow: 0 2px 0 rgba(0,0,0,.35); }
.hud-score { background: linear-gradient(150deg, #22D3EE, #6366F1 70%); border-color: rgba(255,255,255,.3); }
.hud-score b { font-size: 1.45rem; text-shadow: 0 2px 0 rgba(30,27,75,.6), 0 0 16px rgba(255,255,255,.55); }
.hud-best.is-beaten { background: linear-gradient(150deg, #FDE68A, #F59E0B); color: #2A1A00; animation: fxrank .7s; }
.hud-best.is-beaten b { text-shadow: none; }
.hud-rank { background: linear-gradient(150deg, rgba(251,191,36,.35), rgba(251,191,36,.08)); border-color: rgba(251,191,36,.45); }
.hud-delta { position: absolute; left: 0; right: 0; top: -14px; font-style: normal; font-weight: 900; font-size: .85rem; color: #FDE68A; opacity: 0; pointer-events: none; text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.hud-ladder { height: 52px; overflow: hidden; margin-top: 6px; padding: 4px 8px; border-radius: 12px; color: #E2E8F0; background: rgba(255,255,255,.06); font-size: .76rem; }
.hl-row { display: flex; align-items: center; gap: 6px; line-height: 1.5; }
.hl-row.me { display: none; }
.hl-row.down { display: none; }
.hl-row b { margin-left: auto; font-variant-numeric: tabular-nums; }
.hl-pos { min-width: 20px; font-weight: 800; opacity: .7; }
.hl-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.hl-crown { color: #FBBF24; font-size: .9em; }
.hl-gap { margin: 2px 0 0; font-size: .72rem; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hl-empty { margin: 8px 0 0; text-align: center; opacity: .85; }
.record-burst { font-size: 4rem; line-height: 1; }
.record-burst.go { animation: fxinflate .8s cubic-bezier(.2,1.8,.4,1); }
.record-score { font-size: 2.6rem; font-weight: 900; font-variant-numeric: tabular-nums; background: linear-gradient(90deg, #F59E0B, #FBBF24, #FDE68A); -webkit-background-clip: text; background-clip: text; color: transparent; }
.record-list { text-align: left; padding: 10px 12px; border-radius: 14px; background: var(--surface-2); }
.record-list .hl-row { color: var(--ink); }
.end-compare { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; }
.end-compare > div { padding: 10px 6px; border-radius: 14px; background: var(--surface-2); }
.end-compare small { display: block; font-size: .68rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.end-compare b { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.end-score { font-size: 3rem; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; background: linear-gradient(120deg, var(--brand), var(--violet)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stars { display: flex; justify-content: center; gap: 6px; font-size: 2.2rem; line-height: 1; }
.stars span { color: var(--line); }
.stars span.on { color: #FBBF24; text-shadow: 0 0 14px rgba(251,191,36,.7); animation: fxinflate .6s cubic-bezier(.2,1.8,.4,1) backwards; }

/* ------------------------------------------------------------------ Salle de jeu : disposition fixe, sans défilement */
.mode-game { --bg: #070B16; background: radial-gradient(120% 80% at 50% 0%, #1B2352 0%, #0A0E1F 60%, #05070F 100%); color: #E8EDF7; }
.mode-game .player-top { padding-top: max(6px, var(--sa-t)); padding-bottom: 4px; }
.mode-game .icon-btn { color: #E2E8F0; }
.mode-game .icon-btn:hover { background: rgba(255,255,255,.1); }
.game-player { height: 100dvh; overflow: hidden; }
.gm-goal { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 10px 6px; padding: 7px 12px; border-radius: 12px; font-size: .82rem; font-weight: 800; color: #FDE68A; background: rgba(251,191,36,.12); border: 1px solid rgba(251,191,36,.32); }
.player:not(.mode-game) .gm-goal { color: #92400E; background: var(--amber-50); }
.gm-goal.boss { color: #fff; background: linear-gradient(120deg, #B91C1C, #7C3AED); border-color: transparent; }
.gm-goal svg { width: 16px; height: 16px; }
.gm-goal > span:first-of-type { flex: 1; min-width: 0; }
.gm-goal-bar { flex: 1 0 100%; height: 5px; border-radius: 5px; background: rgba(255,255,255,.14); overflow: hidden; }
.gm-goal-bar span { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #FDE68A, #F59E0B); transition: width .35s ease; }
.gm-layout { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.gm-side { display: contents; }
.gm-hud { order: 1; flex: none; padding: 0 10px 4px; }
.no-compare .gm-hud { display: none; }
.gm-stage { order: 2; flex: 1; min-height: 0; overflow: hidden; display: grid; place-items: center; padding: 6px; }
.gm-power { order: 3; flex: none; padding: 0 10px calc(6px + var(--safe-b)); }
.pw-bar { display: flex; align-items: center; justify-content: center; gap: 8px; }
.pw-btn { min-width: 62px; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 5px 8px; border-radius: 13px; border: 1px solid rgba(255,255,255,.18); color: #F8FAFC; background: linear-gradient(160deg, rgba(255,255,255,.18), rgba(255,255,255,.05)); font: inherit; }
.pw-btn:active { transform: scale(.94); }
.pw-btn small { font-size: .62rem; font-weight: 800; white-space: nowrap; }
.pw-ic { display: grid; place-items: center; height: 22px; font-weight: 900; font-size: 1.05rem; }
.pw-ic svg { width: 20px; height: 20px; }
.pw-count { display: inline-flex; align-items: center; gap: 3px; padding: 6px 10px; border-radius: 999px; font-weight: 900; font-size: .85rem; color: #2A1A00; background: linear-gradient(120deg, #FDE68A, #FBBF24); }
.pw-count svg { width: 14px; height: 14px; }
.pw-count.empty { color: #fff; background: #475569; }
.quiz-powers { margin-top: 14px; }
.quiz-powers .pw-btn { color: var(--ink); background: var(--surface); border-color: var(--line); }
.choice.gone { opacity: .18; pointer-events: none; }
.q-hud { padding: 0 12px 6px; width: 100%; max-width: 680px; margin: 0 auto; }
.q-hud .hud-grid { color: #fff; }
.q-hud .hud-box:not(.hud-score) { color: var(--ink); background: var(--surface); border-color: var(--line); box-shadow: var(--shadow-sm); }
.q-hud .hud-box:not(.hud-score) b { text-shadow: none; }
.q-hud .hud-ladder { color: var(--ink-2); background: var(--surface-2); height: 50px; }
.arena-stage { display: grid; place-items: center; overflow: hidden; max-width: none; padding: 6px; }
.arena-stage > .q-count, .arena-stage > .q-body, .arena-stage > .choices { width: 100%; max-width: 640px; justify-self: center; }
.arena-stage:has(.choices) { display: block; overflow-y: auto; max-width: 680px; }

@media (min-width: 900px) {
  .gm-layout { flex-direction: row; gap: 16px; padding: 0 20px 16px; max-width: 1200px; width: 100%; margin: 0 auto; }
  .gm-side { display: flex; flex-direction: column; gap: 12px; flex: 0 0 300px; }
  .gm-hud { padding: 0; }
  .gm-power { padding: 0; }
  .hud-grid { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hud-score { grid-column: 1 / -1; padding: 14px; }
  .hud-score b { font-size: 2.4rem; }
  .hud-ladder { height: auto; min-height: 90px; padding: 10px 12px; font-size: .86rem; }
  .hl-row.me, .hl-row.down { display: flex; }
  .hl-row.me { color: #FDE68A; }
  .pw-bar { flex-wrap: wrap; justify-content: flex-start; }
  .gm-goal { max-width: 1160px; width: calc(100% - 40px); margin: 0 auto 10px; }
  .gm-stage { padding: 8px; }
}

/* Présentation d'un jeu */
.gp-hero { position: relative; overflow: hidden; padding: 22px 18px; border-radius: 24px; color: #fff; text-align: center; box-shadow: 0 14px 30px rgba(15,23,42,.25); }
.gp-hero h1 { font-size: 1.8rem; color: #fff; }
.gp-emoji { font-size: 3.4rem; line-height: 1; display: block; animation: float 3s ease-in-out infinite; }
.gp-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.gp-stats div { padding: 8px 4px; border-radius: 14px; background: rgba(255,255,255,.16); }
.gp-stats small { display: block; font-size: .66rem; font-weight: 700; opacity: .9; }
.gp-stats b { font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.brain-ic { width: 46px; height: 46px; flex: none; border-radius: 15px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--violet), #EC5DB8); }
.brain-ic.big { width: 66px; height: 66px; border-radius: 22px; margin: 0 auto; }
.brain-ic.big svg { width: 34px; height: 34px; }
.brain-head { display: flex; gap: 12px; align-items: center; padding-right: 30px; }
.q-body.sm { font-size: 1.05rem; margin: 6px 0 12px; }

/* ------------------------------------------------------------------ Joyaux */
.cd-stage { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.cd-board { background: linear-gradient(160deg, #0B1020, #050814) !important; border: 2px solid rgba(255,255,255,.14); box-shadow: inset 0 0 40px rgba(0,0,0,.8), 0 16px 34px rgba(0,0,0,.5); }
.cd-board.aiming { outline: 3px solid #FBBF24; outline-offset: 2px; cursor: crosshair; }
.cd { width: var(--cell); height: var(--cell); transition: transform .22s cubic-bezier(.3,1.25,.6,1), opacity .2s; }
.cd::before, .cd::after { content: none; }
.cd-tile { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 26%; color: #070B16; background: linear-gradient(160deg, color-mix(in srgb, var(--tc) 72%, #fff), var(--tc) 55%, color-mix(in srgb, var(--tc) 72%, #000)); box-shadow: inset 0 2px 0 rgba(255,255,255,.65), inset 0 -3px 0 rgba(0,0,0,.28), 0 3px 6px rgba(0,0,0,.55); }
.cd-tile svg { width: 66%; height: 66%; filter: drop-shadow(0 1px 0 rgba(255,255,255,.4)); }
.cd.sel .cd-tile { outline: 3px solid #fff; outline-offset: 1px; transform: scale(1.08); }
.cd.sel::before { content: none; }
.cd.hint .cd-tile { animation: hintpulse .9s ease-in-out infinite; }
.cd.pop { opacity: 0; transform-origin: center; }
.cd.pop .cd-tile { transform: scale(1.5); transition: transform .2s ease-in; }
.cd.nope .cd-tile { animation: shake .3s; }
.cd-born .cd-tile { animation: fxinflate .55s cubic-bezier(.2,1.8,.4,1); }
.cd-tile[class*="sp-"] { color: #fff; background: radial-gradient(circle at 50% 40%, var(--tc), #111827 78%); box-shadow: 0 0 0 2px #fff, 0 0 14px var(--tc), inset 0 2px 0 rgba(255,255,255,.4); animation: spglow 1.4s ease-in-out infinite; }
.cd-tile.sp-prism { background: conic-gradient(from 0deg, #F43F5E, #F59E0B, #22C55E, #06B6D4, #8B5CF6, #F43F5E); animation: spglow 1s ease-in-out infinite, prism 3s linear infinite; }
.cd-tile.sp-nova { color: #713F12; background: radial-gradient(circle, #fff, #FDE047 55%, #F59E0B); box-shadow: 0 0 0 2px #fff, 0 0 26px #FDE047; }
@keyframes spglow { 50% { filter: brightness(1.28); transform: scale(1.04); } }
@keyframes prism { to { background-position: 100% 0; filter: hue-rotate(360deg); } }
.cd-legend { max-width: 480px; text-align: center; font-size: .66rem; font-weight: 700; color: rgba(226,232,240,.75); line-height: 1.3; }
.bl-pop.huge { font-size: 1.5rem; font-weight: 900; color: #FDE68A; background: none; -webkit-text-fill-color: currentColor; text-shadow: 0 2px 0 rgba(0,0,0,.55), 0 0 16px rgba(251,191,36,.8); }
.cd-fx { z-index: 5; }

/* Blocs */
.bl-stage { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; }
.bl-cell { width: var(--cell); height: var(--cell); }
.bl-cell.rock { background: repeating-linear-gradient(45deg, #475569, #475569 6px, #334155 6px, #334155 12px); box-shadow: inset 0 -3px 0 rgba(0,0,0,.3); }
.bl-board { background: linear-gradient(160deg, #0F1533, #1B1F4A); border: 2px solid rgba(255,255,255,.1); }
.bl-board.aiming .bl-cell.filled { cursor: pointer; animation: hintpulse 1s ease-in-out infinite; }
.bl-tray { margin: 0; width: 100%; min-height: 104px; }
.bl-slot { min-width: 0; min-height: 100px; background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.14); position: relative; }
.bl-slot.empty { background: transparent; border-color: rgba(255,255,255,.12); }
.bl-slot.turning { box-shadow: 0 0 0 2px #FBBF24; cursor: pointer; }
.bl-turn { position: absolute; top: 3px; right: 6px; color: #FBBF24; font-weight: 900; }
.bl-mode { position: absolute; left: 50%; bottom: 8px; translate: -50% 0; z-index: 6; width: max-content; max-width: 92%; padding: 6px 12px; border-radius: 999px; font-size: .78rem; font-weight: 800; color: #2A1A00; background: #FBBF24; pointer-events: none; text-align: center; }
.mode-game .bl-pop { color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,.6); }

/* Mots mêlés */
.mm-stage { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; }
.mode-game .mm-theme { flex: none; color: #C7D2FE; margin: 0; font-size: .86rem; }
.mm-grid, .mode-game .mm-grid { background: #F8FAFC; color: #0F172A; border: 0; box-shadow: 0 16px 34px rgba(0,0,0,.45); }
.iv-gamebox .mm-theme { color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.5); }
.iv-gamebox .mm-words span { background: #fff; color: #12325A; }
.iv-gamebox .mm-words span.done { background: hsl(var(--h) 75% 88%); color: #475569; }
.mm-grid { align-content: start; }
.mm-c { color: #1E293B; line-height: 1; font-weight: 800; transition: background .08s; }
.mm-c.sel { transform: none; background: var(--brand); color: var(--on-brand, #fff); border-radius: 6px; }
.mm-c.found { color: hsl(var(--h) 70% 25%); background: hsl(var(--h) 85% 62% / .5); }
.mm-c.mm-hint { outline: 3px solid #F59E0B; outline-offset: -2px; animation: hintpulse .9s ease-in-out infinite; }
.mm-words { margin-top: 0; max-height: 84px; overflow: hidden; }
.mode-game .mm-words span { background: rgba(255,255,255,.12); color: #E2E8F0; }
.mode-game .mm-words span.done { color: #94A3B8; }

/* Sudoku, mémoire, dames dans la salle sombre */
.sd-stage { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; }
.sd-pad { margin: 0; width: 100%; max-width: 460px; grid-template-columns: repeat(10, 1fr); gap: 4px; }
.sd-pad button { min-height: 44px; font-size: 1.1rem; padding: 0; border-radius: 10px; }
.mode-game .sd-grid { border-color: #0F172A; box-shadow: 0 16px 34px rgba(0,0,0,.45); --surface: #F8FAFC; --surface-2: #E2E8F0; --ink: #0F172A; --line: #CBD5E1; color: #0F172A; }
.mode-game .sd-pad button { --surface: rgba(255,255,255,.12); --ink: #fff; --line: rgba(255,255,255,.2); color: #fff; }
.mode-game .sd-levels button { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.2); color: #E2E8F0; }
.mode-game .sd-levels button.on { background: var(--brand); color: var(--on-brand, #fff); }
.mode-game .flip .front { --surface: #F8FAFC; }
.mode-game .dm-side { --surface: rgba(255,255,255,.1); --line: rgba(255,255,255,.2); color: #E2E8F0; }
.mm-cards { align-content: center; }
.flip .back { background: linear-gradient(135deg, #4338CA, #7C3AED); }

/* ------------------------------------------------------------------ Carte des niveaux */
.lv-hero { display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: 22px; color: #fff; background: linear-gradient(120deg, #1E1B4B, var(--tc, #6C5CE7)); box-shadow: 0 12px 26px rgba(30,27,75,.3); }
.lv-emoji { font-size: 2.6rem; line-height: 1; }
.lv-hero small { font-weight: 700; opacity: .85; }
.lv-hero h1 { color: #fff; font-size: 1.5rem; }
.lv-hero em { font-style: normal; font-size: .9rem; opacity: .75; font-weight: 700; }
.lv-progress { height: 6px; border-radius: 6px; margin: 8px 0 6px; background: rgba(255,255,255,.2); overflow: hidden; }
.lv-progress span { display: block; height: 100%; background: linear-gradient(90deg, #FDE68A, #F59E0B); }
.lv-next { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 18px; color: var(--ink); background: var(--surface); border: 2px solid var(--brand); }
.lv-next b { display: block; }
.lv-next small { color: var(--muted); }
.lv-next .cta-ic { --g1: var(--brand); --g2: var(--violet); }
.lv-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .74rem; font-weight: 700; color: var(--muted); }
.lv-legend span { display: inline-flex; align-items: center; gap: 4px; }
.lv-legend svg { width: 14px; height: 14px; }
.lv-path { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 8px; padding: 10px 0; }
.lv-sq { position: relative; width: 66px; height: 66px; justify-self: center; display: grid; place-items: center; border-radius: 22px; font-weight: 900; font-size: 1.1rem; color: #fff; background: linear-gradient(160deg, var(--brand), var(--brand-700)); box-shadow: 0 6px 0 var(--brand-700), 0 12px 18px rgba(0,0,0,.2); transition: transform .1s; }
.lv-sq:active { transform: translateY(3px); }
.lv-sq.s0 { grid-column: 1; } .lv-sq.s1 { grid-column: 2; } .lv-sq.s2 { grid-column: 3; }
.lv-sq.done { background: linear-gradient(160deg, #FBBF24, #D97706); box-shadow: 0 6px 0 #B45309, 0 12px 18px rgba(0,0,0,.2); }
.lv-sq.locked { color: var(--muted); background: var(--surface-2); box-shadow: 0 6px 0 var(--line); }
.lv-sq.locked svg { width: 20px; height: 20px; }
.lv-sq.now { animation: nowpulse 1.6s ease-in-out infinite; }
.lv-sq.boss:not(.locked) { background: linear-gradient(160deg, #EF4444, #7C3AED); box-shadow: 0 6px 0 #4C1D95, 0 12px 18px rgba(0,0,0,.25); width: 76px; height: 76px; }
.lv-sq.chance:not(.locked):not(.done) { background: linear-gradient(160deg, #EC4899, #F59E0B); box-shadow: 0 6px 0 #BE185D, 0 12px 18px rgba(0,0,0,.2); }
.lv-sq.quiz:not(.locked):not(.done) { background: linear-gradient(160deg, #0EA5E9, #6366F1); box-shadow: 0 6px 0 #3730A3, 0 12px 18px rgba(0,0,0,.2); }
.sq-tag { position: absolute; top: -7px; right: -7px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: var(--ink); background: var(--surface); box-shadow: var(--shadow); }
.sq-tag svg { width: 14px; height: 14px; }
.lv-pawn { position: absolute; top: -22px; left: 50%; translate: -50% 0; font-size: 1.5rem; animation: bounce 1.2s infinite; }
@keyframes nowpulse { 50% { filter: brightness(1.15); box-shadow: 0 6px 0 var(--brand-700), 0 0 0 7px color-mix(in srgb, var(--brand) 30%, transparent); } }

/* ------------------------------------------------------------------ Défis */
.dc-grid { display: grid; gap: 12px; margin-top: 12px; }
@media (min-width: 720px) { .dc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dc-block .dc-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); } }
.dc { display: flex; flex-direction: column; gap: 12px; padding: 14px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 2px 0 var(--line), 0 12px 26px rgba(15,23,42,.1); transition: transform .15s; }
.dc:hover { transform: translateY(-2px); }
.dc.live { border-color: color-mix(in srgb, var(--rose) 60%, var(--line)); }
.dc-main { display: flex; flex-direction: column; gap: 10px; color: inherit; }
.dc-top { display: flex; gap: 10px; align-items: flex-start; }
.dc-emoji { width: 46px; height: 46px; flex: none; border-radius: 15px; display: grid; place-items: center; font-size: 1.5rem; background: var(--surface-2); }
.dc-type { font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.dc-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .8rem; font-weight: 700; color: var(--ink-2); }
.dc-meta span { display: inline-flex; align-items: center; gap: 4px; }
.dc-meta svg { width: 14px; height: 14px; color: var(--muted); }
.dc-by { display: flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 600; }
.dc-actions { display: flex; gap: 8px; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 16px; }
.wz-head { display: flex; gap: 8px; align-items: flex-start; padding-right: 30px; margin-bottom: 14px; }
.wz-steps { display: flex; gap: 5px; margin-bottom: 8px; }
.wz-steps span { flex: 1; height: 5px; border-radius: 5px; background: var(--surface-2); }
.wz-steps span.on { background: var(--brand); }
.wz-types { display: grid; gap: 10px; }
.wz-type { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; padding: 18px; border-radius: 18px; border: 2px solid var(--line); background: var(--surface); text-align: left; font: inherit; color: var(--ink); transition: border-color .15s, transform .1s; }
.wz-type:hover { border-color: var(--brand); }
.wz-type:active { transform: scale(.98); }
.wz-type span { font-size: 2rem; }
.wz-type b { font-size: 1.15rem; }
.wz-type small { color: var(--muted); }
.wz-list { display: flex; flex-direction: column; gap: 4px; max-height: 48dvh; overflow-y: auto; margin-top: 8px; }
.wz-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px; border: 0; border-radius: 12px; background: none; text-align: left; font: inherit; color: var(--ink); }
.wz-row:hover { background: var(--surface-2); }
.wz-row small { display: block; color: var(--muted); font-size: .76rem; }
.wz-ic { width: 38px; height: 38px; flex: none; border-radius: 12px; display: grid; place-items: center; font-size: 1.2rem; background: var(--surface-2); }

/* ------------------------------------------------------------------ Parcours */
.jr-card { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 18px; color: inherit; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.jr-card.expired { opacity: .6; }
.jr-dots { display: flex; gap: 5px; }
.jr-dots span, .jr-dots i { flex: 1; max-width: 36px; height: 7px; border-radius: 7px; background: var(--surface-2); }
.jr-dots .done { background: var(--brand); }
.jr-dots .now { background: var(--amber); animation: blinkbar 1.2s steps(2) infinite; }
.jr-home { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 18px; color: inherit; background: var(--surface); border: 2px solid var(--violet); }
.jr-home.done { border-color: var(--ok); }
.jr-home small { display: block; color: var(--muted); font-size: .76rem; font-weight: 700; }
.jr-home b { display: block; margin-bottom: 6px; }
.jr-home-ic { width: 46px; height: 46px; flex: none; border-radius: 15px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--violet), #EC5DB8); }
.jr-hero { padding: 18px; border-radius: 22px; color: #fff; background: linear-gradient(120deg, #312E81, #6C5CE7); }
.jr-hero h1 { color: #fff; font-size: 1.4rem; }
.jr-stats { display: flex; gap: 10px; margin: 10px 0 4px; }
.jr-stats div { flex: 1; padding: 8px; text-align: center; border-radius: 12px; background: rgba(255,255,255,.14); }
.jr-stats b { display: block; font-size: 1.15rem; }
.jr-stats small { font-size: .7rem; opacity: .85; }
.jr-path { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.jr-step { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.jr-step small { display: block; color: var(--muted); font-size: .78rem; }
.jr-step.now { border: 2px solid var(--brand); }
.jr-step.locked { opacity: .55; }
.jr-n { width: 36px; height: 36px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 900; color: #fff; background: var(--muted); }
.jr-step.done .jr-n { background: var(--ok); }
.jr-step.now .jr-n { background: var(--brand); }
.resume-emoji { font-size: 1.6rem; }

/* Accueil */
.week-strip { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px; color: #fff; background: linear-gradient(120deg, #0F172A, #312E81); box-shadow: 0 10px 22px rgba(15,23,42,.25); }
.ws-rank { min-width: 56px; height: 56px; padding: 0 6px; border-radius: 16px; display: flex; align-items: center; justify-content: center; color: #2A1A00; background: linear-gradient(135deg, #FDE68A, #F59E0B); }
.ws-rank b { font-size: 1.5rem; font-weight: 900; }
.ws-rank small { font-weight: 800; }
.week-strip .grow small { display: block; font-size: .72rem; opacity: .8; }
.week-strip .grow b { font-size: .92rem; }
.ws-xp { text-align: right; font-weight: 900; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.ws-xp small { display: block; font-size: .66rem; opacity: .8; }
.week-list { display: flex; flex-direction: column; gap: 6px; }
.week-row { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.week-row a { color: inherit; min-width: 0; }
.week-row.cur { border-color: var(--brand); }
.hist-filter { margin-bottom: 10px; }
.icon-btn.sm { width: 34px; height: 34px; }
.lb-row.vip { border-color: rgba(251,191,36,.6); }
.pd.vip .pd-av .avatar { box-shadow: 0 0 0 3px #FBBF24, 0 0 14px rgba(251,191,36,.6); }

/* ------------------------------------------------------------------ Connexion */
.auth-box { padding-top: 6px; }
.auth-head { display: flex; justify-content: center; }
.auth-head img { height: 26px; width: auto; }
.auth-why { margin-top: 8px; padding: 8px 12px; border-radius: 12px; font-size: .86rem; font-weight: 700; color: var(--brand-700); background: var(--brand-50); }
.auth-accounts { border: 1px solid var(--line); border-radius: 14px; padding: 4px; }
.auth-accounts .rank-row { cursor: pointer; transition: background .15s; }
.auth-accounts .rank-row:hover, .auth-accounts .rank-row:focus-visible { background: color-mix(in srgb, var(--brand, #0BB39B) 10%, transparent); outline: none; }
.auth-accounts .rank-row.busy { opacity: .7; pointer-events: none; }
.auth-accounts .rank-row.busy .avatar { animation: splash 1s ease-in-out infinite; }
.g-btn.pulse { border-radius: 999px; animation: gpulse 1.2s ease-in-out 3; }
@keyframes gpulse { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, #4285F4 35%, transparent); } }
/* Déconnexion : voile immédiat pendant que le serveur est prévenu, puis rechargement complet */
.logout-veil { position: fixed; inset: 0; z-index: 1000; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: color-mix(in srgb, var(--bg, #F5F6FA) 88%, transparent); backdrop-filter: blur(4px); color: var(--ink, #0F172A); font-size: 1.05rem; animation: veilIn .2s; }
@keyframes veilIn { from { opacity: 0; } }
@keyframes splash { 50% { transform: scale(.96); opacity: .75; } }
.logout-veil .spinner { width: 34px; height: 34px; color: var(--brand, #0BB39B); }
.g-btn { min-height: 44px; display: flex; justify-content: center; }
.g-block > * + * { margin-top: 8px; }
.or-line { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .85rem; }
.or-line span { flex: 1; height: 1px; background: var(--line); }
.has-eye .input { padding-right: 48px; }
.eye { position: absolute; right: 6px; top: 50%; translate: 0 -50%; width: 40px; height: 40px; border: 0; border-radius: 10px; display: grid; place-items: center; color: var(--muted); background: none; }
.eye:hover { background: var(--surface-2); }
.eye svg { width: 20px; height: 20px; }
.link-inline { border: 0; padding: 0; background: none; font: inherit; font-weight: 800; color: var(--brand-600); }
.hdr-me { position: relative; }

/* Compagnon */
.cp-head { display: flex; gap: 10px; align-items: center; padding-right: 30px; }
.cp-head small { display: block; font-size: .72rem; font-weight: 700; color: var(--muted); }
.cp-avatar { width: 44px; height: 44px; flex: none; border-radius: 50%; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--brand), var(--violet)); animation: float 3s ease-in-out infinite; }
.cp-options { display: grid; gap: 8px; }
.cp-options.multi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cp-opt { padding: 12px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface); font: inherit; font-weight: 700; font-size: .9rem; text-align: left; color: var(--ink); }
.cp-opt:hover { border-color: var(--brand); }
.cp-opt.on { border-color: var(--brand); background: var(--brand-50); }

/* ------------------------------------------------------------------ Simulation EXETAT */
.sim-player { background: radial-gradient(120% 70% at 50% 0%, #2A2110 0%, #0E0B05 60%, #050402 100%); color: #F7EFD9; --ink: #F7EFD9; --ink-2: #D9CDAE; --muted: #A2946F; --line: #3A2F18; --surface: #17130A; --surface-2: #231C0E; }
.sim-player .icon-btn { color: #F7EFD9; }
.sim-intro { display: grid; place-items: center; }
.sim-card { width: 100%; max-width: 520px; padding: 24px 20px; border-radius: 26px; background: linear-gradient(170deg, #1E1810, #120E07); border: 1px solid rgba(217,169,58,.4); box-shadow: 0 20px 44px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.08); animation: slideUp .3s ease; }
.sim-card h1 { color: #FBE9B7; font-size: 1.55rem; }
.sim-card p { color: #D9CDAE; line-height: 1.55; }
.sim-seal { width: 84px; height: 84px; margin: 0 auto; border-radius: 28px; display: grid; place-items: center; color: #2A1A00; background: linear-gradient(135deg, #FDE68A, #D9A93A); box-shadow: 0 12px 30px rgba(217,169,58,.45); animation: float 3s ease-in-out infinite; }
.sim-seal svg { width: 44px; height: 44px; }
.sim-kicker { font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #E7B94A; }
.sim-note { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 14px; font-size: .88rem; color: #F7EFD9; background: rgba(217,169,58,.14); }
.sim-note svg { flex: none; color: #E7B94A; }
.sim-opt { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 14px; border-radius: 14px; border: 1px solid rgba(217,169,58,.4); background: rgba(217,169,58,.08); font: inherit; font-weight: 700; color: #F7EFD9; }
.btn.gold { color: #2A1A00; background: linear-gradient(120deg, #FDE68A, #D9A93A); box-shadow: 0 10px 26px rgba(217,169,58,.35); }
.btn.gold:hover { background: linear-gradient(120deg, #FEF3C7, #E7B94A); }
.gold-chip { color: #2A1A00; background: linear-gradient(120deg, #FDE68A, #D9A93A); }
.sim-days { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sim-days li { display: flex; gap: 12px; padding: 12px; border-radius: 16px; background: rgba(255,255,255,.04); border: 1px solid rgba(217,169,58,.2); }
.sim-days li.now { border-color: #E7B94A; }
.sim-dn { width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 900; color: #2A1A00; background: #8A7A52; }
.sim-days li.now .sim-dn, .sim-days li.done .sim-dn { background: linear-gradient(120deg, #FDE68A, #D9A93A); }
.sim-eps { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: .76rem; color: #A2946F; margin-top: 2px; }
.sim-eps .ok { color: #FBE9B7; font-weight: 700; }
.sim-cta { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 20px; color: #F7EFD9; background: linear-gradient(120deg, #17130A, #3A2C0F); border: 1px solid rgba(217,169,58,.55); box-shadow: 0 12px 28px rgba(58,44,15,.35); }
.sim-cta small { display: block; color: #E7B94A; font-weight: 700; font-size: .74rem; }
.sim-cta b { display: block; font-size: 1.15rem; }
.sim-cta span span { font-size: .82rem; opacity: .9; }
.sim-ic { width: 50px; height: 50px; flex: none; border-radius: 16px; display: grid; place-items: center; color: #2A1A00; background: linear-gradient(135deg, #FDE68A, #D9A93A); }

/* Marque blanche */
.inst-page { background: var(--bg); }
.inst-hero { padding: max(18px, var(--sa-t)) 18px 20px; text-align: center; color: #fff; background: linear-gradient(150deg, var(--ic), color-mix(in srgb, var(--ic) 55%, #000)); }
.inst-hero img { height: 56px; margin: 0 auto 8px; border-radius: 12px; background: #fff; padding: 4px; }
.inst-mono { display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto 8px; border-radius: 16px; font-weight: 900; font-size: 1.3rem; color: var(--ic); background: #fff; }
.inst-hero small { font-weight: 700; opacity: .9; }
.inst-hero h1 { color: #fff; }
.inst-facts { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; margin-top: 8px; font-size: .8rem; font-weight: 700; }
.inst-facts span { display: inline-flex; align-items: center; gap: 4px; }
.inst-go { background: var(--ic); }
.inst-strip { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 4px 12px; font-size: .8rem; color: #fff; background: var(--ic); }
.inst-strip img { height: 20px; border-radius: 4px; background: #fff; }
.inst-brand { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 12px; }
.inst-brand img { height: 40px; border-radius: 8px; }
.msg-text { white-space: pre-line; overflow-wrap: anywhere; }

/* ------------------------------------------------------------------ Modes : chacun a son visage */
/* Entraînement : clair et encourageant */
.mode-train { background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 12%, var(--bg)), var(--bg) 40%); }
.mode-train .q-body { color: var(--ink); }
/* Défi du jour : chaleureux */
.mode-daily { background: linear-gradient(180deg, color-mix(in srgb, var(--amber) 14%, var(--bg)), var(--bg) 42%); }
/* Examen : la salle d'examen. Sobre, sérieux, sans décor ni animation */
.mode-exam { --radius: 8px; background: #E9EBEF; color: #111827; font-family: Georgia, "Times New Roman", serif; }
.mode-exam .player-top { background: #111827; color: #F9FAFB; padding-bottom: 10px; font-family: var(--font); }
.mode-exam .player-top .icon-btn { color: #F9FAFB; }
.mode-exam .steps-dots span { background: rgba(255,255,255,.2); border-radius: 2px; }
.mode-exam .steps-dots span.done, .mode-exam .steps-dots span.now { background: #F9FAFB; }
.mode-exam .timer { color: #F9FAFB; font-family: var(--font); }
.mode-exam .qbar { border-radius: 2px; background: #CBD5E1; margin-top: 8px; }
.mode-exam .qbar > span { background: #111827; }
.mode-exam .player-body { background: #fff; max-width: 760px; margin-top: 8px; border-radius: 4px 4px 0 0; box-shadow: 0 2px 12px rgba(15,23,42,.14); padding: 18px 20px 24px; }
.mode-exam .q-count { color: #475569; font-family: var(--font); text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; }
.mode-exam .q-body { font-weight: 600; font-size: 1.18rem; color: #111827; letter-spacing: 0; }
.mode-exam .choice { border-radius: 6px; border: 1px solid #94A3B8; background: #fff; color: #111827; font-weight: 500; transition: none; }
.mode-exam .choice:active { transform: none; margin-top: 0; }
.mode-exam .choice .letter { border-radius: 3px; background: #E2E8F0; color: #111827; }
.mode-exam .choice.selected { border-color: #111827; background: #F1F5F9; }
.mode-exam .choice.selected .letter { background: #111827; color: #fff; }
.mode-exam .chip.violet { background: #111827; color: #F9FAFB; border-radius: 4px; font-family: var(--font); }
.mode-exam .sbar-wrap { background: #fff; max-width: 760px; font-family: var(--font); }
.mode-exam .sbar-label { color: #475569; }
.mode-exam .sbar-label b { color: #111827; }
.mode-exam .sbar { border-radius: 2px; background: #CBD5E1; }
.mode-exam .sbar > span { background: #334155; }
.mode-exam .player-foot { background: #fff; max-width: 760px; }
.mode-exam .btn.ghost { color: #334155; }
.mode-exam.exam-intro, .mode-exam .exam-intro { font-family: var(--font); }
.mode-exam .exam-seal { background: #111827; border-radius: 12px; box-shadow: none; }
.mode-exam .rules li { background: #F8FAFC; border-color: #CBD5E1; border-radius: 6px; color: #111827; }
.mode-exam .rules svg { color: #111827; }
.mode-exam .exam-go { background: #111827; color: #fff; border-radius: 6px; }
.mode-btn.career { --g1: #D97706; --g2: #F59E0B; animation-delay: .7s; }

/* =====================================================================
   v4.1 — simple et lumineux : accueil à un bouton, jeux gais, scènes, thèmes
   ===================================================================== */

/* ------------------------------------------------------------------ Premium : aucun mot, une signature.
   Un liseré doré, une couronne, sa couleur. Clair, sombre ou automatique : c'est le membre qui choisit. */
:root[data-tier="premium"] .hdr { border-bottom: 0; box-shadow: 0 2px 0 0 #E7B94A; }
:root[data-tier="premium"] .bottomnav { border-top: 2px solid #E7B94A; }
:root[data-tier="premium"] .bottomnav a.fab span.fab-bubble { box-shadow: 0 0 0 3px #E7B94A, 0 8px 20px color-mix(in srgb, var(--brand) 45%, transparent); }
:root[data-tier="premium"] .home-go { box-shadow: 0 0 0 4px #E7B94A, 0 18px 40px color-mix(in srgb, var(--brand) 45%, transparent); }
:root[data-accent="royal"] { --brand: #4F46E5; --brand-600: #4338CA; --brand-700: #3730A3; --brand-50: #EEF2FF; }
:root[data-accent="emeraude"] { --brand: #059669; --brand-600: #047857; --brand-700: #065F46; --brand-50: #ECFDF5; }
:root[data-accent="rubis"] { --brand: #E11D48; --brand-600: #BE123C; --brand-700: #9F1239; --brand-50: #FFF1F2; }
:root[data-accent="ocean"] { --brand: #0284C7; --brand-600: #0369A1; --brand-700: #075985; --brand-50: #F0F9FF; }
:root[data-accent="soleil"] { --brand: #EA580C; --brand-600: #C2410C; --brand-700: #9A3412; --brand-50: #FFF7ED; }
:root[data-accent="nuit"] { --brand: #C9A227; --brand-600: #E0B93F; --brand-700: #F0D060; --brand-50: #2A2412; --bg: #0F0E0A; --surface: #1A1812; --surface-2: #26231A; --ink: #F5F0E1; --ink-2: #D8D2BF; --muted: #A49C84; --line: #38331F; color-scheme: dark; }
:root[data-theme="dark"][data-accent]:not([data-accent="nuit"]) { --brand-50: color-mix(in srgb, var(--brand) 22%, #131B2E); --brand-600: color-mix(in srgb, var(--brand) 70%, #fff); --brand-700: color-mix(in srgb, var(--brand) 50%, #fff); }
.hdr-me.crowned .avatar { box-shadow: 0 0 0 2px #E7B94A; }
.me-crown { position: absolute; top: -7px; right: -3px; width: 16px; height: 16px; color: #F5B301; filter: drop-shadow(0 1px 1px rgba(0,0,0,.4)); }
.me-crown svg { width: 16px; height: 16px; fill: currentColor; }
.upsell-badge.gold { color: #fff; background: linear-gradient(135deg, var(--amber), #F97316); }
.theme-modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.theme-mode { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 6px; border-radius: 16px; border: 2px solid var(--line); background: var(--surface); font: inherit; font-weight: 700; font-size: .86rem; color: var(--ink); }
.theme-mode.on { border-color: var(--brand); background: var(--brand-50); }
.theme-accents { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.theme-accent { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px; border: 0; border-radius: 14px; background: none; font: inherit; color: var(--ink); }
.theme-accent span { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: #fff; box-shadow: inset 0 -3px 0 rgba(0,0,0,.18); }
.theme-accent span svg { width: 16px; height: 16px; }
.theme-accent.on span { outline: 3px solid var(--ink); outline-offset: 2px; }
.theme-accent small { font-size: .74rem; font-weight: 700; }
.theme-sheet h3 { display: flex; align-items: center; gap: 6px; }

/* ------------------------------------------------------------------ Accueil : un bouton au centre */
.home-simple > * + * { margin-top: 20px; }
.home-hero { text-align: center; padding: 22px 0 8px; }
.home-hello { font-weight: 800; font-size: 1.15rem; display: flex; align-items: center; justify-content: center; gap: 8px; }
.home-go { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; width: 190px; height: 190px; margin: 18px auto 12px; border-radius: 50%; color: #fff; background: radial-gradient(circle at 35% 28%, color-mix(in srgb, var(--brand) 60%, #fff), var(--brand) 60%, var(--brand-700)); box-shadow: 0 18px 40px color-mix(in srgb, var(--brand) 45%, transparent), inset 0 -8px 0 rgba(0,0,0,.14); animation: goBreath 2.6s ease-in-out infinite; transition: transform .12s; }
.home-go:active { transform: scale(.95); }
.home-go b { font-size: 1.45rem; font-weight: 900; letter-spacing: -.01em; }
.home-go-ic svg { width: 54px; height: 54px; fill: currentColor; }
@keyframes goBreath { 50% { transform: scale(1.045); } }
.home-sub { color: var(--muted); font-weight: 600; max-width: 340px; margin: 0 auto; }
.home-doors { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.home-doors a { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 6px; border-radius: 18px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.home-doors span { font-size: 1.7rem; line-height: 1; }
.home-doors b { font-size: .88rem; }
.week-strip { color: var(--ink); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.week-strip > svg { color: var(--muted); }
.home-simple .dc-grid { margin-top: 0; }
@media (min-width: 720px) { .home-go { width: 220px; height: 220px; } }

/* ------------------------------------------------------------------ Scènes de transition */
.scene { position: fixed; inset: 0; z-index: 78; display: grid; place-items: center; padding: 20px; background: linear-gradient(170deg, var(--brand), color-mix(in srgb, var(--brand) 55%, #7C3AED)); animation: fade .22s ease; }
.scene.out { animation: fadeout .24s ease forwards; }
.scene-card { width: 100%; max-width: 440px; padding: 26px 20px 20px; text-align: center; border-radius: 28px; color: #0F172A; background: #fff; box-shadow: 0 24px 60px rgba(15,23,42,.3); animation: sceneIn .42s cubic-bezier(.2,1.5,.4,1); }
@keyframes sceneIn { from { transform: translateY(40px) scale(.9); opacity: 0; } }
.scene-card > * + * { margin-top: 10px; }
.scene-card h1 { color: #0F172A; font-size: 1.55rem; }
.scene-card p { color: #475569; line-height: 1.5; }
.scene-emoji { font-size: 4.2rem; line-height: 1; animation: sceneBounce 1s cubic-bezier(.3,1.6,.5,1); }
@keyframes sceneBounce { 0% { transform: scale(0) rotate(-20deg); } 60% { transform: scale(1.25) rotate(6deg); } }
.scene-kicker { display: block; font-weight: 800; font-size: .76rem; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-600); }
.scene-stat { font-size: 2.4rem; font-weight: 900; color: var(--brand-600); }
.scene-go, .auto-next { position: relative; overflow: hidden; }
.scene-go { margin-top: 16px !important; }
.scene-later { color: #475569 !important; margin-top: 4px !important; }
.scene-bar { position: absolute; left: 0; bottom: 0; height: 5px; width: 100%; background: rgba(255,255,255,.75); transform-origin: left; animation: autofill linear forwards; }

/* ------------------------------------------------------------------ Questions vivantes */
.q-in { animation: qIn .3s cubic-bezier(.2,1.1,.4,1); }
.q-out { animation: qOut .17s ease-in forwards; }
@keyframes qIn { from { transform: translateX(42px); opacity: 0; } }
@keyframes qOut { to { transform: translateX(-42px); opacity: 0; } }
.mode-exam .q-in { animation: fade .18s ease; }
.mode-exam .q-out { animation: fadeout .15s ease forwards; }
.choice.correct { animation: fxpop .36s cubic-bezier(.2,1.8,.4,1); }
.choice.wrong { animation: fxshake .34s ease; }
.mode-exam .choice.correct, .mode-exam .choice.wrong { animation: none; }

/* ------------------------------------------------------------------ Salle de jeu : gaie et lumineuse */
.mode-game { --bg: #5AB7F0; background: linear-gradient(180deg, #4FB8F5 0%, #7FC8F8 45%, #B9A5F5 100%); color: #12325A; }
.mode-game .player-top b { color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.25); }
.mode-game .icon-btn { color: #fff; }
.mode-game .icon-btn:hover { background: rgba(255,255,255,.22); }
.hud-box { color: #1E293B; background: rgba(255,255,255,.92); border: 0; box-shadow: 0 3px 0 rgba(18,50,90,.18), 0 8px 16px rgba(18,50,90,.14); }
.hud-box b { text-shadow: none; }
.hud-box small { opacity: .75; }
.hud-score { color: #fff; background: linear-gradient(160deg, #FFB300, #FF6D3A); box-shadow: 0 3px 0 #D84E1F, 0 8px 18px rgba(255,109,58,.4); }
.hud-score b { color: #fff; text-shadow: 0 2px 0 rgba(160,50,10,.45); }
.hud-rank { background: rgba(255,255,255,.92); }
.hud-best.is-beaten { color: #fff; background: linear-gradient(150deg, #22C55E, #0EA5E9); }
.hud-delta { color: #FF6D3A; text-shadow: 0 1px 0 #fff; }
.hud-ladder { color: #12325A; background: rgba(255,255,255,.6); height: 44px; }
.hl-gap { opacity: 1; }
.q-hud .hud-ladder { height: 44px; }
.gm-goal { color: #12325A; background: rgba(255,255,255,.88); border: 0; }
.gm-goal.boss { color: #fff; background: linear-gradient(120deg, #EF4444, #A855F7); }
.gm-goal-bar { background: rgba(18,50,90,.14); }
.gm-goal-bar span { background: linear-gradient(90deg, #FFB300, #FF6D3A); }
.gm-power { min-height: 50px; display: flex; align-items: center; justify-content: center; }
.pw-bar { gap: 6px; flex-wrap: nowrap; }
.pw-btn { min-width: 58px; padding: 3px 8px; color: #12325A; background: #fff; border: 0; box-shadow: 0 3px 0 rgba(18,50,90,.22); }
.pw-btn.on { color: #fff; background: #FF6D3A; box-shadow: 0 3px 0 #D84E1F; }
.pw-ic { height: 20px; }
.pw-ic svg { width: 18px; height: 18px; }
.pw-count { color: #fff; background: linear-gradient(120deg, #FFB300, #FF6D3A); }
.quiz-powers .pw-btn { box-shadow: var(--shadow-sm); }
@media (max-height: 690px) { .hud-ladder { display: none; } .gm-goal-bar { display: none; } .gm-goal { margin-bottom: 4px; padding: 4px 10px; } }
@media (min-width: 900px) { .hud-ladder { height: auto; } .hl-row.me { color: #FF6D3A; } .gm-power { justify-content: flex-start; } .pw-bar { flex-wrap: wrap; } }
.mode-game .bl-pop { color: #fff; }
.mode-game .mm-theme { color: #12325A; }
.mode-game .mm-words span { background: rgba(255,255,255,.8); color: #12325A; }
.mode-game .mm-words span.done { color: #64748B; }
.mode-game .sd-pad button { color: #12325A; }
.mode-game .dm-msg { color: #12325A; }
.mode-game .dm-side { --surface: #fff; --line: transparent; color: #12325A; }

/* Fruits : un plateau en bois clair, des fruits qui ont du volume */
.cd-board { background: #F7E3B5 !important; border: 6px solid #B9742F; border-radius: 22px; box-shadow: 0 0 0 3px #7C4A1E, inset 0 2px 8px rgba(124,74,30,.3), 0 14px 26px rgba(18,50,90,.3); }
.cd-board::before { content: ""; position: absolute; inset: 4px; border-radius: 12px; background: repeating-conic-gradient(#FBEFD0 0 25%, #F1DBA6 0 50%) 0 0 / calc(var(--step) * 2) calc(var(--step) * 2); }
.cd-board.aiming { outline: 3px solid #FF6D3A; }
.cd-tile, .cd-tile[class*="sp-"], .cd-tile.sp-prism, .cd-tile.sp-nova { display: block; border-radius: 0; color: inherit; background: none; box-shadow: none; animation: none; }
.cd-tile svg, .cd-tile[class*="sp-"] svg { display: block; width: 100%; height: 100%; filter: drop-shadow(0 3px 2px rgba(90,50,10,.35)); }
.cd-tile[class*="sp-"] svg { animation: powerGlow 1.1s ease-in-out infinite; }
@keyframes powerGlow { 50% { transform: scale(1.1); filter: drop-shadow(0 0 8px #fff) drop-shadow(0 3px 2px rgba(90,50,10,.35)); } }
.cd-tile.sp-drone svg { animation: spinP .8s linear infinite; }
@keyframes spinP { to { transform: rotate(360deg); } }
.cd.sel .cd-tile { outline: 0; transform: scale(1.18) translateY(-4px); filter: drop-shadow(0 0 6px #FF6D3A); transition: transform .12s; }
.cd.hint .cd-tile { animation: hintpulse .9s ease-in-out infinite; }
.cd.pop .cd-tile { transform: scale(1.6) rotate(25deg); transition: transform .2s ease-in; }
.cd-land .cd-tile { animation: squash .28s ease-out; }
.cd-hop .cd-tile { animation: hop .5s ease; }
.cd-born .cd-tile { animation: fxinflate .55s cubic-bezier(.2,1.8,.4,1); }
@keyframes squash { 30% { transform: scale(1.14, .82) translateY(8%); } 65% { transform: scale(.94, 1.08); } }
@keyframes hop { 40% { transform: translateY(-16%) rotate(-6deg); } 70% { transform: translateY(0) scale(1.05, .95); } }
.cd-rocket { position: absolute; z-index: 6; pointer-events: none; filter: drop-shadow(0 0 8px #FFC233); }
.cd-rocket svg { width: 100%; height: 100%; display: block; }
.cd-boom { position: absolute; z-index: 6; translate: -50% -50%; pointer-events: none; border-radius: 50%; background: radial-gradient(circle, #fff 0%, #FFE066 30%, #FF8A1F 58%, rgba(244,63,63,.7) 75%, transparent 78%); animation: boom .5s ease-out forwards; }
@keyframes boom { from { transform: scale(.2); opacity: 1; } 70% { opacity: 1; } to { transform: scale(var(--s, 5)); opacity: 0; } }
.bl-pop.huge { color: #fff; text-shadow: 0 2px 0 #D84E1F, 0 3px 6px rgba(0,0,0,.3); }

/* Blocs */
.bl-board { background: linear-gradient(160deg, #3F51B5, #5C6BC0); border: 4px solid #fff; box-shadow: 0 10px 22px rgba(18,50,90,.3); }
.bl-tray { min-height: 88px; }
.bl-slot { min-height: 84px; background: rgba(255,255,255,.75); border: 0; box-shadow: 0 3px 0 rgba(18,50,90,.16); }
.bl-slot.empty { background: rgba(255,255,255,.25); box-shadow: none; }
.bl-slot.turning { box-shadow: 0 0 0 3px #FF6D3A; }
.bl-turn { color: #FF6D3A; }
.bl-cell.picked { outline: 3px solid #fff; outline-offset: -2px; animation: hintpulse .8s ease-in-out infinite; }
.bl-cell.lifted { opacity: .25; }
.bl-board.aiming .bl-cell.filled { animation: none; cursor: pointer; }
.bl-move { width: 0; height: 0; }
.bl-move span { position: absolute; border-radius: 7px; background: var(--c); box-shadow: inset 0 -4px 0 rgba(0,0,0,.22), inset 0 3px 0 rgba(255,255,255,.3); }
.bl-mode { top: -34px; bottom: auto; display: flex; align-items: center; gap: 8px; color: #fff; background: #FF6D3A; pointer-events: auto; padding: 5px 6px 5px 12px; box-shadow: 0 4px 10px rgba(0,0,0,.25); }
.bl-mode.hidden { display: none; }
.bl-mode button { border: 0; border-radius: 999px; padding: 3px 10px; font: inherit; font-weight: 900; color: #FF6D3A; background: #fff; }

/* Dames : de vrais pions */
.pc { background: none !important; box-shadow: 0 3px 4px rgba(0,0,0,.4) !important; }
.pc > svg:first-child { width: 100%; height: 100%; display: block; border-radius: 50%; }
.pc.white { --p1: #FFF8E7; --p2: #B99560; --p3: #F2E2BF; }
.pc.black { --p1: #5A3418; --p2: #2B1608; --p3: #7A4A24; }
.pc-crown { position: absolute; inset: 14%; width: 72%; height: 72%; }
.pc.sel { box-shadow: 0 0 0 3px #22C55E, 0 8px 12px rgba(0,0,0,.4) !important; }
.pc.gone { background: none; }

/* Simulation EXETAT : claire et solennelle */
.sim-player { background: linear-gradient(170deg, #1E3A8A, #3B82F6); color: #0F172A; --ink: #0F172A; --ink-2: #334155; --muted: #64748B; --line: #E2E8F0; --surface: #fff; --surface-2: #F1F5F9; }
.sim-player .icon-btn { color: #fff; }
.sim-card { background: #fff; border: 0; box-shadow: 0 24px 60px rgba(15,23,42,.3); }
.sim-card h1 { color: #0F172A; }
.sim-card p { color: #475569; }
.sim-seal { color: #fff; background: linear-gradient(135deg, #1E3A8A, #3B82F6); box-shadow: 0 12px 26px rgba(30,58,138,.35); }
.sim-opt { color: #0F172A; background: #F1F5F9; border: 1px solid #E2E8F0; }
.sim-recap { text-align: left; }
.sim-cta { color: #fff; background: linear-gradient(120deg, #1E3A8A, #3B82F6); border: 0; box-shadow: 0 12px 26px rgba(30,58,138,.3); }
.sim-cta small { color: #BFDBFE; }
.sim-ic { color: #1E3A8A; background: #fff; }

/* ------------------------------------------------------------------ Illustrations maison */
svg.art { display: block; width: 1em; height: 1em; }
.home-doors span { font-size: 2.3rem; }
.scene-emoji { font-size: 5rem; display: flex; justify-content: center; }
.big-emoji { font-size: 4rem; display: flex; justify-content: center; }
.record-burst { font-size: 5rem; display: flex; justify-content: center; }
.game-tile .emoji { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 18px; font-size: 2.4rem; background: #fff; box-shadow: 0 4px 10px rgba(0,0,0,.18); }
.games-row .game-tile .emoji { width: 50px; height: 50px; font-size: 2rem; }
.gp-emoji { display: grid; place-items: center; width: 84px; height: 84px; margin: 0 auto 8px; border-radius: 26px; font-size: 3.4rem; background: #fff; box-shadow: 0 8px 18px rgba(0,0,0,.2); }
.dc-emoji { font-size: 1.9rem; background: var(--surface-2); }
.lv-emoji { display: grid; place-items: center; flex: none; width: 64px; height: 64px; border-radius: 20px; font-size: 2.6rem; background: #fff; }
.lv-pawn { font-size: 1.7rem; top: -26px; }
.sq-n svg.art { font-size: 1.7rem; }
.wz-ic { font-size: 1.5rem; }
.wz-type span, .gp span { font-size: 2.2rem; }
.hl-crown { display: inline-flex; font-size: .95em; vertical-align: -1px; }
.gm-title { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.gm-title svg.art { font-size: 1.35rem; }
.stars { font-size: 2.5rem; }
.stars span { opacity: .22; filter: grayscale(1); }
.stars span.on { opacity: 1; filter: none; }
.best svg.art { display: inline-block; vertical-align: -2px; }
.game-tile .best { display: inline-flex; align-items: center; gap: 4px; }
.pd .medal { font-size: 1.7rem; top: -18px; }
.coach-hand { font-size: 2.8rem; }
.flip .front svg.art { width: 66%; height: 66%; }
.cp-opt { display: flex; align-items: center; gap: 10px; }
.cp-opt svg.art { flex: none; font-size: 1.7rem; }
.goal-chip svg.art { font-size: 1.1rem; }
/* Sons et musique */
.music-moods { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.music-moods .theme-mode { padding: 10px 2px; font-size: .74rem; text-align: center; }
.music-list { display: flex; flex-direction: column; gap: 2px; max-height: 38dvh; overflow-y: auto; }
.music-row { display: flex; align-items: center; gap: 4px; border-radius: 12px; }
.music-row.on { background: var(--brand-50); }
.music-pick { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 9px; border: 0; background: none; text-align: left; font: inherit; font-weight: 700; color: var(--ink); }
.music-ic { width: 32px; height: 32px; flex: none; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--brand); }
.music-ic svg { width: 15px; height: 15px; }
.music-vol { width: 100%; accent-color: var(--brand); }

@media (prefers-reduced-motion: reduce) {
  .fx-canvas { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

@media print {
  .sidebar, .bottomnav, .topbar, .no-print, .toast-host { display: none !important; }
  .main { padding: 0; }
  body { background: #fff; }
  .card { box-shadow: none; break-inside: avoid; }
}

/* ======================================================================
   v5 : mascotte, guides, push, salle d'attente, nouveaux jeux, univers
   ====================================================================== */
/* Pango parle */
@keyframes mBlink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@keyframes mTail { 50% { transform: rotate(-8deg); } }
@keyframes mWave { 0%, 60%, 100% { transform: rotate(0); } 70% { transform: rotate(-22deg); } 80% { transform: rotate(6deg); } 90% { transform: rotate(-16deg); } }
@keyframes mBob { 50% { transform: translateY(-3px) rotate(-2deg); } }
.nyota { animation: float 3s ease-in-out infinite; }
.mascot-say { position: fixed; left: 10px; right: 10px; bottom: calc(78px + var(--sa-b)); z-index: 70; display: flex; align-items: flex-end; gap: 6px; max-width: 460px; margin: 0 auto; pointer-events: none; animation: msIn .45s cubic-bezier(.3,1.5,.5,1); }
.mascot-say.out { animation: fadeout .3s ease forwards; }
.mascot-say > * { pointer-events: auto; }
.ms-pango { flex: none; filter: drop-shadow(0 6px 10px rgba(0,0,0,.18)); }
.ms-bubble { position: relative; flex: 1; padding: 12px 14px; border-radius: 18px 18px 18px 6px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); box-shadow: 0 14px 30px rgba(15,23,42,.18); font-weight: 600; font-size: .92rem; line-height: 1.4; min-height: 46px; }
.ms-bubble .btn { margin-top: 8px; }
.ms-x { position: absolute; top: -8px; right: -4px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: var(--ink); color: var(--surface); font-weight: 900; cursor: pointer; }
@keyframes msIn { from { transform: translateY(30px) scale(.9); opacity: 0; } }
@media (min-width: 900px) { .mascot-say { bottom: 24px; left: 24px; right: auto; } }
.shout { position: fixed; left: 0; right: 0; top: 34%; z-index: 90; display: flex; flex-direction: column; align-items: center; pointer-events: none; animation: shoutIn 1.9s cubic-bezier(.2,1.4,.4,1) forwards; }
.shout b { font-size: clamp(2.2rem, 9vw, 3.6rem); font-weight: 900; color: #fff; letter-spacing: -.02em; text-shadow: 0 4px 0 rgba(0,0,0,.18), 0 10px 30px rgba(0,0,0,.35); -webkit-text-stroke: 1px rgba(0,0,0,.08); }
.shout small { margin-top: 2px; font-weight: 800; font-size: 1.1rem; color: #FDE047; text-shadow: 0 2px 8px rgba(0,0,0,.4); }
@keyframes shoutIn { 0% { transform: scale(.3); opacity: 0; } 15% { transform: scale(1.12); opacity: 1; } 25% { transform: scale(1); } 80% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(-40px); } }

/* Bulles guidées */
.tip-ring { position: absolute; z-index: 85; border-radius: 22px; border: 3px solid #FDE047; box-shadow: 0 0 0 9999px rgba(15,23,42,.35); pointer-events: none; animation: tipPulse 1.4s ease-in-out infinite; }
@keyframes tipPulse { 50% { transform: scale(1.04); border-color: #fff; } }
.tip-bubble { position: absolute; z-index: 86; width: 280px; display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 18px; background: #fff; color: #0F172A; box-shadow: 0 16px 40px rgba(0,0,0,.25); animation: msIn .4s cubic-bezier(.3,1.5,.5,1); font-weight: 700; font-size: .9rem; }
.tip-bubble.above { transform: translateY(-100%); }
.tip-bubble p { flex: 1; margin: 0; }
.tip-bubble button { border: 0; border-radius: 10px; padding: 6px 10px; background: var(--brand); color: var(--on-brand, #fff); font-weight: 800; }
.tb-pango { flex: none; }

/* Accueil musical */
.onb-head { display: flex; align-items: flex-end; gap: 6px; }
.onb-bubble { flex: 1; padding: 12px 14px; border-radius: 18px 18px 18px 6px; background: var(--surface-2); display: flex; flex-direction: column; gap: 3px; animation: msIn .5s .1s both cubic-bezier(.3,1.5,.5,1); }
.onb-bubble span { color: var(--muted); font-size: .92rem; }
.onb-moods { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.onb-mood { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px; border-radius: 16px; border: 2px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; transition: transform .15s, border-color .15s; }
.onb-mood span { width: 40px; height: 40px; border-radius: 14px; display: grid; place-items: center; background: color-mix(in srgb, var(--brand) 14%, transparent); color: var(--brand-600, var(--brand)); }
.onb-mood b { font-size: .8rem; }
.onb-mood.on { border-color: var(--brand); transform: translateY(-2px); box-shadow: 0 8px 18px color-mix(in srgb, var(--brand) 25%, transparent); }
.onb-vol label { display: flex; align-items: center; gap: 6px; }
.onb-vol label b { margin-left: auto; }

/* Demande des notifications */
.push-ask .pa-art { position: relative; display: inline-block; }
.pa-bell { position: absolute; top: 0; right: -14px; font-size: 2rem; animation: bellRing 1.6s ease-in-out infinite; transform-origin: top center; }
@keyframes bellRing { 0%, 50%, 100% { transform: rotate(0); } 10% { transform: rotate(18deg); } 20% { transform: rotate(-16deg); } 30% { transform: rotate(10deg); } 40% { transform: rotate(-6deg); } }
.pa-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; text-align: left; width: 100%; }
.pa-list li { padding: 10px 12px; border-radius: 12px; background: var(--surface-2); font-weight: 600; font-size: .92rem; }

/* Redirection vers la salle de jeu */
.go-room { position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; padding: 20px; background: radial-gradient(circle at 50% 30%, #6C5CE7, #1E1B4B); animation: fade .25s ease; }
.go-room.out { animation: fadeout .3s ease forwards; }
.gr-card { width: 100%; max-width: 420px; text-align: center; color: #fff; display: flex; flex-direction: column; align-items: center; gap: 8px; animation: sceneIn .5s cubic-bezier(.3,1.5,.5,1); }
.gr-card h1 { color: #fff; font-size: 1.9rem; }
.gr-card small { font-weight: 800; letter-spacing: .06em; text-transform: uppercase; opacity: .8; }
.gr-card p { opacity: .9; }
.gr-count { font-size: 6.5rem; font-weight: 900; line-height: 1; color: #FDE047; text-shadow: 0 8px 30px rgba(0,0,0,.4); }
.gr-count.pulse { animation: cdpulse .9s ease-out; }
.gr-card .btn.ghost { color: #fff !important; }
.room-banner { position: fixed; top: calc(8px + var(--sa-t)); left: 50%; transform: translateX(-50%); z-index: 96; padding: 10px 16px; border-radius: 999px; background: #6C5CE7; color: #fff !important; font-weight: 700; box-shadow: 0 10px 30px rgba(0,0,0,.3); animation: msIn .4s ease; white-space: nowrap; max-width: 94vw; overflow: hidden; text-overflow: ellipsis; }

/* Salle d'attente : quorum et places */
.invite-top { padding: 8px 12px !important; }
.quorum { position: relative; width: 132px; height: 132px; margin: 4px auto 0; }
.quorum svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.quorum circle { fill: none; stroke-width: 11; stroke-linecap: round; }
.quorum .q-bg { stroke: var(--surface-2); }
.quorum .q-fg { stroke: url(#none); stroke: var(--brand); transition: stroke-dasharray .6s cubic-bezier(.3,1.4,.5,1); }
.quorum.full .q-fg { stroke: #22C55E; }
.quorum > div { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.quorum b { font-size: 2rem; font-weight: 900; line-height: 1; }
.quorum small { color: var(--muted); font-weight: 700; }
.chips-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.seats { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; }
.seat { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); animation: seatIn .4s both cubic-bezier(.3,1.5,.5,1); }
.seat b { font-size: .8rem; text-align: center; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seat.empty { border: 2px dashed var(--line); background: transparent; color: var(--muted); cursor: pointer; }
.seat.empty span { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); animation: tipPulse 1.6s ease-in-out infinite; }
.avatar.md { width: 44px; height: 44px; font-size: .95rem; }
@keyframes seatIn { from { transform: scale(.6); opacity: 0; } }
.cd-avatars { display: flex; justify-content: center; gap: -6px; flex-wrap: wrap; }
.cd-avatars .avatar { margin: 0 -4px; border: 2px solid var(--bg); }
.cd-num.final { color: #EF4444; background: none; -webkit-text-fill-color: #EF4444; }

/* Question éclair */
.quick-q { position: absolute; inset: 0; z-index: 30; display: grid; place-items: center; padding: 14px; background: rgba(15,23,42,.55); backdrop-filter: blur(3px); animation: fade .2s ease; }
.quick-q.out { animation: fadeout .25s ease forwards; }
.qq-card { width: 100%; max-width: 440px; max-height: 100%; overflow-y: auto; padding: 16px; border-radius: 22px; background: #fff; color: #0F172A; box-shadow: 0 20px 50px rgba(0,0,0,.35); animation: sceneIn .35s cubic-bezier(.3,1.5,.5,1); --surface: #fff; --surface-2: #F1F5F9; --ink: #0F172A; --line: #E2E8F0; --muted: #64748B; }
.qq-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.qq-timer { height: 6px; border-radius: 6px; background: #E2E8F0; overflow: hidden; margin: 10px 0; }
.qq-timer span { display: block; height: 100%; background: linear-gradient(90deg, #22C55E, #F59E0B, #EF4444); transform-origin: left; animation: qqTime linear forwards; }
@keyframes qqTime { from { transform: scaleX(1); } to { transform: scaleX(0); } }
.qq-body { font-weight: 700; margin: 0 0 10px; }
.qq-choices { display: flex; flex-direction: column; gap: 8px; }
.qq-skip { display: block; margin: 10px auto 0; }

/* Fin de partie impossible à perdre */
.gm-over { position: absolute; inset: 0; z-index: 25; display: grid; place-items: center; padding: 16px; background: rgba(15,23,42,.6); backdrop-filter: blur(2px); animation: fade .2s ease; }
.gm-over-card { width: 100%; max-width: 320px; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 20px; border-radius: 22px; background: #fff; color: #0F172A; text-align: center; --surface: #fff; --ink: #0F172A; --line: #E2E8F0; }
.gm-over-card small { font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: #EF4444; }
.gm-over-card b { font-size: 1.3rem; }
.gm-over-card .num { font-size: 1.6rem; font-weight: 900; color: var(--brand-600, var(--brand)); }
.gm-stage { position: relative; }
.brain-wait .spinner.lg { margin: 6px auto; }

/* Transition de parcours */
.jr-transition { position: fixed; inset: 0; z-index: 97; display: grid; place-items: center; background: linear-gradient(170deg, var(--brand), #6C5CE7); animation: fade .15s ease; }
.jr-transition.ko { background: linear-gradient(170deg, #F59E0B, #EF4444); }
.jr-transition.out { animation: fadeout .3s ease forwards; }
.jr-t-card { display: flex; flex-direction: column; align-items: center; gap: 6px; color: #fff; animation: sceneIn .45s cubic-bezier(.3,1.5,.5,1); }
.jr-t-card b { font-size: 2rem; font-weight: 900; }
.jr-t-card span { font-size: 1.1rem; font-weight: 700; opacity: .9; }
.jr-t-dots { display: flex; gap: 6px; margin-top: 10px; }
.jr-t-dots i { width: 9px; height: 9px; border-radius: 50%; background: #fff; animation: dotJump 1s infinite; }
.jr-t-dots i:nth-child(2) { animation-delay: .15s; } .jr-t-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dotJump { 50% { transform: translateY(-8px); opacity: .5; } }

/* Nouveaux jeux : scène pleine */
.rn-stage, .pk-stage, .bk-stage { position: relative; width: 100%; height: 100%; justify-self: stretch; align-self: stretch; border-radius: 18px; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; }
.rn-stage canvas, .pk-stage canvas, .bk-stage canvas { display: block; }
.rn-help { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); padding: 8px 14px; border-radius: 999px; background: rgba(15,23,42,.6); color: #fff; font-weight: 700; font-size: .82rem; white-space: nowrap; transition: opacity .4s; }
.rn-help.gone { opacity: 0; }
.pk-shots { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 5px; padding: 6px 10px; border-radius: 999px; background: rgba(15,23,42,.55); color: #fff; font-weight: 800; font-size: .8rem; }
.pk-shots i { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.18); font-style: normal; font-size: .75rem; }
.pk-shots i.ok { background: #22C55E; } .pk-shots i.ko { background: #EF4444; }
.pk-series { margin-right: 4px; }
.pk-gold { margin-left: 4px; padding: 2px 8px; border-radius: 999px; background: #EAB308; color: #422006; }
.bk-time { position: absolute; top: 10px; right: 12px; min-width: 54px; padding: 6px 12px; border-radius: 14px; background: rgba(15,23,42,.6); color: #fff; font-weight: 900; font-size: 1.3rem; text-align: center; }
.bk-time.low { background: #EF4444; animation: cdpulse .9s ease-out infinite; }
.fl-stage { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; }
.fl-stage.aiming .fl-arrow { cursor: crosshair; animation: tipPulse 1s infinite; }
.fl-top { display: flex; justify-content: space-between; width: 100%; max-width: 520px; font-weight: 800; }
.fl-hearts { display: inline-flex; gap: 3px; align-items: center; }
.fl-hearts i { display: inline-block; width: 26px; height: 26px; }
.fl-hearts svg { width: 100%; height: 100%; display: block; fill: #EF4444; filter: drop-shadow(0 2px 3px rgba(239,68,68,.4)); }
.fl-hearts svg .sh { stroke: rgba(255,255,255,.75); stroke-width: 1.8; stroke-linecap: round; }
.fl-hearts i.off svg { fill: rgba(148,163,184,.45); filter: none; }
.fl-hearts i.off svg .sh { display: none; }
.fl-hearts i.lost { animation: heartLost .6s ease; }
@keyframes heartLost { 0% { transform: scale(1.5); } 30% { transform: scale(.7) rotate(-12deg); } 60% { transform: scale(1.1) rotate(8deg); } 100% { transform: none; } }
.fl-board { position: relative; border-radius: 18px; background: #F8FAFC; box-shadow: 0 14px 34px rgba(15,23,42,.25); background-image: radial-gradient(circle, #CBD5E1 1.5px, transparent 1.6px); background-size: var(--cell) var(--cell); background-position: calc(8px + var(--cell) / 2 - 1px) calc(8px + var(--cell) / 2 - 1px); overflow: hidden; }
.fl-arrow { position: absolute; padding: 3px; border: 0; background: transparent; cursor: pointer; transition: transform .33s cubic-bezier(.5,0,.75,0), opacity .33s; }
.fl-arrow svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 3px 2px rgba(0,0,0,.15)); }
.fl-arrow:active svg { transform: scale(.94); }
.fl-arrow.flying { opacity: 0; pointer-events: none; }
.fl-arrow.blocker svg { animation: blockerShake .4s; }
.fl-arrow.hint svg { animation: tipPulse .6s 4; filter: drop-shadow(0 0 8px #FDE047); }
@keyframes blockerShake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.fl-help { font-size: .82rem; opacity: .8; margin: 0; }
.tile-new { position: absolute; top: 12px; left: 12px; z-index: 2; padding: 3px 9px; border-radius: 999px; background: #FDE047; color: #422006; font-weight: 900; font-size: .7rem; letter-spacing: .04em; text-transform: uppercase; animation: tipPulse 2s infinite; }
.games-why { display: flex; flex-wrap: wrap; gap: 8px; }
.games-why span { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: .82rem; font-weight: 700; }
.games-why svg { width: 16px; height: 16px; color: var(--brand); }

/* Accueil : quatre portes, pied de page de l'univers */
.home-doors.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.home-doors.four b { font-size: .78rem; text-align: center; }
.home-simple > .home-universe { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 32px; padding-top: 22px; border-top: 1px dashed var(--line); }
.home-simple > .home-foot { margin-top: 18px; }
.home-universe a { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); }
.home-universe a span { font-size: 1.8rem; line-height: 1; }
.home-universe b { display: block; font-size: .9rem; }
.home-universe small { color: var(--muted); font-size: .76rem; }
.home-foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; padding: 18px 0 6px; font-size: .82rem; color: var(--muted); }
.home-foot a { color: var(--muted); font-weight: 600; }
.merch-nudge { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 18px; background: linear-gradient(120deg, #FEF3C7, #FCE7F3); color: #0F172A; }
.merch-nudge img { width: 64px; height: 64px; border-radius: 14px; }
.merch-nudge b { display: block; }
.merch-nudge small { color: #475569; }

/* Parcours en aventure */
.jr-map { position: relative; padding: 10px 0 30px; }
.jr-map svg.jr-road { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.jr-node { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; width: 78%; margin: 0 0 28px; padding: 12px 14px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 8px 20px rgba(15,23,42,.08); animation: seatIn .45s both cubic-bezier(.3,1.4,.5,1); }
.jr-node:nth-child(even) { margin-left: auto; }
.jr-node .jr-badge { flex: none; width: 46px; height: 46px; border-radius: 16px; display: grid; place-items: center; font-size: 1.6rem; background: var(--surface-2); }
.jr-node.done .jr-badge { background: #DCFCE7; }
.jr-node.now { border: 2px solid var(--brand); box-shadow: 0 0 0 6px color-mix(in srgb, var(--brand) 18%, transparent), 0 12px 26px rgba(15,23,42,.12); }
.jr-node.locked { opacity: .65; filter: saturate(.5); }
.jr-node small { display: block; color: var(--muted); font-size: .78rem; }
.jr-node .jr-chapter { font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--brand-600, var(--brand)); }
.jr-pango { position: absolute; right: -8px; top: -46px; animation: mBob 2.4s ease-in-out infinite; }
.jr-story { display: flex; align-items: flex-end; gap: 6px; }
.jr-story .onb-bubble { animation-delay: .2s; }
/* Pango garde sa taille partout (une règle générale réduisait les SVG) */
.ms-pango img.akili { width: 64px !important; height: auto !important; }
.tb-pango img.akili { width: 44px !important; height: auto !important; }
.onb-head img.akili, .jr-story img.akili { width: 76px !important; height: auto !important; flex: none; }
.jr-pango img.akili { width: 52px !important; height: auto !important; }
.pa-art img.akili, .gr-art img.akili, .jr-t-card img.akili { width: 104px !important; height: auto !important; }
.scene-emoji img.akili { width: 110px !important; height: auto !important; }
.cd-avatars { gap: 0; }
.gm-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* v5.1 : Flèches en serpent (SVG), course 3D */
.fl-board { padding: 6px; background-image: none !important; background: #FBFCFE; }
.fl-board svg { display: block; width: 100%; height: 100%; touch-action: manipulation; cursor: pointer; }
.fl-dots circle { fill: #CBD5E1; }
.fl-line { fill: none; stroke: var(--c); stroke-width: .3; stroke-linecap: round; stroke-linejoin: round; }
.fl-head { fill: var(--c); stroke: var(--c); stroke-width: .07; stroke-linejoin: round; }
.fl-a.hint .fl-line, .fl-a.hint .fl-head { filter: drop-shadow(0 0 .12px #FDE047); stroke: #EAB308; animation: flHint .5s ease-in-out infinite alternate; }
.fl-a.hint .fl-head { fill: #EAB308; }
.fl-a.blocker .fl-line { stroke: #EF4444; } .fl-a.blocker .fl-head { fill: #EF4444; stroke: #EF4444; }
@keyframes flHint { to { opacity: .45; } }
.fl-help.gone { opacity: 0; transition: opacity .4s; }
.rn3d { background: #9BD8FF; }
.rn3d .rn-canvas { display: block; position: absolute; inset: 0; }
.rn-hud { position: absolute; top: 10px; left: 10px; z-index: 3; display: flex; flex-direction: column; gap: 6px; pointer-events: none; }
.rn-hud span { padding: 5px 11px; border-radius: 999px; color: #fff; font-weight: 800; font-size: .82rem; box-shadow: 0 4px 12px rgba(0,0,0,.2); }
.rn-pad { position: absolute; left: 0; right: 0; bottom: 10px; z-index: 3; display: flex; justify-content: space-between; padding: 0 10px; pointer-events: none; }
.rn-pad button { pointer-events: auto; width: 58px; height: 58px; border-radius: 18px; border: 0; background: rgba(15,23,42,.38); color: #fff; font-size: 1.35rem; backdrop-filter: blur(4px); touch-action: none; transition: transform .08s, background .08s; }
.rn-pad button:nth-child(2) { margin-left: auto; margin-right: 8px; }
.rn-pad button:nth-child(3) { margin-right: auto; }
.rn-pad button.hit { transform: scale(.88); background: rgba(11,179,155,.85); }
.rn3d .rn-help { bottom: 80px; }

/* v5.1 : Pango parle en haut, au-dessus de tout, dans sa propre couleur */
.mascot-say { top: calc(var(--hdr-h) + 2px + var(--sa-t)); bottom: auto !important; left: 10px; right: 10px; align-items: flex-start; z-index: 92; animation: msDrop .7s cubic-bezier(.25,1.6,.45,1) both; }
.mascot-say.out { animation: msLift .45s cubic-bezier(.6,-0.4,.7,.2) forwards; }
.ms-pango { animation: msPango 1.2s ease-in-out .2s both; transform-origin: 50% 90%; }
.ms-bubble { margin-top: 10px; border-radius: 6px 20px 20px 20px; background: linear-gradient(135deg, #7C3AED, #4F46E5); color: #fff; border: 0; box-shadow: 0 16px 36px rgba(79,70,229,.45); font-weight: 700; }
.ms-bubble::before { content: ""; position: absolute; left: -9px; top: 12px; border: 9px solid transparent; border-right-color: #7C3AED; border-left: 0; }
.ms-bubble .btn { background: #fff; color: #4F46E5; }
.ms-x { background: #fff; color: #4F46E5; box-shadow: 0 4px 10px rgba(0,0,0,.2); }
@keyframes msDrop { 0% { transform: translateY(-140%) scale(.8); opacity: 0; } 60% { transform: translateY(8px) scale(1.02); opacity: 1; } 100% { transform: none; } }
@keyframes msLift { to { transform: translateY(-140%) scale(.85); opacity: 0; } }
@keyframes msPango { 0% { transform: rotate(-14deg) translateY(-6px); } 30% { transform: rotate(10deg); } 55% { transform: rotate(-6deg); } 80% { transform: rotate(3deg); } 100% { transform: none; } }
@media (min-width: 900px) { .mascot-say { top: 76px; left: auto; right: 24px; max-width: 420px; } }

/* v5.1 : découverte animée (visiteur), essai, accueil de l'Examen d'État */
.intro { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 24px 20px calc(24px + var(--sa-b)); text-align: center; color: #fff;
  background: radial-gradient(120% 90% at 50% 0%, #14D8BC 0%, #0BB39B 35%, #4F46E5 100%); overflow-y: auto; }
.intro h1 { color: #fff; font-size: clamp(1.6rem, 6.5vw, 2.3rem); line-height: 1.15; margin: 6px 0 0; text-shadow: 0 4px 18px rgba(0,0,0,.18); }
.intro p { color: rgba(255,255,255,.92); font-size: 1.05rem; max-width: 420px; margin: 0; }
.iv-dots { position: absolute; top: calc(14px + var(--sa-t)); left: 16px; right: 86px; display: flex; gap: 5px; }
.iv-dots i { flex: 1; height: 4px; border-radius: 4px; background: rgba(255,255,255,.3); overflow: hidden; }
.iv-dots i.done { background: #fff; }
.iv-dots i.on b { display: block; height: 100%; background: #fff; transform-origin: left; animation: autofill linear forwards; }
.iv-skip { position: absolute; top: calc(6px + var(--sa-t)); right: 12px; border: 0; background: rgba(255,255,255,.2); color: #fff; font-weight: 800; padding: 7px 14px; border-radius: 999px; }
.iv-slide { display: flex; flex-direction: column; align-items: center; gap: 10px; animation: ivIn .55s cubic-bezier(.25,1.4,.45,1) both; }
@keyframes ivIn { from { transform: translateX(60px) scale(.92); opacity: 0; } }
.iv-hello { position: relative; animation: bob 2.6s ease-in-out infinite; }
.iv-hello img.akili { width: 150px !important; height: auto !important; filter: drop-shadow(0 18px 24px rgba(0,0,0,.25)); }
.iv-ny { position: absolute; right: -40px; top: 0; }
.iv-ny svg { width: 60px; height: 60px; }
.iv-quiz { width: min(320px, 86vw); padding: 16px; border-radius: 22px; background: #fff; color: #0F172A; display: flex; flex-direction: column; gap: 8px; text-align: left; box-shadow: 0 20px 40px rgba(0,0,0,.25); }
.iv-quiz span { padding: 10px 12px; border-radius: 12px; background: #F1F5F9; font-weight: 700; animation: ivIn .45s both; }
.iv-quiz span.ok { animation: ivIn .45s both, ivOk .4s 1.2s forwards; }
@keyframes ivOk { to { background: #DCFCE7; color: #166534; box-shadow: inset 0 0 0 2px #22C55E; } }
.iv-games { display: grid; grid-template-columns: repeat(3, 76px); gap: 12px; }
.iv-games span { width: 76px; height: 76px; border-radius: 22px; background: #fff; display: grid; place-items: center; box-shadow: 0 12px 24px rgba(0,0,0,.2); animation: seatIn .5s both cubic-bezier(.3,1.6,.5,1); }
.iv-games svg { width: 48px; height: 48px; }
.iv-vs { display: flex; align-items: center; gap: 10px; font-size: 1.6rem; font-weight: 900; }
.iv-av { width: 66px; height: 66px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: #4F46E5; font-weight: 900; box-shadow: 0 10px 22px rgba(0,0,0,.2); animation: seatIn .5s both cubic-bezier(.3,1.6,.5,1); }
.iv-av.b { animation-delay: .2s; color: #DB2777; } .iv-av.c { animation-delay: .4s; color: #F59E0B; margin-left: -22px; }
.iv-exetat { display: flex; align-items: center; gap: 14px; padding: 16px 20px; border-radius: 22px; background: #fff; color: #0F172A; box-shadow: 0 16px 30px rgba(0,0,0,.2); animation: seatIn .5s both; }
.iv-exetat svg { width: 64px; height: 64px; } .iv-exetat b { display: block; font-size: 2rem; line-height: 1; } .iv-exetat small { color: #64748B; font-weight: 700; }
.iv-go { min-width: 240px; background: #fff !important; color: #4F46E5 !important; font-size: 1.35rem; padding: 18px 30px; border-radius: 22px; }
.pulse-glow { animation: pulseGlow 1.6s ease-in-out infinite; }
@keyframes pulseGlow { 0%, 100% { transform: scale(1); box-shadow: 0 10px 26px rgba(0,0,0,.18), 0 0 0 0 rgba(255,255,255,.55); } 50% { transform: scale(1.05); box-shadow: 0 16px 36px rgba(0,0,0,.25), 0 0 0 14px rgba(255,255,255,0); } }
.blink-soft { animation: blinkSoft 2.2s ease-in-out infinite; }
@keyframes blinkSoft { 50% { opacity: .7; } }
.iv-row { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.intro .link-btn { color: #fff; opacity: .9; }
.intro .btn.secondary { background: rgba(255,255,255,.18); color: #fff; border-color: rgba(255,255,255,.4); }
.intro .btn.ghost { color: #fff; }
.intro.trial { justify-content: flex-start; padding-top: calc(18px + var(--sa-t)); }
.iv-steps { display: flex; align-items: center; gap: 6px; width: 100%; max-width: 460px; font-weight: 800; font-size: .85rem; }
.iv-steps i { flex: 1; max-width: 46px; height: 6px; border-radius: 6px; background: rgba(255,255,255,.3); }
.iv-steps i.done { background: #FDE047; } .iv-steps i.on { background: #fff; }
.iv-steps span { margin-left: auto; }
.iv-wait { margin-top: 18vh; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.iv-wait img.akili { width: 90px !important; height: auto !important; animation: bob 1.4s ease-in-out infinite; }
.iv-q { width: 100%; max-width: 460px; margin-top: 18px; padding: 18px; border-radius: 24px; background: #fff; color: #0F172A; text-align: left; box-shadow: 0 20px 44px rgba(0,0,0,.25); animation: ivIn .45s both;
  --surface: #fff; --surface-2: #F1F5F9; --ink: #0F172A; --line: #E2E8F0; --muted: #64748B; }
.iv-q h2 { font-size: 1.15rem; margin: 4px 0 12px; }
.iv-q .choice { animation: ivIn .4s both; }
.intro.game { padding-bottom: 12px; }
.iv-gamebox { position: relative; flex: 1; width: 100%; max-width: 520px; min-height: 0; margin-top: 10px; border-radius: 22px; overflow: hidden; box-shadow: 0 20px 44px rgba(0,0,0,.3); }
.iv-stage { position: absolute; inset: 0; display: grid; }
.iv-timer { position: absolute; top: 10px; right: 10px; z-index: 5; min-width: 52px; padding: 6px 12px; border-radius: 14px; background: rgba(15,23,42,.6); color: #fff; font-weight: 900; font-size: 1.3rem; }
.iv-timer.low { background: #EF4444; animation: cdpulse .9s ease-out infinite; }
.iv-tip { position: absolute; left: 12px; right: 12px; top: 60px; z-index: 5; padding: 12px 14px; border-radius: 16px; background: linear-gradient(135deg, #7C3AED, #4F46E5); color: #fff; font-weight: 700; animation: msDrop .6s cubic-bezier(.25,1.6,.45,1) both; transition: opacity .4s; }
.iv-tip.gone { opacity: 0; pointer-events: none; }
.iv-gamebox:not(.runner) .iv-stage { place-items: center; padding: 8px; }
.iv-score { display: flex; gap: 12px; }
.iv-score div { padding: 12px 18px; border-radius: 18px; background: rgba(255,255,255,.18); }
.iv-score b { display: block; font-size: 1.8rem; line-height: 1.1; } .iv-score small { font-weight: 700; opacity: .9; }
.intro.end .btn.xl { background: #fff; color: #4F46E5; max-width: 420px; font-size: 1.2rem; }
.intro.end .btn.lg { max-width: 420px; }
.ex-onb { position: fixed; inset: 0; z-index: 88; display: grid; place-items: center; padding: 16px; background: rgba(15,23,42,.45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fade .25s ease; }
.ex-onb.out { animation: fadeout .3s ease forwards; }
.ex-card { width: 100%; max-width: 480px; max-height: 92vh; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding: 20px; border-radius: 26px; background: #fff; color: #0F172A; box-shadow: 0 30px 60px rgba(0,0,0,.35); animation: sceneIn .45s cubic-bezier(.3,1.5,.5,1);
  --surface: #fff; --surface-2: #F1F5F9; --ink: #0F172A; --line: #E2E8F0; --muted: #64748B; }
.ex-card .iv-steps { color: #0F172A; } .ex-card .iv-steps i { background: #E2E8F0; } .ex-card .iv-steps i.on { background: #0BB39B; } .ex-card .iv-steps i.done { background: #F59E0B; }
.ex-card .iv-wait { margin: 20px 0; color: #475569; }
.ex-head { display: flex; align-items: center; gap: 10px; }
.ex-head img.akili { width: 84px !important; height: auto !important; flex: none; }
.ex-head small { font-weight: 800; color: #0BB39B; text-transform: uppercase; letter-spacing: .06em; font-size: .72rem; }
.ex-head h2 { margin: 2px 0 0; font-size: 1.35rem; }
.ex-feats { display: flex; flex-direction: column; gap: 8px; }
.ex-feats div { padding: 12px 14px; border-radius: 16px; background: #F1F5F9; animation: ivIn .45s both; }
.ex-feats b { display: block; } .ex-feats span { font-size: .88rem; color: #475569; }
.ex-note { font-size: .86rem; color: #475569; background: #FEF3C7; padding: 10px 12px; border-radius: 12px; margin: 0; }
.ex-card .pulse-glow { animation-name: pulseGlowB; }
@keyframes pulseGlowB { 0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(11,179,155,.45); } 50% { transform: scale(1.03); box-shadow: 0 0 0 12px rgba(11,179,155,0); } }
.ex-q { margin: 0; font-size: 1.1rem; }
@keyframes bob { 50% { transform: translateY(-6px) rotate(-2deg); } }

/* ------------------------------------------------------------------ Contraste (v5.2)
   Règle unique : un fond foncé porte un texte clair, un fond clair un texte foncé.
   1. Un bouton ne hérite jamais la couleur de son parent : il prend celle de sa propre palette.
   2. Les cartes blanches posées sur un fond sombre (découverte, Examen d'État, questions éclair…) redéfinissent
      toute la palette claire : leurs boutons et réponses restent lisibles même en thème sombre.
   3. --on-brand : couleur du texte posé sur la couleur principale (foncé sur l'or du thème Nuit). */
:root { --on-brand: #fff; }
:root[data-accent="nuit"] { --on-brand: #1A1400; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"])[data-accent]:not([data-accent="nuit"]) { --brand-50: color-mix(in srgb, var(--brand) 22%, #131B2E); --brand-600: color-mix(in srgb, var(--brand) 70%, #fff); --brand-700: color-mix(in srgb, var(--brand) 50%, #fff); }
}
.choice { color: var(--ink); }
.choice .c-txt, .choice b, .choice span:not(.letter) { color: inherit; }
.choice.selected { color: var(--ink); background: var(--brand-50); }
.choice.selected .letter, .choice.correct .letter, .choice.wrong .letter { color: #fff; }
.choice.selected .letter { color: var(--on-brand); }
.choice.correct, .choice.wrong { color: var(--ink); }
.btn.secondary, .btn.ghost { color: var(--ink); }
.iv-q, .iv-quiz, .iv-exetat, .ex-card, .qq-card, .gm-over-card, .tip-bubble, .mm-grid {
  --surface: #fff; --surface-2: #F1F5F9; --ink: #0F172A; --ink-2: #334155; --muted: #64748B; --line: #E2E8F0;
  --brand-50: color-mix(in srgb, var(--brand) 14%, #fff); --ok-50: #E6F6EC; --bad-50: #FDECEC; --violet-50: #EFEDFD; --amber-50: #FEF5E6;
  color: #0F172A; color-scheme: light;
}
/* Réponses dans la salle de jeu (fond coloré ou sombre) : toujours des cartes claires à texte foncé */
.mode-game .choices, .mode-game .qq-choices {
  --surface: #fff; --surface-2: #F1F5F9; --ink: #0F172A; --ink-2: #334155; --muted: #64748B; --line: #E2E8F0;
  --brand-50: color-mix(in srgb, var(--brand) 14%, #fff); --ok-50: #E6F6EC; --bad-50: #FDECEC;
}
.mode-exam .choice.selected { color: #111827; }
/* Pastilles d'onglets et filtres actifs : texte lisible sur la couleur principale */
.tabs button.on, .seg button.on, .chip.on, .pill.on { color: var(--on-brand); }
/* ------------------------------------------------------------------ Akili, le renard XOO-X (v5.2) */
img.akili { display: block; height: auto; object-fit: contain; user-select: none; -webkit-user-drag: none; filter: drop-shadow(0 8px 12px rgba(15,23,42,.22)); transform-origin: 50% 90%; }
img.akili.m-happy { animation: akBob 3s ease-in-out infinite; }
img.akili.m-wink { animation: akTilt 2.6s ease-in-out infinite; }
img.akili.m-wow { animation: akPop .6s cubic-bezier(.3,1.6,.5,1) both, akBob 3s .6s ease-in-out infinite; }
img.akili.m-sad { animation: akSad 3.4s ease-in-out infinite; filter: drop-shadow(0 8px 12px rgba(15,23,42,.22)) saturate(.8); }
@keyframes akBob { 50% { transform: translateY(-5px) rotate(-1.5deg); } }
@keyframes akTilt { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(-6deg) translateY(-3px); } 60% { transform: rotate(4deg); } }
@keyframes akPop { 0% { transform: scale(.6) translateY(20px); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes akSad { 50% { transform: rotate(5deg) translateY(3px); } }
.ms-pango img.akili { width: 60px !important; height: auto !important; border-radius: 0; }
.akili-card { border-radius: 26px; overflow: hidden; box-shadow: 0 20px 44px rgba(0,0,0,.3); }
.akili-card img { display: block; width: 100%; height: auto; }
/* ------------------------------------------------------------------ Chargements et transitions (v5.2) */
.pg-load { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 28px 16px; opacity: 0; animation: pgShow .3s .15s ease forwards; }
.pg-load.full { position: fixed; inset: 0; justify-content: center; background: radial-gradient(120% 80% at 50% 10%, color-mix(in srgb, var(--brand) 18%, var(--bg)), var(--bg) 70%); z-index: 5; }
.pg-load.in-game { height: 100%; justify-content: center; color: #fff; font-weight: 700; animation-delay: 0s; text-align: center; }
.pg-load.in-game p { margin: 0; opacity: .9; }
.pg-load img.akili { width: 76px; height: auto; animation: akHop .9s ease-in-out infinite; }
@keyframes akHop { 0%, 100% { transform: translateY(0) scale(1, 1); } 40% { transform: translateY(-14px) scale(.97, 1.03); } 55% { transform: translateY(-14px); } 85% { transform: translateY(0) scale(1.04, .96); } }
.pg-dots { display: flex; gap: 6px; }
.pg-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--brand); animation: pgDot 1s ease-in-out infinite; }
.pg-dots i:nth-child(2) { animation-delay: .15s; background: var(--violet); } .pg-dots i:nth-child(3) { animation-delay: .3s; background: var(--amber); }
@keyframes pgDot { 0%, 100% { transform: translateY(0); opacity: .5; } 40% { transform: translateY(-7px); opacity: 1; } }
.pg-skel { width: 100%; max-width: 600px; display: flex; flex-direction: column; gap: 12px; margin-top: 6px; }
.pg-skel b { display: block; height: 58px; border-radius: 18px; background: linear-gradient(90deg, var(--surface-2) 0%, var(--surface) 50%, var(--surface-2) 100%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
.pg-skel b.w60 { width: 60%; height: 26px; } .pg-skel b.tall { height: 120px; }
.pg-skel span { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; } .pg-skel span b { height: 78px; }
@keyframes pgShow { to { opacity: 1; } }
#view.pg-in > :not(.pg-load) { animation: pgIn .28s cubic-bezier(.2,.8,.3,1) both; }
@keyframes pgIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
/* Réponse immédiate au toucher de tout bouton, lien-carte ou porte */
.btn:active, .home-doors a:active, .home-universe a:active, .card.link:active, .game-tile:active, .home-go:active, .cta-glow:active, .icon-btn:active, .pw-btn:active { transform: scale(.96); transition: transform .06s; }
@media (prefers-reduced-motion: reduce) { #view.pg-in > * { animation: none; } .pg-load img.akili { animation: none; } }

/* ------------------------------------------------------------------ Éditeur de produit (admin boutique) */
.shop-ed fieldset { border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px 14px; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.shop-ed legend { font-weight: 800; padding: 0 6px; }
.shop-imgs { display: flex; flex-direction: column; gap: 8px; }
.shop-img { display: grid; grid-template-columns: 64px auto 1fr auto; align-items: center; gap: 8px; padding: 6px; border-radius: 14px; background: var(--surface-2); }
.shop-img.is-main { outline: 2px solid var(--violet); }
.shop-img img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; background: #fff; }
.gg-preview { padding: 12px 14px; border-radius: 14px; background: #fff; color: #202124; border: 1px solid #DADCE0; font-family: Arial, sans-serif; }
.gg-preview small { display: block; color: #5F6368; font-size: .72rem; margin-bottom: 6px; }
.gg-url { font-size: .8rem; color: #202124; }
.gg-title { font-size: 1.12rem; color: #1A0DAB; line-height: 1.3; margin: 2px 0; }
.gg-price { font-size: .82rem; color: #188038; }
.gg-desc { font-size: .86rem; color: #4D5156; line-height: 1.45; }.iv-hello img.akili.p-hoodie-ok, .iv-hello img.akili.p-hoodie { width: 190px !important; border-radius: 30px; box-shadow: 0 18px 40px rgba(0,0,0,.3); filter: none; }

/* ------------------------------------------------------------------ Mini-jeux de parcours et défi en pleine partie (v5.2) */
.mini-timer { display: flex; align-items: center; gap: 8px; align-self: center; margin: 0 auto 6px; padding: 6px 14px; border-radius: 999px; background: rgba(15,23,42,.55); color: #fff; font-weight: 700; font-size: .88rem; }
.mini-timer b { font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.mini-timer svg { width: 18px; height: 18px; }
.mini-timer.low { background: #EF4444; animation: pulse 1s infinite; }
.dare-nudge { position: absolute; left: 50%; bottom: calc(86px + var(--safe-b)); z-index: 20; transform: translateX(-50%); width: min(420px, calc(100% - 24px)); display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 14px; border-radius: 18px; background: linear-gradient(120deg, #7C3AED, #DB2777); color: #fff; box-shadow: 0 14px 30px rgba(0,0,0,.3); animation: dareIn .5s cubic-bezier(.25,1.6,.45,1) both; font-size: .88rem; }
@keyframes dareIn { from { opacity: 0; transform: translateX(-50%) translateY(30px) scale(.9); } to { opacity: 1; transform: translateX(-50%); } }
.dare-nudge span { flex: 1; } .dare-nudge b { display: block; }
.dare-nudge .btn { background: #fff; color: #7C3AED; }
.dare-nudge .icon-btn { color: #fff; }
.dare-nudge.out { opacity: 0; transform: translateX(-50%) translateY(20px); transition: .3s; }
.game-player { position: fixed; }
/* ------------------------------------------------------------------ v6.2 : fil vertical de l'accueil */
/* Principe : un fond coloré et sombre, des cartes pleines (jamais transparentes) posées dessus.
   Le fond suit la couleur de la carte visible ; les cartes suivent le thème (clair ou sombre). */
.feedx, .vx { --f-base: #1E2848; --f-panel: #FFFFFF; --f-soft: #F1F5F9; --f-soft2: #E2E8F0; --f-ink: #0F172A; --f-ink2: #475569; --f-line: #E2E8F0;
  --f-on: #FFFFFF; --f-on2: rgba(255,255,255,.8); --f-chip: #2E3A63; --f-blob-l: 55%; --f-blob-s: 82%; --f-blob-a: .55;
  --f-ok: #059669; --f-bad: #DC2626; --f-ok-bg: #ECFDF5; --f-bad-bg: #FEF2F2; --f-shadow: 0 18px 44px rgba(2,6,23,.38); --fc: #0BB39B; }
:root[data-theme="dark"] .feedx, :root[data-theme="dark"] .vx { --f-base: #060A14; --f-panel: #141B2D; --f-soft: #1E2740; --f-soft2: #2A3554; --f-ink: #F1F5F9; --f-ink2: #9AA7BD; --f-line: #2A3552;
  --f-chip: #1A2338; --f-blob-l: 40%; --f-blob-s: 72%; --f-blob-a: .5; --f-ok: #34D399; --f-bad: #F87171; --f-ok-bg: #0D2A21; --f-bad-bg: #2E1519; --f-shadow: 0 18px 44px rgba(0,0,0,.55); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .feedx, :root:not([data-theme="light"]) .vx { --f-base: #060A14; --f-panel: #141B2D; --f-soft: #1E2740; --f-soft2: #2A3554; --f-ink: #F1F5F9; --f-ink2: #9AA7BD;
  --f-line: #2A3552; --f-chip: #1A2338; --f-blob-l: 40%; --f-blob-s: 72%; --f-blob-a: .5; --f-ok: #34D399; --f-bad: #F87171; --f-ok-bg: #0D2A21; --f-bad-bg: #2E1519; --f-shadow: 0 18px 44px rgba(0,0,0,.55); } }

body.on-feed { overflow: hidden; }
body.on-feed .main { padding-bottom: 0; min-height: 0; }
/* L'animation d'entrée des pages ne doit pas toucher le fil : une transformation casserait ses éléments fixes */
.feedx, body.on-feed .main, body.on-feed .main > * { animation: none !important; transform: none !important; filter: none !important; }
.feed, .feed-bg, .stories { position: fixed; left: 0; right: 0; top: calc(var(--hdr-h) + var(--sa-t)); }
.feed, .feed-bg { bottom: calc(var(--nav-h) + var(--safe-b)); }
@media (min-width: 960px) { .feed, .feed-bg { bottom: 0; } }

/* Fond vivant : une lumière de la couleur de la carte, et deux halos dont la teinte tourne lentement */
@property --fh { syntax: '<number>'; inherits: true; initial-value: 0; }
.feed-bg { z-index: 0; overflow: hidden; background: radial-gradient(120% 85% at 50% 0%, color-mix(in srgb, var(--fc) 30%, var(--f-base)), var(--f-base) 72%); --fh: 0; animation: fhue 48s linear infinite; transition: background 1s; }
.feed-bg i { position: absolute; width: 70vmax; height: 70vmax; border-radius: 50%; filter: blur(70px); opacity: var(--f-blob-a); will-change: transform; }
.feed-bg i:nth-child(1) { left: -25vmax; top: -30vmax; background: radial-gradient(circle, color-mix(in srgb, var(--fc) 75%, transparent), transparent 65%); animation: fblob1 21s ease-in-out infinite alternate; transition: background 1.2s; }
.feed-bg i:nth-child(2) { right: -30vmax; top: 10%; background: radial-gradient(circle, hsl(calc(var(--fh) * 1deg) var(--f-blob-s) var(--f-blob-l)), transparent 65%); animation: fblob2 26s ease-in-out infinite alternate; }
.feed-bg i:nth-child(3) { left: 5%; bottom: -40vmax; background: radial-gradient(circle, hsl(calc((var(--fh) + 140) * 1deg) var(--f-blob-s) var(--f-blob-l)), color-mix(in srgb, var(--brand) 30%, transparent) 40%, transparent 68%); animation: fblob3 31s ease-in-out infinite alternate; }
@keyframes fhue { to { --fh: 360; } }
@keyframes fblob1 { to { transform: translate(18vw, 22vh) scale(1.15); } }
@keyframes fblob2 { to { transform: translate(-22vw, 18vh) scale(.9); } }
@keyframes fblob3 { to { transform: translate(14vw, -24vh) scale(1.1); } }
.feedx.flash-ok .feed-bg::after, .feedx.flash-bad .feed-bg::after { content: ''; position: absolute; inset: 0; animation: fflash .9s ease-out both; }
.feedx.flash-ok .feed-bg::after { background: radial-gradient(circle at 50% 60%, color-mix(in srgb, var(--f-ok) 50%, transparent), transparent 70%); }
.feedx.flash-bad .feed-bg::after { background: radial-gradient(circle at 50% 60%, color-mix(in srgb, var(--f-bad) 45%, transparent), transparent 70%); }
@keyframes fflash { from { opacity: 1; } to { opacity: 0; } }
/* Les 5 dernières secondes d'un chrono : le bord de l'écran rougit et bat */
.feedx:has(.fcard.pressure) .feed-bg::before { content: ''; position: absolute; inset: 0; z-index: 1; box-shadow: inset 0 0 90px 10px rgba(225,29,72,.7); animation: fpress .5s ease-in-out infinite alternate; }
@keyframes fpress { from { opacity: .35; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .feed-bg, .feed-bg i { animation: none; } }

.feed { z-index: 1; overflow-y: auto; overscroll-behavior: contain; scroll-snap-type: y mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; color: var(--f-ink); }
.feed::-webkit-scrollbar { display: none; }
.feed.locked { overflow-y: hidden; touch-action: none; }
.feed.locked .fcard.gate, .feed.locked .fcard.running { touch-action: auto; }

/* Une carte = l'écran entier : le haut (le pack, les actions), la carte pleine au milieu, le bas (Suivant) */
.fcard { --c: #0BB39B; position: relative; height: 100%; scroll-snap-align: start; scroll-snap-stop: always; display: flex; justify-content: center; overflow: hidden; color: var(--f-ink); }
.fcard .fc-in { position: relative; width: 100%; max-width: 560px; height: 100%; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.fc-top { flex: none; display: flex; align-items: center; gap: 10px; min-height: 38px; }
.fc-main { flex: 0 1 auto; margin-block: auto; min-height: 0; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; scrollbar-width: none;
  background: var(--f-panel); border-radius: 26px; padding: 16px; box-shadow: var(--f-shadow); animation: fcrise .35s ease both; }
.fc-main::-webkit-scrollbar, .fcard .fc-in::-webkit-scrollbar { display: none; }
.fc-foot { flex: none; display: flex; gap: 10px; min-height: 0; }
.fc-foot:empty { display: none; }
@keyframes fcrise { from { opacity: 0; transform: translateY(14px) scale(.98); } }

/* Cartes centrées (jeu, défi, notion, parcours, profil) : un seul panneau plein, au centre */
.fcard .fc-in.center { height: auto; max-height: calc(100% - 28px); width: calc(100% - 28px); max-width: 520px; margin: auto 14px; justify-content: flex-start; align-items: center;
  text-align: center; gap: 14px; padding: 24px 20px; overflow-y: auto; scrollbar-width: none; background: var(--f-panel); border-radius: 28px; box-shadow: var(--f-shadow); }
.fcard.in .fc-in.center { animation: fcrise .4s ease both; }
.fcard:has(.fc-hint) { padding-bottom: 34px; }
.fcard.hello { padding-top: 96px; }

.fcard h1 { color: var(--f-ink); font-size: clamp(1.7rem, 7vw, 2.4rem); line-height: 1.1; margin: 0; }
.fcard h2 { color: var(--f-ink); font-size: clamp(1.25rem, 5.2vw, 1.65rem); line-height: 1.2; margin: 0; }
.fcard p { color: var(--f-ink2); margin: 0; }
.fcard .muted { color: var(--f-ink2); }
.fcard .link-btn { color: var(--f-ink2); }
.fcard .btn.secondary { background: var(--f-soft); color: var(--f-ink); border: 1px solid var(--f-line); }
.fcard .btn.xl { background: var(--f-ink); color: var(--f-panel); min-height: 56px; font-size: 1.08rem; border: 0; box-shadow: 0 10px 24px rgba(2,6,23,.22); }
.fc-badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--f-soft); font-weight: 800; font-size: .8rem; color: var(--f-ink); }
.fc-badge svg { width: 16px; height: 16px; }
.fc-badge.live { background: #E11D48; color: #fff; }
.fc-badge.hot { background: linear-gradient(120deg, #F59E0B, #E11D48); color: #fff; }
.fc-src { color: var(--f-ink2); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }

/* Le pack, en petit à gauche, posé sur le fond */
.fc-chip { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; min-width: 0; padding: 4px 12px 4px 4px; border-radius: 999px; background: var(--f-chip); color: var(--f-on); font-weight: 800; font-size: .8rem; box-shadow: 0 6px 16px rgba(0,0,0,.18); }
.fc-chip > span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fc-chip-ic { width: 28px; height: 28px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--c); color: #fff; }
.fc-chip-ic svg { width: 15px; height: 15px; }

/* La question */
.fc-q { font-weight: 800; line-height: 1.28; color: var(--f-ink) !important; white-space: pre-line; }
.fc-q.short { font-size: clamp(1.22rem, 5.3vw, 1.55rem); }
.fc-q.mid { font-size: clamp(1.08rem, 4.6vw, 1.35rem); }
.fc-q.long { font-size: clamp(.98rem, 4vw, 1.14rem); }
.fcard.answered .fc-q { font-size: 1rem; }
.fcard .choices { gap: 8px; margin: 0; }
.fcard .choice { background: var(--f-soft); border: 2px solid var(--f-soft); color: var(--f-ink); min-height: 50px; padding: 9px 12px; box-shadow: none;
  transition: max-height .35s ease, opacity .3s, padding .3s, margin .3s, border-width .3s, transform .15s, background .2s; max-height: 140px; }
.fcard .choice .letter { background: var(--f-panel); color: var(--f-ink); }
.fcard .choice:hover { border-color: color-mix(in srgb, var(--c) 60%, var(--f-soft)); }
.fcard .choice:active { transform: scale(.98); }
.fcard .choice.correct { background: var(--f-ok-bg); border-color: var(--f-ok); color: var(--f-ink); }
.fcard .choice.correct .letter { background: var(--f-ok); color: #fff; }
.fcard .choice.wrong { background: var(--f-bad-bg); border-color: var(--f-bad); color: var(--f-ink); }
.fcard .choice.wrong .letter { background: var(--f-bad); color: #fff; }
/* Après la réponse : les réponses inutiles s'effacent, la place va à la correction */
.fcard .choices:not(.img-grid) .choice.dim { max-height: 0; min-height: 0; padding-top: 0; padding-bottom: 0; margin: -4px 0; opacity: 0; border-width: 0; pointer-events: none; }
.bz-choices .choice.dim { opacity: .45; max-height: 140px !important; min-height: 50px !important; padding: 9px 12px !important; margin: 0 !important; border-width: 2px !important; }

/* Médias : photo, vidéo, son */
.qm { flex: none; margin: 0; display: flex; justify-content: center; }
.qm-img img, .qm-video video { max-width: 100%; max-height: 32vh; border-radius: 18px; object-fit: contain; background: #fff; transition: max-height .35s ease, opacity .35s; }
.fcard.answered .qm-img img, .fcard.answered .qm-video video { max-height: 15vh; }
.qm-video { position: relative; }
.qm-video video { background: #000; max-height: 40vh; }
.qm-snd { position: absolute; right: 8px; bottom: 8px; width: 38px; height: 38px; border-radius: 50%; border: 0; background: #0F172A; color: #fff; display: grid; place-items: center; z-index: 2; }
.qm-snd svg { width: 20px; height: 20px; }
.qm-play { display: flex; align-items: center; gap: 12px; padding: 12px 18px 12px 12px; border-radius: 999px; border: 0; background: var(--f-soft); color: var(--f-ink); font-weight: 800; }
.qm-ic { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--c); color: #fff; }
.qm-ic svg { width: 22px; height: 22px; }
.qm-wave { display: flex; align-items: center; gap: 3px; height: 28px; }
.qm-wave i { width: 4px; height: 8px; border-radius: 3px; background: var(--c); }
.qm-play.playing .qm-wave i { animation: qwave .7s ease-in-out infinite alternate; }
.qm-wave i:nth-child(2n) { animation-delay: .15s !important; } .qm-wave i:nth-child(3n) { animation-delay: .3s !important; }
@keyframes qwave { to { height: 26px; } }
.qm-credit { flex: none; font-size: .62rem !important; line-height: 1.2; color: var(--f-ink2) !important; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; max-width: 100%; }

/* Réponses en images : 2 × 2 tuiles carrées, à la taille de l'écran */
.img-grid { display: grid !important; grid-template-columns: 1fr 1fr; gap: 8px !important; width: min(100%, 46vh); align-self: center; }
.fcard.answered .img-grid { width: min(100%, 38vh); }
.choice.ci { position: relative; display: block; padding: 0 !important; min-height: 0 !important; max-height: none !important; aspect-ratio: 1; overflow: hidden; border-radius: 16px; border-width: 3px; background: #fff !important; }
.choice.ci img { width: 100%; height: 100%; object-fit: cover; display: block; }
.choice.ci .letter { position: absolute; left: 6px; top: 6px; width: 26px; height: 26px; font-size: .78rem; background: #0F172A !important; color: #fff !important; z-index: 2; }
.choice.ci .ci-name { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 6px 5px; font-size: .74rem; font-weight: 800; line-height: 1.15; color: #fff; text-align: center;
  background: linear-gradient(transparent, rgba(0,0,0,.8)); opacity: 0; transform: translateY(8px); transition: .3s; z-index: 2; }
.fcard.answered .choice.ci .ci-name, .pcx .choice.ci:disabled .ci-name { opacity: 1; transform: none; }
.choice.ci.dim { opacity: .55; }
.choice.ci.correct { border-color: var(--f-ok, #059669); box-shadow: 0 0 0 3px color-mix(in srgb, var(--f-ok, #059669) 40%, transparent); }
.choice.ci.wrong { border-color: var(--f-bad, #DC2626); }

/* La correction : pleine, verte ou rouge ; on la touche pour tout lire */
.fc-fb { flex: none; padding: 10px 14px; border-radius: 16px; background: var(--f-soft); border: 1.5px solid var(--f-line); text-align: left; animation: fxpop .3s ease; cursor: pointer; }
.fc-fb.ok { background: var(--f-ok-bg); border-color: color-mix(in srgb, var(--f-ok) 45%, var(--f-ok-bg)); }
.fc-fb.bad { background: var(--f-bad-bg); border-color: color-mix(in srgb, var(--f-bad) 45%, var(--f-bad-bg)); }
.fc-fb > b { display: flex; align-items: center; gap: 6px; font-size: .95rem; }
.fc-fb > b svg { width: 18px; height: 18px; flex: none; }
.fc-fb.ok > b { color: var(--f-ok); } .fc-fb.bad > b { color: var(--f-bad); }
.fc-fb p { margin-top: 4px; font-size: .88rem; line-height: 1.4; color: var(--f-ink) !important; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.fc-fb.open p, .pcx .fc-fb p { -webkit-line-clamp: unset; display: block; max-height: 34vh; overflow-y: auto; }
.fc-fb .fc-more { display: none; }
.fc-fb.open .fc-more { display: flex; }
.fc-more { gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.fc-more a { display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px; border-radius: 999px; background: var(--f-panel); color: var(--f-ink); font-weight: 700; font-size: .8rem; }
.fc-more a svg { width: 15px; height: 15px; }

/* « Suivant » : posé sur le fond, toujours visible ; il se remplit avant d'enchaîner tout seul */
.fc-next { position: relative; flex: 1; width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 54px; border-radius: 999px; border: 0; overflow: hidden;
  background: #FFFFFF; color: #0F172A; font-weight: 800; font-size: 1.04rem; box-shadow: 0 10px 26px rgba(0,0,0,.28); animation: fxpop .3s ease; }
.fc-next svg { width: 20px; height: 20px; transform: rotate(90deg); }
.fc-next span, .fc-next svg { position: relative; z-index: 1; }
.fc-next::before { content: ''; position: absolute; inset: 0; transform: scaleX(0); transform-origin: left; background: color-mix(in srgb, var(--fc) 35%, #FFFFFF); }
.fc-next.auto::before { animation: fauto var(--auto, 4s) linear forwards; }
.fc-in.center .fc-next { background: var(--f-ink); color: var(--f-panel); box-shadow: 0 10px 22px rgba(2,6,23,.2); }
.fc-in.center .fc-next::before { background: color-mix(in srgb, var(--fc) 60%, var(--f-ink)); }
@keyframes fauto { to { transform: scaleX(1); } }
.fc-down { align-self: center; width: 46px; height: 46px; border-radius: 50%; border: 0; margin-top: 6px; background: var(--f-soft); color: var(--f-ink); display: grid; place-items: center; animation: fcbob 1.6s ease-in-out infinite; }
.fc-down svg { transform: rotate(90deg); width: 22px; height: 22px; }
.fc-down.big { width: 62px; height: 62px; background: var(--f-ink); color: var(--f-panel); margin-top: 12px; }
@keyframes fcbob { 50% { transform: translateY(6px); } }
.hello-tip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--f-soft); }
.hello-tip svg { width: 16px; height: 16px; }

/* Invitation à glisser vers le haut, sous les cartes centrées, après quelques secondes */
.fc-hint { position: absolute; left: 50%; bottom: 6px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; color: var(--f-on2); font-weight: 700; font-size: .7rem; opacity: 0; pointer-events: none; }
.fc-hint svg { width: 22px; height: 22px; transform: rotate(-90deg); animation: fhint 1.4s ease-in-out infinite; }
.fcard.in .fc-hint { animation: fhintin .5s 2.6s forwards; }
.feed.locked .fc-hint, .fcard.running .fc-hint { display: none; }
@keyframes fhint { 50% { transform: rotate(-90deg) translateX(6px); } }
@keyframes fhintin { to { opacity: 1; } }

/* Actions : sur téléphone en haut à droite (rien ne recouvre la carte), sur grand écran à droite de la carte */
.fc-rail { position: absolute; z-index: 3; display: flex; align-items: center; top: 12px; right: max(14px, calc(50% - 266px)); flex-direction: row; gap: 6px; }
.fc-rail > button { display: flex; flex-direction: column; align-items: center; gap: 2px; border: 0; background: none; color: var(--f-on); font-weight: 800; padding: 0; }
.fc-rail > button svg { width: 20px; height: 20px; padding: 9px; box-sizing: content-box; border-radius: 50%; background: var(--f-chip); box-shadow: 0 6px 14px rgba(0,0,0,.18); }
.fc-rail > button small { display: none; font-size: .68rem; color: var(--f-on); }
.fc-rail > button.on:not(.fc-av) svg { color: #F43F5E; fill: #F43F5E; animation: fxpop .3s ease; }
.fc-av { position: relative; }
.fc-av > svg { background: var(--c) !important; color: #fff; box-shadow: 0 0 0 2px var(--f-base) !important; }
.fc-av i { position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%); width: 17px; height: 17px; border-radius: 50%; background: #F43F5E; display: grid; place-items: center; }
.fc-av i svg { width: 11px !important; height: 11px !important; padding: 0 !important; background: none !important; color: #fff; box-shadow: none !important; }
.fc-av i svg:last-child { display: none; }
.fc-av.on i { background: var(--f-ok); } .fc-av.on i svg:first-child { display: none; } .fc-av.on i svg:last-child { display: block; }
.fc-disc span { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: conic-gradient(from 0deg, #111827, #374151, #111827, #4B5563, #111827); box-shadow: 0 0 0 2px var(--f-chip); }
.fc-disc span svg { width: 16px !important; height: 16px !important; padding: 0 !important; background: none !important; color: #fff; box-shadow: none !important; }
.feedx.music-on .fc-disc span { animation: fspin 4s linear infinite; }
@keyframes fspin { to { transform: rotate(360deg); } }
.fcard.q .fc-top { padding-right: 186px; }
@media (min-width: 720px) {
  .fcard.q .fc-top { padding-right: 0; }
  .fc-rail { top: 50%; right: max(10px, calc(50% - 350px)); transform: translateY(-50%); flex-direction: column; gap: 14px; }
  .fc-rail > button svg { width: 24px; height: 24px; padding: 11px; }
  .fc-rail > button small { display: block; }
  .fc-disc span { width: 46px; height: 46px; }
}
.music-pop { position: fixed; z-index: 80; padding: 10px 12px; border-radius: 16px; background: var(--surface); color: var(--ink); box-shadow: 0 16px 40px rgba(0,0,0,.25); display: grid; gap: 6px; max-width: 220px; animation: fxpop .2s ease; }
.music-pop b { font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Petit bouton « Partager » en haut à droite d'une carte centrée */
.pc-share { position: absolute; top: 12px; right: 12px; width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--f-soft); color: var(--f-ink); display: grid; place-items: center; z-index: 2; }
.pc-share svg { width: 18px; height: 18px; }
.fc-acts, .pc-acts, .fg-acts { display: flex; gap: 8px; width: 100%; }
.fc-acts > *, .pc-acts > *, .fg-acts > * { flex: 1; }

/* Flèches de défilement sur ordinateur */
.feed-nav { display: none; }
@media (min-width: 900px) and (hover: hover) {
  .feed-nav { position: fixed; z-index: 4; right: max(18px, calc(50% - 480px)); top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 12px; }
  .feed-nav button { width: 52px; height: 52px; border-radius: 50%; border: 0; background: var(--f-chip); color: var(--f-on); display: grid; place-items: center; box-shadow: 0 8px 22px rgba(0,0,0,.25); transition: transform .15s; }
  .feed-nav button:hover { transform: scale(1.08); }
  .feed-nav button svg { width: 24px; height: 24px; }
  .feed-nav button:first-child svg { transform: rotate(-90deg); }
  .feed-nav button:last-child svg { transform: rotate(90deg); }
}

/* ------------------------------------------------------------------ Chargement : squelettes et images */
:root { --sk1: #E2E8F0; --sk2: #F8FAFC; }
:root[data-theme="dark"] { --sk1: #1E2740; --sk2: #2A3554; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --sk1: #1E2740; --sk2: #2A3554; } }
.feedx { --sk1: var(--f-soft); --sk2: var(--f-soft2); }
.sk, .is-loading, .is-slow { background-image: linear-gradient(100deg, var(--sk1) 30%, var(--sk2) 50%, var(--sk1) 70%) !important; background-size: 300% 100% !important; animation: skm 1.3s ease-in-out infinite; }
@keyframes skm { from { background-position: 100% 0; } to { background-position: 0 0; } }
.sk { display: block; border-radius: 14px; }
.sk-chip { width: 160px; height: 36px; border-radius: 999px; }
.fc-top .sk, .stories .sk { --sk1: var(--f-chip); --sk2: color-mix(in srgb, var(--f-chip) 70%, #FFFFFF); }
.sk-img { height: 24vh; border-radius: 18px; }
.sk-line { height: 22px; }
.sk-line.short { width: 60%; }
.sk-btn { height: 50px; }
.sk-msg { text-align: center; font-weight: 700; font-size: .85rem; color: var(--f-ink2); margin-top: 4px; }
.fcard.skel .fc-main { width: 100%; }
.sk-st { pointer-events: none; }
.sk-label { width: 44px; height: 10px; border-radius: 6px; margin-top: 2px; }

/* Une image qui charge garde sa place : squelette qui scintille, roue et message ; « Réessayer » si elle échoue */
.is-loading, .is-slow, .is-failed { position: relative; }
.qm-img.is-loading, .qm-img.is-slow, .qm-img.is-failed, .qm-video.is-loading, .qm-video.is-slow, .qm-video.is-failed { min-height: 22vh; min-width: min(100%, 300px); border-radius: 18px; }
.qm-img.is-failed, .qm-video.is-failed, .imgbox.is-failed { background: var(--sk1); }
.is-loading > img, .is-slow > img, .is-failed > img, .is-loading > video, .is-slow > video, .is-failed > video { opacity: 0; }
.ld { display: none; position: absolute; inset: 0; z-index: 1; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 8px; text-align: center; color: var(--f-ink2, #475569); font-weight: 700; font-size: .8rem; pointer-events: none; }
.is-loading > .ld, .is-slow > .ld, .is-failed > .ld { display: flex; }
.ld-spin { width: 30px; height: 30px; border-radius: 50%; border: 3px solid currentColor; border-right-color: transparent; opacity: .55; animation: ldspin .8s linear infinite; }
.ld-mini .ld-spin { width: 22px; height: 22px; }
@keyframes ldspin { to { transform: rotate(360deg); } }
.is-slow .ld small { color: #D97706; }
.is-failed .ld-spin { display: none; }
.ld-retry { display: none; pointer-events: auto; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; border: 0; background: var(--f-ink, #0F172A); color: var(--f-panel, #fff); font-weight: 800; font-size: .82rem; }
.ld-retry svg { width: 16px; height: 16px; }
.is-failed .ld-retry { display: inline-flex; }
.ld small:empty { display: none; }
.imgbox { display: block; position: relative; overflow: hidden; }
.imgbox > img { display: block; width: 100%; height: 100%; object-fit: cover; transition: opacity .35s; }

/* ------------------------------------------------------------------ Défis façon « statuts » */
/* v6.5 : les bulles partent dès le premier mouvement vers le bas, en vague (gauche → droite), et reviennent
   en rebond dès qu'on remonte. Le conteneur ne bouge que de quelques pixels : ce sont les bulles qui s'envolent. */
.stories { z-index: 3; padding: 8px 0 6px; transition: transform .38s cubic-bezier(.2,.9,.25,1), opacity .3s ease; pointer-events: none; }
.stories.hide { transform: translateY(-14px); opacity: 0; transition: transform .26s cubic-bezier(.5,0,.75,0), opacity .22s ease .06s; }
.stories .st { transition: transform .34s cubic-bezier(.2,1.5,.4,1) calc(var(--k, 0) * 22ms), opacity .25s ease calc(var(--k, 0) * 22ms); }
.stories.hide .st { transform: translateY(-26px) scale(.55); opacity: 0; transition: transform .22s cubic-bezier(.5,0,.75,0) calc(var(--k, 0) * 14ms), opacity .18s ease calc(var(--k, 0) * 14ms); }
.stories.hide .st-row { pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .stories, .stories .st { transition: opacity .2s !important; transform: none !important; } }
.st-row { display: flex; gap: 12px; overflow-x: auto; padding: 2px 14px 4px; scrollbar-width: none; max-width: 640px; margin: 0 auto; pointer-events: auto; scroll-snap-type: x proximity; }
.st-row::-webkit-scrollbar { display: none; }
.st { flex: none; width: 66px; display: flex; flex-direction: column; align-items: center; gap: 4px; border: 0; background: none; padding: 0; color: var(--f-on); scroll-snap-align: start; }
.st-ring { width: 62px; height: 62px; border-radius: 50%; padding: 3px; background: conic-gradient(#F59E0B, #EF4444, #D946EF, #6366F1, #10B981, #F59E0B); display: grid; place-items: center; }
.st.seen .st-ring { background: color-mix(in srgb, var(--f-on) 35%, var(--f-base)); }
.st.live .st-ring { background: #E11D48; animation: stpulse 1.4s ease-in-out infinite; }
@keyframes stpulse { 50% { box-shadow: 0 0 0 5px rgba(225,29,72,.35); } }
.st-ring > img, .st-ring > .st-ic, .st-ring > .imgbox { width: 100%; height: 100%; border-radius: 50%; border: 3px solid var(--f-base); object-fit: cover; background-color: var(--f-chip); }
.st-ring > .imgbox .ld-spin { width: 18px; height: 18px; color: var(--f-on); }
.st-ic { display: grid; place-items: center; color: #fff; background: var(--c, #6366F1) !important; font-weight: 800; font-size: .95rem; }
.st-ic svg { width: 24px; height: 24px; }
.st-ic.plus { background: #FFFFFF !important; color: #0F172A; } .st-ic.live { background: #E11D48 !important; } .st-ic.daily { background: #F59E0B !important; }
.st-ic.prize { background: #10B981 !important; } .st-ic.duel { background: #7C3AED !important; }
.st small { font-size: .68rem; font-weight: 700; max-width: 66px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--f-on); text-shadow: 0 1px 3px rgba(0,0,0,.45); }
.sk-st .st-ring { background: none; }

/* Un statut ouvert, en plein écran */
.story-view { position: fixed; inset: 0; z-index: 90; background: radial-gradient(120% 80% at 30% 0%, #4338CA, #0B1120 70%); color: #fff; display: flex; flex-direction: column; animation: svin .25s ease; padding: calc(10px + var(--sa-t)) 16px calc(18px + var(--sa-b)); }
@keyframes svin { from { opacity: 0; transform: scale(.96); } }
.sv-top { display: flex; align-items: center; gap: 10px; max-width: 520px; width: 100%; margin: 0 auto; }
.sv-bars { flex: 1; display: flex; gap: 4px; }
.sv-bars i { flex: 1; height: 3px; border-radius: 3px; background: rgba(255,255,255,.3); overflow: hidden; position: relative; }
.sv-bars i.done { background: #fff; }
.sv-bars i.on::after { content: ''; position: absolute; inset: 0; background: #fff; transform-origin: left; animation: svbar 7s linear forwards; }
@keyframes svbar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.sv-x { width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255,255,255,.16); color: #fff; display: grid; place-items: center; }
.sv-x svg { width: 20px; height: 20px; }
.sv-card { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; max-width: 480px; width: 100%; margin: 0 auto; }
.sv-card h1 { color: #fff; font-size: clamp(1.8rem, 8vw, 2.6rem); line-height: 1.1; }
.sv-card p { color: rgba(255,255,255,.88); }
.sv-meta { font-weight: 800; color: #FDE68A !important; }
.sv-big { width: 96px; height: 96px; border-radius: 30px; display: grid; place-items: center; background: rgba(255,255,255,.16); }
.sv-big svg { width: 48px; height: 48px; }
.sv-cover { width: min(70vw, 280px); aspect-ratio: 1; border-radius: 26px; box-shadow: 0 20px 50px rgba(0,0,0,.4); --sk1: #1E293B; --sk2: #334155; }
.sv-acts { display: grid; gap: 10px; width: 100%; margin-top: 8px; }
.sv-acts .btn.xl { background: #fff; color: #0B1120; min-height: 58px; border: 0; }
.sv-acts .btn.secondary { background: rgba(255,255,255,.16); color: #fff; border-color: rgba(255,255,255,.3); }
.sv-acts .on { background: #fff !important; color: #0B1120 !important; }
.story-view:has(.c-daily) { background: radial-gradient(120% 80% at 30% 0%, #D97706, #1C1006 70%); }
.story-view:has(.c-duel) { background: radial-gradient(120% 80% at 30% 0%, #7C3AED, #0F0A1F 70%); }
.story-view:has(.c-live) { background: radial-gradient(120% 80% at 30% 0%, #E11D48, #1A0710 70%); }
.story-view:has(.c-prize) { background: radial-gradient(120% 80% at 30% 0%, #059669, #04140F 70%); }

/* ------------------------------------------------------------------ Défi : entrée animée, cadre qui tourne */
@property --dang { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.fcard.duel { --c: #7C3AED; }
.fcard .duel-in { border: 3px solid transparent; background: linear-gradient(var(--f-panel), var(--f-panel)) padding-box, conic-gradient(from var(--dang), #7C3AED, #DB2777, #F59E0B, #10B981, #7C3AED) border-box; animation: dang 6s linear infinite; }
.fcard.in .duel-in { animation: dang 6s linear infinite, fcrise .4s ease both; }
@keyframes dang { to { --dang: 360deg; } }
.duel-stage { position: relative; display: flex; align-items: center; justify-content: center; gap: 18px; padding: 8px 0; }
.duel-vs { font-size: 1.8rem; font-weight: 900; background: linear-gradient(135deg, #F59E0B, #E11D48); -webkit-background-clip: text; background-clip: text; color: transparent; }
.duel-av { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #7C3AED, #DB2777); color: #fff; font-weight: 900; font-size: 1.5rem; overflow: hidden; box-shadow: 0 0 0 4px var(--f-panel), 0 0 0 7px color-mix(in srgb, #7C3AED 35%, var(--f-panel)); }
.duel-av.me { background: var(--f-ink); color: var(--f-panel); }
.duel-av.q { background: var(--f-soft); color: var(--f-ink2); font-size: 2.2rem; }
.duel-av img { width: 100%; height: 100%; object-fit: cover; }
.duel-av svg { width: 36px; height: 36px; }
.duel-stage.big .duel-av { width: 96px; height: 96px; }
.duel-sparks { position: absolute; left: 50%; top: 50%; pointer-events: none; }
.duel-sparks i { position: absolute; width: 9px; height: 9px; margin: -4.5px; border-radius: 50%; background: #F59E0B; opacity: 0; }
.duel-sparks i:nth-child(2n) { background: #DB2777; }
.fcard.in .duel-av.l { animation: duelL .6s cubic-bezier(.2,1.5,.4,1) both, dfloat 3s .7s ease-in-out infinite; }
.fcard.in .duel-av.r { animation: duelR .6s cubic-bezier(.2,1.5,.4,1) .1s both, dfloat 3s 1.2s ease-in-out infinite; }
.fcard.in .duel-vs { animation: vsIn .5s cubic-bezier(.2,1.8,.4,1) .55s both; }
.fcard.in .duel-sparks i { animation: dspark .8s ease-out .8s both; }
.fcard.in .duel-av.q { animation: duelR .6s cubic-bezier(.2,1.5,.4,1) .1s both, qpulse 1.6s 1s ease-in-out infinite; }
@keyframes duelL { from { transform: translateX(-130px) scale(.5); opacity: 0; } }
@keyframes duelR { from { transform: translateX(130px) scale(.5); opacity: 0; } }
@keyframes vsIn { from { transform: scale(3.2) rotate(-25deg); opacity: 0; } }
@keyframes dspark { 0% { transform: rotate(var(--a)) translateX(0) scale(1.2); opacity: 1; } 100% { transform: rotate(var(--a)) translateX(78px) scale(0); opacity: 0; } }
@keyframes dfloat { 50% { transform: translateY(-5px); } }
@keyframes qpulse { 50% { box-shadow: 0 0 0 4px var(--f-panel), 0 0 0 11px color-mix(in srgb, #7C3AED 25%, var(--f-panel)); } }
.duel-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.duel-meta span { display: inline-flex; align-items: center; gap: 5px; padding: 6px 11px; border-radius: 999px; background: var(--f-soft); color: var(--f-ink); font-weight: 700; font-size: .8rem; }
.duel-meta svg { width: 15px; height: 15px; }

/* Boutons vivants : battement de cœur lent, reflet qui passe, main qui touche */
.cta-wrap { position: relative; width: 100%; }
.btn.beat { animation: beat 1.9s ease-in-out infinite; }
@keyframes beat { 0%, 50%, 100% { transform: scale(1); } 10% { transform: scale(1.045); } 20% { transform: scale(1); } 30% { transform: scale(1.035); } }
.fcard .btn.shine, .fcard .btn.hot { position: relative; overflow: hidden; color: #fff; }
.fcard .btn.shine { background: linear-gradient(120deg, #7C3AED, #DB2777); }
.fcard .btn.hot { background: linear-gradient(120deg, #F59E0B, #E11D48); }
.btn.shine::after, .btn.hot::after { content: ''; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.55), transparent); transform: skewX(-20deg); animation: shine 3.2s ease-in-out infinite; }
@keyframes shine { 0%, 55% { left: -60%; } 85%, 100% { left: 130%; } }
.tap-hand { position: absolute; right: 14%; bottom: -20px; width: 46px; height: 46px; pointer-events: none; z-index: 2; filter: drop-shadow(0 5px 6px rgba(0,0,0,.28)); animation: taphand 1.9s ease-in-out infinite; }
.tap-hand svg { width: 100%; height: 100%; }
@keyframes taphand { 0%, 100% { transform: translate(12px, 14px) rotate(-12deg); opacity: .0; } 15% { opacity: 1; } 40% { transform: translate(0, 0) rotate(-12deg); } 50% { transform: translate(0, 2px) rotate(-12deg) scale(.86); } 62% { transform: translate(0, 0) rotate(-12deg) scale(1); } 85% { opacity: 1; } }

/* ------------------------------------------------------------------ Démos des jeux (4 secondes, en boucle) */
.dm { position: relative; width: min(230px, 64vw); height: 150px; margin: 2px auto; flex: none; }
.dm .dm-pts { position: absolute; left: 50%; top: 34%; transform: translateX(-50%); font-weight: 900; font-size: 1.35rem; color: #F59E0B; opacity: 0; animation: dmpts 4s infinite; text-shadow: 0 2px 0 var(--f-panel); z-index: 3; white-space: nowrap; }
@keyframes dmpts { 0%, 44% { opacity: 0; transform: translate(-50%, 12px) scale(.6); } 52% { opacity: 1; transform: translate(-50%, 0) scale(1.18); } 70% { opacity: 1; transform: translate(-50%, -14px) scale(1); } 80%, 100% { opacity: 0; transform: translate(-50%, -18px); } }
.dm-burst { position: absolute; left: 50%; top: 80%; z-index: 2; }
.dm-burst b { position: absolute; width: 9px; height: 9px; margin: -4.5px; border-radius: 50%; background: #F59E0B; opacity: 0; animation: dmburst 4s infinite; }
.dm-burst b:nth-child(2n) { background: #6366F1; }
@keyframes dmburst { 0%, 41% { opacity: 0; transform: rotate(var(--a)) translateX(0) scale(0); } 46% { opacity: 1; transform: rotate(var(--a)) translateX(12px) scale(1.2); } 66%, 100% { opacity: 0; transform: rotate(var(--a)) translateX(78px) scale(.3); } }
/* Blocs : la pièce tombe, la ligne s'illumine et éclate */
.dm-grid.g5 { position: absolute; inset: 8px 24px; display: grid; grid-template-columns: repeat(5, 1fr); grid-template-rows: repeat(3, 1fr); gap: 5px; }
.dm-grid i { border-radius: 7px; background: var(--f-soft); }
.dm-grid i.f { background: #6366F1; box-shadow: inset 0 -4px 0 rgba(0,0,0,.18); }
.dm-grid i.t { background: #14B8A6; box-shadow: inset 0 -4px 0 rgba(0,0,0,.18); }
.dm-grid i.row:not(.drop) { animation: dmrow 4s infinite; animation-delay: calc(var(--i) * .03s); }
.dm-grid i.drop { background: #F59E0B; box-shadow: inset 0 -4px 0 rgba(0,0,0,.18); animation: dmdrop 4s infinite; }
@keyframes dmdrop { 0% { transform: translateY(-260%); opacity: 0; } 8% { opacity: 1; } 30% { transform: none; } 37% { transform: none; filter: none; } 42% { filter: brightness(1.8); transform: scale(1.1); } 55%, 100% { transform: scale(0); opacity: 0; } }
@keyframes dmrow { 0%, 36% { transform: none; filter: none; opacity: 1; } 42% { filter: brightness(1.8); transform: scale(1.1); } 55%, 90% { transform: scale(0); opacity: 0; } 100% { transform: none; opacity: 1; } }
.dm-blocs .dm-burst { top: 82%; }
/* Mémoire : deux cartes se retournent, même symbole, paire ! */
.dm-cards { position: absolute; inset: 18px 6px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; align-items: center; perspective: 500px; }
.dm-card { position: relative; aspect-ratio: 3 / 4; transform-style: preserve-3d; }
.dm-card b, .dm-card em { position: absolute; inset: 0; border-radius: 11px; backface-visibility: hidden; display: grid; place-items: center; }
.dm-card b { background: linear-gradient(135deg, #A855F7, #EC4899); box-shadow: inset 0 -4px 0 rgba(0,0,0,.18); }
.dm-card em { background: #fff; border: 2px solid #E2E8F0; transform: rotateY(180deg); font-style: normal; font-size: 1.7rem; color: #F59E0B; }
.dm-card.c0 { animation: dmf1 4s infinite; } .dm-card.c3 { animation: dmf2 4s infinite; }
.dm-card.c0 em, .dm-card.c3 em { animation: dmmatch 4s infinite; }
@keyframes dmf1 { 0%, 8% { transform: rotateY(0); } 16%, 82% { transform: rotateY(180deg); } 90%, 100% { transform: rotateY(0); } }
@keyframes dmf2 { 0%, 26% { transform: rotateY(0); } 34%, 82% { transform: rotateY(180deg); } 90%, 100% { transform: rotateY(0); } }
@keyframes dmmatch { 0%, 40% { box-shadow: none; border-color: #E2E8F0; } 46%, 76% { box-shadow: 0 0 0 4px rgba(16,185,129,.35); border-color: #10B981; } 82%, 100% { box-shadow: none; } }
.dm-memoire .dm-pts { color: #10B981; top: 2px; }
/* Fruits : un échange, trois fruits alignés éclatent */
.dm-fruits { position: absolute; left: 50%; top: 4px; transform: translateX(-50%); display: grid; grid-template-columns: repeat(3, 40px); gap: 6px; }
.dm-fruits .fr { width: 40px; height: 40px; border-radius: 50%; box-shadow: inset -4px -6px 0 rgba(0,0,0,.16), inset 4px 4px 0 rgba(255,255,255,.4); }
.fr.r { background: #EF4444; } .fr.y { background: #FACC15; } .fr.g { background: #22C55E; } .fr.p { background: #A855F7; }
.fr.p0 { animation: dmswapd 4s infinite; } .fr.p3 { animation: dmswapu 4s infinite; } .fr.p4, .fr.p5 { animation: dmpop 4s infinite; }
@keyframes dmswapd { 0%, 10% { transform: none; } 26%, 38% { transform: translateY(46px); } 44% { transform: translateY(46px) scale(1.2); } 52%, 90% { transform: translateY(46px) scale(0); } 91% { transform: none; opacity: 0; } 100% { opacity: 1; } }
@keyframes dmswapu { 0%, 10% { transform: none; } 26%, 88% { transform: translateY(-46px); } 96%, 100% { transform: none; } }
@keyframes dmpop { 0%, 38% { transform: none; } 44% { transform: scale(1.2); } 52%, 90% { transform: scale(0); } 100% { transform: none; } }
.dm-bonbons .dm-burst { top: 70px; }
/* Course : Akili court et saute le rocher */
.dm-run { position: absolute; inset: 0; border-radius: 20px; overflow: hidden; background: linear-gradient(#7DD3FC, #E0F2FE); }
.dm-ground { position: absolute; left: 0; right: 0; bottom: 0; height: 24px; background: repeating-linear-gradient(90deg, #22C55E 0 18px, #16A34A 18px 36px); animation: dmground .5s linear infinite; }
@keyframes dmground { to { background-position: -36px 0; } }
.dm-hero { position: absolute; left: 28px; bottom: 22px; width: 54px; height: 54px; animation: dmjump 2s infinite; }
.dm-hero svg { width: 100%; height: 100%; }
@keyframes dmjump { 0%, 38% { transform: translateY(0); } 54% { transform: translateY(-62px) rotate(-8deg); } 70%, 100% { transform: translateY(0); } }
.dm-rock { position: absolute; bottom: 22px; left: 100%; width: 32px; height: 26px; border-radius: 13px 13px 6px 6px; background: #64748B; box-shadow: inset -4px -4px 0 rgba(0,0,0,.2); animation: dmrock 2s linear infinite; }
@keyframes dmrock { from { transform: translateX(0); } to { transform: translateX(-290px); } }
/* Flèches : elles sortent de la grille l'une après l'autre */
.dm-arrows { position: absolute; left: 50%; top: 4px; transform: translateX(-50%); display: grid; grid-template-columns: repeat(3, 42px); gap: 6px; }
.dm-arrows i { width: 42px; height: 42px; border-radius: 12px; background: #0EA5E9; color: #fff; display: grid; place-items: center; font-style: normal; font-weight: 900; font-size: 1.35rem; box-shadow: inset 0 -4px 0 rgba(0,0,0,.18); }
.dm-arrows .a1 { animation: dmup 4s infinite; } .dm-arrows .a8 { animation: dmright 4s infinite; } .dm-arrows .a6 { animation: dmdown 4s infinite; }
@keyframes dmup { 0%, 14% { transform: none; opacity: 1; } 34%, 92% { transform: translateY(-110px); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes dmright { 0%, 42% { transform: none; opacity: 1; } 62%, 92% { transform: translateX(120px); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes dmdown { 0%, 66% { transform: none; opacity: 1; } 84%, 92% { transform: translateY(110px); opacity: 0; } 100% { transform: none; opacity: 1; } }
/* Mots mêlés : le doigt glisse sur un mot caché */
.dm-words { position: absolute; left: 50%; top: 4px; transform: translateX(-50%); display: grid; grid-template-columns: repeat(4, 34px); gap: 4px; }
.dm-words i { height: 32px; display: grid; place-items: center; font-style: normal; font-weight: 900; color: var(--f-ink); background: var(--f-soft); border-radius: 8px; }
.dm-words i.w { animation: dmw 4s infinite; }
@keyframes dmw { 0%, 46% { background: var(--f-soft); color: var(--f-ink); } 50%, 84% { background: #10B981; color: #fff; } 92%, 100% { background: var(--f-soft); color: var(--f-ink); } }
.dm-hl { position: absolute; left: -3px; top: 33px; height: 38px; width: 0; border-radius: 12px; border: 3px solid #0EA5E9; z-index: 2; animation: dmhl 4s infinite; }
@keyframes dmhl { 0%, 12% { width: 0; opacity: 1; } 44%, 84% { width: 154px; opacity: 1; } 92%, 100% { width: 154px; opacity: 0; } }
.dm-mots .dm-pts { top: auto; bottom: 0; color: #10B981; }
/* Tour du monde : le drapeau, quatre pays, le bon s'allume */
.dm-flag { position: absolute; left: 50%; top: 2px; width: 96px; transform: translateX(-50%); border-radius: 8px; overflow: hidden; box-shadow: 0 6px 14px rgba(0,0,0,.18); }
.dm-flag svg { display: block; width: 100%; }
.dm-opts { position: absolute; left: 6px; right: 6px; bottom: 2px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.dm-opts i { font-style: normal; font-weight: 800; font-size: .8rem; padding: 7px 4px; border-radius: 10px; background: var(--f-soft); color: var(--f-ink); }
.dm-opts i.ok { animation: dmok 4s infinite; }
@keyframes dmok { 0%, 30% { background: var(--f-soft); color: var(--f-ink); transform: none; } 34% { transform: scale(.9); } 40%, 84% { background: #10B981; color: #fff; transform: scale(1.06); } 92%, 100% { background: var(--f-soft); color: var(--f-ink); transform: none; } }
/* Taxi-moto : la moto change de voie pour éviter la voiture et attrape la pièce */
.dm-road { position: absolute; left: 50%; top: 0; bottom: 0; width: 130px; transform: translateX(-50%); background: #334155; border-radius: 16px; overflow: hidden; }
.dm-road .ln { position: absolute; top: -40px; bottom: -40px; width: 4px; background: repeating-linear-gradient(#F8FAFC 0 18px, transparent 18px 36px); animation: dmlane .45s linear infinite; }
.dm-road .l1 { left: 42px; } .dm-road .l2 { left: 85px; }
@keyframes dmlane { to { transform: translateY(36px); } }
.dm-car { position: absolute; left: 49px; top: -52px; width: 32px; height: 48px; border-radius: 9px; background: #E11D48; box-shadow: inset 0 10px 0 rgba(255,255,255,.3); animation: dmcar 2s linear infinite; }
@keyframes dmcar { from { transform: translateY(0); } to { transform: translateY(220px); } }
.dm-moto { position: absolute; left: 46px; bottom: 8px; width: 38px; height: 38px; animation: dmmoto 2s ease-in-out infinite; }
.dm-moto svg { width: 100%; height: 100%; }
@keyframes dmmoto { 0%, 40% { transform: none; } 55%, 82% { transform: translateX(-43px); } 96%, 100% { transform: none; } }
.dm-coin { position: absolute; left: 13px; top: -20px; width: 16px; height: 16px; border-radius: 50%; background: #FACC15; box-shadow: inset -2px -2px 0 #CA8A04; animation: dmcoin 2s linear infinite; }
@keyframes dmcoin { 0% { transform: translateY(0); opacity: 1; } 72% { transform: translateY(132px); opacity: 1; } 78%, 100% { transform: translateY(132px) scale(1.8); opacity: 0; } }
/* Panier : le ballon décrit sa courbe et tombe dans le filet */
.dm-court { position: absolute; inset: 0; border-radius: 20px; overflow: hidden; background: linear-gradient(#FDE68A, #FED7AA); }
.dm-hoop { position: absolute; right: 26px; top: 34px; width: 56px; height: 8px; border-radius: 4px; background: #EA580C; z-index: 2; }
.dm-hoop::before { content: ''; position: absolute; right: -8px; bottom: 4px; width: 6px; height: 46px; border-radius: 3px; background: #fff; box-shadow: 0 0 0 2px #CBD5E1; }
.dm-hoop i { position: absolute; left: 6px; right: 6px; top: 8px; height: 26px; border: 2px solid #fff; border-top: 0; border-radius: 0 0 14px 14px; transform-origin: top; animation: dmnet 2.4s infinite; }
@keyframes dmnet { 0%, 54% { transform: none; } 60% { transform: scaleY(1.3); } 68% { transform: scaleY(.9); } 76%, 100% { transform: none; } }
.dm-ball { position: absolute; left: 18px; bottom: 12px; width: 30px; height: 30px; animation: dmbx 2.4s infinite; z-index: 1; }
.dm-ball i { display: block; width: 30px; height: 30px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #FDBA74, #EA580C); box-shadow: inset 0 0 0 2px #9A3412; animation: dmby 2.4s infinite; }
@keyframes dmbx { 0%, 10% { transform: translateX(0); } 52%, 100% { transform: translateX(149px); } }
@keyframes dmby { 0%, 10% { transform: translateY(0); animation-timing-function: ease-out; } 34% { transform: translateY(-112px); animation-timing-function: ease-in; } 52% { transform: translateY(-80px); } 66% { transform: translateY(-40px); opacity: 1; } 76%, 100% { transform: translateY(-40px); opacity: 0; } }
.dm-basket .dm-pts { animation-duration: 2.4s; top: 6px; left: 40%; }

/* ------------------------------------------------------------------ Parcours : mini-parcours, éclair, questions lues, histoires */
.fcard.gate, .fcard.blitz { --c: #7C3AED; } .fcard.blitz { --c: #E11D48; } .fcard.listen { --c: #0EA5E9; } .fcard.story { --c: #0BB39B; }
.fcard.pcx.started .fc-in.center { height: calc(100% - 24px); max-height: none; margin: 12px 14px; padding: 16px; gap: 12px; }
.pc-steps { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.pc-steps span { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 56px; }
.pc-steps i { width: 46px; height: 46px; border-radius: 16px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 14%, var(--f-panel)); color: var(--c); }
.pc-steps i svg { width: 22px; height: 22px; }
.pc-steps small { font-size: .7rem; font-weight: 800; color: var(--f-ink2); }
.fcard.in .pc-steps span { animation: pcpop .45s cubic-bezier(.2,1.6,.4,1) both; animation-delay: calc(var(--k) * .12s + .25s); }
@keyframes pcpop { from { transform: scale(0) translateY(10px); opacity: 0; } }
.pc-watch { position: relative; width: 128px; height: 128px; display: grid; place-items: center; }
.pc-watch svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.pc-watch circle { fill: none; stroke: var(--f-soft); stroke-width: 10; }
.pc-watch circle.arc { stroke: #E11D48; stroke-linecap: round; stroke-dasharray: 327; animation: pcdrain 3s linear infinite; }
@keyframes pcdrain { from { stroke-dashoffset: 0; } to { stroke-dashoffset: 327; } }
.pc-watch b { font-size: 2.6rem; font-weight: 900; line-height: 1; color: var(--f-ink); }
.pc-watch small { position: absolute; bottom: 22px; font-size: .7rem; font-weight: 800; color: var(--f-ink2); }
.fcard.in .pc-watch b { animation: pcbeat 1s ease-in-out infinite; }
@keyframes pcbeat { 50% { transform: scale(1.1); } }
.pc-best { color: var(--f-ink2) !important; display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.pc-best svg { width: 16px; height: 16px; color: #F59E0B; }
.pc-voice { display: flex; align-items: center; justify-content: center; gap: 5px; height: 70px; }
.pc-voice i { width: 7px; height: 14px; border-radius: 6px; background: var(--c); animation: pcvoice 1s ease-in-out infinite alternate; }
.pc-voice i:nth-child(2n) { animation-delay: .2s; } .pc-voice i:nth-child(3n) { animation-delay: .4s; } .pc-voice i:nth-child(5n) { animation-delay: .1s; }
@keyframes pcvoice { to { height: 64px; } }
.pc-voice.on i { animation-duration: .45s; }
.pc-cover { position: relative; width: 100%; aspect-ratio: 16 / 10; border-radius: 22px; overflow: hidden; flex: none; }
.pc-cover .imgbox { position: absolute; inset: 0; }
.pc-cover-n { position: absolute; left: 10px; bottom: 10px; padding: 5px 11px; border-radius: 999px; background: #0F172A; color: #fff; font-weight: 800; font-size: .74rem; }
.fcard.in .pc-cover img { animation: pczoom 9s ease-out both; }
@keyframes pczoom { from { transform: scale(1.12); } }
.pc-head { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex: none; }
.pc-tag { align-self: center; display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-weight: 800; font-size: .8rem; flex: none;
  background: color-mix(in srgb, var(--c) 14%, var(--f-panel)); color: color-mix(in srgb, var(--c) 75%, var(--f-ink)); }
.pc-tag svg { width: 15px; height: 15px; }
.pc-body { width: 100%; flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: safe center; gap: 10px; overflow-y: auto; scrollbar-width: none; text-align: left; }
.pc-body .fc-q { text-align: center; }
.pc-foot { width: 100%; flex: none; }
.pc-foot:empty { display: none; }
.pc-game { flex: 1; width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; }
.pc-count { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; }
.pc-count b { font-size: 5.5rem; font-weight: 900; line-height: 1; color: var(--f-ink); animation: pccount .7s cubic-bezier(.2,1.6,.4,1) both; }
.pc-count b.go { font-size: 3.2rem; color: #10B981; }
.pc-count b.end { font-size: 2.3rem; color: #E11D48; animation: pcshake .5s ease both; }
@keyframes pccount { from { transform: scale(2.4); opacity: 0; } }
@keyframes pcshake { 20%, 60% { transform: translateX(-8px) rotate(-2deg); } 40%, 80% { transform: translateX(8px) rotate(2deg); } }
/* L'éclair */
.bz { width: 100%; height: 100%; display: flex; flex-direction: column; gap: 14px; }
.bz-top { display: flex; align-items: center; gap: 10px; flex: none; }
.bz-time { min-width: 52px; font-weight: 800; color: var(--f-ink2); }
.bz-time b { font-size: 1.7rem; font-weight: 900; color: var(--f-ink); font-variant-numeric: tabular-nums; }
.fcard.pressure .bz-time b { color: #E11D48; animation: pcbeat .5s ease-in-out infinite; }
.bz-bar { flex: 1; height: 12px; border-radius: 8px; background: var(--f-soft); overflow: hidden; }
.bz-bar i { display: block; height: 100%; background: linear-gradient(90deg, #E11D48, #F59E0B 40%, #10B981); transform-origin: left; transition: transform .1s linear; }
.bz-score { display: inline-flex; align-items: center; gap: 4px; padding: 6px 11px; border-radius: 999px; background: var(--f-ok-bg); color: var(--f-ok); font-weight: 900; }
.bz-score svg { width: 16px; height: 16px; }
.bz-score.bump { animation: fxpop .3s ease; }
.bz-q { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 18px; min-height: 0; }
.bz-q.in { animation: bzin .22s ease-out; }
@keyframes bzin { from { transform: translateX(34px); opacity: 0; } }
.bz-text { font-weight: 900; font-size: clamp(1.25rem, 5.6vw, 1.65rem); line-height: 1.25; color: var(--f-ink) !important; text-align: center; }
.bz-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bz-choices .choice { min-height: 64px; font-weight: 700; }
.fcard.pressure .fc-in.center { animation: pcpress .5s ease-in-out infinite alternate; }
@keyframes pcpress { to { box-shadow: 0 0 0 5px rgba(225,29,72,.55), var(--f-shadow); } }
/* Questions lues */
.pc-listen { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; }
.pc-listen-msg { font-weight: 900; font-size: 1.25rem; color: var(--f-ink) !important; text-align: center; }
.pc-ring { position: relative; width: 56px; height: 56px; align-self: center; display: grid; place-items: center; }
.pc-ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.pc-ring circle { fill: none; stroke: var(--f-soft); stroke-width: 4; }
.pc-ring circle.arc { stroke: var(--c); stroke-dasharray: 120; stroke-linecap: round; animation: pcring linear forwards; }
@keyframes pcring { to { stroke-dashoffset: 120; } }
.pc-ring b { font-weight: 900; font-size: 1.2rem; color: var(--f-ink); }
.pc-said { font-style: italic; text-align: center; margin-top: 4px !important; }
/* Histoire */
.st-story { width: 100%; height: 100%; display: flex; flex-direction: column; gap: 12px; cursor: pointer; }
.st-story .sv-bars { flex: none; }
.st-story .sv-bars i { background: var(--f-soft2); }
.st-story .sv-bars i.done { background: var(--c); }
.st-story .sv-bars i.on::after { background: var(--c); }
.st-img { flex: 1; min-height: 120px; width: 100%; border-radius: 20px; }
.st-img img { animation: pczoom 8s ease-out both; }
.st-text { flex: none; font-size: 1.1rem; font-weight: 700; color: var(--f-ink) !important; line-height: 1.42; text-align: left; animation: fcrise .4s ease both; }
.st-text b, .st-text strong { color: var(--c); }
.st-tip { text-align: center; }
/* Résultat */
.pc-end { flex: 1; width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; }
.pc-score { font-size: 3.6rem; font-weight: 900; line-height: 1; color: var(--f-ink); animation: pccount .6s cubic-bezier(.2,1.6,.4,1) both; }
.pc-score small { display: block; font-size: .9rem; font-weight: 800; color: var(--f-ink2); margin-top: 6px; }
.pc-score.up { color: var(--f-ok); }

/* Notion, jeu, annonces, profil */
.g-head { justify-content: space-between; }
.g-dots { display: flex; gap: 6px; justify-content: center; }
.g-dots i { width: 22px; height: 6px; border-radius: 6px; background: var(--f-soft2); }
.g-dots i.done { background: #F59E0B; } .g-dots i.on { background: var(--f-ink); }
.fcard.fact { --c: #F59E0B; }
.fcard .fact-in { text-align: left; align-items: stretch; }
.fcard .fact-in .fc-badge { align-self: flex-start; }
.fc-fact { color: var(--f-ink2); font-size: .96rem; line-height: 1.55; }
.fc-fact p { color: inherit; margin: 0 0 10px; }
.fc-fact b { color: var(--f-ink); }
.fcard.game { --c: #0EA5E9; }
.fg-art { width: 110px; height: 110px; display: grid; place-items: center; flex: none; }
.fg-art svg, .fg-art img { width: 100%; height: 100%; }
.fcard.promo .fg-art { width: 84px; height: 84px; }
.fg-best { color: var(--f-ink2) !important; }
.fcard.promo { --c: #E11D48; }
.fcard.promo.create { --c: #6C5CE7; } .fcard.promo.prize { --c: #F59E0B; } .fcard.promo.save { --c: #0BB39B; }
.fcard.hello, .fcard.profile, .fcard.profile-ok { --c: #0BB39B; }
.feed-game { z-index: 70; background: linear-gradient(160deg, #0EA5E9, #4F46E5); }
.feed-game .iv-steps { justify-content: space-between; }
.feed-game .iv-steps .icon-btn { color: #fff; }
.fg-end { display: flex; flex-direction: column; align-items: center; gap: 12px; width: 100%; max-width: 420px; margin: auto; }
.fg-end .btn.xl { background: #fff; color: #4F46E5; }
.fg-end .btn.secondary { background: #312E81; color: #fff; border-color: #4338CA; }
.pf { display: flex; flex-direction: column; align-items: center; gap: 14px; width: 100%; position: relative; }
.pf-back { position: absolute; left: 0; top: -4px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--f-soft); color: var(--f-ink); display: grid; place-items: center; }
.pf-back svg { width: 20px; height: 20px; }
.pf-big { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }
.pf-opt { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 10px; border-radius: 20px; border: 2px solid var(--f-soft); background: var(--f-soft); color: var(--f-ink); }
.pf-opt:active { transform: scale(.97); }
.pf-opt b { font-size: 1.02rem; } .pf-opt small { color: var(--f-ink2); font-size: .76rem; line-height: 1.25; }
.pf-ic { width: 50px; height: 50px; border-radius: 16px; display: grid; place-items: center; background: var(--f-ink); color: var(--f-panel); }
.pf-ic svg { width: 26px; height: 26px; }
.pf-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.pf-chip { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 2px solid var(--f-soft); background: var(--f-soft); color: var(--f-ink); font-weight: 700; }
.pf-chip:active { background: var(--f-ink); color: var(--f-panel); }
@media (prefers-reduced-motion: reduce) { .dm *, .btn.beat, .tap-hand, .fcard.in .duel-av, .fcard.in .duel-vs { animation: none !important; } }
/* ------------------------------------------------------------------ v6 : espace Créer, questionnaires, direct */
.field > span { font-weight: 700; font-size: .88rem; color: var(--ink-2); }
.cr-hero { text-align: center; padding: 20px 8px 4px; }
.cr-hero h1 { font-size: clamp(1.7rem, 7vw, 2.3rem); }
.cr-hero p { color: var(--muted); margin: 8px auto 16px; max-width: 460px; }
.cr-hero.small { padding-top: 6px; } .cr-hero.small p { margin-bottom: 0; }
.cr-doors { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.cr-door { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 16px 8px; border-radius: 20px; color: #fff; box-shadow: var(--shadow); }
.cr-door span { width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; background: rgba(255,255,255,.2); }
.cr-door span svg { width: 24px; height: 24px; }
.cr-door b { font-size: .98rem; } .cr-door small { font-size: .72rem; opacity: .88; line-height: 1.25; }
.cr-door.q { background: linear-gradient(150deg, #0BB39B, #0E7490); } .cr-door.l { background: linear-gradient(150deg, #E11D48, #7C3AED); } .cr-door.d { background: linear-gradient(150deg, #F59E0B, #EA580C); }
.cr-row { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); color: inherit; }
.cr-row + .cr-row { margin-top: 8px; }
.cr-row b { display: block; } .cr-row small { display: block; color: var(--muted); font-size: .8rem; }
.cr-row > a.grow { color: inherit; }
.cr-ic { --c: var(--brand); width: 42px; height: 42px; flex: none; border-radius: 13px; display: grid; place-items: center; color: #fff; background: var(--c); }
.cr-ic.live { --c: #E11D48; } .cr-ic.duel { --c: #F59E0B; }
.cr-acts { display: flex; gap: 2px; }
.cr-pro { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 16px; background: var(--violet-50); color: var(--ink); }
.cr-pro svg:first-child { color: var(--violet); } .cr-pro b { display: block; } .cr-pro small { color: var(--muted); }
.qe-brand { justify-content: space-between; }
.qe-colors { display: flex; gap: 8px; }
.qe-color { width: 32px; height: 32px; border-radius: 50%; border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--line); }
.qe-color.on { box-shadow: 0 0 0 3px var(--ink); }
.qe-logo img { width: 26px; height: 26px; object-fit: contain; border-radius: 6px; }
.qe-q { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); }
.qe-q + .qe-q { margin-top: 8px; }
.qe-q small { display: block; color: var(--muted); font-size: .8rem; margin-top: 2px; }
.qe-q > svg { width: 18px; color: var(--muted); flex: none; }
.qe-n { width: 30px; height: 30px; flex: none; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 15%, transparent); color: var(--c); font-weight: 900; }
.qe-add { margin-top: 10px; }
.qe-toggle { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); cursor: pointer; }
.qe-toggle small { display: block; color: var(--muted); font-size: .8rem; }
.qe-toggle input { display: none; }
.qe-toggle i { width: 46px; height: 28px; flex: none; border-radius: 99px; background: var(--line); position: relative; transition: background .2s; }
.qe-toggle i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform .2s; }
.qe-toggle input:checked + i { background: var(--brand); } .qe-toggle input:checked + i::after { transform: translateX(18px); }
.qe-foot { position: sticky; bottom: calc(var(--nav-h) + var(--safe-b) + 8px); z-index: 5; }
@media (min-width: 960px) { .qe-foot { bottom: 16px; } }
.qe-choice { display: flex; gap: 8px; align-items: center; }
.qe-letter { width: 44px; height: 44px; flex: none; border-radius: 12px; border: 2px solid var(--line); background: var(--surface); font-weight: 900; color: var(--ink-2); }
.qe-letter.on { background: var(--ok); border-color: var(--ok); color: #fff; }
.qe-pick { max-height: 50vh; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.qe-pq { display: flex; gap: 10px; align-items: flex-start; padding: 10px; border-radius: 12px; background: var(--surface-2); cursor: pointer; }
.qe-pq input { margin-top: 4px; width: 18px; height: 18px; flex: none; }
.qe-pq small { display: block; color: var(--ok); font-weight: 700; font-size: .8rem; }
.qe-link { padding: 12px; border-radius: 12px; background: var(--surface-2); word-break: break-all; font-weight: 700; }
.qr-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.qr-stats div { padding: 14px 8px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); text-align: center; }
.qr-stats b { display: block; font-size: 1.4rem; } .qr-stats small { color: var(--muted); font-size: .76rem; }
.qr-rank { width: 32px; height: 32px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); font-weight: 900; }
.qr-rank.top1 { background: #FDE047; } .qr-rank.top2 { background: #E2E8F0; } .qr-rank.top3 { background: #FDBA74; }
.qr-q + .qr-q { margin-top: 12px; }
.qr-q .ok { color: var(--ok); font-weight: 800; } .qr-q .mid { color: var(--amber); font-weight: 800; } .qr-q .bad { color: var(--bad); font-weight: 800; }
.qr-bar { height: 8px; border-radius: 8px; background: var(--surface-2); margin-top: 6px; overflow: hidden; }
.qr-bar span { display: block; height: 100%; background: var(--c, var(--brand)); border-radius: 8px; }
/* Participant */
.qt { --c: #0BB39B; min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 16px; background: linear-gradient(170deg, color-mix(in srgb, var(--c) 22%, var(--bg)), var(--bg) 60%); }
.qt-card { width: 100%; max-width: 560px; padding: 22px 18px; border-radius: 24px; background: var(--surface); box-shadow: var(--shadow-lg); }
.qt-brand { display: flex; align-items: center; gap: 10px; color: var(--c); font-weight: 900; }
.qt-brand img { height: 40px; max-width: 120px; object-fit: contain; }
.qt-intro { color: var(--ink-2); white-space: pre-line; }
.qt-facts { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.qt-facts li { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 99px; background: var(--surface-2); font-weight: 700; font-size: .85rem; }
.qt-facts svg { width: 16px; height: 16px; }
.qt-prog { height: 6px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.qt-prog span { display: block; height: 100%; background: var(--c); }
.qt-q { font-size: 1.25rem; line-height: 1.35; }
.qt-note { font-size: 4rem; color: var(--c); } .qt-note small { font-size: 1.4rem; color: var(--muted); }
.fold.ok summary svg { color: var(--ok); } .fold.bad summary svg { color: var(--bad); }
/* Direct : joueur */
.lv { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 18px; color: #fff; background: linear-gradient(160deg, #4F46E5, #E11D48); }
.lv.good { background: linear-gradient(160deg, #16A34A, #0BB39B); } .lv.bad { background: linear-gradient(160deg, #E11D48, #7F1D1D); } .lv.end { background: linear-gradient(160deg, #7C3AED, #F59E0B); }
.lv-card { width: 100%; max-width: 440px; text-align: center; }
.lv h1 { color: #fff; font-size: clamp(1.8rem, 8vw, 2.6rem); }
.lv p { color: rgba(255,255,255,.9); }
.lv .link-btn { color: #fff; }
.lv-pin { width: 100%; text-align: center; font-size: 2.6rem; font-weight: 900; letter-spacing: .18em; padding: 12px; border-radius: 18px; border: 0; color: #0B1120; }
.lv .input.lg { min-height: 56px; font-size: 1.1rem; text-align: center; }
.lv .btn.xl { background: #fff; color: #4F46E5; border: 0; min-height: 58px; }
.lv-me { display: inline-block; padding: 8px 16px; border-radius: 99px; background: rgba(255,255,255,.2); font-weight: 900; }
.lv-prize { padding: 12px; border-radius: 16px; background: rgba(255,255,255,.16); font-weight: 800; }
.lv.q { justify-content: flex-start; padding: 12px; background: #0B1120; }
.lv-top { display: flex; justify-content: space-between; align-items: center; width: 100%; max-width: 640px; font-weight: 800; }
.lv-top b { font-size: 1.6rem; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: #0B1120; }
.lv-q { width: 100%; max-width: 640px; font-size: 1.15rem; font-weight: 800; text-align: center; margin: 12px 0 !important; }
.lv-pad { flex: 1; width: 100%; max-width: 640px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lv-pad.n2 { grid-template-columns: 1fr; } .lv-pad.n3 .lv-btn:last-child, .lv-pad.n5 .lv-btn:last-child { grid-column: span 2; }
.lv-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 12px; border: 0; border-radius: 20px; background: var(--b); color: #fff; font-weight: 800; font-size: 1rem; min-height: 120px; box-shadow: 0 6px 0 color-mix(in srgb, var(--b) 60%, #000); }
.lv-btn:active { transform: translateY(4px); box-shadow: 0 2px 0 color-mix(in srgb, var(--b) 60%, #000); }
.lv-btn i { font-style: normal; font-size: 2rem; }
.lv-btn.dim { opacity: .3; } .lv-btn.on { outline: 4px solid #fff; }
.lv-pts { font-size: 2.2rem; font-weight: 900; color: #fff !important; }
.lv-rank { font-weight: 800; } .lv-rank.big { font-size: 3.4rem; font-weight: 900; color: #fff !important; } .lv-rank.big small { font-size: 1.1rem; }
.lv-podium { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.lv-podium li { display: flex; justify-content: space-between; padding: 10px 14px; border-radius: 14px; background: rgba(255,255,255,.16); font-weight: 800; }
.lv-podium li.p1 { background: #FDE047; color: #0B1120; }
/* Direct : écran projeté */
.lh { min-height: 100dvh; display: flex; flex-direction: column; padding: 14px 20px 20px; color: #fff; background: radial-gradient(90% 60% at 50% 0%, #4338CA, #0B1120 70%); }
.lh-top { display: flex; align-items: center; gap: 12px; }
.lh-top .icon-btn { color: #fff; }
.lh-title { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .8; }
.lh-pin { padding: 6px 14px; border-radius: 99px; background: #fff; color: #0B1120; font-weight: 700; } .lh-pin b { font-size: 1.15rem; letter-spacing: .08em; }
.lh-join { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 6px; }
.lh-join p { color: rgba(255,255,255,.8); font-size: 1.2rem; margin: 0; }
.lh-join h2 { color: #FDE047; font-size: clamp(1.6rem, 4vw, 2.6rem); margin: 0; }
.lh-bigpin { font-size: clamp(4rem, 14vw, 9rem); font-weight: 900; letter-spacing: .12em; line-height: 1; padding: 10px 28px; border-radius: 28px; background: #fff; color: #0B1120; margin-top: 8px; }
.lh-prize { text-align: center; font-weight: 800; font-size: 1.2rem; color: #FDE047; }
.lh-players { text-align: center; } .lh-players > b { font-size: 1.2rem; }
.lh-players div { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 8px; max-height: 26vh; overflow: hidden; }
.lh-players span { padding: 6px 14px; border-radius: 99px; background: rgba(255,255,255,.14); font-weight: 800; animation: fxpop .35s ease; }
.lh-foot { display: flex; justify-content: center; margin-top: 16px; }
.lh .btn.xl { background: #fff; color: #0B1120; min-height: 62px; padding: 0 34px; font-size: 1.2rem; border: 0; }
.lh-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; font-weight: 800; color: rgba(255,255,255,.85); }
.lh-count { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: #0B1120; font-size: 2rem; font-weight: 900; }
.lh-count.low { background: #EF4444; color: #fff; animation: cdpulse .9s ease-out infinite; }
.lh-img { max-height: 28vh; max-width: 100%; margin: 10px auto 0; border-radius: 16px; background: #fff; }
.lh-q { text-align: center; color: #fff; font-size: clamp(1.5rem, 3.6vw, 2.8rem); line-height: 1.2; margin: 16px auto; max-width: 1100px; }
.lh-choices { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; max-height: 46vh; }
.lh-choices.n2 { grid-template-columns: 1fr 1fr; }
.lh-c { position: relative; overflow: hidden; display: flex; align-items: center; gap: 14px; padding: 14px 20px; border-radius: 20px; background: var(--b); font-weight: 800; font-size: clamp(1.05rem, 2.2vw, 1.6rem); }
.lh-c i { font-style: normal; font-size: 1.8em; }
.lh-c span { flex: 1; position: relative; z-index: 1; }
.lh-c b { position: relative; z-index: 1; font-size: 1.4em; }
.lh-c em { position: absolute; left: 0; bottom: 0; height: 6px; background: rgba(255,255,255,.75); }
.lh-c.no { opacity: .35; } .lh-c.ok { outline: 5px solid #fff; animation: fxpop .4s ease; }
.lh-expl { text-align: center; max-width: 900px; margin: 12px auto 0; color: rgba(255,255,255,.85); font-size: 1.1rem; }
.lh-h { text-align: center; color: #fff; font-size: clamp(2rem, 5vw, 3.4rem); margin: 18px 0; }
.lh-rank { list-style: none; counter-reset: r; padding: 0; margin: 0 auto; width: 100%; max-width: 760px; display: flex; flex-direction: column; gap: 10px; }
.lh-rank li { counter-increment: r; display: flex; align-items: center; gap: 16px; padding: 14px 20px; border-radius: 18px; background: rgba(255,255,255,.12); font-size: 1.4rem; animation: msDrop .45s ease both; }
.lh-rank li::before { content: counter(r); width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: #0B1120; font-weight: 900; }
.lh-rank li b { flex: 1; } .lh-rank li:first-child { background: #FDE047; color: #0B1120; }
.lh-podium { flex: 1; display: flex; align-items: flex-end; justify-content: center; gap: 16px; }
.lh-podium .p { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; width: min(28vw, 240px); padding: 16px 10px; border-radius: 22px 22px 0 0; background: rgba(255,255,255,.14); animation: msDrop .7s cubic-bezier(.25,1.6,.45,1) both; }
.lh-podium .p b { font-size: clamp(1.1rem, 2.6vw, 2rem); text-align: center; } .lh-podium .p span { font-size: 3rem; font-weight: 900; }
.lh-podium .p1 { height: 52vh; background: linear-gradient(#FDE047, #F59E0B); color: #0B1120; } .lh-podium .p2 { height: 40vh; } .lh-podium .p3 { height: 32vh; }
.iv-pts { position: absolute; top: 10px; left: 10px; z-index: 5; padding: 6px 12px; border-radius: 14px; background: #FDE047; color: #0B1120; font-weight: 900; font-size: 1.15rem; box-shadow: 0 4px 12px rgba(0,0,0,.2); }
.iv-pts.bump { animation: fxpop .35s cubic-bezier(.2,1.8,.4,1); }

/* ------------------------------------------------------------------ v6.1 : formulaires en étapes */
body.stp-open { overflow: hidden; }
.stp { position: fixed; inset: 0; z-index: 120; display: flex; align-items: center; justify-content: center; background: rgba(2,6,23,.55); backdrop-filter: blur(6px); animation: stpfade .2s ease; }
.stp.leaving { animation: stpfade .2s ease reverse forwards; }
@keyframes stpfade { from { opacity: 0; } }
.stp-panel { position: relative; width: min(520px, 100%); height: min(680px, 100%); display: flex; flex-direction: column; background: var(--surface); color: var(--ink); border-radius: 28px; box-shadow: 0 30px 80px rgba(0,0,0,.35); overflow: hidden; animation: stpup .3s cubic-bezier(.2,1.2,.4,1); }
@keyframes stpup { from { transform: translateY(30px) scale(.97); opacity: 0; } }
@media (max-width: 560px) { .stp-panel { width: 100%; height: 100%; border-radius: 0; padding-top: var(--sa-t); padding-bottom: var(--sa-b); } }
.stp-head { display: flex; align-items: center; gap: 12px; padding: 14px 14px 10px; }
.stp-head small { display: block; font-weight: 800; font-size: .8rem; color: var(--muted); margin-bottom: 6px; }
.stp-icon { width: 42px; height: 42px; flex: none; border-radius: 50%; border: 0; background: var(--surface-2); color: var(--ink); display: grid; place-items: center; }
.stp-icon.ghost { background: none; }
.stp-icon svg { width: 20px; height: 20px; }
.stp-bar { display: flex; gap: 5px; }
.stp-bar i { flex: 1; height: 6px; border-radius: 6px; background: var(--line); transition: background .3s; }
.stp-bar i.done { background: color-mix(in srgb, var(--brand) 55%, var(--line)); }
.stp-bar i.on { background: var(--brand); }
.stp-body { flex: 1; overflow-y: auto; padding: 10px 22px 18px; display: flex; flex-direction: column; gap: 16px; }
.stp-body.fwd { animation: stpfwd .28s ease; } .stp-body.bwd { animation: stpbwd .28s ease; }
.stp-body.shake { animation: shake .3s ease; }
@keyframes stpfwd { from { opacity: 0; transform: translateX(28px); } }
@keyframes stpbwd { from { opacity: 0; transform: translateX(-28px); } }
.stp-count { font-size: .78rem; font-weight: 800; color: var(--brand); text-transform: uppercase; letter-spacing: .05em; margin: 6px 0 -8px; }
.stp-body h2 { font-size: clamp(1.4rem, 5.6vw, 1.8rem); line-height: 1.15; }
.stp-hint { color: var(--muted); margin-top: -8px; }
.stp-f { display: flex; flex-direction: column; gap: 8px; }
.stp-label { font-weight: 800; font-size: .92rem; }
.stp-label small { font-weight: 600; color: var(--muted); }
.stp-fhint { font-size: .8rem; color: var(--muted); }
.stp-body .input { min-height: 54px; font-size: 1.05rem; border-radius: 16px; }
.stp-body textarea.input { min-height: 110px; }
.stp-cards { display: grid; gap: 10px; }
.stp-cards.two { grid-template-columns: 1fr 1fr; }
.stp-card { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px; border-radius: 18px; border: 2px solid var(--line); background: var(--surface); color: var(--ink); text-align: left; transition: .15s; }
.stp-card b { font-size: 1rem; } .stp-card small { color: var(--muted); font-size: .8rem; }
.stp-card.on { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 9%, var(--surface)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.stp-cic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--brand); }
.stp-cic svg { width: 22px; height: 22px; }
.stp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.stp-chip { min-height: 46px; padding: 0 18px; border-radius: 999px; border: 2px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 700; }
.stp-chip.on { border-color: var(--brand); background: var(--brand); color: #fff; }
.stp-colors { display: flex; flex-wrap: wrap; gap: 12px; }
.stp-color { width: 48px; height: 48px; border-radius: 50%; border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--line); color: #fff; display: grid; place-items: center; }
.stp-color svg { width: 22px; height: 22px; opacity: 0; }
.stp-color.on { box-shadow: 0 0 0 3px var(--ink); } .stp-color.on svg { opacity: 1; }
.stp-drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 150px; padding: 16px; border-radius: 20px; border: 2px dashed var(--line); background: var(--surface-2); text-align: center; cursor: pointer; }
.stp-drop small { color: var(--muted); font-size: .8rem; }
.stp-drop.has { padding: 8px; border-style: solid; }
.stp-drop img { max-width: 100%; max-height: 220px; border-radius: 14px; object-fit: contain; background: #fff; }
.stp-toggle { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 18px; border: 2px solid var(--line); cursor: pointer; }
.stp-toggle small { display: block; color: var(--muted); font-size: .82rem; margin-top: 2px; }
.stp-toggle input { display: none; }
.stp-toggle i { width: 50px; height: 30px; flex: none; border-radius: 99px; background: var(--line); position: relative; transition: background .2s; }
.stp-toggle i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.stp-toggle input:checked + i { background: var(--brand); } .stp-toggle input:checked + i::after { transform: translateX(20px); }
.stp-foot { display: flex; gap: 10px; padding: 12px 16px 16px; border-top: 1px solid var(--line); background: var(--surface); }
.stp-foot .btn { min-height: 54px; }
/* Inscription en deux étapes */
.reg-steps { display: flex; align-items: center; gap: 6px; }
.reg-steps i { width: 34px; height: 6px; border-radius: 6px; background: var(--line); }
.reg-steps i.on { background: var(--brand); }
.reg-steps small { margin-left: 6px; color: var(--muted); font-weight: 700; font-size: .78rem; }
/* Éditeur de questionnaire : résumé et questions */
.qe-sum { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 18%, transparent); }
.qe-sum b { display: block; font-size: 1.05rem; } .qe-sum small { color: var(--muted); }
.qe-sum-logo { width: 56px; height: 56px; flex: none; border-radius: 16px; display: grid; place-items: center; background: var(--c); color: #fff; overflow: hidden; }
.qe-sum-logo img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.qe-sum-logo svg { width: 26px; height: 26px; }
.qe-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.qe-chips .chip svg { width: 13px; height: 13px; }
.qe-q-main { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; text-align: left; border: 0; background: none; color: inherit; padding: 0; }
.qe-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 22px; border-radius: 20px; border: 2px dashed var(--line); text-align: center; color: var(--muted); }
.qe-empty svg { width: 30px; height: 30px; color: var(--brand); }
.cr-ic img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }

/* ------------------------------------------------------------------ v6.1 : nouveaux jeux */
.cap-game { height: 100%; display: flex; flex-direction: column; gap: 14px; padding: 12px; max-width: 520px; margin: 0 auto; color: #fff; }
.cap-hud { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-weight: 800; }
.cap-hearts { color: #F87171; letter-spacing: 2px; } .cap-hearts i { color: rgba(255,255,255,.25); font-style: normal; }
.cap-time { padding: 4px 12px; border-radius: 999px; background: rgba(255,255,255,.16); } .cap-time.low { background: #E11D48; animation: pulse 1s infinite; }
.cap-streak { padding: 4px 12px; border-radius: 999px; background: rgba(255,255,255,.12); opacity: .6; } .cap-streak.on { background: #F59E0B; color: #1C1006; opacity: 1; animation: fxpop .3s; }
.cap-card { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; }
.cap-card p { font-size: 1.15rem; font-weight: 800; }
.cap-flag { max-width: min(86%, 320px); max-height: 34vh; border-radius: 12px; box-shadow: 0 12px 30px rgba(0,0,0,.35); background: #fff; animation: fxpop .3s ease; }
.cap-flag.sm { max-height: 18vh; }
.cap-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cap-opt { min-height: 60px; padding: 8px 10px; border-radius: 16px; border: 2px solid rgba(255,255,255,.25); background: rgba(255,255,255,.12); color: #fff; font-weight: 800; font-size: 1rem; }
.cap-opt:active { transform: scale(.97); }
.cap-opt.ok { background: #16A34A; border-color: #4ADE80; } .cap-opt.bad { background: #DC2626; border-color: #F87171; animation: shake .3s; }
.taxi-game, .bk-game { position: relative; width: 100%; height: 100%; overflow: hidden; border-radius: 18px; }
.taxi-game canvas, .bk-game canvas { display: block; touch-action: none; }
.taxi-tip { position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%); padding: 8px 16px; border-radius: 999px; background: rgba(15,23,42,.7); color: #fff; font-weight: 800; font-size: .9rem; pointer-events: none; animation: fcbob 1.6s ease-in-out infinite; white-space: nowrap; }
/* Réponses en photos dans les packs : grille 2 × 2 ; vidéo et son de l'énoncé */
.choices.ci-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ci-grid .choice { flex-direction: column; align-items: stretch; padding: 6px; position: relative; }
.ci-grid .choice .letter { position: absolute; left: 10px; top: 10px; z-index: 1; }
.ci-grid .c-txt { display: flex; flex-direction: column; gap: 6px; }
.ci-grid .c-img { width: 100%; max-width: none; max-height: none; aspect-ratio: 1; object-fit: cover; }
.ci-grid .c-txt > span { font-size: .85rem; text-align: center; }
.q-media { display: flex; justify-content: center; margin: 0 0 14px; }
.q-media .qm-video video { max-width: 100%; max-height: 40vh; border-radius: 16px; background: #000; }
.q-media .qm-play { display: flex; align-items: center; gap: 12px; padding: 12px 18px 12px 12px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 800; }
.q-media .qm-ic { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff; }
.q-media .qm-wave i { background: var(--brand); }
.player .qm-credit { font-size: .66rem; color: var(--muted); text-align: center; margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.stp-open .route-pill, body.stp-open .route-bar { display: none !important; }
.qe-add .btn { font-size: .86rem; padding-left: 10px; padding-right: 10px; }

/* ------------------------------------------------------------------ v6.3 : Découverte, histoires racontées, défi éclair, tournoi, devinettes vocales */
.cr-doors { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 640px) { .cr-doors { grid-template-columns: repeat(4, 1fr); } }
.cr-door.v { background: linear-gradient(150deg, #DB2777, #9333EA); }
.st-ic.tourney { background: linear-gradient(150deg, #F59E0B, #B45309) !important; }
/* Histoire racontée : bouton de la voix, barres qui parlent */
.st-story { position: relative; }
.st-voice { position: absolute; top: 18px; right: 4px; z-index: 3; display: flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px; border-radius: 999px; border: 0;
  background: var(--f-ink); color: var(--f-panel); box-shadow: 0 6px 16px rgba(2,6,23,.3); }
.st-voice svg { width: 18px; height: 18px; }
.st-voice .pc-voice.mini { height: 18px; gap: 3px; display: none; }
.st-voice.on .pc-voice.mini { display: flex; }
.st-voice .pc-voice.mini i { width: 3px; height: 8px; background: var(--f-panel); animation-duration: .5s; }
.st-story.talking .st-img img { animation-duration: 14s; }
.st-story.talking .st-text { border-left: 4px solid var(--c); padding-left: 10px; }
/* Défi entre amis */
.pc-rival { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 16px; background: var(--f-soft); border: 2px solid var(--c, #F59E0B); text-align: left; animation: fcrise .5s ease both; }
.pc-rival .duel-av { width: 40px; height: 40px; font-size: 1rem; flex: none; animation: none; }
.pc-rival p { margin: 0; color: var(--f-ink) !important; font-size: .95rem; }
.pc-face { display: flex; align-items: center; justify-content: center; gap: 16px; width: 100%; animation: pccount .6s cubic-bezier(.2,1.6,.4,1) both; }
.pc-face span { flex: 1; max-width: 130px; padding: 14px 8px; border-radius: 20px; background: var(--f-soft); display: flex; flex-direction: column; align-items: center; }
.pc-face b { font-size: 2.6rem; font-weight: 900; line-height: 1; color: var(--f-ink); }
.pc-face small { margin-top: 6px; font-weight: 800; color: var(--f-ink2); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-face i { font-style: normal; font-weight: 900; color: var(--f-ink2); width: 44px; height: 44px; display: grid; place-items: center; }
.pc-face i svg { width: 36px; height: 36px; color: #F59E0B; }
.pc-face.win span:first-child { background: var(--f-ok-bg); box-shadow: 0 0 0 3px var(--f-ok) inset; }
.pc-face.win span:first-child b { color: var(--f-ok); }
.pc-face.lose span:last-child { background: var(--f-bad-bg); box-shadow: 0 0 0 3px var(--f-bad) inset; }
/* Tournoi du week-end */
.fcard.tourney { --c: #F59E0B; }
.tn-cup { width: 92px; height: 92px; animation: tncup 2.4s ease-in-out infinite; }
.tn-cup svg, .tn-cup img { width: 100%; height: 100%; }
@keyframes tncup { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-6px) rotate(3deg); } }
.tn-top { list-style: none; margin: 0; padding: 0; display: flex; align-items: flex-end; justify-content: center; gap: 8px; width: 100%; }
.tn-top li { flex: 1; max-width: 110px; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; border-radius: 16px 16px 6px 6px; background: var(--f-soft); }
.tn-top li.p1 { order: 2; padding-top: 18px; background: #FEF3C7; } .tn-top li.p2 { order: 1; } .tn-top li.p3 { order: 3; }
:root[data-theme="dark"] .tn-top li.p1 { background: #3A2A06; }
.tn-top b { font-size: .82rem; color: var(--f-ink); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tn-top em { font-style: normal; font-weight: 900; color: #B45309; }
.tn-av { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; overflow: hidden; background: #F59E0B; color: #fff; font-weight: 900; }
.tn-av img { width: 100%; height: 100%; object-fit: cover; }
.tn-top.small { flex-direction: column; align-items: stretch; gap: 6px; }
.tn-top.small li { max-width: none; flex-direction: row; padding: 8px 12px; border-radius: 12px; gap: 10px; order: 0 !important; }
.tn-top.small li b { width: 22px; color: #B45309; } .tn-top.small li span { flex: 1; text-align: left; color: var(--f-ink); font-weight: 700; }
.sv-card .tn-top.small li { background: #1F2937; } .sv-card .tn-top.small li span { color: #fff; }
.sv-card.c-tourney { background: linear-gradient(160deg, #B45309, #78350F); }
/* Mode Découverte */
.feedx.disc .feed, .feedx.disc .feed-bg { top: calc(58px + var(--sa-t)); bottom: var(--safe-b); }
.feedx.disc .feed-bg { top: 0; }
.disc-top { position: fixed; z-index: 5; top: 0; left: 0; right: 0; height: calc(58px + var(--sa-t)); padding: var(--sa-t) 10px 0;
  display: flex; align-items: center; justify-content: space-between; color: #fff; }
.disc-top b { display: flex; align-items: center; gap: 8px; font-size: 1.08rem; } .disc-top b svg { width: 20px; height: 20px; }
.disc-top .icon-btn { color: #fff; background: #0F172A; }
/* Devinettes vocales */
.vx { min-height: 100vh; min-height: 100dvh; padding: calc(18px + var(--sa-t)) 14px 24px; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 20% 10%, #9333EA 0, transparent 55%), radial-gradient(circle at 90% 90%, #DB2777 0, transparent 50%), var(--f-base); --c: #DB2777; }
.vx-card { width: 100%; max-width: 440px; background: var(--f-panel); color: var(--f-ink); border-radius: 28px; padding: 22px 18px; box-shadow: var(--f-shadow);
  display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; animation: fcrise .45s ease both; }
.vx-card h2 { color: var(--f-ink); margin: 0; } .vx-card p { color: var(--f-ink2); margin: 0; }
.vx-card .field { width: 100%; text-align: left; } .vx-card .field input { width: 100%; }
.vx-card .btn.block { width: 100%; }
.vx-steps { display: flex; gap: 6px; } .vx-steps i { width: 28px; height: 6px; border-radius: 6px; background: var(--f-soft2); } .vx-steps i.done { background: var(--c); } .vx-steps i.on { background: var(--f-ink); }
.vx-mic { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; background: var(--c); color: #fff; } .vx-mic svg { width: 40px; height: 40px; }
.vx-mic.ok { background: var(--f-ok); } .vx-mic.off { background: var(--f-soft2); color: var(--f-ink2); }
.vx-rec, .vx-play { position: relative; width: 132px; height: 132px; border-radius: 50%; border: 0; display: grid; place-items: center; background: var(--c); color: #fff; box-shadow: 0 14px 30px rgba(219,39,119,.4); }
.vx-rec > svg:not(:first-child), .vx-play > svg { width: 50px; height: 50px; }
.vx-rec > svg:first-child { position: absolute; inset: -8px; width: calc(100% + 16px); height: calc(100% + 16px); transform: rotate(-90deg); }
.vx-rec circle { fill: none; stroke: var(--f-soft2); stroke-width: 6; } .vx-rec circle.arc { stroke: #F59E0B; stroke-dasharray: 340; stroke-dashoffset: 340; }
.vx-rec.on { background: #DC2626; animation: vxpulse 1s ease-in-out infinite; } .vx-rec.on circle.arc { animation: vxarc var(--dur, 20s) linear forwards; }
.vx-rec.has { background: var(--f-ok); }
@keyframes vxarc { to { stroke-dashoffset: 0; } }
@keyframes vxpulse { 50% { box-shadow: 0 0 0 16px rgba(220,38,38,.18); } }
.vx-card > .pc-voice i { transform: scaleY(.15); animation: none; transition: transform .08s; }
.vx-play .pc-voice { position: absolute; bottom: 16px; height: 22px; gap: 3px; opacity: 0; } .vx-play .pc-voice i { width: 4px; background: #fff; }
.vx-play.on .pc-voice { opacity: 1; } .vx-play.on > svg { opacity: .35; }
.vx-time { font-weight: 800; color: var(--f-ink) !important; }
.vx-who { display: flex; align-items: center; gap: 10px; } .vx-who .duel-av { width: 46px; height: 46px; animation: none; } .vx-who p { color: var(--f-ink) !important; }
.vx-hint { padding: 8px 14px; border-radius: 12px; background: var(--f-soft); font-weight: 700; }
.vx-choices { width: 100%; transition: opacity .3s; } .vx-choices.wait { opacity: .45; }
.vx-after { width: 100%; display: flex; flex-direction: column; gap: 10px; }
.vx-mine { width: 100%; text-align: left; display: flex; flex-direction: column; gap: 6px; }
.vx-row { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 14px; background: var(--f-soft); }
.vx-row span { flex: 1; font-weight: 700; display: flex; gap: 6px; align-items: center; } .vx-row span svg { width: 16px; height: 16px; }
.vx-row small { color: var(--f-ink2); font-size: .72rem; } .vx-row.off { opacity: .6; }
.ld-spin.sm { width: 16px; height: 16px; border-width: 2px; display: inline-block; vertical-align: -3px; }
/* ================================================================ v6.4 : application Android (html.is-app) */
/* Rien ne se sélectionne au doigt ni n'ouvre de menu d'appui long, sauf les champs de saisie */
html.is-app body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
html.is-app input, html.is-app textarea, html.is-app select, html.is-app [contenteditable] { -webkit-user-select: text; user-select: text; }
html.is-app img { -webkit-user-drag: none; }
.app-ver, .app-reserve { gap: 12px; align-items: center; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); }
.app-ver img { border-radius: 12px; flex: none; }
.app-reserve .ar-ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--brand-50); color: var(--brand-700); flex: none; }
.app-reserve .ar-ic svg { width: 20px; height: 20px; }

html.is-app { --sa-t: 0px; --sa-b: 0px; --sa-l: 0px; --sa-r: 0px; }

/* ================================================================ v6.5 : packs privés */
.pp-page { padding-bottom: 24px; }
.pp-back { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--muted); font-size: .9rem; }
.pp-back svg { width: 18px; height: 18px; }
.pp-hero { position: relative; overflow: hidden; padding: 22px 18px 20px; border-radius: 22px; color: #fff; background: linear-gradient(150deg, #4F46E5, #7C3AED 55%, #DB2777); box-shadow: 0 14px 34px rgba(79,70,229,.28); }
.pp-hero h1 { font-size: 1.45rem; margin: 64px 0 6px; line-height: 1.15; }
.pp-hero p { margin: 0; opacity: .95; font-size: .95rem; line-height: 1.5; }
.pp-hero .pp-quota { margin-top: 12px; display: inline-flex; gap: 6px; align-items: center; padding: 6px 10px; border-radius: 999px; background: #FFFFFF; color: #3730A3; font-weight: 700; font-size: .8rem; }
.pp-hero .pp-quota a { color: #B45309; }
.pp-hero .pp-quota svg { width: 15px; height: 15px; }
.pp-hero-art { position: absolute; left: 18px; top: 16px; width: 120px; height: 60px; }
.pp-hero-art > svg { position: absolute; left: 0; top: 2px; width: 46px; height: 46px; padding: 10px; border-radius: 14px; background: #FFFFFF; color: #6D28D9; box-shadow: 0 6px 16px rgba(0,0,0,.2); animation: ppFloat 3.2s ease-in-out infinite; }
.pp-hero-art i { position: absolute; width: 30px; height: 30px; border-radius: 10px; background: #FDE68A; box-shadow: 0 4px 10px rgba(0,0,0,.18); animation: ppFly 3.2s ease-in-out infinite; }
.pp-hero-art .s1 { left: 58px; top: 4px; background: #A7F3D0; animation-delay: .2s; }
.pp-hero-art .s2 { left: 90px; top: 22px; background: #FBCFE8; animation-delay: .6s; }
.pp-hero-art .s3 { left: 62px; top: 34px; width: 20px; height: 20px; animation-delay: 1s; }
@keyframes ppFloat { 50% { transform: translateY(-5px) rotate(-4deg); } }
@keyframes ppFly { 0%, 100% { transform: translate(0, 0) rotate(0); } 50% { transform: translate(6px, -6px) rotate(12deg); } }
.pp-cta { box-shadow: 0 10px 24px color-mix(in srgb, var(--brand) 35%, transparent); }
.pp-skel { display: grid; gap: 12px; }
.pp-skel b { display: block; height: 76px; border-radius: 18px; background: linear-gradient(90deg, var(--surface-2), var(--surface), var(--surface-2)); background-size: 200% 100%; animation: ppSk 1.2s linear infinite; }
.pp-skel.big b:first-child { height: 200px; }
@keyframes ppSk { to { background-position: -200% 0; } }
.pp-row { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); color: inherit; box-shadow: var(--shadow-sm); transition: transform .15s; }
.pp-row:active { transform: scale(.98); }
.pp-row b { display: block; font-size: .98rem; }
.pp-row small { color: var(--muted); font-size: .78rem; }
.pp-row-ic { width: 58px; height: 58px; flex: none; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--pc) 14%, var(--surface)); color: var(--pc); }
.pp-row-ic.requested svg, .pp-row-ic.in_progress svg { animation: ppSpin 2.4s linear infinite; }
.pp-row-ic.archived { color: var(--bad); }
.pp-lock { color: var(--muted); } .pp-lock svg { width: 16px; height: 16px; }
@keyframes ppSpin { to { transform: rotate(360deg); } }
.pp-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pp-steps li { display: grid; grid-template-columns: 38px 1fr; column-gap: 12px; align-items: center; padding: 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.pp-steps span { grid-row: span 2; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-weight: 900; color: #fff; background: linear-gradient(140deg, var(--brand), var(--violet)); }
.pp-steps small { color: var(--muted); }
/* Anneau de maîtrise */
.pp-ring { position: relative; flex: none; }
.pp-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.pp-ring circle { fill: none; }
.pp-ring .trk { stroke: color-mix(in srgb, var(--pc) 18%, transparent); }
.pp-ring .val { stroke: var(--pc); stroke-linecap: round; transition: stroke-dashoffset 1.1s cubic-bezier(.2,.8,.2,1); }
.pp-ring-in { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; line-height: 1; }
.pp-ring-in b { font-size: 1.9rem; font-weight: 900; }
.pp-ring-in small { font-size: .68rem; font-weight: 700; opacity: .8; margin-top: 3px; }
.pp-row .pp-ring-in b { font-size: .95rem; } .pp-row .pp-ring-in small { display: none; }
.pp-row .pp-ring-in b::after { content: "%"; font-size: .7em; }
/* En-tête d'un pack */
.pp-head { padding: 16px; border-radius: 22px; color: #fff; background: linear-gradient(150deg, var(--pc), color-mix(in srgb, var(--pc) 55%, #0B1120)); box-shadow: 0 14px 30px color-mix(in srgb, var(--pc) 35%, transparent); }
.pp-head .pp-ring .trk { stroke: rgba(255,255,255,.22); }
.pp-head h1 { font-size: 1.3rem; margin: 10px 0 12px; line-height: 1.2; }
.pp-head-top { display: flex; justify-content: space-between; align-items: center; }
.pp-badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; background: #FFFFFF; color: #0F172A; font-weight: 800; font-size: .72rem; }
.pp-badge svg { width: 13px; height: 13px; }
.pp-off { display: inline-flex; gap: 4px; align-items: center; font-size: .72rem; font-weight: 700; opacity: .9; } .pp-off svg { width: 14px; height: 14px; }
.pp-head-row { display: flex; align-items: center; gap: 16px; }
.pp-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; flex: 1; }
.pp-facts li { display: flex; align-items: baseline; gap: 6px; padding: 6px 10px; border-radius: 12px; background: rgba(0,0,0,.18); }
.pp-facts b { font-size: 1.15rem; } .pp-facts small { opacity: .9; font-size: .78rem; }
.pp-facts li.hot { background: #FFFFFF; color: #B45309; }
.pp-quota-bar { margin-top: 12px; position: relative; padding: 7px 12px; border-radius: 12px; background: rgba(0,0,0,.22); font-size: .8rem; font-weight: 700; overflow: hidden; }
.pp-quota-bar span { position: relative; z-index: 1; display: inline-flex; gap: 6px; align-items: center; } .pp-quota-bar svg { width: 14px; height: 14px; }
.pp-quota-bar i { position: absolute; inset: 0 auto 0 0; width: var(--w); background: rgba(255,255,255,.22); transition: width .6s; }
.pp-quota-bar.prem { background: #FDE68A; color: #6B4500; }
.pp-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pp-mode { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-align: left; font: inherit; cursor: pointer; transition: transform .15s, box-shadow .15s; }
.pp-mode:active { transform: scale(.97); }
.pp-mode > span { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--violet); margin-bottom: 4px; }
.pp-mode b { font-size: .95rem; } .pp-mode small { color: var(--muted); font-size: .76rem; line-height: 1.35; }
.pp-mode.lead { grid-column: span 2; flex-direction: row; align-items: center; gap: 12px; background: linear-gradient(120deg, var(--brand), #0E9F8A); color: #fff; border: 0; box-shadow: 0 10px 22px color-mix(in srgb, var(--brand) 35%, transparent); animation: ppBeat 2.6s ease-in-out infinite; }
.pp-mode.lead > span { background: #FFFFFF; color: var(--brand-700); margin: 0; width: 48px; height: 48px; }
.pp-mode.lead small { color: #E6FFFA; display: block; }
.pp-mode.lead b { font-size: 1.1rem; display: block; }
@keyframes ppBeat { 0%, 70%, 100% { transform: scale(1); } 80% { transform: scale(1.025); } 90% { transform: scale(.995); } }
.pp-chaps { display: grid; gap: 8px; }
.pp-chap { display: grid; grid-template-columns: 1fr 70px 40px; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.pp-chap b { display: block; font-size: .88rem; } .pp-chap small { color: var(--muted); font-size: .74rem; }
.pp-chap i { height: 8px; border-radius: 8px; background: var(--surface-2); position: relative; overflow: hidden; }
.pp-chap i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w); background: var(--pc); border-radius: inherit; }
.pp-chap em { font-style: normal; font-weight: 800; font-size: .8rem; text-align: right; }
.pp-actions { display: grid; gap: 8px; }
.pp-actions .cr-row { width: 100%; text-align: left; font: inherit; cursor: pointer; }
.pp-notion { border-radius: 16px; background: var(--surface); border: 1px solid var(--line); padding: 0 14px; border-left: 5px solid var(--pc); }
.pp-notion summary { padding: 14px 0; font-weight: 800; cursor: pointer; }
.pp-notion > div { padding: 0 0 14px; color: var(--ink-2); line-height: 1.6; }
/* Attente */
.pp-wait { display: grid; place-items: center; gap: 12px; padding: 60px 16px; text-align: center; }
.pp-wait-card { padding: 20px 18px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); text-align: center; }
.pp-wait-card h1 { font-size: 1.3rem; margin: 12px 0; }
.pp-wait-card .pp-badge { background: var(--pc); color: #fff; }
.pp-sent { display: inline-flex; gap: 6px; align-items: center; padding: 6px 12px; border-radius: 999px; background: var(--brand-50); color: var(--brand-700); font-weight: 800; margin: 0 0 8px; animation: ppPop .5s cubic-bezier(.25,1.6,.45,1); }
.pp-sent svg { width: 16px; height: 16px; }
@keyframes ppPop { from { transform: scale(.6); opacity: 0; } }
.pp-track { list-style: none; margin: 14px 0 6px; padding: 0; display: flex; justify-content: space-between; position: relative; }
.pp-track::before { content: ""; position: absolute; left: 16%; right: 16%; top: 17px; height: 3px; background: var(--surface-2); }
.pp-track li { position: relative; flex: 1; display: grid; justify-items: center; gap: 6px; font-size: .78rem; color: var(--muted); }
.pp-track i { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 900; background: var(--surface-2); color: var(--muted); border: 3px solid var(--surface); }
.pp-track i svg { width: 18px; height: 18px; }
.pp-track li.done i { background: var(--brand); color: #fff; }
.pp-track li.on i { background: var(--pc); color: #fff; animation: stpulse 1.6s ease-in-out infinite; }
.pp-track li.on b, .pp-track li.done b { color: var(--ink); }
.pp-brew { display: flex; justify-content: center; gap: 8px; margin: 18px 0 10px; }
.pp-brew span { width: 34px; height: 44px; border-radius: 8px; background: var(--surface-2); position: relative; overflow: hidden; }
.pp-brew span::after { content: "?"; position: absolute; inset: 0; display: grid; place-items: center; font-weight: 900; color: var(--pc); animation: ppQ 1.8s ease-in-out infinite; }
.pp-brew span:nth-child(2)::after { animation-delay: .25s; content: "✓"; } .pp-brew span:nth-child(3)::after { animation-delay: .5s; content: "A"; } .pp-brew span:nth-child(4)::after { animation-delay: .75s; }
@keyframes ppQ { 0%, 100% { transform: translateY(110%); } 35%, 65% { transform: translateY(0); } }
.pp-eta { color: var(--ink-2); line-height: 1.55; font-size: .92rem; }
.pp-reject { display: grid; gap: 10px; justify-items: center; color: var(--ink-2); } .pp-reject > svg { width: 34px; height: 34px; color: var(--bad); }
.pp-meanwhile { display: grid; gap: 8px; } .pp-meanwhile h2 { font-size: 1rem; margin: 0; }
.pp-limit { text-align: center; justify-items: center; display: grid; } .pp-limit h2 { margin: 8px 0 0; }
/* Assistant */
.pp-files { display: grid; gap: 12px; }
.pp-drop { display: grid; justify-items: center; gap: 4px; padding: 18px; border-radius: 18px; border: 2px dashed color-mix(in srgb, var(--violet) 45%, var(--line)); background: color-mix(in srgb, var(--violet) 6%, var(--surface)); cursor: pointer; text-align: center; }
.pp-drop svg { width: 30px; height: 30px; color: var(--violet); } .pp-drop small { color: var(--muted); }
.pp-flist { display: grid; gap: 8px; }
.pp-file { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 14px; background: var(--surface-2); animation: ppPop .3s ease; }
.pp-file b { display: block; font-size: .86rem; word-break: break-all; } .pp-file small { color: var(--muted); font-size: .74rem; }
.pp-fic { width: 34px; height: 34px; border-radius: 10px; background: var(--surface); display: grid; place-items: center; color: var(--violet); flex: none; }
.pp-recap { display: grid; gap: 8px; }
.pp-recap > div { display: grid; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.pp-recap small { color: var(--muted); font-size: .74rem; }
.pp-promise { display: flex; gap: 8px; align-items: flex-start; font-size: .82rem; color: var(--ink-2); margin: 4px 0 0; } .pp-promise svg { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--brand); }
.pp-send { display: grid; gap: 6px; } .pp-bar { height: 8px; border-radius: 8px; background: var(--surface-2); overflow: hidden; }
.pp-bar i { display: block; height: 100%; width: 3%; background: linear-gradient(90deg, var(--brand), var(--violet)); transition: width .3s; }
/* Carte d'appel (Créer, profil) */
.pp-promo { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px; border-radius: 20px; border: 0; text-align: left; font: inherit; color: #fff; cursor: pointer; background: linear-gradient(125deg, #4F46E5, #7C3AED 60%, #DB2777); box-shadow: 0 12px 26px rgba(124,58,237,.3); position: relative; overflow: hidden; }
.pp-promo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.28) 50%, transparent 70%); transform: translateX(-100%); animation: ppShine 3.6s ease-in-out infinite; }
@keyframes ppShine { 60%, 100% { transform: translateX(100%); } }
.pp-promo b { display: block; font-size: 1.05rem; } .pp-promo small { display: block; font-size: .8rem; opacity: .92; line-height: 1.4; }
.pp-promo-ic { position: relative; width: 50px; height: 50px; flex: none; border-radius: 15px; background: #FFFFFF; color: #6D28D9; display: grid; place-items: center; }
.pp-promo-ic svg { width: 26px; height: 26px; }
.pp-promo-ic i { position: absolute; width: 12px; height: 12px; border-radius: 4px; background: #FDE68A; right: -4px; top: -4px; animation: ppFly 2.4s ease-in-out infinite; }
.pp-promo-ic i + i { background: #A7F3D0; right: auto; left: -5px; top: auto; bottom: -3px; animation-delay: .8s; }
.pp-promo.big { padding: 18px 16px; }
/* Bandeau dans le fil */
.fcard.ppfeed { --c: #6C5CE7; }
.ppf-art { position: relative; width: 150px; height: 110px; margin: 0 auto 6px; }
.ppf-doc { position: absolute; left: 50%; top: 50%; translate: -50% -50%; width: 70px; height: 86px; border-radius: 14px; background: #FFFFFF; color: #6D28D9; display: grid; place-items: center; box-shadow: 0 12px 26px rgba(0,0,0,.25); animation: ppFloat 3s ease-in-out infinite; }
.ppf-doc svg { width: 36px; height: 36px; }
.ppf-art i { position: absolute; width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; font-style: normal; font-weight: 900; color: #0F172A; background: #FDE68A; animation: ppOrbit 3.2s ease-in-out infinite; }
.ppf-art i:nth-of-type(1) { left: 0; top: 10px; } .ppf-art i:nth-of-type(2) { right: 0; top: 0; background: #A7F3D0; animation-delay: .4s; }
.ppf-art i:nth-of-type(3) { left: 8px; bottom: 0; background: #FBCFE8; animation-delay: .8s; } .ppf-art i:nth-of-type(4) { right: 10px; bottom: 6px; background: #BFDBFE; animation-delay: 1.2s; }
@keyframes ppOrbit { 50% { transform: translate(0, -10px) rotate(10deg) scale(1.08); } }
/* Écran de jeu */
.ppx { min-height: 100dvh; display: flex; flex-direction: column; background: radial-gradient(130% 70% at 20% 0%, color-mix(in srgb, var(--pc, #6C5CE7) 65%, #0B1120), #0B1120 75%); color: #fff; padding: var(--sa-t) 0 var(--sa-b); }
.ppx-top { display: flex; align-items: center; gap: 10px; padding: 10px 12px; max-width: 680px; width: 100%; margin: 0 auto; }
.ppx-top .icon-btn { color: #fff; background: rgba(255,255,255,.14); }
.ppx-dots { flex: 1; display: flex; gap: 4px; }
.ppx-dots i { flex: 1; height: 6px; border-radius: 6px; background: rgba(255,255,255,.2); transition: background .3s; }
.ppx-dots i.on { background: #fff; } .ppx-dots i.ok { background: #34D399; } .ppx-dots i.ko { background: #FB7185; }
.ppx-pill { padding: 5px 10px; border-radius: 999px; background: #FFFFFF; color: #0F172A; font-weight: 800; font-size: .8rem; display: inline-flex; align-items: center; }
.ppx-pill svg { width: 16px; height: 16px; color: #B45309; }
.ppx-clock { max-width: 680px; width: calc(100% - 24px); margin: 0 auto; height: 5px; border-radius: 5px; background: rgba(255,255,255,.15); overflow: hidden; }
.ppx-clock i { display: block; height: 100%; width: var(--w, 100%); background: #FDE68A; transition: width 1s linear, background .3s; }
.ppx-clock i.late { background: #FB923C; } .ppx-clock i.over { background: #94A3B8; }
.ppx-main { flex: 1; overflow-y: auto; padding: 8px 12px 12px; }
.ppx-q { max-width: 680px; margin: 0 auto; padding: 18px 16px; border-radius: 22px; background: var(--surface); color: var(--ink); box-shadow: 0 18px 40px rgba(0,0,0,.3); animation: ppIn .35s cubic-bezier(.2,.9,.25,1); }
@keyframes ppIn { from { transform: translateY(18px) scale(.98); opacity: 0; } }
.ppx-q.is-ok { box-shadow: 0 0 0 3px #34D399, 0 18px 40px rgba(0,0,0,.3); } .ppx-q.is-ko { box-shadow: 0 0 0 3px #FB7185, 0 18px 40px rgba(0,0,0,.3); }
.ppx-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 10px; font-size: .74rem; font-weight: 800; }
.ppx-ch { padding: 4px 9px; border-radius: 999px; background: color-mix(in srgb, var(--pc) 14%, var(--surface)); color: color-mix(in srgb, var(--pc) 80%, var(--ink)); }
.ppx-lvl { color: var(--amber); letter-spacing: 1px; } .ppx-box, .ppx-new { margin-left: auto; display: inline-flex; gap: 4px; align-items: center; color: var(--muted); } .ppx-box svg { width: 13px; height: 13px; }
.ppx-new { color: var(--violet); }
.ppx-body { font-size: clamp(1.05rem, 4.4vw, 1.3rem); line-height: 1.4; margin: 0 0 16px; }
.ppx-blank { display: inline-block; min-width: 72px; padding: 0 8px; border-bottom: 3px solid var(--pc); color: var(--pc); font-weight: 900; transition: background .3s; }
.ppx-blank.ok { background: color-mix(in srgb, #34D399 20%, transparent); color: #047857; border-color: #10B981; animation: ppPop .4s; }
.ppx-blank.ko { background: color-mix(in srgb, #FB7185 18%, transparent); color: #BE123C; border-color: #F43F5E; animation: ppPop .4s; }
.ppx-img { max-width: 100%; max-height: 32vh; border-radius: 14px; margin: 0 auto 14px; display: block; }
.ppx-choices { display: grid; gap: 10px; }
.ppx-choices.vf { grid-template-columns: 1fr 1fr; }
.ppx-c { padding: 14px 14px; border-radius: 16px; border: 2px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-weight: 700; text-align: left; cursor: pointer; transition: transform .12s, border-color .2s, background .2s; }
.ppx-choices.vf .ppx-c { text-align: center; font-size: 1.05rem; }
.ppx-c:active { transform: scale(.98); }
.ppx-c.right { border-color: #10B981; background: color-mix(in srgb, #34D399 18%, var(--surface)); }
.ppx-c.wrong { border-color: #F43F5E; background: color-mix(in srgb, #FB7185 16%, var(--surface)); animation: fxshake .35s; }
.ppx-c:disabled { cursor: default; } .ppx-c:disabled:not(.right):not(.wrong) { opacity: .55; }
.ppx-order { display: grid; gap: 12px; }
.ppx-slots { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ppx-slots li { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 10px; border-radius: 14px; border: 2px dashed var(--line); background: var(--surface-2); }
.ppx-slots li i { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-style: normal; font-weight: 900; background: var(--surface); color: var(--muted); flex: none; }
.ppx-slots li.filled { border-style: solid; border-color: var(--pc); background: var(--surface); cursor: pointer; animation: ppPop .25s; }
.ppx-slots li.right { border-color: #10B981; } .ppx-slots li.wrong { border-color: #F43F5E; }
.ppx-pool { display: flex; flex-wrap: wrap; gap: 8px; }
.ppx-tile { padding: 10px 12px; border-radius: 12px; border: 0; background: var(--pc); color: #fff; font: inherit; font-weight: 700; cursor: pointer; box-shadow: 0 4px 0 color-mix(in srgb, var(--pc) 60%, #000); transition: transform .12s, opacity .2s; }
.ppx-tile:active { transform: translateY(3px); box-shadow: 0 1px 0 color-mix(in srgb, var(--pc) 60%, #000); }
.ppx-tile.used { opacity: .25; transform: scale(.92); }
.ppx-after { margin-top: 14px; display: grid; gap: 8px; animation: ppIn .3s ease; }
.ppx-verdict { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 1.05rem; }
.ppx-verdict > svg { width: 24px; height: 24px; padding: 3px; border-radius: 50%; color: #fff; }
.ppx-verdict.ok > svg { background: #10B981; } .ppx-verdict.ko > svg { background: #F43F5E; }
.ppx-mastered { margin-left: auto; display: inline-flex; gap: 5px; align-items: center; padding: 5px 10px; border-radius: 999px; background: linear-gradient(120deg, #FDE68A, #F59E0B); color: #5B3A00; font-weight: 900; font-size: .8rem; animation: ppPop .5s cubic-bezier(.25,1.6,.45,1) .2s both; }
.ppx-mastered svg { width: 15px; height: 15px; }
.ppx-up { margin-left: auto; display: inline-flex; gap: 4px; align-items: center; color: var(--muted); font-size: .78rem; font-weight: 700; } .ppx-up svg { width: 14px; height: 14px; }
.ppx-right { margin: 0; color: var(--ink-2); }
.ppx-right-order { margin: 0; padding-left: 20px; color: var(--ink-2); }
.ppx-expl { margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); color: var(--ink-2); line-height: 1.5; font-size: .92rem; }
.ppx-src { margin: 0; display: flex; gap: 6px; align-items: center; font-size: .84rem; color: var(--violet); } .ppx-src svg { width: 15px; height: 15px; flex: none; }
.ppx-foot { padding: 10px 12px calc(12px + var(--sa-b)); max-width: 680px; width: 100%; margin: 0 auto; }
.ppx-foot .btn { box-shadow: 0 10px 22px rgba(0,0,0,.25); }
.ppx-end { max-width: 560px; margin: 0 auto; padding: 24px 16px 32px; display: grid; gap: 12px; justify-items: center; text-align: center; }
.ppx-end h1 { margin: 6px 0 0; font-size: 1.5rem; }
.ppx-score { display: flex; align-items: baseline; gap: 6px; } .ppx-score b { font-size: 3.4rem; font-weight: 900; line-height: 1; } .ppx-score span { opacity: .8; font-weight: 800; }
.pp-ring-wrap { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 20px; background: var(--surface); color: var(--ink); width: 100%; text-align: left; }
.pp-ring-wrap p { margin: 0; } .pp-ring-wrap .up { color: var(--ok); font-size: 1.2rem; }
.ppx-bilan { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; text-align: left; }
.ppx-bilan > div { padding: 12px; border-radius: 16px; background: var(--surface); color: var(--ink); }
.ppx-bilan h3 { margin: 0 0 6px; font-size: .9rem; display: flex; gap: 6px; align-items: center; } .ppx-bilan h3 svg { width: 16px; height: 16px; }
.ppx-bilan p { margin: 4px 0; font-size: .84rem; } .ppx-bilan > p { grid-column: span 2; color: #CBD5E1 !important; }
.ppx-limit { width: 100%; display: grid; gap: 10px; padding: 14px; border-radius: 18px; background: var(--surface); color: var(--ink); } .ppx-limit > svg { width: 28px; height: 28px; color: var(--amber); margin: 0 auto; }
.ppx-end .btn.ghost { color: #fff; }
.ppx-end .pp-badge { background: rgba(255,255,255,.16); color: #fff; }
/* Admin */
.pp-adm { display: grid; gap: 14px; max-width: 900px; }
.pp-adm .mono, .mono { font-family: ui-monospace, Consolas, monospace; font-size: .8rem; }
.pp-log p { margin: 4px 0; font-size: .85rem; } .pp-log .ok { color: var(--ok); } .pp-log .bad { color: var(--bad); }
.pp-adm-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); font-weight: 900; font-size: .7rem; color: var(--violet); flex: none; }
.pp-adm-ic.vrm { background: #FDE68A; color: #6B4500; }
.chip.on { background: var(--brand); color: #fff; } .chip.bad { background: #FEE2E2; color: #B91C1C; }

/* ================================================================ v6.5 : rien ne déborde (fil, jeux) */
.fcard.tight .fc-in.center { padding: 16px 14px; gap: 9px; }
.fcard.tight .fc-main { padding: 12px; gap: 8px; }
.fcard.tight h2 { font-size: clamp(1.08rem, 4.6vw, 1.4rem); }
.fcard.tight .fc-fact, .fcard.tight p { font-size: .9rem; line-height: 1.45; }
.fcard.tight .choice { min-height: 44px; padding: 7px 10px; }
.fcard.tight .fc-hint { display: none; }
.fcard.tighter .fc-in.center { padding: 12px 12px; gap: 7px; }
.fcard.tighter .fc-top { min-height: 30px; }
.fcard.tighter .imgbox, .fcard.tighter .fc-main img, .fcard.tighter video { max-height: 26vh; }
.fcard.tighter .fc-acts .btn { padding-block: 8px; }
.fcard.tighter .fc-badge { font-size: .72rem; }
.clamped { overflow: hidden; -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
.read-more { align-self: center; display: inline-flex; gap: 6px; align-items: center; margin-top: -4px; padding: 8px 14px; border-radius: 999px; border: 0; background: var(--f-ink, var(--ink)); color: var(--f-panel, #fff); font: inherit; font-weight: 800; font-size: .84rem; cursor: pointer; animation: ppPop .35s ease; }
.read-more svg { width: 16px; height: 16px; }
.read-sheet .lesson-body { line-height: 1.6; color: var(--ink-2); }
/* Salle de jeux : deux jeux par ligne, cartes courtes ; tout se voit en un ou deux gestes */
@media (max-width: 640px) {
  .games-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .games-grid .game-tile { min-height: 0; padding: 12px; gap: 4px; border-radius: 18px; }
  .games-grid .game-tile .emoji { width: 46px; height: 46px; border-radius: 14px; font-size: 1.8rem; }
  .games-grid .game-tile b { font-size: .98rem; line-height: 1.15; }
  .games-grid .game-tile small { font-size: .74rem; line-height: 1.3; }
  .games-grid .game-tile .tile-share { width: 30px; height: 30px; top: 8px; right: 8px; }
  .games-grid .game-tile .tile-share svg { width: 15px; height: 15px; }
  .games-grid .game-tile .tile-new { font-size: .62rem; }
  .games-grid .game-tile .best { position: static; margin-top: 2px; padding: 2px 8px; font-size: .7rem; }
  .games-why { display: none; }
  .gm-head h1 { font-size: 1.5rem; }
  .gm-head p { font-size: .8rem; }
}

/* ================================================================ v6.5 : ligue de la semaine */
.lgx { display: grid; gap: 12px; }
.lg-crest { flex: none; display: block; }
.lg-head { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 22px; color: #fff; background: linear-gradient(140deg, var(--lc), color-mix(in srgb, var(--lc) 50%, #0B1120)); box-shadow: 0 12px 28px color-mix(in srgb, var(--lc) 35%, transparent); }
.lg-head small { opacity: .85; font-weight: 700; font-size: .78rem; }
.lg-head h2 { margin: 2px 0; font-size: 1.6rem; color: #fff; }
.lg-head p { margin: 0; font-size: .88rem; }
.lg-crest-wrap { filter: drop-shadow(0 6px 12px rgba(0,0,0,.3)); animation: ppFloat 3s ease-in-out infinite; }
.lg-ladder { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.lg-ladder li { display: grid; justify-items: center; gap: 2px; padding: 6px 2px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); opacity: .55; }
.lg-ladder li small { font-size: .62rem; font-weight: 800; color: var(--ink-2); }
.lg-ladder li.done { opacity: .85; }
.lg-ladder li.on { opacity: 1; border-color: var(--lc); box-shadow: 0 0 0 2px var(--lc); }
.lg-tip { display: flex; gap: 8px; align-items: flex-start; margin: 0; padding: 10px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); font-size: .86rem; font-weight: 600; }
.lg-tip svg { width: 18px; height: 18px; flex: none; color: var(--brand); }
.lg-list { display: grid; gap: 6px; }
.lg-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.lg-row b { display: block; font-size: .9rem; } .lg-row small { color: var(--muted); font-size: .72rem; }
.lg-row.up { border-left: 4px solid var(--ok); } .lg-row.down { border-left: 4px solid var(--bad); }
.lg-row.me { background: color-mix(in srgb, var(--brand) 12%, var(--surface)); border-color: var(--brand); box-shadow: 0 6px 16px color-mix(in srgb, var(--brand) 22%, transparent); }
.lg-rank { width: 26px; text-align: center; font-weight: 900; color: var(--ink-2); }
.lg-row.up .lg-rank { color: var(--ok); } .lg-row.down .lg-rank { color: var(--bad); }
.lg-xp { font-weight: 900; font-size: .88rem; white-space: nowrap; }
.lg-mix { color: var(--lc) !important; font-weight: 800; }
.lg-cut { display: flex; align-items: center; gap: 6px; justify-content: center; font-size: .72rem; font-weight: 900; text-transform: uppercase; letter-spacing: .04em; padding: 2px 0; }
.lg-cut svg { width: 14px; height: 14px; }
.lg-cut.up { color: var(--ok); } .lg-cut.up svg { transform: rotate(-90deg); }
.lg-cut.down { color: var(--bad); } .lg-cut.down svg { transform: rotate(90deg); }
.lg-result { text-align: center; justify-items: center; display: grid; }
.lg-result-crest { filter: drop-shadow(0 10px 22px color-mix(in srgb, var(--lc) 55%, transparent)); animation: fxinflate .8s cubic-bezier(.25,1.6,.45,1) both; }
.lg-result h2 { margin: 6px 0 0; }
.lg-ping { position: fixed; z-index: 95; left: 50%; top: calc(var(--hdr-h) + var(--sa-t) + 74px); translate: -50% 0; display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: 999px; background: #FFFFFF; color: #065F46; font-weight: 700; box-shadow: 0 12px 28px rgba(0,0,0,.25); animation: ppPop .45s cubic-bezier(.25,1.6,.45,1); transition: opacity .4s, transform .4s; }
.lg-ping svg { width: 16px; height: 16px; transform: rotate(-90deg); color: var(--ok); }
.lg-ping.out { opacity: 0; transform: translateY(-12px); }
.st-ic.league { background: var(--lc, #64748B) !important; position: relative; }
.st-ic.league em { position: absolute; right: -2px; bottom: -2px; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 999px; background: #FFFFFF; color: #0F172A; font-style: normal; font-weight: 900; font-size: .72rem; display: grid; place-items: center; box-shadow: 0 2px 6px rgba(0,0,0,.25); }
.sv-card.c-league .sv-big { background: var(--lc); }

/* ================================================================ v6.5 : Taxi-moto 3D */
.t3d { background: #F7B267; }
.t3d canvas { position: absolute; inset: 0; }
.t3-load { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px; color: #fff; font-weight: 800; background: linear-gradient(#3B4A8C, #E87B5A 60%, #F7B267); }
.t3-hud { position: absolute; left: 10px; right: 10px; top: 10px; z-index: 2; display: flex; gap: 6px; align-items: center; pointer-events: none; }
.t3-pill { padding: 6px 11px; border-radius: 999px; background: #0F172A; color: #fff; font-weight: 800; font-size: .8rem; box-shadow: 0 4px 12px rgba(0,0,0,.25); }
.t3-pill.gold { background: #FDE68A; color: #5B3A00; }
.t3-lives { margin-left: auto; font-size: 1.05rem; text-shadow: 0 2px 4px rgba(0,0,0,.35); }
.t3-ride { position: absolute; z-index: 2; left: 50%; top: 52px; translate: -50% 0; min-width: 220px; padding: 8px 14px 10px; border-radius: 16px; background: #FFFFFF; color: #0F172A; display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; box-shadow: 0 10px 24px rgba(0,0,0,.28); animation: ppPop .4s cubic-bezier(.25,1.6,.45,1); }
.t3-ride b { font-size: .86rem; } .t3-ride span { font-weight: 900; color: #7C3AED; font-size: .86rem; }
.t3-ride i { grid-column: span 2; height: 6px; border-radius: 6px; background: linear-gradient(90deg, #22D3EE, #7C3AED); transition: width .3s; }
.t3-pop { position: absolute; z-index: 3; left: 50%; top: 42%; translate: -50% -50%; padding: 10px 16px; border-radius: 16px; background: #FFFFFF; color: #0F172A; font-weight: 900; text-align: center; max-width: 86%; opacity: 0; transform: scale(.7); transition: opacity .2s, transform .3s cubic-bezier(.25,1.6,.45,1); pointer-events: none; }
.t3-pop.show { opacity: 1; transform: scale(1); }
.t3-pop.ok { background: #DCFCE7; color: #065F46; } .t3-pop.bad { background: #FEE2E2; color: #991B1B; } .t3-pop.gold { background: #FDE68A; color: #5B3A00; }
.t3-ride[hidden] { display: none; }
.t3-lives { color: #EF4444; letter-spacing: 2px; }
.t3d .taxi-tip { left: 12px; right: 12px; transform: none; text-align: center; z-index: 2; }
.b3d { background: #141B33; }
.b3d canvas { position: absolute; inset: 0; }
.b3d .taxi-tip { left: 12px; right: 12px; transform: none; text-align: center; z-index: 2; }
.t3-fire { margin-left: auto; padding: 6px 11px; border-radius: 999px; background: linear-gradient(120deg, #F97316, #DC2626); color: #fff; font-weight: 900; font-size: .8rem; animation: ppBeat 1s infinite; }
.t3-fire[hidden] { display: none; }

/* ------------------------------------------------------------------ v6.6 : application Android, admin JSON */
.apk-strip { position: fixed; left: 0; right: 0; z-index: 40; display: flex; align-items: center; gap: 8px; padding: 0 6px 0 12px; height: 32px; background: #0F766E; color: #fff; font-size: .8rem; text-decoration: none; transition: opacity .3s, transform .3s; }
.apk-strip.top { top: calc(var(--hdr-h) + var(--sa-t, 0px)); background: linear-gradient(90deg, #0BB39B, #0E7490); }
.apk-strip.bottom { bottom: calc(var(--nav-h) + var(--safe-b)); height: 30px; background: #1E1B4B; color: #E0E7FF; }
.apk-strip .grow { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.apk-strip svg { width: 16px; height: 16px; flex: none; }
.apk-go { flex: none; padding: 3px 10px; border-radius: 999px; background: #fff; color: #0F766E; font-weight: 900; font-size: .75rem; animation: ppBeat 1.6s infinite; }
.apk-x { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: 50%; background: transparent; color: inherit; }
.apk-strip.out { opacity: 0; transform: translateY(-8px); }
.has-apk-strip .main { padding-top: 32px; padding-bottom: calc(var(--nav-h) + var(--safe-b) + 46px); }
.has-apk-strip .feed, .has-apk-strip .feed-bg, .has-apk-strip .stories { top: calc(var(--hdr-h) + var(--sa-t, 0px) + 32px); }
.has-apk-strip .feed, .has-apk-strip .feed-bg { bottom: calc(var(--nav-h) + var(--safe-b) + 30px); }
body:has(.mode-game, .feed-game, .pp-playing, .player) .apk-strip { display: none; }
.apk-pop { position: fixed; inset: 0; z-index: 96; display: grid; place-items: end center; padding: 16px; background: rgba(15,23,42,.55); animation: fade .25s ease; }
.apk-pop.out { animation: fadeout .28s ease forwards; }
.apk-card { width: 100%; max-width: 440px; padding: 20px; border-radius: 26px; background: #FFFFFF; color: #0F172A; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 30px 60px rgba(0,0,0,.35); animation: sceneIn .45s cubic-bezier(.3,1.5,.5,1); --ink: #0F172A; --surface: #fff; }
.apk-head { display: flex; align-items: center; gap: 12px; }
.apk-head small { font-weight: 800; color: #0BB39B; text-transform: uppercase; letter-spacing: .06em; font-size: .72rem; }
.apk-head h2 { margin: 2px 0 0; font-size: 1.2rem; }
.apk-why { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.apk-why li { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 14px; background: #F1F5F9; font-weight: 600; font-size: .9rem; }
.apk-why svg { color: #0BB39B; flex: none; }
.gm-apk { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 16px; background: #ECFDF5; color: #065F46; font-size: .86rem; font-weight: 600; text-decoration: none; }
.gm-apk b { color: #047857; }
.pp-jstat { margin: 0; padding: 6px 10px; border-radius: 10px; background: var(--surface-2); color: var(--muted); }
.pp-jstat.ok { background: #DCFCE7; color: #065F46; } .pp-jstat.warn { background: #FEF3C7; color: #92400E; }

/* ------------------------------------------------------------------ v6.6 : Fruits, le verger à objectifs */
.fr-stage { position: relative; width: 100%; height: 100%; min-height: 420px; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 6px 6px 10px;
  background: radial-gradient(120% 60% at 50% 0%, #8FD3FF 0%, #5BB6F2 38%, #2E8B57 78%, #1F6B42 100%); border-radius: 18px; overflow: hidden; overflow: clip; touch-action: none; user-select: none; }
.fr-stage::before { content: ""; position: absolute; left: -10%; right: -10%; bottom: 0; height: 46%; background: radial-gradient(60% 70% at 20% 100%, #3FA45F 0 60%, transparent 61%), radial-gradient(55% 60% at 80% 100%, #2F8F50 0 60%, transparent 61%); pointer-events: none; }
.fr-top { position: relative; z-index: 3; width: 100%; max-width: 560px; display: flex; align-items: stretch; gap: 8px; }
.fr-goals { flex: 1; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px; padding: 6px 8px; border-radius: 18px; background: #FFF8EC; border: 3px solid #B8742F; box-shadow: 0 6px 0 #7A4A1E, 0 10px 18px rgba(0,0,0,.25); min-height: 58px; }
.fr-goal { position: relative; display: flex; flex-direction: column; align-items: center; min-width: 46px; padding: 2px 4px; border-radius: 12px; background: #FFFFFF; box-shadow: inset 0 -3px 0 #F1E2C8; }
.fr-gic { display: block; width: 36px; height: 36px; }
.fr-gic.boss svg { width: 36px; height: 36px; }
.fr-goal b { font-size: .95rem; font-weight: 900; color: #5B3410; line-height: 1.1; }
.fr-goal.done { background: #DCFCE7; } .fr-goal.done b { color: #15803D; }
.fr-goal.done::after { content: ""; position: absolute; inset: 0; border-radius: 12px; box-shadow: 0 0 0 3px #22C55E; animation: frDone .6s ease-out; }
.fr-mission { padding: 4px 10px; border-radius: 999px; background: #7C3AED; color: #fff; font-weight: 900; font-size: .78rem; }
.fr-moves { flex: none; width: 72px; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 18px; background: #FFF8EC; border: 3px solid #B8742F; box-shadow: 0 6px 0 #7A4A1E, 0 10px 18px rgba(0,0,0,.25); color: #5B3410; }
.fr-moves small { font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.fr-moves b { font-size: 1.9rem; font-weight: 900; line-height: 1; }
.fr-moves.low { background: #FEE2E2; border-color: #DC2626; color: #991B1B; animation: frLow 1s ease-in-out infinite; }
.fr-boss { position: relative; z-index: 2; display: flex; align-items: center; gap: 10px; padding: 4px 14px 4px 6px; border-radius: 18px; background: #FFFFFF; box-shadow: 0 8px 18px rgba(0,0,0,.25); }
.fr-boss[hidden] { display: none; }
.fr-boss-art svg { width: 64px; height: 58px; display: block; }
.fr-hp { position: relative; width: 150px; height: 18px; border-radius: 999px; background: #3F1D1D; overflow: hidden; }
.fr-hp i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #EF4444, #F97316); transition: width .35s; }
.fr-hp b { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: .75rem; font-weight: 900; }
.fr-board { position: relative; z-index: 2; flex: none; margin: auto 0; }
.fr-board > div { position: absolute; inset: 0; }
.fr-fr, .fr-t, .fr-p, .fr-vine { position: absolute; left: 0; top: 0; width: var(--step); height: var(--step); }
.fr-fr { background: #8B5524; border-radius: 10px; box-shadow: 0 0 0 calc(var(--step) * .12) #8B5524, 0 0 0 calc(var(--step) * .12 + 3px) #5E3512, 0 14px 26px calc(var(--step) * .12) rgba(0,0,0,.35); }
.fr-t { border-radius: 6px; }
.fr-t.a { background: linear-gradient(180deg, #E4EEFF, #D3E2FB); } .fr-t.b { background: linear-gradient(180deg, #CEDDF8, #BED0F2); }
.fr-ice { position: absolute; inset: 1px; border-radius: 7px; animation: frIce .4s ease-out; filter: saturate(2.4) contrast(1.15) brightness(.92); box-shadow: inset 0 0 0 2px rgba(255,255,255,.85), 0 0 0 1.5px #3BA6DE; }
.fr-p { transition: transform .22s cubic-bezier(.35,1.25,.55,1); will-change: transform; z-index: 1; }
.fr-p.fr-wall { z-index: 2; transition: none; }
.fr-sp { position: absolute; inset: 2%; display: block; filter: drop-shadow(0 3px 2px rgba(15,23,42,.28)); transition: transform .15s; }
.fr-sp.rot { transform: rotate(90deg); }
.fr-dot { position: absolute; inset: 12%; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff 0 8%, var(--tc) 40%, color-mix(in srgb, var(--tc) 60%, #000)); display: grid; place-items: center; color: #fff; font-weight: 900; }
.fr-p.sel .fr-sp { transform: scale(1.14); filter: drop-shadow(0 0 6px #fff) drop-shadow(0 4px 3px rgba(0,0,0,.3)); }
.fr-p.hint .fr-sp { animation: frHint .9s ease-in-out infinite; }
.fr-p.pop .fr-sp, .fr-p.gone .fr-sp, .fr-vine.gone .fr-sp { animation: frPop .22s ease-in forwards; }
.fr-p.nope .fr-sp { animation: frNope .3s; }
.fr-vine { z-index: 3; pointer-events: none; }
.fr-vine .fr-sp { inset: -4%; }
.fr-born .fr-sp, .fr-born.fr-sp { animation: frBorn .45s cubic-bezier(.3,1.8,.5,1); }
.fr-land .fr-sp { animation: frLand .22s ease-out; }
.fr-hop .fr-sp { animation: frHop .5s ease-out; }
.fr-drop .fr-sp { animation: frDrop .5s cubic-bezier(.3,1.5,.5,1); }
.fr-bump { animation: frBump .3s ease-out; }
.fr-hurt { animation: frHurt .35s ease-out; }
.fr-throw { animation: frThrow .6s ease-out; }
.fr-flee { animation: frFlee 1.2s ease-in forwards; }
.fr-fx { z-index: 6; pointer-events: none; overflow: visible; }
.fr-rocket { position: absolute; background-repeat: no-repeat; rotate: var(--rot); z-index: 6; }
.fr-fly { position: fixed; z-index: 120; width: 36px; height: 36px; pointer-events: none; font-size: 24px; display: grid; place-items: center; }
.fr-board.aiming { cursor: crosshair; } .fr-board.aiming .fr-t { box-shadow: inset 0 0 0 2px #F59E0B; }
.fr-aim { position: absolute; z-index: 7; left: 50%; bottom: 14px; translate: -50% 0; padding: 10px 16px; border-radius: 999px; background: #FFFFFF; color: #92400E; font-weight: 800; box-shadow: 0 10px 22px rgba(0,0,0,.3); animation: ppPop .35s cubic-bezier(.25,1.6,.45,1); white-space: nowrap; }
.fr-load { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: #FFF8EC; border-radius: 16px; color: #5B3410; font-weight: 700; z-index: 9; }
.fr-banner { position: absolute; z-index: 8; left: 50%; top: 42%; translate: -50% -50%; display: flex; flex-direction: column; align-items: center; padding: 14px 26px; border-radius: 22px; background: linear-gradient(180deg, #FFE082, #FFB300); border: 4px solid #fff; color: #5B2C00; box-shadow: 0 16px 34px rgba(0,0,0,.35); animation: frBanner 1.7s cubic-bezier(.3,1.5,.5,1) forwards; pointer-events: none; text-align: center; }
.fr-banner b { font-size: 1.45rem; font-weight: 900; } .fr-banner small { font-weight: 800; font-size: .85rem; }
.fr-intro { position: absolute; inset: 0; z-index: 10; display: grid; place-items: center; padding: 16px; background: rgba(10,25,45,.7); animation: fade .25s ease; }
.fr-intro.out { animation: fadeout .25s ease forwards; }
.fr-intro-card { width: 100%; max-width: 360px; padding: 20px; border-radius: 26px; background: #FFF8EC; border: 4px solid #B8742F; color: #3B2410; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; box-shadow: 0 30px 60px rgba(0,0,0,.4); animation: sceneIn .45s cubic-bezier(.3,1.5,.5,1); --ink: #3B2410; }
.fr-intro-card small { font-weight: 900; color: #B45309; text-transform: uppercase; letter-spacing: .08em; font-size: .75rem; }
.fr-intro-card h2 { margin: 0; font-size: 1.6rem; color: #7A3E00; }
.fr-intro-card p { margin: 0; font-weight: 600; color: #5B3410; }
.fr-intro-art { width: 132px; height: 132px; animation: frFloat 2.4s ease-in-out infinite; filter: drop-shadow(0 10px 10px rgba(0,0,0,.25)); }
.fr-intro-art.boss svg { width: 132px; height: 120px; }
.fr-boost { display: flex; gap: 8px; width: 100%; }
.fr-boost-b { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; border: 0; border-radius: 16px; background: #FFFFFF; color: #5B3410; box-shadow: inset 0 -4px 0 #EED9B8; font-weight: 800; }
.fr-boost-b span { width: 54px; height: 54px; display: block; }
@keyframes frPop { to { transform: scale(1.35); opacity: 0; } }
@keyframes frBorn { 0% { transform: scale(.3) rotate(-25deg); } 100% { transform: scale(1); } }
@keyframes frLand { 40% { transform: scaleY(.86) scaleX(1.08) translateY(4%); } }
@keyframes frHop { 30% { transform: translateY(-14%) scale(1.04); } 60% { transform: translateY(0) scaleY(.94); } }
@keyframes frDrop { 0% { transform: translateY(-160%) scale(.6); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes frHint { 50% { transform: scale(1.12) rotate(-6deg); } }
@keyframes frNope { 25% { transform: translateX(-8%); } 75% { transform: translateX(8%); } }
@keyframes frBump { 50% { transform: scale(1.18); } }
@keyframes frDone { 0% { box-shadow: 0 0 0 0 #22C55E; } 60% { box-shadow: 0 0 0 8px rgba(34,197,94,.25); } 100% { box-shadow: 0 0 0 3px #22C55E; } }
@keyframes frLow { 50% { transform: scale(1.06); } }
@keyframes frIce { from { transform: scale(.7); opacity: 0; } }
@keyframes frHurt { 30% { transform: translateX(-6px) rotate(-6deg); filter: brightness(1.6); } 60% { transform: translateX(6px) rotate(4deg); } }
@keyframes frThrow { 40% { transform: translateY(-10px) scale(1.15) rotate(8deg); } }
@keyframes frFlee { 30% { transform: translateY(-10px); } 100% { transform: translate(260px, -40px) rotate(30deg); opacity: 0; } }
@keyframes frBanner { 0% { transform: scale(.3); opacity: 0; } 15% { transform: scale(1.08); opacity: 1; } 25%, 80% { transform: scale(1); opacity: 1; } 100% { transform: scale(.9) translateY(-30px); opacity: 0; } }
@keyframes frFloat { 50% { transform: translateY(-8px) rotate(-3deg); } }
.iv-gamebox.bonbons .fr-stage { border-radius: 0; min-height: 0; }
.iv-gamebox.bonbons .fr-goals, .iv-gamebox.bonbons .fr-moves { box-shadow: 0 4px 0 #7A4A1E; }

/* ------------------------------------------------------------------ v6.6 : course d'Akili */
.rn-speed { position: absolute; z-index: 4; right: 10px; top: 10px; display: flex; align-items: baseline; gap: 4px; padding: 6px 12px; border-radius: 14px; background: #0F172A; color: #fff; box-shadow: 0 6px 14px rgba(0,0,0,.3); }
.rn-speed b { font-size: 1.35rem; font-weight: 900; font-variant-numeric: tabular-nums; min-width: 2.2ch; text-align: right; }
.rn-speed small { font-size: .7rem; font-weight: 800; color: #94A3B8; }
.rn-speed.fast { background: linear-gradient(120deg, #F97316, #DC2626); } .rn-speed.fast small { color: #FFE4D6; }
.rn-count { position: absolute; z-index: 5; left: 50%; top: 34%; translate: -50% -50%; font-size: 4.2rem; font-weight: 900; color: #fff; -webkit-text-stroke: 3px #1E3A8A; text-shadow: 0 8px 20px rgba(0,0,0,.35); pointer-events: none; white-space: nowrap; }
.rn-count[hidden] { display: none; }
.rn-warm { position: absolute; inset: 0; z-index: 6; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: #0F2A44; color: #E0F2FE; font-weight: 700; }
.iv-gamebox.runner .rn-speed { top: 54px; }
.bk-goal { position: absolute; z-index: 2; left: 50%; top: 52px; translate: -50% 0; padding: 6px 14px; border-radius: 999px; background: #FFFFFF; color: #1E3A8A; font-weight: 900; font-size: .85rem; box-shadow: 0 6px 14px rgba(0,0,0,.3); white-space: nowrap; }
.bk-goal:empty { display: none; }
.bl-goal { display: flex; flex-wrap: nowrap; justify-content: center; gap: 5px; margin-bottom: 8px; min-height: 28px; max-width: 100%; overflow: hidden; }
.bl-goal:empty { display: none; }
.bl-g { flex: 0 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 5px 10px; border-radius: 999px; background: #FFFFFF; color: #312E81; font-weight: 800; font-size: .8rem; line-height: 18px; box-shadow: 0 4px 10px rgba(0,0,0,.2); font-variant-numeric: tabular-nums; }
.bl-g b { display: inline-block; min-width: 2.6ch; text-align: center; }
@media (max-width: 400px) { .bl-g { font-size: .72rem; padding: 5px 8px; } .bl-goal { gap: 4px; } }
.bl-g.gem { background: #CFFAFE; color: #155E75; } .bl-g.m { background: #7C3AED; color: #fff; }
.bl-g.drop { background: #E2E8F0; color: #334155; } .bl-g.drop.soon { background: #FEE2E2; color: #991B1B; animation: frLow .8s infinite; }
.bl-cell.gem { background: radial-gradient(circle at 35% 30%, #F0FDFF 0 12%, #22D3EE 45%, #0E7490) !important; box-shadow: inset 0 0 0 2px #fff, 0 0 12px rgba(34,211,238,.7); }
.bl-cell.gem::after { content: "💎"; display: grid; place-items: center; width: 100%; height: 100%; font-size: calc(var(--cell) * .55); }
.bl-cell.drop { animation: blDrop .5s cubic-bezier(.3,1.6,.5,1); }
@keyframes blDrop { 0% { transform: translateY(-220%) scale(.6); opacity: 0; } 70% { transform: translateY(6%); opacity: 1; } 100% { transform: none; } }
.mm-myst { display: flex; align-items: center; gap: 10px; padding: 6px 8px 6px 14px; border-radius: 14px; background: #FFFFFF; color: #312E81; box-shadow: 0 6px 14px rgba(0,0,0,.25); }
.mm-myst small { font-size: .68rem; font-weight: 900; text-transform: uppercase; letter-spacing: .05em; color: #7C3AED; }
.mm-myst b { font-family: ui-monospace, monospace; font-size: 1.05rem; letter-spacing: .08em; color: #0F172A; }
.mm-myst button { border: 0; border-radius: 10px; padding: 6px 12px; background: #7C3AED; color: #fff; font-weight: 800; }
.mm-myst button:disabled { background: #CBD5E1; color: #475569; }
.mm-myst.ok { background: #DCFCE7; } .mm-myst.ok span { color: #15803D; font-weight: 900; }
.mm-words span.gold { background: #FDE68A; color: #78350F; }
.mm-stage { position: relative; }
.mm-guess { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; padding: 12px; background: rgba(15,23,42,.6); border-radius: 18px; }
.mm-guess-card { width: 100%; max-width: 340px; padding: 18px; border-radius: 22px; background: #FFFFFF; color: #0F172A; text-align: center; display: flex; flex-direction: column; gap: 10px; animation: sceneIn .4s cubic-bezier(.3,1.5,.5,1); }
.mm-guess-card small { font-weight: 900; color: #7C3AED; text-transform: uppercase; letter-spacing: .06em; font-size: .72rem; }
.mm-guess-card h3 { margin: 0; font-family: ui-monospace, monospace; letter-spacing: .12em; font-size: 1.4rem; }
.mm-guess-card p { margin: 0; font-size: .85rem; color: #475569; }
.mm-guess-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mm-guess-list button { padding: 12px 6px; border: 2px solid #E2E8F0; border-radius: 14px; background: #F8FAFC; color: #0F172A; font-weight: 800; }
.mm-guess-list button.ok { background: #DCFCE7; border-color: #22C55E; } .mm-guess-list button.ko { background: #FEE2E2; border-color: #EF4444; }
.mm-guess-x { border: 0; background: none; color: #475569; font-weight: 700; padding: 6px; }
.tx-pedals { position: absolute; z-index: 3; left: 0; right: 0; bottom: 12px; display: flex; justify-content: space-between; padding: 0 12px; pointer-events: none; }
.tx-pedals button { pointer-events: auto; width: 86px; height: 86px; border: 0; border-radius: 22px; color: #fff; font-weight: 900; font-size: 1rem; touch-action: none; user-select: none; box-shadow: 0 8px 0 rgba(0,0,0,.35), 0 12px 24px rgba(0,0,0,.3); transition: transform .08s, box-shadow .08s; }
.tx-brake { background: linear-gradient(180deg, #F87171, #B91C1C); }
.tx-gas { background: linear-gradient(180deg, #4ADE80, #15803D); width: 100px !important; height: 100px !important; }
.tx-pedals button.on { transform: translateY(6px); box-shadow: 0 2px 0 rgba(0,0,0,.35), 0 6px 14px rgba(0,0,0,.3); filter: brightness(1.15); }
.tx-tilt { position: absolute; z-index: 3; right: 10px; top: 52px; border: 0; border-radius: 999px; padding: 6px 12px; background: #FFFFFF; color: #0F172A; font-weight: 800; font-size: .78rem; box-shadow: 0 6px 14px rgba(0,0,0,.25); }
.tx-tilt[hidden] { display: none; }
.t3d .taxi-tip { bottom: 120px; }

/* ------------------------------------------------------------------ v6.6 : fil, série et maîtrises */
.fx-streak { position: fixed; z-index: 60; left: 50%; translate: -50% 0; top: calc(var(--sa-t, 0px) + (var(--hdr-h) - 34px) / 2); height: 34px; display: flex; align-items: center; gap: 4px; padding: 6px 12px 6px 9px; border-radius: 999px; background: #1E1B4B; color: #FDE68A; font-weight: 900; box-shadow: 0 8px 18px rgba(0,0,0,.35); pointer-events: none; }
.fx-streak b { font-size: 1.05rem; color: #fff; }
.fx-streak.zero { opacity: .75; } .fx-streak.zero span { filter: grayscale(1); }
.fx-streak.hot { background: linear-gradient(120deg, #F97316, #DC2626); color: #fff; }
.fx-streak.bump { animation: frBump .35s ease-out; }
.fx-streak.boom { animation: fxBoom .8s cubic-bezier(.3,1.7,.5,1); }
@keyframes fxBoom { 30% { transform: scale(1.6) rotate(-8deg); } 60% { transform: scale(.95); } }
.fc-mast { display: grid; grid-template-columns: auto 1fr; gap: 2px 8px; align-items: center; margin: 8px 0 4px; padding: 8px 10px; border-radius: 12px; background: #F1F5F9; color: #0F172A; }
.fc-mast-r { padding: 2px 8px; border-radius: 999px; background: var(--mc, #0BB39B); color: #fff; font-weight: 900; font-size: .75rem; }
.fc-mast-t { font-weight: 700; font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #334155; }
.fc-mast-bar { grid-column: span 2; display: block; height: 8px; border-radius: 8px; background: #E2E8F0; overflow: hidden; }
.fc-mast-bar i { display: block; height: 100%; border-radius: 8px; background: var(--mc, #0BB39B); animation: mastGrow .8s cubic-bezier(.3,1.2,.5,1); }
.fc-mast small { grid-column: span 2; font-size: .72rem; color: #475569; font-weight: 600; }
.fc-mast.up { box-shadow: 0 0 0 2px var(--mc, #0BB39B); animation: frBump .5s ease-out; }
@keyframes mastGrow { from { width: 0; } }
.fc-rankup { position: absolute; z-index: 20; left: 50%; top: 38%; translate: -50% -50%; display: flex; flex-direction: column; align-items: center; padding: 16px 28px; border-radius: 24px; background: linear-gradient(180deg, #FDE68A, #F59E0B); color: #4A2600; border: 4px solid #fff; box-shadow: 0 20px 40px rgba(0,0,0,.4); animation: frBanner 2.6s cubic-bezier(.3,1.5,.5,1) forwards; pointer-events: none; text-align: center; }
.fc-rankup small { font-weight: 900; text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; }
.fc-rankup b { font-size: 1.8rem; font-weight: 900; } .fc-rankup span { font-weight: 700; font-size: .85rem; }
.fcard.fc-leave .fc-in { animation: fcLeave .6s ease-in forwards; }
@keyframes fcLeave { to { transform: translateY(-40px) scale(.94); opacity: .2; } }
.fcard.mastery .fc-in { background: #FFFFFF; color: #0F172A; }
.ms-list { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 420px; text-align: left; }
.ms-row { display: grid; gap: 4px; padding: 10px 12px; border-radius: 14px; background: #F8FAFC; border: 1px solid #E2E8F0; }
.ms-head { display: flex; justify-content: space-between; gap: 8px; } .ms-head b { font-size: .88rem; } .ms-head span { font-weight: 900; color: var(--mc); font-size: .8rem; }
.ms-row small { font-size: .74rem; color: #475569; }
@media (min-width: 960px) { .fx-streak { left: auto; right: 18px; translate: none; top: calc(var(--hdr-h) + 14px); } }
