/* ════════════════════════════════════════════════════════════════
   MASTOK — styles V1.1
   Direction : app sportive premium, sombre par défaut (clair au choix).
   Inspirations assumées : tableau de séries façon Hevy / Strong, cartes
   de séance façon Runna, anneaux et gros chiffres façon Apple Fitness /
   Whoop. Titres et chiffres en Barlow Condensed, texte en Inter
   (polices embarquées, licence OFL). Accent « volt ».
   ════════════════════════════════════════════════════════════════ */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(fonts/inter-latin-wght-normal.woff2) format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/barlow-condensed-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/barlow-condensed-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 800; font-display: swap; src: url(fonts/barlow-condensed-latin-800-normal.woff2) format("woff2"); }

/* Marges de sécurité (encoche, Dynamic Island, barre d'accueil) : celles du navigateur par défaut ;
   dans l'app iOS / Android, le shell natif les fournit lui-même (style posé sur <html>). */
:root { --sa-t: env(safe-area-inset-top, 0px); --sa-b: env(safe-area-inset-bottom, 0px); }
:root, :root[data-theme="dark"] { --tab-bg: #0d0d0f;
  --bg: #0a0a0b; --bg2: #0f0f11; --card: #151517; --card2: #1d1d20; --card3: #26262a;
  --line: rgba(255, 255, 255, .07); --line2: rgba(255, 255, 255, .12);
  --text: #f4f4f2; --text2: #a3a3a8; --text3: #6a6a70;
  --accent: #d4ff3a; --accent-ink: #0a0a0b; --accent-soft: rgba(212, 255, 58, .12); --accent-text: #d4ff3a;
  --ok: #3ddc84; --ok-soft: rgba(61, 220, 132, .14); --hot: #ff5b3a; --hot-soft: rgba(255, 91, 58, .14);
  --muscu: #8e9bff; --hyrox: #ffb53a; --crossfit: #ff6a5a;
  --muscu-g: rgba(142, 155, 255, .22); --hyrox-g: rgba(255, 181, 58, .2); --crossfit-g: rgba(255, 106, 90, .2);
  --bar-bg: rgba(18, 18, 20, .82); --shadow: 0 10px 30px rgba(0, 0, 0, .45);
  --p25: #e53935; --p20: #2f6fe4; --p15: #f2c21b; --p10: #23a35a; --p5: #f1f1ee; --p2: #c62f2c; --p1: #9aa0a6;
  --r: 18px; --r-s: 12px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", Roboto, sans-serif;
  --disp: "Barlow Condensed", "Inter", system-ui, sans-serif;
  color-scheme: dark;
}
:root[data-theme="light"] { --tab-bg: #f3f3ef;
  --bg: #f3f3ef; --bg2: #ebebe6; --card: #ffffff; --card2: #f4f4f0; --card3: #e9e9e4;
  --line: rgba(10, 10, 11, .07); --line2: rgba(10, 10, 11, .13);
  --text: #0c0c0d; --text2: #5d5d63; --text3: #9a9aa0;
  --accent: #0c0c0d; --accent-ink: #d4ff3a; --accent-soft: rgba(110, 150, 0, .12); --accent-text: #4f7300;
  --ok: #138a4a; --ok-soft: rgba(19, 138, 74, .12); --hot: #e2401f; --hot-soft: rgba(226, 64, 31, .1);
  --muscu: #4b5be0; --hyrox: #c27c00; --crossfit: #dd4433;
  --muscu-g: rgba(75, 91, 224, .14); --hyrox-g: rgba(255, 181, 58, .22); --crossfit-g: rgba(221, 68, 51, .13);
  --bar-bg: rgba(255, 255, 255, .86); --shadow: 0 10px 30px rgba(20, 20, 10, .1);
  color-scheme: light;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.4 var(--font); letter-spacing: -.011em; -webkit-font-smoothing: antialiased; overscroll-behavior-y: none; font-feature-settings: "cv11", "ss01"; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; text-align: inherit; }
a { color: inherit; text-decoration: none; }
b { font-weight: 650; }
svg { flex: none; }
.hidden { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.display { font-family: var(--disp); font-weight: 800; text-transform: uppercase; letter-spacing: -.005em; line-height: .95; }

/* ── Écran de lancement ── */
#launch { position: fixed; inset: 0; z-index: 100; background: var(--bg); display: flex; align-items: center; justify-content: center; transition: opacity .25s ease; }
#launch.out { opacity: 0; pointer-events: none; }
#launch .wordmark { font-size: 34px; }

/* ── Structure ── */
#root { min-height: 100vh; padding-bottom: calc(40px + var(--sa-b)); }
#root.with-tabs { padding-bottom: calc(96px + var(--sa-b)); }
/* Bandeau derrière l'heure et la batterie : le contenu des onglets ne glisse plus sous la barre d'état */
#root.with-tabs::before { content: ""; position: fixed; top: 0; left: 0; right: 0; height: var(--sa-t); background: var(--tab-bg); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); z-index: 29; }
#root.with-dock { padding-bottom: calc(118px + var(--sa-b)); }
.view { max-width: 620px; margin: 0 auto; }
.view.enter { animation: enter .28s cubic-bezier(.2, .8, .2, 1); }
/* Fondu seul : une translation sur .view entraînerait le dock et la barre du haut (fixed / sticky) dans le mouvement */
@keyframes enter { from { opacity: 0; } to { opacity: 1; } }

.top { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: calc(var(--sa-t) + 22px) 20px 4px; }
.top.sub { padding-top: 6px; }
.top h1 { margin: 4px 0 0; font-size: 44px; }
.eyebrow { font-size: 12px; font-weight: 600; color: var(--text2); text-transform: uppercase; letter-spacing: .08em; }
.avatar { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--card2); border: 1px solid var(--line2); font-family: var(--disp); font-weight: 800; font-size: 20px; color: var(--text); flex: none; }
.avatar.xl { width: 84px; height: 84px; font-size: 40px; background: var(--accent); color: var(--accent-ink); border: 0; }

.wordmark { display: inline-flex; align-items: center; gap: 8px; font-family: var(--disp); font-weight: 800; font-size: 22px; letter-spacing: .06em; }
.logo { width: 1em; height: 1em; color: var(--accent); }

/* Barre de navigation des écrans empilés */
.nav { position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: 56px 1fr 56px; align-items: center; min-height: 52px; padding: var(--sa-t) 8px 0;
  transition: background .2s, border-color .2s; border-bottom: 1px solid transparent; }
.nav.scrolled { background: var(--bar-bg); -webkit-backdrop-filter: saturate(160%) blur(18px); backdrop-filter: saturate(160%) blur(18px); border-bottom-color: var(--line); }
.nav .t { font-weight: 650; font-size: 15px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0; transition: opacity .15s; }
.nav.scrolled .t { opacity: 1; }
.nav .r { display: flex; justify-content: flex-end; }
.nav-btn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--card2); color: var(--text); border: 1px solid var(--line); }
.nav-btn svg { width: 20px; height: 20px; }

/* ── Sections ── */
.sec { margin-top: 26px; padding: 0 16px; }
.sec.pad { padding: 0 16px; }
.sec-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 0 4px 10px; font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: .08em; color: var(--text2); }
.sec-h button { text-transform: none; letter-spacing: 0; font-size: 14px; font-weight: 600; color: var(--accent-text); }
.sec-r { text-transform: none; letter-spacing: 0; font-weight: 500; font-size: 13px; color: var(--text3); }
.sec-f { padding: 10px 20px 0; font-size: 13px; color: var(--text3); line-height: 1.45; margin: 0; }
.sec .sec-f { padding: 10px 4px 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; }
.empty { background: var(--card); border: 1px dashed var(--line2); border-radius: var(--r); padding: 22px 18px; text-align: center; color: var(--text2); font-size: 14px; line-height: 1.5; }

/* Listes (réglages, historique, feuilles) */
.group { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.row { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 54px; padding: 12px 16px; text-align: left; color: var(--text); }
.row + .row::before, .row + .input-row::before, .input-row + .row::before, .input-row + .input-row::before { content: ""; position: absolute; top: 0; right: 0; left: 16px; height: 1px; background: var(--line); }
.group.icons > .row + .row::before { left: 62px; }
.row.col { flex-direction: column; align-items: stretch; gap: 10px; }
.row.solo { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); margin-top: 10px; }
button.row:active, label.row:active, a.row:active { background: var(--card2); }
.row .main { flex: 1; min-width: 0; }
.row .title { font-size: 16px; font-weight: 550; line-height: 1.3; }
.row .sub { font-size: 13.5px; color: var(--text2); margin-top: 3px; line-height: 1.35; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.row .val { color: var(--text2); font-size: 16px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; font-family: var(--disp); font-size: 20px; }
.row .chev { width: 18px; height: 18px; color: var(--text3); margin-right: -4px; }
.row .check { width: 22px; height: 22px; color: var(--accent-text); }
.row.off { opacity: .5; pointer-events: none; }
.ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--card3); color: var(--text); }
.ico svg { width: 18px; height: 18px; }
.ico.accent { background: var(--accent); color: var(--accent-ink); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--text3); flex: none; display: inline-block; }
.dot.muscu { background: var(--muscu); } .dot.hyrox { background: var(--hyrox); } .dot.crossfit { background: var(--crossfit); }

/* ── Boutons ── */
.btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 56px; padding: 0 22px; border-radius: 16px; font-size: 16.5px; font-weight: 700;
  background: var(--accent); color: var(--accent-ink); letter-spacing: -.01em; transition: transform .12s ease, opacity .12s; }
.btn:active { transform: scale(.98); }
.btn svg { width: 20px; height: 20px; }
.btn.ghost { background: var(--card2); color: var(--text); border: 1px solid var(--line2); }
.btn.danger { color: var(--hot); }
.btn.small { min-height: 38px; font-size: 14px; width: auto; padding: 0 14px; border-radius: 11px; }
.btn[disabled] { opacity: .35; pointer-events: none; }
.btn-col { display: flex; flex-direction: column; gap: 10px; }
.pad { padding: 0 16px; }
.link-btn { display: block; width: 100%; text-align: center; padding: 14px 0 4px; color: var(--text2); font-size: 14px; font-weight: 550; }
.pill-btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 20px; background: rgba(255, 255, 255, .08); border: 1px solid var(--line2); font-size: 14px; font-weight: 600; color: var(--text); }
:root[data-theme="light"] .pill-btn { background: rgba(255, 255, 255, .7); }
.pill-btn svg { width: 17px; height: 17px; }
.icon-btn { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--card2); color: var(--text2); flex: none; }
.icon-btn svg { width: 20px; height: 20px; }

/* Puces de discipline / badges */
.chip-d { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 11px; border-radius: 13px; font-size: 12px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; background: var(--card3); color: var(--text); }
.chip-d.muscu { background: var(--muscu); color: #0b0c1a; } .chip-d.hyrox { background: var(--hyrox); color: #1b1203; } .chip-d.crossfit { background: var(--crossfit); color: #1d0705; }
.badge { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 9px; border-radius: 12px; font-size: 12px; font-weight: 650; background: var(--card3); color: var(--text2); white-space: nowrap; }
.badge svg { width: 13px; height: 13px; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.hot { background: var(--accent); color: var(--accent-ink); }

/* ── Barre du bas ── */
.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; padding: 14px 16px calc(14px + var(--sa-b));
  background: linear-gradient(to top, var(--bg) 60%, transparent); }
.dock .in { max-width: 588px; margin: 0 auto; display: flex; gap: 12px; align-items: center; }
.dock-prog { flex: none; width: 92px; display: flex; flex-direction: column; gap: 3px; }
.dock-prog b { font-family: var(--disp); font-size: 24px; font-weight: 800; line-height: 1; }
.dock-prog span { font-size: 11px; color: var(--text2); text-transform: uppercase; letter-spacing: .06em; }
.bar { height: 4px; background: var(--card3); border-radius: 2px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 2px; transition: width .3s ease; }
:root[data-theme="light"] .bar i { background: var(--ok); }

/* ── Barre d'onglets : accrochée au bas de l'écran, pleine largeur, opaque (rien ne passe dessous) ── */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding-bottom: var(--sa-b);
  background: var(--tab-bg); -webkit-backdrop-filter: saturate(160%) blur(20px); backdrop-filter: saturate(160%) blur(20px); border-top: 1px solid var(--line2); }
.tabbar .in { display: flex; max-width: 520px; margin: 0 auto; padding: 6px 8px 4px; }
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 0 7px; border-radius: 20px; font-size: 10.5px; font-weight: 600; color: var(--text3); transition: color .15s, background .15s; }
.tab svg { width: 23px; height: 23px; }
.tab.on { color: var(--text); background: var(--card3); }
.tab.on svg { color: var(--accent-text); }

/* ── Contrôle segmenté ── */
.seg { display: flex; background: var(--card2); border: 1px solid var(--line); border-radius: 14px; padding: 4px; gap: 4px; }
.seg button { flex: 1; min-height: 40px; border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--text2); text-align: center; font-variant-numeric: tabular-nums; }
.seg button.on { background: var(--text); color: var(--bg); }

/* ── Anneaux ── */
.ring-t { fill: none; stroke: var(--card3); }
.ring-v { fill: none; stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset .5s cubic-bezier(.2, .8, .2, 1); }
:root[data-theme="light"] .ring-v { stroke: var(--ok); }

/* ══════ Accueil ══════ */
.welcome { min-height: 100vh; max-width: 620px; margin: 0 auto; padding: calc(var(--sa-t) + 18px) 20px calc(var(--sa-b) + 20px); display: flex; flex-direction: column;
  background: radial-gradient(120% 60% at 100% 0%, rgba(212, 255, 58, .10), transparent 60%); }
:root[data-theme="light"] .welcome { background: radial-gradient(120% 60% at 100% 0%, rgba(150, 200, 0, .16), transparent 60%); }
.wl-top { display: flex; justify-content: space-between; align-items: center; }
.wl-title { font-family: var(--disp); font-weight: 800; text-transform: uppercase; font-size: 58px; line-height: .9; margin: 36px 0 0; letter-spacing: -.01em; }
.wl-title span { color: var(--accent-text); }
.wl-lead { margin: 16px 0 0; color: var(--text2); font-size: 16px; line-height: 1.5; max-width: 30em; }
.wl-card { margin: 28px 0 0; background: var(--card); border: 1px solid var(--line2); border-radius: 22px; padding: 18px; box-shadow: var(--shadow); transform: rotate(-1.2deg); }
.wl-card-h { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--text2); font-weight: 600; }
.wl-card-t { font-family: var(--disp); font-weight: 800; text-transform: uppercase; font-size: 28px; line-height: 1; margin: 12px 0 14px; }
.wl-lift { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.wl-lift b { display: block; font-size: 16px; }
.wl-lift span { font-size: 13px; color: var(--text2); }
.wl-kg { font-family: var(--disp); font-weight: 800; font-size: 44px; line-height: .9; color: var(--accent-text); }
.wl-kg small { font-size: 18px; margin-left: 3px; color: var(--text2); }
.wl-sets { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.wl-sets div { display: grid; grid-template-columns: 28px 1fr 40px 30px; align-items: center; height: 36px; padding: 0 10px; border-radius: 10px; background: var(--card2); font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.wl-sets div.on { background: var(--ok-soft); }
.wl-sets i { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--card3); color: #fff; justify-self: end; }
.wl-sets .on i { background: var(--ok); }
.wl-sets i svg { width: 14px; height: 14px; }
.wl-disc { display: flex; gap: 8px; flex-wrap: wrap; margin: 26px 0 0; }
.wl-cta { margin-top: auto; padding-top: 28px; display: flex; flex-direction: column; gap: 10px; }

/* Disques par côté */
.plates { display: flex; align-items: center; height: 46px; margin-top: 14px; padding: 0 2px; }
.plates .sleeve { width: 26px; height: 8px; border-radius: 2px; background: linear-gradient(var(--text3), var(--text2)); opacity: .8; }
.plates i { width: 9px; border-radius: 2.5px; margin-right: 2px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .18); }
.plates .collar { width: 7px; height: 16px; border-radius: 2px; background: var(--text2); margin-left: 1px; }
.plates .pl-txt { margin-left: 12px; font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; display: flex; flex-direction: column; line-height: 1.15; }
.plates .pl-txt small { font-size: 11px; font-weight: 500; color: var(--text2); }
.p25 { background: var(--p25); } .p20 { background: var(--p20); } .p15 { background: var(--p15); } .p10 { background: var(--p10); } .p5 { background: var(--p5); } .p2 { background: var(--p2); } .p1 { background: var(--p1); }

/* ══════ Onboarding ══════ */
.onb { min-height: 100vh; }
.onb-top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 14px; padding: calc(var(--sa-t) + 8px) 16px 10px; background: var(--bg); }
.steps { flex: 1; display: flex; gap: 4px; }
.steps i { flex: 1; height: 4px; border-radius: 2px; background: var(--card3); transition: background .2s; }
.steps i.done { background: var(--text2); } .steps i.on { background: var(--accent); }
:root[data-theme="light"] .steps i.on { background: var(--ok); }
.onb-body { padding: 18px 20px 0; }
.onb-k { font-size: 12px; font-weight: 700; letter-spacing: .1em; color: var(--accent-text); font-variant-numeric: tabular-nums; }
.onb-t { font-family: var(--disp); font-weight: 800; text-transform: uppercase; font-size: 46px; line-height: .92; margin: 8px 0 10px; }
.onb-lead { margin: 0 0 22px; color: var(--text2); font-size: 15.5px; line-height: 1.5; }
.opts { display: flex; flex-direction: column; gap: 10px; }
.opt { position: relative; display: flex; align-items: center; gap: 14px; width: 100%; padding: 16px; border-radius: var(--r); background: var(--card); border: 1.5px solid var(--line); transition: border-color .15s, background .15s; }
.opt .opt-ico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--card3); flex: none; }
.opt .opt-ico svg { width: 24px; height: 24px; }
.opt.muscu .opt-ico { background: var(--muscu-g); color: var(--muscu); } .opt.hyrox .opt-ico { background: var(--hyrox-g); color: var(--hyrox); } .opt.crossfit .opt-ico { background: var(--crossfit-g); color: var(--crossfit); }
.opt-txt { flex: 1; min-width: 0; }
.opt-txt b { display: block; font-size: 16.5px; font-weight: 650; }
.opt-txt span { display: block; font-size: 13.5px; color: var(--text2); margin-top: 3px; line-height: 1.35; }
.opt-check { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line2); display: grid; place-items: center; color: transparent; flex: none; transition: all .15s; }
.opt-check svg { width: 15px; height: 15px; }
.opt.on { border-color: var(--accent); background: var(--accent-soft); }
:root[data-theme="light"] .opt.on { border-color: var(--text); background: var(--card); }
.opt.on .opt-check { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.opts.big .opt { padding: 20px 16px; }
.opts.big .opt-txt b { font-family: var(--disp); font-weight: 800; text-transform: uppercase; font-size: 26px; line-height: 1; }
.opts.compact .opt { padding: 13px 16px; }
.blockf { margin-top: 22px; }
.lbl { font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: .08em; color: var(--text2); margin: 0 4px 10px; }
.note { font-size: 13px; color: var(--text3); line-height: 1.45; margin: 10px 4px 0; }
.note.warn { color: var(--hot); }
.okline { display: flex; align-items: center; gap: 8px; margin: 12px 4px 0; font-size: 14px; font-weight: 600; color: var(--ok); }
.okline svg { width: 18px; height: 18px; }
.fields { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.fld { display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 8px 16px; position: relative; cursor: text; }
.fld + .fld::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; height: 1px; background: var(--line); }
.fld-l { flex: 1; font-size: 15.5px; font-weight: 550; min-width: 0; }
.fld-l small { display: block; font-size: 12px; color: var(--text3); font-weight: 500; margin-top: 2px; }
.fld-in { display: flex; align-items: baseline; gap: 6px; }
.fld-in input { width: 112px; text-align: right; border: 0; background: transparent; font-family: var(--disp); font-weight: 700; font-size: 24px; color: var(--text); padding: 4px 0; font-variant-numeric: tabular-nums; }
.fld-in input[type="date"] { width: 160px; font-family: var(--font); font-size: 16px; font-weight: 600; }
.fld-in input::placeholder { color: var(--text3); }
.fld-in input:focus { outline: none; color: var(--accent-text); }
.fld-in em { font-style: normal; font-size: 13px; color: var(--text2); font-weight: 600; }
.bignum-pick { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.bignum-pick button { height: 72px; border-radius: 16px; background: var(--card); border: 1.5px solid var(--line); font-family: var(--disp); font-weight: 800; font-size: 36px; text-align: center; color: var(--text2); }
.bignum-pick button.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.weekpeek { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 12px; }
.weekpeek span { height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 13px; font-weight: 700; background: var(--card); color: var(--text3); border: 1px solid var(--line); }
.weekpeek span.on { background: var(--card3); color: var(--text); border-color: var(--line2); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { height: 44px; padding: 0 18px; border-radius: 22px; background: var(--card); border: 1.5px solid var(--line); font-size: 15px; font-weight: 600; color: var(--text); }
.chip.on { border-color: var(--hot); background: var(--hot-soft); color: var(--hot); }
.recap { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; }
.recap-h { display: flex; gap: 8px; }
.recap-t { font-family: var(--disp); font-weight: 800; text-transform: uppercase; font-size: 32px; line-height: 1; margin: 14px 0 16px; }
.recap-l { font-size: 13.5px; color: var(--text2); margin-top: 14px; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.kpis > div { background: var(--card2); border-radius: 14px; padding: 12px; }
.kpis b { display: block; font-family: var(--disp); font-weight: 800; font-size: 32px; line-height: 1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kpis b small { font-size: 18px; color: var(--text3); }
.kpis span { display: block; font-size: 11.5px; color: var(--text2); margin-top: 4px; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.kpis.big b { font-size: 38px; }
.phasebar { display: flex; gap: 3px; margin-top: 14px; }
.phasebar i { flex: 1; height: 6px; border-radius: 3px; position: relative; }
.phasebar.tall i { height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center; }
.phasebar.tall i b { font-size: 9.5px; font-weight: 700; color: rgba(0, 0, 0, .7); writing-mode: horizontal-tb; overflow: hidden; white-space: nowrap; letter-spacing: -.02em; }
.ph-acc { background: #5b6cff; } .ph-int { background: #a78bfa; } .ph-rea { background: #ff7a45; } .ph-dl { background: var(--card3); } .ph-pk { background: var(--accent); }
:root[data-theme="light"] .ph-pk { background: #9bd400; }
.phasebar.tall .ph-dl b { color: var(--text2); }
.tile .phasebar i { opacity: .35; } .tile .phasebar i.past { opacity: .75; } .tile .phasebar i.now { opacity: 1; box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--text); }

/* ══════ Fabrication ══════ */
.forge { min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: calc(var(--sa-t) + 56px) 24px 40px; text-align: center;
  background: radial-gradient(80% 50% at 50% 20%, rgba(212, 255, 58, .09), transparent 70%); }
.forge-ring { position: relative; width: 168px; height: 168px; }
.forge-ring .ring-v { transition-duration: .7s; }
.forge-pct { position: absolute; inset: 0; display: flex; align-items: baseline; justify-content: center; padding-top: 52px; font-family: var(--disp); font-weight: 800; }
.forge-pct b { font-size: 60px; line-height: 1; font-variant-numeric: tabular-nums; }
.forge-pct span { font-size: 24px; color: var(--text2); margin-left: 2px; }
.forge-t { font-family: var(--disp); font-weight: 800; text-transform: uppercase; font-size: 40px; line-height: .95; margin: 26px 0 26px; }
.forge-steps { list-style: none; margin: 0; padding: 0; width: 100%; max-width: 420px; text-align: left; display: flex; flex-direction: column; gap: 8px; }
.forge-steps li { display: flex; gap: 14px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); opacity: .4; transition: opacity .3s; }
.forge-steps li.run, .forge-steps li.ok { opacity: 1; }
.forge-steps li b { display: block; font-size: 15px; font-weight: 650; }
.forge-steps li small { display: block; font-size: 13px; color: var(--text2); margin-top: 3px; animation: enter .3s ease; }
.fs-i { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line2); flex: none; display: grid; place-items: center; margin-top: -1px; }
.forge-steps li.ok .fs-i { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
:root[data-theme="light"] .forge-steps li.ok .fs-i { background: var(--ok); border-color: var(--ok); color: #fff; }
.fs-i svg { width: 14px; height: 14px; }
.spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line2); border-top-color: var(--accent-text); animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.forge.done { padding-bottom: 130px; }
.forge-badge, .res-badge { position: relative; width: 96px; height: 96px; animation: pop .45s cubic-bezier(.2, 1.4, .4, 1); }
.forge-badge > span, .res-badge > span { position: absolute; inset: 0; display: grid; place-items: center; color: var(--accent-text); }
.forge-badge > span svg { width: 40px; height: 40px; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.forge.done .kpis, .forge.done .phasebar, .forge-week { width: 100%; max-width: 440px; }
.forge-week { margin-top: 22px; text-align: left; }
.fw-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; margin-top: 8px; }
.fw-d { width: 34px; font-size: 12px; font-weight: 700; text-transform: uppercase; color: var(--text2); }
.fw-t { flex: 1; font-weight: 600; font-size: 15px; }
.fw-m { font-size: 13px; color: var(--text2); font-variant-numeric: tabular-nums; }

/* ══════ Aujourd'hui ══════ */
.hero { position: relative; overflow: hidden; border-radius: 24px; padding: 20px 18px 18px; background: var(--card); border: 1px solid var(--line2); }
.hero::before, .s-hero::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 1; }
.hero.muscu::before, .s-hero.muscu::before { background: radial-gradient(120% 80% at 100% 0%, var(--muscu-g), transparent 65%); }
.hero.hyrox::before, .s-hero.hyrox::before { background: radial-gradient(120% 80% at 100% 0%, var(--hyrox-g), transparent 65%); }
.hero.crossfit::before, .s-hero.crossfit::before { background: radial-gradient(120% 80% at 100% 0%, var(--crossfit-g), transparent 65%); }
.hero > *, .s-hero > * { position: relative; }
.hero-h { display: flex; align-items: center; gap: 10px; }
.hero-k { font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: .07em; color: var(--text2); flex: 1; }
.hero-t { font-family: var(--disp); font-weight: 800; text-transform: uppercase; font-size: 40px; line-height: .93; margin: 16px 0 16px; }
.hero-meta { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 12px 0; }
.s-hero .hero-meta { grid-template-columns: repeat(3, 1fr); }
.hero-meta div + div { border-left: 1px solid var(--line); padding-left: 12px; }
.hero-meta b { display: block; font-family: var(--disp); font-weight: 800; font-size: 28px; line-height: 1; font-variant-numeric: tabular-nums; }
.hero-meta span { display: block; font-size: 11px; color: var(--text2); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; margin-top: 4px; }
.hero-list { list-style: none; margin: 8px 0 16px; padding: 0; }
.hero-list li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; font-size: 15px; border-bottom: 1px solid var(--line); }
.hero-list li:last-child { border-bottom: 0; }
.hero-list li span:first-child { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hero-list li span:last-child { color: var(--text2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.hero-list li.more span:first-child { color: var(--text3); font-weight: 500; }
.card.soon { padding: 22px 18px 18px; background: linear-gradient(160deg, var(--card2), var(--card)); }
.soon-k, .rest-k { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--accent-text); }
.soon-t { font-family: var(--disp); font-weight: 800; text-transform: uppercase; font-size: 36px; line-height: .95; margin: 10px 0 10px; }
.card.soon p, .card.rest p { color: var(--text2); font-size: 15px; line-height: 1.5; margin: 0 0 18px; }
.card.rest p { margin: 8px 0 0; }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 6px 10px; }
.wd { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 2px 0; text-align: center; }
.wd .l { font-size: 11px; color: var(--text3); font-weight: 700; }
.wd .r { position: relative; width: 40px; height: 40px; display: grid; place-items: center; }
.wd .r .ring { position: absolute; inset: 0; }
.wd .r b { position: relative; font-size: 15px; font-weight: 650; font-variant-numeric: tabular-nums; color: var(--text2); }
.wd.rest .r b { color: var(--text3); font-weight: 500; }
.wd.upcoming .r b, .wd.today .r b, .wd.missed .r b { color: var(--text); }
.wd.done .r b { color: var(--accent-text); }
.wd.today .r::after { content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 2px solid var(--text); }
.wd.missed .ring-t { stroke: var(--hot-soft); }
.wd > i { width: 6px; height: 6px; border-radius: 50%; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tiles.three { grid-template-columns: 1fr 1.2fr 1fr; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; min-width: 0; }
.tile.hot { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.tile.hot .tile-k, .tile.hot .tile-s { color: inherit; opacity: .7; }
.tile-k { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--text2); }
.tile-v { font-family: var(--disp); font-weight: 800; font-size: 40px; line-height: 1; margin-top: 8px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tile-v.sm { font-size: 30px; margin-top: 6px; }
.tile-v small { font-size: 20px; color: var(--text3); }
.tile-s { font-size: 12.5px; color: var(--text2); margin-top: 8px; }
.tile .phasebar { margin-top: 10px; } .tile .bar { margin-top: 12px; }
.ringtile { display: flex; align-items: center; gap: 10px; }
.phase-txt { margin: 12px 4px 0; font-size: 14px; color: var(--text2); line-height: 1.5; }
.srow { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px; margin-top: 8px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); text-align: left; position: relative; overflow: hidden; }
.srow::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0; background: var(--text3); }
.srow.muscu::before { background: var(--muscu); } .srow.hyrox::before { background: var(--hyrox); } .srow.crossfit::before { background: var(--crossfit); }
.srow:first-child { margin-top: 0; }
.srow-d { width: 42px; text-align: center; flex: none; }
.srow-d small { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--text2); }
.srow-d b { display: block; font-family: var(--disp); font-weight: 800; font-size: 28px; line-height: 1; margin-top: 2px; }
.srow-m { flex: 1; min-width: 0; }
.srow-m b { display: block; font-size: 16px; font-weight: 650; }
.srow-m span { display: block; font-size: 13px; color: var(--text2); margin-top: 3px; }
.srow-s { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.srow-s.ok { background: var(--ok); color: #04130a; }
.srow-s svg { width: 16px; height: 16px; }
.srow .chev { width: 18px; height: 18px; color: var(--text3); }
.srow.done { opacity: .78; } .srow.before { opacity: .5; }
.banner { margin: 14px 16px 0; padding: 12px 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line2); display: flex; align-items: center; gap: 10px; font-size: 14px; }
.banner .main { flex: 1; font-weight: 550; }
.banner button { color: var(--accent-text); font-weight: 700; white-space: nowrap; }
.b-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
:root[data-theme="light"] .b-dot { background: var(--ok); }
.b-dot.warn { background: var(--hot); }

/* ══════ Programme ══════ */
.goalcard { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-radius: var(--r); background: var(--card); border: 1px solid var(--line); }
.goal-t { font-family: var(--disp); font-weight: 800; text-transform: uppercase; font-size: 26px; line-height: 1; margin-top: 6px; }
.goal-ev { text-align: right; flex: none; }
.goal-ev b { display: block; font-family: var(--disp); font-weight: 800; font-size: 36px; line-height: 1; color: var(--accent-text); }
.goal-ev span { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--text2); }
.weeks { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 4px; scrollbar-width: none; }
.weeks::-webkit-scrollbar { display: none; }
.wk { flex: none; width: 70px; padding: 10px 8px 9px; border-radius: 14px; background: var(--card); border: 1.5px solid var(--line); display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; }
.wk-n { font-family: var(--disp); font-weight: 800; font-size: 22px; line-height: 1; }
.wk i { width: 26px; height: 4px; border-radius: 2px; }
.wk-p { font-size: 10.5px; font-weight: 650; color: var(--text2); white-space: nowrap; }
.wk-c { position: absolute; top: 6px; right: 7px; font-size: 9.5px; font-weight: 700; color: var(--ok); }
.wk.on { border-color: var(--text); background: var(--card2); }
.wk.now .wk-n::after { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-left: 3px; vertical-align: top; }
.phasecard { position: relative; overflow: hidden; border-radius: var(--r); padding: 16px 18px; background: var(--card); border: 1px solid var(--line); }
.phasecard::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: inherit; }
.phasecard.ph-acc::before { background: #5b6cff; } .phasecard.ph-int::before { background: #a78bfa; } .phasecard.ph-rea::before { background: #ff7a45; } .phasecard.ph-dl::before { background: var(--text3); } .phasecard.ph-pk::before { background: var(--accent); }
.phasecard.ph-acc, .phasecard.ph-int, .phasecard.ph-rea, .phasecard.ph-dl, .phasecard.ph-pk { background: var(--card); }
.pc-k { font-size: 12px; font-weight: 650; color: var(--text2); text-transform: uppercase; letter-spacing: .06em; }
.pc-t { font-family: var(--disp); font-weight: 800; text-transform: uppercase; font-size: 30px; line-height: 1; margin: 6px 0 8px; }
.phasecard p { margin: 0; font-size: 14px; color: var(--text2); line-height: 1.5; }

/* ══════ Séance ══════ */
.s-hero { position: relative; overflow: hidden; margin: -52px 0 0; padding: calc(var(--sa-t) + 66px) 20px 20px; border-bottom: 1px solid var(--line); background: var(--bg2); }
.s-title { font-family: var(--disp); font-weight: 800; text-transform: uppercase; font-size: 46px; line-height: .92; margin: 14px 0 6px; }
.s-date { font-size: 14px; color: var(--text2); font-weight: 550; margin-bottom: 16px; }
.s-why { font-size: 14.5px; line-height: 1.5; color: var(--text2); margin: 14px 0 0; }
.s-tools { display: flex; gap: 8px; margin-top: 16px; }
.notice { margin: 12px 16px 0; padding: 12px 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line2); font-size: 14px; display: flex; gap: 12px; align-items: center; line-height: 1.4; }
.notice > span { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--card3); flex: none; }
.notice > span svg { width: 15px; height: 15px; }
.notice.ok > span { background: var(--ok); color: #04130a; }
.notice .main { flex: 1; }
.notice button { color: var(--accent-text); font-weight: 700; white-space: nowrap; }
.blk { margin-top: 26px; padding: 0 16px; }
.blk-h { margin: 0 4px 10px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text2); }
.ex { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 16px; transition: border-color .2s; }
.ex + .ex { margin-top: 10px; }
.ex.done { border-color: rgba(61, 220, 132, .35); }
.ex-top { display: flex; align-items: flex-start; gap: 12px; }
.ex-lbl { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--card3); font-family: var(--disp); font-weight: 800; font-size: 16px; flex: none; margin-top: 1px; }
.ex.done .ex-lbl { background: var(--ok); color: #04130a; }
.ex-main { flex: 1; min-width: 0; }
.ex-name { margin: 0; font-size: 17.5px; font-weight: 700; line-height: 1.25; letter-spacing: -.015em; }
.ex-presc { display: flex; align-items: baseline; gap: 14px; margin-top: 6px; flex-wrap: wrap; }
.ex-presc .big { font-family: var(--disp); font-weight: 800; font-size: 30px; line-height: 1; font-variant-numeric: tabular-nums; }
.ex-presc .big small { font-size: 15px; color: var(--text2); margin-left: 2px; font-weight: 700; }
.ex-presc .kgv { color: var(--accent-text); }
.ex-presc .fmt { font-family: var(--disp); font-weight: 700; font-size: 22px; line-height: 1.05; text-transform: uppercase; }
.ex-sub { margin-top: 6px; font-size: 13px; color: var(--text2); line-height: 1.4; }
.ex-note { margin-top: 10px; font-size: 13.5px; color: var(--text2); line-height: 1.45; }
.ramp { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 14px; }
.ramp-k { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--text3); margin-right: 2px; }
.ramp-s { padding: 4px 9px; border-radius: 8px; background: var(--card2); font-size: 13px; color: var(--text2); font-variant-numeric: tabular-nums; }
.ramp-s b { color: var(--text); }
.hint { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: var(--card2); font-size: 13.5px; line-height: 1.4; color: var(--text2); }
.hint svg { width: 18px; height: 18px; color: var(--text); flex: none; }
.hint b { color: var(--text); }
.hint.up { background: var(--accent-soft); } .hint.up svg { color: var(--accent-text); }
.hint.hot { background: var(--hot-soft); display: block; }
.sets { margin-top: 14px; }
.sets-h, .set { display: grid; grid-template-columns: 38px 1fr 1fr 1fr 44px; gap: 8px; align-items: center; }
.sets-h { font-size: 10.5px; color: var(--text3); padding: 0 0 6px; text-transform: uppercase; letter-spacing: .07em; font-weight: 700; }
.sets-h span:nth-child(n+3) { text-align: center; }
.set { padding: 4px 0; border-radius: 12px; transition: background .2s; }
.set + .set { margin-top: 4px; }
.set.on { background: var(--ok-soft); }
.set-n { width: 30px; height: 30px; margin-left: 4px; border-radius: 9px; display: grid; place-items: center; font-family: var(--disp); font-weight: 800; font-size: 17px; background: var(--card2); }
.set.on .set-n { background: transparent; color: var(--ok); }
.set-p { font-size: 13px; color: var(--text3); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cell { width: 100%; height: 44px; border: 0; border-radius: 11px; background: var(--card2); text-align: center; font-family: var(--disp); font-weight: 700; font-size: 22px; color: var(--text); font-variant-numeric: tabular-nums; -webkit-appearance: none; appearance: none; padding: 0 4px; }
.cell::placeholder { color: var(--text3); }
.cell:focus { outline: 2px solid var(--accent); outline-offset: -2px; }
.cell.off { display: grid; place-items: center; color: var(--text3); font-size: 16px; }
.cell.wide { flex: 1; font-size: 20px; }
.set.on .cell { background: transparent; }
.tick { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--card3); color: var(--text3); transition: background .15s, transform .12s; }
.tick:active { transform: scale(.92); }
.tick svg { width: 22px; height: 22px; }
.tick.on { background: var(--ok); color: #04130a; }
.lines { margin: 12px 0 0; padding: 0; list-style: none; }
.lines li { position: relative; padding: 9px 0 9px 18px; border-top: 1px solid var(--line); font-size: 15px; line-height: 1.4; }
.lines li::before { content: ""; position: absolute; left: 2px; top: 17px; width: 6px; height: 6px; border-radius: 50%; background: var(--text3); }
.lines li:first-child { border-top: 0; }
.tgt { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 7px; background: var(--accent-soft); color: var(--accent-text); font-size: 12px; font-weight: 700; white-space: nowrap; vertical-align: 1px; }
.ex.warm .lines li { font-size: 14px; color: var(--text2); }
.cond-foot { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.cond-l { flex: 1; font-size: 14px; color: var(--text2); font-weight: 550; }

/* ══════ Résultat ══════ */
.result { padding: calc(var(--sa-t) + 40px) 0 0; text-align: left; background: radial-gradient(80% 40% at 50% 0%, rgba(61, 220, 132, .12), transparent 70%); }
.res-badge { width: 112px; height: 112px; margin: 0 20px; }
.res-badge > span svg { width: 46px; height: 46px; }
.res-k { margin: 22px 20px 0; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text2); }
.res-t { font-family: var(--disp); font-weight: 800; text-transform: uppercase; font-size: 60px; line-height: .9; margin: 8px 20px 22px; }
.result > .kpis { margin: 0 16px; }
.prcard { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 16px; background: var(--card); border: 1px solid var(--line2); margin-top: 8px; }
.prcard:first-of-type { margin-top: 0; }
.pr-i { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); flex: none; }
.pr-i svg { width: 22px; height: 22px; }
.prcard .main { flex: 1; min-width: 0; }
.prcard b { display: block; font-size: 15.5px; }
.prcard .main span { display: block; font-size: 13px; color: var(--text2); margin-top: 2px; }
.pr-v { font-family: var(--disp); font-weight: 800; font-size: 22px; white-space: nowrap; color: var(--accent-text); }

/* ══════ Progrès ══════ */
.hxcard { position: relative; overflow: hidden; border-radius: 22px; padding: 20px 18px 18px; background: var(--card); border: 1px solid var(--line2); }
.hxcard::before { content: ""; position: absolute; inset: 0; background: radial-gradient(110% 80% at 100% 0%, var(--hyrox-g), transparent 65%); pointer-events: none; }
.hxcard > * { position: relative; }
.hx-k { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--hyrox); }
.hx-v { font-family: var(--disp); font-weight: 800; font-size: 72px; line-height: .95; margin-top: 6px; font-variant-numeric: tabular-nums; }
.hx-s { font-size: 13.5px; color: var(--text2); margin-top: 4px; }
.hx-bar { display: flex; height: 12px; border-radius: 6px; overflow: hidden; margin-top: 18px; gap: 2px; }
.hx-bar i, .hx-leg i { display: block; height: 100%; }
.hx-bar .run, .hx-leg .run { background: var(--hyrox); } .hx-bar .st, .hx-leg .st { background: var(--text); } .hx-bar .rox, .hx-leg .rox { background: var(--text3); }
.hx-leg { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; font-size: 12.5px; color: var(--text2); font-variant-numeric: tabular-nums; }
.hx-leg span { display: inline-flex; align-items: center; gap: 6px; }
.hx-leg i { width: 8px; height: 8px; border-radius: 2px; }
.hxgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.hxs { display: flex; flex-direction: column; gap: 3px; padding: 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); text-align: left; min-width: 0; }
.hxs-n { font-size: 12px; font-weight: 650; color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hxs-v { font-family: var(--disp); font-weight: 800; font-size: 26px; line-height: 1.05; font-variant-numeric: tabular-nums; }
.hxs-r { font-size: 11px; color: var(--text3); display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.lv { display: inline-flex; gap: 2px; }
.lv i { width: 5px; height: 9px; border-radius: 1.5px; background: var(--card3); }
.lv.l0 i:nth-child(-n+1), .lv.l1 i:nth-child(-n+2), .lv.l2 i:nth-child(-n+3), .lv.l3 i { background: var(--accent-text); }
.maxgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.maxc { display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); text-align: left; min-width: 0; }
.maxc-n { font-size: 13px; font-weight: 600; color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.maxc-v { font-family: var(--disp); font-weight: 800; font-size: 38px; line-height: 1; font-variant-numeric: tabular-nums; }
.maxc-v small { font-size: 16px; color: var(--text2); margin-left: 3px; }
.maxc-s { align-self: flex-start; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 2px 7px; border-radius: 6px; background: var(--card3); color: var(--text2); }
.maxc-s.ajusté { background: var(--accent-soft); color: var(--accent-text); } .maxc-s.saisi { background: var(--ok-soft); color: var(--ok); }
.chart { padding: 16px 12px 12px; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 150px; }
.bcol { flex: 1; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 5px; min-width: 0; }
.bcol i { width: 100%; max-width: 30px; border-radius: 7px 7px 3px 3px; background: var(--card3); }
.bcol.now i { background: var(--accent); }
:root[data-theme="light"] .bcol.now i { background: var(--ok); }
.bcol i[style*="height:2%"] { background: var(--line2); }
.bv { font-size: 10px; font-weight: 700; color: var(--text2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.bl { font-size: 11px; font-weight: 650; color: var(--text3); }
.weightcard { display: block; width: 100%; text-align: left; }
.wc-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wc-v { font-family: var(--disp); font-weight: 800; font-size: 44px; line-height: 1; font-variant-numeric: tabular-nums; }
.wc-v small { font-size: 18px; color: var(--text2); margin-left: 3px; }
.spark { display: block; width: 100%; height: 70px; margin-top: 12px; }

/* ══════ Profil ══════ */
.prof-h { padding: calc(var(--sa-t) + 30px) 20px 0; display: flex; flex-direction: column; align-items: center; text-align: center; }
.prof-h h1 { font-size: 44px; margin: 14px 0 10px; }
.prof-chips { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-bottom: 18px; }
.prof-h .kpis { width: 100%; }
.procard { position: relative; overflow: hidden; border-radius: 22px; padding: 20px 18px; background: linear-gradient(135deg, #1b1f0a, #0d0f05); border: 1px solid rgba(212, 255, 58, .25); color: #f4f4f2; }
:root[data-theme="light"] .procard { background: linear-gradient(135deg, #0c0c0d, #23240f); }
.pro-t { font-family: var(--disp); font-weight: 800; text-transform: uppercase; font-size: 32px; line-height: 1; margin: 12px 0 6px; }
.pro-t::after { content: " ✦"; color: #d4ff3a; }
.procard p { margin: 0; font-size: 14px; color: rgba(244, 244, 242, .7); line-height: 1.5; }
.procard .badge.hot { background: #d4ff3a; color: #0a0a0b; }
.code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 16px; letter-spacing: .03em; word-break: break-all; }

/* ══════ Formulaires des feuilles ══════ */
.input-row { display: flex; align-items: center; gap: 10px; min-height: 54px; padding: 6px 16px; position: relative; }
.input-row label { flex: 1; font-size: 15.5px; font-weight: 550; }
.input-row input, .input-row select { width: 44%; max-width: 190px; text-align: right; border: 0; background: transparent; font-family: var(--disp); font-weight: 700; font-size: 22px; padding: 6px 0; color: var(--text); font-variant-numeric: tabular-nums; }
.input-row input:focus { outline: none; color: var(--accent-text); }
.input-row input::placeholder { color: var(--text3); font-size: 17px; font-family: var(--font); font-weight: 500; }
.input-row .u { color: var(--text2); font-size: 13px; font-weight: 600; min-width: 18px; }
textarea.note-in, textarea.note { display: block; width: 100%; min-height: 96px; border: 1px solid var(--line); border-radius: var(--r); padding: 14px; background: var(--card); font-size: 15px; resize: vertical; color: var(--text); margin: 0; }
textarea.note::placeholder { color: var(--text3); }

/* ── Feuilles (bottom sheets) ── */
.backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .55); opacity: 0; transition: opacity .22s ease; }
.backdrop.in { opacity: 1; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 61; max-height: 92vh; overflow-y: auto; background: var(--bg2); border: 1px solid var(--line2); border-bottom: 0; border-radius: 26px 26px 0 0;
  padding: 10px 0 calc(22px + var(--sa-b)); transform: translateY(100%); transition: transform .3s cubic-bezier(.2, .8, .2, 1); max-width: 620px; margin: 0 auto; overscroll-behavior: contain; }
.sheet.in { transform: none; }
.sheet .grab { width: 40px; height: 5px; border-radius: 3px; background: var(--line2); margin: 0 auto 8px; }
.sh-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 16px 10px 20px; }
.sh-h h3 { margin: 0; font-family: var(--disp); font-weight: 800; text-transform: uppercase; font-size: 30px; line-height: 1; }
.sh-h button { color: var(--text2); font-size: 15px; min-height: 40px; padding: 0 12px; font-weight: 600; border-radius: 20px; background: var(--card2); }
.sh-p { padding: 0 20px; margin: 0 0 14px; color: var(--text2); font-size: 14.5px; line-height: 1.5; }
.sh-p.tiny { font-size: 12.5px; color: var(--text3); margin-top: 10px; }
.sheet .group, .sheet .card, .sheet .chips, .sheet .empty, .sheet textarea.note { margin-left: 16px; margin-right: 16px; width: auto; }
.sheet .seg-wrap { padding: 0 16px; }
.sheet .sec { padding: 0; margin-top: 22px; }
.sheet .sec:first-of-type { margin-top: 6px; }
.sheet .sec-h { padding: 0 20px 10px; }
.sheet .sec-f { padding: 10px 20px 0; }
.sheet .foot { padding: 20px 16px 0; }
.sheet .pad { padding: 0 16px; }
.sheet .chip.on { border-color: var(--hot); }
.refs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 0 16px; }
.refs div { padding: 10px 12px; border-radius: 14px; background: var(--card); border: 1.5px solid var(--line); }
.refs span { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text2); }
.refs b { display: block; font-family: var(--disp); font-weight: 800; font-size: 24px; margin-top: 2px; font-variant-numeric: tabular-nums; }
.refs .on { border-color: var(--accent); background: var(--accent-soft); }

/* ── Toast ── */
.toast { position: fixed; left: 50%; bottom: calc(104px + var(--sa-b)); transform: translateX(-50%); z-index: 90; width: max-content; max-width: calc(100% - 32px);
  padding: 12px 18px; border-radius: 14px; background: var(--text); color: var(--bg); font-size: 14.5px; font-weight: 600; box-shadow: var(--shadow); animation: enter .2s ease; }

@media (min-width: 640px) {
  .wl-title { font-size: 72px; }
}
@media (max-width: 360px) {
  .top h1, .onb-t { font-size: 38px; } .hero-t, .s-title { font-size: 36px; } .wl-title { font-size: 48px; }
  .sets-h, .set { grid-template-columns: 34px .8fr 1fr 1fr 42px; gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
.stack > * + * { margin-top: 10px; }
.seg-wrap { padding: 0; }
.rt { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.rt .tile-v { margin-top: 0; }
.tiles.three { grid-template-columns: repeat(3, 1fr); }
.phasebar.tall i { min-width: 0; font-family: var(--disp); font-weight: 800; font-size: 15px; color: rgba(0, 0, 0, .65); font-style: normal; }
.phasebar.tall i.ph-dl { color: var(--text2); }
.phase-leg { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; margin-top: 12px; font-size: 12.5px; color: var(--text2); max-width: 440px; }
.phase-leg span { display: inline-flex; align-items: center; gap: 6px; }
.phase-leg i { width: 10px; height: 10px; border-radius: 3px; }
.privacy { padding: 0 20px; font-size: 14.5px; line-height: 1.55; color: var(--text2); }
.privacy h2 { font-size: 16px; color: var(--text); margin: 20px 0 6px; }
.privacy a { color: var(--accent-text); }

/* ── Compte : boutons de connexion (chartes Apple et Google) ── */
.btn.auth { gap: 12px; font-weight: 650; }
.btn.auth svg { width: 20px; height: 20px; flex: none; }
.btn.apple { background: #fff; color: #000; }
:root[data-theme="light"] .btn.apple { background: #000; color: #fff; }
.btn.google { background: #fff; color: #1f1f1f; border: 1px solid #dadce0; }

/* ── Coach ── */
.chat { display: flex; flex-direction: column; gap: 10px; padding: 18px 16px 0; }
.msg { max-width: 86%; padding: 11px 14px; border-radius: 18px; font-size: 15.5px; line-height: 1.45; overflow-wrap: anywhere; }
.msg.ai { align-self: flex-start; background: var(--card); border: 1px solid var(--line); border-bottom-left-radius: 6px; color: var(--text); }
.msg.me { align-self: flex-end; background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 6px; font-weight: 500; }
.msg.err { border-color: var(--hot); color: var(--text2); }
.msg b { font-weight: 700; }
.typing { display: inline-flex; gap: 4px; padding: 4px 0; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--text3); animation: blink 1s infinite ease-in-out; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.chips.ideas { padding: 14px 16px 0; }
.composer { display: flex; align-items: flex-end; gap: 10px; margin: 16px 16px 0; padding: 6px 6px 6px 14px; border-radius: 24px; background: var(--card); border: 1px solid var(--line2); }
.composer textarea { flex: 1; min-height: 36px; max-height: 140px; padding: 8px 0; border: 0; background: none; color: var(--text); font: inherit; font-size: 16px; line-height: 1.35; resize: none; outline: none; }
.composer .send { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); flex: none; }
.composer .send:disabled { opacity: .4; }
.composer .send svg { width: 20px; height: 20px; transform: rotate(-90deg); }
.dlbar { height: 8px; border-radius: 4px; background: var(--card3); overflow: hidden; margin-top: 4px; }
.dlbar i { display: block; height: 100%; background: var(--accent); border-radius: 4px; transition: width .3s ease; }
.composer .send.stop { background: var(--card3); color: var(--text); }
.composer .send.stop svg { transform: none; width: 16px; height: 16px; }
