/* ===================== Sam T Real Fitness — Fond blanc, texte noir, jaune sur noir ===================== */
/* Règle de couleur : le texte jaune est TOUJOURS posé sur un fond noir. */
:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f4f4f4;
  --surface-3: #e9e9e9;
  --border: #e2e2e2;
  --text: #0b0b0b;
  --muted: #666666;
  --ink: #0b0b0b;          /* noir de marque (fonds sombres) */
  --on-ink: #ffffff;
  --accent: #ffd60a;       /* jaune de marque */
  --accent-2: #ffe24d;
  --on-accent: #0b0b0b;
  --accent-soft: #fff6c7;
  --danger: #d93a32;
  --success: #1fa45a;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 4px 16px rgba(0, 0, 0, .05);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Barlow Condensed', 'Arial Narrow', Impact, sans-serif;
  --nav-h: 64px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 var(--font); min-height: 100vh; overflow-x: hidden; }
body.no-scroll { overflow: hidden; }
a { color: inherit; text-decoration: none; }
p a, .muted a, .auth-foot a { color: var(--text); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 2px; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; letter-spacing: .01em; margin: 0 0 .4em; line-height: 1.1; }
h1 { font-size: clamp(30px, 6vw, 40px); text-transform: uppercase; }
h2 { font-size: 22px; display: flex; align-items: center; gap: 8px; }
h3 { font-size: 20px; }
h4 { font-size: 16px; text-transform: uppercase; color: var(--muted); margin-top: 1.2em; }
p { margin: 0 0 .8em; }
ul, ol { padding-left: 1.2em; margin: 0 0 1em; }
li { margin: .25em 0; }
img { max-width: 100%; display: block; }
.ic { width: 18px; height: 18px; flex: none; vertical-align: -3px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
/* Texte mis en valeur : jaune sur fond noir */
.accent { color: var(--accent); background: var(--ink); padding: 0 .3em; border-radius: 4px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.center { text-align: center; }
.grow { flex: 1; min-width: 0; }
.eyebrow { display: inline-block; color: var(--accent); background: var(--ink); font: 700 12px var(--display); letter-spacing: .22em; text-transform: uppercase; padding: 3px 10px; border-radius: 6px; margin-bottom: 8px; }
.danger-text { color: var(--danger) !important; }
.row { display: flex; align-items: center; gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.end { justify-content: flex-end; margin-top: 12px; flex-wrap: wrap; }
.row.center { justify-content: center; flex-wrap: wrap; }
.mt { margin-top: 12px; }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 2px 0 0; }

/* ---------- Boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border: 0; border-radius: 999px;
  background: var(--accent); color: var(--on-accent); font: 700 15px var(--font); cursor: pointer; transition: transform .1s, background .15s; white-space: nowrap; text-decoration: none; }
.btn:hover { background: var(--accent-2); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .6; cursor: default; }
.btn.ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1.5px var(--border); }
.btn.ghost:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn.dark { background: var(--ink); color: var(--accent); }
.btn.dark:hover { background: #2a2a2a; }
.btn.danger { background: var(--danger); color: #fff; }
.btn.small { min-height: 36px; padding: 6px 14px; font-size: 14px; }
.btn.block { width: 100%; }
.link { background: none; border: 0; color: var(--text); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px;
  font: 600 14px var(--font); cursor: pointer; padding: 6px 0; display: inline-flex; gap: 6px; align-items: center; }
.icon-btn { width: 38px; height: 38px; display: inline-grid; place-items: center; border-radius: 10px; border: 0; background: var(--surface-2); color: var(--text); cursor: pointer; flex: none; }
.icon-btn:hover { background: var(--ink); color: var(--accent); }
.icon-btn:disabled { opacity: .3; cursor: default; background: var(--surface-2); color: var(--text); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* ---------- Mise en page ---------- */
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top)); background: var(--ink); color: var(--on-ink); }
.top-actions { display: flex; align-items: center; gap: 10px; }
.avatar-btn { width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid #3a3a3a; background: #1c1c1c; color: var(--on-ink); display: grid; place-items: center; cursor: pointer; }
.avatar-btn:hover { border-color: var(--accent); color: var(--accent); }
.logo { display: inline-flex; align-items: center; gap: 10px; }
.logo-mark { width: 36px; height: 36px; border-radius: 9px; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font: 800 20px var(--display); letter-spacing: -.02em; }
.logo-text { font: 700 18px var(--display); letter-spacing: .12em; white-space: nowrap; color: var(--on-ink); }
.logo-text b { color: var(--accent); font-weight: 700; }
.layout { display: flex; max-width: 1240px; margin: 0 auto; }
.sidenav { display: none; }
main { flex: 1; min-width: 0; padding: 20px 16px calc(var(--nav-h) + 40px + env(safe-area-inset-bottom)); }
.view { max-width: 980px; margin: 0 auto; }
.bottomnav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; display: flex; background: var(--ink); padding-bottom: env(safe-area-inset-bottom); }
.bot-link { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; height: var(--nav-h); color: #9a9a9a; font-size: 11px; font-weight: 600; }
.bot-link .ic { width: 22px; height: 22px; }
.bot-link.active { color: var(--accent); }
@media (min-width: 900px) {
  .sidenav { display: flex; flex-direction: column; gap: 4px; width: 220px; padding: 24px 12px; position: sticky; top: 60px; height: calc(100vh - 60px); }
  .side-link { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; color: var(--muted); font-weight: 600; }
  .side-link:hover { background: var(--surface-2); color: var(--text); }
  .side-link.active { background: var(--ink); color: var(--accent); }
  .bottomnav { display: none; }
  main { padding: 28px 28px 80px; }
}
@media (max-width: 420px) { .logo-text { font-size: 15px; letter-spacing: .08em; } }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h1 { margin: 0; }
.page-head p { margin: 4px 0 0; }
.back { display: inline-block; color: var(--muted); font-weight: 600; margin-bottom: 10px; }
.back:hover { color: var(--text); }
.section-title { margin: 28px 0 12px; }
.loading { display: grid; place-items: center; min-height: 40vh; }
.spinner { width: 20px; height: 20px; border: 2.5px solid currentColor; border-right-color: transparent; border-radius: 50%; display: inline-block; animation: spin .7s linear infinite; }
.loading .spinner { width: 32px; height: 32px; color: var(--ink); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Cartes ---------- */
.card { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin-bottom: 14px; box-shadow: var(--shadow); }
.card.highlight { border: 2px solid var(--accent); }
.card.error { border-color: var(--danger); color: var(--danger); }
.card.warn { border-color: #f0d36b; background: #fffbea; }
.grid { display: grid; gap: 14px; }
.grid > .card { margin-bottom: 0; }
.grid.cards { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.grid2 { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid2 > .card { margin-bottom: 0; }
.grid3 { display: grid; gap: 10px; grid-template-columns: repeat(3, 1fr); }
.grid4 { display: grid; gap: 10px; grid-template-columns: repeat(4, 1fr); }
@media (max-width: 560px) { .grid3, .grid4 { grid-template-columns: repeat(2, 1fr); } }
.empty { padding: 32px 18px; text-align: center; color: var(--muted); border: 1.5px dashed #cfcfcf; border-radius: var(--radius); grid-column: 1 / -1; }
.empty.small { padding: 18px; font-size: 14px; }
.list-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); flex-wrap: wrap; }
.list-row:first-of-type { border-top: 0; }
.avatar { width: 46px; height: 46px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--ink); color: var(--accent); font: 700 18px var(--display); letter-spacing: .05em; }
.avatar.lg { width: 58px; height: 58px; font-size: 22px; }
.client-card { display: flex; gap: 14px; align-items: flex-start; transition: border-color .15s; }
.client-card:hover, .prog-card:hover, .day-card:hover, .link-card:hover { border-color: var(--ink); }
.stats-mini { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; font-size: 13px; color: var(--muted); align-items: center; }
.stats-mini b { color: var(--text); }
.prog-card { display: flex; flex-direction: column; gap: 10px; }
.link-card { display: flex; gap: 14px; align-items: center; margin-bottom: 0; }
.link-card > .ic { width: 28px; height: 28px; color: var(--text); }
.link-card.promo { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.link-card.promo b { color: var(--accent); }
.link-card.promo > .ic { color: var(--accent); }

/* ---------- Badges / pastilles ---------- */
.badge, .pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--surface-3); color: var(--text); white-space: nowrap; }
.badge.f-basique { background: var(--surface-3); color: var(--text); }
.badge.f-deluxe { background: var(--ink); color: var(--accent); }
.badge.f-fullstack { background: var(--accent); color: var(--on-accent); box-shadow: inset 0 0 0 1.5px var(--ink); }
.pill.new { background: var(--danger); color: #fff; }
.pill.y { background: var(--accent); color: var(--on-accent); }
.pill.demo { background: var(--accent); color: var(--on-accent); }
.pill .ic { width: 14px; height: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 8px; background: var(--surface-2); font-size: 13px; color: #333; }
.chip b { color: var(--text); }
.chip.tempo { background: var(--ink); color: #ddd; }
.chip.tempo b { color: var(--accent); }
.chip .ic { width: 14px; height: 14px; }
.kbd { display: inline-block; background: var(--ink); color: var(--accent); font: 800 13px var(--display); letter-spacing: .1em; padding: 2px 8px; border-radius: 6px; margin-right: 6px; }

/* ---------- Formulaires ---------- */
.form { display: flex; flex-direction: column; gap: 14px; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: #333; }
label.inline { flex-direction: row; align-items: center; gap: 10px; margin-bottom: 10px; }
label.check { flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 500; font-size: 14px; cursor: pointer; }
input, select, textarea { width: 100%; background: #fafafa; border: 1.5px solid #d9d9d9; border-radius: var(--radius-sm); color: var(--text);
  font: 400 16px var(--font); padding: 11px 12px; min-height: 44px; }
textarea { resize: vertical; min-height: 0; line-height: 1.45; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); background: #fff; box-shadow: 0 0 0 3px rgba(255, 214, 10, .45); }
input::placeholder, textarea::placeholder { color: #9a9a9a; }
input[type=checkbox] { width: 20px; height: 20px; min-height: 0; accent-color: var(--ink); flex: none; margin: 1px 0 0; }
input[type=file] { padding: 8px; font-size: 14px; }
select.ex-select { min-height: 150px; padding: 4px; }
select.ex-select option { padding: 8px; border-radius: 6px; }
select.ex-select option:checked { background: var(--ink); color: var(--accent); }
.search { margin-bottom: 14px; }
.hint { font-size: 12px; color: var(--muted); font-weight: 400; margin: -6px 0 0; }
.file-drop { flex-direction: row; align-items: center; gap: 10px; padding: 16px; border: 1.5px dashed #bdbdbd; border-radius: var(--radius-sm); cursor: pointer; color: var(--text); font-size: 15px; position: relative; background: #fafafa; }
.file-drop:hover { border-color: var(--ink); }
.file-drop .ic { color: var(--accent); background: var(--ink); width: 34px; height: 34px; padding: 7px; border-radius: 8px; }
.file-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.preview-row { display: flex; gap: 8px; flex-wrap: wrap; }
.preview-row:empty { display: none; }
.preview-row img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; }
.img-pick { display: flex; gap: 14px; align-items: flex-start; }
.img-pick .grow { display: flex; flex-direction: column; gap: 10px; }
.thumb { width: 96px; height: 96px; flex: none; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); display: grid; place-items: center; overflow: hidden; color: #9a9a9a; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.sm { width: 52px; height: 52px; border-radius: 10px; }
.thumb .ic { width: 28px; height: 28px; }
.copy-box { font-size: 14px; }
.stepper { display: flex; align-items: center; gap: 0; }
.stepper button { width: 44px; height: 44px; border: 1.5px solid #d9d9d9; background: var(--surface-2); color: var(--text); font-size: 20px; cursor: pointer; }
.stepper button:hover { background: var(--ink); color: var(--accent); }
.stepper button:first-child { border-radius: 10px 0 0 10px; }
.stepper button:last-child { border-radius: 0 10px 10px 0; }
.stepper input { width: 64px; text-align: center; border-radius: 0; border-left: 0; border-right: 0; }
.rebate-box { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 14px; border-radius: var(--radius-sm); background: var(--surface-2); }
.rebate-box.big { margin-bottom: 10px; }
.rebate-box .credit { text-align: center; background: var(--ink); color: var(--on-ink); border-radius: 12px; padding: 10px 18px; min-width: 120px; }
.rebate-box .credit span, .rebate-box .credit small { display: block; font-size: 12px; font-weight: 600; color: #bbb; }
.rebate-box .credit b { font: 800 34px var(--display); line-height: 1.1; color: var(--accent); }
.danger-zone { border-color: #f3c1be; }
.clause { font-size: 13px; color: var(--muted); }
.clause summary { cursor: pointer; color: var(--text); font-weight: 600; text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; }
.clause p { margin-top: 8px; }

/* ---------- Onglets / filtres ---------- */
.tabs { display: flex; gap: 6px; overflow-x: auto; margin: 0 -16px 16px; padding: 0 16px 4px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { flex: none; padding: 9px 16px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); color: #444; font-weight: 600; font-size: 14px; }
.tabs a.active { background: var(--ink); color: var(--accent); border-color: var(--ink); }
.filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.filters button, .seg button { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-2); color: #444; font: 600 14px var(--font); cursor: pointer; }
.filters button.active { background: var(--ink); color: var(--accent); border-color: var(--ink); }
.seg { display: flex; background: var(--surface-2); border-radius: 999px; padding: 4px; margin-bottom: 18px; }
.seg button { flex: 1; border: 0; background: transparent; }
.seg button.active { background: var(--ink); color: var(--accent); }

/* ---------- Statistiques / graphiques ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 10px; margin-bottom: 14px; }
.stat { background: var(--surface-2); border-radius: 12px; padding: 12px 14px; }
.stat span { display: block; font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.stat b { font: 700 26px var(--display); }
.stat b.sm { font-size: 20px; }
.stat small { display: block; color: var(--muted); font-size: 12px; }
.stat .down { color: var(--success); }
.stat .upv { color: var(--text); }
.stats.big .stat { background: var(--ink); color: var(--on-ink); }
.stats.big .stat span, .stats.big .stat small { color: #bbb; }
.stats.big .stat b { font-size: 34px; color: var(--accent); }
.chart { width: 100%; height: auto; display: block; margin: 6px 0 12px; }
.chart .grid { stroke: #dcdcdc; stroke-dasharray: 3 4; }
.chart .axis { fill: var(--muted); font: 12px var(--font); }
.chart .line { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.chart .dot { fill: var(--accent); stroke: var(--ink); stroke-width: 2.5; }

/* ---------- Tableaux ---------- */
.table-wrap { overflow-x: auto; margin: 0 -4px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 8px 6px; border-bottom: 2px solid var(--ink); white-space: nowrap; }
.table td { padding: 10px 6px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.note-inline { display: inline-block; background: var(--accent-soft); color: var(--text); padding: 3px 8px; border-radius: 6px; font-size: 13px; }

/* ---------- Historique ---------- */
.log summary { display: flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; }
.log summary::-webkit-details-marker { display: none; }
.log[open] summary { margin-bottom: 12px; }
.note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); margin-top: 12px; font-size: 14px; }
.note .ic { color: var(--muted); margin-top: 2px; }
.note.coach { background: var(--accent-soft); border: 1.5px solid var(--accent); }
.note.coach .ic { color: var(--text); }
a.note.coach { margin: 0 0 14px; }
.coach-reply { margin-top: 14px; }

/* ---------- Galerie ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.ph { position: relative; aspect-ratio: 3 / 4; border: 0; padding: 0; border-radius: 10px; overflow: hidden; background: var(--surface-2); cursor: pointer; }
.ph img { width: 100%; height: 100%; object-fit: cover; }
.ph span { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 6px 5px; font-size: 11px; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, .8)); text-align: left; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.compare img { border-radius: 10px; margin-bottom: 8px; width: 100%; }
.compare h4 { margin-top: 0; font-size: 14px; }
.lightbox { margin: 0; }
.lightbox img { max-height: 75vh; margin: 0 auto; border-radius: 10px; }
.lightbox figcaption { text-align: center; color: var(--muted); margin-top: 10px; font-size: 14px; }

/* ---------- Exercices / programmes ---------- */
.ex-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.ex-tile { display: flex; align-items: center; gap: 12px; padding: 12px; }
.ex-img { width: 64px; height: 64px; flex: none; border-radius: 10px; border: 0; padding: 0; background: var(--surface-2); color: #9a9a9a; display: grid; place-items: center; overflow: hidden; cursor: pointer; }
.ex-img img { width: 100%; height: 100%; object-fit: cover; }
.ex-img .ic { width: 26px; height: 26px; }
.day-head { margin-bottom: 8px; flex-wrap: wrap; }
.day-head h2 { margin: 0; }
.item-row { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--border); }
.item-row:first-of-type { border-top: 0; }
.item-n { width: 26px; height: 26px; flex: none; border-radius: 50%; background: var(--ink); color: var(--accent); display: grid; place-items: center; font: 800 14px var(--display); }
.item-actions { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.item-actions .icon-btn { width: 34px; height: 34px; }
.play-mark { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--ink); color: var(--accent); vertical-align: -4px; }
.play-mark .ic { width: 11px; height: 11px; }
.day .btn.block { margin-top: 10px; }
@media (max-width: 600px) {
  .item-row { flex-wrap: wrap; }
  .item-row .grow { flex-basis: calc(100% - 110px); }
  .item-actions { width: 100%; }
}

/* ---------- Accueil client ---------- */
.hello { margin-bottom: 16px; }
.hello h1 { margin: 0; }
.day-list { display: flex; flex-direction: column; gap: 8px; }
.day-card { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 12px; background: var(--surface-2); border: 1.5px solid transparent; transition: border-color .15s; }
.day-card.in-progress { border-color: var(--accent); background: var(--accent-soft); }

/* ---------- Séance ---------- */
.ex-card { padding: 16px; }
.ex-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 10px; }
.ex-thumb { width: 84px; height: 84px; flex: none; border-radius: 12px; border: 0; padding: 0; overflow: hidden; background: var(--surface-2); color: #9a9a9a; display: grid; place-items: center; cursor: zoom-in; }
.ex-thumb:disabled { cursor: default; }
.ex-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ex-thumb .ic { width: 30px; height: 30px; }
.ex-num { display: inline-block; font-size: 11px; color: var(--accent); background: var(--ink); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; padding: 2px 8px; border-radius: 5px; }
.ex-head h3 { font-size: 22px; margin: 4px 0 0; }
.coach-note { font-size: 14px; background: var(--surface-2); padding: 10px 12px; border-radius: 10px; margin: 10px 0; }
.prev { font-size: 13px; color: var(--muted); margin: 10px 0 6px; }
.prev .ic { width: 15px; height: 15px; margin-right: 4px; }
.sets { margin: 10px 0; }
.set-head, .set-row { display: grid; grid-template-columns: 44px 1fr 1fr 48px; gap: 8px; align-items: center; }
.set-head { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; padding: 0 0 6px; }
.set-head span:first-child { text-align: center; }
.set-row { padding: 4px 0; }
.set-row input { text-align: center; font-weight: 600; padding: 8px; }
.set-n { width: 36px; height: 36px; margin: 0 auto; border-radius: 50%; background: var(--surface-3); display: grid; place-items: center; font: 700 16px var(--display); }
.check { width: 44px; height: 44px; border-radius: 12px; border: 1.5px solid #d0d0d0; background: #fff; color: #9a9a9a; display: grid; place-items: center; cursor: pointer; }
.check .ic { width: 22px; height: 22px; }
.set-row.done .check { background: var(--success); border-color: var(--success); color: #fff; }
.set-row.done .set-n { background: var(--success); color: #fff; }
.set-row.done input { border-color: rgba(31, 164, 90, .5); background: #f1fbf5; }
.ex-tools { margin: 6px 0 10px; }
.finish-bar { position: sticky; bottom: calc(var(--nav-h) + 10px + env(safe-area-inset-bottom)); z-index: 20; display: flex; gap: 10px; padding: 10px; background: var(--ink);
  border-radius: 999px; margin-top: 6px; box-shadow: 0 8px 30px rgba(0, 0, 0, .25); }
.finish-bar .btn.ghost { color: #fff; box-shadow: inset 0 0 0 1.5px #444; }
.finish-bar .btn:last-child { flex: 1; }
@media (min-width: 900px) { .finish-bar { bottom: 16px; } }

/* ---------- Minuteur ---------- */
.timer { position: fixed; z-index: 60; left: 50%; transform: translateX(-50%); top: calc(70px + env(safe-area-inset-top)); width: min(340px, calc(100% - 32px));
  background: var(--ink); color: var(--on-ink); border-radius: 20px; padding: 14px 18px; box-shadow: 0 12px 40px rgba(0, 0, 0, .35); text-align: center; animation: pop .2s ease-out; }
.timer-label { font-weight: 700; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.timer-time { font: 800 56px/1 var(--display); margin: 4px 0 10px; font-variant-numeric: tabular-nums; color: var(--accent); }
.timer .row { justify-content: center; }
.timer .btn.ghost { color: #fff; box-shadow: inset 0 0 0 1.5px #555; }
.timer.done { animation: flash .5s 3; }
@keyframes pop { from { transform: translate(-50%, -20px); opacity: 0; } }
@keyframes flash { 50% { background: #3a3a3a; } }
@media (min-width: 900px) { .timer { top: auto; bottom: 90px; } }

/* ---------- Recettes ---------- */
.recipe-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.recipe { padding: 0; overflow: hidden; text-align: left; cursor: pointer; color: var(--text); font: inherit; transition: border-color .15s; }
.recipe:hover { border-color: var(--ink); }
.recipe-img { aspect-ratio: 16 / 10; background: var(--surface-2); display: grid; place-items: center; color: #c4c4c4; }
.recipe-img img { width: 100%; height: 100%; object-fit: cover; }
.recipe-img .ic { width: 44px; height: 44px; }
.recipe-body { padding: 14px; }
.recipe-body h3 { margin: 4px 0 8px; }
.macros { display: flex; gap: 6px 12px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.macros b { color: var(--text); }
.modal-hero { width: calc(100% + 44px); max-width: none; margin: -22px -22px 16px; aspect-ratio: 16 / 8; object-fit: cover; border-radius: 18px 18px 0 0; }

/* ---------- Boutique ---------- */
.shop-hero { background: var(--ink); color: var(--on-ink); border-radius: 20px; padding: 28px 22px; margin-bottom: 14px; position: relative; overflow: hidden; }
.shop-hero::after { content: 'RF'; position: absolute; right: -10px; bottom: -40px; font: 800 180px/1 var(--display); color: var(--accent); opacity: .12; }
.shop-hero .eyebrow { background: var(--accent); color: var(--on-accent); }
.shop-hero h1 { text-transform: none; margin-bottom: 6px; color: var(--accent); }
.shop-hero p { color: #ddd; }
.shop-hero .btn { margin-top: 6px; position: relative; z-index: 1; }
.referral { display: flex; gap: 14px; align-items: center; background: var(--accent); border-color: var(--accent); }
.referral > .ic { width: 40px; height: 40px; color: var(--text); }
.referral h3 { font-size: 26px; margin: 0; }
.referral p { margin: 0; }
.forfaits { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.forfait { position: relative; display: flex; flex-direction: column; }
.forfait.popular { border: 2px solid var(--ink); }
.forfait.current { border: 2.5px solid var(--accent); box-shadow: 0 0 0 2px var(--ink); }
.forfait .tag { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--accent); font: 800 12px var(--display); letter-spacing: .15em; text-transform: uppercase; padding: 3px 12px; border-radius: 999px; white-space: nowrap; }
.forfait .price { font: 800 44px/1 var(--display); margin-bottom: 12px; }
.forfait .price small { font: 400 14px var(--font); color: var(--muted); }
.checks { list-style: none; padding: 0; flex: 1; }
.checks li { display: flex; gap: 8px; font-size: 14px; }
.checks .ic { color: var(--accent); background: var(--ink); border-radius: 50%; padding: 3px; width: 18px; height: 18px; margin-top: 2px; }
.price-rows { border-top: 1px solid var(--border); padding-top: 10px; font-size: 14px; }
.price-rows div { display: flex; justify-content: space-between; padding: 4px 0; }
.price-rows em { font-style: normal; font-size: 11px; font-weight: 700; color: var(--success); background: rgba(31, 164, 90, .1); padding: 1px 6px; border-radius: 6px; margin-left: 4px; }
.perk { margin-top: 10px; text-align: center; background: var(--ink); color: var(--accent); font-weight: 700; font-size: 13px; padding: 8px; border-radius: 8px; }
.promo-card { border: 2px solid var(--accent); }

/* ---------- Diète ---------- */
.file-ic { width: 42px; height: 42px; border-radius: 10px; background: var(--ink); color: var(--accent); display: grid; place-items: center; flex: none; }

/* ---------- Guide ---------- */
.tempo-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 10px 0 16px; }
.tempo-grid div { background: var(--ink); color: var(--on-ink); border-radius: 12px; padding: 12px 8px; text-align: center; }
.tempo-grid b { display: block; font: 800 40px/1 var(--display); color: var(--accent); }
.tempo-grid span { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; margin-top: 4px; }
.tempo-grid small { color: #bbb; font-size: 11px; }
@media (max-width: 560px) { .tempo-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Modales / toasts ---------- */
.modal-wrap { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, .55); display: flex; align-items: flex-end; justify-content: center; padding: 0; animation: fade .15s; }
.modal { position: relative; width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; background: var(--surface); border-radius: 20px 20px 0 0;
  padding: 22px; padding-bottom: max(22px, env(safe-area-inset-bottom)); animation: up .2s ease-out; }
.modal.wide { max-width: 780px; }
.modal h3 { padding-right: 36px; font-size: 24px; }
.modal-x { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--surface-2); color: var(--text); font-size: 22px; line-height: 1; cursor: pointer; z-index: 2; }
.modal-x:hover { background: var(--ink); color: var(--accent); }
@media (min-width: 640px) {
  .modal-wrap { align-items: center; padding: 20px; }
  .modal { border-radius: 20px; }
}
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(30px); opacity: 0; } }
.video-box { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: 12px; overflow: hidden; }
.video-box iframe, .video-box video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.menu-head { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; padding-right: 36px; }
.menu-list { display: flex; flex-direction: column; }
.menu-list a, .menu-list button { display: flex; gap: 12px; align-items: center; padding: 14px 6px; border: 0; border-top: 1px solid var(--border); background: none; color: var(--text); font: 500 15px var(--font); cursor: pointer; text-align: left; }
.menu-list a:hover, .menu-list button:hover { background: var(--surface-2); }
.celebrate .big-emoji { font-size: 56px; }
.toast { position: fixed; z-index: 80; left: 50%; top: 16px; transform: translate(-50%, -20px); opacity: 0; transition: .25s; background: var(--ink); color: #fff;
  padding: 12px 18px; border-radius: 12px; font-weight: 600; font-size: 14px; box-shadow: 0 8px 30px rgba(0, 0, 0, .25); max-width: calc(100% - 32px); }
.toast.err { background: var(--danger); color: #fff; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Page d'accueil (avant connexion) ---------- */
.landing { min-height: 100vh; display: flex; flex-direction: column; }
.land-top { background: var(--ink); padding: 14px 16px; padding-top: max(14px, env(safe-area-inset-top)); display: flex; justify-content: center; }
.welcome { position: relative; background: var(--bg); color: var(--text); padding: 24px 16px 0; border-bottom: 1px solid var(--border); }
.welcome-inner { max-width: 980px; margin: 0 auto; display: grid; grid-template-columns: 1fr; gap: 20px; align-items: end; }
.welcome-text { padding-bottom: 8px; }
.welcome-text h1 { font-size: clamp(42px, 11vw, 72px); line-height: 1; margin-bottom: 14px; }
.welcome-text h1 span { display: inline-block; color: var(--accent); background: var(--ink); padding: 0 .18em; border-radius: 8px; margin-top: 4px; }
.welcome-tag { display: inline; font: 700 clamp(20px, 4.5vw, 26px)/1.5 var(--display); text-transform: uppercase; color: var(--accent); background: var(--ink); padding: 2px 10px; border-radius: 6px;
  -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.welcome-text p { color: #333; max-width: 520px; font-size: 16px; margin-top: 16px; }
.welcome-text .row { margin-top: 18px; }
.coach-photo { position: relative; justify-self: center; width: min(320px, 78vw); aspect-ratio: 4 / 5; border-radius: 22px 22px 0 0; overflow: hidden; background: var(--ink); }
.coach-photo::before { content: ''; position: absolute; inset: auto 0 0 0; height: 55%; background: var(--accent); }
.coach-photo img { position: relative; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.coach-photo .ph-empty { position: relative; height: 100%; display: grid; place-items: center; align-content: center; text-align: center; color: var(--ink); font: 800 64px/1 var(--display); }
.coach-photo .ph-empty small { display: block; font: 600 13px var(--font); }
.perks { max-width: 980px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; padding: 22px 16px 6px; width: 100%; }
.perks > div { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: 14px; background: var(--surface-2); }
.perks .ic { width: 40px; height: 40px; padding: 9px; border-radius: 10px; background: var(--ink); color: var(--accent); }
.perks b { display: block; font: 700 18px var(--display); text-transform: uppercase; }
.perks span { font-size: 13px; color: var(--muted); }
.auth { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 22px 16px 32px; gap: 18px; scroll-margin-top: 10px; }
.auth-card { width: 100%; max-width: 440px; padding: 22px; }
.auth-card.center h2 { justify-content: center; }
.demo-box { background: var(--accent-soft); border: 1.5px solid var(--accent); border-radius: 12px; padding: 14px; margin-bottom: 18px; }
.demo-box p { margin: 4px 0 10px; }
.demo-box .btn { flex: 1; }
.auth-foot { text-align: center; }
@media (min-width: 760px) {
  .welcome { padding-top: 40px; }
  .welcome-inner { grid-template-columns: 1.2fr 1fr; gap: 40px; }
  .welcome-text { padding-bottom: 48px; }
  .coach-photo { width: 100%; max-width: 360px; justify-self: end; }
}
