/* Charte « Carnet » (design system Coach running, v2) : un carnet d'entraînement. Papier et encre en
   clair, sépia en sombre ; le corail de Clawd pour l'action ; serif (Newsreader) pour ce que dit le
   coach, sans (Instrument Sans) pour ce que mesure l'app. Polices embarquées (static/vendor/fonts,
   licence OFL) : pas de service extérieur. */
@font-face {
  font-family: "Instrument Sans"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("vendor/fonts/instrument-sans-latin-wght-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Newsreader"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url("vendor/fonts/newsreader-latin-wght-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Newsreader"; font-style: italic; font-weight: 200 800; font-display: swap;
  src: url("vendor/fonts/newsreader-latin-wght-italic.woff2") format("woff2");
}
:root {
  color-scheme: light;
  --tabs-h: 50px;  /* barre d'onglets du bas (téléphone), sans la zone de sécurité : icône 28 + 2 + libellé 14 + 6 */
  --font-sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-serif: "Newsreader", Georgia, "Times New Roman", serif;
  /* Papier : contrastes mesurés (texte 14:1, text-2 5,7:1, muted 4,7:1 sur le fond ; accent 5,3:1). */
  --bg: #f6f2e9;
  --paper-line: #ede6d6;  /* lignes du carnet, sur le fond seulement */
  --surface: #fffdf8;
  --border: #e4dccb;
  --text: #1d2330;
  --text-2: #586070;
  --muted: #686c74;
  --accent: #b04a2f;  /* corail de Clawd, foncé pour le contraste */
  --accent-ink: #fffdf8;
  --highlight: #f2d86a; --highlight-ink: #1d2330;  /* surligneur : la séance clé du coach, rien d'autre */
  /* Graphiques hors du corail (qui veut dire action) : bleu encre, framboise, ambre. */
  --series-pace: #3e6fa6;
  --series-hr: #c0395a;
  --series-fatigue: #d9822b;
  --pos: #3e6fa6; --neg: #c0395a;
  --series-alt: #8a8478;
  --grid: #ede6d6;
  --ok-bg: #e5f4ea; --ok-ink: #1d5e33;
  --err-bg: #fbe9e8; --err-ink: #8f2020;
  --warn-bg: #fdf1dc; --warn-ink: #7a4a00;
  --band: rgba(176, 74, 47, 0.07);
  --band-strong: rgba(176, 74, 47, 0.12);  /* onglet actif (pastille derrière l'icône) */
  --rain: #1f6e9e;  /* probabilité de pluie (météo) */
  /* Intensité (zones Z1 → Z5 : pastilles de séance, frises, temps par zone) : rampe « terre », du sable au brun,
     comme la maquette du carnet. Encre sur Z1–Z3 (≥ 6,4:1), blanc sur Z4–Z5 (≥ 5,4:1). */
  --zone-1: #f1e6cc; --zone-1-ink: #1d2330;
  --zone-2: #e5c98f; --zone-2-ink: #1d2330;
  --zone-3: #d29b4f; --zone-3-ink: #1d2330;
  --zone-4: #9c5a24; --zone-4-ink: #ffffff;
  --zone-5: #5e3214; --zone-5-ink: #ffffff;
  /* Séances hors course (renforcement, autre sport) : hors de la rampe des zones (prune, sauge). */
  --kind-strength-bg: #ead9e3; --kind-strength-ink: #5a2d4a;
  --kind-other-bg: #cde8dd; --kind-other-ink: #17493c;
  /* Dessins des fiches de renfo (coach.web.figures) : bonhomme, membres éloignés, muscle visé, flèche… */
  --fig-ink: #1d2330; --fig-far: #a39e92; --fig-hot: #e8743b; --fig-acc: #3e6fa6; --fig-ok: #2e8b57;
  --fig-bad: #d64541; --fig-prop: #c9a77c; --fig-line: #ddd5c4; --fig-bg: #f6f2e9;
}
/* Sépia (sombre) : texte 12,9:1, text-2 7:1, muted 5:1, accent 7:1 sur les cartes ; encre sombre sur le corail. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #1c1814; --paper-line: #231e19; --surface: #26211b; --border: #3a3229;
    --text: #eee6d6; --text-2: #b5aa98; --muted: #9a8f7e;
    --accent: #e39a78; --accent-ink: #1c1814; --highlight: #d9b95a; --highlight-ink: #1c1814;
    --series-pace: #8fb0d6; --series-hr: #e07a8f; --series-alt: #9a8f7e;
    --series-fatigue: #e0a060; --pos: #8fb0d6; --neg: #e07a8f;
    --grid: #2e2821;
    --ok-bg: #16311f; --ok-ink: #9fdcb3; --err-bg: #3a1a19; --err-ink: #f2aaa8;
    --warn-bg: #362810; --warn-ink: #f1c77e; --band: rgba(227, 154, 120, 0.10); --band-strong: rgba(227, 154, 120, 0.16); --rain: #8ec3e0;
    --kind-strength-bg: #3d2533; --kind-strength-ink: #ecc9dd; --kind-other-bg: #1c3c33; --kind-other-ink: #a9dccb;
  --zone-1: #4a3a22; --zone-1-ink: #eee6d6; --zone-2: #6b4f26; --zone-2-ink: #eee6d6; --zone-3: #b58248; --zone-3-ink: #1c1814;
  --zone-4: #d39a52; --zone-4-ink: #1c1814; --zone-5: #efd29c; --zone-5-ink: #1c1814;
    --fig-ink: #eee6d6; --fig-far: #6e6457; --fig-hot: #f08a52; --fig-acc: #8fb0d6; --fig-ok: #5cc28a; --fig-bad: #ef6b67;
    --fig-prop: #8f7552; --fig-line: #3a3229; --fig-bg: #221e19;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #1c1814; --paper-line: #231e19; --surface: #26211b; --border: #3a3229;
  --text: #eee6d6; --text-2: #b5aa98; --muted: #9a8f7e;
  --accent: #e39a78; --accent-ink: #1c1814; --highlight: #d9b95a; --highlight-ink: #1c1814;
  --series-pace: #8fb0d6; --series-hr: #e07a8f; --series-alt: #9a8f7e;
  --series-fatigue: #e0a060; --pos: #8fb0d6; --neg: #e07a8f;
  --grid: #2e2821;
  --ok-bg: #16311f; --ok-ink: #9fdcb3; --err-bg: #3a1a19; --err-ink: #f2aaa8;
  --warn-bg: #362810; --warn-ink: #f1c77e; --band: rgba(227, 154, 120, 0.10); --band-strong: rgba(227, 154, 120, 0.16); --rain: #8ec3e0;
  --kind-strength-bg: #3d2533; --kind-strength-ink: #ecc9dd; --kind-other-bg: #1c3c33; --kind-other-ink: #a9dccb;
  --zone-1: #4a3a22; --zone-1-ink: #eee6d6; --zone-2: #6b4f26; --zone-2-ink: #eee6d6; --zone-3: #b58248; --zone-3-ink: #1c1814;
  --zone-4: #d39a52; --zone-4-ink: #1c1814; --zone-5: #efd29c; --zone-5-ink: #1c1814;
  --fig-ink: #eee6d6; --fig-far: #6e6457; --fig-hot: #f08a52; --fig-acc: #8fb0d6; --fig-ok: #5cc28a; --fig-bad: #ef6b67;
  --fig-prop: #8f7552; --fig-line: #3a3229; --fig-bg: #221e19;
}

* { box-sizing: border-box; }
/* Ancres (#fait, #w-12, #objectif-3…) : la cible s'arrête sous la barre du haut, collante, pas derrière. */
/* text-size-adjust : Safari iOS grossit de lui-même le texte des blocs qu'il juge « longs » (retour du 14/11/2026 :
   les titres des plis d'un run n'avaient pas tous la même taille). */
html { scroll-padding-top: 4.75rem; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
/* L'attribut hidden cache toujours, même un élément auquel une règle donne un display (bandeau de
   synchro en flex : sans ceci, le script le « cachait » sans effet et il restait figé). */
[hidden] { display: none !important; }
/* Le fond est un papier uni ; les lignes du carnet ne sont que là où le coach écrit (.ruled). */
body { margin: 0; color: var(--text); background-color: var(--bg); font: 15px/1.55 var(--font-sans); }
/* Les lignes du carnet, sous ce que le coach écrit sur le papier (mot du jour, but et conseil d'une séance, vos
   échanges) : une ligne tous les 28 px, le texte posé dessus (la ligne est à 21 px du haut de chaque ligne de
   texte, juste sous la ligne de base). Ni sous les chiffres, ni dans une carte. Tout y a une hauteur de ligne de
   28 px et aucune marge qui décalerait le texte des lignes ; un paragraphe de plus saute une ligne. */
.ruled {
  background-image: linear-gradient(transparent 21px, var(--border) 21px, var(--border) 22px, transparent 22px);
  background-size: 100% 28px; line-height: 28px;
}
.ruled .rich, .ruled p, .ruled li, .ruled figcaption, .ruled .coach-label, .ruled blockquote { line-height: 28px; }
.ruled .rich > *, .ruled p, .ruled blockquote, .ruled figcaption { margin: 0; }
.ruled .rich > * + * { margin-top: 28px; }
.ruled .rich li + li { margin-top: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
/* Titres dans la voix du coach (serif) ; les chiffres et le titre d'une séance restent en sans. */
h1 { font-family: var(--font-serif); font-weight: 500; font-size: 2.1rem; line-height: 1.1; letter-spacing: -0.01em; margin: 0.3rem 0 1.25rem; }
h2 { font-family: var(--font-serif); font-weight: 500; font-size: 1.25rem; line-height: 1.3; margin: 0 0 0.9rem; }
h3 { font-size: 0.85rem; margin: 1.6rem 0 0.4rem; color: var(--text-2); font-weight: 600; }
code { font-size: 0.85em; background: var(--grid); padding: 1px 5px; border-radius: 4px; }

.topbar {
  display: flex; align-items: center; gap: 1.5rem;
  padding: 0.35rem max(16px, env(safe-area-inset-right)) 0.35rem max(16px, env(safe-area-inset-left));
  background: var(--surface); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 1000;
}
.brand { display: inline-flex; align-items: center; gap: 0.45rem; font-weight: 700; color: var(--text); }
.brand-mark { display: block; flex: none; }
/* Instance de dev (COACH_DEV) : badge voyant, pour ne jamais la confondre avec la prod. */
.dev-badge {
  font: 700 0.7rem/1 var(--font-sans); letter-spacing: 0.08em; padding: 0.25rem 0.4rem; border-radius: 4px;
  background: var(--accent); color: var(--surface);
}  /* Clawd qui regarde sa montre (36 × 27), dessin vectoriel de tools/mascot.mjs */
/* Onglets, rendus deux fois (base.html) : dans la barre du haut sur ordinateur (.tabs-top), en barre fixe en bas
   de l'écran sur téléphone (.tabs-bottom, voir plus bas). */
.tabs { display: flex; gap: 1.1rem; }
.tabs-bottom { display: none; }
.tabs a { color: var(--text-2); display: inline-flex; align-items: center; gap: 0.35rem; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a[aria-current="page"] { color: var(--text); font-weight: 600; text-decoration: underline 2px var(--accent); text-underline-offset: 6px; }
.tabs svg { display: none; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tabs svg .fill { fill: currentColor; stroke: none; }

main { max-width: 1100px; margin: 0 auto; padding: 1.5rem max(16px, env(safe-area-inset-right)) 3rem max(16px, env(safe-area-inset-left)); }

/* Espacement : un seul rythme pour les cartes (entre elles et à l'intérieur). */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 18px;
  padding: 1.25rem 1.4rem; margin-bottom: 1.25rem; min-width: 0;
}
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 1.25rem; align-items: start; }
.grid-2 > * { min-width: 0; }
@media (max-width: 760px) { .grid-2 { grid-template-columns: minmax(0, 1fr); } }

/* Chiffres clés : une rangée de nombres dans un seul bloc, sans boîte autour de chacun. */
.tiles {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr)); gap: 1rem 1.5rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: 18px;
  padding: 1.1rem 1.4rem; margin-bottom: 1.25rem;
}
.tile { display: flex; flex-direction: column; min-width: 0; }
.tile-label { color: var(--text-2); font-size: 0.78rem; }
.tile-value { font-size: 1.55rem; line-height: 1.3; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.tile-value small { font-size: 0.8rem; font-weight: 500; color: var(--text-2); letter-spacing: 0; white-space: nowrap; }  /* « km / sem. » d'un bloc sur téléphone */
.tile-sub { color: var(--muted); font-size: 0.78rem; }

.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 0.45rem 0.5rem; border-bottom: 1px solid var(--border); }
thead th { font-size: 0.78rem; color: var(--text-2); font-weight: 600; }
tbody th { font-weight: 500; color: var(--text-2); }
tr:last-child td, tr:last-child th { border-bottom: none; }
table.compact td, table.compact th { padding: 0.3rem 0.5rem; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.strong { font-weight: 650; }
.muted { color: var(--muted); }
.small { font-size: 0.82rem; }
.tag { font-size: 0.72rem; border: 1px solid var(--border); border-radius: 999px; padding: 0 6px; color: var(--text-2); }

.bar-cell { width: 40%; }
.bar { display: block; height: 8px; width: var(--w); min-width: 4px; max-width: 100%; background: var(--series-pace); border-radius: 0 4px 4px 0; }

.chart-box { position: relative; width: 100%; }
.chart-md { height: 240px; }
.chart-sm { height: 170px; }
/* Allure d'un run, sous ses chiffres : la courbe seule, lissée par section, basse, sans axe ni légende. */
.chart-xs { height: 96px; }
/* Titre d'un graphique et sa légende sur la même ligne. */
.chart-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.2rem 1rem; margin: 1.6rem 0 0.3rem; }
.chart-head h3 { margin: 0; }
.chart-head .legend { margin: 0; }
.chart-head h3 .muted { font-weight: 400; }
.charts > .chart-head:first-child { margin-top: 0; }
/* Précision repliée hors carte (source d'un chiffre, méthode) : discrète, en bas de page. */
details.aside { margin: 0 0 1.25rem; color: var(--text-2); }
details.aside p { max-width: 46rem; }
.map { height: 320px; border-radius: 8px; }

details summary { cursor: pointer; color: var(--text-2); margin-top: 0.5rem; }

/* Boutons : <a class="btn"> et <button class="btn"> identiques (même hauteur, texte centré), icône
   (⌚, ↗, ›) alignée sur le texte. Deux tailles : normale (action d'une carte, ≥ 40 px au doigt) et
   .btn-small (action secondaire dans une ligne de texte). */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem;
  min-height: 2.5rem; font: inherit; font-weight: 550; line-height: 1.2; cursor: pointer;
  padding: 0.45rem 0.95rem; border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); text-align: center; text-decoration: none;
}
.btn:hover { border-color: var(--accent); text-decoration: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn:disabled { opacity: 0.6; cursor: default; pointer-events: none; }
.actions-row { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.actions-row form { margin: 0; }

.flash { padding: 0.7rem 1rem; border-radius: 8px; margin-bottom: 1rem; background: var(--grid); }
.flash-success { background: var(--ok-bg); color: var(--ok-ink); }
.flash-error { background: var(--err-bg); color: var(--err-ink); }

.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 0.8rem; }
.show-sm { display: none; }
@media (max-width: 600px) {
  .hide-sm { display: none; }
  .show-sm { display: initial; }
  td .show-sm, th .show-sm { display: block; }
  th, td, table.compact th, table.compact td { padding-left: 0.3rem; padding-right: 0.3rem; }
  .topbar { gap: 0.9rem; }
  .tabs-top { display: none; }
  .tabs-bottom {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000; gap: 0;
    display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr);
    background: var(--surface); border-top: 1px solid var(--border);
    padding: 0 env(safe-area-inset-right) 0 env(safe-area-inset-left);
  }
  /* Chaque onglet remplit toute la barre, zone de sécurité du bas comprise : la barre n'a plus de bande morte
     (4 px au-dessus des icônes, et sous les libellés toute la zone de la barre d'accueil de l'iPhone, 34 px,
     là où tombe le pouce). Hauteur : --tabs-h, plus la zone de sécurité. Un appui un peu long n'ouvre pas
     l'aperçu du lien d'iOS (touch-callout), pas de double toucher pour zoomer (touch-action). */
  .tabs-bottom a {
    flex-direction: column; justify-content: flex-start; gap: 2px;
    box-sizing: content-box; height: calc(var(--tabs-h) - 6px); padding: 6px 0 max(6px, env(safe-area-inset-bottom));
    font-size: 0.7rem; line-height: 14px; font-weight: 550; color: var(--muted);
    -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none; user-select: none; touch-action: manipulation;
  }
  /* L'onglet actif : sa couleur, sa graisse et une pastille derrière l'icône (pas la couleur seule). L'onglet
     touché (.is-going, base.html) la prend tout de suite, pendant que sa page se charge. */
  .tabs-bottom svg { display: block; box-sizing: content-box; padding: 3px 15px; border-radius: 999px; }
  .tabs-bottom a[aria-current="page"], .tabs-bottom a.is-going { color: var(--accent); font-weight: 700; text-decoration: none; }
  .tabs-bottom a[aria-current="page"] svg, .tabs-bottom a.is-going svg { background: var(--band-strong); }
  .tabs-bottom:has(.is-going) a[aria-current="page"]:not(.is-going) { color: var(--muted); font-weight: 550; }
  .tabs-bottom:has(.is-going) a[aria-current="page"]:not(.is-going) svg { background: none; }
  .tabs-bottom a:active svg { background: var(--band); }
  body.has-tabs { padding-bottom: calc(var(--tabs-h) + max(6px, env(safe-area-inset-bottom)) + 2px); }
}
.empty p { color: var(--text-2); }

.form { display: flex; flex-direction: column; gap: 1rem; align-items: flex-start; }
.field { display: flex; flex-direction: column; gap: 0.3rem; width: 100%; }
.field label { font-weight: 600; font-size: 0.9rem; }
.field input, .field select {
  font: inherit; padding: 0.45rem 0.6rem; border-radius: 8px; width: 11rem; max-width: 100%;
  border: 1px solid var(--border); background: var(--bg); color: var(--text);
}
.field input:focus, .field select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.hint { margin: 0; font-size: 0.82rem; color: var(--text-2); }
.hint.ok { color: var(--ok-ink); }
/* Bouton qui a l'air d'un lien (action en POST au fil du texte) : même allure qu'un <a>. `font: inherit`
   reprend la taille du parent ; .small doit donc être redit ici, sinon il est écrasé (le bouton
   « Récupérer mon run Garmin » s'affichait en 15 px au milieu de liens en 12 px). */
button.link {
  font: inherit; background: none; border: none; padding: 0; cursor: pointer;
  color: var(--accent); text-align: left;
}
button.link:hover { text-decoration: underline; }
button.link.small { font-size: 0.82rem; }
button.link.danger { color: var(--err-ink); }
/* Discret : l'action attendue est ailleurs (« Enregistrer sans en parler », « Retirer »). Souligné
   pour rester repérable comme cliquable malgré sa couleur. */
.link.quiet { color: var(--text-2); text-decoration: underline; text-decoration-color: var(--border); text-underline-offset: 2px; }
.link.quiet:hover { color: var(--text); text-decoration-color: currentColor; }
.explain dt { font-weight: 600; margin-top: 0.7rem; }
.explain dt:first-child { margin-top: 0; }
.explain dd { margin: 0.2rem 0 0; color: var(--text-2); font-size: 0.9rem; }
.zone-chip {
  display: inline-block; min-width: 2.2rem; text-align: center; font-size: 0.78rem; font-weight: 650;
  border-radius: 999px; padding: 1px 6px;
}
/* Rampe séquentielle « terre » (tokens --zone-N) : intensité croissante de Z1 à Z5. En sépia, la rampe
   s'éclaircit avec l'intensité (le plus intense ressort sur le fond sombre). */
.zone-1 { background: var(--zone-1); color: var(--zone-1-ink); }
.zone-2 { background: var(--zone-2); color: var(--zone-2-ink); }
.zone-3 { background: var(--zone-3); color: var(--zone-3-ink); }
.zone-4 { background: var(--zone-4); color: var(--zone-4-ink); }
.zone-5 { background: var(--zone-5); color: var(--zone-5-ink); }

/* Répartition du temps par zone (barre empilée) */
.zone-bar { display: flex; gap: 2px; height: 14px; margin: 0.2rem 0 0.8rem; }
.zone-bar span { display: block; height: 100%; min-width: 0; }
.zone-bar span:first-child { border-radius: 4px 0 0 4px; }
.zone-bar span:last-child { border-radius: 0 4px 4px 0; }
.zone-0 { background: var(--grid); color: var(--text-2); }
.zone-row-bar { width: 35%; }
.zone-row-bar .bar { background: var(--series-pace); }
.metric-note { color: var(--text-2); font-size: 0.85rem; margin: 0.2rem 0 0; }
.legend { display: flex; flex-wrap: wrap; gap: 1rem; font-size: 0.82rem; color: var(--text-2); margin: 0 0 0.4rem; }
.legend .key { display: inline-block; width: 16px; height: 0; border-top: 2px solid; vertical-align: middle; margin-right: 6px; }
.legend .key.dashed { border-top-style: dashed; }
.legend .key.dotted { border-top-style: dotted; border-top-width: 3px; }
.legend .key.dot { width: 9px; height: 9px; border: 2px solid; border-radius: 50%; }  /* un point sans ligne */
.legend .key.dot.hollow { background: var(--surface); }  /* estimation retracée après coup */
.state { font-weight: 650; }
/* Dans une carte : les chiffres sans le cadre. */
.tiles-inline { background: none; border: none; border-radius: 0; padding: 0; margin: 0 0 0.9rem; }

/* Objectifs */
.section-title { margin: 1.6rem 0 0.8rem; }
.goal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.goal-head h2 { margin-bottom: 0.15rem; }
.goal-head h2 a { color: var(--text); }
.goal-head p { margin: 0 0 0.8rem; }
/* Compte à rebours (« J-38 ») : un chiffre, écrit en grand à l'encre (le corail dit l'action), pas dans une pastille. */
.countdown {
  font-family: var(--font-sans); font-weight: 700; font-size: 1.6rem; line-height: 1; letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--text);
}
.goal-when { display: flex; flex-direction: column; align-items: flex-end; gap: 0.3rem; flex: none; }
/* Écart entre le chrono estimé par le coach et l'objectif (« +1:30 ») : un calcul, en sans. */
.kv .by-coach dd .kv-gap { font-family: var(--font-sans); font-size: 0.82rem; font-weight: 600; color: var(--text-2); margin-left: 0.3rem; }
.tone-ok { color: var(--ok-ink); }
.tone-warn { color: var(--warn-ink); }
.tone-bad { color: var(--err-ink); }
.tile-value.tone-ok, .tile-value.tone-warn, .tile-value.tone-bad { font-size: 1.25rem; line-height: 1.6; }
.goal-change { margin: 0.8rem 0 0; }
.field textarea {
  font: inherit; padding: 0.45rem 0.6rem; border-radius: 8px; width: 100%; max-width: 22rem;
  border: 1px solid var(--border); background: var(--bg); color: var(--text); resize: vertical;
}
.field textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.field input.wide { width: 100%; max-width: 22rem; }
.habit { margin-bottom: 0.9rem; }
.habit-row { display: flex; justify-content: space-between; gap: 0.5rem; }
.progress { height: 6px; background: var(--grid); border-radius: 999px; overflow: hidden; margin: 0.35rem 0 0.25rem; }
.progress span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.progress span.full { background: var(--ok-ink); }

/* Plan */
.prewrap { white-space: pre-line; }
.phases { margin: 0.6rem 0 0; padding-left: 1.3rem; }
.phases li { margin-bottom: 0.4rem; }
pre.code, .token-box {
  background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 0.7rem;
  font-size: 0.8rem; white-space: pre-wrap; overflow-wrap: anywhere;
}
textarea.token-box { display: block; width: 100%; box-sizing: border-box; font-family: monospace; color: var(--text); resize: none; }
.past-weeks > summary { margin: 0 0 1rem; }
.week-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0.2rem 0.5rem; }
.week-head h2 { margin-bottom: 0.3rem; }
.week-head h2 .small { font-family: var(--font-sans); }  /* « du 2 nov. » : une date, pas la voix du coach */
.phase-chip {
  font-family: var(--font-sans); font-size: 0.72rem; font-weight: 600; color: var(--text-2); border: 1px solid var(--border);
  border-radius: 999px; padding: 1px 8px; vertical-align: middle; white-space: nowrap;
}
.workouts { list-style: none; margin: 0; padding: 0; }
/* Une ligne de carnet (_entry.html), la même sur le Plan, l'Historique et Aujourd'hui : le jour en colonne (abrégé,
   puis son numéro), le titre, puis une seule ligne grise : à gauche la pastille du type et l'état, à droite les
   chiffres mesurés. Peu de couleurs, chacune avec un seul sens : le surligneur pour la séance clé, la pastille pour
   le type, le corail pour aujourd'hui et ce qui attend le coureur, l'ambre pour un écart selon le coach. Le reste
   est à l'encre ou en gris (une séance faite : un ✓ ; manquée : la ligne en gris). */
.workout {
  display: grid; grid-template-columns: 2.4rem minmax(0, 1fr) 0.8rem; gap: 0 0.8rem; align-items: center;
  min-height: 3.5rem; padding: 0.8rem 0; border-bottom: 1px solid var(--border); position: relative;
}
.workout:last-child { border-bottom: none; }
.w-day { display: flex; flex-direction: column; align-self: start; line-height: 1.2; padding-top: 0.1rem; }
.w-dow { font-size: 0.75rem; font-weight: 500; color: var(--muted); }
.w-num { font-size: 1rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.w-time { white-space: nowrap; }
.w-title { font-weight: 600; font-size: 0.98rem; line-height: 1.35; }
.w-sub { margin: 0.25rem 0 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.1rem 0.5rem;
  font-size: 0.84rem; line-height: 1.4; color: var(--text-2); }
.w-left { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 0.1rem 0.4rem; min-width: 0; }
.w-left .coach-tag { margin-right: 0; }
/* Les chiffres mesurés, calés à droite : ils se lisent en colonne d'une ligne à l'autre. */
.w-figs { margin-left: auto; text-align: right; font-variant-numeric: tabular-nums; }
.w-coach-fig { font-family: var(--font-serif); font-weight: 500; font-size: 1.1rem; color: var(--text); }
.w-mark { font-weight: 700; color: var(--text); }
.w-state { font-weight: 600; }
.w-state.is-warn { color: var(--warn-ink); }
.w-flag { font-weight: 600; color: var(--accent); }
/* Ce qu'en dit le coach (première ligne de son avis), sous la ligne : sa voix, en serif. */
.w-word { margin: 0.25rem 0 0; font-family: var(--font-serif); font-size: 1.02rem; line-height: 1.4; }
/* Séance clé du coach : son titre surligné. */
.w-title .is-key { background: var(--highlight); color: var(--highlight-ink); padding: 0 0.3rem; border-radius: 2px;
  -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.w-link { color: inherit; }
/* Toute la ligne mène à la séance (le titre seul était une cible minuscule, sans air de lien). */
.w-link::after { content: ""; position: absolute; inset: 0; border-radius: 8px; }
/* Survol à la souris seulement : sur téléphone, il restait collé au titre touché (retour du 15/11/2026 : un titre
   resté au corail au retour sur la page). */
.w-link:hover { text-decoration: none; }
@media (hover: hover) { .workout:has(.w-link):hover .w-link { color: var(--accent); } }
.workout:has(.w-link:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.w-link:focus-visible { outline: none; }
.w-chev { grid-column: 3; color: var(--muted); font-size: 1.2rem; line-height: 1; text-align: center; }
.w-sub .kind-chip { margin: 0; }
/* Aujourd'hui : le jour au corail (« auj. »), rien de plus (pas de bandeau qui déborde de la colonne). */
.is-today .w-dow, .is-today .w-num { color: var(--accent); }
.is-missed .w-link { color: var(--muted); }
.kind-strength { background: var(--kind-strength-bg); color: var(--kind-strength-ink); }
.kind-other { background: var(--kind-other-bg); color: var(--kind-other-ink); }
.kind-chip.kind-strength { color: var(--kind-strength-ink); }
.kind-chip.kind-other { color: var(--kind-other-ink); }
.kind-chip {
  display: inline-block; font-size: 0.72rem; font-weight: 650; border-radius: 999px;
  padding: 0 7px; margin-right: 0.2rem; vertical-align: 1px; white-space: nowrap;
}
.w-steps { margin: 0.3rem 0; padding-left: 1.1rem; color: var(--text-2); }
.is-missed .w-title, .is-missed .w-day .w-num { color: var(--muted); }
.badge {
  align-self: start; font-size: 0.72rem; font-weight: 650; white-space: nowrap;
  border-radius: 999px; padding: 1px 8px; border: 1px solid transparent;
}
.badge-done { background: var(--ok-bg); color: var(--ok-ink); }
.badge-partial { background: var(--warn-bg); color: var(--warn-ink); }
.badge-missed { background: var(--err-bg); color: var(--err-ink); }
.badge-today { background: var(--accent); color: var(--accent-ink); }
.badge-planned { border-color: var(--border); color: var(--muted); }
/* Séance clé (choisie par le coach) : un coup de surligneur, seule puce qui n'est pas une pilule. */
.key-chip { display: inline-block; font-size: 0.78rem; font-weight: 600; color: var(--highlight-ink);
  background: var(--highlight); border-radius: 3px; padding: 0 0.45rem; vertical-align: 0.1em; transform: rotate(-1.5deg); }
.badge-extra { background: var(--grid); color: var(--text-2); }
.legend .key.band { height: 10px; border: none; background: var(--band); outline: 1px solid var(--border); }
.legend .key.hatch { height: 10px; border: none; outline: 1px solid var(--border);
  background: repeating-linear-gradient(135deg, var(--border) 0 2px, transparent 2px 5px); }
@media (max-width: 600px) {
  .workout { grid-template-columns: 2.2rem minmax(0, 1fr) 0.7rem; gap: 0 0.6rem; }
}
/* Page Plan : surtitre et titre, l'objectif (compte à rebours en grand, chrono visé et chrono estimé par
   le coach), la frise des phases et une ligne de faits. */
.plan-head .eyebrow, .today-head .eyebrow { margin: 0 0 0.15rem; }
.plan-head h1 { margin-bottom: 1rem; }
.tile.by-coach .tile-label { font-size: 0.86rem; }
.tile.by-coach .tile-value { font-family: var(--font-serif); font-weight: 500; }
.countdown.is-long { font-size: 1.15rem; }
.plan-kv { margin: 0.1rem 0 0.9rem; justify-content: start; }
.plan-facts { display: flex; flex-wrap: wrap; gap: 0.2rem 1.2rem; margin: 0.2rem 0 0.3rem; color: var(--text-2); }
.plan-facts strong { color: var(--text); font-variant-numeric: tabular-nums; }

/* Tableau de bord : en-tête de carte avec sélecteurs de période et de pas */
.card-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.6rem 1rem; margin-bottom: 0.8rem; }
.card-head h2 { margin: 0; }
.controls { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.segmented {
  display: inline-flex; flex-wrap: nowrap; max-width: 100%; border: 1px solid var(--border); border-radius: 8px;
  overflow: hidden; background: var(--bg);
}
.segmented a, .segmented span {
  padding: 0.25rem 0.6rem; font-size: 0.82rem; color: var(--text-2); border-left: 1px solid var(--border);
  white-space: nowrap;
}
.segmented > :first-child { border-left: none; }
.segmented a:hover { text-decoration: none; color: var(--text); background: var(--grid); }
.segmented a[aria-current="true"] { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.segmented span[aria-disabled="true"] { color: var(--muted); opacity: 0.5; cursor: not-allowed; }

/* Compte (barre du haut) et page de connexion */
.account { margin-left: auto; position: relative; }
/* Le compte : une cible de 44 px au doigt ; l'initiale sur un rond neutre (le corail est pour les actions). */
/* `margin: 0` : la marge de `details summary` (plis du site) décalait l'avatar sous l'axe de la barre. */
.account > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 0.45rem;
  min-width: 44px; min-height: 44px; margin: 0; border-radius: 999px; }
.account > summary::-webkit-details-marker { display: none; }
.account > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.avatar {
  display: inline-grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 50%;
  background: var(--surface); color: var(--text); border: 1px solid var(--border); font-weight: 650; font-size: 0.95rem;
}
.account > summary:hover .avatar, .account[open] .avatar { border-color: var(--accent); }
.account-name { color: var(--text-2); font-size: 0.9rem; }
/* Le menu : une ligne de 44 px par lien, cliquable sur toute sa largeur (plus de trous entre les liens où le
   doigt tombait dans le vide) ; groupes séparés d'un trait (le compte, l'administration, la déconnexion). */
.account-menu {
  position: absolute; right: 0; top: calc(100% + 0.4rem); z-index: 1001;
  min-width: 14rem; max-width: calc(100vw - 32px); padding: 0.3rem 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
}
.account-email { margin: 0; padding: 0.45rem 1rem 0.3rem; font-size: 0.82rem; color: var(--muted); overflow-wrap: anywhere; }
.menu-group { margin: 0; }
.menu-group + .menu-group { border-top: 1px solid var(--border); margin-top: 0.3rem; padding-top: 0.3rem; }
.account-menu a, .account-menu button {
  display: flex; align-items: center; width: 100%; min-height: 44px; padding: 0 1rem; box-sizing: border-box;
  font: inherit; text-align: left; color: var(--text); background: none; border: 0; cursor: pointer;
}
.account-menu a:hover, .account-menu button:hover { background: var(--grid); text-decoration: none; }
.account-menu a:focus-visible, .account-menu button:focus-visible { background: var(--grid); outline: 2px solid var(--accent); outline-offset: -2px; }
.account-menu a[aria-current="page"] { font-weight: 600; box-shadow: inset 3px 0 var(--accent); }
.login-page main.login { max-width: 26rem; padding-top: 12vh; }
.login h1 { margin-top: 0; }
.login .mascot, .consent .mascot { width: 180px; margin: -0.4rem 0 0.4rem -8px; }  /* traits de vitesse au ras du texte */
.btn-block { display: block; text-align: center; margin: 1rem 0 0.6rem; }
@media (max-width: 600px) { .account-name { display: none; } }
.accounts { list-style: none; margin: 0; padding: 0; }
.accounts li { display: flex; align-items: flex-start; gap: 0.7rem; padding: 0.7rem 0; border-bottom: 1px solid var(--border); }
.accounts li:last-child { border-bottom: none; }
.stale-apps { margin-top: 0.4rem; border-top: 1px solid var(--border); padding-top: 0.4rem; }
.stale-apps > summary { padding: 0.7rem 0; cursor: pointer; color: var(--muted); }
.stale-apps > form { margin: 0.6rem 0 0.2rem; }
.account-info { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.hint.spaced { margin-top: 0.9rem; }
.spaced-top { margin-top: 0.8rem; }
/* Coach IA et consentement */
.consent { max-width: 34rem; margin: 2rem auto 0; }
.consent h1 { font-size: 1.4rem; }
.steps-list { padding-left: 1.2rem; margin: 0; }
.steps-list li { margin-bottom: 0.7rem; }
.copy-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-top: 0.3rem; }
.copy-row code { overflow-wrap: anywhere; padding: 0.3rem 0.5rem; }
.btn-small { min-height: 2rem; padding: 0.25rem 0.65rem; font-size: 0.82rem; }
.consent .hint + .hint { margin-top: 0.6rem; }
/* Pages légales et pied de page */
.legal { max-width: 46rem; margin: 0 auto; }
.legal h2 { margin: 1.8rem 0 0.6rem; font-size: 1.1rem; }
.legal p, .legal li { line-height: 1.6; }
.legal ul { padding-left: 1.2rem; }
.legal li { margin-bottom: 0.35rem; }
.legal-summary { margin-top: 1rem; }
.legal-summary h2 { margin-top: 0; }
.legal-table td { vertical-align: top; }
.site-footer { max-width: 1100px; margin: 0 auto; padding: 0 16px 2rem; text-align: center; color: var(--muted); }
.site-footer a { color: var(--text-2); }
.legal-links { text-align: center; }
@media (max-width: 600px) {
  /* Tableau des données en fiches empilées sur petit écran. */
  .legal-table thead { display: none; }
  .legal-table tr { display: block; padding: 0.6rem 0; border-bottom: 1px solid var(--border); }
  .legal-table td { display: block; border: none; padding: 0.15rem 0; }
  .legal-table td::before { content: attr(data-label) " : "; font-weight: 600; color: var(--text-2); }
}
/* Notes du coureur (profil) */
.notes { list-style: none; margin: 0.6rem 0; padding: 0; }
.notes li { display: flex; align-items: flex-start; gap: 0.3rem 0.6rem; padding: 0.6rem 0; border-bottom: 1px solid var(--border); }
.notes li:last-child { border-bottom: none; }
.note-text { flex: 1 1 14rem; min-width: 0; overflow-wrap: anywhere; }
.notes form { margin: 0; }
.note-form { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.6rem; }
.note-form select, .note-form input {
  font: inherit; padding: 0.4rem 0.6rem; border-radius: 8px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); min-width: 0;
}
.note-form input { flex: 1 1 14rem; }
/* Guide « Coach IA » pas à pas */
.lead { color: var(--text-2); max-width: 46rem; margin-top: -0.4rem; }
.guide { list-style: none; margin: 1rem 0 0; padding: 0; }
.guide-step { display: flex; gap: 1.5rem; align-items: flex-start; justify-content: space-between; }
.guide-text { flex: 1 1 22rem; min-width: 0; }
.guide-text h2 { display: flex; align-items: center; gap: 0.6rem; }
.guide-text p { margin: 0.4rem 0; }
.step-number {
  display: inline-grid; place-items: center; flex: none; width: 1.8rem; height: 1.8rem; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink); font-size: 0.95rem;
}
.menu-path { display: flex; flex-wrap: wrap; gap: 0.3rem; align-items: center; }
.menu-path span {
  border: 1px solid var(--border); background: var(--bg); border-radius: 6px; padding: 0.15rem 0.55rem;
  font-weight: 600; font-size: 0.88rem;
}
.menu-path span + span::before { content: "›"; margin-right: 0.4rem; color: var(--muted); font-weight: 400; }
.fields { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.3rem 0.7rem; margin: 0.4rem 0; }
.fields dt { font-weight: 600; }
.fields dd { margin: 0; overflow-wrap: anywhere; }
.examples { margin: 0.4rem 0; padding-left: 1.2rem; }
.examples li { margin-bottom: 0.3rem; font-style: italic; }
.phone { flex: none; width: min(260px, 100%); }
.phone img {
  display: block; width: 100%; height: auto; border-radius: 16px;
  border: 5px solid #2b2b2e; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}
@media (max-width: 700px) {
  .guide-step { flex-direction: column; gap: 0.8rem; }
  .guide-text { flex: none; width: 100%; }  /* en colonne, 22rem deviendrait une hauteur */
  .phone { align-self: center; width: min(280px, 90%); }
}
/* Réglages : cases à cocher avec leur explication */
.toggle { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.7rem; align-items: start; cursor: pointer; }
.toggle input { width: 1.2rem; height: 1.2rem; margin: 0.15rem 0 0; accent-color: var(--accent); }
.toggle > span { display: grid; gap: 0.2rem; }
.toggle input:disabled + span { opacity: 0.6; cursor: default; }
.install-steps { margin: 0.4rem 0 0; padding-left: 1.2rem; }
.install-steps li { margin-bottom: 0.3rem; }
/* Page Coach (refonte du 15/11/2026, maquette « Page Coach — refonte ») : à gauche, ce qu'il a à voir avec toi, des
   sujets précis et votre dernier échange ; à droite, trois listes groupées (une ligne par sujet, qui se déplie sur
   place). Sur téléphone, dans cet ordre, l'une sous l'autre. */
.coach-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 0 2rem; align-items: start; }
.coach-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1.4rem; }
.coach-head h1 { margin: 0 0 0.3rem; }
.coach-sub { margin: 0; font-size: 0.88rem; color: var(--text-2); }
.coach-section { margin: 0 0 1.75rem; }
.coach-section > h2, .le-head { margin: 0 0.25rem 0.6rem; }
.coach-section > .hint { margin: 0.5rem 0.25rem 0; }
/* Liste groupée : une carte sans marge intérieure, une ligne de 52 px par sujet, séparées d'un filet. */
.card.group { padding: 0; margin: 0; overflow: hidden; }
.group > * + * { border-top: 1px solid var(--border); }
.g-row, details.g-fold > summary {
  display: flex; align-items: center; gap: 0.75rem; min-height: 52px; margin: 0; padding: 0.45rem 1rem;
  color: var(--text); text-decoration: none; list-style: none; cursor: pointer;
}
.g-row:hover, details.g-fold > summary:hover { background: var(--band); text-decoration: none; }
.g-title { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.g-strong .g-title { font-weight: 600; }
.g-meta { flex: 0 1 auto; min-width: 0; max-width: 45%; color: var(--muted); font-size: 0.85rem; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; }
.g-out { color: var(--accent); }
.g-fold > summary::-webkit-details-marker { display: none; }
.g-fold > summary::after {
  content: "›"; flex: none; width: 1.2rem; text-align: center; color: var(--muted); font-size: 1.2rem; line-height: 1;
  transition: transform 0.15s;
}
.g-fold[open] > summary { background: var(--band); }
.g-fold[open] > summary .g-title { font-weight: 650; }
.g-fold[open] > summary::after { transform: rotate(90deg); }
@media (prefers-reduced-motion: reduce) { .g-fold > summary::after { transition: none; } }
.g-body { padding: 0.8rem 1rem 1rem; border-top: 1px solid var(--border); overflow-wrap: anywhere; }
.g-body > :first-child { margin-top: 0; }
.g-body > .hint { margin-bottom: 0.6rem; }
.g-body .guide { margin: 0; }
/* Ce qu'il a à voir avec toi : l'agenda, qui s'en charge, l'action qui le lance, puis « Bientôt » en pied. */
.card.coach-agenda { padding: 0; overflow: hidden; }
.agenda-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.8rem; padding: 1.1rem 1rem 0.3rem; }
.agenda-head h2 { margin: 0; }
.agenda-empty, .agenda-writing { padding: 0 1rem; }
.ok-mark { color: var(--ok-ink); font-weight: 700; }
.agenda-rows { padding: 0 1rem; }
.agenda-rows .fold-row > summary { min-height: 48px; }
.agenda-rows .fold-row .fr-title { font-weight: 450; }
.agenda-more > summary {
  list-style: none; display: flex; justify-content: space-between; align-items: center; min-height: 48px; margin: 0;
  color: var(--text-2); font-size: 0.9rem;
}
.agenda-more > summary::-webkit-details-marker { display: none; }
.agenda-more > summary::after { content: "›"; color: var(--muted); font-size: 1.2rem; width: 1.2rem; text-align: center; }
.agenda-more[open] > summary { display: none; }
.agenda-more > .fold-rows > .fold-row:first-child { border-top: 0; }
.agenda-action { padding: 0.6rem 1rem 1.1rem; display: grid; gap: 0.6rem; }
.agenda-action form { margin: 0; }
.agenda-action .hint { text-align: center; }
.btn.btn-wide { width: 100%; min-height: 50px; font-size: 1rem; }
.agenda-soon { border-top: 1px solid var(--border); background: var(--bg); }
.agenda-soon > summary { font-size: 0.9rem; color: var(--text-2); }
.agenda-soon .g-body { background: var(--surface); }
/* Qui s'en charge, sur chaque sujet : le corail pour ce qui attend le coureur (« avec toi »). */
.prio.who-prio { background: var(--warn-bg); color: var(--warn-ink); }
.prio.who-you { background: var(--band-strong); color: var(--accent); }
.prio.who-him { background: var(--grid); color: var(--text-2); }
/* Votre dernier échange : la voix du coach sur la réglure, quatre lignes au plus. */
.le-head { display: flex; justify-content: space-between; align-items: center; gap: 0.8rem; }
.le-head h2 { margin: 0; }
.le-all { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; font-size: 0.9rem; white-space: nowrap; }
.last-exchange .eyebrow, .last-exchange .ruled { margin: 0 0.25rem; }
.le-text { font-family: var(--font-serif); font-size: 1.12rem; }
.le-text strong { font-weight: inherit; }
.le-summary { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; max-height: 112px; }
.le-label { font-weight: 650; color: var(--text-2); }
/* Notes du coach (Ce qu'il retient) : la catégorie et la date, le texte, une croix pour la retirer. */
.notes li .note-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 0.15rem; }
.note-meta { display: flex; align-items: center; gap: 0.5rem; }
.note-x {
  width: 44px; height: 44px; flex: none; border: 0; border-radius: 12px; background: none; color: var(--muted);
  font: inherit; font-size: 1.3rem; line-height: 1; cursor: pointer; margin: -0.4rem 0 0 0;
}
.note-x:hover { background: var(--band); color: var(--text); }
.g-body .note-form { flex-direction: column; flex-wrap: nowrap; padding-top: 0.8rem; border-top: 1px solid var(--border); }
.notes .note-main .note-text { flex: none; }  /* en colonne : pas la base de 14rem de la ligne (elle deviendrait une hauteur) */
.note-form-row { display: flex; gap: 0.5rem; min-width: 0; }
.g-body .note-form input { min-height: 44px; flex: none; }
.g-body .note-form-row select { min-height: 44px; flex: 1 1 auto; min-width: 0; }
.note-form-row .btn { flex: none; }
.coach-head .mascot { width: 120px; }
@media (max-width: 600px) { .coach-head .mascot { width: 88px; } }
.paper-section { margin: 0.4rem 0 1.25rem; }
details.paper-section.fold > summary { min-height: 44px; }
/* Page d'un run : surtitre (jour, heure, sport), titre, une ligne (type, séance clé, chiffres), puis le verdict du
   coach (la première ligne de son avis) sur la réglure. Pas de graphique (choix de l'utilisateur, novembre 2026). */
.run-head h1 { margin-bottom: 0.3rem; }
.run-head .eyebrow { margin: 0 0 0.15rem; }
.run-head { margin-bottom: 0.8rem; }
.run-plan-line { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.5rem; margin: 0.45rem 0 0; color: var(--text-2); }
.run-plan-line .kind-chip { margin: 0; }
.run-verdict { margin: 0 0 1.25rem; }
/* Le verdict : la voix du coach, en serif et sans gras (retour du 15/11/2026 : la classe .verdict, celle du
   badge d'un objectif, le mettait en gras et le décalait). */
.run-verdict .verdict-lead { font-family: var(--font-serif); font-size: 1.3rem; font-weight: 500; margin: 0; }
.run-verdict .verdict-lead strong { font-weight: inherit; }
/* Le paragraphe de l'avis, sous le verdict, sur la même réglure : la voix du coach (serif), plus petite. */
.run-verdict .verdict-rest { font-family: var(--font-serif); font-size: 1.05rem; margin: 0; }
.run-verdict .verdict-rest ul, .run-verdict .verdict-rest ol { padding-left: 1.2rem; }
.verdict-by { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 0.25rem 0 0; }
.verdict-by .badge, .verdict-by .coach-tag { margin: 0; }
/* Le déroulé (_run_story.html) : une ligne par étape, l'heure de la montre, puis la frise verticale (épaisseur :
   effort, échauffement, récupération ; couleur : l'intensité de l'étape, --lvl), arrêts et marche en pointillé. */
.story { padding-left: 0.6rem; }
.story .card-head { padding-left: 0.8rem; margin-bottom: 0.3rem; }
.thread { list-style: none; margin: 0; padding: 0; }
.ev { display: flex; align-items: stretch; margin: 0; }
.ev-time { flex: none; width: 2.6rem; text-align: right; padding-top: 0.7rem; font-size: 0.78rem; color: var(--text-2);
  font-variant-numeric: tabular-nums; }
.ev-time.strong { color: var(--text); font-weight: 650; }
.ev-rail { flex: none; width: 1.8rem; display: flex; flex-direction: column; align-items: center; }
.ev-rail::before { content: ""; flex: 1; width: 6px; background: var(--lvl, var(--zone-2)); }
.ev-body { flex: 1; min-width: 0; padding: 0.6rem 0 0.75rem; }
.ev-work .ev-rail::before { width: 12px; }
/* Chaque chiffre une fois (story._layout) : le principal en gros avec sa jauge, puis des colonnes étiquetées de
   même largeur d'un effort à l'autre, pour lire la dérive en descendant une colonne. */
.ev-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.1rem 0.5rem; }
.ev-planned { color: var(--muted); font-size: 0.82rem; }
.ev-line { display: flex; justify-content: space-between; align-items: baseline; gap: 0.8rem; }
.ev-aside { color: var(--text-2); font-size: 0.88rem; white-space: nowrap; }
.ev-recovery .ev-line, .ev-after .ev-line, .ev-recovery .ev-aside, .ev-after .ev-aside { color: var(--muted); font-size: 0.85rem; }
.stat-grid { display: grid; grid-template-columns: minmax(4rem, 4.6rem) repeat(var(--cols, 0), minmax(0, 3.8rem));
  column-gap: 0.6rem; align-items: start; margin-top: 0.45rem; }
.stat-grid.no-big { grid-template-columns: repeat(var(--cols, 1), minmax(0, 3.8rem)); }
.stat { display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; }
.stat-grid .num { text-align: left; }
.stat-big { font-size: 1.5rem; font-weight: 700; line-height: 1; letter-spacing: -0.01em; }
.stat-v.same { color: var(--muted); font-weight: 500; }
.stat-l { font-size: 0.62rem; font-weight: 650; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-v { font-size: 1.05rem; font-weight: 600; line-height: 1.2; padding-top: 0.3rem; }
/* La jauge : la cible (bleu encre pâle, la moitié centrale) et l'allure de la montre ; la cible est dite en tête. */
.gauge { position: relative; display: block; height: 12px; margin-top: 0.2rem; }
.gauge::before { content: ""; position: absolute; left: 0; right: 0; top: 3px; height: 6px; border-radius: 3px; background: var(--grid); }
.gauge-target { position: absolute; left: 25%; width: 50%; top: 3px; height: 6px; border-radius: 3px;
  background: color-mix(in srgb, var(--series-pace) 28%, transparent); }
/* Le point reste dans la jauge : sa position (--p, de 0 à 100) se compte sur la largeur moins son diamètre. */
.gauge-dot { position: absolute; top: 0; left: calc((100% - 12px) * var(--p) / 100); width: 12px; height: 12px; border-radius: 50%;
  background: var(--series-pace); box-shadow: 0 0 0 2px var(--surface); box-sizing: border-box; }
.ev-splits { margin: 0.45rem 0 0; font-size: 0.85rem; color: var(--text-2); }
.ev-splits .stat-l { margin-right: 0.3rem; }
.story-target { font-size: 0.8rem; color: var(--text-2); background: var(--bg); border: 1px solid var(--border);
  border-radius: 999px; padding: 0.15rem 0.6rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.story-sum { margin: 0.7rem 0 0 0.8rem; font-size: 0.92rem; }
.story-sum .stat-l { margin-right: 0.35rem; }
.ev-work .ev-body, .ev-whole .ev-body { padding: 0.75rem 0 0.95rem; }
.ev-work .ev-time, .ev-whole .ev-time { padding-top: 0.85rem; }
.steps-table th { white-space: nowrap; }
.steps-table .step-planned { display: block; font-weight: 400; font-size: 0.72rem; color: var(--muted); white-space: normal; }
.ev-recovery .ev-rail::before { width: 4px; opacity: 0.6; }
.ev-recovery .ev-body, .ev-sum .ev-body, .ev-after .ev-body { padding: 0.45rem 0 0.55rem; }
.ev-recovery .ev-time, .ev-after .ev-time { padding-top: 0.5rem; }
.ev-after .ev-rail::before { width: 3px; background: var(--border); }
.ev-sum .ev-rail::before { width: 4px; opacity: 0.6; }
.ev-series .ev-rail::before { width: 12px; }
.ev-series .ev-body { padding-bottom: 0.2rem; }
.ev-stop .ev-rail::before, .ev-walk .ev-rail::before { width: 2px; background: repeating-linear-gradient(var(--muted) 0 3px, transparent 3px 6px); }
.ev-walk .ev-rail::before { background: repeating-linear-gradient(var(--muted) 0 2px, transparent 2px 4px); }
.ev-stop .ev-body, .ev-walk .ev-body { padding: 0.3rem 0; }
.ev-stop .ev-time, .ev-walk .ev-time { padding-top: 0.3rem; }
.ev-event { font-size: 0.82rem; color: var(--muted); display: inline-flex; align-items: center; gap: 0.4rem; }
.pause-mark { display: inline-block; width: 8px; height: 10px; border-left: 3px solid var(--muted); border-right: 3px solid var(--muted); box-sizing: border-box; }
.ev-end .ev-rail::before { display: none; }
.ev-end .ev-rail i { display: block; width: 12px; height: 12px; margin-top: 0.85rem; border-radius: 50%; background: var(--text); }
.ev-whole .ev-rail::before { border-radius: 3px 3px 0 0; }
.thread > .ev:first-child .ev-rail::before { border-radius: 3px 3px 0 0; }
.band-target { position: absolute; left: 25%; width: 50%; top: 3px; height: 16px; border-radius: 4px;
  background: color-mix(in srgb, var(--series-pace) 18%, transparent); }
.band-raw { position: absolute; top: 4px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: var(--series-pace); }
/* Une série résumée : une ligne par effort, la frise y montre l'effort (épais) et sa récupération (fine). */
.rep { height: 1.85rem; }
.rep .ev-time { padding-top: 0.15rem; font-size: 0.75rem; }
.rep .ev-rail::before { display: none; }
.rep .ev-rail i { display: block; }
.rep-on { width: 12px; flex: 1 1 70%; background: var(--lvl); }
.rep-off { width: 4px; flex: 1 1 30%; background: var(--zone-2); opacity: 0.6; }
.rep-off.rep-walk { width: 2px; opacity: 1; background: repeating-linear-gradient(var(--muted) 0 2px, transparent 2px 4px); }
.rep-cols { display: grid; grid-template-columns: 3.4rem 2.6rem minmax(0, 14rem) 2.2rem; column-gap: 0.5rem; align-items: center;
  padding: 0; font-size: 0.88rem; }
.rep-cols .r { text-align: right; }
.rep-cols-head { margin-top: 0.5rem; }
.series-sum { font-size: 0.88rem; }
.series-sum .stat-l { margin-right: 0.35rem; }
.rep-scale { display: flex; justify-content: space-between; padding: 0 22%; }
.rep-band { position: relative; height: 1.2rem; }
.rep-band::before { content: ""; position: absolute; left: 0; right: 0; top: 9px; height: 2px; background: var(--border); }
.rep-band .band-target { top: 3px; height: 14px; border-radius: 3px; }
.rep-band .band-raw { top: 5px; width: 10px; height: 10px; margin-left: -5px; }
.rep .ev-body.rep-cols { padding: 0.1rem 0 0; }
.story-note { margin: 0.6rem 0 0 0.8rem; font-family: var(--font-serif); }
/* Remarque du coach sous une étape (RunReport.step_notes) : sa voix, en serif. */
.ev-note { display: block; margin: 0.3rem 0 0; font-family: var(--font-serif); font-size: 0.98rem; line-height: 1.4; color: var(--text); }
.ev-rep-note .ev-rail::before { width: 4px; opacity: 0.6; }
.ev-rep-note .ev-body { padding: 0 0 0.35rem; }
.story .hint { margin-left: 0.8rem; }
/* D'un effort (ou d'une série) à l'autre : des valeurs côte à côte. */
.card-sub { margin: 0.1rem 0 0.7rem; }
.kv-arrows { display: grid; gap: 0.55rem; margin: 0; }
.kv-arrows > div { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0.1rem 1rem; }
.kv-arrows dt { color: var(--text-2); font-size: 0.88rem; }
.kv-arrows dd { margin: 0 0 0 auto; font-weight: 600; text-align: right; }
/* La séance qui suit, toute la carte est le lien. */
.next-card { display: flex; justify-content: space-between; align-items: center; gap: 1rem; color: var(--text); }
.next-card:hover { border-color: var(--accent); text-decoration: none; }
.next-card .eyebrow { display: block; }
.next-title { display: block; font-weight: 700; margin-top: 0.15rem; }
.next-card .chev { color: var(--muted); font-size: 1.3rem; }
.run-more { padding-top: 0.3rem; padding-bottom: 0.3rem; }
.run-more .fold-row > summary { min-height: 44px; }
.run-more .map { margin: 0.2rem 0 0.4rem; }
/* Carte d'un run : contrôles et attribution aux couleurs du carnet. */
.map.leaflet-container { background: var(--bg); font: 0.75rem/1.4 var(--font-sans); }
.map .leaflet-bar { border: 1px solid var(--border); box-shadow: none; border-radius: 8px; overflow: hidden; }
.map .leaflet-bar a { background: var(--surface); color: var(--text); border-bottom-color: var(--border); }
.map .leaflet-bar a:hover { background: var(--band); }
.map .leaflet-control-attribution { background: color-mix(in srgb, var(--surface) 80%, transparent); color: var(--muted); }
.map .leaflet-control-attribution a { color: var(--text-2); }
.coach-grid > * { min-width: 0; }
@media (max-width: 760px) { .coach-grid { grid-template-columns: minmax(0, 1fr); } }
.feed { list-style: none; margin: 0; padding: 0; }
.feed .coach-bubble { margin: 0.6rem 0 0; overflow-wrap: anywhere; }
.feed .coach-bubble:first-child { margin-top: 0.3rem; }
/* Guide replié dans la page Coach : étapes séparées par un filet plutôt qu'en cartes. */
.guide-nested { margin: 0; }
.guide-nested .guide-step { padding: 1rem 0; border-top: 1px solid var(--border); }
.guide-nested .guide-step:last-child { padding-bottom: 0; }
/* Liste de démarrage */
.checklist { list-style: none; margin: 0.6rem 0 0; padding: 0; }
.checklist li { display: flex; gap: 0.7rem; align-items: flex-start; padding: 0.55rem 0; border-bottom: 1px solid var(--border); }
.checklist li:last-child { border-bottom: none; }
.checklist li > div { min-width: 0; }
.setup-cta { margin: 0.5rem 0 0.1rem; }
.check-mark {
  flex: none; display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%;
  border: 2px solid var(--accent); color: var(--accent); font-weight: 700; font-size: 0.85rem;
}
.checklist li.done .check-mark { background: var(--ok-bg); border-color: var(--ok-ink); color: var(--ok-ink); }
.checklist li.done strong { color: var(--text-2); }
/* Mise en route (Aujourd'hui, /demarrage) : validation sous la liste. */
.setup .card-head { margin-bottom: 0; }
.setup-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem;
  margin-top: 0.6rem; padding-top: 0.7rem; border-top: 1px solid var(--border); }
.setup-foot p { margin: 0; flex: 1 1 16rem; }
.setup-foot form { margin: 0; }
/* Synchro Garmin en arrière-plan : bandeau en haut de chaque page tant qu'elle tourne, puis son résultat. */
.sync-banner { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; padding: 0.6rem 1rem;
  border-radius: 8px; margin-bottom: 1rem; background: var(--band); color: var(--text); border: 1px solid var(--border); }
.sync-banner .sync-text { flex: 1 1 14rem; min-width: 0; }
.sync-banner .sync-refresh { font-weight: 600; color: inherit; text-decoration: underline; }
.sync-done { background: var(--ok-bg); color: var(--ok-ink); border-color: transparent; }
.sync-error { background: var(--err-bg); color: var(--err-ink); border-color: transparent; }
.sync-icon { flex: none; width: 1rem; height: 1rem; border-radius: 50%; display: inline-grid; place-items: center;
  font-size: 0.75rem; font-weight: 700; line-height: 1; }
.sync-running .sync-icon { border: 2px solid var(--accent); border-right-color: transparent; animation: sync-spin 0.9s linear infinite; }
.sync-done .sync-icon::before { content: "✓"; }
.sync-error .sync-icon::before { content: "!"; }
@keyframes sync-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .sync-running .sync-icon { animation: none; border-right-color: var(--accent); opacity: 0.6; }
}
/* Objectifs : avis du coach, étapes, réévaluation */
.review-note { border: 1px solid var(--border); border-radius: 8px; padding: 0.7rem 0.9rem; margin: 0.8rem 0; }
.review-note ul { margin: 0.3rem 0; padding-left: 1.1rem; }
.review-note p { margin: 0.2rem 0 0; }
.review-note .actions-row, .coach-assessment .actions-row { margin: 0.5rem 0 0.2rem; }
.estimate-basis { margin: 0.2rem 0 0; }
.coach-assessment { margin-top: 0.6rem; }
.coach-assessment p { margin: 0.35rem 0; }
.verdict { font-weight: 700; border-radius: 999px; padding: 0.1rem 0.6rem; font-size: 0.85rem; }
.verdict-realistic { background: var(--ok-bg); color: var(--ok-ink); }
.verdict-ambitious { background: var(--warn-bg); color: var(--warn-ink); }
.verdict-unrealistic { background: var(--err-bg); color: var(--err-ink); }
.milestones { list-style: none; margin: 0.5rem 0 0; padding: 0; }
.milestones li { display: flex; gap: 0.6rem; align-items: flex-start; padding: 0.4rem 0; }
.milestones li > div { min-width: 0; }
.ms-icon {
  flex: none; display: inline-grid; place-items: center; width: 1.5rem; height: 1.5rem; border-radius: 50%;
  border: 2px solid var(--border); color: var(--text-2); font-size: 0.8rem; font-weight: 700;
}
.ms-achieved .ms-icon { background: var(--ok-bg); border-color: var(--ok-ink); color: var(--ok-ink); }
.ms-missed .ms-icon { background: var(--err-bg); border-color: var(--err-ink); color: var(--err-ink); }
.ms-to_judge .ms-icon { border-color: var(--warn-ink); color: var(--warn-ink); }
.ms-when { display: block; }
/* Page de l'objectif : une étape par ligne, l'échéance à la suite. */
.milestones.is-inline .ms-when { display: inline; }
.milestones.is-inline .ms-when::before { content: "·\00a0"; }  /* le point part avec l'échéance */
.milestones.is-inline .ms-icon { width: 1.3rem; height: 1.3rem; font-size: 0.72rem; border-width: 1.5px; }
.field-row { display: flex; flex-wrap: wrap; gap: 0 1rem; width: 100%; } .field-row .field { width: auto; }
/* Agenda du coach */
.tasks { list-style: none; margin: 0.5rem 0 0; padding: 0; }
.tasks li { display: flex; gap: 0.6rem; align-items: flex-start; padding: 0.45rem 0; border-bottom: 1px solid var(--border); }
.tasks li:last-child { border-bottom: none; }
.tasks li > div { min-width: 0; overflow-wrap: anywhere; }
.prio { flex: none; font-size: 0.72rem; font-weight: 700; border-radius: 999px; padding: 1px 8px; margin-top: 0.15rem; }
.prio-1 { background: var(--err-bg); color: var(--err-ink); }
.prio-2 { background: var(--warn-bg); color: var(--warn-ink); }
.prio-3, .prio-done { background: var(--grid); color: var(--text-2); }
.coach-note { border-left: 4px solid var(--accent); }
/* Plan : bandeau de l'objectif, frise des phases, semaines repliées, suite en lignes */
/* Frise des phases (_phase_ribbon.html) : une colonne par phase, à la mesure de sa durée, jamais plus étroite que son
   nom (minmax(min-content, N fr)) : les noms s'écrivent en entier, sur deux lignes au besoin. */
.phase-ribbon { margin: 0.6rem 0 0.2rem; }
.ribbon-grid { display: grid; column-gap: 2px; align-items: start; font-size: 0.75rem; }  /* même taille que les noms : ch juste */
.ribbon-grid .seg { position: relative; height: 8px; background: var(--grid); }
.ribbon-grid .seg:first-child { border-radius: 3px 0 0 3px; }
.ribbon-grid .seg:nth-last-child(1 of .seg) { border-radius: 0 3px 3px 0; }
.ribbon-grid .done { position: absolute; inset: 0 auto 0 0; background: var(--accent); border-radius: inherit; }
.ribbon-grid .here { position: absolute; top: -4px; width: 2px; height: 16px; margin-left: -1px; background: var(--text); border-radius: 1px; }
/* Échéance d'un objectif du plan : un losange sur la frise, plein pour l'objectif principal. */
.ribbon-grid .goal-mark { position: absolute; top: 50%; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; box-sizing: border-box;
  transform: rotate(45deg); background: var(--surface); border: 2px solid var(--text); border-radius: 1px; }
.ribbon-grid .goal-mark.is-main { background: var(--text); }
.phase-ribbon.is-big .goal-mark { width: 13px; height: 13px; margin: -6.5px 0 0 -6.5px; }
.ribbon-grid .goal-mark.is-this { box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--text-2); }
.plan-also { margin: 0.4rem 0 0; color: var(--text-2); }
/* Tes chronos (Progrès) : une ligne par distance — son nom et son évolution, une mini-courbe, le chrono du coach —
   qui se déplie sur la courbe entière. */
.chrono-row > summary { min-height: 52px; }
.chrono-row .cr-name { display: flex; flex-direction: column; min-width: 0; }
.chrono-row .cr-trend { color: var(--text-2); }
.chrono-row .cr-figure { display: flex; align-items: center; gap: 0.7rem; }
.chrono-row .cr-spark { position: relative; display: block; width: 84px; height: 30px; }
/* Largeur fixe, calée à droite : les mini-courbes restent alignées d'une ligne à l'autre (« 44:30 » sous « 1:42:30 »). */
.chrono-row .cr-time { white-space: nowrap; font-size: 1.05rem; min-width: 7ch; text-align: right; }
.chrono-row .fr-body .chart-box { margin: 0.4rem 0 0.2rem; }
@media (max-width: 420px) { .chrono-row .cr-spark { width: 60px; } }
/* Profil : ses distances, des puces à cocher (comme les sensations du débrief). */
.distance-chips { border: none; padding: 0; margin: 0 0 0.8rem; }
.ribbon-grid .seg-name { margin-top: 0.3rem; padding-right: 0.3rem; line-height: 1.25; color: var(--text-2); }
.ribbon-grid .seg-name.is-current { color: var(--text); font-weight: 650; }
/* Page de l'objectif : plus haute, jusqu'à l'échéance ; après la fin du plan, une case hachurée « à écrire ». */
.phase-ribbon.is-big { margin-top: 0.9rem; }
.phase-ribbon.is-big .seg { height: 14px; }
.phase-ribbon.is-big .here { top: -6px; height: 26px; }
.ribbon-grid .seg.is-unwritten { background: repeating-linear-gradient(135deg, var(--border) 0 3px, transparent 3px 6px);
  box-shadow: inset 0 0 0 1px var(--border); }
.ribbon-grid .seg-name.is-unwritten { font-style: italic; }
/* Bandeau de l'objectif en tête du Plan (maquette « Bandeau B ») : le compte à rebours en grand, une petite colonne
   alignée (visé, estimé par le coach en serif, écart), la frise, et une ligne de lien en bas : toute la carte mène à la
   page de l'objectif, et ça se voit. */
.goal-banner { display: block; color: var(--text); padding-bottom: 0.2rem; }
.goal-banner:hover { text-decoration: none; border-color: var(--accent); }
.gb-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.gb-when { display: grid; gap: 0.25rem; min-width: 0; }
.gb-countdown { font-size: 2.5rem; }
.gb-countdown.is-long { font-size: 1.5rem; white-space: normal; }
.gb-times { display: grid; grid-template-columns: auto auto; gap: 0.1rem 0.9rem; align-items: baseline; margin: 0; flex: none; }
.gb-times dt { font-size: 0.82rem; color: var(--text-2); text-align: right; }
.gb-times dd { margin: 0; text-align: right; font-weight: 650; font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.gb-times .gb-estimate { font-family: var(--font-serif); font-weight: 500; font-size: 1.25rem; }
.gb-times .gb-gap { font-size: 0.92rem; color: var(--text-2); }
.gb-focus { color: var(--text-2); text-align: right; }
.goal-banner .phase-ribbon { margin-top: 1rem; }
.gb-more { display: flex; justify-content: space-between; align-items: center; min-height: 44px; margin-top: 0.5rem;
  border-top: 1px solid var(--border); color: var(--accent); font-size: 0.92rem; }
.gb-more .chev { color: var(--accent); }
.plan-end { margin: 0.6rem 0 0.2rem; }
.plan-logic { margin: 0.4rem 0 1rem; }
/* Objectifs en une ligne (Plan) : la ligne mène à la page de l'objectif. */
.goal-rows { list-style: none; margin: 0; padding: 0; }
.goal-rows li + li { border-top: 1px solid var(--border); }
.goal-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 0.8rem; align-items: center; min-height: 44px;
  padding: 0.5rem 0; color: var(--text); }
.goal-row:hover { text-decoration: none; }
.goal-row:hover .gr-name { text-decoration: underline; }
.gr-body { display: grid; min-width: 0; }
.gr-name { font-weight: 600; overflow-wrap: anywhere; }
.gr-when { font-weight: 700; }
/* Page de l'objectif : le chemin, l'avis du coach sur la réglure, le dossier replié. */
.goal-page-head h1 { margin-bottom: 0.2rem; }
.goal-page-head p { margin: 0; }
.goal-path h2 { margin-bottom: 0.2rem; }
.goal-path .eyebrow { margin: 0; }
/* Le chrono du coach en grand, l'écart à côté : le chrono visé est dans le titre et sur le graphique. */
.goal-times { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 0.6rem; margin: 1.4rem 0 0.1rem; }
.goal-times .gt-estimate { font-size: 2.1rem; font-weight: 650; line-height: 1.1; letter-spacing: -0.01em; }
.goal-times .gt-gap { color: var(--text-2); }
.goal-times .gt-gap strong { color: var(--text); }
.goal-path .chart-box { margin-top: 0.6rem; }
.goal-path .more-link { display: inline-flex; align-items: center; min-height: 44px; font-size: 0.9rem; }
.goal-path .milestones { margin-top: 0.6rem; padding-top: 0.6rem; border-top: 1px solid var(--border); }
.goal-assessment { margin: 0 0 1.25rem; max-width: 46rem; }
.goal-assessment .coach-label { margin: 0 0 0.2rem; }
.goal-assessment .rich { font-family: var(--font-serif); font-size: 1.12rem; }
.goal-file h2 { margin-bottom: 0.3rem; }
.coach-notes { font-family: var(--font-serif); font-size: 1.02rem; }
.week-km { display: inline-flex; align-items: center; gap: 0.5rem; }
.marks { display: inline-flex; gap: 3px; }
.mk { display: inline-grid; place-items: center; width: 1.15rem; height: 1.15rem; border-radius: 50%; font-size: 0.68rem; font-weight: 800; }
.mk-ok { background: var(--grid); color: var(--text-2); }
.mk-warn { background: var(--warn-bg); color: var(--warn-ink); }
.mk-missed { background: var(--grid); color: var(--text-2); }
details.week > summary.week-head { list-style: none; cursor: pointer; margin: 0; }
details.week > summary.week-head::-webkit-details-marker { display: none; }
details.week > summary.week-head::after { content: none; }
details.week[open] > summary.week-head { margin-bottom: 0.4rem; }
.week-watch { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.8rem; margin: 0.6rem 0 0; padding-top: 0.6rem; border-top: 1px solid var(--border); }
.week-watch .hint { flex: 1 1 16rem; }
.week-rows { display: grid; }
/* Semaines suivantes : une ligne aérée par semaine (retour du 15/11/2026 : « les transitions entre les semaines sont
   bizarres et peu lisibles, il faut aérer »). */
.week-row { border-bottom: 1px solid var(--border); }
.week-row:last-child { border-bottom: none; }
.week-row > summary {
  list-style: none; margin: 0; padding: 0.6rem 0; min-height: 52px; color: var(--text); cursor: pointer;
  display: grid; grid-template-columns: minmax(0, 1fr) 4.5rem 3.4rem 0.8rem; gap: 0.35rem 0.8rem; align-items: center;
}
.wr-bar { display: block; height: 6px; border-radius: 3px; background: var(--grid); overflow: hidden; }
.wr-bar > span { display: block; height: 100%; border-radius: 3px; background: var(--series-pace); }
/* Chevron : la ligne se déplie sur les séances de la semaine. */
.week-row > summary::after { content: "›"; color: var(--muted); font-size: 1.2rem; line-height: 1; text-align: center; transition: transform 0.15s; }
.week-row[open] > summary::after { transform: rotate(90deg); }
@media (prefers-reduced-motion: reduce) { .week-row > summary::after { transition: none; } }
.week-row > summary::-webkit-details-marker { display: none; }
.wr-date { font-weight: 650; min-width: 0; }
.wr-phase { font-weight: 400; color: var(--text-2); }
.wr-km { color: var(--text-2); font-size: 0.85rem; white-space: nowrap; text-align: right; }
/* Semaine dépliée : sa ligne reste à sa place, ses séances dessous dans un encart en creux (fond de page) qui prend
   sur la marge intérieure de la carte sans en sortir (0,75rem, la carte en a au moins 1rem) : les séances gardent la
   largeur des autres lignes. De l'air avant la semaine suivante. Plus de trait pointillé entre la ligne
   et ses séances : l'encart suffit à dire qu'elles en font partie. */
.week-row[open] { padding-bottom: 0.9rem; }
.week-row[open] > summary .wr-km { color: var(--text); font-weight: 600; }
.wr-workouts { background: var(--bg); border-radius: 12px; margin: 0.1rem -0.75rem 0; padding: 0.1rem 0.75rem; }
.wr-workouts .workout { padding: 0.75rem 0; }
.weeks-ahead .card-head { margin-bottom: 0.2rem; }
/* Lignes dépliables de la page Coach (todo, tâches effectuées) : comme les semaines du plan, le sujet
   sur une ligne avec une étiquette à droite, le détail dans un encart en creux. */
/* minmax(0, 1fr) : un tableau large (mesures par étape) défile dans son .table-wrap au lieu d'élargir la page. */
.fold-rows { display: grid; grid-template-columns: minmax(0, 1fr); }
.fold-row { border-bottom: 1px solid var(--border); min-width: 0; }
.fold-row:last-child { border-bottom: none; }
.fold-row > summary {
  list-style: none; margin: 0; padding: 0.55rem 0; color: var(--text); cursor: pointer;
  display: grid; grid-template-columns: minmax(0, 1fr) auto 1.2rem; gap: 0.35rem 0.8rem; align-items: center;
}
.fold-row > summary::after { content: "›"; color: var(--muted); font-size: 1.2rem; line-height: 1; text-align: center; transition: transform 0.15s; }
.fold-row[open] > summary::after { transform: rotate(90deg); }
@media (prefers-reduced-motion: reduce) { .fold-row > summary::after { transition: none; } }
.fold-row > summary::-webkit-details-marker { display: none; }
.fold-row .fr-title { font-weight: 600; overflow-wrap: anywhere; }
.fold-row .fr-meta { color: var(--text-2); white-space: nowrap; }
.fold-row .prio { margin-top: 0; white-space: nowrap; }
.fold-row[open] > summary { border-bottom: 1px dashed var(--border); }
.fold-row[open] {
  background: var(--bg); border: 1px solid var(--border); border-radius: 10px;
  margin: 0.4rem -0.75rem; padding: 0 0.75rem 0.3rem;
}
.fold-row:has(+ .fold-row[open]) { border-bottom: none; }
.fr-body { padding: 0.5rem 0 0.3rem; overflow-wrap: anywhere; }
.fr-body > :first-child { margin-top: 0; }
.fr-body p { margin: 0 0 0.4rem; }
.fr-debug code { font-size: 0.75rem; }
@media (max-width: 600px) {
  .week-row > summary { grid-template-columns: minmax(0, 1fr) 3.4rem 3rem 0.7rem; gap: 0.3rem 0.6rem; }
}
.watch-on { color: var(--ok-ink); }
.watch-stale { color: var(--warn-ink); }
.workout:target { background: var(--band); border-radius: 8px; }
/* Aujourd'hui */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.eyebrow { font-size: 0.72rem; font-weight: 650; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-2); }
.page-head h1 { margin-bottom: 0.1rem; }
.page-head p { margin: 0 0 1rem; }
/* Historique : le carnet ou les progrès, en sous-onglets de 44 px, l'actif en pastille (comme la barre du bas). */
.history-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; margin-bottom: 1rem; }
.history-head h1 { margin: 0.4rem 0 0; }
.subtabs { display: flex; gap: 0.25rem; }
.subtabs a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 1rem; border-radius: 999px;
  color: var(--text-2); font-weight: 550;
}
.subtabs a:hover { color: var(--text); text-decoration: none; background: var(--band); }
.subtabs a[aria-current="page"] { background: var(--band-strong); color: var(--text); font-weight: 650; }
@media (max-width: 600px) {
  .history-head { flex-wrap: nowrap; }
  .subtabs a { padding: 0 0.8rem; }
}

/* Carnet de l'Historique. L'index : les km de chaque mois sur un an, en barres bleu encre ; un mois touché mène à
   sa place dans le carnet. Ceux de la page plus foncés, le mois en cours plus pâle (période en cours). */
.month-index { margin: 0 0 1rem; }
.mi-head { display: flex; justify-content: space-between; gap: 1rem; margin: 0 0 0.3rem; font-size: 0.78rem; color: var(--text-2); }
.mi-head a { white-space: nowrap; }
.mi-bars { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 3px; }
.mi-bars a { display: flex; flex-direction: column; align-items: stretch; gap: 3px; min-height: 44px; color: var(--muted); text-decoration: none; }
.mi-bar { display: flex; align-items: flex-end; height: 40px; border-bottom: 1px solid var(--border); }
.mi-bar > span { display: block; width: 100%; border-radius: 3px 3px 0 0; background: var(--series-pace); opacity: 0.35; }
.mi-bars a.is-shown .mi-bar > span { opacity: 1; }
.mi-bars a.is-current .mi-bar > span { opacity: 0.55; }
.mi-bars a.is-shown.is-current .mi-bar > span { opacity: 0.7; }
.mi-label { font-size: 0.7rem; font-weight: 600; text-align: center; line-height: 1; }
.mi-bars a.is-shown .mi-label { color: var(--text-2); }
.mi-bars a:hover .mi-bar > span { opacity: 1; }
.mi-bars a:hover .mi-label { color: var(--accent); }

/* Filtre Tout / Runs / Hors course : des puces de 44 px, la choisie en pastille. */
.filter-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 0.6rem; }
.filter-chips a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 0.9rem; border: 1px solid var(--border);
  border-radius: 999px; font-size: 0.88rem; font-weight: 550; color: var(--text-2); background: var(--bg);
}
.filter-chips a:hover { text-decoration: none; color: var(--text); border-color: var(--accent); }
.filter-chips a[aria-current="true"] { background: var(--band-strong); border-color: transparent; color: var(--text); font-weight: 650; }

/* Un mois : son titre et ses chiffres sur le papier, le bilan du coach sur la réglure, puis ses semaines dans une
   carte, une ligne par activité (mêmes lignes que les séances du plan). */
.month { margin: 1.6rem 0 0; }
.month-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.1rem 1rem; margin: 0 0 0.5rem; }
.month-head h2 { margin: 0; }
.month-now { font-family: var(--font-sans); font-size: 0.78rem; font-weight: 600; color: var(--text-2); }
.month-stats { margin: 0; font-size: 0.85rem; color: var(--text-2); font-variant-numeric: tabular-nums; }
.month-word { max-width: 42rem; margin: 0 0 0.8rem; font-family: var(--font-serif); font-size: 1.05rem; }
.month-word > p { margin: 0; }
.month-word .coach-tag { margin-right: 0.45rem; vertical-align: 2px; }
.month-more > summary { font-family: var(--font-sans); font-size: 0.85rem; color: var(--accent); cursor: pointer; min-height: 44px; display: flex; align-items: center; }
.month-more[open] > summary { min-height: 0; margin-bottom: 0.2rem; }
.month-gap { margin: 1.4rem 0 0; padding: 0.6rem 0; border-top: 1px dashed var(--border); border-bottom: 1px dashed var(--border); font-size: 0.88rem; }
.card.carnet { padding-top: 0.4rem; padding-bottom: 0.4rem; }
.carnet-week + .carnet-week { border-top: 1px solid var(--border); }
.cw-head {
  display: flex; justify-content: space-between; gap: 1rem; margin: 0; padding: 0.7rem 0 0.1rem;
  font-size: 0.72rem; font-weight: 650; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-2);
}
.cw-head .num { letter-spacing: 0; text-transform: none; font-size: 0.8rem; font-weight: 600; }
.carnet-week.is-empty .cw-head { padding-bottom: 0.7rem; }
.carnet-week.is-empty .cw-head .num { color: var(--muted); font-weight: 400; }
.carnet .workout { min-height: 3.2rem; padding: 0.65rem 0; }
.carnet-pager { margin: 1.4rem 0 0; }
.carnet-foot { margin: 1.6rem 0 0; padding-top: 0.9rem; border-top: 1px solid var(--border); color: var(--text-2); }
.carnet-foot p { margin: 0 0 0.4rem; }
.carnet-foot form { display: inline; margin: 0; }
.carnet-foot label.link { color: var(--accent); cursor: pointer; }
.carnet-foot label.link:hover { text-decoration: underline; }
.year-word { font-family: var(--font-serif); max-width: 42rem; margin: 0 0 0.4rem; }
.today-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 0 1rem; align-items: start; }
.today-grid > * { min-width: 0; }
/* minmax(0, …) : sinon un canevas (300 px par défaut) élargit la colonne au-delà de l'écran. */
@media (max-width: 760px) { .today-grid { grid-template-columns: minmax(0, 1fr); } }
/* Carte principale (séance du jour, run à débriefer) : un bord ordinaire, au corail au survol (elle mène quelque part). */
.hero:has(.session-main .title-link:hover) { border-color: var(--accent); }
.hero .card-head { margin-bottom: 0.4rem; }
/* Titre de la séance : une donnée (envoyée sur la montre), donc en sans, gros et serré. */
.hero-title { font-family: var(--font-sans); font-size: 1.85rem; font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 0.4rem; }
.title-link { color: inherit; }
.title-link:hover { color: var(--accent); text-decoration: none; }
/* Clawd, la mascotte (static/mascot/) : à droite du haut de la carte, même taille partout (toile commune). */
.hero-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 0.8rem; align-items: start; }
.mascot { display: block; width: 150px; height: auto; }
@media (max-width: 600px) { .hero-top .mascot { width: 104px; } }
.targets { display: grid; grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr)); gap: 0.6rem 0.5rem; margin: 0.8rem 0 0.4rem; }
.targets div { min-width: 0; }
.targets dt { font-size: 0.75rem; color: var(--muted); }
.targets dd { margin: 0; font-weight: 650; font-size: 1.1rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.targets dt small { font-size: inherit; }
.targets dd small { font-weight: 500; font-size: 0.78rem; color: var(--text-2); white-space: nowrap; }
.hero-desc { color: var(--text-2); margin: 0.5rem 0 0; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; margin-top: 0.8rem; }
.hero-actions form { margin: 0; }
/* Pied d'une carte de séance (Aujourd'hui, page de la séance) : les actions, des boutons de même
   hauteur qui se partagent la ligne (un par ligne s'il n'y a pas la place), puis au besoin une ligne
   discrète (« Déjà couru ? Récupérer mon run Garmin »). */
.card-actions { margin-top: 1rem; padding-top: 0.9rem; border-top: 1px solid var(--border); display: grid; gap: 0.6rem; }
.card-actions .btns { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.card-actions .btns > form { display: flex; margin: 0; }
/* Deux boutons de même largeur, côte à côte même sur téléphone (sans filet au-dessus : la carte s'arrête là). */
.card-actions:has(.btns-pair) { border-top: 0; padding-top: 0; }
.card-actions .btns.btns-pair { flex-wrap: nowrap; }
.card-actions .btns.btns-pair > * { flex: 1 1 0; min-width: 0; }
.card-actions .btns.btns-pair .btn { min-height: 48px; width: 100%; padding-inline: 0.5rem; white-space: nowrap; }
@media (max-width: 600px) {
  /* Téléphone : un bouton par ligne, sur toute la largeur (cible au pouce). */
  .card-actions .btns:not(.btns-pair) > form, .card-actions .btns:not(.btns-pair) > .btn, .card-actions .btns:not(.btns-pair) > form > .btn { flex: 1 1 100%; }
}
.card-actions .sub { margin: 0; color: var(--text-2); }
.card-actions .sub form { margin: 0 0 0 0.25rem; display: inline; }
/* État de la séance sur la montre, en tête de la ligne d'actions de sa page. */
.watch-state { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 0.8rem; margin: 0; }
.watch-state form { margin: 0; }
.watch-state strong { font-weight: 600; }
.compare { margin: 0.7rem 0 0.3rem; max-width: 34rem; }
.compare th, .compare td { padding: 0.3rem 0.4rem; font-variant-numeric: tabular-nums; }
.compare thead th { font-size: 0.75rem; }
.compare tbody th { font-weight: 500; color: var(--text-2); }
.compare td:nth-child(2) { white-space: nowrap; }  /* cibles courtes : « 6:05–5:40 » d'un seul tenant */
/* Ce que le coach a écrit, dans une carte : sa voix (serif) suffit à le distinguer, sans bulle autour ; le
   « qui » en italique au-dessus (« L'avis de ton coach · 12 oct. »). */
.coach-bubble { margin: 0.9rem 0 0.4rem; }
.coach-bubble .who { font-family: var(--font-serif); font-style: italic; font-size: 0.92rem; color: var(--text-2); margin-bottom: 0.15rem; }
.coach-bubble p { margin: 0 0 0.2rem; }
.last-word .clamp { font-family: var(--font-serif); font-size: 1.1em; line-height: 1.45; margin-bottom: 0.3rem; }
/* Textes du coach (filtre coach_text, web/richtext.py) : dans sa voix, le serif (un peu plus grand :
   Newsreader a un œil plus petit qu'Instrument Sans) ; paragraphes et listes serrés. */
.rich { margin: 0 0 0.2rem; overflow-wrap: anywhere; font-family: var(--font-serif); font-size: 1.1em; line-height: 1.45; }
/* Ce qui est du coach, dit à côté d'un chiffre (« Estimé par ton coach »). */
.coach-label { font-family: var(--font-serif); font-style: italic; color: var(--text-2); }
/* Signature du coach (« COACH », corail de Clawd) : devant ce qu'il a écrit ou décidé (remarque sous une étape,
   verdict, but et conseil d'une séance, chrono estimé, son dernier mot). Petite, en capitales, jamais soulignée :
   elle ne se confond pas avec un lien. Le corail sert l'action et cette signature, rien d'autre. */
.coach-tag { display: inline-block; font-family: var(--font-sans); font-style: normal; font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin-right: 0.5em; line-height: 1; vertical-align: 0.1em; }
.rich > p, .rich > ul, .rich > ol { margin: 0 0 0.45rem; }
.rich > :last-child { margin-bottom: 0; }
.rich ul, .rich ol { padding-left: 1.2rem; }
.rich ul { list-style: disc; }  /* même puce dans le fil de la page Coach, qui est déjà une liste */
.rich li + li { margin-top: 0.2rem; }
.plan-logic .rich { margin-top: 0.6rem; }
.clamp { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
/* « Ensuite » : la prochaine séance, une ligne qui mène à sa page (comme l'état de forme). */
.next-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0.6rem; color: var(--text); padding-block: 0.8rem; }
.next-card:hover { text-decoration: none; border-color: var(--accent); }
.next-card .nc-body { display: grid; gap: 0.15rem; min-width: 0; }
.next-card .nc-when { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 0.5rem; }
.next-card .nc-title { font-weight: 600; }
.week-strip { list-style: none; margin: 0.2rem 0 0.4rem; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); text-align: center; }
.week-strip li { display: grid; justify-items: center; align-content: start; gap: 0.15rem; min-width: 0; }
/* Jour avec une séance (Aujourd'hui) : toute la colonne mène à la séance, ou au run hors plan. */
.week-strip a.d-cell { display: grid; justify-items: center; align-content: start; gap: 0.15rem; width: 100%; min-width: 0;
  color: inherit; border-radius: 6px; }
.week-strip a.d-cell:hover { background: var(--band); box-shadow: 0 0 0 4px var(--band); text-decoration: none; }
.d-name { font-size: 0.75rem; font-weight: 650; color: var(--muted); }
.is-today .d-name { color: var(--accent); }
.d-mark { display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; font-size: 0.8rem; font-weight: 800; }
.day-done .d-mark { background: var(--ok-ink); color: var(--surface); }
.day-extra .d-mark { background: var(--muted); color: var(--surface); }
.day-warn .d-mark { background: var(--warn-ink); color: var(--surface); }
.day-missed .d-mark { border: 2px solid var(--err-ink); color: var(--err-ink); }
.day-planned .d-mark { border: 2px solid var(--muted); }
.day-today .d-mark { border: 3px solid var(--accent); }
.day-rest .d-mark { width: 0.4rem; height: 0.4rem; margin: 0.6rem 0; background: var(--border); }
.d-short { font-size: 0.7rem; color: var(--text-2); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-height: 1.1em; }
.topics { list-style: none; margin: 0.4rem 0 0.2rem; padding: 0; display: grid; gap: 0.35rem; }
.topics li { display: grid; grid-template-columns: 0.5rem minmax(0, 1fr); gap: 0.55rem; align-items: baseline; }
.topics li::before { content: ""; width: 0.45rem; height: 0.45rem; border-radius: 50%; background: var(--accent); transform: translateY(-1px); }
.topics li.hi::before { background: var(--series-fatigue); }
.coach-card .actions-row { margin-top: 0.8rem; align-items: center; }
/* Aujourd'hui : surtitre (date, compte à rebours), titre, puis le mot du jour du coach (coach.daily), une
   citation en italique entre guillemets, avant la séance. */
.today-head .eyebrow { margin: 0 0 0.15rem; }
.today-head h1 { margin-bottom: 0.7rem; }
.daily-word { margin: 0 0 1.1rem; max-width: 40rem; }
.daily-word .rich { margin: 0; font-style: italic; font-size: 1.3rem; line-height: 1.4; }
.daily-word .rich > :first-child::before { content: "« "; }
.daily-word .rich > :last-child::after { content: " »"; }
.daily-word figcaption { margin-top: 0.3rem; color: var(--text-2); }
.daily-word.ruled .rich { line-height: 28px; }
.daily-word.ruled figcaption { margin: 0; }
/* « séance clé » surligné dans le titre d'Aujourd'hui : un coup de feutre, dit une fois pour la page. */
mark.key-mark { background: var(--highlight); color: var(--highlight-ink); padding: 0 0.15em; border-radius: 3px; white-space: nowrap;
  -webkit-box-decoration-break: clone; box-decoration-break: clone; }
/* Clawd à côté du mot du jour (sa pose dit la séance du jour, app._today_head). */
.coach-word { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 1rem; align-items: start; max-width: 46rem; margin: 0 0 1.2rem; }
.coach-word .mascot { width: 120px; margin-top: 0.15rem; }
.coach-word .daily-word { margin: 0; }
@media (max-width: 600px) {
  .coach-word { gap: 0 0.75rem; }
  .coach-word .mascot { width: 80px; margin-top: 0.3rem; }
  .daily-word .rich { font-size: 1.18rem; }
}
/* Carte de la séance du jour : le haut de la carte mène à la séance (lien du titre étiré, chevron à droite du
   surtitre), les étiquettes à droite (statut, montre), les chiffres en une ligne, la frise sur la rampe des zones
   avec son déroulé en une ligne ; dessous, deux boutons côte à côte. */
.head-tags { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; }
.head-tags .chev { margin-left: 0.2rem; }
.session-card .hero-title { margin-top: 0.15rem; }
.session-main { position: relative; }
.session-main .title-link::after { content: ""; position: absolute; inset: 0; border-radius: 12px; }
.session-main .title-link:focus-visible { outline: none; }
.session-main:has(.title-link:focus-visible) { outline: 2px solid var(--accent); outline-offset: 0.4rem; border-radius: 10px; }
.targets-line { display: flex; flex-wrap: wrap; gap: 0.5rem 1.6rem; }
.targets-line dt { font-size: 0.78rem; color: var(--text-2); }
.strip-shape .strip { height: 40px; margin: 0.8rem 0 0.3rem; }
.strip-shape .strip-block { border-radius: 2px; }
.strip-legend { margin: 0; color: var(--text-2); }
/* La semaine d'Aujourd'hui en sept cases de même taille (≥ 44 px au doigt) : le jour, sa date, le type de la
   séance (la séance clé du coach au surligneur, le repos en tiret), dessous ce qui s'est passé (✓ fait, ! selon le
   coach, × manqué) ; aujourd'hui encadré au corail. */
.week-progress { margin: -0.35rem 0 0.7rem; }
.week-progress span { background: var(--series-pace); }
.today-week li { padding: 0; }
.today-week .d-cell { display: grid; justify-items: center; align-content: start; gap: 0.1rem; width: 100%; min-width: 0;
  min-height: 4.75rem; padding: 0.35rem 0 0.2rem; border: 2px solid transparent; border-radius: 10px; color: inherit; }
.today-week li.is-today .d-cell { border-color: var(--accent); background: var(--band); }
.today-week .d-num { font-size: 0.95rem; font-weight: 650; font-variant-numeric: tabular-nums; line-height: 1.2; }
.today-week .is-today .d-name, .today-week .is-today .d-num { color: var(--text); font-weight: 800; }
.today-week .d-rest { color: var(--muted); font-size: 0.85rem; line-height: 1.6; margin-top: 0.15rem; }
.today-week .kind-chip.is-key { background: var(--highlight); color: var(--highlight-ink); border-radius: 3px; box-shadow: none; }
.today-week .kind-chip { margin: 0.15rem 0 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; font-size: 0.68rem;
  line-height: 1.6; padding: 0 5px; }
.today-week .kind-extra { background: var(--grid); color: var(--text-2); }
.today-week .day-missed .kind-chip { opacity: 0.55; text-decoration: line-through; }
.today-week li .d-mark { width: auto; height: 1.1rem; margin: 0; border: 0; border-radius: 0; background: none; font-size: 0.78rem; }
.today-week .day-done .d-mark { color: var(--text-2); }
.today-week .day-warn .d-mark { color: var(--warn-ink); }
.today-week .day-missed .d-mark { color: var(--text-2); }
.today-week .day-extra .d-mark { color: var(--muted); }
.kind-chip.is-key { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--highlight); }
/* Chrono estimé et objectif côte à côte, libellé au-dessus du chiffre (comme .tiles). */
.kv { margin: 0; display: grid; grid-auto-flow: column; gap: 1.5rem; flex: none; }
.kv div { display: flex; flex-direction: column; }
.kv dt { color: var(--text-2); font-size: 0.78rem; }
.kv dd { margin: 0; font-weight: 650; font-size: 1.35rem; line-height: 1.3; font-variant-numeric: tabular-nums; }
/* Le chiffre du coach (chrono estimé) dans sa voix : libellé en italique, chiffre en serif. */
.kv dt.coach-label { font-size: 0.86rem; }
.kv .by-coach dd { font-family: var(--font-serif); font-weight: 500; font-size: 1.5rem; }
.chart-spark { height: 64px; flex: 1 1 8rem; min-width: 0; }
/* Le carnet de la semaine, sous ses sept cases (Aujourd'hui) : une ligne par séance passée avec le mot du coach, un
   chrono qu'il vient d'estimer, la séance suivante, la forme. Chaque ligne mène à sa page. */
.week-lines { margin: 0.5rem 0 -0.3rem; border-top: 1px solid var(--border); }
.w-word strong, .last-word .clamp strong, .j-preview strong { font-weight: inherit; }
.goal-link { color: inherit; text-decoration: underline; text-decoration-color: var(--border); text-underline-offset: 3px; }
.goal-link:hover { text-decoration-color: currentColor; }
.coach-next { margin: 0 0 1rem; }
.coach-other { margin: 0 0 1rem; text-align: center; }
.coach-other a { display: inline-flex; align-items: center; min-height: 44px; }
.chev { color: var(--muted); font-size: 1.3rem; line-height: 1; }
/* Blocs repliables (details.fold) : le titre fait office de bouton. */
.fold > summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 0.8rem; margin: 0; color: var(--text); }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary h2 { margin: 0; flex: 1 1 auto; }
.fold > summary::after {
  content: "›"; color: var(--muted); font-size: 1.2rem; line-height: 1; transition: transform 0.15s;
  display: inline-grid; place-items: center; width: 1.5rem; height: 1.5rem;  /* carré : tourné, il reste dans sa boîte */
}
.fold[open] > summary::after { transform: rotate(90deg); }
.fold[open] > summary { margin-bottom: 0.8rem; }
@media (prefers-reduced-motion: reduce) { .fold > summary::after { transition: none; } }
.fold > summary .muted { flex: 0 1 auto; text-align: right; }
/* Page Coach : le compteur suit le titre (« Vos échanges · 2 »), le chevron reste à droite. */
.fold.fold-count > summary { justify-content: flex-start; flex-wrap: wrap; column-gap: 0.4rem; }
.fold.fold-count > summary h2 { flex: 0 1 auto; }
.fold.fold-count > summary .muted { order: 0; flex: 1 1 auto; text-align: left; }
.fold.fold-count > summary .muted::before { content: "· "; }
.fold.fold-count > summary::after { margin-left: auto; }
@media (max-width: 600px) {
  /* Titre sur toute la largeur, précision dessous : le titre ne se tasse pas sur trois lignes. */
  .fold > summary { flex-wrap: wrap; }
  .fold > summary .muted { order: 3; flex-basis: 100%; text-align: left; }
  /* Chiffres clés : trois par ligne. */
  .tiles { grid-template-columns: repeat(auto-fit, minmax(5.5rem, 1fr)); gap: 0.8rem 0.6rem; padding: 0.9rem 1rem; }
  .tiles-inline { padding: 0; }
  .tile-value { font-size: 1.25rem; }
  .tile-label, .tile-sub { font-size: 0.72rem; }
  .card { padding: 1rem; margin-bottom: 1rem; }
  h1 { font-size: 1.9rem; margin-bottom: 1rem; }
  main { padding-top: 1.1rem; }
  .segmented a, .segmented span { padding: 0.25rem 0.42rem; font-size: 0.8rem; }
}

/* Débrief d'une séance (ressenti du coureur) */
.debrief { margin-top: 0.9rem; padding-top: 0.8rem; border-top: 1px solid var(--border); }
.debrief-card .debrief { margin-top: 0; padding-top: 0; border-top: none; }
.debrief-title { margin: 0 0 0.15rem; color: var(--text); font-family: var(--font-serif); font-weight: 500; font-size: 1.25rem; }
/* Effort ressenti au curseur, par crans de 1 à 10 : la valeur en grand au-dessus avec son libellé (CR-10 de Borg),
   les crans dessous ; gris tant que rien n'est noté (« Glisse pour noter »). */
.rpe-slider { max-width: 26rem; }
/* « Effort ressenti » à gauche, la note à droite sur la même ligne (la légende flotte : elle quitte le cadre du
   fieldset), puis le curseur. */
fieldset.rpe { max-width: 26rem; }
fieldset.rpe > legend { float: left; line-height: 2rem; margin: 0; }
fieldset.rpe .rpe-range { clear: both; }
.rpe-readout { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: baseline; gap: 0 0.3rem; min-height: 2rem; margin: 0; }
.rpe-value { font-size: 1.6rem; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.rpe-unit, .rpe-label { color: var(--text-2); font-size: 0.9rem; }
.rpe-label { margin-left: 0.3rem; }
.rpe-slider:not(.is-set) .rpe-label { color: var(--muted); font-style: italic; margin-left: 0; }
.rpe-range { display: block; width: 100%; height: 44px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.rpe-slider:not(.is-set) .rpe-range { accent-color: var(--muted); }
/* Pas encore noté : une piste vide, sans poignée ni partie remplie jusqu'au milieu, qui se liraient comme un 5 déjà
   choisi (critique du 16/11/2026) ; un toucher sur la piste rend le curseur natif, poignée là où il tombe. La poignée
   invisible garde sa taille : on peut la saisir et la glisser. */
.rpe-slider:not(.is-set) .rpe-range { -webkit-appearance: none; appearance: none; background: transparent; }
.rpe-slider:not(.is-set) .rpe-range::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: var(--border); }
.rpe-slider:not(.is-set) .rpe-range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 28px; height: 28px; margin-top: -11px; opacity: 0;
}
.rpe-slider:not(.is-set) .rpe-range::-moz-range-track { height: 6px; border-radius: 3px; background: var(--border); }
.rpe-slider:not(.is-set) .rpe-range::-moz-range-progress { background: transparent; }
.rpe-slider:not(.is-set) .rpe-range::-moz-range-thumb { width: 28px; height: 28px; border: 0; opacity: 0; }
.rpe-range:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.rpe-ticks { display: flex; justify-content: space-between; padding: 0 4px; color: var(--muted); font-variant-numeric: tabular-nums; }
.debrief-summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.35rem 0.5rem; margin: 0 0 0.3rem; }
.debrief-form { display: flex; flex-direction: column; gap: 0.8rem; margin-top: 0.6rem; }
.debrief-form > button { align-self: flex-start; }
.debrief-form fieldset { border: none; margin: 0; padding: 0; min-width: 0; }
.debrief-form legend { font-weight: 600; font-size: 0.9rem; padding: 0; margin-bottom: 0.35rem; }
.rpe-scale { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 4px; max-width: 26rem; }
.rpe-scale label { position: relative; }
.rpe-scale input, .feelings input { position: absolute; opacity: 0; width: 1px; height: 1px; }
/* Une case par niveau d'effort, 44 px de haut : une cible au pouce, même au retour d'une séance. */
.rpe-scale span {
  display: grid; place-items: center; min-height: 2.75rem; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--border); background: var(--bg); font-variant-numeric: tabular-nums; font-weight: 600;
}
.rpe-scale input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.rpe-scale input:focus-visible + span, .feelings input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }
.rpe-ends { display: flex; justify-content: space-between; max-width: 26rem; margin-top: 0.2rem; }
.feelings { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.feelings legend { width: 100%; }
.chip > span, .chip-static {
  display: inline-block; padding: 0.25rem 0.65rem; border-radius: 999px; font-size: 0.85rem;
  border: 1px solid var(--border); background: var(--bg);
}
/* Sensations du débrief : des puces de 44 px de haut, plusieurs possibles ; cochée, un ✓ et le voile corail. */
.feelings .chip > span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 0.95rem; border-radius: 22px; font-size: 0.9rem; }
/* Hauteur fixée (Safari iOS ajoute sa propre hauteur aux champs) ; 16 px : en dessous, iOS zoome la page au
   toucher et elle déborde. */
.feelings .chip-other input { height: 44px; min-height: 0; padding: 0 0.95rem; border-radius: 22px; font-size: 16px; line-height: normal; }
.feelings input:checked + span::before { content: "✓"; margin-right: 0.35rem; color: var(--accent); font-weight: 700; }
.feelings .chip { position: relative; cursor: pointer; }
.feelings input:checked + span { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--band); }
/* « Autre » : une puce en pointillés qu'on remplit ; elle prend toute la ligne dès qu'on y écrit. */
.chip-other { display: inline-flex; min-width: 0; }
.chip-other input {
  position: static; opacity: 1; height: auto; width: 6.5rem; max-width: 100%; -webkit-appearance: none; appearance: none;
  font: inherit; font-size: 0.85rem; padding: 0.25rem 0.65rem; border-radius: 999px;
  border: 1px dashed var(--muted); background: transparent; color: var(--text);
}
.chip-other input::placeholder { color: var(--text-2); opacity: 1; }
.chip-other:focus-within, .chip-other:has(input:not(:placeholder-shown)) { flex-basis: 100%; }
.chip-other input:focus, .chip-other input:not(:placeholder-shown) { width: 100%; border-style: solid; }
.chip-other input:focus { outline: none; border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.chip-other input:not(:placeholder-shown) { border-color: var(--accent); background: var(--band); }
.debrief-edit { margin-top: 0.2rem; }
/* Portrait et résumés (page Coach) */
.portrait { margin-bottom: 0.4rem; }
.portrait-edit textarea { max-width: 100%; }
.style-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; }
.summaries { list-style: none; padding: 0; margin: 0.6rem 0 0; display: flex; flex-direction: column; gap: 0.7rem; }
.summaries .who { font-weight: 650; color: var(--text-2); }
/* Vos échanges (page Coach), sur les lignes du carnet : la date, les deux premières lignes, « Lire » pour la suite
   (ce qui a été décidé, ce qui reste à suivre, la suppression). */
.journal.ruled { margin: 0.4rem 0 0; }
.journal.ruled li { padding: 0; border-bottom: 0; }
.j-entry > summary { list-style: none; cursor: pointer; display: block; margin: 0; color: var(--text); }
.j-entry > summary::-webkit-details-marker { display: none; }
.j-head { display: flex; justify-content: space-between; align-items: center; height: 28px; }
.j-head .who { font-size: 0.72rem; font-weight: 650; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-2); }
.j-toggle::after { content: "Lire"; font-size: 0.85rem; font-weight: 600; color: var(--accent); }
.j-entry[open] .j-toggle::after { content: "Replier"; }
.j-preview { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-height: 56px;
  font-family: var(--font-serif); font-size: 1.1rem; line-height: 28px; }
.j-entry[open] .j-preview { display: none; }
.j-full .journal-part { margin: 0; }
.j-full .journal-part .strong { display: block; }
.j-full form { margin: 0; }
/* Journal du coach (page Coach) : un échange, ce qui a été décidé, ce qui reste à suivre */
.journal { list-style: none; padding: 0; margin: 0.6rem 0 0; }
.journal li { padding: 0.6rem 0; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; }
.journal li:last-child { border-bottom: none; }
.journal-head { display: flex; justify-content: space-between; align-items: baseline; gap: 0.6rem; }
.journal-head .who { font-size: 0.72rem; font-weight: 650; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-2); }
.journal-head form { margin: 0; }
.journal-part { margin-top: 0.4rem; }
.journal-part .strong { font-weight: 650; color: var(--text-2); }
/* Premier débrief : « Débriefer avec mon coach » (ouvre son assistant) et « Tout s'est bien passé » (ou
   « Enregistrer » dès que quelque chose est noté), deux vrais boutons de 48 px : l'un sous l'autre sur téléphone (leurs
   libellés ne tiennent pas côte à côte), côte à côte au-delà. Modifier un débrief : « Enregistrer » seul. */
.debrief-send { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; }
.debrief-choice { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.5rem; }
.debrief-choice .btn { width: 100%; min-height: 48px; }
@media (min-width: 600px) { .debrief-choice.is-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.debrief-next { margin: 0; }
/* « Tout s'est bien passé » sans effort noté : le curseur se signale (piste et invite au corail : l'action attendue). */
.rpe-slider.needs-effort .rpe-label { color: var(--accent); font-style: normal; font-weight: 600; }
.rpe-slider.needs-effort .rpe-range::-webkit-slider-runnable-track { background: var(--accent); opacity: 0.45; }
.rpe-slider.needs-effort .rpe-range::-moz-range-track { background: var(--accent); opacity: 0.45; }
.debrief-form .debrief-send + .hint { margin-top: -0.2rem; }

/* Page d'une séance du plan */
/* Sous le titre : la météo à l'heure de la séance (ou de la journée) et la montre. */
.hero-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.5rem 1rem; margin: 0.7rem 0 0; }
.hero-bar form { margin: 0; }
.wx-offer { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 0.4rem; }
.hero-bar .link { font-size: inherit; }
.wx-now { display: inline-flex; align-items: baseline; gap: 0.4rem; }
.wx-rain { color: var(--rain); font-weight: 600; }
/* Frise du déroulé : largeur = durée de l'étape, hauteur et couleur = zone (rampe bleue de .zone-N). */
.strip { display: flex; align-items: flex-end; gap: 2px; height: 64px; margin: 0.4rem 0 0.2rem; }
.strip-block { flex-basis: 0; min-width: 2px; border-radius: 3px 3px 0 0; }
.strip-block.zone-1, .step-swatch.zone-1 { box-shadow: inset 0 0 0 1px var(--zone-2); }
.steps-list { margin: 0.3rem 0 0.6rem; padding-left: 1.3rem; }
.steps-list li + li { margin-top: 0.15rem; }
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.5rem; margin: 0.2rem 0 0; }
/* Puces de même hauteur (type, clé, phase) sous le titre. */
.chips > .kind-chip, .chips > .key-chip, .chips > .phase-chip { line-height: 1.6; padding-block: 0; margin: 0; vertical-align: middle; }
.crumbs { margin: 0 0 0.6rem; }
/* Page d'une séance : le retour au plan et la météo sur une ligne, l'en-tête sur le papier (jour, titre, chiffres),
   puis la voix du coach (le but, son conseil) en serif, sans carte. */
.crumbs-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0.3rem 1rem; margin: 0 0 0.6rem; }
.crumbs-row .crumbs, .crumbs-row .wx-now { margin: 0; }
.session-head { margin: 0 0 1.3rem; }
.session-eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.6rem; }
.session-eyebrow .eyebrow { margin: 0; }
.session-head .hero-title { font-size: 2.2rem; margin: 0.1rem 0 0.45rem; }
.session-head .targets-line { margin-top: 0.9rem; }
.coach-voice { display: grid; gap: 1rem; max-width: 42rem; margin: 0 0 1.5rem; }
.coach-voice .coach-label { margin: 0 0 0.1rem; font-size: 0.95rem; }
.coach-voice .rich { margin: 0; font-size: 1.2rem; line-height: 1.45; }
.coach-voice.ruled { gap: 0; }
.coach-voice.ruled .coach-label, .coach-voice.ruled .rich { margin: 0; line-height: 28px; }
/* Sous le titre d'une séance : son type, sa phase et ses chiffres en une ligne. */
.session-meta { margin: 0.25rem 0 0; color: var(--text-2); line-height: 1.7; }
.session-meta .kind-chip { margin-right: 0.3rem; }
.session-meta .num { color: var(--text); font-weight: 600; }
.back-link { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; font-size: 0.95rem; }
.crumbs-row { align-items: center; }
/* Déroulé en tableau : une étape par ligne. */
.steps-list.steps-table { list-style: none; padding: 0; margin: 0.5rem 0 0.7rem; }
.steps-table li { padding: 0.45rem 0; border-bottom: 1px solid var(--grid); }
.steps-table li:last-child { border-bottom: none; }
.steps-list.steps-table li + li { margin-top: 0; }
/* Une étape par ligne : la pastille de son bloc dans la frise, ce qu'on fait, combien et la cible ; dessous, la
   consigne du coach pour cette étape. */
.step-rows li { display: grid; grid-template-columns: 0.7rem minmax(0, 1fr) auto; gap: 0.1rem 0.6rem; align-items: center; }
.step-swatch { width: 0.7rem; height: 0.7rem; border-radius: 2px; }
.step-work .step-label { font-weight: 700; }
.step-value { color: var(--text-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.step-work .step-value { color: var(--text); font-weight: 600; }
.step-note { grid-column: 2 / -1; margin: 0; font-family: var(--font-serif); font-size: 0.98rem; }
/* Barre d'actions d'une séance à venir : collée au bas de l'écran (au-dessus des onglets sur téléphone) tant qu'il
   y a quelque chose à envoyer sur la montre ; une couche qui flotte, donc une ombre. */
.action-bar { display: grid; gap: 0.5rem; margin: 1.25rem 0; padding: 0.9rem 1.1rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: 18px; }
.action-bar.is-sticky { position: sticky; z-index: 900; bottom: calc(0.75rem + env(safe-area-inset-bottom));
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.08); }
.action-bar form, .action-bar .watch-state { margin: 0; }
.action-bar .sub { margin: 0; }
.action-links { display: flex; flex-wrap: wrap; gap: 0 1.2rem; margin: 0; }
.action-links a { display: inline-flex; align-items: center; min-height: 44px; }
.inline-form { display: inline; margin: 0; }
@media (max-width: 600px) {
  /* Bandeau plein écran posé sur les onglets ; l'ombre pleine (couleur de la barre) bouche l'écart que laisse la
     zone de sécurité du bas d'écran. */
  .action-bar.is-sticky { bottom: calc(var(--tabs-h) + max(6px, env(safe-area-inset-bottom))); margin-inline: -1rem; border-radius: 0;
    border-width: 1px 0 0; box-shadow: 0 16px 0 var(--surface); padding: 0.75rem 1rem 0.35rem; gap: 0.2rem; }
  .action-bar .action-links { justify-content: center; }
  .action-main .btn { width: 100%; }
  .session-head .hero-title { font-size: 2rem; }
}
/* Repères mesurés, au pied de la carte du déroulé : des phrases, pas un tableau. */
.session-refs { color: var(--text-2); margin-top: 0.4rem; }
.session-refs .ref-line { margin: 0 0 0.2rem; }
.session-refs strong { color: var(--text); }
.ref-list { margin: 0 0 0.3rem; padding-left: 1.1rem; }
.ref-list li + li { margin-top: 0.15rem; }
.session-refs .fold { margin-top: 0.3rem; }
.change-link { margin: 0.3rem 0 0; }
.change-link a { display: inline-flex; align-items: center; min-height: 44px; }
.seq-nav { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0.8rem; margin: 0.4rem 0 1rem; }
.seq-nav a { display: grid; gap: 0.1rem; min-width: 0; }
.seq-nav a span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seq-next { text-align: right; }

/* Activités hors course (renforcement, autres sports) */
.cross-summary { display: grid; gap: 0.15rem; margin: 0.4rem 0 0.6rem; }
.cross-summary p { margin: 0.2rem 0 0; }
.cross-exercises { margin: 0.2rem 0 0; padding-left: 1.1rem; color: var(--text-2); }
.cross-ex { display: block; }
.cross-form { margin-top: 0.6rem; }
.cross-duration input { width: 4.5rem; margin: 0 0.3rem; font: inherit; padding: 0.3rem 0.5rem; border-radius: 8px;
  border: 1px solid var(--border); background: var(--bg); color: var(--text); }
.cross-duration input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
/* Retours des coureurs (admins) : réponse et fermeture sous chaque retour. */
.feedback-close { margin: 0.6rem 0 0.2rem; }
.feedback-close .field { display: grid; gap: 0.2rem; margin-bottom: 0.5rem; }
#retours form { margin: 0.2rem 0 0; }

/* Fiche illustrée d'une séance de renfo (_routine.html, coach.web.figures) */
.routine-flow { margin: 0.6rem 0; padding-left: 1.3rem; display: grid; gap: 0.35rem; }
.routine-part { margin: 1.4rem 0 0.6rem; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-2); }
.ex-card { display: flex; flex-direction: column; gap: 0.75rem; }
.ex-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0.2rem 0.8rem; }
.ex-head h3 { margin: 0; font-size: 1.15rem; font-weight: 700; color: var(--text); }
.ex-dose { font-weight: 700; color: var(--accent); white-space: nowrap; }
.ex-target { margin: -0.4rem 0 0; color: var(--text-2); }
.ex-dot { display: inline-block; width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--fig-hot); margin-right: 0.4rem; }
.ex-figs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; }
.ex-fig { margin: 0; background: var(--fig-bg); border-radius: 10px; padding: 0.4rem 0.3rem 0.5rem; min-width: 0;
  display: flex; flex-direction: column; gap: 0.3rem; }
.ex-fig.wide { grid-column: 1 / -1; }
.ex-fig svg { width: 100%; height: auto; display: block; }
.ex-fig figcaption { font-size: 0.8rem; line-height: 1.3; color: var(--text-2); text-align: center; }
.ex-fig figcaption b { display: block; color: var(--text); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; }
.ex-steps { display: grid; gap: 0.45rem; }
.ex-steps p { margin: 0; }
.ex-label { font-weight: 700; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; margin-right: 0.3rem; }
.ex-lists { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.5rem; }
@media (min-width: 560px) { .ex-lists { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ex-lists h4 { margin: 0 0 0.2rem; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; }
.ex-lists ul { margin: 0; padding-left: 1.1rem; }
.ex-good { color: var(--ok-ink); }
.ex-bad { color: var(--err-ink); }
.ex-note { margin: 0; padding-top: 0.5rem; border-top: 1px dashed var(--border); }
.ex-sets { display: flex; flex-wrap: wrap; gap: 0.5rem; padding-top: 0.6rem; border-top: 1px solid var(--border); }
.ex-sets label { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.35rem 0.75rem; border: 1px solid var(--border);
  border-radius: 8px; font-weight: 600; cursor: pointer; user-select: none; }
.ex-sets input { width: 1.1rem; height: 1.1rem; accent-color: var(--accent); }
.ex-sets label:has(input:checked) { border-color: var(--accent); background: var(--band); color: var(--accent); }
.ex-sets label:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }
.ex-test { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; padding-top: 0.6rem; border-top: 1px solid var(--border); }
.ex-test label, .routine-felt { display: flex; flex-direction: column; gap: 0.25rem; color: var(--text-2); }
.ex-test label .muted { font-size: 0.75rem; }
.ex-test label.wide { grid-column: 1 / -1; }
.ex-test input, .routine-felt input { font: inherit; padding: 0.4rem 0.55rem; border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface); color: var(--text); min-width: 0; }
.routine-end { display: flex; flex-direction: column; gap: 0.4rem; }
.routine-end h2 { margin: 0; }
.s-ink { stroke: var(--fig-ink); } .s-far { stroke: var(--fig-far); } .s-hot { stroke: var(--fig-hot); }
.s-acc { stroke: var(--fig-acc); } .s-ok { stroke: var(--fig-ok); } .s-bad { stroke: var(--fig-bad); }
.s-prop { stroke: var(--fig-prop); } .s-line { stroke: var(--fig-line); }
.f-ink { fill: var(--fig-ink); } .f-far { fill: var(--fig-far); } .f-hot { fill: var(--fig-hot); }
.f-acc { fill: var(--fig-acc); } .f-ok { fill: var(--fig-ok); } .f-bad { fill: var(--fig-bad); }
.f-prop { fill: var(--fig-prop); } .f-line { fill: var(--fig-line); }
/* Minuteur de pause : au-dessus de la barre d'onglets sur téléphone. */
.rest-timer { position: fixed; z-index: 1001; right: max(1rem, env(safe-area-inset-right));
  bottom: calc(1rem + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 0.6rem;
  background: var(--text); color: var(--bg); border-radius: 999px; padding: 0.4rem 0.45rem 0.4rem 1rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25); }
.rest-timer .rest-time { font-size: 1.5rem; font-weight: 700; min-width: 2.4ch; text-align: right; }
.rest-timer .rest-label { opacity: 0.8; }
@media (max-width: 600px) { .rest-timer { bottom: calc(4.6rem + env(safe-area-inset-bottom)); } }

/* Mon matériel (gear.html) : une ligne par paire (ses km calés à droite), dépliée sur ses chiffres, ses km par mois en
   barres bleu encre (mois en cours plus pâle, comme l'index de l'Historique), l'avis du coach en serif (dans une carte : sans réglure). */
.shoe-row .shoe-km { font-variant-numeric: tabular-nums; font-size: 1rem; color: var(--text); }
.shoe-default { font-weight: 600; color: var(--text-2); margin-left: 0.3rem; }
.shoe-facts { color: var(--text-2); }
.shoe-months { list-style: none; margin: 0.6rem 0 0.2rem; padding: 0; display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 3px; }
.shoe-months li { display: flex; flex-direction: column; gap: 3px; color: var(--muted); }
.shoe-months .mi-bar { height: 32px; }
.shoe-months .mi-bar > span { opacity: 1; }
.shoe-months li.is-current .mi-bar > span { opacity: 0.55; }
.shoe-note { margin: 0.6rem 0 0.3rem; font-family: var(--font-serif); font-size: 1.05rem; line-height: 1.45; }
.shoe-actions { margin-top: 0.4rem; align-items: center; gap: 0 1.2rem; }
.shoe-actions .link { min-height: 44px; }
.shoe-edit, .shoe-add { margin-top: 0.6rem; }
.fold-row-static { display: flex; flex-wrap: wrap; gap: 0.2rem 0.8rem; align-items: center; min-height: 44px;
  padding: 0.3rem 0; border-bottom: 1px solid var(--border); }
.fold-row-static:last-child { border-bottom: none; }
.fold-row-static .fr-title { font-weight: 600; }
.fold-row-static .fr-meta { color: var(--text-2); }
.fold-row-static form { margin: 0; }
.gear-pick { margin-top: 0.6rem; }
.inline-form { display: inline; margin: 0; }
.shoe-form { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin: 0.4rem 0 0.6rem; }
.shoe-form select { flex: 1 1 12rem; min-width: 0; min-height: 40px; padding: 0.45rem 0.6rem; border: 1px solid var(--border);
  border-radius: 8px; background: var(--bg); color: var(--text); font: inherit; }
.shoe-form select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.session-shoe { margin: 0.2rem 0 0; }
/* Choix de l'assistant du coach (bienvenue, page Coach) : une ligne par assistant, cochée sous le voile corail. */
.assistant-pick { border: none; padding: 0; margin: 0.9rem 0 1rem; display: grid; gap: 0.5rem; min-width: 0; }
.assistant-pick legend { padding: 0; margin-bottom: 0.5rem; font-weight: 600; }
.assistant-pick label {
  display: flex; align-items: flex-start; gap: 0.65rem; min-height: 44px; padding: 0.6rem 0.8rem;
  border: 1px solid var(--border); border-radius: 10px; background: var(--bg); cursor: pointer;
}
.assistant-pick label > span { display: grid; gap: 0.1rem; min-width: 0; }
.assistant-pick input { margin: 0.2rem 0 0; accent-color: var(--accent); flex: none; }
.assistant-pick label:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--band); }
.assistant-pick label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 1px; }
.coach-message { margin: 0.8rem 0 0; padding: 0.7rem 0.9rem; border-left: 3px solid var(--accent); background: var(--band); overflow-wrap: anywhere; }
