/* V-Taper — deux thèmes (sombre : salle, noir chaud et or ; clair : papier chaud, bronze). Une colonne mobile, en-tête sombre collant, onglets en bas, feuille d'exercice qui monte. */
@font-face { font-family: 'Big Shoulders Display'; font-style: normal; font-weight: 700 900; font-display: swap; src: url(/fonts/bsd-0.woff2) format('woff2'); }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 400 800; font-display: swap; src: url(/fonts/manrope-0.woff2) format('woff2'); }

:root {
  color-scheme: dark;
  --bg: #0b0a08;
  --bg-a: rgba(11, 10, 8, 0.94);
  --bg-2: #110f0c;
  --card: #17140f;
  --card-2: #211d16;
  --line: #2d2820;
  --line-2: #413a2e;
  --ink: #f6f1e8;
  --ink-2: #d9d0c0;
  --muted: #a89e8c;
  --faint: #746c5f;
  --accent: #dcb673;        /* or : repères et textes courts, 9:1 sur le fond */
  --gold: #d8b26e;          /* fond des boutons */
  --gold-hi: #f0d49b;
  --gold-lo: #8e6f3b;
  --gold-ink: #1a1206;
  --gold-soft: rgba(216, 178, 110, 0.13);
  --up: #8fd198;
  --up-soft: rgba(134, 201, 143, 0.14);
  --hold: #b4c6da;
  --hold-soft: rgba(167, 186, 208, 0.13);
  --down: #f0a088;
  --down-soft: rgba(232, 149, 122, 0.14);
  --dark-ink: #f6f1e8;      /* texte posé sur une image sombre, quel que soit le thème */
  --dark-ink-2: #d9d0c0;
  --p10: #3e9e68; --p15: #e2b93b; --p20: #4a7ddb; --p25: #d24b4b; --p5: #e8e2d6;
  --shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.8);
  --f-display: 'Big Shoulders Display', 'Arial Narrow', 'Helvetica Neue', Impact, sans-serif;
  --f-ui: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --tab-h: 62px;
}
:root[data-theme='light'] {
  color-scheme: light;
  --bg: #f5f2ec; --bg-a: rgba(245, 242, 236, 0.94); --bg-2: #ede8df;
  --card: #ffffff; --card-2: #f1ece2; --line: #e2dbcd; --line-2: #cbc2b0;
  --ink: #17130d; --ink-2: #3b342a; --muted: #665c4e; --faint: #978c7c;
  --accent: #80601e; --gold: #d2a95a; --gold-hi: #e8c97c; --gold-lo: #b08a45; --gold-ink: #1a1206; --gold-soft: rgba(184, 138, 58, 0.14);
  --up: #1f7a3d; --up-soft: rgba(31, 122, 61, 0.12); --hold: #395a85; --hold-soft: rgba(57, 90, 133, 0.12); --down: #ad4525; --down-soft: rgba(173, 69, 37, 0.12);
  --p20: #3f70cf; --p5: #cfc6b3;
  --shadow: 0 18px 40px -14px rgba(60, 45, 20, 0.35);
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme='dark']) {
    color-scheme: light;
    --bg: #f5f2ec; --bg-a: rgba(245, 242, 236, 0.94); --bg-2: #ede8df;
    --card: #ffffff; --card-2: #f1ece2; --line: #e2dbcd; --line-2: #cbc2b0;
    --ink: #17130d; --ink-2: #3b342a; --muted: #665c4e; --faint: #978c7c;
    --accent: #80601e; --gold: #d2a95a; --gold-hi: #e8c97c; --gold-lo: #b08a45; --gold-ink: #1a1206; --gold-soft: rgba(184, 138, 58, 0.14);
    --up: #1f7a3d; --up-soft: rgba(31, 122, 61, 0.12); --hold: #395a85; --hold-soft: rgba(57, 90, 133, 0.12); --down: #ad4525; --down-soft: rgba(173, 69, 37, 0.12);
    --p20: #3f70cf; --p5: #cfc6b3;
    --shadow: 0 18px 40px -14px rgba(60, 45, 20, 0.35);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--f-ui); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; overscroll-behavior-y: none; }
body.sheet-open { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 10px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
b, strong { font-weight: 750; }
small { font-size: 0.8em; }

.boot { min-height: 100vh; display: grid; place-items: center; }
.view { max-width: 560px; margin: 0 auto; padding: 0 16px calc(var(--tab-h) + var(--safe-b) + 108px); }

/* ---------- typo ---------- */
.eyebrow { margin: 0 0 6px; font-size: 11px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); }
.h-display { margin: 0; font-family: var(--f-display); font-weight: 800; font-size: 34px; line-height: 0.95; letter-spacing: 0.01em; text-transform: uppercase; text-wrap: balance; }
.h-display.xl { font-size: 52px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.big-num { margin: 4px 0 8px; font-family: var(--f-display); font-weight: 800; font-size: 40px; line-height: 1; font-variant-numeric: tabular-nums; }
.big-num small { font-family: var(--f-ui); font-size: 14px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.wordmark { font-family: var(--f-display); font-weight: 900; font-size: 22px; letter-spacing: 0.14em; background: linear-gradient(180deg, #f0d49b, #d8b26e 55%, #a7843f); -webkit-background-clip: text; background-clip: text; color: transparent; }
.wordmark span { padding: 0 0.08em; opacity: 0.7; }
.wordmark.big { font-size: 46px; }
.foot-note { margin: 16px 2px 0; font-size: 13px; color: var(--muted); }
.note { margin: 12px 0; padding: 12px 14px; border-radius: 14px; background: var(--gold-soft); color: var(--ink); font-size: 14px; }
.label { display: block; margin: 18px 0 8px; font-size: 13px; font-weight: 700; color: var(--ink-2); }

/* ---------- barre du haut : toujours sombre, l'heure de l'iPhone reste lisible ---------- */
.topbar { position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; margin: 0 -16px; padding: calc(var(--safe-t) + 8px) 16px 8px; background: rgba(11, 10, 8, 0.93); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); color: var(--dark-ink); }
.topbar-title { margin: 0; font-family: var(--f-display); font-weight: 800; font-size: 22px; letter-spacing: 0.06em; text-transform: uppercase; text-align: center; color: var(--dark-ink); }
.icon-btn { position: relative; display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; color: var(--ink-2); background: var(--card); border: 1px solid var(--line); }
.topbar .icon-btn { color: var(--dark-ink-2); background: #17140f; border-color: #2d2820; }
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn.sm { width: 38px; height: 38px; }
.sync-dot { position: absolute; top: 7px; right: 7px; width: 7px; height: 7px; border-radius: 50%; background: #746c5f; }
.sync-dot.inline { position: static; display: inline-block; vertical-align: middle; }
.sync-dot[data-etat='ok'] { background: #8fd198; }
.sync-dot[data-etat='encours'] { background: #dcb673; }
.sync-dot[data-etat='erreur'], .sync-dot[data-etat='deconnecte'] { background: #f0a088; }

/* ---------- cartes, boutons ---------- */
.card { margin-top: 12px; padding: 16px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); }
.card > :last-child { margin-bottom: 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 50px; margin-top: 12px; padding: 0 20px; border-radius: 15px; font-weight: 800; font-size: 16px; letter-spacing: 0.01em; color: var(--gold-ink); background: linear-gradient(180deg, var(--gold-hi), var(--gold)); box-shadow: 0 6px 22px -10px rgba(216, 178, 110, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.35); }
.btn svg { width: 18px; height: 18px; }
.btn:active { transform: translateY(1px); }
.btn-ghost { color: var(--ink); background: transparent; border: 1px solid var(--line-2); box-shadow: none; }
.btn.wide { width: 100%; }
.btn-link { margin: 10px 0 0; font-size: 14px; font-weight: 700; color: var(--accent); }
.tag { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; color: var(--ink-2); background: var(--card-2); border: 1px solid var(--line); }
.tag-light { color: #1a1206; background: #e8e2d6; border-color: #e8e2d6; }
.bar { height: 6px; margin-top: 12px; border-radius: 9px; background: var(--card-2); border: 1px solid var(--line); overflow: hidden; }
.bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--gold-lo), var(--gold-hi)); transition: width 0.4s ease; }
.bar.big { height: 9px; }
.bar-lab { margin: 6px 2px 0; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- accueil ---------- */
.hero { position: relative; margin: 6px 0 0; border-radius: 26px; overflow: hidden; background: #17140f; aspect-ratio: 4 / 3.3; color: var(--dark-ink); }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 22%; }
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11, 10, 8, 0) 30%, rgba(11, 10, 8, 0.55) 62%, rgba(11, 10, 8, 0.95)); }
.hero-in { position: absolute; left: 20px; right: 20px; bottom: 18px; z-index: 1; }
.hero .eyebrow { color: #dcb673; }
.hero-count { margin: 0; font-family: var(--f-display); font-weight: 900; font-size: 92px; line-height: 0.86; letter-spacing: 0.01em; font-variant-numeric: tabular-nums; }
.hero-count span { background: linear-gradient(180deg, #fff3d6, #d8b26e 60%, #a7843f); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { margin: 6px 0 0; font-weight: 700; color: var(--dark-ink-2); }
.today .h-display { margin-top: 2px; }
.today .muted { margin: 6px 0 0; }
.today .btn { width: 100%; }
.checklist { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 10px; }
.checklist li { display: flex; align-items: center; gap: 12px; font-size: 15px; }
.check { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 10px; border: 1.5px solid var(--line-2); color: transparent; }
.check svg { width: 18px; height: 18px; }
.check.on { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }
.update { width: 100%; text-align: left; color: var(--ink); border-color: var(--gold-lo); }
.install p:last-child { margin: 0; color: var(--ink-2); }

.week-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 12px; }
.day { position: relative; display: grid; justify-items: center; gap: 2px; padding: 9px 0 10px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); color: var(--ink-2); }
.day-l { font-size: 11px; font-weight: 800; color: var(--muted); }
.day-s { font-family: var(--f-display); font-weight: 800; font-size: 14px; letter-spacing: 0.02em; text-transform: uppercase; white-space: nowrap; }
.day i { position: absolute; top: -6px; right: -4px; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--gold); color: var(--gold-ink); }
.day i svg { width: 11px; height: 11px; }
.day.done { border-color: var(--gold-lo); background: var(--gold-soft); }
.day.miss .day-s { color: var(--down); }
.day.now { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }

.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.tile { display: grid; align-content: start; gap: 2px; padding: 14px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); color: var(--ink); min-width: 0; }
.tile-lab { font-size: 12px; font-weight: 700; color: var(--muted); }
.tile-num { font-family: var(--f-display); font-weight: 800; font-size: 34px; line-height: 1.05; font-variant-numeric: tabular-nums; }
.tile-num small { font-family: var(--f-ui); font-size: 13px; color: var(--muted); font-weight: 600; }
.tile-sub { font-size: 12px; color: var(--ink-2); overflow-wrap: anywhere; }
.coach p:last-child { margin: 0; font-size: 17px; line-height: 1.45; }
.links { display: grid; gap: 8px; margin-top: 12px; }
.link-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); color: var(--ink); }
.link-row span { display: grid; }
.link-row small { color: var(--muted); }
.link-row svg { width: 20px; height: 20px; color: var(--accent); flex: none; }

/* ---------- séance ---------- */
.sess-head { padding: 10px 2px 4px; }
.sess-head .muted { margin: 6px 0 0; }
.meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.chips { display: flex; gap: 8px; margin: 14px -16px 0; padding: 2px 16px 4px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 8px 14px; border-radius: 99px; font-size: 14px; font-weight: 700; color: var(--ink-2); background: var(--card); border: 1px solid var(--line); }
.chip.on { color: var(--gold-ink); background: var(--gold); border-color: var(--gold); }
.date-row { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.date-pick { flex: 1; }
.date-pick input { width: 100%; height: 38px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font-weight: 700; }

.prep summary, .acc summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; list-style: none; cursor: pointer; }
.prep summary::-webkit-details-marker, .acc summary::-webkit-details-marker { display: none; }
.prep summary span, .acc summary span { display: grid; }
.prep summary small, .acc summary small { color: var(--muted); }
.prep summary svg, .acc summary svg { width: 20px; height: 20px; flex: none; color: var(--accent); transition: transform 0.2s; }
details[open] > summary svg { transform: rotate(90deg); }
.prep ul { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; }
.prep li { display: flex; align-items: center; gap: 12px; }
.prep li img { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; flex: none; }
.prep li span { display: grid; font-size: 14px; }
.prep li small { color: var(--muted); }
.prep-dot { width: 56px; height: 56px; border-radius: 12px; flex: none; background: var(--card-2); border: 1px dashed var(--line-2); }

.ex-list { display: grid; gap: 10px; margin-top: 12px; }
.ex-card { display: grid; grid-template-columns: 76px 1fr auto; gap: 12px; align-items: center; width: 100%; padding: 10px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); text-align: left; }
.ex-card.full { border-color: var(--gold-lo); }
.ex-thumb { width: 76px; height: 76px; border-radius: 13px; object-fit: cover; background: var(--card-2); }
.ex-body { display: grid; gap: 2px; min-width: 0; }
.ex-top { display: flex; align-items: baseline; gap: 8px; }
.ex-num { flex: none; font-family: var(--f-display); font-weight: 900; font-size: 18px; color: var(--accent); }
.ex-name { font-weight: 800; font-size: 15px; line-height: 1.25; }
.ex-presc { font-size: 13px; font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.ex-tech { font-size: 12px; font-weight: 700; color: var(--accent); }
.ex-last { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ex-side { display: grid; justify-items: end; gap: 8px; }
.ex-count { font-family: var(--f-display); font-weight: 800; font-size: 18px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ex-count.ok { color: var(--accent); }
.pill { padding: 4px 9px; border-radius: 99px; font-size: 12px; font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pill-up { color: var(--up); background: var(--up-soft); }
.pill-hold { color: var(--hold); background: var(--hold-soft); }
.pill-low { color: var(--down); background: var(--down-soft); }
.pill-new { color: var(--accent); background: var(--gold-soft); }
.ss { display: grid; gap: 8px; padding: 10px; border-radius: 22px; background: var(--bg-2); border: 1px dashed var(--gold-lo); }
.ss-head { margin: 2px 4px; font-size: 13px; color: var(--ink-2); }
.ss-head b { color: var(--accent); text-transform: uppercase; letter-spacing: 0.1em; font-size: 11px; }
.cardio { display: flex; align-items: center; gap: 12px; }
.cardio img { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; flex: none; }
.cardio p { margin: 0; font-size: 14px; }
.done-card .big-num { font-size: 30px; }
.recs { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.recs li { padding: 8px 12px; border-radius: 12px; background: var(--up-soft); font-size: 14px; }
.recs b { color: var(--up); text-transform: uppercase; font-size: 11px; letter-spacing: 0.1em; margin-right: 6px; }

/* ---------- feuille ---------- */
.sheet-back { position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, 0.55); }
.sheet { position: fixed; z-index: 41; left: 0; right: 0; bottom: 0; top: calc(var(--safe-t) + 10px); max-width: 600px; margin: 0 auto; display: flex; flex-direction: column; border-radius: 26px 26px 0 0; background: var(--bg); border: 1px solid var(--line); border-bottom: 0; transform: translateY(100%); transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1); }
.sheet.in { transform: none; }
.sheet-bar { display: flex; align-items: center; justify-content: flex-end; padding: 10px 12px 4px; position: relative; }
.sheet-grip { position: absolute; left: 50%; top: 8px; width: 44px; height: 5px; margin-left: -22px; border-radius: 9px; background: var(--line-2); }
.sheet-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 0 14px calc(var(--safe-b) + 150px); }
.ss-banner { margin: 0 2px 12px; padding: 10px 12px; border-radius: 14px; background: var(--gold-soft); font-size: 14px; color: var(--ink); }
.ss-banner b { color: var(--accent); }
.sx { margin-bottom: 18px; }
.sx-img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 20px; background: var(--card); }
.sx-img.short { aspect-ratio: 16 / 9; }
.sx-pad { padding: 14px 2px 0; }
.sx-presc { margin: 8px 0 0; font-size: 15px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.sx-presc b { color: var(--ink); }
.tech { display: grid; gap: 2px; margin-top: 12px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--gold-lo); background: var(--gold-soft); font-size: 14px; color: var(--ink); }
.tech b { color: var(--accent); }
.sug { margin-top: 10px; padding: 10px 14px; border-radius: 14px; font-size: 14px; font-weight: 600; color: var(--ink); }
.sug-up { background: var(--up-soft); border-left: 3px solid var(--up); }
.sug-hold { background: var(--hold-soft); border-left: 3px solid var(--hold); }
.sug-low { background: var(--down-soft); border-left: 3px solid var(--down); }
.sug-new { background: var(--gold-soft); border-left: 3px solid var(--gold); }
.sets { display: grid; gap: 8px; margin-top: 14px; }
.set-row { display: grid; grid-template-columns: 22px 1fr 1fr 50px; gap: 8px; align-items: center; padding: 6px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.set-row.done { border-color: var(--gold-lo); background: linear-gradient(90deg, var(--gold-soft), var(--card)); }
.set-row.extra { border-style: dashed; }
.set-row.top { border-color: var(--gold-lo); }
.set-n.small { font-size: 11px; letter-spacing: 0.04em; }
.ramp { margin: 10px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--card-2); font-size: 14px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.ramp b { color: var(--ink); }
.set-n { font-family: var(--f-display); font-weight: 900; font-size: 20px; color: var(--muted); text-align: center; }
.set-row.done .set-n { color: var(--accent); }
.stepper { display: grid; grid-template-columns: 34px 1fr 34px; align-items: center; height: 54px; border-radius: 12px; background: var(--card-2); border: 1px solid var(--line); }
.stepper.ghost { display: grid; place-items: center; font-size: 12px; color: var(--muted); }
.stepper > button { height: 100%; font-size: 22px; font-weight: 600; color: var(--ink-2); }
.stepper label { display: grid; justify-items: center; line-height: 1; }
.stepper input { width: 100%; padding: 0; border: 0; background: transparent; text-align: center; font-family: var(--f-display); font-weight: 800; font-size: 26px; font-variant-numeric: tabular-nums; }
.stepper small { margin-top: 2px; font-size: 10px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.stepper.propose input { color: var(--muted); }
.set-ok { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 15px; border: 1.5px solid var(--line-2); color: var(--faint); }
.set-ok svg { width: 24px; height: 24px; }
.set-ok.on { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }
.set-ok:disabled { opacity: 0.35; }
.cues { margin: 16px 0 0; padding-left: 20px; display: grid; gap: 6px; color: var(--ink-2); font-size: 15px; }
.cues li::marker { color: var(--accent); }
.alt { margin: 12px 0 0; font-size: 14px; color: var(--muted); }
.alt b { color: var(--ink-2); }
.hist { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.hist ul { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; font-size: 14px; font-variant-numeric: tabular-nums; }
.hist li { display: flex; justify-content: space-between; gap: 12px; color: var(--ink-2); }
.hist li span:first-child { color: var(--muted); }
.sheet-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 8px; }
.sheet-nav .btn { margin: 0; flex: 1; }
.stats3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.stats3 > div { display: grid; padding: 12px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.stats3.card > div { background: var(--card-2); }
.stats3 b { font-family: var(--f-display); font-weight: 800; font-size: 28px; line-height: 1.05; font-variant-numeric: tabular-nums; }
.stats3 small { color: var(--muted); font-size: 12px; }
.scale { display: grid; grid-template-columns: repeat(11, 1fr); gap: 4px; }
.scale button { height: 40px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); font-weight: 800; font-variant-numeric: tabular-nums; }
.scale button.on { background: var(--gold); color: var(--gold-ink); border-color: var(--gold); }
textarea { width: 100%; padding: 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); resize: vertical; }

/* ---------- minuteur ---------- */
.timer { position: fixed; z-index: 45; left: 12px; right: 12px; bottom: calc(var(--tab-h) + var(--safe-b) + 10px); max-width: 536px; margin: 0 auto; border-radius: 20px; overflow: hidden; background: var(--card-2); border: 1px solid var(--gold-lo); box-shadow: var(--shadow); }
.sheet-open .timer { bottom: calc(var(--safe-b) + 12px); }
.timer-bar { height: 4px; background: var(--line); }
.timer-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-lo), var(--gold-hi)); transition: width 0.25s linear; }
.timer-in { display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 16px; }
.timer-lab { font-size: 11px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.timer-t { flex: 1; font-family: var(--f-display); font-weight: 900; font-size: 40px; line-height: 1; color: var(--accent); font-variant-numeric: tabular-nums; }
.timer-btns { display: flex; gap: 6px; }
.timer-btns button { min-width: 46px; height: 42px; padding: 0 8px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); font-weight: 800; font-size: 14px; }
.timer-btns svg { width: 18px; height: 18px; }
.timer.fini { border-color: var(--accent); animation: pulse 0.9s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(216, 178, 110, 0.3); } }

/* ---------- onglets ---------- */
.tabbar { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px 6px calc(var(--safe-b) + 6px); background: var(--bg-a); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-top: 1px solid var(--line); }
.tab { display: grid; justify-items: center; gap: 2px; padding: 6px 0 2px; font-size: 11px; font-weight: 700; color: var(--muted); }
.tab svg { width: 24px; height: 24px; fill: currentColor; stroke: currentColor; }
.tab.on { color: var(--accent); }
.sheet-open .tabbar { display: none; }

/* ---------- progrès ---------- */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; margin-top: 12px; padding: 4px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.seg a { padding: 9px 4px; border-radius: 12px; text-align: center; font-size: 14px; font-weight: 800; color: var(--muted); }
.seg a.on { color: var(--gold-ink); background: var(--gold); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: end; }
.form-row label { display: grid; gap: 4px; font-size: 12px; font-weight: 700; color: var(--muted); position: relative; }
.form-row label:first-child { grid-column: 1 / -1; }
.form-row input { height: 50px; padding: 0 40px 0 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--card-2); font-family: var(--f-display); font-weight: 800; font-size: 24px; }
.form-row input[type='date'] { font-family: var(--f-ui); font-size: 16px; font-weight: 700; padding-right: 12px; }
.form-row label small { position: absolute; right: 12px; bottom: 15px; font-size: 13px; color: var(--muted); }
.form-row .btn { grid-column: 1 / -1; margin: 4px 0 0; }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kpis div { display: grid; }
.kpis small { color: var(--muted); font-size: 12px; font-weight: 700; }
.kpis b { font-family: var(--f-display); font-weight: 800; font-size: 30px; font-variant-numeric: tabular-nums; }
.trend { margin: 12px 0; padding: 10px 14px; border-radius: 14px; font-size: 14px; color: var(--ink); }
.trend-ok { background: var(--up-soft); border-left: 3px solid var(--up); }
.trend-haut, .trend-bas { background: var(--down-soft); border-left: 3px solid var(--down); }
.chart-fig { margin: 8px 0 0; }
.chart-fig figcaption { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 12px; color: var(--muted); }
.lg-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-2); }
.lg-line { width: 16px; height: 2px; margin-left: 10px; background: var(--accent); }
.chart { width: 100%; height: auto; display: block; }
.c-grid { stroke: var(--line); stroke-width: 1; }
.c-lab { fill: var(--muted); font-size: 10px; font-family: var(--f-ui); font-weight: 600; }
.c-line { fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.c-area { fill: var(--gold-soft); stroke: none; }
.c-dot { fill: var(--ink-2); }
.c-end { fill: var(--accent); stroke: var(--card); stroke-width: 2; }
.spark { width: 100%; height: auto; display: block; }
.spark path { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.spark circle { fill: var(--accent); }
.table-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.tbl th { text-align: left; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); font-weight: 800; padding: 6px 8px 8px 0; border-bottom: 1px solid var(--line); }
.tbl td { padding: 9px 8px 9px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl td small { color: var(--muted); }
.tbl tr.cur td { color: var(--accent); font-weight: 800; }
.empty p:first-child { margin-top: 0; }
.list { display: grid; gap: 8px; margin-top: 12px; }
.force-row { display: grid; grid-template-columns: 48px 1fr 84px 50px; gap: 10px; align-items: center; padding: 10px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); color: var(--ink); }
.force-row img { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; }
.fr-body { display: grid; min-width: 0; }
.fr-body b { font-size: 14px; line-height: 1.25; }
.fr-body small { color: var(--muted); font-variant-numeric: tabular-nums; }
.fr-delta { text-align: right; font-weight: 800; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.fr-delta.up { color: var(--up); }
.exo-head { padding: 0; overflow: hidden; }
.exo-head .sx-pad { padding: 14px 16px 16px; }
.exo-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.grid35 { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 8px; }
.cell { display: grid; justify-items: center; padding: 6px 0; border-radius: 10px; background: var(--card-2); border: 1px solid var(--line); }
.cell b { font-size: 11px; color: var(--muted); }
.cell small { font-family: var(--f-display); font-weight: 800; font-size: 16px; min-height: 20px; }
.cell.l1 { background: rgba(216, 178, 110, 0.18); }
.cell.l2 { background: rgba(216, 178, 110, 0.4); }
.cell.l3 { background: var(--gold); }
.cell.l3 b, .cell.l3 small { color: var(--gold-ink); }
.cell.now { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.cell.dech { border-style: dashed; }

/* ---------- assiette ---------- */
.phase .big-num { font-size: 46px; }
.macros { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 4px 0 10px; }
.macros span { display: grid; padding: 8px; border-radius: 12px; background: var(--card-2); text-align: center; }
.macros b { font-family: var(--f-display); font-weight: 800; font-size: 22px; font-variant-numeric: tabular-nums; }
.macros small { color: var(--muted); font-size: 11px; }
.phase .muted { margin: 0; font-size: 14px; }
.mrow { display: grid; grid-template-columns: 86px 1fr auto; gap: 10px; align-items: center; margin-top: 8px; font-size: 14px; }
.mrow b { font-variant-numeric: tabular-nums; font-size: 14px; }
.mbar { height: 8px; border-radius: 9px; background: var(--card-2); border: 1px solid var(--line); overflow: hidden; }
.mbar span { display: block; height: 100%; background: var(--gold); border-radius: inherit; }
.plaisir { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 14px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line); text-align: left; }
.plaisir span:last-child { display: grid; }
.plaisir small { color: var(--muted); }
.opt-check { display: grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 9px; border: 1.5px solid var(--line-2); color: transparent; }
.opt-check svg { width: 16px; height: 16px; }
.on > .opt-check, .on .opt-top .opt-check { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }
.slot { margin-top: 18px; }
.slot-head { display: flex; align-items: center; gap: 12px; margin: 0 2px 8px; }
.slot-head span:last-child { display: grid; }
.slot-head small { color: var(--muted); font-size: 13px; }
.slot-time { flex: none; min-width: 62px; padding: 6px 8px; border-radius: 10px; background: var(--gold-soft); color: var(--accent); font-family: var(--f-display); font-weight: 800; font-size: 17px; text-align: center; }
.slot-note { margin: 0 2px 8px; font-size: 13px; color: var(--ink-2); }
.opts { display: grid; gap: 8px; }
.opt { display: grid; gap: 4px; width: 100%; padding: 12px 14px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); text-align: left; }
.opt.on { border-color: var(--gold-lo); background: linear-gradient(180deg, var(--gold-soft), var(--card)); }
.opt-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 15px; }
.opt-ing { font-size: 14px; color: var(--ink-2); }
.opt-ing b { color: var(--ink); font-variant-numeric: tabular-nums; }
.opt-tip { font-size: 13px; color: var(--accent); }
.opt-mac { font-size: 12px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.plist { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 6px; }
.plist li { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.plist b { color: var(--accent); font-variant-numeric: tabular-nums; white-space: nowrap; }
.acc-body { margin-top: 12px; font-size: 15px; color: var(--ink-2); }
.acc-body h3 { margin: 16px 0 6px; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.acc-body p { margin: 8px 0; }
.acc-body ul, .acc-body ol { margin: 8px 0; padding-left: 20px; display: grid; gap: 4px; }
.acc-body li::marker { color: var(--accent); }
.acc-body b { color: var(--ink); }
.acc-body .tbl { margin-top: 8px; }
.acc-body .say { display: block; margin: 4px 0; padding: 8px 12px; border-radius: 12px; background: var(--card-2); font-style: italic; color: var(--ink); }

/* ---------- courses ---------- */
.shop { margin-top: 18px; }
.shop-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0 2px 8px; font-family: var(--f-display); font-weight: 800; font-size: 22px; text-transform: uppercase; letter-spacing: 0.04em; }
.shop-h small { font-family: var(--f-ui); font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: 0; text-transform: none; }
.shop ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.shop-item { display: grid; grid-template-columns: 26px 1fr auto; gap: 12px; align-items: center; width: 100%; padding: 11px 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); text-align: left; }
.si-txt { display: grid; min-width: 0; }
.si-txt b { font-size: 15px; }
.si-txt small { color: var(--muted); font-style: italic; }
.si-q { font-size: 13px; font-weight: 800; color: var(--ink-2); text-align: right; font-variant-numeric: tabular-nums; }
.shop-item.on { opacity: 0.55; }
.shop-item.on .si-txt b { text-decoration: line-through; }

/* ---------- plan ---------- */
.plates { display: grid; grid-template-columns: repeat(35, 1fr); gap: 2px; height: 46px; margin-top: 10px; align-items: center; }
.plate { height: 100%; border-radius: 3px; }
.plate.p10 { background: var(--p10); height: 62%; }
.plate.p15 { background: var(--p15); height: 74%; }
.plate.p20 { background: var(--p20); height: 86%; }
.plate.p25 { background: var(--p25); }
.plate.p5 { background: var(--p5); height: 44%; }
.plate.pf { background: repeating-linear-gradient(135deg, var(--line-2) 0 3px, var(--card-2) 3px 6px); height: 50%; }
.plate.pg { background: var(--gold); }
.plate.now { outline: 2px solid var(--ink); outline-offset: 2px; }
.plates-lab { display: flex; justify-content: space-between; margin-top: 6px; font-size: 11px; color: var(--muted); font-weight: 700; }
.legend { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--ink-2); }
.legend li { display: flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 12px; border-radius: 3px; }
.legend .p10 { background: var(--p10); } .legend .p15 { background: var(--p15); } .legend .p20 { background: var(--p20); } .legend .p25 { background: var(--p25); } .legend .p5 { background: var(--p5); } .legend .pg { background: var(--gold); }
.legend .pf { background: repeating-linear-gradient(135deg, var(--line-2) 0 3px, var(--card-2) 3px 6px); }
.blocs { margin: 6px 0 0; padding-left: 0; list-style: none; display: grid; gap: 10px; }
.blocs li { display: grid; gap: 2px; font-size: 14px; color: var(--ink-2); }
.blocs b { color: var(--ink); }
.split { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 8px; }
.split li { display: grid; grid-template-columns: 44px 1fr; column-gap: 10px; font-size: 15px; }
.split li > b { grid-row: span 2; font-family: var(--f-display); font-weight: 800; font-size: 18px; color: var(--accent); text-transform: uppercase; }
.split small { color: var(--muted); }
.steps { margin: 6px 0 0; padding-left: 20px; display: grid; gap: 6px; color: var(--ink-2); }
.sources { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 8px; font-size: 13px; color: var(--muted); }
.theme-row { display: grid; grid-auto-flow: column; gap: 6px; margin-top: 8px; }
.theme-row button { padding: 10px; border-radius: 12px; background: var(--card-2); border: 1px solid var(--line); font-weight: 800; }
.theme-row button.on { background: var(--gold); color: var(--gold-ink); border-color: var(--gold); }

/* ---------- connexion : toujours sombre, sur la photo ---------- */
.auth { position: relative; min-height: 100vh; min-height: 100dvh; display: grid; align-items: end; padding: calc(var(--safe-t) + 20px) 20px calc(var(--safe-b) + 28px); overflow: hidden; background: #0b0a08; color: var(--dark-ink); }
.auth-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.auth::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11, 10, 8, 0.2), rgba(11, 10, 8, 0.75) 45%, #0b0a08 75%); }
.auth-in { position: relative; z-index: 1; width: 100%; max-width: 440px; margin: 0 auto; }
.auth-tag { margin: 4px 0 22px; font-size: 18px; font-weight: 700; color: var(--dark-ink-2); }
.auth-form { display: grid; gap: 6px; }
.auth-form label { margin-top: 8px; font-size: 13px; font-weight: 700; color: #b8ae9c; }
.auth-form input { height: 54px; padding: 0 16px; border-radius: 15px; border: 1px solid #413a2e; background: #17140f; color: var(--dark-ink); font-size: 17px; }
.auth-lead { margin: 0 0 6px; font-size: 16px; color: var(--dark-ink-2); }
.auth-err { min-height: 1.4em; margin: 4px 0 0; color: #f0a088; font-weight: 700; font-size: 14px; }
.auth .muted { color: #a89e8c; }
.auth .btn { margin-top: 14px; }

#toast { position: fixed; z-index: 60; left: 50%; bottom: calc(var(--tab-h) + var(--safe-b) + 92px); transform: translate(-50%, 20px); width: max-content; max-width: calc(100% - 32px); padding: 12px 16px; border-radius: 14px; background: var(--ink); color: var(--bg); font-weight: 700; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s; }
#toast.on { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 700px) {
  .hero { aspect-ratio: 16 / 9; }
  .hero-count { font-size: 110px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ---------- outils, check-in, photos, rappels ---------- */
.swapped { display: block; font-size: 11px; font-weight: 700; color: var(--accent); }
.btn.sm { min-height: 42px; font-size: 14px; padding: 0 14px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.in { width: 100%; height: 48px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--card-2); color: var(--ink); font-weight: 700; }
.link-row.hot { border-color: var(--gold-lo); background: linear-gradient(180deg, var(--gold-soft), var(--card)); }
.date-pick.center { text-align: center; font-size: 15px; color: var(--ink-2); margin: 0; }
.scale.s5 { grid-template-columns: repeat(5, 1fr); }
.cilist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.cilist li { display: grid; gap: 2px; font-size: 14px; color: var(--ink-2); }
.cilist li b { color: var(--ink); }
.ci-rec { color: var(--up); font-weight: 700; font-size: 13px; }
.rlist { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 10px; }
.rlist li { display: grid; grid-template-columns: 30px 1fr auto; gap: 12px; align-items: center; }
.rlist li span { display: grid; font-size: 15px; }
.rlist li small { color: var(--muted); }
.rlist input[type='time'] { height: 40px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--card-2); color: var(--ink); font-weight: 700; }
.file-btn { position: relative; overflow: hidden; cursor: pointer; }
.file-btn input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.pgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pgrid figure, .cmp figure { margin: 0; display: grid; gap: 4px; }
.pgrid figcaption, .cmp figcaption { font-size: 12px; font-weight: 700; color: var(--muted); text-align: center; }
.pthumb { display: block; width: 100%; aspect-ratio: 3 / 4; border-radius: 12px; overflow: hidden; background: var(--card-2); border: 1px solid var(--line); padding: 0; }
.pthumb img, .cmp img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pthumb.vide { display: grid; place-items: center; align-content: center; font-size: 12px; color: var(--muted); border-style: dashed; }
.pthumb.vide small { font-size: 11px; }
.cmp { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.cmp figure img, .cmp .pthumb { aspect-ratio: 3 / 4; border-radius: 12px; }
.pfull { width: 100%; border-radius: 16px; margin-bottom: 12px; }
select.in { appearance: none; -webkit-appearance: none; }

/* ---------- WHOOP / forme du jour ---------- */
.forme { display: block; color: var(--ink); border-left: 4px solid var(--hold); }
.forme.forme-vert { border-left-color: var(--up); }
.forme.forme-jaune { border-left-color: var(--p15); }
.forme.forme-rouge { border-left-color: var(--down); }
.note.forme-rouge { background: var(--down-soft); border-left: 3px solid var(--down); }
.note.forme-jaune { background: rgba(226, 185, 59, 0.14); border-left: 3px solid var(--p15); }
.note.forme-vert { background: var(--up-soft); border-left: 3px solid var(--up); }
.forme-row { display: grid; grid-template-columns: 84px 1fr; gap: 14px; align-items: center; }
.ring { display: grid; place-items: center; align-content: center; width: 84px; height: 84px; border-radius: 50%; border: 4px solid currentColor; font-family: var(--f-display); font-weight: 800; line-height: 1; }
.forme-vert .ring { color: var(--up); } .forme-jaune .ring { color: var(--p15); } .forme-rouge .ring { color: var(--down); }
.ring b { font-size: 30px; color: var(--ink); } .ring small { font-size: 11px; color: var(--muted); }
.forme-k { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.forme-k > span { display: grid; text-align: center; }
.forme-k b { font-family: var(--f-display); font-weight: 800; font-size: 20px; font-variant-numeric: tabular-nums; }
.forme-k small { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.forme-txt { margin: 10px 0 0; font-size: 14px; color: var(--ink-2); }
code { font-family: ui-monospace, Menlo, monospace; font-size: 12px; background: var(--card-2); padding: 2px 6px; border-radius: 6px; overflow-wrap: anywhere; }
