/* Concept : une régie vidéo. Deux ambiances : plateau éclairé (clair) et régie de nuit (sombre).
   Le rouge « lecture » reste réservé à la progression et au bouton principal. */
:root {
  --page-a: #f1eef6; --page-b: #e4dfee; --scan: rgba(40,20,80,.025); --glow: rgba(255,51,65,.10);
  --top: #1f1a35; --top-muted: #5d5776; --top-track: rgba(31,26,53,.14); --top-btn: rgba(31,26,53,.07); --top-btn-h: rgba(31,26,53,.13); --step: rgba(31,26,53,.14); --step-done: rgba(31,26,53,.45);
  --play: #ff3341; --paper: #ffffff; --soft: #f5f3fb; --soft2: #ece9f6; --line: #e6e2f1; --line2: #f1eff7;
  --ink: #1f1a35; --muted: #6c6684; --faint: #a6a1ba;
  --btn: #1f1a35; --btn-h: #2f2850; --on-btn: #ffffff;
  --accent: #ff4d5e; --accent2: #ffb23f; --violet: #6a4cf0; --violet-soft: #efebff; --violet-line: #cfc5ff; --violet-track: #ece8fd;
  --green: #11915a; --green-soft: #e2f6ec; --up-ink: #006300; --red: #d8394a; --red-soft: #fde7ea; --crit: #d03b3b; --crit-track: #f7d7d7;
  --warn: #fab219; --warn-track: #fdeec9; --gold: #e3a312; --gold-soft: #fff5d9; --gold-line: #f1d37c; --gold-ink: #9a6a00; --cyan: #14a9bd;
  --grid: #ebe8f2; --axis-line: #c9c4d8; --axis: #8a8598; --deemph: #c3bed3; --deemph-h: #9c8ef5; --cur-h: #5538e0;
  --in: #2a78d6; --out: #e34948; --head-line: rgba(31,26,53,.06);
  --shadow: 0 22px 48px -28px rgba(40, 25, 90, .45);
  --font: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Bricolage Grotesque', 'Figtree', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --page-a: #241a35; --page-b: #120e1b; --scan: rgba(255,255,255,.022); --glow: rgba(255,51,65,.16);
  --top: #ffffff; --top-muted: rgba(255,255,255,.72); --top-track: rgba(255,255,255,.18); --top-btn: rgba(255,255,255,.12); --top-btn-h: rgba(255,255,255,.2); --step: rgba(255,255,255,.18); --step-done: rgba(255,255,255,.55);
  --paper: #1c1726; --soft: #251f31; --soft2: #2f283d; --line: #362e47; --line2: #2b2438;
  --ink: #efeaf7; --muted: #aaa3bd; --faint: #7d7693;
  --btn: #efeaf7; --btn-h: #ffffff; --on-btn: #1a1524;
  --violet: #8f78ff; --violet-soft: #2c2448; --violet-line: #4a3d80; --violet-track: #2f2850;
  --green: #3ccf8a; --green-soft: #173327; --up-ink: #3ccf8a; --red: #ff6b78; --red-soft: #3a1c24; --crit: #ff6b6b; --crit-track: #43222a;
  --warn-track: #43361a; --gold-soft: #3a2e12; --gold-line: #6b5420; --gold-ink: #f0c25a;
  --grid: #2e2740; --axis-line: #4a4160; --axis: #8d86a3; --deemph: #4a425c; --deemph-h: #6c5fae; --cur-h: #a796ff;
  --in: #3987e5; --out: #e66767; --head-line: rgba(255,255,255,.06);
  --shadow: 0 22px 48px -28px rgba(0, 0, 0, .8);
  color-scheme: dark;
} }
:root[data-theme="dark"] {
  --page-a: #241a35; --page-b: #120e1b; --scan: rgba(255,255,255,.022); --glow: rgba(255,51,65,.16);
  --top: #ffffff; --top-muted: rgba(255,255,255,.72); --top-track: rgba(255,255,255,.18); --top-btn: rgba(255,255,255,.12); --top-btn-h: rgba(255,255,255,.2); --step: rgba(255,255,255,.18); --step-done: rgba(255,255,255,.55);
  --paper: #1c1726; --soft: #251f31; --soft2: #2f283d; --line: #362e47; --line2: #2b2438;
  --ink: #efeaf7; --muted: #aaa3bd; --faint: #7d7693;
  --btn: #efeaf7; --btn-h: #ffffff; --on-btn: #1a1524;
  --violet: #8f78ff; --violet-soft: #2c2448; --violet-line: #4a3d80; --violet-track: #2f2850;
  --green: #3ccf8a; --green-soft: #173327; --up-ink: #3ccf8a; --red: #ff6b78; --red-soft: #3a1c24; --crit: #ff6b6b; --crit-track: #43222a;
  --warn-track: #43361a; --gold-soft: #3a2e12; --gold-line: #6b5420; --gold-ink: #f0c25a;
  --grid: #2e2740; --axis-line: #4a4160; --axis: #8d86a3; --deemph: #4a425c; --deemph-h: #6c5fae; --cur-h: #a796ff;
  --in: #3987e5; --out: #e66767; --head-line: rgba(255,255,255,.06);
  --shadow: 0 22px 48px -28px rgba(0, 0, 0, .8);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; font: 15px/1.5 var(--font); color: var(--ink); background: var(--page-b); touch-action: manipulation; }
body::before { content: ''; position: fixed; inset: 0; z-index: -1; background: repeating-linear-gradient(0deg, var(--scan) 0 1px, transparent 1px 3px), radial-gradient(ellipse at 88% -8%, hsla(var(--scene-h, 355), 90%, 60%, .2), transparent 48%), radial-gradient(ellipse at 0% 110%, hsla(var(--scene-h, 355), 80%, 55%, .1), transparent 45%), linear-gradient(170deg, var(--page-a), var(--page-b) 65%); }
h1, h2, h3, .p-name, .tile b, .hero b, .note b, .end-score, .quote, .cta, .next, .logo h1, .panel h2 { font-family: var(--display); }
h1, h2, .quote { text-wrap: balance; }
button { font: inherit; color: inherit; cursor: pointer; }
input { font: inherit; }
.hidden { display: none !important; }
.pos { color: var(--green); } .neg { color: var(--red); }
:focus-visible { outline: 3px solid var(--accent2); outline-offset: 2px; }

/* ---------- Accueil & création ---------- */
.center { min-height: 100vh; display: grid; place-items: center; padding: 28px 16px; }
.panel { background: var(--paper); border-radius: 24px; padding: 30px; width: min(560px, 100%); box-shadow: var(--shadow); }
.logo { display: flex; align-items: center; gap: 12px; justify-content: center; margin-bottom: 6px; }
.logo-mark { width: 46px; height: 46px; border-radius: 12px; background: var(--play); display: grid; place-items: center; color: #fff; font-size: 20px; box-shadow: 0 8px 18px -8px rgba(255,77,94,.8); }
.logo h1 { margin: 0; font-size: 30px; letter-spacing: -.02em; }
.tagline { text-align: center; color: var(--muted); margin: 6px 0 24px; }
.cta { width: 100%; border: 0; border-radius: 16px; padding: 15px; font-weight: 700; font-size: 16px; color: #fff; background: var(--play); box-shadow: 0 12px 24px -12px rgba(255,51,65,.9); }
.cta:active { transform: translateY(1px); }
.saves { margin-top: 22px; display: grid; gap: 8px; }
.saves h3 { margin: 0 0 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.save { display: flex; align-items: center; gap: 12px; border: 1.5px solid var(--line); border-radius: 16px; padding: 10px 12px; background: var(--paper); }
.save .info { flex: 1; min-width: 0; }
.save strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.save small { color: var(--muted); }
.save .play { border: 0; background: var(--btn); color: var(--on-btn); border-radius: 11px; padding: 8px 14px; font-weight: 600; font-size: 13px; }
.mini-btn { border: 0; background: none; color: var(--faint); font-size: 14px; padding: 6px 8px; border-radius: 9px; }
.mini-btn:hover { color: var(--ink); background: var(--soft); }
.links { display: flex; justify-content: center; gap: 14px; margin-top: 16px; font-size: 13px; flex-wrap: wrap; }
.links button, .links label { border: 0; background: none; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 4px; }
.setup-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.setup-top button { border: 0; background: var(--soft); border-radius: 11px; padding: 7px 12px; font-size: 13px; font-weight: 600; }
.step-dots { display: flex; gap: 6px; justify-content: center; margin-bottom: 16px; }
.step-dots i { width: 28px; height: 5px; border-radius: 3px; background: var(--line); }
.step-dots i.on { background: var(--violet); }
.panel h2 { margin: 0; font-size: 22px; text-align: center; }
.panel .sub { text-align: center; color: var(--muted); margin: 4px 0 18px; font-size: 14px; }
.choice-grid { display: grid; gap: 10px; }
.choice-grid.two { grid-template-columns: 1fr 1fr; }
.pickcard { text-align: left; border: 1.5px solid var(--line); background: var(--paper); border-radius: 16px; padding: 12px 14px; transition: border-color .12s, transform .12s, box-shadow .12s; }
.pickcard:hover { border-color: var(--violet); transform: translateY(-1px); box-shadow: 0 8px 18px -12px rgba(106,76,240,.6); }
.pickcard strong { display: block; font-size: 15px; }
.pickcard small { color: var(--muted); font-size: 12.5px; line-height: 1.35; display: block; margin-top: 2px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; }
.field input { width: 100%; border: 1.5px solid var(--line); border-radius: 12px; padding: 12px; }
.field input:focus { outline: 2px solid var(--violet); border-color: transparent; }

/* ---------- Barre du haut ---------- */
.topbar { width: min(1120px, 100%); margin: 0 auto; padding: 16px 16px 0; display: flex; align-items: center; gap: 14px; color: var(--top); }
.topbar .brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 16px; border: 0; background: none; color: var(--top); padding: 0; }
.topbar .brand .logo-mark { width: 32px; height: 32px; border-radius: 10px; font-size: 13px; box-shadow: none; }
.player { flex: 1; min-width: 0; display: grid; gap: 7px; max-width: 640px; margin-left: auto; }
.player-meta { display: flex; gap: 12px; align-items: baseline; font-size: 13px; color: var(--top-muted); }
.player-meta .chap-name { color: var(--top); font-family: var(--display); font-weight: 700; font-size: 15px; }
.player-meta .tc { margin-left: auto; font-family: var(--mono); font-size: 12px; color: var(--top); font-variant-numeric: tabular-nums; }
.seek { position: relative; display: flex; gap: 2px; height: 5px; }
.seek .seg { flex: 1; background: var(--top-track); border-radius: 1px; overflow: hidden; }
.seek .seg.chap { margin-left: 5px; }
.seek .seg i { display: block; height: 100%; background: var(--play); }
.seek .head { position: absolute; top: 50%; width: 13px; height: 13px; border-radius: 50%; background: var(--play); transform: translate(-50%, -50%); box-shadow: 0 0 0 3px rgba(255,51,65,.25); transition: left .5s ease; }
.season-info { margin-left: auto; text-align: right; line-height: 1.25; }
.season-info b { display: block; font-size: 14px; }
.stepper { display: flex; gap: 5px; align-items: center; justify-content: flex-end; margin-top: 5px; }
.stepper i { width: 22px; height: 6px; border-radius: 3px; background: var(--step); }
.stepper i.done { background: var(--step-done); }
.stepper i.now { background: var(--accent2); width: 34px; }
.home-btn { border: 0; background: var(--top-btn); color: var(--top); border-radius: 11px; padding: 7px 12px; font-size: 13px; font-weight: 600; }
.home-btn:hover { background: var(--top-btn-h); }

/* ---------- Profil ---------- */
.game { width: min(1120px, 100%); margin: 0 auto; padding: 16px 16px 40px; display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 20px; align-items: start; }
.profile { background: var(--paper); border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); }
.p-top { padding: 18px 18px 16px; background: linear-gradient(160deg, var(--soft), var(--paper) 70%); }
.p-head { display: flex; gap: 14px; align-items: center; }
.avatar { width: 68px; height: 68px; border-radius: 20px; display: grid; place-items: center; font-size: 28px; color: #fff; font-weight: 700; position: relative; flex: none; box-shadow: 0 10px 20px -12px rgba(0,0,0,.6); }
.avatar .em { position: absolute; right: -6px; bottom: -6px; width: 28px; height: 28px; border-radius: 50%; background: var(--paper); display: grid; place-items: center; font-size: 15px; box-shadow: 0 2px 6px rgba(0,0,0,.18); }
.p-id { flex: 1; min-width: 0; }
.p-name { font-weight: 700; font-size: 18px; line-height: 1.2; word-break: break-word; }
.p-chan { color: var(--muted); font-size: 13px; }
.p-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 6px; }
.tagp { font-size: 11.5px; border-radius: 20px; padding: 1px 9px; background: var(--paper); border: 1.5px solid var(--line); white-space: nowrap; }
.tagp.agency { border-color: var(--violet-line); background: var(--violet-soft); }
.note { width: 54px; height: 54px; flex: none; border-radius: 16px; background: linear-gradient(135deg, var(--gold), #f6cd52); color: #fff; display: grid; place-content: center; text-align: center; line-height: 1; box-shadow: 0 8px 16px -10px rgba(227,163,18,.9); }
.note b { font-size: 22px; font-weight: 800; text-shadow: 0 1px 2px rgba(0,0,0,.18); }
.note span { font-size: 8.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .95; margin-top: 2px; }
.note.up { animation: bump .7s; }
@keyframes bump { 40% { transform: scale(1.2) rotate(-4deg); } }
.hero { display: grid; grid-template-columns: 1.15fr 1.15fr .7fr; gap: 8px; margin-top: 14px; }
.hero div { background: transparent; border: 0; border-left: 1px solid var(--line); border-radius: 0; padding: 8px 10px; min-width: 0; }
.hero label { display: block; font: 600 10px/1.4 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.hero b { display: block; font-size: 18px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.3; }
.hero small { display: block; font-size: 11px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vitals { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.vital { font-size: 11.5px; font-weight: 600; color: var(--muted); }
.vital div { display: flex; justify-content: space-between; margin-bottom: 3px; }
.vital b { color: var(--ink); }
.bar { display: block; height: 7px; border-radius: 4px; background: var(--soft2); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 4px; transition: width .6s ease; }
.p-body { padding: 0 18px 8px; }
details.sec { border-top: 1px solid var(--line); }
details.sec summary { list-style: none; cursor: pointer; display: flex; align-items: center; padding: 12px 0; font-weight: 700; font-size: 14px; }
details.sec summary::-webkit-details-marker { display: none; }
details.sec summary::after { content: '▾'; color: var(--faint); transition: transform .2s; margin-left: 8px; }
details.sec[open] summary::after { transform: rotate(180deg); }
details.sec summary small { font-weight: 500; color: var(--muted); margin-left: auto; font-size: 12px; }
.sec-body { padding-bottom: 14px; }
.skills { display: grid; grid-template-columns: 1fr 1fr; gap: 9px 16px; }
.skill { font-size: 12px; }
.skill div { display: flex; justify-content: space-between; color: var(--muted); margin-bottom: 3px; }
.skill b { color: var(--ink); font-variant-numeric: tabular-nums; }
.skill .bar { height: 5px; }
.subhead { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); font-weight: 700; margin: 14px 0 8px; }
.subhead:first-child { margin-top: 0; }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.mini-stats div { background: var(--soft); border-radius: 10px; padding: 6px 8px; font-size: 11px; color: var(--muted); }
.mini-stats b { display: block; color: var(--ink); font-size: 14px; }
.trophies { display: flex; flex-wrap: wrap; gap: 6px; }
.trophy { font-size: 12px; border-radius: 20px; padding: 3px 10px; background: var(--gold-soft); border: 1.5px solid var(--gold-line); font-weight: 600; }
.trophy.award { background: var(--violet-soft); border-color: var(--violet-line); }
.empty { font-style: italic; color: var(--muted); font-size: 12.5px; margin: 0; }
.chart { width: 100%; height: 100px; display: block; }
.chart-legend { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 2px; }
.timeline { display: grid; gap: 6px; font-size: 12.5px; max-height: 200px; overflow: auto; margin-top: 12px; padding-left: 14px; border-left: 2px solid var(--soft2); margin-left: 4px; }
.timeline div { position: relative; }
.timeline div::before { content: ''; position: absolute; left: -19px; top: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.timeline b { color: var(--muted); font-weight: 600; margin-right: 6px; }
.p-links { display: flex; justify-content: center; gap: 14px; padding: 10px 0 12px; border-top: 1px solid var(--line); }
.p-links button { border: 0; background: none; color: var(--muted); font-size: 12.5px; text-decoration: underline; text-underline-offset: 3px; padding: 2px; }
.more-toggle { display: none; }

/* ---------- Carte de décision ---------- */
.stage { position: sticky; top: 16px; }
.card { background: var(--paper); border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); animation: in .3s cubic-bezier(.2,.9,.3,1.1); }
@keyframes in { from { transform: translateY(12px) scale(.99); } }
.card-head { display: grid; gap: 2px; padding: 16px 22px 14px; background: var(--violet-soft); border-bottom: 1px solid var(--head-line); }
.card-head .live { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: currentColor; margin-right: 7px; vertical-align: 1px; }
.card-head .ic { width: 44px; height: 44px; border-radius: 14px; background: var(--paper); display: grid; place-items: center; font-size: 22px; box-shadow: 0 4px 10px -6px rgba(0,0,0,.3); flex: none; }
.card-head .kicker { font: 600 11px/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--violet); }
.card-head h2 { margin: 0; font-size: 21px; line-height: 1.2; font-weight: 700; letter-spacing: -.01em; }
.card.good .card-head { background: var(--green-soft); } .card.good .kicker { color: var(--green); }
.card.bad .card-head { background: var(--red-soft); } .card.bad .kicker { color: var(--red); }
.card.gold .card-head { background: var(--gold-soft); } .card.gold .kicker { color: var(--gold-ink); }
.card-body { padding: 18px 22px 22px; }
.card-text { font-size: 16px; margin: 0 0 16px; }
.goal { display: flex; align-items: center; gap: 10px; background: var(--soft); border-radius: 14px; padding: 10px 12px; font-size: 13px; margin-bottom: 14px; }
.goal .bar { flex: 1; height: 8px; min-width: 50px; }
.goal .bar i { background: linear-gradient(90deg, var(--violet), var(--accent)); }
.opts { display: grid; gap: 10px; }
.opt { width: 100%; display: flex; align-items: center; gap: 12px; border: 1.5px solid var(--line); background: var(--paper); border-radius: 12px; padding: 13px 14px; text-align: left; transition: border-color .12s, transform .12s, box-shadow .12s; }
.opt:hover:not(:disabled) { border-color: var(--violet); transform: translateY(-1px); box-shadow: 0 10px 20px -14px rgba(106,76,240,.8); }
.opt:disabled { opacity: .45; cursor: not-allowed; }
.opt .txt { flex: 1; min-width: 0; }
.opt strong { display: block; font-size: 15px; font-weight: 600; line-height: 1.3; }
.opt small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.opt .chev { color: var(--faint); font-size: 22px; line-height: 1; flex: none; transition: transform .12s, color .12s; }
.opt:hover:not(:disabled) .chev { color: var(--violet); transform: translateX(3px); }
.pill { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .08em; border-radius: 20px; padding: 1px 8px; margin-bottom: 3px; background: var(--violet-soft); color: var(--violet); }
.pill.t-PRUDENT, .pill.t-SÛR, .pill.t-LOYAL, .pill.t-PROCHE { background: var(--green-soft); color: var(--green); }
.pill.t-CULOTTÉ, .pill.t-VIRAL, .pill.t-AUDACIEUX { background: var(--red-soft); color: var(--red); }
.pill.t-BUSINESS, .pill.t-OPPORTUNISTE, .pill.t-EMPIRE, .pill.t-PRESTIGE { background: var(--gold-soft); color: var(--gold-ink); }
.pill.lock { background: var(--soft2); color: var(--muted); }
.fx { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.fx span { font-size: 11px; font-weight: 600; border-radius: 6px; padding: 1px 7px; background: var(--soft); color: var(--muted); }
.fx span.up { background: var(--green-soft); color: var(--green); } .fx span.down { background: var(--red-soft); color: var(--red); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; }
.chip { font-size: 13px; font-weight: 700; border-radius: 20px; padding: 4px 12px; animation: pop .35s backwards; }
.chip:nth-child(2) { animation-delay: .06s; } .chip:nth-child(3) { animation-delay: .12s; } .chip:nth-child(4) { animation-delay: .18s; } .chip:nth-child(5) { animation-delay: .24s; }
@keyframes pop { from { transform: scale(.6); } }
.chip.up { background: var(--green-soft); color: var(--green); } .chip.down { background: var(--red-soft); color: var(--red); }
.next { width: 100%; border: 0; border-radius: 12px; padding: 14px; font-weight: 700; font-size: 15px; color: var(--on-btn); background: var(--btn); }
.next:hover { background: var(--btn-h); }
.quote { font-size: 19px; font-weight: 700; font-style: normal; letter-spacing: -.01em; margin: 0 0 16px; padding-left: 14px; border-left: 4px solid var(--gold); }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 16px; }
.tile { background: var(--soft); border-radius: 10px; padding: 10px 12px; text-align: left; min-width: 0; }
.tile > span { display: block; font-size: 12px; color: var(--muted); font-weight: 500; }
.tile b { display: block; font-size: 22px; font-weight: 700; color: var(--ink); line-height: 1.25; white-space: nowrap; }
.tile b small { font-size: 12px; color: var(--muted); font-weight: 500; }
.tile .delta { display: block; font-size: 11.5px; font-weight: 600; color: var(--muted); }
.tile .delta.up { color: var(--up-ink); } .tile .delta.down { color: var(--crit); }
.lines { display: grid; gap: 8px; font-size: 14px; margin-bottom: 16px; }
.line { display: flex; gap: 10px; align-items: flex-start; }
.line .i { width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; font-size: 12px; flex: none; background: var(--soft); }
.line.ok .i { background: var(--green-soft); } .line.ko .i { background: var(--red-soft); } .line.gold .i { background: var(--gold-soft); }
.line.gold { font-weight: 700; color: var(--gold-ink); }
.line small { color: var(--muted); }
.news { border-top: 1px dashed var(--line); padding-top: 12px; margin-bottom: 16px; font-size: 13px; color: var(--muted); display: grid; gap: 4px; }
.award-big { text-align: center; font-size: 54px; margin: 0 0 6px; animation: pop .5s; }
.end-score { text-align: center; font-size: 44px; font-weight: 800; color: var(--violet); line-height: 1.1; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(16px); background: var(--btn); color: var(--on-btn); padding: 10px 16px; border-radius: 12px; font-size: 14px; opacity: 0; pointer-events: none; transition: .25s; z-index: 50; max-width: calc(100vw - 32px); }
.toast.on { opacity: 1; transform: translateX(-50%); }

@media (max-width: 880px) {
  .topbar { padding: 12px 12px 0; gap: 10px; }
  .topbar .brand > span { display: none; }
  .player { margin-left: 0; }
  .player-meta span:nth-child(2) { display: none; }
  .card-head h2 { font-size: 18px; }
  .stepper { justify-content: flex-start; }
  .stepper i { width: 14px; } .stepper i.now { width: 22px; }
  .game { grid-template-columns: 1fr; padding: 10px 12px 30px; gap: 12px; }
  .stage { position: static; }
  .profile { border-radius: 20px; }
  .p-top { padding: 14px; }
  .avatar { width: 52px; height: 52px; border-radius: 16px; font-size: 22px; }
  .avatar .em { width: 22px; height: 22px; font-size: 12px; right: -4px; bottom: -4px; }
  .p-name { font-size: 16px; }
  .p-tags { display: none; }
  .note { width: 46px; height: 46px; border-radius: 14px; } .note b { font-size: 19px; }
  .hero { margin-top: 12px; } .hero b { font-size: 15px; }
  .p-body { padding: 0 14px; }
  .profile:not(.open) .p-body { display: none; }
  .profile.open .p-tags { display: flex; }
  .more-toggle { display: block; width: 100%; border: 0; border-top: 1px solid var(--line); background: var(--paper); padding: 10px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
  .card { border-radius: 20px; }
  .card-head { padding: 14px 16px; } .card-head h2 { font-size: 16px; }
  .card-head .ic { width: 38px; height: 38px; font-size: 19px; }
  .card-body { padding: 16px; }
  .card-text { font-size: 15px; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .opt { min-height: 54px; }
  .panel { padding: 22px 18px; }
  .choice-grid.two { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- Ajouts : risques, business, détail des comptes ---------- */
.pill.danger { background: #2a1320; color: #ffb3bd; }
.biz { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; padding: 3px 0; }
.biz small { color: var(--muted); }
.biz b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.linkbtn { border: 0; background: none; padding: 0 2px; color: var(--violet); text-decoration: underline; text-underline-offset: 3px; font-size: 12.5px; }
.money-lines { display: grid; gap: 2px; margin-top: 6px; font-size: 12.5px; }
.money-lines > span { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dashed var(--line); padding: 2px 0; }
.warnline { color: var(--red); font-weight: 600; }

/* ---------- Jauges et graphiques (méthode dataviz) ---------- */
.meter.ok { background: var(--violet-track); } .meter.ok i { background: var(--violet); }
.meter.warn { background: var(--warn-track); } .meter.warn i { background: var(--warn); }
.meter.crit { background: var(--crit-track); } .meter.crit i { background: var(--crit); }
.skillbar { background: var(--violet-track); } .skillbar i { background: var(--violet); }
.viz-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.viz-title { font-size: 12.5px; font-weight: 600; color: var(--ink); }
.viz { position: relative; }
.viz-svg { width: 100%; height: auto; display: block; overflow: visible; }
.viz-svg:focus-visible { outline: 2px solid var(--violet); outline-offset: 4px; border-radius: 6px; }
.viz-grid { stroke: var(--grid); stroke-width: 1; }
.viz-base { stroke: var(--axis-line); stroke-width: 1; }
.viz-tick { font-size: 9px; fill: var(--axis); font-family: var(--mono); }
.viz-val { font-size: 10.5px; fill: var(--ink); font-weight: 600; font-family: var(--font); }
.viz-line { fill: none; stroke: var(--violet); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.viz-area { fill: var(--violet); opacity: .1; }
.viz-dot, .viz-hover { fill: var(--violet); stroke: var(--paper); stroke-width: 2; }
.viz-cross { stroke: var(--axis); stroke-width: 1; }
.viz-mark { stroke: var(--gold); stroke-width: 1; opacity: .6; }
.viz-marktxt { font-size: 9px; }
.viz-bar path { fill: var(--deemph); transition: fill .15s; }
.viz-bar.cur path { fill: var(--violet); }
.viz-bar:hover path, .viz-bar:focus path { fill: var(--deemph-h); }
.viz-bar.cur:hover path, .viz-bar.cur:focus path { fill: var(--cur-h); }
.viz-bar:focus { outline: none; }
.viz-hit { fill: transparent; }
.viz-tip { position: absolute; top: -6px; transform: translate(-50%, -100%); background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; box-shadow: var(--shadow); font-size: 11.5px; color: var(--muted); white-space: nowrap; pointer-events: none; z-index: 5; display: grid; }
.viz-tip b { color: var(--ink); font-size: 13px; }
.viz-tip[hidden] { display: none; }
.viz-legend { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--muted); }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--deemph); margin-left: 4px; }
.sw.cur { background: var(--violet); } .sw.in { background: var(--in); } .sw.out { background: var(--out); }
.viz-block { background: var(--soft); border-radius: 10px; padding: 10px 12px 6px; margin-bottom: 16px; }
.viz-table { max-height: 180px; overflow: auto; }
.viz-table table { width: 100%; border-collapse: collapse; font-size: 12px; }
.viz-table th { text-align: left; color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--line); padding: 4px; position: sticky; top: 0; background: var(--paper); }
.viz-table td { padding: 4px; border-bottom: 1px solid var(--line2); font-variant-numeric: tabular-nums; }
.money-viz { display: grid; gap: 5px; margin-top: 8px; width: 100%; }
.mrow { display: grid; grid-template-columns: minmax(0, 1.3fr) 1fr auto; gap: 10px; align-items: center; font-size: 12.5px; }
.mlabel { color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mtrack { height: 10px; border-radius: 0 4px 4px 0; }
.mtrack i { display: block; height: 100%; border-radius: 0 4px 4px 0; }
.mtrack i.in { background: var(--in); } .mtrack i.out { background: var(--out); }
.mval { font-variant-numeric: tabular-nums; color: var(--ink); text-align: right; white-space: nowrap; }
.line > span:last-child { flex: 1; min-width: 0; }

.hero div:first-child { border-left: 0; padding-left: 0; }

/* ---------- Partage de fin de carrière ---------- */
.share { background: var(--soft); border-radius: 10px; padding: 12px; margin-bottom: 14px; display: grid; gap: 10px; }
.share-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.share-head .empty { font-size: 11.5px; }
.share-text { margin: 0; white-space: pre-wrap; word-break: break-word; font: 500 12.5px/1.6 var(--mono); color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; max-height: 240px; overflow: auto; }
.share-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.share-btns .next { flex: 1 1 160px; }
.next.ghost { background: var(--paper); color: var(--ink); border: 1.5px solid var(--line); }
.next.ghost:hover { background: var(--soft); }

.top-actions { display: flex; gap: 6px; align-items: center; }
.theme-row { display: flex; justify-content: center; margin-top: 12px; }
.theme-row .theme-btn { background: var(--soft); color: var(--muted); }
.theme-row .theme-btn:hover { background: var(--soft2); }
@media (max-width: 520px) { .top-actions .theme-btn { padding: 7px 9px; } }
.pill.ruin { background: var(--red-soft); color: var(--red); }
.money-warn { display: block; margin-top: 3px; font-size: 12.5px; font-weight: 600; color: var(--gold-ink); }
.money-warn.ruin { color: var(--red); }

.pickcard.sel { border-color: var(--violet); background: var(--violet-soft); }
.traits .pickcard { padding: 10px 12px; }
.ach-box { margin-top: 16px; border: 1.5px solid var(--line); border-radius: 16px; padding: 10px 14px; }
.ach-box summary { cursor: pointer; font-weight: 700; }
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 10px; }
.ach { display: grid; grid-template-columns: auto 1fr; column-gap: 8px; align-items: center; padding: 8px 10px; border-radius: 12px; background: var(--soft); opacity: .55; }
.ach span { grid-row: span 2; font-size: 20px; }
.ach b { font-size: 13px; } .ach small { font-size: 11.5px; color: var(--muted); line-height: 1.3; }
.ach.on { opacity: 1; background: var(--gold-soft); }
.ach.new { outline: 2px solid var(--gold); }
.ach-grid.only .ach:not(.on) { display: none; }
.ach-end { margin: 0 0 16px; } .ach-end h3 { margin: 0 0 4px; font-size: 15px; text-align: center; }

.pickcard.lockd { opacity: .55; cursor: not-allowed; }
.dream { margin: 0 0 10px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.dream i { display: block; height: 5px; border-radius: 3px; background: var(--violet-track); margin-top: 4px; overflow: hidden; }
.dream i b { display: block; height: 100%; background: var(--gold); }
.dream-end { text-align: center; font-weight: 700; margin: 0 0 10px; color: var(--gold-ink); }
.dream-end.miss { color: var(--muted); font-weight: 600; }

/* ---------- Scène : la carte comme une vignette vidéo ---------- */
:root { --scene-h: 262; transition: --scene-h .6s; }
body::before { transition: background .6s; }
.card-head.scene { position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; min-height: 168px; padding: 18px 150px 18px 24px; border: 0; overflow: hidden; color: #fff;
  background: radial-gradient(circle at 82% 45%, hsla(var(--h), 95%, 70%, .55), transparent 38%), linear-gradient(135deg, hsl(var(--h) 70% 30%), hsl(calc(var(--h) + 40) 75% 18%)); }
.card-head.scene::before { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(255,255,255,.035) 0 1px, transparent 1px 3px); pointer-events: none; }
.card-head.scene .kicker { position: absolute; top: 14px; left: 24px; color: #fff; background: rgba(0,0,0,.35); padding: 3px 9px; border-radius: 6px; font-size: 10.5px; }
.card-head.scene .live { color: var(--play); animation: blink 1.4s infinite; }
.card-head.scene h2 { position: relative; font-size: 28px; font-weight: 800; line-height: 1.08; letter-spacing: -.02em; text-shadow: 0 2px 0 rgba(0,0,0,.35), 0 8px 24px rgba(0,0,0,.4); max-width: 18ch; }
.scene-ic { position: absolute; right: 26px; top: 50%; font-size: 92px; line-height: 1; transform: translateY(-50%) rotate(-6deg); filter: drop-shadow(0 12px 18px rgba(0,0,0,.45)); animation: float 4s ease-in-out infinite; }
.dur { position: absolute; right: 10px; bottom: 10px; font: 600 11px/1 var(--mono); background: rgba(0,0,0,.75); color: #fff; padding: 4px 6px; border-radius: 4px; }
.card.good .card-head.scene { --h: 150 !important; } .card.bad .card-head.scene { --h: 355 !important; } .card.gold .card-head.scene { --h: 40 !important; }
.card.good .kicker, .card.bad .kicker, .card.gold .kicker { color: #fff; }
.card-text { font-size: 18px; line-height: 1.55; }
.card-body { padding: 20px 24px 24px; }
/* choix : grosses touches numérotées qui arrivent en cascade */
.opt { padding: 15px 16px; border-radius: 14px; animation: optIn .4s cubic-bezier(.2,.9,.3,1.15) backwards; animation-delay: calc(var(--i, 0) * 70ms + 120ms); }
.opt kbd { flex: none; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; font: 700 13px var(--mono); background: var(--soft2); color: var(--muted); border-bottom: 3px solid var(--line); transition: background .12s, color .12s; }
.opt:hover:not(:disabled) kbd { background: var(--violet); color: #fff; border-color: hsl(255 60% 35%); }
.opt:active:not(:disabled) { transform: scale(.985); }
.opt strong { font-size: 16px; }
.next { font-size: 16px; padding: 16px; border-radius: 14px; animation: optIn .4s .25s backwards; }
.next::after { content: ' ⏎'; opacity: .45; font-size: 13px; }
.chip { font-size: 14px; padding: 6px 14px; }
.card.still, .card.still * { animation: none !important; }
@keyframes float { 50% { transform: translateY(-56%) rotate(4deg); } }
@keyframes blink { 50% { opacity: .25; } }
@keyframes optIn { from { opacity: 0; transform: translateY(10px) scale(.97); } }
@media (max-width: 880px) {
  .card-head.scene { min-height: 132px; padding: 44px 104px 16px 18px; }
  .card-head.scene .kicker { left: 18px; }
  .card-head.scene h2 { font-size: 22px; }
  .scene-ic { font-size: 64px; right: 16px; }
  .card-text { font-size: 17px; }
  .opt kbd { display: none; }
  .next::after { content: ''; }
}

/* ---------- Profil compact (HUD) ---------- */
.p-top { padding: 16px 16px 14px; }
.p-head { gap: 12px; }
.avatar { width: 56px; height: 56px; border-radius: 17px; font-size: 24px; }
.avatar .em { width: 24px; height: 24px; font-size: 13px; }
.note { width: 48px; height: 48px; border-radius: 14px; }
.note b { font-size: 19px; }
.p-tags { gap: 4px; margin-top: 7px; }
.tagp.ic { width: 28px; height: 28px; padding: 0; display: grid; place-items: center; font-size: 14px; border-radius: 9px; cursor: help; }
.dream { margin: 3px 0 0; font-size: 12px; }
.dream i { height: 4px; margin-top: 3px; }
.hero { margin-top: 12px; }
.hero b { font-size: 20px; }

/* ---------- Moments forts ---------- */
.celebrate { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; cursor: pointer;
  background: radial-gradient(circle at 50% 45%, rgba(120,70,10,.96), rgba(12,8,22,.97) 62%); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); animation: celIn .3s ease-out; }
.celebrate.bad { background: radial-gradient(circle at 50% 45%, rgba(110,14,26,.96), rgba(12,8,22,.97) 62%); }
.celebrate.out { animation: celOut .25s ease-in forwards; }
.cel-box { text-align: center; color: #fff; max-width: 520px; position: relative; }
.cel-ic { font-size: 120px; line-height: 1; filter: drop-shadow(0 18px 30px rgba(0,0,0,.5)); animation: celPop .7s cubic-bezier(.2,1.6,.4,1) .1s backwards; }
.cel-kicker { font: 600 12px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: #ffd36b; margin-top: 18px; animation: optIn .4s .35s backwards; }
.celebrate.bad .cel-kicker { color: #ff8a94; }
.cel-box h2 { font-size: clamp(30px, 7vw, 46px); line-height: 1.05; margin: 8px 0 10px; letter-spacing: -.02em; text-shadow: 0 4px 24px rgba(0,0,0,.5); animation: optIn .45s .45s backwards; }
.cel-box p { font-size: 17px; opacity: .85; margin: 0 0 22px; animation: optIn .45s .55s backwards; }
.cel-box .cta { width: auto; padding: 14px 34px; animation: optIn .45s .65s backwards; }
.confetti { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.confetti i { position: absolute; top: -20px; left: var(--x); width: 9px; height: 15px; border-radius: 2px; background: var(--c); transform: rotate(var(--r)); animation: fall 2.6s cubic-bezier(.3,.6,.5,1) var(--d) forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(calc(var(--r) + 720deg)); } }
@keyframes celPop { from { transform: scale(.2) rotate(-25deg); opacity: 0; } }
@keyframes celIn { from { opacity: 0; } }
@keyframes celOut { to { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .confetti { display: none; } }

/* ---------- Enjeux des choix et alertes ---------- */
.pvs { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 7px; align-items: center; }
.pv { display: inline-flex; align-items: center; gap: 2px; font-size: 13px; padding: 2px 7px; border-radius: 8px; background: var(--soft); }
.pv b { font-size: 10px; } .pv.up b { color: var(--green); } .pv.down b { color: var(--red); } .pv.mixed b { color: var(--gold-ink); }
.pv-fatal { font-size: 12px; font-weight: 700; color: var(--red); background: var(--red-soft); padding: 3px 8px; border-radius: 8px; }
.alerts { display: grid; gap: 6px; margin-bottom: 12px; }
.alerts p { margin: 0; padding: 10px 14px; border-radius: 12px; font-size: 14px; font-weight: 600; background: var(--red-soft); color: var(--red); border: 1.5px solid currentColor; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 4px hsla(355, 80%, 60%, .18); } }

/* ---------- Journal de carrière ---------- */
.journal { margin: 0 0 16px; text-align: left; border: 1.5px solid var(--line); border-radius: 16px; padding: 10px 14px; }
.journal summary { cursor: pointer; font-weight: 700; }
.journal ol { list-style: none; margin: 10px 0 0; padding: 0 0 0 14px; border-left: 2px solid var(--line); max-height: 460px; overflow-y: auto; }
.journal li { position: relative; margin: 0 0 12px; }
.journal li::before { content: ''; position: absolute; left: -20px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--violet); }
.j-s { display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; font-size: 13.5px; } .j-s span { color: var(--muted); font-size: 12.5px; } .j-s em { font-style: normal; font-weight: 700; }
.j-c { margin-top: 5px; padding: 6px 9px; border-radius: 10px; background: var(--soft); font-size: 13px; }
.j-c b { font-weight: 600; } .j-c small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.j-cat { font-size: 11.5px; color: var(--muted); }
.j-c.turn { background: var(--gold-soft); outline: 1.5px solid var(--gold-line); }
.j-t { display: block; font: 700 10.5px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--gold-ink); margin-bottom: 2px; }

.install { display: block; margin: 12px auto 0; border: 1.5px solid var(--violet); background: var(--violet-soft); color: var(--violet); border-radius: 12px; padding: 10px 18px; font-weight: 700; }
.install-tip { text-align: center; font-size: 13px; color: var(--muted); margin: 12px 0 0; }

/* ---------- Défi du jour ---------- */
.daily { margin-top: 14px; border-radius: 18px; padding: 14px 16px; background: linear-gradient(135deg, var(--gold-soft), var(--violet-soft)); border: 1.5px solid var(--gold-line); text-align: left; }
.daily-h { display: flex; justify-content: space-between; align-items: baseline; font-family: var(--display); font-weight: 800; font-size: 17px; }
.daily-h small { font: 600 11px var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.daily p { margin: 6px 0 0; font-size: 13.5px; font-weight: 600; }
.daily .daily-sub { font-weight: 400; color: var(--muted); font-size: 12.5px; margin-bottom: 10px; }
.daily-done { font-size: 14px; margin-bottom: 8px; }
.cta.gold { background: linear-gradient(135deg, #f0a417, #ff6b3d); box-shadow: 0 12px 24px -12px rgba(240,140,20,.9); }
.ghost { width: 100%; border: 1.5px solid var(--line); background: var(--paper); border-radius: 12px; padding: 10px; font-weight: 600; }

.daily-rank { text-align: center; font-size: 15px; margin: 0 0 14px; padding: 10px; border-radius: 12px; background: var(--violet-soft); }
.fb-box { margin: 0 0 16px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 16px; text-align: center; }
.fb-box h3 { margin: 0 0 6px; font-size: 15px; }
.stars { display: flex; justify-content: center; gap: 4px; margin-bottom: 8px; }
.stars button { border: 0; background: none; font-size: 30px; line-height: 1; color: var(--line); padding: 2px; transition: transform .1s; }
.stars button.on { color: var(--gold); } .stars button:hover { transform: scale(1.15); }
.fb-box textarea { width: 100%; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px; background: var(--soft); color: var(--ink); font: inherit; resize: vertical; margin-bottom: 8px; }
.fb-thanks { text-align: center; margin: 0 0 16px; font-weight: 600; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Vidéo de la saison ---------- */
.trend { margin: 0 0 12px; padding: 10px 14px; border-radius: 12px; background: var(--soft); font-size: 14px; }
.trend small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.trend.hot { background: linear-gradient(135deg, hsla(25, 95%, 60%, .16), hsla(350, 90%, 60%, .14)); border: 1.5px solid hsla(20, 90%, 55%, .45); }
.opt .thumb { float: right; margin: 0 0 4px 10px; width: 74px; height: 42px; border-radius: 8px; display: grid; place-items: center; font-size: 22px; background: linear-gradient(135deg, hsl(var(--h) 70% 38%), hsl(calc(var(--h) + 40) 75% 22%)); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.vid-recap { display: flex; gap: 12px; align-items: center; margin: 0 0 14px; padding: 10px; border-radius: 14px; background: var(--soft); }
.vid-recap .thumb { flex: none; width: 112px; height: 63px; border-radius: 10px; display: grid; place-items: center; font-size: 30px; position: relative; background: linear-gradient(135deg, hsl(var(--h) 70% 38%), hsl(calc(var(--h) + 40) 75% 22%)); }
.vid-recap .thumb i { position: absolute; right: 4px; bottom: 4px; font: 600 10px var(--mono); font-style: normal; background: rgba(0,0,0,.75); color: #fff; padding: 2px 4px; border-radius: 3px; }
.vid-recap b { display: block; font-size: 15px; line-height: 1.25; } .vid-recap small { color: var(--muted); font-size: 12.5px; }

/* les tons bon/mauvais/or gardent le fond « vignette » (sinon texte blanc sur fond pâle en clair) */
.card[class] .card-head.scene { background: radial-gradient(circle at 82% 45%, hsla(var(--h), 95%, 70%, .55), transparent 38%), linear-gradient(135deg, hsl(var(--h) 70% 30%), hsl(calc(var(--h) + 40) 75% 18%)); }

.comments { margin: 0 0 14px; padding: 10px 12px; border-radius: 14px; background: var(--soft); }
.c-h { font-size: 12.5px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.cmt { display: flex; gap: 9px; padding: 6px 0; animation: optIn .4s backwards; } .cmt:nth-child(3) { animation-delay: .15s; } .cmt:nth-child(4) { animation-delay: .3s; }
.cmt .av { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 13px; background: hsl(var(--h) 60% 45%); }
.cmt b { font-size: 12.5px; } .cmt p { margin: 1px 0 2px; font-size: 14px; } .cmt small { color: var(--muted); font-size: 11.5px; }

.celebrate.tuto { cursor: default; background: rgba(12,8,22,.94); }
.tuto .cel-box { max-width: 560px; }
.tuto-list { list-style: none; padding: 0; margin: 6px 0 22px; text-align: left; display: grid; gap: 12px; }
.tuto-list li { display: flex; gap: 14px; align-items: flex-start; background: rgba(255,255,255,.06); border-radius: 14px; padding: 12px 14px; animation: optIn .4s backwards; }
.tuto-list li:nth-child(2) { animation-delay: .08s; } .tuto-list li:nth-child(3) { animation-delay: .16s; } .tuto-list li:nth-child(4) { animation-delay: .24s; }
.tuto-list span { flex: none; min-width: 64px; font-size: 22px; text-align: center; }
.tuto-list p { margin: 0; font-size: 15px; line-height: 1.45; opacity: .92; }
.tuto-list kbd { font: 600 12px var(--mono); background: rgba(255,255,255,.15); border-radius: 5px; padding: 1px 6px; }

.ent { display: grid; gap: 6px; padding: 4px 0 8px; }
.ent div { display: grid; grid-template-columns: 30px 1fr; column-gap: 8px; align-items: center; }
.ent span { grid-row: span 2; font-size: 20px; text-align: center; } .ent b { font-size: 13.5px; } .ent small { color: var(--muted); font-size: 12px; }

.perk-h { font-weight: 700; margin: 16px 0 10px; }
.opt .perk-ic { float: right; font-size: 30px; margin-left: 10px; }

/* ---------- Compte et classements ---------- */
.acct { margin-top: 14px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 12px; padding: 12px; border-radius: 16px; border: 1.5px dashed var(--line); font-size: 13.5px; }
.acct > span { width: 100%; text-align: center; font-weight: 600; } .acct.on { border-style: solid; } .acct .ghost { width: auto; padding: 8px 16px; }
.board-btn { margin-top: 10px; }
.acct-form .field input { width: 100%; }
.form-err { color: var(--red); font-weight: 600; font-size: 14px; margin: 0 0 10px; }
.acct-cta { text-align: center; font-size: 14px; margin: 0 0 14px; }
.panel.wide { width: min(640px, 100%); }
.tabs { display: flex; gap: 6px; margin: 6px 0 14px; } .tabs button { flex: 1; border: 1.5px solid var(--line); background: var(--paper); border-radius: 12px; padding: 9px; font-weight: 600; font-size: 13.5px; }
.tabs button.on { border-color: var(--violet); background: var(--violet-soft); color: var(--violet); }
.board { width: 100%; border-collapse: collapse; } .board td { padding: 9px 6px; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.board td:first-child { width: 40px; text-align: center; font-weight: 700; } .board .sc { text-align: right; font-family: var(--display); font-weight: 800; font-variant-numeric: tabular-nums; }
.board tr.me td { background: var(--gold-soft); } .board small { color: var(--muted); }
.board-me { text-align: center; margin: 12px 0 0; }

.choice-grid.modes { grid-template-columns: repeat(3, 1fr); } @media (max-width: 520px) { .choice-grid.modes { grid-template-columns: 1fr; } }

.daily.challenge { background: linear-gradient(135deg, hsla(355, 90%, 60%, .14), var(--violet-soft)); border-color: hsla(355, 80%, 60%, .5); }

/* ---------- Mini-jeu de montage ---------- */
.mini .cel-box p { font-size: 15px; }
.mg-track { position: relative; height: 54px; margin: 18px 0 10px; border-radius: 12px; background: repeating-linear-gradient(90deg, rgba(255,255,255,.08) 0 2px, transparent 2px 14px), rgba(255,255,255,.06); cursor: pointer; overflow: hidden; }
.mg-zone { position: absolute; top: 0; bottom: 0; background: rgba(60, 207, 138, .35); border-left: 2px solid #3ccf8a; border-right: 2px solid #3ccf8a; }
.mg-perfect { position: absolute; top: 0; bottom: 0; background: rgba(255, 211, 107, .55); }
.mg-cur { position: absolute; top: -4px; bottom: -4px; width: 4px; margin-left: -2px; background: #fff; box-shadow: 0 0 12px #fff; border-radius: 2px; }
.mg-track.flash { animation: mgflash .25s; } @keyframes mgflash { 50% { box-shadow: inset 0 0 0 3px #ffd36b; } }
.mg-res { min-height: 26px; font-size: 16px; margin-bottom: 14px; }
.mg-skip { font-size: 13px; opacity: .8; margin-top: 12px !important; } .mg-skip .linkbtn { color: #fff; }

/* ---------- Écran titre ---------- */
.home { width: min(1040px, 100%); margin: 0 auto; padding: 40px 16px 28px; min-height: 100vh; display: flex; flex-direction: column; gap: 26px; }
.home-hero { text-align: center; position: relative; }
.home-hero::before { content: ''; position: absolute; left: 50%; top: -30px; width: 520px; height: 260px; transform: translateX(-50%); background: radial-gradient(closest-side, hsla(355, 90%, 60%, .28), transparent); filter: blur(10px); z-index: -1; animation: halo 6s ease-in-out infinite; }
@keyframes halo { 50% { transform: translateX(-50%) scale(1.12); opacity: .7; } }
.home-logo { display: flex; align-items: center; justify-content: center; gap: 16px; }
.home-logo h1 { margin: 0; font-size: clamp(40px, 8vw, 68px); letter-spacing: -.035em; line-height: 1; color: var(--top); }
.logo-mark.big { width: 72px; height: 72px; border-radius: 20px; font-size: 30px; box-shadow: 0 14px 34px -10px rgba(255,51,65,.85); animation: beat 2.4s ease-in-out infinite; }
@keyframes beat { 0%, 100% { transform: scale(1); } 8% { transform: scale(1.08); } 16% { transform: scale(1); } }
.home .tagline { max-width: 560px; margin: 14px auto 0; font-size: 16px; color: var(--top-muted); }
.home-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.home-main, .home-side { display: grid; gap: 14px; }
.home-main .daily { margin-top: 0; }
.continue { display: flex; align-items: center; gap: 14px; width: 100%; padding: 16px 18px; border: 0; border-radius: 22px; text-align: left; color: var(--ink); background: var(--paper); box-shadow: var(--shadow); transition: transform .15s; }
.continue:hover { transform: translateY(-2px); }
.avatar.sm { width: 54px; height: 54px; border-radius: 16px; font-size: 22px; flex: none; }
.c-info { flex: 1; min-width: 0; display: grid; gap: 2px; }
.c-info small { font: 600 11px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--play); }
.c-info b { font-family: var(--display); font-size: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-info em { font-style: normal; font-size: 13px; color: var(--muted); }
.c-play { flex: none; width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; background: var(--play); color: #fff; font-size: 18px; box-shadow: 0 10px 22px -10px rgba(255,51,65,.9); }
.cta.secondary { background: var(--paper); color: var(--ink); box-shadow: var(--shadow); }
.tile-bar { display: block; height: 5px; border-radius: 3px; background: var(--violet-track); overflow: hidden; margin-top: 6px; }
.tile-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--violet), var(--play)); border-radius: 3px; }
.tiles4 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.htile { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 128px; padding: 16px; border: 0; border-radius: 20px; text-align: left; color: var(--ink); background: var(--paper); box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; }
.htile:hover, .acct-tile:hover { transform: translateY(-3px); }
.htile .ht-ic { font-size: 30px; line-height: 1; margin-bottom: auto; padding-bottom: 12px; }
.htile b { font-family: var(--display); font-size: 17px; } .htile small { font-size: 12.5px; color: var(--muted); }
.htile .tile-bar { width: 100%; }
.acct-tile { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; border: 1.5px dashed var(--line); border-radius: 18px; background: transparent; color: var(--top); text-align: left; transition: transform .15s; }
.acct-tile.on { border-style: solid; background: var(--paper); color: var(--ink); box-shadow: var(--shadow); }
.acct-tile .ht-ic { font-size: 24px; } .acct-tile span:nth-child(2) { flex: 1; display: grid; } .acct-tile small { font-size: 12.5px; opacity: .75; } .acct-tile .chev { font-size: 22px; opacity: .5; }
.home-foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: auto; }
.foot-btn { border: 0; background: var(--top-btn); color: var(--top); border-radius: 999px; padding: 8px 14px; font-size: 13px; font-weight: 600; cursor: pointer; }
.foot-btn:hover { background: var(--top-btn-h); }
.home .install-tip { color: var(--top-muted); }
.ach-grid.big { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.ach-grid.big .ach { padding: 12px; } .ach-grid.big .ach span { font-size: 26px; }
.acct-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 6px 0 16px; text-align: center; }
.acct-stats div { background: var(--soft); border-radius: 14px; padding: 12px 6px; } .acct-stats b { display: block; font-family: var(--display); font-size: 24px; } .acct-stats small { color: var(--muted); }
.ghost.danger { color: var(--red); }
@media (max-width: 860px) { .home { padding-top: 28px; gap: 20px; } .home-grid { grid-template-columns: 1fr; } .logo-mark.big { width: 56px; height: 56px; font-size: 22px; border-radius: 16px; } }
@media (max-width: 400px) { .htile { min-height: 112px; padding: 14px; } }

.home-hero { overflow: clip; overflow-clip-margin: 40px; } .home-hero::before { width: min(520px, 100%); }
html, body { overflow-x: hidden; }
.tile-bar.ghost-bar { visibility: hidden; }
.mini .cel-box h2 { font-size: clamp(22px, 5vw, 30px); }
