html { touch-action: manipulation; }
/* Thème : variables claires par défaut, sombres selon le système ou le choix manuel (data-theme). */
:root {
  color-scheme: light dark;
  --bg: #f2f2f7;
  --surface: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --accent: #e8431f;
  --on-accent: #ffffff;
  --border: rgba(0, 0, 0, 0.12);
  --danger: #c62828;
  --ok: #1a9d50;
  --done-bg: #e8f6ee;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000;
    --surface: #1c1c1e;
    --text: #f5f5f7;
    --muted: #9ca3af;
    --accent: #ff6b4a;
    --border: rgba(255, 255, 255, 0.16);
    --danger: #ff6b6b;
    --ok: #34c776;
    --done-bg: #12301d;
  }
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #000000;
  --surface: #1c1c1e;
  --text: #f5f5f7;
  --muted: #9ca3af;
  --accent: #ff6b4a;
  --border: rgba(255, 255, 255, 0.16);
  --danger: #ff6b6b;
  --ok: #34c776;
  --done-bg: #12301d;
}

/* Dynamic Type : sur iOS la police système suit le réglage de taille de texte. */
html { font-family: system-ui, sans-serif; font-size: 100%; }
@supports (font: -apple-system-body) { html { font: -apple-system-body; } }

html, body { height: 100%; margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
}
#app { display: flex; flex-direction: column; height: 100%; height: 100dvh; }
.loading { margin: auto; color: var(--muted); }

.topbar {
  display: flex; align-items: center; gap: 0.5rem;
  padding: calc(env(safe-area-inset-top) + 0.5rem) 1rem 0.5rem;
  background: var(--bg);
}
.topbar h1 { flex: 1; margin: 0; font-size: 1.75rem; line-height: 1.2; }
.back, .link-btn {
  display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 0.25rem;
  border: 0; background: none; color: var(--accent); font: inherit; text-decoration: none; cursor: pointer;
}
.link-btn { font-weight: 600; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.75rem; height: 2.75rem; border-radius: 50%;
  background: var(--accent); color: var(--on-accent); text-decoration: none;
}
.topbar:has(.back) h1 { font-size: 1.25rem; text-align: center; }

main { flex: 1; overflow-y: auto; padding: 0 1rem 1rem; -webkit-overflow-scrolling: touch; }
main:focus { outline: none; }

.banner {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  margin: 0 1rem; padding: 0.625rem 0.875rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: 0.75rem;
}
.banner.error { border-color: var(--accent); }


.empty { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; margin-top: 4rem; text-align: center; color: var(--muted); }
.empty .icon svg { width: 3rem; height: 3rem; }
.empty h2 { margin: 0; color: var(--text); font-size: 1.25rem; }
.empty p { margin: 0; max-width: 20rem; }

.tabbar {
  display: flex;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar a {
  flex: 1; min-height: 3rem; padding: 0.375rem 0.125rem;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.125rem;
  color: var(--muted); text-decoration: none; font-size: 0.6875rem;
}
.tabbar a[aria-current="page"] { color: var(--accent); }

.icon svg {
  width: 1.5rem; height: 1.5rem; display: block;
  fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round;
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* --- Boutons --- */
.btn {
  box-sizing: border-box; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 2.75rem; padding: 0 1rem; border: 0; border-radius: 0.625rem;
  background: var(--surface); color: var(--text); font: inherit; font-weight: 600; cursor: pointer;
  border: 1px solid var(--border);
}
.btn.primary { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.btn.danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn.block { display: flex; width: 100%; margin-top: 1.5rem; }

/* --- Recherche, puces, liste --- */
.search-row {
  display: flex; align-items: center; gap: 0.5rem; padding: 0 0.75rem; min-height: 2.75rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: 0.625rem; color: var(--muted);
}
.search-row .icon svg { width: 1.25rem; height: 1.25rem; }
.search { flex: 1; min-width: 0; border: 0; background: none; color: var(--text); font: inherit; min-height: 2.5rem; }
.search:focus { outline: none; }
.search-row:focus-within { outline: 2px solid var(--accent); }

.chips { display: flex; gap: 0.5rem; margin: 0.75rem -1rem 0; padding: 0 1rem 0.25rem; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; min-height: 2.25rem; padding: 0 0.875rem; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: 0.9375rem; cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

.count { margin: 0.5rem 0 0; font-size: 0.8125rem; color: var(--muted); }
.section-title { margin: 1.25rem 0 0.375rem; font-size: 0.8125rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.list { list-style: none; margin: 0; padding: 0; background: var(--surface); border-radius: 0.75rem; overflow: hidden; }
.list li + li { border-top: 1px solid var(--border); }
.row {
  display: flex; align-items: center; gap: 0.5rem; min-height: 3.25rem; padding: 0.5rem 0.875rem;
  color: var(--text); text-decoration: none;
}
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.row-title { font-weight: 500; overflow-wrap: anywhere; }
.row-sub { font-size: 0.8125rem; color: var(--muted); }
.row .icon { color: var(--muted); }
.row .icon svg { width: 1.125rem; height: 1.125rem; }
.badge { padding: 0.125rem 0.5rem; border-radius: 999px; background: var(--bg); color: var(--muted); font-size: 0.75rem; }

/* --- Formulaire --- */
.form { display: flex; flex-direction: column; gap: 1rem; }
.field { display: flex; flex-direction: column; gap: 0.375rem; }
.field label { font-size: 0.875rem; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; box-sizing: border-box; min-height: 2.75rem; padding: 0.5rem 0.75rem;
  border: 1px solid var(--border); border-radius: 0.625rem; background: var(--surface); color: var(--text);
  font: inherit; font-size: 1rem; /* 16 px minimum : évite le zoom automatique d'iOS à la saisie */
}
.field [aria-invalid="true"] { border-color: var(--danger); }
.field-error { margin: 0; color: var(--danger); font-size: 0.9375rem; }
.field-error[hidden] { display: none; }

/* --- Dialogue de confirmation et message flash --- */
.sheet {
  box-sizing: border-box; width: min(24rem, calc(100% - 2rem)); padding: 1.25rem; border: 0; border-radius: 1rem;
  background: var(--surface); color: var(--text);
}
.sheet::backdrop { background: rgba(0, 0, 0, 0.45); }
.sheet h2 { margin: 0 0 0.5rem; font-size: 1.125rem; }
.sheet p { margin: 0 0 1rem; color: var(--muted); }
.sheet-actions { display: flex; gap: 0.5rem; justify-content: flex-end; }
.toast {
  position: fixed; left: 50%; top: calc(env(safe-area-inset-top) + 4.25rem); z-index: 10;
  transform: translate(-50%, -0.5rem); max-width: calc(100% - 2rem); padding: 0.625rem 1rem; border-radius: 999px;
  background: var(--text); color: var(--bg); font-size: 0.9375rem; text-align: center;
  opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }

/* --- Utilitaires --- */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.hint { margin: 0.75rem 0; color: var(--muted); font-size: 0.9375rem; }
.page { padding-bottom: 1rem; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; }
.btn.block-top { display: flex; width: 100%; margin-top: 0.25rem; min-height: 3.25rem; font-size: 1.0625rem; }
.btn.compact { min-height: 2.75rem; padding: 0 0.875rem; font-size: 0.9375rem; }
.btn.block-sm { display: flex; width: 100%; margin-top: 0.5rem; }
.icon-btn.flat { width: 2.75rem; height: 2.75rem; background: none; color: var(--muted); border: 0; cursor: pointer; }
.icon-btn.flat:disabled { opacity: 0.3; cursor: default; }
.icon-btn.flat .icon svg { width: 1.25rem; height: 1.25rem; }

/* --- Accueil de la séance --- */
.card { display: flex; align-items: center; gap: 0.75rem; padding: 0.875rem; background: var(--surface); border-radius: 0.75rem; color: var(--text); text-decoration: none; }
.card.resume { border: 2px solid var(--accent); margin-top: 0.25rem; }
.chrono { font-variant-numeric: tabular-nums; }
.row.split { padding: 0 0.5rem 0 0; gap: 0.25rem; }
.split-main { flex: 1; min-width: 0; display: flex; align-items: center; min-height: 3.25rem; padding: 0.5rem 0 0.5rem 0.875rem; color: var(--text); text-decoration: none; }
.row.split > .row-main { padding: 0.5rem 0 0.5rem 0.875rem; }
.row-btn { width: 100%; border: 0; background: none; font: inherit; text-align: left; cursor: pointer; box-sizing: border-box; }

/* --- Éditeur de routine --- */
.item { padding: 0.625rem 0.875rem; }
.item-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.item-btns { display: inline-flex; flex: none; }
.item-fields { display: flex; flex-wrap: wrap; gap: 0.5rem 0.75rem; margin-top: 0.25rem; }
.mini-field { display: flex; flex-direction: column; gap: 0.125rem; font-size: 0.8125rem; color: var(--muted); }
.mini-field input { width: 4.5rem; box-sizing: border-box; min-height: 2.5rem; padding: 0 0.5rem; text-align: center; border: 1px solid var(--border); border-radius: 0.5rem; background: var(--bg); color: var(--text); font: inherit; font-size: 1rem; }

/* --- Sélecteur d'exercices --- */
.check { display: inline-flex; align-items: center; justify-content: center; width: 1.5rem; height: 1.5rem; flex: none; border: 2px solid var(--border); border-radius: 50%; color: transparent; }
.check .icon svg { width: 0.875rem; height: 0.875rem; stroke-width: 3; }
.row-btn[aria-pressed="true"] .check { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.link-btn:disabled { opacity: 0.4; cursor: default; }

/* --- Séance active --- */
.stats {
  position: sticky; top: 0; z-index: 2; display: flex; align-items: baseline; justify-content: space-between; gap: 0.75rem;
  margin: 0 -1rem; padding: 0.5rem 1rem; background: var(--bg); border-bottom: 1px solid var(--border);
}
.chrono.big { font-size: 1.5rem; font-weight: 600; }
.summary { color: var(--muted); font-size: 0.9375rem; text-align: right; }
.carte { margin-top: 1rem; padding: 0.75rem; background: var(--surface); border-radius: 0.75rem; }
.carte-tete { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.carte-titre { margin: 0; font-size: 1.0625rem; overflow-wrap: anywhere; }
.pr-badge { display: inline-flex; align-items: center; gap: 0.25rem; margin-left: 0.5rem; padding: 0.125rem 0.5rem; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: 0.75rem; font-weight: 600; vertical-align: middle; }
.pr-badge[hidden] { display: none; }
.pr-badge .icon svg { width: 0.875rem; height: 0.875rem; }
.set-head, .set-row { display: grid; grid-template-columns: 2.25rem minmax(0, 1.25fr) minmax(0, 1fr) 2.75rem; gap: 0.375rem; align-items: center; }
.set-head { margin: 0.5rem 0 0.25rem; font-size: 0.75rem; color: var(--muted); text-align: center; }
.sets { display: flex; flex-direction: column; gap: 0.25rem; }
.swipe { position: relative; overflow: hidden; border-radius: 0.5rem; }
.swipe-del {
  position: absolute; top: 0; right: 0; bottom: 0; width: 6.5rem; border: 0; background: var(--danger); color: #fff;
  font: inherit; font-weight: 600; cursor: pointer;
}
.set-row { position: relative; padding: 0.25rem 0; background: var(--surface); touch-action: pan-y; transition: transform 0.2s; }
.set-row[data-done="true"] { background: var(--done-bg); }
.swipe:has(.swipe-del:focus-visible) .set-row { transform: translateX(-6.5rem); }
.set-idx { min-height: 2.75rem; border: 0; border-radius: 0.5rem; background: var(--bg); color: var(--muted); font: inherit; font-weight: 600; cursor: pointer; }
.set-row[data-warm="true"] .set-idx { background: var(--accent); color: var(--on-accent); }
.stepper { display: grid; grid-template-columns: 2rem minmax(0, 1fr) 2rem; align-items: center; border: 1px solid var(--border); border-radius: 0.5rem; background: var(--bg); overflow: hidden; }
.stepper input { min-width: 0; width: 100%; box-sizing: border-box; min-height: 2.75rem; padding: 0; border: 0; background: none; color: var(--text); text-align: center; font: inherit; font-size: 1rem; font-variant-numeric: tabular-nums; }
.stepper input:focus-visible { outline-offset: -2px; }
.step { min-height: 2.75rem; padding: 0; border: 0; background: none; color: var(--muted); font: inherit; font-size: 1.25rem; cursor: pointer; }
.set-ok { display: inline-flex; align-items: center; justify-content: center; min-height: 2.75rem; border: 2px solid var(--border); border-radius: 0.5rem; background: none; color: var(--muted); cursor: pointer; }
.set-ok[aria-pressed="true"] { background: var(--ok); border-color: var(--ok); color: #fff; }
.set-ok .icon svg { width: 1.375rem; height: 1.375rem; stroke-width: 2.5; }
.notes { margin-top: 1rem; }
.field textarea { resize: vertical; }
@media (prefers-reduced-motion: reduce) { .set-row { transition: none; } }

/* --- Minuteur de repos --- */
.rest { background: var(--surface); border-top: 1px solid var(--border); }
.rest[hidden] { display: none; }
.rest-progress { height: 0.25rem; background: var(--border); }
.rest-fill { height: 100%; width: 0; background: var(--accent); transition: width 1s linear; }
.rest-body { display: flex; align-items: center; gap: 0.5rem; padding: 0.375rem 1rem; }
.rest-label { color: var(--muted); font-size: 0.875rem; }
.rest-time { flex: 1; font-size: 1.375rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.rest .btn { min-width: 2.75rem; padding: 0 0.625rem; }
@media (prefers-reduced-motion: reduce) { .rest-fill { transition: none; } }

/* --- Historique --- */
.segmented { display: flex; padding: 0.1875rem; margin-top: 0.25rem; background: var(--border); border-radius: 0.625rem; }
.seg { flex: 1; min-height: 2.5rem; border: 0; border-radius: 0.5rem; background: none; color: var(--text); font: inherit; font-size: 0.9375rem; cursor: pointer; }
.seg[aria-pressed="true"] { background: var(--surface); font-weight: 600; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15); }
.section-head .count { font-size: 0.8125rem; color: var(--muted); }

.cal-nav { display: flex; align-items: center; justify-content: space-between; margin-top: 0.5rem; }
.cal-titre { margin: 0; font-size: 1.125rem; text-transform: capitalize; }
.cal { width: 100%; border-collapse: collapse; table-layout: fixed; }
.cal th { padding: 0.25rem 0; font-size: 0.75rem; font-weight: 500; color: var(--muted); }
.cal td { padding: 0.125rem; text-align: center; }
.cal-day {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.125rem;
  width: 100%; min-height: 2.75rem; box-sizing: border-box; border: 0; border-radius: 0.5rem; background: none;
  color: var(--text); font: inherit; font-size: 0.9375rem;
}
.cal-day.out { color: var(--muted); opacity: 0.45; }
.cal-day.today { outline: 2px solid var(--border); outline-offset: -2px; font-weight: 700; }
.cal-day.has { background: var(--surface); cursor: pointer; }
.cal-day.has[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.dots { display: flex; gap: 0.1875rem; height: 0.375rem; }
.dots i { width: 0.3125rem; height: 0.3125rem; border-radius: 50%; background: var(--accent); }
.cal-day.has[aria-pressed="true"] .dots i { background: var(--on-accent); }

.detail-date { margin: 0.25rem 0 0.75rem; color: var(--muted); }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
.tile { display: flex; flex-direction: column; align-items: center; padding: 0.625rem 0.25rem; background: var(--surface); border-radius: 0.75rem; text-align: center; }
.tile-val { font-size: 1.0625rem; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.tile-lib { font-size: 0.75rem; color: var(--muted); }
.notes-text { margin: 0; padding: 0.75rem; background: var(--surface); border-radius: 0.75rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.pr-list { padding: 0.25rem 0.75rem; }
.pr-line { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0; }
.pr-line .icon { color: var(--accent); }
.pr-line .icon svg { width: 1.125rem; height: 1.125rem; }
.detail-sets { list-style: none; margin: 0.5rem 0 0; padding: 0; }
.detail-set { display: flex; align-items: center; gap: 0.75rem; padding: 0.375rem 0; font-variant-numeric: tabular-nums; }
.detail-set + .detail-set { border-top: 1px solid var(--border); }
.detail-n { display: inline-flex; align-items: center; justify-content: center; width: 1.75rem; height: 1.75rem; border-radius: 0.375rem; background: var(--bg); color: var(--muted); font-size: 0.8125rem; font-weight: 600; }
.detail-set.warm .detail-n { background: var(--accent); color: var(--on-accent); }
.field input[type="datetime-local"] { min-height: 2.75rem; }

/* --- Progression --- */
.carte-lien { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; color: var(--text); text-decoration: none; min-height: 2.75rem; }
.carte-lien .icon { color: var(--muted); }
.carte-lien .icon svg { width: 1.125rem; height: 1.125rem; }
.rec-list { list-style: none; margin: 0.25rem 0 0; padding: 0; }
.list.rec-list { padding: 0.25rem 0.875rem; }
.rec-line { display: grid; grid-template-columns: 1fr auto auto; gap: 0.75rem; align-items: baseline; padding: 0.4375rem 0; font-variant-numeric: tabular-nums; }
.rec-line + .rec-line { border-top: 1px solid var(--border); }
.rec-kind { color: var(--muted); }
.rec-val { font-weight: 600; }
.rec-date { min-width: 4.5rem; text-align: right; font-size: 0.8125rem; color: var(--muted); }
.demo-box { margin-top: 1.5rem; }

.chart-card { padding-bottom: 0.5rem; }
.summary.left { margin: 0.25rem 0 0.25rem; text-align: left; }
.chart-wrap { margin: 0 -0.25rem; }
.chart { display: block; width: 100%; height: auto; overflow: visible; }
.chart-grid line { stroke: var(--border); stroke-width: 1; }
.chart-ylabels text, .chart-xlabels text { fill: var(--muted); font-size: 11px; font-family: inherit; font-variant-numeric: tabular-nums; }
.chart-line { stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart-dot { fill: var(--surface); stroke: var(--accent); stroke-width: 2; pointer-events: none; }
.chart-dot.sel { fill: var(--accent); }
.chart-hit { fill: transparent; cursor: pointer; }
.readout { min-height: 1.5rem; margin: 0.25rem 0 0; font-size: 0.9375rem; font-variant-numeric: tabular-nums; }
.chart-data { margin-top: 0.25rem; font-size: 0.875rem; }
.chart-data summary { min-height: 2.75rem; display: flex; align-items: center; color: var(--accent); cursor: pointer; }
.chart-data table { width: 100%; border-collapse: collapse; }
.chart-data th, .chart-data td { padding: 0.25rem 0; text-align: left; font-weight: 400; font-variant-numeric: tabular-nums; }
.chart-data td { text-align: right; }
.chart-data tr + tr { border-top: 1px solid var(--border); }

/* --- Réglages --- */
.settings { padding: 0; }
.setting { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; min-height: 3.25rem; padding: 0.5rem 0.875rem; }
.setting-main { display: flex; flex-direction: column; min-width: 0; }
.setting-btn {
  display: flex; flex-direction: column; align-items: flex-start; width: 100%; min-height: 3.25rem; padding: 0.5rem 0.875rem; box-sizing: border-box;
  border: 0; background: none; color: var(--accent); font: inherit; text-align: left; cursor: pointer;
}
.setting-btn .row-sub { color: var(--muted); }
.setting-btn.danger-text { color: var(--danger); }
.segmented.inline { margin: 0; flex: none; }
.segmented.inline .seg { min-width: 3rem; padding: 0 0.625rem; }
.stepper-inline { display: inline-flex; align-items: center; flex: none; border: 1px solid var(--border); border-radius: 0.5rem; background: var(--bg); }
.stepper-inline .step { width: 2.75rem; }
.stepper-inline output { min-width: 3.5rem; text-align: center; font-variant-numeric: tabular-nums; font-weight: 600; }
.setting .value { color: var(--muted); text-align: right; font-size: 0.9375rem; overflow-wrap: anywhere; }
.hint.warn { color: var(--danger); }
.sheet p { white-space: pre-line; }
.sheet-actions.stack { flex-direction: column; }
.sheet-actions.stack .btn { width: 100%; }

/* Programme de force */
.max-field { display: flex; align-items: center; gap: 0.375rem; }
.max-field input { width: 5rem; box-sizing: border-box; min-height: 2.5rem; padding: 0 0.5rem; text-align: right; border: 1px solid var(--border); border-radius: 0.5rem; background: var(--bg); color: var(--text); font: inherit; font-size: 1rem; }
.max-field .unit { width: 1.75rem; color: var(--muted); font-size: 0.9375rem; }
.prog-day { margin-top: 1rem; padding: 0.75rem 0.875rem; background: var(--surface); border-radius: 0.75rem; }
.prog-day-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.prog-day-head h3 { margin: 0; font-size: 1rem; }
.prog-list { list-style: none; margin: 0.5rem 0 0; padding: 0; }
.prog-line { display: flex; justify-content: space-between; gap: 0.75rem; padding: 0.25rem 0; border-top: 1px solid var(--border); }
.prog-line > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.prog-line > span:last-child { flex: none; font-variant-numeric: tabular-nums; }
.prog-line:first-child { border-top: 0; }

/* Schémas des exercices (voir internal/diagram) */
.dg { display: block; width: 100%; height: auto; color: var(--text); }
.dg-pt { fill: var(--surface); }
.dg-c { fill: none; stroke: var(--muted); stroke-width: 1.5; }
.dg-d { fill: var(--border); stroke: var(--muted); stroke-width: 2.5; stroke-linecap: round; }
.dg-dl { fill: none; stroke: var(--muted); stroke-width: 5; stroke-linecap: round; }
.dg-d0 { fill: none; stroke: var(--muted); stroke-width: 2.5; }
.dg-sol { stroke: var(--border); stroke-width: 2; }
.ex-schemas { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin: 0.25rem 0 1rem; }
.ex-schemas > div { background: var(--surface); border-radius: 0.625rem; padding: 0.25rem; }
.ex-thumb { width: 4.75rem; flex: none; border-radius: 0.5rem; background: var(--surface); }
.sheet .ex-schemas { margin-bottom: 0.75rem; }

/* Muscles travaillés sur les schémas */
.dg-s { fill: #969ba5; }
.dg-s2 { fill: #aeb3bc; }
.dg-s3 { fill: #6f7480; }
.dg-m1 { fill: #e8431f; }
.dg-m2 { fill: #f5a524; }
.dg-p { fill: var(--muted); fill-opacity: 0.7; stroke: var(--muted); stroke-width: 1.5; }
.legende { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; margin: 0 0 1rem; font-size: 0.875rem; color: var(--muted); }
.legende .pastille { display: inline-block; width: 0.75rem; height: 0.75rem; border-radius: 50%; margin-right: 0.375rem; vertical-align: -0.0625rem; }
.legende .p1 { background: #e8431f; }
.legende .p2 { background: #f5a524; }
.carte-repos { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin: 0.25rem 0 0.5rem; font-size: 0.875rem; color: var(--muted); }
.prog-day-btns { display: flex; gap: 0.5rem; }
.token-field { width: 11rem; box-sizing: border-box; min-height: 2.5rem; padding: 0 0.5rem; border: 1px solid var(--border); border-radius: 0.5rem; background: var(--bg); color: var(--text); font: inherit; font-size: 1rem; }
.row-main .badge { align-self: flex-start; }
.row.today { box-shadow: inset 3px 0 0 var(--accent); }
.prog-day.today { box-shadow: inset 3px 0 0 var(--accent); }
.badge-jour { margin-left: 0.5rem; vertical-align: middle; }
.sheet { max-height: 88dvh; overflow-y: auto; }
.item-fields.prog-reglages { flex-wrap: nowrap; align-items: flex-end; gap: 0.5rem; }
.prog-reglages .mini-field input { width: 3.25rem; }
.prog-reglages .stepper-inline .step { width: 2.5rem; }
.prog-reglages .stepper-inline output { min-width: 3rem; }
