/* Suivi personnel — feuille de style v2.
   Mobile d'abord, une main, lisible au soleil. Moins de bordures, plus de
   respiration ; l'état (bloqué, fait, critique) se lit à un filet de couleur,
   pas à un cadre. Les sélecteurs de la v1 sont tous conservés. */

/* ------------------------------------------------------------ tokens */

:root {
  --bg: #f4f5f9;
  --bg-soft: #f4f5f9;
  --surface: #ffffff;
  --surface-2: #f0f2f7;
  --border: #e4e7ee;
  --border-strong: #c9cfdb;
  --text: #13161d;
  --text-soft: #4d5567;
  --text-faint: #7b8394;

  --accent: #4f46e5;
  --accent-text: #ffffff;
  --accent-soft: #eceafe;

  --blocked: #b4521b;
  --blocked-soft: #fdf0e6;
  --critical: #c0233f;
  --critical-soft: #fdeaee;
  --ok: #157a4b;
  --ok-soft: #e4f6ec;

  --radius: 16px;
  --radius-sm: 12px;
  --tap: 48px;
  --nav-h: 60px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);

  --shadow: 0 1px 2px rgba(19, 22, 29, .05), 0 6px 20px rgba(19, 22, 29, .05);
  --shadow-lg: 0 -8px 40px rgba(19, 22, 29, .18);

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0d12;
    --bg-soft: #0b0d12;
    --surface: #141821;
    --surface-2: #1b202c;
    --border: #232938;
    --border-strong: #3a4256;
    --text: #f1f3f8;
    --text-soft: #aeb6c6;
    --text-faint: #7f8899;

    --accent: #8f8bff;
    --accent-text: #0b0d12;
    --accent-soft: #232449;

    --blocked: #ffb27a;
    --blocked-soft: #2e2012;
    --critical: #ff8fa6;
    --critical-soft: #34151e;
    --ok: #6ee2a6;
    --ok-soft: #10291d;

    --shadow: none;
    --shadow-lg: 0 -8px 40px rgba(0, 0, 0, .6);

    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0b0d12;
  --bg-soft: #0b0d12;
  --surface: #141821;
  --surface-2: #1b202c;
  --border: #232938;
  --border-strong: #3a4256;
  --text: #f1f3f8;
  --text-soft: #aeb6c6;
  --text-faint: #7f8899;

  --accent: #8f8bff;
  --accent-text: #0b0d12;
  --accent-soft: #232449;

  --blocked: #ffb27a;
  --blocked-soft: #2e2012;
  --critical: #ff8fa6;
  --critical-soft: #34151e;
  --ok: #6ee2a6;
  --ok-soft: #10291d;

  --shadow: none;
  --shadow-lg: 0 -8px 40px rgba(0, 0, 0, .6);

  color-scheme: dark;
}

/* ------------------------------------------------------------- base */

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: contain;
}
body.no-scroll { overflow: hidden; }

button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -.01em; }
a { color: var(--accent); }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; }
svg { display: block; }

/* ------------------------------------------------------------ layout */

.app {
  max-width: 680px;
  margin: 0 auto;
  /* L'app passe sous la barre de statut iOS : on lui réserve sa hauteur. */
  padding: calc(var(--safe-t) + 14px) 16px calc(var(--nav-h) + var(--safe-b) + 92px);
}

.view > * + * { margin-top: 14px; }

.view-head { padding-top: 4px; }
.view-head h1 { font-size: 30px; font-weight: 800; letter-spacing: -.025em; }
.view-head .sub { margin: 4px 0 0; color: var(--text-soft); font-size: 15px; }
.eyebrow { margin: 0 0 4px; font-size: 22px; line-height: 1; }

.today-date { margin: 0; color: var(--text-soft); font-size: 15px; text-transform: capitalize; }

.block-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-top: 24px;
  padding: 0 2px;
}
.block-head h2 { font-size: 18px; font-weight: 700; }

.counter { font-size: 14px; font-weight: 600; color: var(--text-faint); font-variant-numeric: tabular-nums; }

.group-title {
  margin: 18px 2px 8px;
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-faint);
}

.sub { color: var(--text-soft); font-size: 15px; }
.hint { color: var(--text-faint); font-size: 13.5px; line-height: 1.45; margin: 8px 2px 0; }

.empty {
  margin: 10px 0;
  padding: 18px 16px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  color: var(--text-faint);
  text-align: center;
  font-size: 15px;
}

/* --------------------------------------------------------- surfaces */

.panel, .hero, .item, .fold, .callout, .nut, .nut-tile, .nut-food, .trend, .rate-tile,
.chart, .metric, .objective-card, .blocker-head, .section-card, .row-link, .start-card,
.ex-block, .ph-card, .food-row, .sup-row, .objective, .preview-item, .q-preview, .target,
.rate-table, .note-preview {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.panel { padding: 16px; }
.panel h2 { font-size: 17px; margin-bottom: 12px; }

/* --------------------------------------------------------------- hero */

.hero { padding: 20px 18px; border-color: var(--accent); }
.hero-clear { border-color: var(--border); }

.hero-kicker {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--accent);
}
.hero-clear .hero-kicker { color: var(--ok); }
.hero-title { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.hero-detail { margin: 10px 0 0; color: var(--text-soft); font-size: 15px; }
.hero-warn {
  margin: 14px 0 0;
  padding: 12px 14px;
  background: var(--critical-soft);
  color: var(--critical);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}
.hero-deps { margin: 12px 0 0; font-size: 14px; font-weight: 600; color: var(--blocked); }
.hero-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }

/* ------------------------------------------------------------ boutons */

.btn {
  min-height: var(--tap);
  padding: 0 18px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  font-size: 15.5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.985); }
.btn[disabled] { opacity: .45; cursor: default; }

.btn-primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.btn-ghost { background: transparent; }
.btn-danger { background: var(--critical); color: #fff; border-color: var(--critical); }
.btn-danger-ghost { color: var(--critical); border-color: var(--critical); background: transparent; }
.btn-block { display: flex; width: 100%; margin-top: 10px; }
.btn-small { min-height: 40px; padding: 0 14px; font-size: 14.5px; }

.linkish { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 600; text-decoration: underline; cursor: pointer; }

/* -------------------------------------------------------------- items */

.items { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }

.item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px 12px 12px;
  border-left: 3px solid transparent;
}
.item.is-doing { border-left-color: var(--accent); }
.item.is-blocked { border-left-color: var(--blocked); }
.item.is-critical { border-left-color: var(--critical); }
.item.is-done { border-left-color: var(--ok); opacity: .55; }
.item.is-done .item-title { text-decoration: line-through; }
.item.is-rejected, .item.is-queue { opacity: .55; }
.item.is-rejected .item-title { text-decoration: line-through; }
.item.is-optional { border-left-style: dashed; border-left-color: var(--border-strong); }
.item.kind-info { background: var(--surface-2); box-shadow: none; }

.drag-handle {
  flex: 0 0 auto;
  align-self: center;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: var(--text-soft);
  font-size: 18px;
  line-height: 1;
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.drag-handle:active { cursor: grabbing; background: var(--surface-2); }
.is-dragging { position: relative; z-index: 5; background: var(--surface-2); box-shadow: 0 6px 16px rgb(0 0 0 / .3); }

.check {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  margin-top: 1px;
  border: 2px solid var(--border-strong);
  border-radius: 9px;
  background: transparent;
  cursor: pointer;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}
.check::before { content: ""; position: absolute; inset: -10px; }   /* zone tactile élargie */
.check[aria-checked="true"] { background: var(--ok); border-color: var(--ok); }
.check[aria-checked="true"]::after {
  content: "";
  position: absolute;
  left: 8px; top: 3px;
  width: 7px; height: 13px;
  border: solid var(--surface);
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
}
.check-static { width: 28px; height: 28px; border: 2px dotted var(--border); border-radius: 9px; opacity: .5; }

.item-main { flex: 1; min-width: 0; cursor: pointer; }
.item-main:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.item-title { font-weight: 600; overflow-wrap: anywhere; }
.item-detail { margin-top: 3px; color: var(--text-soft); font-size: 14px; overflow-wrap: anywhere; }
.item-warn {
  margin-top: 8px;
  padding: 8px 10px;
  background: var(--critical-soft);
  color: var(--critical);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
}
.item-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

.badge {
  font-size: 12px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-soft);
}
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-blocked { background: var(--blocked-soft); color: var(--blocked); cursor: pointer; }
.badge-critical { background: var(--critical-soft); color: var(--critical); }
.badge-doing, .badge-src, .badge-howto { background: var(--accent-soft); color: var(--accent); }
.badge-howto { cursor: pointer; }
.badge-quiet { font-weight: 600; }

/* ------------------------------------------------------------ callout */

.callout {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: var(--tap);
  padding: 14px 16px;
  background: var(--blocked-soft);
  color: var(--blocked);
  border: 0;
  box-shadow: none;
  text-decoration: none;
  font-size: 15px;
}
.callout span { white-space: nowrap; font-weight: 700; }
.callout-static { display: block; }

/* ------------------------------------------------------------ bloqué */

.blocker-group { margin-top: 22px; }
.blocker-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-left: 3px solid var(--blocked); }
.blocker-head > div { flex: 1; min-width: 0; }
.blocker-head h2 { font-size: 16.5px; }
.blocker-head .sub { font-size: 13.5px; margin-top: 2px; }
.blocker-lock { font-size: 18px; }

/* --------------------------------------------------------- rubriques */

.section-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.section-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 108px;
  padding: 16px;
  text-decoration: none;
  color: var(--text);
}
.section-card.is-priority { border-color: var(--accent); }
.section-icon { font-size: 26px; line-height: 1; }
.section-label { font-weight: 700; margin-top: 6px; }
.section-count { font-size: 13px; color: var(--text-faint); margin-top: auto; }
.section-links { display: grid; gap: 8px; margin-top: 14px; }
.row-link { display: flex; align-items: center; min-height: var(--tap); padding: 0 16px; text-decoration: none; color: var(--text); font-weight: 600; }

/* --------------------------------------------------------------- tabs */

.tabs { display: flex; gap: 8px; overflow-x: auto; padding: 2px; margin: 0 -2px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-soft);
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 600;
  white-space: nowrap;
}
.tab.is-active { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.tab-count { font-size: 12px; opacity: .85; }
.nut-tabs { margin-bottom: 2px; }

/* ------------------------------------------------------------- champs */

.note-block { margin-top: 24px; }
.note-block h3 { font-size: 14px; color: var(--text-faint); margin-bottom: 8px; }

.note-input, .input, .qa-text, .imp-text {
  width: 100%;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  resize: vertical;
}
.input-lg { min-height: var(--tap); font-size: 17px; }
.note-input:focus, .input:focus, .qa-text:focus, .imp-text:focus {
  outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent);
}
.note-preview { padding: 12px 14px; color: var(--text-soft); }
.result-count { margin-top: 10px; }

.field { display: block; }
.field > span { display: block; font-size: 13px; font-weight: 600; color: var(--text-soft); margin-bottom: 6px; }
.field + .field, .field + .chips { margin-top: 14px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface);
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
}
.chip.is-active { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }

.switch { display: flex; align-items: center; gap: 12px; min-height: var(--tap); font-weight: 600; }
.switch input { width: 22px; height: 22px; accent-color: var(--accent); }
.times { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.times .field + .field { margin-top: 0; }
.version { text-align: center; color: var(--text-faint); font-size: 12.5px; margin-top: 24px; }

/* ------------------------------------------------------------- suivi */

.metrics { display: grid; gap: 8px; }
.metric { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: var(--tap); padding: 10px 16px; }
.metric-label { font-weight: 600; }
.metric-input { display: flex; align-items: center; gap: 8px; }
.metric-input input {
  width: 80px; min-height: 40px; padding: 6px 10px; text-align: right;
  background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: 8px;
  font-variant-numeric: tabular-nums; font-size: 17px;
}
.metric-unit { color: var(--text-faint); font-size: 13.5px; min-width: 30px; }

.chart { margin-top: 8px; padding: 12px 16px; }
.chart-head { display: flex; justify-content: space-between; align-items: baseline; }
.chart-label { font-weight: 700; font-size: 14.5px; }
.chart-last { font-variant-numeric: tabular-nums; color: var(--text-soft); font-size: 14px; }
.chart-note { color: var(--text-faint); font-size: 13.5px; }
.chart-empty { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.spark { width: 100%; height: 60px; margin-top: 6px; }
.spark polyline { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.spark circle { fill: var(--accent); }
.chart-axis { display: flex; justify-content: space-between; margin-top: 4px; font-size: 11.5px; color: var(--text-faint); font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------ import */

.imp-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.code {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 12px; overflow-x: auto; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px; line-height: 1.55; white-space: pre;
}
.imp-help { margin-top: 28px; }
.imp-help h3 { font-size: 15.5px; margin-bottom: 8px; }
.preview { margin-top: 8px; padding: 14px; background: var(--surface); border: 1px solid var(--accent); border-radius: var(--radius); }
.preview-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.preview-item { display: flex; gap: 10px; align-items: baseline; padding: 9px 12px; background: var(--surface-2); border: 0; box-shadow: none; border-radius: var(--radius-sm); font-size: 14.5px; }
.preview-item.is-dup { opacity: .55; }
.preview-mark { font-weight: 700; color: var(--ok); }
.preview-item.is-dup .preview-mark { color: var(--text-faint); }
.qa-text { min-height: 96px; font-size: 17px; }
.qa-hint { margin: 0; font-size: 13px; color: var(--text-faint); }

/* ------------------------------------------------------------ pliage */

.fold-actions { display: flex; gap: 8px; justify-content: flex-end; }
.fold { margin-top: 10px; overflow: hidden; }
.fold-head {
  display: flex; align-items: center; gap: 10px;
  min-height: 56px; padding: 10px 16px;
  cursor: pointer; list-style: none; user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.fold-head::-webkit-details-marker { display: none; }
.fold-head:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.fold-head h2 { flex: 1; min-width: 0; font-size: 16.5px; }
.fold-caret { flex: 0 0 auto; width: 20px; font-size: 20px; font-weight: 700; color: var(--text-faint); text-align: center; transition: transform .15s ease; }
.fold[open] > .fold-head .fold-caret { transform: rotate(90deg); }
.fold[open] > .fold-head .when-closed, .fold:not([open]) > .fold-head .when-open { display: none; }
.fold:not([open]) > .fold-head .counter { color: var(--accent); }
.fold:not([open]) > .fold-head .when-closed.is-done { color: var(--ok); }
.fold-body { padding: 0 12px 12px; }
.fold-body .items { margin-top: 0; }
.fold-body .nuts { padding-top: 2px; }

/* ------------------------------------------------- objectifs & taux */

.week-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.week-nav .week-label { flex: 1; min-width: 140px; font-size: 14px; font-weight: 600; color: var(--text-soft); text-align: center; }
.week-nav .btn { text-decoration: none; }

.rate-hero { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rate-tile { padding: 16px; border-left: 3px solid var(--border-strong); }
.rate-label { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-faint); }
.rate-value { font-size: 30px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rate-good { border-left-color: var(--ok); }
.rate-mid { border-left-color: var(--blocked); }
.rate-bad { border-left-color: var(--critical); }
.rate-none { border-left-color: var(--border); }
td.rate-good { color: var(--ok); font-weight: 700; }
td.rate-mid { color: var(--blocked); font-weight: 700; }
td.rate-bad { color: var(--critical); font-weight: 700; }
td.rate-none { color: var(--text-faint); }

.rate-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.rate-table { width: 100%; border-collapse: collapse; overflow: hidden; font-size: 14px; }
.rate-table th, .rate-table td { padding: 10px 12px; text-align: right; border-bottom: 1px solid var(--border); }
.rate-table th { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-faint); white-space: nowrap; }
.rate-table th:first-child, .rate-table td:first-child { text-align: left; }
.rate-table td { font-variant-numeric: tabular-nums; }
.rate-name { font-weight: 600; min-width: 150px; }
.rate-freq { color: var(--text-faint); font-size: 12.5px; white-space: nowrap; }
.rate-total td { font-weight: 800; border-bottom: 0; background: var(--surface-2); }

.rate-strip {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px; text-decoration: none; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--border-strong);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.rate-strip-main { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; min-width: 0; }
.rate-strip-main strong { font-size: 26px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rate-strip-main span { font-size: 14px; color: var(--text-soft); }
.rate-strip-obj { font-size: 13.5px; font-weight: 600; color: var(--accent); text-align: right; }

.objective-card { margin-top: 14px; }
.objective-period { margin: -6px 0 12px; }
.objective-add { display: flex; gap: 8px; margin-bottom: 10px; }
.objective-add input {
  flex: 1; min-width: 0; min-height: var(--tap); padding: 0 12px;
  background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); font-size: 16px;
}
.objective-add input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.objective-add .btn { min-width: 56px; padding: 0; font-size: 22px; }
.objectives { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.objective { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: var(--surface-2); border: 0; box-shadow: none; border-radius: var(--radius-sm); }
.objective-text { flex: 1; min-width: 0; overflow-wrap: anywhere; font-weight: 600; }
.objective.is-done { opacity: .6; }
.objective.is-done .objective-text { text-decoration: line-through; }
.obj-del, .nut-del, .set-del {
  flex: 0 0 auto; width: 38px; height: 38px;
  border: 1px solid var(--border); border-radius: 10px; background: transparent;
  color: var(--critical); font-size: 14px; cursor: pointer;
}

.target-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.target { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-left: 3px solid var(--border-strong); border-radius: var(--radius-sm); }
.target.is-met { border-left-color: var(--ok); }
.target-mark { font-weight: 800; color: var(--text-faint); width: 18px; text-align: center; }
.target.is-met .target-mark { color: var(--ok); }
.target-label { flex: 1; min-width: 0; font-weight: 600; }
.target-val { font-variant-numeric: tabular-nums; font-size: 13.5px; color: var(--text-soft); white-space: nowrap; }

/* --------------------------------------------------------- évolution */

.trends { display: grid; gap: 10px; }
.trend { padding: 12px 16px; }
.trend-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.trend-label { font-weight: 700; font-size: 15px; }
.trend-now { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 14px; white-space: nowrap; }
.trend-up { color: var(--ok); font-size: 12.5px; }
.trend-down { color: var(--critical); font-size: 12.5px; }
.trend-flat { color: var(--text-faint); font-size: 12.5px; }
.trend-bars { display: flex; align-items: flex-end; gap: 5px; height: 46px; padding-bottom: 2px; border-bottom: 1px solid var(--border); }
.trend-bar { flex: 1; min-width: 0; border-radius: 4px 4px 0 0; background: var(--accent); }
.trend-bar.rate-good { background: var(--ok); }
.trend-bar.rate-mid { background: var(--blocked); }
.trend-bar.rate-bad { background: var(--critical); }
.trend-bar.is-empty { background: var(--border); height: 3px !important; }
.trend-bar.is-current { outline: 2px solid var(--accent); outline-offset: 1px; }

/* ------------------------------------------------------- modes d'emploi */

.howto-intro { margin: 0; color: var(--text-soft); }
.howto-steps { margin: 0; padding-left: 22px; display: grid; gap: 12px; }
.howto-steps li { line-height: 1.5; overflow-wrap: anywhere; }
.howto-steps strong { color: var(--text); }
.howto-tempo { margin: 0; padding: 12px 14px; background: var(--surface-2); border-radius: var(--radius-sm); font-size: 14.5px; color: var(--text-soft); }
.howto-tempo strong { color: var(--text); }

/* ---------------------------------------------------------- nutrition */

.nut-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.nut-tile { padding: 14px 16px; }
.nut-tile-label { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-faint); }
.nut-tile-val { display: block; font-size: 28px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.15; white-space: nowrap; }
.nut-tile-target { display: block; font-size: 12.5px; color: var(--text-soft); font-variant-numeric: tabular-nums; }
.nut-tile .bar { margin-top: 8px; }
.nut-tile.is-full .bar-fill { background: var(--ok); }
.nut-tile.is-over .bar-fill { background: var(--critical); }

.bar { height: 6px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--accent); border-radius: 999px; transition: width .2s ease; }

.target-kcal { display: block; color: var(--accent); font-weight: 700; }
[data-act="edit-targets"] { flex-direction: column; gap: 2px; padding: 10px 14px; line-height: 1.3; }

.nuts { display: grid; gap: 8px; }
.nut { padding: 12px 16px; }
.nut-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.nut-label { font-weight: 700; font-size: 14.5px; }
.nut-period { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-faint); white-space: nowrap; }
.nut-val { font-variant-numeric: tabular-nums; font-weight: 700; }
.nut-target { color: var(--text-faint); font-weight: 600; font-size: 13px; }
.nut.is-full .bar-fill { background: var(--ok); }
.nut.is-over .bar-fill { background: var(--critical); }
.nut-warn { display: block; margin: 8px 0 0; padding: 7px 10px; background: var(--critical-soft); color: var(--critical); border-radius: 8px; font-size: 12.5px; font-weight: 600; }
.nut-note { margin: 8px 0 0; font-size: 12.5px; color: var(--text-faint); }
.nut-fill {
  display: block; width: 100%; margin-top: 8px; padding: 8px;
  border: 1px dashed var(--border-strong); border-radius: 8px; background: transparent;
  color: var(--accent); font-size: 13px; font-weight: 700; cursor: pointer;
}
.nut-fill:active { background: var(--accent-soft); }

.gaps { padding: 14px 16px; background: var(--blocked-soft); border-radius: var(--radius); }
.gaps-title { margin: 0 0 10px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--blocked); }
.gaps-row { display: flex; flex-wrap: wrap; gap: 8px; }
.gap-chip {
  display: inline-flex; flex-direction: column; align-items: flex-start; gap: 0;
  min-height: 52px; padding: 6px 12px;
  border: 1px solid var(--blocked); border-radius: 12px; background: var(--surface);
  color: var(--blocked); font-weight: 700; cursor: pointer;
}
.gap-chip-name { font-size: 13px; }
.gap-chip-pct { font-variant-numeric: tabular-nums; font-size: 16px; }
.gap-chip-per { font-size: 10.5px; font-weight: 600; opacity: .75; text-transform: uppercase; letter-spacing: .04em; }
.gap-chip.is-over { border-color: var(--critical); color: var(--critical); }
.gaps .hint { margin-top: 8px; color: var(--blocked); }
.gap-left { color: var(--blocked); font-weight: 600; }

.nut-foods { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.nut-food { display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 14px; }
.nut-food.has-qty { border-color: var(--accent); }
.nut-food-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.nut-food-label { font-weight: 600; font-size: 15px; }
.nut-food-detail { font-size: 12.5px; color: var(--text-faint); font-variant-numeric: tabular-nums; }

.stepper { display: flex; align-items: center; gap: 2px; }
.stepper button, .qty-btn {
  width: 44px; height: 44px;
  border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface-2);
  font-size: 21px; font-weight: 700; line-height: 1; cursor: pointer;
}
.stepper button:disabled, .qty-btn:disabled { opacity: .35; cursor: default; }
.stepper button:active:not(:disabled), .qty-btn:active:not(:disabled) { transform: scale(.94); }
.stepper-qty { min-width: 34px; text-align: center; font-weight: 800; font-size: 17px; font-variant-numeric: tabular-nums; }
.qty-box { display: flex; align-items: center; gap: 4px; flex: 0 0 auto; }
.qty-val {
  min-width: 60px; height: 44px; padding: 0 6px;
  border: 1px solid var(--border); border-radius: 10px; background: transparent;
  font-weight: 700; font-size: 13.5px; font-variant-numeric: tabular-nums; cursor: pointer;
}
.qty-val.is-static { display: inline-flex; align-items: center; justify-content: center; border-color: transparent; }

.nut-libre { margin-top: 8px; }
.nut-libre-macros { display: grid; grid-template-columns: repeat(4, 1fr) 56px; gap: 6px; margin-top: 8px; }
.nut-libre-macros input { min-width: 0; }
.nut-disclaimer { margin-top: 18px; }

.food-results { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; max-height: 46vh; overflow-y: auto; }
.food-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--surface-2); border: 0; box-shadow: none; border-radius: var(--radius-sm); cursor: pointer; }
.food-row:active { background: var(--accent-soft); }
.food-row.is-recipe { box-shadow: inset 3px 0 0 var(--accent); }
.food-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.food-row-label { font-weight: 600; }
.food-row-detail { font-size: 12.5px; color: var(--text-faint); font-variant-numeric: tabular-nums; }
.food-row-add { font-size: 22px; font-weight: 700; color: var(--accent); flex: 0 0 auto; }
.food-row-need { font-size: 12.5px; color: var(--accent); font-weight: 700; }

.q-preview { padding: 12px 14px; background: var(--surface-2); border: 0; box-shadow: none; border-radius: var(--radius-sm); }
.q-macros { display: flex; flex-wrap: wrap; gap: 12px; font-size: 14px; color: var(--text-soft); }
.q-macros strong { font-size: 19px; color: var(--text); font-variant-numeric: tabular-nums; }
.q-micros { margin: 8px 0 0; font-size: 12.5px; color: var(--text-faint); }

.t-preview { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 14px; background: var(--accent-soft); border-radius: var(--radius-sm); }
.t-preview-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-soft); }
.t-preview-val { font-size: 20px; font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; white-space: nowrap; }

.nf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.nf-grid input { min-height: var(--tap); padding: 0 10px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); font-size: 15px; min-width: 0; }
.nf-grid input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.nf-micros { margin-top: 12px; }

.sup-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.sup-row { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--surface-2); border: 0; box-shadow: none; border-radius: var(--radius-sm); }
.sup-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; cursor: pointer; }
.sup-label { font-weight: 600; }
.sup-detail { font-size: 12.5px; color: var(--text-faint); }
.micro-ok { color: var(--ok); font-weight: 700; }
.micro-hole { color: var(--blocked); font-weight: 700; }

/* ---------------------------------------------------------- entraînement */

.start-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.start-card {
  display: flex; flex-direction: column; gap: 4px;
  min-height: 88px; padding: 14px 16px; text-align: left;
  color: var(--text); cursor: pointer; border-left: 3px solid var(--accent);
}
.start-card:active { background: var(--accent-soft); }
.start-title { font-weight: 700; }
.start-detail { font-size: 12.5px; color: var(--text-faint); line-height: 1.35; }
.start-card.is-new { border-left-color: var(--border-strong); border-style: dashed; box-shadow: none; }
/* Muscu : une séance par ligne, pleine largeur, actions à droite. */
.sort-row { display: flex; gap: 4px; padding: 3px; background: var(--surface-2); border-radius: 999px; }
.sort-btn {
  min-height: 30px; padding: 0 11px; border: 0; border-radius: 999px;
  background: transparent; color: var(--text-faint); font-size: 12.5px; font-weight: 700; cursor: pointer;
}
.sort-btn.is-active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

.start-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.start-row {
  display: flex; align-items: stretch;
  background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--accent);
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
}
.start-row.is-libre { border-left-color: var(--border-strong); border-style: dashed; box-shadow: none; }
.start-row-main {
  flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px;
  padding: 12px 14px; text-align: left; background: transparent; border: 0; color: var(--text); cursor: pointer;
}
.start-row-main:active { background: var(--accent-soft); }
.start-last { font-size: 12px; font-weight: 600; color: var(--accent); margin-top: 2px; }
.start-row-actions { display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 8px; border-left: 1px solid var(--border); }
.row-act {
  width: 38px; height: 38px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface-2); color: var(--text-soft); font-size: 14px; cursor: pointer;
}
.row-act.is-danger { color: var(--critical); }
.start-unhide { display: block; width: 100%; margin-top: 12px; text-align: center; font-size: 14px; }

.start-card-wrap { position: relative; display: flex; }
.start-card-wrap .start-card { flex: 1; padding-right: 44px; }
.tpl-edit {
  position: absolute; top: 8px; right: 8px; width: 32px; height: 32px;
  border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2);
  color: var(--text-soft); font-size: 14px; cursor: pointer;
}

.tpl-target { display: flex; gap: 10px; margin-top: 6px; }
.tpl-target label { display: flex; flex-direction: column; gap: 2px; font-size: 11px; font-weight: 600; color: var(--text-faint); }
.tpl-target input { width: 64px; min-height: 38px; padding: 0 8px; background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: 8px; font-size: 15px; font-variant-numeric: tabular-nums; }
.tpl-move { display: flex; flex-direction: column; gap: 4px; flex: 0 0 auto; }
.tpl-move button { width: 36px; height: 30px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); color: var(--text-soft); font-size: 13px; cursor: pointer; }
.tpl-move button:disabled { opacity: .3; }
.tpl-move .nut-del { width: 36px; height: 30px; font-size: 13px; }

.rest-bar {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; background: var(--accent-soft); border-radius: var(--radius-sm);
}
.rest-bar.is-over { background: var(--ok-soft); }
.rest-label { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-soft); }
.rest-left { flex: 1; font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }

/* Bloc exercice compact : tout tient en quelques lignes. */
.ex-block { margin-top: 8px; padding: 10px 12px; }
.ex-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ex-head h2 { margin: 0; font-size: 15px; font-weight: 700; flex: 1; min-width: 0; }
.ex-target { font-size: 12.5px; font-weight: 600; color: var(--text-soft); font-variant-numeric: tabular-nums; }
.set-list { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 2px; font-size: 14px; font-variant-numeric: tabular-nums; }
.set-list li { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.set-rm { font-size: 11.5px; color: var(--text-faint); }
.set-del { width: 30px; height: 30px; }
/* reps · kg · RPE · ✓ sur une seule ligne. */
.set-form { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 6px; align-items: stretch; margin-top: 8px; }
.set-form.no-load { grid-template-columns: 1fr 1fr auto; }
.set-form .btn { padding: 0 16px; min-height: 40px; }
.set-rpe { font-size: 12px; font-weight: 700; color: var(--accent); }

.tempo-badge { font-size: 11.5px; font-weight: 800; letter-spacing: .12em; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.prev-line { margin: 4px 0 0; font-size: 12.5px; color: var(--text-faint); font-variant-numeric: tabular-nums; }

.last-sessions { margin: 12px 0 0; }
.last-sessions .fold-head { min-height: 44px; padding: 8px 14px; }
.last-sessions .fold-head h2 { font-size: 14.5px; }
.last-session { display: flex; flex-direction: column; gap: 3px; padding: 8px 0; border-top: 1px solid var(--border); font-size: 13px; }
.last-session:first-child { border-top: 0; padding-top: 0; }
.last-session-date { font-weight: 700; color: var(--accent); font-size: 12.5px; }
.last-session-ex { color: var(--text-soft); font-variant-numeric: tabular-nums; }
.last-session-ex strong { color: var(--text); font-weight: 600; }

.tpl-target input[data-tempo] { width: 72px; letter-spacing: .1em; text-align: center; }
.set-form input { min-height: 40px; padding: 0 8px; background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); font-size: 16px; min-width: 0; text-align: center; }
.set-form input::placeholder { font-size: 13px; }

.ph-card { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 24px 16px; text-align: center; border-width: 2px; }
.ph-card.is-work, .ph-card.is-in { border-color: var(--accent); background: var(--accent-soft); }
.ph-card.is-rest, .ph-card.is-out { border-color: var(--ok); background: var(--ok-soft); }
.ph-card.is-idle { border-color: var(--border); }
.ph-label { font-size: 20px; font-weight: 800; }
.ph-round { font-size: 13px; font-weight: 600; color: var(--text-soft); }
.ph-left { font-size: 64px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.ph-cue { font-size: 15px; color: var(--text-soft); }
.ph-progress { font-size: 12.5px; color: var(--text-faint); font-variant-numeric: tabular-nums; }
.ph-card .bar { width: 100%; }
.hist-list { margin: 0; padding-left: 18px; display: grid; gap: 8px; font-size: 14.5px; }

/* ---------------------------------------------------------------- FAB */

.fab {
  position: fixed;
  right: 16px;
  bottom: calc(var(--nav-h) + var(--safe-b) + 18px);
  width: 58px; height: 58px;
  border: 0; border-radius: 50%;
  background: var(--accent); color: var(--accent-text);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 30;
  box-shadow: 0 8px 24px rgba(79, 70, 229, .35);
}
.fab svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; }
.fab:active { transform: scale(.94); }

/* ---------------------------------------------------------------- nav */

.nav {
  position: fixed; left: 0; right: 0; bottom: 0;
  display: flex;
  height: calc(var(--nav-h) + var(--safe-b));
  padding: 0 4px var(--safe-b);
  background: var(--surface);
  border-top: 1px solid var(--border);
  z-index: 20;
}
.nav-item {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  padding: 0 1px;
  text-decoration: none; color: var(--text-faint);
  font-size: 10.5px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.nav-icon {
  width: 24px; height: 24px;
  fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.nav-item.is-active { color: var(--accent); }
.nav-item.is-active .nav-icon { stroke-width: 2.2; }

/* ------------------------------------------------------------- sheets */

.sheet-backdrop {
  position: fixed; inset: 0;
  background: rgba(8, 10, 14, .5);
  display: flex; align-items: flex-end; justify-content: center;
  z-index: 50; opacity: 0; transition: opacity .15s ease;
}
.sheet-backdrop.open { opacity: 1; }
.sheet-backdrop.closing { opacity: 0; }
.sheet {
  width: 100%; max-width: 680px; max-height: 92vh;
  display: flex; flex-direction: column;
  background: var(--bg);
  border-radius: 20px 20px 0 0;
  box-shadow: var(--shadow-lg);
  transform: translateY(16px); transition: transform .18s ease;
}
.sheet-backdrop.open .sheet { transform: translateY(0); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 16px 10px; }
.sheet-head h2 { font-size: 18px; overflow-wrap: anywhere; }
.sheet-close { flex: 0 0 auto; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--surface-2); font-size: 16px; cursor: pointer; }
.sheet-body { padding: 4px 16px calc(20px + var(--safe-b)); overflow-y: auto; }
.sheet-body > * + * { margin-top: 12px; }
.sheet-actions { display: flex; gap: 10px; margin-top: 18px; }
.sheet-actions .btn { flex: 1; }
.sheet-text { margin: 0; }
.sheet-warn { margin: 0; padding: 12px 14px; background: var(--critical-soft); color: var(--critical); border-radius: var(--radius-sm); font-weight: 600; font-size: 14.5px; }
.sheet-blocked { margin: 0; padding: 12px 14px; background: var(--blocked-soft); color: var(--blocked); border-radius: var(--radius-sm); font-weight: 600; font-size: 14.5px; }
.sheet-deps, .sheet-prog { margin: 0; font-size: 13.5px; color: var(--text-soft); font-weight: 600; }
.sheet-meta { margin: 0; font-size: 12.5px; color: var(--text-faint); }

/* -------------------------------------------------------------- toast */

.toast {
  position: fixed; left: 50%;
  bottom: calc(var(--nav-h) + var(--safe-b) + 86px);
  transform: translate(-50%, 12px);
  max-width: min(92vw, 420px);
  padding: 12px 16px;
  background: var(--text); color: var(--bg);
  border-radius: 999px;
  font-size: 14.5px; font-weight: 600; text-align: center;
  opacity: 0; pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  z-index: 60;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: var(--critical); color: #fff; }

/* ------------------------------------------------------- écrans larges */

@media (min-width: 420px) {
  .nav-item { font-size: 11.5px; }
  .nav-icon { width: 26px; height: 26px; }
}

@media (min-width: 760px) {
  .app { padding-bottom: 120px; }
  .section-grid, .start-grid { grid-template-columns: repeat(3, 1fr); }
  .nav { max-width: 680px; margin: 0 auto; border-radius: 20px 20px 0 0; border: 1px solid var(--border); border-bottom: 0; }
  .fab { right: calc(50% - 340px + 16px); }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ------------------------------------------ objectifs d'entraînement */
.goal-strip { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.goal-chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px;
  border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface);
  color: var(--text-soft); font-size: 13px; font-weight: 600;
}
.goal-chip strong { color: var(--accent); font-variant-numeric: tabular-nums; }
.goal-chip.is-done { border-color: var(--ok); background: var(--ok-soft); }
.goal-chip.is-done strong { color: var(--ok); }

/* ------------------------------------------------ fréquence des fiches */
.rec-per { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-soft); }
.rec-per input {
  width: 56px; min-height: 36px; text-align: center; padding: 0 6px;
  background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); font-size: 16px;
}
.rec-per.is-hidden { display: none; }

/* ------------------------------------------------------------ circuits */
.circ-card {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 20px 16px; margin: 10px 0;
  text-align: center; border: 2px solid var(--accent); border-radius: var(--radius-sm); background: var(--accent-soft);
}
.circ-card.is-paused { border-style: dashed; opacity: .8; }
.circ-round { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-soft); }
.circ-clock { font-size: 48px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1; }
.circ-now { font-size: 16px; font-weight: 700; }
.circ-stations { margin: 8px 0 0; padding-left: 22px; display: grid; gap: 4px; font-size: 14px; color: var(--text-soft); }
.circ-stations li.is-done { text-decoration: line-through; color: var(--text-faint); }
.circ-stations li.is-current { color: var(--text); font-weight: 700; }
.tpl-target select { min-height: 36px; padding: 0 6px; background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); font-size: 14px; }

/* ------------------------------------------------------ check-in matin */
.ck-row { margin-top: 12px; }
.ck-label { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-soft); margin-bottom: 6px; }
.ck-opts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.ck-chip {
  display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 60px; padding: 6px 2px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface-2); color: var(--text-soft);
  font-size: 11.5px; font-weight: 600;
}
.ck-chip.is-active { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
.ck-emoji { font-size: 24px; line-height: 1.1; }
.forme-result {
  display: flex; flex-direction: column; align-items: center; gap: 2px; margin: 16px 0 12px; padding: 16px;
  border-radius: var(--radius-sm); border: 2px solid var(--accent); background: var(--accent-soft); text-align: center;
}
.forme-result.is-go { border-color: var(--ok); background: var(--ok-soft); }
.forme-result.is-rest { border-color: var(--danger, #e5484d); }
.forme-face { font-size: 30px; line-height: 1; }
.forme-score { font-size: 40px; font-weight: 800; line-height: 1.1; }
.forme-score small { font-size: 16px; color: var(--text-soft); font-weight: 600; }
.forme-label { font-weight: 800; }
.forme-hint { font-size: 13px; color: var(--text-soft); }

/* cartes accueil */
.forme-card {
  display: flex; align-items: center; gap: 12px; width: 100%; margin: 10px 0 0; padding: 12px 14px; text-align: left;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text);
}
.forme-card.is-todo { border-style: dashed; border-color: var(--accent); }
.forme-card.is-go { border-color: var(--ok); background: var(--ok-soft); }
.forme-card.is-rest { border-color: var(--danger, #e5484d); }
.forme-card .forme-face { font-size: 26px; }
.forme-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.forme-main strong { font-size: 15px; }
.forme-main span { font-size: 12.5px; color: var(--text-soft); overflow: hidden; text-overflow: ellipsis; }
.forme-streak { font-size: 12.5px; font-weight: 800; color: var(--accent); white-space: nowrap; }
.forme-line { margin: 0 0 10px; font-size: 13.5px; color: var(--text-soft); text-align: left; }
.forme-line.is-go strong { color: var(--ok); }
.callout.is-warn { border-color: var(--danger, #e5484d); }
.badge-streak { color: var(--accent); font-weight: 800; }
.note-chips .chip { min-width: 40px; justify-content: center; }

/* charge & volume */
.load-bars { display: flex; align-items: flex-end; gap: 6px; height: 72px; padding: 6px 0 0; }
.load-bar { flex: 1; border-radius: 4px 4px 0 0; background: var(--border-strong); min-height: 3px; }
.load-bar.is-current { background: var(--accent); }
.load-bar.is-over { background: var(--danger, #e5484d); }
.load-verdict { margin: 6px 0 0; font-size: 13.5px; font-weight: 700; }
.load-verdict.is-high { color: var(--danger, #e5484d); }
.load-verdict.is-ok { color: var(--ok); }
.load-verdict.is-low, .load-verdict.is-na { color: var(--text-soft); }
.vol-list { display: grid; gap: 8px; margin-top: 8px; }
.vol-row { display: grid; grid-template-columns: 120px 1fr 64px; align-items: center; gap: 8px; font-size: 13.5px; }
.vol-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vol-val { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }

/* bilan */
.bilan-list { margin: 0; padding-left: 22px; display: grid; gap: 6px; font-size: 14px; }
.bilan-list.is-fix li { font-weight: 600; }
.bilan-rates { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.bilan-rates li { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); font-size: 14px; }
.bilan-rates .rate-good { color: var(--ok); } .bilan-rates .rate-bad { color: var(--danger, #e5484d); }
.bilan-journal { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.bilan-journal li { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); font-size: 14px; }
.bilan-journal strong { font-size: 12.5px; color: var(--accent); }
.bilan-ko { font-size: 12.5px; color: var(--text-soft); }

/* ------------------------------------------------------------- corps */
.body-card { margin-top: 10px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.body-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.body-card-head h3 { margin: 0; font-size: 15px; font-weight: 700; }
.body-last { font-size: 12.5px; color: var(--text-soft); font-variant-numeric: tabular-nums; }
.trend-row { display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid var(--border); }
.trend-row:first-of-type { border-top: 0; }
.trend-win { font-size: 12px; font-weight: 700; color: var(--text-faint); }
.trend-avg { display: flex; flex-direction: column; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.trend-avg small { font-size: 11.5px; font-weight: 500; color: var(--text-faint); }
.trend-delta { font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--text-soft); }
.trend-delta.is-good { color: var(--ok); }
.trend-delta.is-bad { color: var(--danger, #e5484d); }
.trend-delta.is-up, .trend-delta.is-down { color: var(--accent); }
.hint-inline { font-weight: 500; color: var(--text-faint); }
.chart-svg { display: block; width: 100%; height: 80px; color: var(--accent); }
.chart-scale { font-size: 11.5px; color: var(--text-faint); }

/* photos */
.ph-actions { margin: 10px 0; }
.ph-actions .btn { width: 100%; }
.ph-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.ph-side { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ph-side select { min-height: 40px; font-size: 14px; }
.ph-frame { aspect-ratio: 3 / 4; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-2); border: 1px solid var(--border); }
.ph-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.ph-cell { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.ph-thumb { aspect-ratio: 1; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-2); border: 1px solid var(--border); }
.ph-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-cell figcaption { display: flex; align-items: center; justify-content: space-between; gap: 4px; font-size: 11.5px; color: var(--text-soft); }
.ph-del { width: 24px; height: 24px; border: 0; background: none; color: var(--text-faint); font-size: 13px; }

/* rappels */
.rem-card { margin-top: 10px; }
.rem-days { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-soft); }
.rem-days input { width: 64px; text-align: center; }

/* --------------------------------------------------- chrono de séance */
.sess-start { margin-bottom: 4px; font-size: 17px; min-height: 52px; }
.sess-bar {
  display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
  padding: 10px 14px; border-radius: var(--radius-sm); background: var(--ok-soft); border: 1px solid var(--ok);
}
.sess-label { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-soft); }
.sess-clock { flex: 1; font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; }
.set-go { margin: 6px 0 0; min-height: 42px; font-weight: 700; }
.set-go.is-running { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.set-time { font-size: 11.5px; color: var(--text-faint); font-variant-numeric: tabular-nums; }
.rem-when { margin: 0; align-self: center; font-size: 13px; font-weight: 600; color: var(--text-soft); }

.sess-weigh {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%;
  text-align: left; margin: 0 0 10px;
}
.sess-weigh strong { font-size: 14.5px; }
.sess-weigh span { font-size: 12.5px; font-weight: 500; }

/* ------------------------------------------- répartition des lipides */
.fats { margin: 10px 0 0; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.fats.is-over { border-color: var(--danger, #e5484d); }
.fats-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.fats-head h2 { margin: 0; font-size: 15px; font-weight: 700; }
.fats-rows { display: grid; gap: 8px; margin-top: 8px; }
.fat-row { display: grid; grid-template-columns: 104px 1fr 74px; align-items: center; gap: 8px; font-size: 13px; }
.fat-label { color: var(--text-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fat-val { display: flex; flex-direction: column; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.fat-val small { font-size: 11px; font-weight: 500; color: var(--text-faint); }
.fat-row.is-over .bar-fill { background: var(--danger, #e5484d); }
.fat-row.is-over .fat-val { color: var(--danger, #e5484d); }

/* --------------------------------------------- sélecteur d'exercices */
.ep-row { align-items: center; }
.ep-row.is-picked { border-color: var(--accent); background: var(--accent-soft); }
.ep-row .food-row-add { font-weight: 800; color: var(--accent); }
.ep-row .row-act { flex: none; }

/* -------------------------------------------- moyenne de la semaine */
.week-avg {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 10px 0 0; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface);
}
.week-avg.is-ok { border-color: var(--ok); background: var(--ok-soft); }
.week-avg-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.week-avg-main strong { font-size: 20px; font-variant-numeric: tabular-nums; }
.week-avg-main span { font-size: 12.5px; color: var(--text-soft); }
.week-avg-side { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: 13px; font-weight: 700; text-align: right; white-space: nowrap; }
.week-avg-side small { font-size: 11.5px; font-weight: 500; color: var(--text-faint); }
.week-avg-empty { margin-top: 10px; }

/* ------------------------------------------ mesures indépendantes */
.measure-chips { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; margin: 10px 0 0; }
.measure-chip {
  display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 74px; padding: 8px 4px;
  border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--text);
}
.measure-chip.is-done { border-style: solid; border-color: var(--ok); background: var(--ok-soft); }
.measure-chip-icon { font-size: 20px; line-height: 1; }
.measure-chip-label { font-size: 11.5px; font-weight: 600; color: var(--text-soft); }
.measure-chip-val { font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; }
.measure-chip.is-done .measure-chip-val { color: var(--ok); }
.measure-field .input-lg { font-size: 26px; text-align: center; font-variant-numeric: tabular-nums; }
.measure-context { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }
.measure-context span { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); }
.measure-context strong { font-size: 17px; font-variant-numeric: tabular-nums; }
.measure-context small { font-size: 11.5px; color: var(--text-faint); }
.measure-all { display: block; margin-top: 12px; text-align: center; width: 100%; }
.body-card-head .btn-small { flex: none; }
.body-card .body-last { margin: 0 0 8px; font-size: 12.5px; color: var(--text-soft); font-variant-numeric: tabular-nums; }

/* ------------------------------------------ heures de sommeil exactes */
.ck-hours { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.ck-hours > span { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-soft); }
.ck-hours small { font-size: 10.5px; font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--text-faint); }
.ck-hours input {
  width: 92px; min-height: var(--tap); padding: 0 10px; text-align: center;
  background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums;
}

/* Bouton « % mangé » des recettes : même gabarit que + et −, mais lisible
   comme une action distincte — on saisit une fraction, pas une part. */
.qty-pct {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: -.02em;
}

/* Notes de recette : la préparation ne tient pas sur une ligne, et on la lit
   au moment de cuisiner — donc un champ haut, dans la fiche, pas dans la liste. */
.rc-notes {
  min-height: 120px;
  line-height: 1.5;
  resize: vertical;
  font-family: inherit;
}
