/* Polices auto-hebergees (app/fonts) : aucune dependance a un CDN externe, fiable quel que
   soit le reseau de l'utilisateur (VPN, DNS prive, proxy d'entreprise...). */
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/app/fonts/IBMPlexSans-Variable.woff2") format("woff2-variations"), url("/app/fonts/IBMPlexSans-Variable.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/app/fonts/IBMPlexMono-400.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/app/fonts/IBMPlexMono-500.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/app/fonts/IBMPlexMono-600.woff2") format("woff2");
}

@font-face {
  font-family: "Big Shoulders Display";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/app/fonts/BigShouldersDisplay-700.woff2") format("woff2");
}

@font-face {
  font-family: "Big Shoulders Display";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("/app/fonts/BigShouldersDisplay-800.woff2") format("woff2");
}

:root {
  color-scheme: dark;
  /* HUD capteur de puissance : carbone integral plutot que le noir a dominante teal precedent
     (direction "Option C" validee, cf. artifact "Ascent UI Directions"). Neutre, pas de teinte
     verte/bleue residuelle dans le fond - seul l'accent (--navy, orange malgre son nom) porte
     de la couleur. */
  --page: #08090a;
  --shell: #0e0f10;
  --surface: #17181a;
  --surface-soft: #131415;
  --surface-tint: #1c1d1f;
  --ink: #eceae4;
  --muted: #8a8983;
  --faint: #5f5e59;
  --line: #26282a;
  /* Hairline autrefois code en dur (rgba(255, 90, 54, ...), teal) a 83 endroits dans ce
     fichier, decouple de --navy : change de couleur ici, mais reste au moins une seule source
     desormais - cf. nettoyage plus bas. */
  --hairline: rgba(255, 90, 54, 0.14);
  --hairline-soft: rgba(255, 90, 54, 0.08);
  /* Accent orange vif ("Option C") a la place du teal precedent - le nom --navy reste (legacy,
     deja le cas avant : la valeur n'a jamais ete bleu marine). Texte quasi-noir dessus
     (--navy-ink), pas blanc, pour le contraste sur une teinte claire et saturee. */
  --navy: #ff5a36;
  --navy-strong: #ff8a6a;
  --navy-ink: #1a0e08;
  --green: #4ecb9a;
  --yellow: #e8b84b;
  --red: #ff6a4a;
  --blue: #5fa8d6;
  --shadow: 0 24px 70px -46px rgba(0, 0, 0, 0.8);
  --soft-shadow: 0 18px 42px -34px rgba(0, 0, 0, 0.65);
  --font-sans: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --font-display: "Big Shoulders Display", "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 25% 8%, rgba(23, 24, 26, 0.18), transparent 32%),
    var(--page);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

button,
.file-button {
  border: 1px solid rgba(255, 90, 54, 0.1);
  border-radius: 7px;
  background: var(--navy);
  color: var(--navy-ink);
  padding: 10px 16px;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

button:hover,
.file-button:hover {
  background: var(--navy-strong);
}

.app-shell {
  width: min(1440px, calc(100% - 96px));
  min-height: calc(100vh - 120px);
  margin: 60px auto;
  border: 1px solid rgba(255, 90, 54, 0.16);
  border-radius: 28px;
  /* Accent diagonal ("Option C", HUD capteur de puissance) : deux panneaux angulaires tres
     discrets en haut a droite, purement decoratifs (pas de contenu dessus). SVG en donnee-URI
     plutot qu'un fichier a part - deux formes fixes, pas besoin d'etre editables separement. */
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 640 720'%3E%3Cpolygon points='640,0 640,720 380,720' fill='%2317181a'/%3E%3Cpolygon points='640,0 640,720 470,720' fill='%2313141a'/%3E%3C/svg%3E") top right / 640px 720px no-repeat,
    var(--shell);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
}

.sidebar {
  display: grid;
  grid-template-columns: auto minmax(650px, 1fr) auto;
  gap: 20px;
  align-items: center;
  min-height: 94px;
  padding: 24px 40px 18px;
  background: transparent;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 160px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 13px;
  background: var(--navy);
  color: var(--navy-ink);
}

.brand-mark svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.35;
}

.brand strong,
.brand span {
  display: block;
}

.brand strong {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.brand span {
  margin-top: 1px;
  color: var(--muted);
  font-size: 12px;
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 13px;
  align-items: center;
}

.nav-list a {
  position: relative;
  color: var(--muted);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 450;
  padding: 8px 0;
}

.nav-list a:hover,
.nav-list a.is-active {
  color: var(--ink);
}

.nav-list a.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 3px;
  height: 1px;
  background: var(--ink);
}

.top-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
  min-width: 268px;
}

.search-chip,
.status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  border-radius: 999px;
  font-size: 13px;
}

.search-chip {
  width: 216px;
  background: rgba(23, 24, 26, 0.54);
  color: var(--faint);
  padding: 0 18px;
}

.status-chip {
  background: rgba(23, 24, 26, 0.5);
  color: var(--ink);
  padding: 0 14px;
}

.workspace {
  display: grid;
  gap: 22px;
  align-content: start;
  padding: 20px 40px 40px;
}

.page-head {
  max-width: 780px;
  padding: 4px 0 2px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(31px, 4vw, 46px);
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h2 {
  font-size: 22px;
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.005em;
}

.page-head > p:not(.eyebrow) {
  max-width: 640px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
}

.update-strip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  min-height: 30px;
  margin-top: 14px;
  border: 1px solid rgba(255, 90, 54, 0.06);
  border-radius: 999px;
  background: rgba(23, 24, 26, 0.56);
  color: var(--muted);
  padding: 0 12px;
  font-size: 12px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.update-strip[data-persistence-label]::after {
  content: attr(data-persistence-label);
  flex: 0 0 auto;
  border-left: 1px solid rgba(255, 90, 54, 0.08);
  color: var(--ink);
  padding-left: 8px;
  font-weight: 560;
}

.update-strip[data-persistence="offline"]::after {
  color: var(--red);
}

.eyebrow {
  margin-bottom: 8px;
  color: var(--green);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.panel,
.metric-card {
  border: 1px solid rgba(255, 90, 54, 0.06);
  border-radius: 8px;
  background: rgba(23, 24, 26, 0.86);
  box-shadow: var(--soft-shadow);
}

.panel {
  padding: 24px;
}

.section-head {
  margin-bottom: 20px;
}

.section-head.compact {
  margin-bottom: 14px;
}

.section-head.split {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.metric-card {
  min-height: 108px;
  padding: 17px 18px;
}

.metric-card span,
.metric-card small {
  display: block;
  color: var(--muted);
}

.metric-card span {
  font-size: 12px;
  font-weight: 600;
}

.metric-card strong {
  display: block;
  margin: 11px 0 6px;
  font-family: var(--font-display);
  font-size: 29px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.metric-card small {
  font-size: 12px;
  line-height: 1.35;
}

/* Carte a jauge radiale (readiness/fatigue/tsb/objectif-style, cf. buildRadialGauge dans
   charts.js) : uniquement les metriques reellement bornees/pourcentage - jamais un total TSS,
   une duree ou un compte, qui feraient une jauge sans signification (0% et 100% de quoi ?). Le
   <strong id="X-value"> habituel de .metric-card est remplace par ce conteneur pour ces cartes
   precises ; les autres cartes gardent le span/strong/small d'origine, inchange. */
.metric-card--gauge {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: 12px;
}

.metric-card--gauge span {
  align-self: flex-start;
}

.metric-card--gauge small {
  margin-top: 2px;
}

.radial-gauge {
  position: relative;
  display: flex;
  justify-content: center;
  width: 100%;
  max-width: 132px;
  margin: 2px auto 0;
}

.radial-gauge-svg {
  width: 100%;
  height: auto;
  display: block;
}

.radial-gauge-track {
  stroke: var(--line);
}

.radial-gauge-value {
  transition: stroke-dashoffset 0.4s ease;
}

.radial-gauge-number {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  text-align: center;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.twin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.twin-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 14px;
}

.ml-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.ml-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 14px;
}

.ml-flow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 10px;
}

.ml-flow-step {
  min-width: 0;
  border: 1px solid rgba(255, 90, 54, 0.06);
  border-radius: 8px;
  background: rgba(23, 24, 26, 0.74);
  padding: 14px;
}

.ml-flow-step span,
.ml-flow-step strong,
.ml-flow-step small {
  display: block;
}

.ml-flow-step span {
  color: var(--green);
  font-size: 11px;
  font-weight: 700;
}

.ml-flow-step strong {
  margin-top: 13px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 590;
}

.ml-flow-step small {
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.ml-card {
  min-width: 0;
  border: 1px solid rgba(255, 90, 54, 0.06);
  border-radius: 8px;
  background: rgba(23, 24, 26, 0.82);
  padding: 15px 16px;
}

.ml-card span,
.ml-card small {
  display: block;
  color: var(--muted);
}

.ml-card span {
  font-size: 12px;
  font-weight: 600;
}

.ml-card strong {
  display: block;
  margin: 9px 0 6px;
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.ml-card small {
  font-size: 12px;
  line-height: 1.35;
}

.ml-explanation {
  max-width: 860px;
  margin-top: 17px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.decision-signal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.decision-signal-card {
  min-width: 0;
  border: 1px solid rgba(255, 90, 54, 0.06);
  border-radius: 8px;
  background: rgba(23, 24, 26, 0.82);
  padding: 14px 15px;
}

.decision-signal-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.decision-signal-card-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.decision-signal-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
}

.decision-signal-badge[data-source="ml"] {
  background: rgba(78, 203, 154, 0.16);
  color: var(--green);
}

.decision-signal-badge[data-source="heuristic"] {
  background: rgba(232, 184, 75, 0.16);
  color: var(--yellow);
}

.decision-signal-badge[data-source="data"] {
  background: rgba(95, 168, 214, 0.16);
  color: var(--blue);
}

.decision-signal-card strong {
  display: block;
  margin: 9px 0 5px;
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.decision-signal-card small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.danger-zone {
  border-color: rgba(255, 106, 74, 0.22);
}

.danger-button {
  background: transparent;
  border-color: rgba(255, 106, 74, 0.4);
  color: var(--red);
}

.danger-button:hover {
  background: rgba(255, 106, 74, 0.1);
}

#reset-local-data-status {
  color: var(--muted);
  font-size: 12.5px;
}

.demo-mode-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  border: 1px solid rgba(232, 184, 75, 0.35);
  border-radius: 8px;
  background: rgba(232, 184, 75, 0.1);
  color: var(--ink);
  padding: 12px 16px;
  font-size: 13.5px;
  line-height: 1.4;
}

.demo-mode-banner strong {
  color: var(--yellow);
}

.demo-mode-banner a {
  color: var(--yellow);
  text-decoration: underline;
}

.program-context-facts {
  margin-top: 18px;
}

.model-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  border: 1px solid rgba(255, 90, 54, 0.07);
  border-radius: 999px;
  background: rgba(23, 24, 26, 0.72);
  color: var(--ink);
  padding: 0 12px;
  font-size: 12px;
  font-weight: 560;
  white-space: nowrap;
}

.model-stack {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.model-stack-item {
  min-width: 0;
  border-top: 1px solid rgba(255, 90, 54, 0.07);
  padding-top: 12px;
}

.model-stack-item strong,
.model-stack-item span {
  display: block;
}

.model-stack-item strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 620;
}

.model-stack-item span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.42;
}

.dashboard-note {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.morning-brief-status {
  flex-shrink: 0;
  height: fit-content;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 90, 54, 0.08);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.morning-brief-status[data-tone="good"] {
  background: rgba(78, 203, 154, 0.14);
  color: var(--green);
}

.morning-brief-status[data-tone="watch"] {
  background: rgba(232, 184, 75, 0.14);
  color: var(--yellow);
}

.morning-brief-status[data-tone="alert"] {
  background: rgba(255, 106, 74, 0.14);
  color: var(--red);
}

.morning-brief-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.morning-brief-metric {
  padding: 12px 14px;
  border: 1px solid rgba(255, 90, 54, 0.06);
  border-radius: 8px;
  background: rgba(255, 90, 54, 0.03);
}

.morning-brief-metric span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 620;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.morning-brief-metric strong {
  display: block;
  margin: 6px 0 4px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.morning-brief-metric small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.morning-brief-text {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.morning-brief-today {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.morning-brief-session {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 90, 54, 0.08);
  border-radius: 8px;
  background: rgba(23, 24, 26, 0.6);
}

.morning-brief-session strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 620;
}

.morning-brief-session small {
  color: var(--muted);
  font-size: 12px;
}

.athlete-status-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.athlete-status-actions button[data-athlete-status="sick"],
.athlete-status-actions button[data-athlete-status="injured"] {
  background: var(--red);
}

.athlete-status-actions button.is-muted {
  background: transparent;
  color: var(--muted);
  border-color: var(--line);
}

.program-list {
  display: grid;
  gap: 12px;
}

.program-planner-panel {
  overflow: hidden;
}

.program-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.program-actions button {
  min-height: 36px;
  border: 1px solid rgba(255, 90, 54, 0.1);
  border-radius: 8px;
  background: rgba(23, 24, 26, 0.84);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  padding: 0 12px;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

.program-actions button:hover:not(:disabled) {
  background: var(--surface-tint);
  border-color: rgba(217, 67, 33, 0.32);
  transform: translateY(-1px);
}

.program-actions button:disabled {
  cursor: not-allowed;
  opacity: .45;
}

.program-recalc-alert {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(226, 169, 65, 0.28);
  border-radius: 10px;
  background: rgba(226, 169, 65, 0.075);
  color: var(--ink);
  padding: 12px;
}

.program-recalc-alert strong,
.program-recalc-alert span {
  display: block;
}

.program-recalc-alert strong {
  font-size: 13px;
  font-weight: 760;
}

.program-recalc-alert span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.program-recalc-alert ul {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 18px;
}

.program-recalc-alert li {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.42;
}

.program-impact-panel {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  border: 1px solid rgba(255, 90, 54, 0.08);
  border-radius: 12px;
  background: rgba(23, 24, 26, 0.78);
  box-shadow: 0 12px 28px -24px rgba(18, 24, 42, 0.45);
  padding: 14px;
}

.program-impact-panel[data-state="pending"] {
  border-color: rgba(226, 169, 65, 0.32);
  background: rgba(226, 169, 65, 0.055);
}

.program-impact-head {
  display: flex;
  gap: 12px;
  align-items: start;
  justify-content: space-between;
}

.program-impact-head span,
.program-impact-head small,
.program-impact-metric span,
.program-impact-metric small,
.program-impact-days p,
.program-impact-days small {
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.4;
}

.program-impact-head strong {
  display: block;
  margin-top: 2px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 760;
}

.program-impact-head small {
  max-width: 420px;
  text-align: right;
}

.program-impact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.program-impact-metric {
  display: grid;
  gap: 3px;
  min-width: 0;
  border: 1px solid rgba(255, 90, 54, 0.06);
  border-radius: 10px;
  background: rgba(23, 24, 26, 0.62);
  padding: 10px;
}

.program-impact-metric strong {
  color: var(--ink);
  font-size: 20px;
  font-weight: 760;
  line-height: 1.05;
}

.program-impact-days {
  display: grid;
  gap: 8px;
}

.program-impact-days > strong {
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 760;
}

.program-impact-days ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 0;
  padding: 0;
}

.program-impact-days li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 8px;
  align-items: baseline;
  border: 1px solid rgba(255, 90, 54, 0.06);
  border-radius: 8px;
  background: rgba(23, 24, 26, 0.58);
  list-style: none;
  padding: 8px;
}

.program-impact-days li span {
  min-width: 0;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.program-impact-days li strong {
  color: var(--green);
  font-size: 12px;
  font-weight: 760;
}

.program-impact-days li small {
  grid-column: 1 / -1;
}

.program-impact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.program-impact-actions button {
  min-height: 34px;
  border: 1px solid rgba(255, 90, 54, 0.1);
  border-radius: 8px;
  background: rgba(23, 24, 26, 0.82);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 680;
  padding: 0 11px;
}

.program-impact-actions button:first-child {
  border-color: rgba(217, 67, 33, 0.32);
  background: rgba(217, 67, 33, 0.1);
  color: var(--green);
}

.program-impact-actions button:disabled {
  cursor: not-allowed;
  opacity: .45;
}

.program-board {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.program-month-toolbar {
  display: flex;
  gap: 12px;
  align-items: end;
  justify-content: space-between;
  min-width: 1180px;
  color: var(--muted);
}

.program-month-toolbar span,
.program-month-toolbar small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 620;
}

.program-month-toolbar strong {
  display: block;
  margin-top: 2px;
  color: var(--ink);
  font-size: 20px;
  font-weight: 720;
  text-transform: capitalize;
}

.program-month-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.program-month-nav button {
  min-height: 32px;
  border: 1px solid rgba(255, 90, 54, 0.1);
  border-radius: 8px;
  background: rgba(23, 24, 26, 0.84);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  padding: 0 10px;
  transition: background .18s ease, border-color .18s ease;
}

.program-month-nav button:hover {
  background: var(--surface-tint);
  border-color: rgba(217, 67, 33, 0.32);
}

.program-month-nav button[data-program-month-nav="prev"],
.program-month-nav button[data-program-month-nav="next"] {
  min-width: 32px;
  padding: 0;
  font-size: 15px;
}

.program-month-nav button.program-month-today {
  color: var(--green);
  border-color: rgba(217, 67, 33, 0.28);
}

.program-phase-bar {
  display: flex;
  min-width: 1180px;
  height: 28px;
  margin-bottom: 10px;
  border: 1px solid rgba(255, 90, 54, 0.08);
  border-radius: 8px;
  overflow: hidden;
}

.program-phase-segment {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  border-right: 1px solid rgba(8, 14, 18, 0.35);
}

.program-phase-segment:last-child {
  border-right: none;
}

.program-phase-segment span {
  overflow: hidden;
  padding: 0 8px;
  color: rgba(9, 15, 17, 0.82);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.05em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.program-phase-segment[data-macrocycle="foncier"] {
  background: var(--green);
}

.program-phase-segment[data-macrocycle="développement"] {
  background: var(--yellow);
}

.program-phase-segment[data-macrocycle="affûtage"] {
  background: #a56ee8;
}

.season-timeline-track {
  display: flex;
  height: 56px;
  margin-bottom: 12px;
  border: 1px solid rgba(255, 90, 54, 0.1);
  border-radius: 10px;
  overflow: hidden;
}

.season-timeline-segment {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 34px;
  border-right: 1px solid rgba(8, 14, 18, 0.35);
}

.season-timeline-segment:last-child {
  border-right: none;
}

.season-timeline-segment span {
  overflow: hidden;
  max-width: 100%;
  padding: 0 6px;
  color: rgba(9, 15, 17, 0.85);
  font-size: 11px;
  font-weight: 760;
  letter-spacing: 0.03em;
  text-align: center;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.season-timeline-segment small {
  color: rgba(9, 15, 17, 0.65);
  font-size: 10px;
  font-weight: 620;
  white-space: nowrap;
}

.season-timeline-segment[data-macrocycle="foncier"] {
  background: var(--green);
}

.season-timeline-segment[data-macrocycle="développement"] {
  background: var(--yellow);
}

.season-timeline-segment[data-macrocycle="affûtage"] {
  background: #a56ee8;
}

/* Strip secondaire, visible uniquement quand une saison est declaree (profil) : distingue
   hiver/saison independamment des groupes Foncier/Developpement/Affutage ci-dessus, qui restent
   derives des courses. */
.season-timeline-track--phase {
  height: 22px;
  margin-top: -6px;
  margin-bottom: 12px;
}

.season-timeline-phase-segment span {
  font-size: 10px;
}

.season-timeline-phase-segment[data-season-phase="winter"] {
  background: var(--blue);
}

.season-timeline-phase-segment[data-season-phase="season"] {
  background: var(--navy-strong);
}

.season-timeline-races {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.season-timeline-races li {
  color: var(--muted);
  font-size: 12px;
}

.season-timeline-races strong {
  color: var(--ink);
  font-weight: 640;
}

.program-month-grid {
  display: grid;
  grid-template-columns: 152px repeat(7, minmax(148px, 1fr));
  min-width: 1180px;
  overflow: hidden;
  border: 1px solid rgba(255, 90, 54, 0.08);
  border-radius: 12px;
  background: rgba(23, 24, 26, 0.84);
  box-shadow: 0 16px 38px -32px rgba(18, 24, 42, 0.45);
}

.program-week-header,
.program-day-header {
  border-bottom: 1px solid rgba(255, 90, 54, 0.08);
  background: rgba(23, 24, 26, 0.78);
  color: var(--muted);
  font-size: 11px;
  font-weight: 720;
  letter-spacing: .02em;
  padding: 10px 12px;
  text-transform: uppercase;
}

.program-week-summary {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 178px;
  border-right: 1px solid rgba(255, 90, 54, 0.08);
  border-bottom: 1px solid rgba(255, 90, 54, 0.08);
  background: rgba(23, 24, 26, 0.58);
  padding: 12px;
}

.program-week-summary[data-load="medium"] {
  background: rgba(226, 169, 65, 0.055);
}

.program-week-summary[data-load="high"] {
  background: rgba(207, 86, 62, 0.055);
}

/* Foncier (base aerobie) / Développement (intensité croissante) / Affûtage (taper) - même
   convention couleur que le radar de puissance et le reste de l'app : vert = fondation, jaune =
   intensité, violet = spécifique/final plutôt qu'une palette arbitraire par semaine. */
.program-week-summary {
  border-left: 3px solid transparent;
}

.program-week-summary[data-macrocycle="foncier"] {
  border-left-color: var(--green);
}

.program-week-summary[data-macrocycle="développement"] {
  border-left-color: var(--yellow);
}

.program-week-summary[data-macrocycle="affûtage"] {
  border-left-color: #a56ee8;
}

.program-week-phase-tag {
  display: inline-block;
  width: fit-content;
  font-size: 10px;
  font-weight: 720;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.program-week-summary[data-macrocycle="foncier"] .program-week-phase-tag {
  color: var(--green);
}

.program-week-summary[data-macrocycle="développement"] .program-week-phase-tag {
  color: var(--yellow);
}

.program-week-summary[data-macrocycle="affûtage"] .program-week-phase-tag {
  color: #a56ee8;
}

.program-week-partial-note {
  color: var(--muted);
  font-size: 10px;
  font-style: italic;
  line-height: 1.35;
}

.program-week-deload-tag {
  display: inline-block;
  width: fit-content;
  padding: 2px 7px;
  border: 1px solid rgba(232, 184, 75, 0.35);
  border-radius: 999px;
  background: rgba(232, 184, 75, 0.1);
  color: var(--yellow);
  font-size: 9px;
  font-weight: 720;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.program-week-title span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 680;
}

.program-week-title strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 20px;
  font-weight: 740;
}

.program-week-summary dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.program-week-summary dl div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.program-week-summary dt,
.program-week-summary dd {
  margin: 0;
  font-size: 12px;
}

.program-week-summary dt {
  color: var(--muted);
}

.program-week-summary dd {
  color: var(--ink);
  font-weight: 720;
}

.program-day-column {
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0;
  min-height: 178px;
  border-right: 1px solid rgba(255, 90, 54, 0.06);
  border-bottom: 1px solid rgba(255, 90, 54, 0.08);
  background: rgba(23, 24, 26, 0.72);
}

.program-day-column[data-load="medium"] {
  background: rgba(226, 169, 65, 0.055);
}

.program-day-column[data-load="high"] {
  background: rgba(207, 86, 62, 0.055);
}

.program-day-column[data-month="out"] {
  background: rgba(23, 24, 26, 0.42);
  opacity: .66;
}

.program-day-column[data-today="true"] {
  box-shadow: inset 0 0 0 1px rgba(217, 67, 33, 0.36);
}

.program-day-head {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 90, 54, 0.07);
  min-height: 54px;
  padding: 9px 10px;
}

.program-day-head-actions {
  display: grid;
  justify-items: end;
  gap: 5px;
}

.program-day-head span,
.program-day-head small {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 620;
}

.program-day-head strong {
  display: block;
  margin-top: 2px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 680;
  text-transform: capitalize;
}

.program-day-head small {
  max-width: 74px;
  line-height: 1.35;
  text-align: right;
}

.program-day-head-actions button {
  display: grid;
  width: 24px;
  min-width: 24px;
  height: 24px;
  min-height: 24px;
  place-items: center;
  border: 1px solid rgba(217, 67, 33, 0.2);
  border-radius: 6px;
  background: rgba(217, 67, 33, 0.08);
  color: var(--green);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 760;
  line-height: 1;
  padding: 0;
}

.program-day-head-actions button:hover {
  border-color: rgba(217, 67, 33, 0.34);
  background: rgba(217, 67, 33, 0.14);
}

.program-dropzone {
  display: grid;
  align-content: start;
  gap: 7px;
  min-height: 124px;
  padding: 8px;
  transition: background .16s ease, box-shadow .16s ease;
}

.program-dropzone.is-over {
  background: rgba(217, 67, 33, 0.08);
  box-shadow: inset 0 0 0 1px rgba(217, 67, 33, 0.22);
}

.program-board[data-move-mode="true"] .program-dropzone.is-move-target {
  cursor: copy;
  background: rgba(217, 67, 33, 0.045);
  box-shadow: inset 0 0 0 1px rgba(217, 67, 33, 0.16);
}

.program-board[data-move-mode="true"] .program-dropzone.is-move-target:hover {
  background: rgba(217, 67, 33, 0.1);
  box-shadow: inset 0 0 0 1px rgba(217, 67, 33, 0.32);
}

.program-empty {
  display: grid;
  min-height: 72px;
  place-items: center;
  border: 1px dashed rgba(255, 90, 54, 0.14);
  border-radius: 8px;
  color: var(--muted);
  font-size: 11px;
}

.program-session-card {
  min-width: 0;
  border: 1px solid rgba(255, 90, 54, 0.08);
  border-radius: 8px;
  background: rgba(23, 24, 26, 0.92);
  box-shadow: 0 8px 18px -16px rgba(18, 24, 42, 0.45);
  overflow: hidden;
  padding: 8px;
  cursor: pointer;
}

.program-session-card[draggable="true"] {
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.program-session-card[draggable="true"]:active {
  cursor: grabbing;
}

.program-session-card.is-dragging {
  opacity: .42;
}

.program-session-card.is-selected-for-move {
  border-color: rgba(217, 67, 33, 0.52);
  background: rgba(217, 67, 33, 0.08);
  box-shadow: 0 0 0 2px rgba(217, 67, 33, 0.1), 0 10px 22px -16px rgba(18, 24, 42, 0.55);
}

.program-session-card[data-adjusted="true"] {
  border-color: rgba(217, 67, 33, 0.26);
  background: rgba(217, 67, 33, 0.06);
}

.program-session-card[data-type="race"] {
  border-color: rgba(207, 86, 62, 0.24);
  background: rgba(207, 86, 62, 0.06);
}

.program-session-card[data-type="completed"] {
  border-color: rgba(217, 67, 33, 0.2);
}

.program-session-card[data-locked="true"] {
  cursor: default;
}

.program-card-topline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 7px;
}

.program-card-actions {
  display: flex;
  gap: 4px;
  justify-content: flex-end;
}

.program-card-actions button {
  display: grid;
  width: 24px;
  min-width: 24px;
  height: 24px;
  min-height: 24px;
  place-items: center;
  border: 1px solid rgba(255, 90, 54, 0.08);
  border-radius: 6px;
  background: rgba(23, 24, 26, 0.78);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 680;
  line-height: 1;
  padding: 0;
}

.program-card-actions button:hover {
  border-color: rgba(217, 67, 33, 0.3);
  background: var(--surface-tint);
}

.program-card-actions button[aria-pressed="true"] {
  border-color: rgba(217, 67, 33, 0.44);
  background: rgba(217, 67, 33, 0.12);
  color: var(--green);
}

.program-card-actions button[data-program-delete]:hover {
  border-color: rgba(207, 86, 62, 0.28);
  color: var(--red);
}

.program-card-power,
.program-move-note {
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.35;
}

.program-session-card h3 {
  color: var(--ink);
  font-size: 12.5px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.program-session-card p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.38;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.program-card-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  margin-top: 8px;
}

.program-card-metrics span {
  min-width: 0;
  border-radius: 6px;
  background: rgba(255, 90, 54, 0.05);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 600;
  line-height: 1.2;
  padding: 6px 3px;
  text-align: center;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}

.program-card-power,
.program-move-note {
  display: block;
  margin-top: 9px;
}

dialog.program-detail-dialog {
  width: min(820px, calc(100% - 32px));
}

.program-edit-dialog {
  width: min(620px, calc(100% - 32px));
  border: 1px solid rgba(255, 90, 54, 0.08);
  border-radius: 12px;
  background: rgba(23, 24, 26, 0.96);
  box-shadow: 0 24px 60px -28px rgba(18, 24, 42, 0.5);
  padding: 0;
}

.program-edit-dialog::backdrop {
  background: rgba(18, 24, 42, 0.28);
  backdrop-filter: blur(3px);
}

.program-edit-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 22px;
}

.program-edit-form .section-head {
  grid-column: 1 / -1;
  margin-bottom: 2px;
}

.program-edit-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.program-edit-form input,
.program-edit-form textarea {
  width: 100%;
  border: 1px solid rgba(255, 90, 54, 0.1);
  border-radius: 8px;
  background: rgba(23, 24, 26, 0.72);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  padding: 10px 11px;
}

.program-edit-form textarea {
  resize: vertical;
}

.program-edit-form .span-2,
.program-edit-actions {
  grid-column: 1 / -1;
}

.program-edit-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 6px;
}

.program-edit-actions button,
.dialog-close-button {
  min-height: 36px;
  border: 1px solid rgba(255, 90, 54, 0.1);
  border-radius: 8px;
  background: rgba(23, 24, 26, 0.86);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 680;
  padding: 0 12px;
}

.program-edit-actions button[type="submit"] {
  border-color: rgba(217, 67, 33, 0.34);
  background: rgba(217, 67, 33, 0.1);
  color: var(--green);
}

.dialog-close-button {
  width: 36px;
  padding: 0;
}

.program-detail-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px;
}

.program-detail-objective {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
}

.program-detail-blocks {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.program-detail-block {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(255, 90, 54, 0.08);
  border-radius: 8px;
  background: rgba(23, 24, 26, 0.6);
  padding: 9px 12px;
}

.program-detail-block strong {
  font-size: 13px;
  font-weight: 680;
}

.program-detail-block span {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.program-detail-decision {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  margin: 0;
  border-top: 1px solid rgba(255, 90, 54, 0.08);
  padding-top: 12px;
}

.program-session {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr) 310px;
  gap: 18px;
  align-items: start;
  border: 1px solid rgba(255, 90, 54, 0.06);
  border-radius: 8px;
  background: rgba(23, 24, 26, 0.86);
  box-shadow: var(--soft-shadow);
  padding: 18px;
}

.program-session[data-type="rest"] {
  background: rgba(23, 24, 26, 0.82);
}

.program-session[data-type="race"] {
  border-color: rgba(207, 86, 62, 0.24);
  background: rgba(207, 86, 62, 0.055);
}

.program-session[data-type="completed"] {
  border-color: rgba(217, 67, 33, 0.18);
  background: rgba(217, 67, 33, 0.055);
}

.program-session[data-type="constraint"] {
  border-color: rgba(255, 90, 54, 0.1);
  background: rgba(255, 90, 54, 0.035);
  opacity: 0.82;
}

.program-date span,
.program-date strong {
  display: block;
}

.program-date span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 620;
}

.program-date strong {
  margin-top: 5px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 560;
}

.program-main {
  min-width: 0;
}

.program-title-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}

.program-title-row h2 {
  font-size: 19px;
}

.program-tag {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  min-height: 26px;
  border-radius: 999px;
  background: rgba(217, 67, 33, 0.1);
  color: var(--green);
  padding: 0 9px;
  font-size: 10.5px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.program-main p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.program-blocks {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.program-blocks div {
  min-width: 0;
  border-top: 1px solid rgba(255, 90, 54, 0.07);
  padding-top: 10px;
}

.program-blocks span,
.program-blocks strong,
.program-blocks small,
.program-decision {
  display: block;
}

.program-blocks span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.program-blocks strong {
  margin-top: 4px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 590;
}

.program-blocks small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.program-decision {
  margin-top: 13px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.program-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.program-metrics div {
  min-width: 0;
  border-radius: 8px;
  background: rgba(23, 24, 26, 0.82);
  padding: 11px;
}

.program-metrics dd {
  font-size: 15px;
  line-height: 1.18;
}

.athlete-form {
  display: grid;
  grid-template-columns: repeat(7, minmax(84px, 1fr));
  gap: 10px;
  align-items: end;
}

.profile-form {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: stretch;
  gap: 18px;
}

.form-section {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
  border-top: 1px solid rgba(255, 90, 54, 0.07);
  padding-top: 18px;
}

.form-section:first-child {
  border-top: 0;
  padding-top: 0;
}

.form-section.narrow {
  grid-column: span 6;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form-section.connection-zone {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
}

.form-section-title {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  margin-bottom: 2px;
}

.form-section-title span,
.form-section-title small {
  display: block;
}

.form-section-title span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 650;
}

.form-section-title small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.athlete-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.athlete-form label[hidden] {
  display: none;
}

.field-hint {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;
}

.athlete-form input,
.athlete-form select {
  min-width: 0;
  width: 100%;
  border: 1px solid rgba(255, 90, 54, 0.08);
  border-radius: 999px;
  background: rgba(23, 24, 26, 0.72);
  color: var(--ink);
  padding: 10px 13px;
  outline-color: rgba(217, 67, 33, 0.38);
}

.availability-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.check-tile {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border: 1px solid rgba(255, 90, 54, 0.08);
  border-radius: 8px;
  background: rgba(23, 24, 26, 0.62);
  padding: 8px 9px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 560;
}

.check-tile > span {
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.check-tile > span input[type="checkbox"] {
  width: auto;
  min-width: 14px;
  height: 14px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  padding: 0;
  accent-color: var(--green);
}

.check-tile input[type="number"] {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(255, 90, 54, 0.1);
  border-radius: 6px;
  background: var(--surface);
  padding: 4px 6px;
  color: var(--ink);
  font-size: 12px;
}

.profile-save-row {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile-save-row button {
  justify-self: start;
}

#profile-save-status {
  color: var(--muted);
  font-size: 12px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

#profile-save-status.is-visible {
  opacity: 1;
}

.connection-card {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 13px;
  border: 1px solid rgba(255, 90, 54, 0.07);
  border-radius: 8px;
  background: rgba(23, 24, 26, 0.62);
  padding: 15px;
}

.connection-card.is-primary {
  grid-column: span 2;
  background: rgba(23, 24, 26, 0.78);
  border-color: rgba(217, 67, 33, 0.18);
}

.connection-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.connection-provider {
  min-width: 0;
  display: flex;
  gap: 10px;
  align-items: center;
}

.provider-mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--surface-tint);
  color: var(--ink);
  font-size: 13px;
  font-weight: 760;
}

.connection-card[data-provider="intervals"] .provider-mark {
  background: var(--green);
  color: var(--navy-ink);
}

.connection-card[data-provider="garmin"] .provider-mark {
  background: #41685f;
}

.connection-card[data-provider="strava"] .provider-mark {
  background: #c65b3d;
}

.connection-provider strong,
.connection-provider small,
.connection-card p {
  display: block;
}

.connection-provider strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.2;
}

.connection-provider small,
.connection-card p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.connection-card p {
  margin: 0;
}

.connection-badge {
  flex: 0 0 auto;
  border-radius: 999px;
  background: rgba(255, 90, 54, 0.06);
  color: var(--muted);
  padding: 6px 9px;
  font-size: 11px;
  font-weight: 680;
  white-space: nowrap;
}

.connection-badge[data-state="connected"] {
  background: rgba(217, 67, 33, 0.12);
  color: var(--green);
}

.connection-badge[data-state="pending"] {
  background: rgba(243, 199, 67, 0.18);
  color: var(--yellow);
}

.connection-badge[data-state="not_connected"] {
  background: rgba(255, 90, 54, 0.06);
  color: var(--muted);
}

.connection-badge[data-state="declared"] {
  background: rgba(207, 86, 62, 0.12);
  color: var(--red);
}

.connection-fields {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.connection-fields .span-4 {
  grid-column: 1 / -1;
}

.integration-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.integration-actions span {
  border-radius: 999px;
  background: rgba(255, 90, 54, 0.05);
  color: var(--muted);
  padding: 7px 10px;
  font-size: 12px;
  line-height: 1.35;
}

.integration-actions span[data-state="ready"] {
  background: rgba(217, 67, 33, 0.12);
  color: var(--green);
}

.integration-actions span[data-state="warning"] {
  background: rgba(243, 199, 67, 0.18);
  color: var(--yellow);
}

.integration-actions span[data-state="error"] {
  background: rgba(207, 86, 62, 0.11);
  color: var(--red);
}

.integration-actions span[data-state="loading"] {
  background: rgba(108, 154, 199, 0.13);
  color: var(--blue);
}

.calendar-form {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.calendar-form .span-2,
.physiology-form .span-2 {
  grid-column: span 2;
}

.calendar-form .span-3 {
  grid-column: span 3;
}

.calendar-events {
  display: grid;
  gap: 10px;
}

.calendar-event-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 96px;
  border: 1px solid rgba(255, 90, 54, 0.07);
  border-radius: 8px;
  background: rgba(23, 24, 26, 0.72);
  padding: 13px;
}

.physiology-form {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.physiology-impact {
  margin-top: 18px;
}

.physiology-list {
  display: grid;
  gap: 10px;
}

.physiology-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 92px;
  border: 1px solid rgba(255, 90, 54, 0.07);
  border-radius: 8px;
  background: rgba(23, 24, 26, 0.72);
  padding: 13px;
}

.physiology-card[data-source="manual"] {
  border-color: rgba(217, 67, 33, 0.2);
}

.physiology-date {
  display: grid;
  place-items: center;
  width: 48px;
  min-height: 58px;
  border: 1px solid rgba(255, 90, 54, 0.08);
  border-radius: 8px;
  background: rgba(23, 24, 26, 0.92);
}

.physiology-date strong {
  font-size: 18px;
  line-height: 1;
  font-weight: 650;
}

.physiology-date span {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.physiology-card-main {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.physiology-card-main > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.physiology-card-main strong {
  font-size: 13px;
  font-weight: 610;
}

.physiology-card-main p,
.physiology-card-main small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.42;
}

.calendar-event-card[data-type="race"] {
  border-color: rgba(207, 86, 62, 0.24);
  background: rgba(207, 86, 62, 0.055);
}

.calendar-event-date {
  display: grid;
  place-items: center;
  width: 52px;
  height: 58px;
  border-radius: 8px;
  background: rgba(255, 90, 54, 0.06);
  color: var(--ink);
}

.calendar-event-date strong {
  font-size: 20px;
  line-height: 1;
}

.calendar-event-date span {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.calendar-event-main {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.calendar-event-title {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.calendar-event-title strong {
  min-width: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 650;
}

.calendar-badge {
  border-radius: 999px;
  background: rgba(255, 90, 54, 0.08);
  color: var(--muted);
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 650;
}

.calendar-event-card[data-type="race"] .calendar-badge {
  background: rgba(207, 86, 62, 0.14);
  color: var(--red);
}

.calendar-event-main p,
.calendar-event-main small {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.calendar-event-actions {
  display: grid;
  gap: 8px;
  justify-items: end;
}

.calendar-event-actions span {
  color: var(--muted);
  font-size: 12px;
}

.calendar-event-actions button {
  border: 1px solid rgba(255, 90, 54, 0.08);
  border-radius: 999px;
  background: rgba(23, 24, 26, 0.7);
  color: var(--ink);
  padding: 8px 10px;
  font-size: 12px;
}

/* Analyse "edition deja couree" (GPX + performance reelle par segment) - bloc pleine largeur sous
   la ligne date/titre/actions d'une carte course, cf. renderCalendarEventCard (app.js). */
.calendar-race-analysis {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px solid var(--hairline);
}

.calendar-race-analysis-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.calendar-race-analysis-head span {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.calendar-race-analysis-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.calendar-race-analysis-controls label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.calendar-race-analysis-controls input[type="file"] {
  max-width: 210px;
  font-size: 12px;
  color: var(--muted);
}

.calendar-race-analysis-controls select {
  border: 1px solid var(--hairline);
  border-radius: 6px;
  background: rgba(23, 24, 26, 0.7);
  color: var(--ink);
  padding: 6px 8px;
  font-size: 12px;
}

.calendar-race-analysis-controls button {
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: rgba(23, 24, 26, 0.7);
  color: var(--ink);
  padding: 7px 12px;
  font-size: 12px;
}

/* Course deja courue designee comme reference pour l'objectif GPX courant (Phase B) - pointeur
   unique ascent.objectiveReferenceEventId, cf. app.js. */
.calendar-race-analysis-controls button.is-active {
  border-color: var(--green);
  background: rgba(78, 203, 154, 0.12);
  color: var(--green);
}

.calendar-race-analysis-status {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.calendar-race-analysis-status[data-state="error"] { color: var(--red); }
.calendar-race-analysis-status[data-state="loading"] { color: var(--navy); }
.calendar-race-analysis-status[data-state="ready"] { color: var(--green); }

/* Profil de segments (mesure ou predit) : meme habillage que .profile-wrap (page Objectif GPX)
   pour rester visuellement cohérent - le composant lui-meme (app/charts.js) ne pose aucune
   couleur en CSS, tout reste en attributs SVG inline comme le reste de ce module. */
.calendar-race-analysis .chart-wrap {
  padding: 10px;
  border: 1px solid rgba(255, 90, 54, 0.06);
  border-radius: 8px;
  background: linear-gradient(180deg, var(--surface), var(--shell));
}

.race-segment-table-toggle {
  margin-top: 8px;
}

.race-segment-table-toggle summary {
  cursor: pointer;
  font-size: 12px;
  color: var(--muted);
}

.race-segment-table-toggle .race-segment-list {
  margin-top: 8px;
}

.race-segment-summary {
  color: var(--muted);
  font-size: 12px;
}

.race-segment-list {
  display: grid;
  gap: 6px;
}

.race-segment-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--hairline);
  border-left-width: 3px;
  border-radius: 6px;
  background: rgba(23, 24, 26, 0.55);
  font-size: 12px;
  color: var(--muted);
}

.race-segment-row[data-type="climb"] { border-left-color: var(--red); }
.race-segment-row[data-type="descent"] { border-left-color: var(--blue); }
.race-segment-row[data-type="flat"] { border-left-color: var(--hairline); }

.race-segment-row strong {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.race-segment-row[data-highlight="weakest"] strong { color: var(--red); }
.race-segment-row[data-highlight="strongest"] strong { color: var(--green); }

.fact-grid,
.compact-facts,
#race-facts {
  display: grid;
  gap: 12px;
  margin: 0;
}

.fact-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.compact-layout {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.compact-facts,
#race-facts {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.fact-grid div,
.compact-facts div,
#race-facts div {
  min-width: 0;
}

dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

dd {
  margin: 3px 0 0;
  font-size: 18px;
  font-weight: 560;
}

.finding-list {
  display: grid;
  gap: 10px;
}

.lake-signal-list {
  margin-top: 18px;
}

.finding {
  display: grid;
  gap: 4px;
  border-left: 2px solid var(--line);
  padding: 1px 0 1px 12px;
}

.finding[data-severity="high"] {
  border-left-color: var(--red);
}

.finding[data-severity="medium"] {
  border-left-color: var(--yellow);
}

.finding strong {
  font-size: 13px;
  font-weight: 560;
}

.finding span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.42;
}

.activity-insight-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 22px;
}

.recommendation-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.recommendation {
  display: grid;
  gap: 8px;
  min-height: 122px;
  border: 1px solid rgba(255, 90, 54, 0.07);
  border-radius: 8px;
  background: rgba(23, 24, 26, 0.7);
  padding: 14px;
}

.recommendation[data-priority="high"] {
  border-color: rgba(207, 86, 62, 0.24);
  background: rgba(207, 86, 62, 0.06);
}

.recommendation[data-priority="medium"] {
  border-color: rgba(243, 199, 67, 0.32);
  background: rgba(243, 199, 67, 0.08);
}

.recommendation strong {
  font-size: 13px;
  font-weight: 620;
}

.recommendation span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.activity-calendar {
  display: grid;
  gap: 18px;
}

.activity-month {
  display: grid;
  gap: 10px;
}

.activity-month-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 2px;
}

.activity-month-head strong {
  font-size: 14px;
  font-weight: 620;
  text-transform: capitalize;
}

.activity-month-head span {
  color: var(--muted);
  font-size: 12px;
}

.activity-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.activity-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  width: 100%;
  min-height: 112px;
  border: 1px solid rgba(255, 90, 54, 0.07);
  border-radius: 8px;
  background: rgba(23, 24, 26, 0.72);
  color: var(--ink);
  padding: 12px;
  text-align: left;
  box-shadow: none;
}

.activity-card:hover {
  border-color: rgba(255, 90, 54, 0.15);
  background: var(--surface-tint);
}

.activity-card[data-selected="true"] {
  border-color: rgba(217, 67, 33, 0.46);
  background: rgba(217, 67, 33, 0.08);
}

.activity-card[data-load="high"] .activity-date {
  border-color: rgba(207, 86, 62, 0.22);
}

.activity-card[data-load="medium"] .activity-date {
  border-color: rgba(243, 199, 67, 0.35);
}

.activity-date {
  display: grid;
  place-items: center;
  width: 46px;
  min-height: 58px;
  border: 1px solid rgba(255, 90, 54, 0.08);
  border-radius: 8px;
  background: rgba(23, 24, 26, 0.92);
}

.activity-date strong {
  font-size: 18px;
  line-height: 1;
  font-weight: 650;
}

.activity-date small {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.activity-card-main {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.activity-card-main strong {
  overflow: hidden;
  font-size: 13px;
  font-weight: 610;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-card-main small {
  color: var(--muted);
  font-size: 12px;
}

.activity-card-metrics {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.activity-card-metrics span {
  min-width: 0;
  border-radius: 7px;
  background: rgba(255, 90, 54, 0.04);
  padding: 7px 8px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 560;
  text-align: center;
  white-space: nowrap;
}

.empty-state {
  grid-column: 1 / -1;
  border: 1px dashed rgba(255, 90, 54, 0.12);
  border-radius: 8px;
  background: rgba(23, 24, 26, 0.5);
  color: var(--muted);
  padding: 14px;
  font-size: 13px;
}

.trait-list {
  display: grid;
  gap: 14px;
}

.twin-maturity-list,
.twin-change-list,
.twin-timeline-list,
.twin-signal-list {
  display: grid;
  gap: 10px;
}

.panel-note {
  margin: -8px 0 16px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.phys-signature-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.phys-signature-card {
  display: grid;
  gap: 6px;
  min-width: 0;
  border: 1px solid rgba(255, 90, 54, 0.06);
  border-radius: 8px;
  background: rgba(23, 24, 26, 0.78);
  padding: 12px;
}

.phys-signature-card span,
.phys-signature-card small,
.phys-signature-card em {
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.35;
}

.phys-signature-card strong {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.phys-signature-card em {
  display: -webkit-box;
  overflow: hidden;
  font-style: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.power-zone-table {
  display: grid;
  overflow: hidden;
  border: 1px solid rgba(255, 90, 54, 0.07);
  border-radius: 8px;
  margin-bottom: 16px;
}

.power-zone-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.8fr) minmax(90px, 0.42fr) minmax(180px, 1fr);
  gap: 12px;
  align-items: center;
  border-top: 1px solid rgba(255, 90, 54, 0.06);
  background: rgba(23, 24, 26, 0.56);
  padding: 10px 12px;
}

.power-zone-row:first-child {
  border-top: 0;
}

.power-zone-row strong {
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 650;
}

.power-zone-row span {
  color: var(--green);
  font-size: 12px;
  font-weight: 720;
}

.power-zone-row small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.twin-maturity-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.9fr) minmax(140px, 1fr) 44px;
  gap: 12px;
  align-items: center;
  border-top: 1px solid rgba(255, 90, 54, 0.06);
  padding-top: 10px;
}

.twin-maturity-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.twin-maturity-row strong,
.twin-maturity-row span {
  display: block;
}

.twin-maturity-row strong {
  font-size: 13px;
  font-weight: 610;
}

.twin-maturity-row span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.twin-maturity-row em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 610;
  text-align: right;
}

.mini-bar {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 90, 54, 0.08);
}

.mini-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}

.twin-change-item {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 3px 12px;
  align-items: baseline;
  border: 1px solid rgba(255, 90, 54, 0.06);
  border-radius: 8px;
  background: rgba(23, 24, 26, 0.78);
  padding: 12px;
}

.twin-change-item span {
  color: var(--muted);
  font-size: 12px;
}

.twin-change-item strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  font-weight: 620;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.twin-change-item small {
  grid-column: 2;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.twin-change-item[data-tone="positive"] {
  border-color: rgba(217, 67, 33, 0.18);
  background: rgba(217, 67, 33, 0.06);
}

.twin-change-item[data-tone="warning"] {
  border-color: rgba(207, 86, 62, 0.16);
  background: rgba(207, 86, 62, 0.055);
}

.ml-guidance-list {
  display: grid;
  gap: 10px;
}

.ml-guidance-item {
  border: 1px solid rgba(255, 90, 54, 0.06);
  border-left: 3px solid var(--faint);
  border-radius: 8px;
  background: rgba(23, 24, 26, 0.78);
  padding: 14px 16px;
}

.ml-guidance-item strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
  font-weight: 620;
  margin-bottom: 4px;
}

.ml-guidance-item p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.ml-guidance-item[data-tone="positive"] {
  border-left-color: var(--green);
  background: rgba(217, 67, 33, 0.06);
}

.ml-guidance-item[data-tone="warning"] {
  border-left-color: var(--red);
  background: rgba(207, 86, 62, 0.055);
}

.dashboard-charts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.chart-empty {
  padding: 36px 12px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 10px;
  font-size: 12px;
  color: var(--muted);
}

.chart-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.chart-legend-item i {
  display: inline-block;
  width: 10px;
  height: 2px;
  border-radius: 1px;
}

.chart-wrap {
  position: relative;
}

.chart-svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}

.chart-grid {
  stroke: var(--line);
  stroke-width: 1;
}

.chart-axis-label {
  fill: var(--faint);
  font-size: 10px;
}

.chart-line {
  fill: none;
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.chart-end-dot {
  stroke: var(--surface);
  stroke-width: 2;
}

.chart-end-label {
  fill: var(--ink);
  font-size: 11px;
  font-weight: 600;
}

.chart-bar {
  transition: opacity 0.12s ease;
}

.chart-bar:hover {
  opacity: 0.78;
}

.chart-hit {
  fill: transparent;
  cursor: crosshair;
}

.chart-crosshair {
  stroke: var(--faint);
  stroke-width: 1;
  pointer-events: none;
}

.chart-tooltip {
  position: absolute;
  top: 6px;
  transform: translateX(-50%);
  background: var(--navy);
  color: var(--navy-ink);
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 11px;
  line-height: 1.6;
  pointer-events: none;
  white-space: nowrap;
  box-shadow: var(--soft-shadow);
  z-index: 5;
}

.chart-tooltip strong {
  display: block;
  margin-bottom: 3px;
  font-size: 11px;
  font-weight: 600;
}

.chart-tooltip-key {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  margin-right: 4px;
}

.radar-svg {
  overflow: visible;
}

.radar-ring {
  fill: none;
  stroke: var(--line);
  stroke-width: 1;
}

.radar-spoke {
  stroke: var(--line);
  stroke-width: 1;
}

.radar-axis-label {
  font-size: 11px;
  font-weight: 620;
  fill: var(--muted);
}

.radar-polygon-current {
  fill: rgba(78, 203, 154, 0.22);
  stroke: var(--green);
  stroke-width: 2;
  stroke-linejoin: round;
}

.radar-polygon-previous {
  fill: none;
  stroke: var(--faint);
  stroke-width: 1.5;
  stroke-dasharray: 4 4;
  stroke-linejoin: round;
}

.radar-dot {
  fill: var(--green);
  stroke: var(--surface);
  stroke-width: 1.5;
}

.radar-hit {
  fill: transparent;
  cursor: crosshair;
}

.twin-evolution-chart {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(58px, 1fr));
  gap: 12px;
  min-height: 164px;
  margin-bottom: 10px;
  border: 1px solid rgba(255, 90, 54, 0.06);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(23, 24, 26, 0.78), rgba(23, 24, 26, 0.48));
  padding: 16px;
}

.twin-chart-column {
  display: grid;
  grid-template-rows: 104px auto;
  gap: 8px;
  align-items: end;
  min-width: 0;
}

.twin-chart-bars {
  display: flex;
  gap: 5px;
  align-items: end;
  justify-content: center;
  height: 104px;
  border-bottom: 1px solid rgba(255, 90, 54, 0.11);
}

.twin-chart-bars span {
  width: 9px;
  min-height: 3px;
  border-radius: 999px 999px 0 0;
}

.twin-chart-bars .is-readiness {
  background: var(--green);
}

.twin-chart-bars .is-confidence {
  background: var(--blue);
}

.twin-chart-bars .is-fatigue {
  background: var(--red);
}

.twin-chart-column small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.twin-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 12px;
}

.twin-chart-legend span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.twin-chart-legend i {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.twin-chart-legend .is-readiness {
  background: var(--green);
}

.twin-chart-legend .is-confidence {
  background: var(--blue);
}

.twin-chart-legend .is-fatigue {
  background: var(--red);
}

.twin-timeline-item {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 13px;
  border-top: 1px solid rgba(255, 90, 54, 0.07);
  padding: 12px 0;
}

.twin-timeline-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.twin-timeline-item > span {
  color: var(--muted);
  font-size: 12px;
}

.twin-timeline-item strong {
  display: block;
  font-size: 13px;
  font-weight: 620;
}

.twin-timeline-item p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.4;
}

.trait-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.trait-card {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(255, 90, 54, 0.06);
  border-radius: 8px;
  background: rgba(23, 24, 26, 0.78);
  padding: 15px;
}

.trait-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.trait-card-head span,
.trait-card footer span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.trait-card-head strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 23px;
  line-height: 1;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.trait-card-head em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  white-space: nowrap;
}

.trait-bars {
  display: grid;
  gap: 8px;
}

.trait-bars small {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 11px;
}

.trait-card p {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.4;
}

.trait-card footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid rgba(255, 90, 54, 0.06);
  padding-top: 10px;
}

.twin-signal-card {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  border: 1px solid rgba(255, 90, 54, 0.06);
  border-radius: 8px;
  background: rgba(23, 24, 26, 0.78);
  padding: 13px 14px;
}

.twin-signal-card strong,
.twin-signal-card span {
  display: block;
}

.twin-signal-card strong {
  font-size: 13px;
  font-weight: 620;
}

.twin-signal-card span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.twin-signal-card em {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--navy-ink);
  font-size: 12px;
  font-style: normal;
  font-weight: 650;
}

.trait-row {
  display: grid;
  gap: 7px;
}

.trait-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.trait-meta strong {
  color: var(--ink);
  font-weight: 560;
}

.bar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-tint);
}

.bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--yellow));
}

.bar.is-muted span {
  background: linear-gradient(90deg, var(--blue), var(--green));
}

.evidence-list {
  display: grid;
  gap: 0;
}

.evidence-item {
  display: grid;
  grid-template-columns: 86px 104px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  border-top: 1px solid rgba(255, 90, 54, 0.07);
  padding: 13px 0;
}

.evidence-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.evidence-item:last-child {
  padding-bottom: 0;
}

.evidence-item span {
  color: var(--muted);
  font-size: 12px;
}

.evidence-item strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 560;
}

.evidence-item p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.42;
}

.datalake-event-list {
  display: grid;
  gap: 0;
  margin-top: 18px;
}

.datalake-event {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) 88px;
  gap: 14px;
  align-items: start;
  padding: 12px 0;
  border-top: 1px solid rgba(255, 90, 54, 0.07);
}

.datalake-event:first-child {
  border-top: 0;
  padding-top: 0;
}

.datalake-event span {
  width: max-content;
  max-width: 92px;
  border-radius: 999px;
  background: rgba(255, 90, 54, 0.055);
  color: var(--muted);
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 560;
}

.datalake-event strong {
  display: block;
  margin-bottom: 3px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 620;
}

.datalake-event p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.42;
}

.datalake-event em {
  color: var(--faint);
  font-size: 11px;
  font-style: normal;
  text-align: right;
}

.objective-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.file-button {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.file-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.objective-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.72fr);
  gap: 24px;
  align-items: start;
}

.profile-wrap {
  min-width: 0;
  border: 1px solid rgba(255, 90, 54, 0.06);
  border-radius: 8px;
  background: linear-gradient(180deg, var(--surface), var(--shell));
}

#course-profile {
  display: block;
  width: 100%;
  height: auto;
}

.axis {
  stroke: var(--muted);
  stroke-width: 1;
}

.grid-line {
  stroke: var(--line);
  stroke-width: 1;
}

.profile-area {
  fill: rgba(217, 67, 33, 0.11);
}

.profile-line {
  fill: none;
  stroke: var(--green);
  stroke-width: 2.2;
  stroke-linejoin: round;
}

.climb-mark {
  fill: rgba(243, 199, 67, 0.22);
}

.profile-label {
  fill: var(--muted);
  font-size: 11px;
}

.prediction-panel {
  display: grid;
  gap: 21px;
}

.probability {
  display: grid;
  gap: 8px;
}

.probability span,
.probability small {
  color: var(--muted);
}

.probability span {
  font-size: 13px;
}

.probability strong {
  font-family: var(--font-display);
  font-size: 36px;
  line-height: 1;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.probability-bar {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-tint);
}

.probability-bar div {
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}

.limiter {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

@media (max-width: 1180px) {
  .app-shell {
    width: min(100% - 36px, 1080px);
    min-height: calc(100vh - 36px);
    margin: 18px auto;
  }

  .sidebar {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 24px 26px 10px;
  }

  .top-actions {
    justify-content: flex-start;
    min-width: 0;
  }

  .search-chip {
    width: min(100%, 320px);
  }

  .workspace {
    padding: 18px 26px 30px;
  }

  .dashboard-grid,
  .objective-grid,
  .twin-grid,
  .twin-overview-grid,
  .ml-layout,
  .ml-grid,
  .trait-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ml-flow {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .phys-signature-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .program-session {
    grid-template-columns: 1fr;
  }

  .program-blocks {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .activity-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .recommendation-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .form-section.narrow {
    grid-column: 1 / -1;
  }

  .form-section.connection-zone {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .connection-card.is-primary {
    grid-column: 1 / -1;
  }

  .availability-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .summary-grid,
  .dashboard-grid,
  .twin-grid,
  .twin-overview-grid,
  .ml-layout,
  .ml-grid,
  .model-stack,
  .athlete-form,
  .trait-list,
  .fact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-form,
  .form-section,
  .form-section.narrow,
  .form-section.connection-zone,
  .calendar-form,
  .physiology-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .connection-card.is-primary,
  .connection-fields {
    grid-column: 1 / -1;
  }

  .connection-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .availability-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .objective-grid {
    grid-template-columns: 1fr;
  }

  .program-impact-grid,
  .program-impact-days ul {
    grid-template-columns: 1fr;
  }

  .program-impact-head {
    display: grid;
  }

  .program-impact-head small {
    max-width: none;
    text-align: left;
  }

  .calendar-event-card,
  .physiology-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .phys-signature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .power-zone-row {
    grid-template-columns: minmax(130px, 0.8fr) minmax(90px, 0.5fr);
  }

  .power-zone-row small {
    grid-column: 1 / -1;
  }

  .calendar-event-actions {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, max-content);
    gap: 8px;
    justify-items: start;
    align-items: center;
  }

  .activity-insight-grid {
    grid-template-columns: 1fr;
  }

  .athlete-form button {
    grid-column: 1 / -1;
  }

}

@media (max-width: 560px) {
  .app-shell {
    width: 100%;
    min-height: 100vh;
    margin: 0;
    border-radius: 0;
  }

  .summary-grid,
  .dashboard-grid,
  .dashboard-charts,
  .twin-grid,
  .twin-overview-grid,
  .ml-grid,
  .model-stack,
  .athlete-form,
  .activity-card-grid,
  .trait-list,
  .profile-form,
  .form-section,
  .form-section.narrow,
  .form-section.connection-zone,
  .calendar-form,
  .physiology-form,
  .connection-fields,
  .availability-grid,
  .recommendation-list,
  .fact-grid,
  .compact-facts,
  .compact-layout,
  #race-facts,
  .phys-signature-grid {
    grid-template-columns: 1fr;
  }

  .twin-maturity-row,
  .twin-change-item,
  .twin-timeline-item,
  .power-zone-row,
  .datalake-event,
  .evidence-item {
    grid-template-columns: 1fr;
  }

  .datalake-event em {
    text-align: left;
  }

  .twin-change-item small {
    grid-column: auto;
  }

  .twin-evolution-chart {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 12px;
  }

  .calendar-form .span-2,
  .calendar-form .span-3,
  .physiology-form .span-2 {
    grid-column: 1 / -1;
  }

  .connection-card,
  .connection-card.is-primary {
    grid-column: 1 / -1;
  }

  .connection-card-head {
    align-items: start;
    flex-direction: column;
  }

  .section-head.split {
    align-items: start;
    flex-direction: column;
  }

  .nav-list {
    gap: 14px;
  }

  .ml-flow {
    grid-template-columns: 1fr;
  }

  .program-blocks,
  .program-metrics {
    grid-template-columns: 1fr;
  }

  .program-board {
    margin-right: -18px;
    padding-right: 18px;
  }

  .program-actions {
    justify-content: flex-start;
  }

  .program-card-metrics {
    grid-template-columns: 1fr;
  }

  .program-edit-form {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .program-edit-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .evidence-item {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

#behavior-checkin-section {
  margin-bottom: 24px;
}

#behavior-checkin-list {
  display: grid;
  gap: 16px;
}

.behavior-checkin-card {
  display: grid;
  gap: 12px;
  border-color: rgba(217, 67, 33, 0.22);
  background: rgba(217, 67, 33, 0.05);
}

.behavior-checkin-card > p {
  font-weight: 600;
  color: var(--ink);
}

.behavior-checkin-meta strong {
  color: var(--ink);
  font-weight: 650;
}

.behavior-checkin-detail {
  border: 1px solid rgba(255, 90, 54, 0.1);
  border-radius: 8px;
  padding: 8px 10px;
}

.behavior-checkin-detail summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.behavior-checkin-detail[open] summary {
  margin-bottom: 8px;
}

.behavior-checkin-detail .fact-grid {
  margin: 0;
}

.behavior-checkin-causes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.behavior-checkin-cause {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--ink);
}

.behavior-checkin-cause input {
  width: auto;
}

.behavior-checkin-note {
  display: grid;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
}

.behavior-checkin-note input {
  border: 1px solid rgba(255, 90, 54, 0.1);
  border-radius: 6px;
  background: var(--surface);
  padding: 6px 8px;
  color: var(--ink);
  font-size: 13px;
}

.behavior-checkin-actions {
  display: flex;
  gap: 10px;
}

.behavior-checkin-actions button[data-behavior-dismiss] {
  background: transparent;
  color: var(--muted);
  border-color: rgba(255, 90, 54, 0.14);
}

.behavior-checkin-actions button[data-behavior-dismiss]:hover {
  background: rgba(255, 90, 54, 0.05);
}

/* Page de connexion (app/login.html) - pas de sidebar/nav puisque non authentifie, une seule
   carte centree reutilisant .panel/.athlete-form/.brand deja existants. */
.login-shell {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
}

.login-card {
  width: min(420px, 100%);
  display: grid;
  gap: 20px;
}

.login-brand {
  justify-content: center;
}

.login-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  border-radius: 999px;
  background: rgba(23, 24, 26, 0.6);
  padding: 4px;
}

.login-tabs button {
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  padding: 9px 0;
  font-size: 13px;
  font-weight: 560;
  cursor: pointer;
}

.login-tabs button.is-active {
  background: var(--navy);
  color: var(--navy-ink);
}

.login-form {
  grid-template-columns: 1fr;
}

.login-form button[type="submit"] {
  margin-top: 4px;
}

.login-status {
  min-height: 16px;
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  text-align: center;
}

.login-status[data-state="error"] { color: var(--red); }
.login-status[data-state="loading"] { color: var(--navy); }
