:root {
  --bg: #0a0c11;
  --bg-elevated: #0d0f16;
  --panel: #12141c;
  --panel-2: #191c26;
  --panel-3: #20232f;
  --border: #262a36;
  --border-strong: #333949;
  --text: #f2f3f6;
  --text-dim: #9aa1b0;
  --text-faint: #7b8291;
  --accent: #ff5a3c;
  --accent-soft: rgba(255, 90, 60, 0.14);
  --accent-2: #3ccfa0;
  --accent-2-soft: rgba(60, 207, 160, 0.14);
  --info: #4da3ff;
  --info-soft: rgba(77, 163, 255, 0.12);
  --warn: #f2b33d;
  --warn-soft: rgba(242, 179, 61, 0.12);
  --danger: #e5484d;
  --danger-soft: rgba(229, 72, 77, 0.12);
  --purple: #b06bff;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px -8px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, 0.65);
  --overlay-tint: rgba(255, 255, 255, 0.03);
  --hero-gradient: linear-gradient(160deg, #14100e 0%, #0a0c11 55%, #0a1512 100%);
  --switcher-bg: rgba(10, 12, 17, 0.6);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  font-family: "Archivo", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --display: "Archivo", "Arial Narrow", "Inter", sans-serif;
}

/* Thème clair — choisi comme thème par défaut (voir applyTheme() dans app.js) : la version
   sombre d'origine se sentait "tout noir", peu engageante pour découvrir le produit. Les deux
   thèmes restent disponibles (Paramètres → Apparence), le sombre n'est pas retiré. Les couleurs
   d'accent/zones/sport restent des teintes saturées qui se lisent bien sur les deux fonds — seuls
   les tokens de surface (fond, panneaux, bordures, texte, ombres) changent ici. */
:root[data-theme="light"] {
  /* Version 2 validée (maquettes du 17/09/2026) : fond pierre, encre presque noire, orange vif. */
  --bg: #f3f2ee;
  --bg-elevated: #ffffff;
  --panel: #ffffff;
  --panel-2: #f1efea;
  --panel-3: #e4e1da;
  --border: #e2dfd8;
  --border-strong: #cfcac0;
  --text: #17171a;
  --text-dim: #5d5b58;
  --text-faint: #8d8a84;
  --accent: #f2552c;
  --accent-soft: rgba(242, 85, 44, 0.12);
  --accent-2: #178a62;
  --accent-2-soft: #e2f3ec;
  --info-soft: rgba(77, 163, 255, 0.14);
  --warn-soft: rgba(242, 179, 61, 0.16);
  --danger-soft: rgba(229, 72, 77, 0.12);
  --radius-md: 12px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(23, 23, 26, 0.05);
  --shadow-md: 0 8px 24px -10px rgba(23, 23, 26, 0.14);
  --shadow-lg: 0 24px 60px -24px rgba(23, 23, 26, 0.22);
  --overlay-tint: rgba(23, 23, 26, 0.035);
  --hero-gradient: linear-gradient(160deg, #fdeae3 0%, #f3f2ee 55%, #e2f3ec 100%);
  --switcher-bg: rgba(255, 255, 255, 0.7);
}
html[data-theme="light"] { background: var(--bg); }

* { box-sizing: border-box; }

::selection { background: var(--accent); color: #fff; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--panel-3); border-radius: 999px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: var(--border-strong); background-clip: padding-box; }

html {
  background:
    radial-gradient(1200px 600px at 12% -10%, rgba(255, 90, 60, 0.07), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(60, 207, 160, 0.05), transparent 55%),
    var(--bg);
}

body {
  margin: 0;
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.005em;
}

h1, h2, h3 { font-family: var(--display); font-stretch: 88%; letter-spacing: -0.01em; }

a { color: var(--accent); }

button {
  font-family: inherit;
  cursor: pointer;
}

input, select, textarea {
  font-family: inherit;
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 9px 11px;
  font-size: 13.5px;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}

input::placeholder, textarea::placeholder { color: var(--text-faint); }

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* ---- Buttons ---- */
.btn {
  background: linear-gradient(180deg, #ff6b4d, var(--accent));
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 18px;
  font-weight: 600;
  font-size: 13.5px;
  box-shadow: 0 4px 14px -4px rgba(255, 90, 60, 0.55);
  transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease), filter 0.15s var(--ease), opacity 0.15s var(--ease);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px -6px rgba(255, 90, 60, 0.65); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn.secondary {
  background: var(--panel-3);
  color: var(--text);
  border: 1px solid var(--border-strong);
  box-shadow: none;
}
.btn.secondary:hover { background: var(--panel-3); border-color: var(--text-faint); box-shadow: none; }
.btn.small { padding: 6px 12px; font-size: 12px; border-radius: 7px; }
.btn.danger { background: linear-gradient(180deg, #ef5a5f, var(--danger)); box-shadow: 0 4px 14px -4px rgba(229, 72, 77, 0.5); }
.btn-block { width: 100%; padding: 11px 16px; font-size: 14px; margin-top: 4px; }

/* ---- Auth screen ---- */
.auth-screen {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
}
.lang-switcher { position: absolute; top: 18px; right: 20px; z-index: 5; display: flex; gap: 4px; background: var(--switcher-bg); border: 1px solid var(--border); border-radius: 999px; padding: 4px; backdrop-filter: blur(6px); }
.lang-switcher-btn { border: none; background: transparent; color: var(--text-dim); font-size: 11px; font-weight: 700; letter-spacing: 0.03em; padding: 5px 10px; border-radius: 999px; cursor: pointer; }
.lang-switcher-btn:hover { color: var(--text); }
.lang-switcher-btn.active { background: var(--accent); color: #fff; }

.news-badge {
  display: inline-block; margin: 18px 0 14px; padding: 6px 14px;
  background: var(--accent-soft); border: 1px solid rgba(255, 90, 60, 0.35);
  border-radius: 999px; font-size: 12.5px; font-weight: 700; color: var(--accent);
}

.connector-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 22px; }
.connector-badges-label { font-size: 12px; color: var(--text-dim); margin-right: 4px; }
.connector-badge { font-size: 12px; font-weight: 700; padding: 5px 12px; border-radius: 999px; border: 1px solid; background: var(--overlay-tint); }

.auth-visual {
  position: relative;
  overflow: hidden;
  background: var(--hero-gradient);
  border-right: 1px solid var(--border);
  padding: 56px 60px;
  display: flex;
  align-items: center;
}
.auth-visual-glow {
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(600px 400px at 20% 15%, rgba(255, 90, 60, 0.22), transparent 60%),
    radial-gradient(500px 400px at 90% 85%, rgba(60, 207, 160, 0.16), transparent 60%);
  filter: blur(10px);
  pointer-events: none;
}
.auth-visual-inner { position: relative; max-width: 460px; }
.auth-visual-title {
  font-size: 34px;
  line-height: 1.15;
  margin: 28px 0 14px;
  font-weight: 800;
}
.auth-visual-sub { color: var(--text-dim); font-size: 14.5px; line-height: 1.6; margin: 0 0 34px; }

.auth-highlights { display: flex; flex-direction: column; gap: 18px; }
.auth-highlight { display: flex; gap: 14px; align-items: flex-start; }
.auth-highlight-icon {
  flex-shrink: 0;
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 17px;
}
.auth-highlight-title { font-weight: 700; font-size: 13.5px; margin-bottom: 2px; }
.auth-highlight-desc { color: var(--text-dim); font-size: 12.5px; line-height: 1.5; }
.auth-guides-link { display: inline-block; margin-top: 26px; color: var(--text-dim); font-size: 12.5px; font-weight: 600; text-decoration: none; border-bottom: 1px solid transparent; }
.auth-guides-link:hover { color: var(--text); border-bottom-color: var(--border-strong); }

.auth-form-side {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 40px 24px;
  background:
    radial-gradient(480px 360px at 50% 30%, var(--accent-soft), transparent 65%),
    var(--bg);
}
.auth-footer-links { display: flex; gap: 18px; }
.auth-footer-links a { color: var(--text-dim); font-size: 12px; text-decoration: none; }
.auth-footer-links a:hover { color: var(--text); text-decoration: underline; }
.auth-card {
  position: relative;
  width: 100%;
  max-width: 380px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 30px;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255, 255, 255, 0.02) inset;
}
.auth-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 35%, transparent), transparent 40%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.brand-mark.auth-card-brand { display: none; margin-bottom: 22px; }
@media (max-width: 880px) {
  .brand-mark.auth-card-brand { display: flex; }
}
.auth-card h1 { font-size: 21px; margin: 0 0 5px; font-weight: 800; }
.auth-card p.tag { color: var(--text-dim); font-size: 13px; margin: 0 0 22px; }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 13px; }
.field label { font-size: 12px; color: var(--text-dim); font-weight: 600; }
.field-optional { font-weight: 400; text-transform: none; letter-spacing: 0; opacity: 0.7; }
.field input, .field select, .field textarea { width: 100%; }
.auth-toggle { text-align: center; margin-top: 18px; font-size: 13px; color: var(--text-dim); }
.auth-toggle a { color: var(--accent); cursor: pointer; text-decoration: none; font-weight: 600; }
.auth-toggle a:hover { text-decoration: underline; }
.auth-legal-note { text-align: center; margin-top: 12px; font-size: 11.5px; color: var(--text-dim); line-height: 1.5; }
.auth-legal-note a { color: var(--text-dim); text-decoration: underline; }
.auth-legal-note a:hover { color: var(--text); }
.error-box {
  background: var(--danger-soft);
  border: 1px solid rgba(229, 72, 77, 0.4);
  color: #ff9d9f;
  padding: 9px 11px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 14px;
  white-space: pre-wrap;
}

/* ---- Brand mark ---- */
.brand-mark { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 15.5px; font-family: "Manrope", sans-serif; }
/* Symbole de marque : le SVG hérite de currentColor pour l'anneau cranté (discret) et des
   variables --accent / --accent-2 pour le F ascendant et le nœud de seuil. */
.brand-mark .fz-mark { flex: none; color: var(--border-strong); }
.brand-mark-text { white-space: nowrap; }
.brand-mark-badge {
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(150deg, #ff6b4d, var(--accent) 60%, #c8391f);
  color: #fff;
  border-radius: 8px;
  font-size: 13px;
  box-shadow: 0 3px 10px -3px rgba(255, 90, 60, 0.7);
}
.brand-mark .dot { color: var(--accent); margin: 0 1px; }

/* ---- Shell ---- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 236px;
  flex-shrink: 0;
  background: var(--bg-elevated);
  border-right: 1px solid var(--border);
  padding: 22px 14px 16px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.sidebar .brand-mark { padding: 0 10px; margin-bottom: 14px; font-family: var(--display); font-stretch: 88%; font-size: 19px; letter-spacing: .02em; }
.sidebar .brand-mark .fz-mark { color: var(--accent); }

.user-card {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 10px; margin: 10px 0 2px;
  border-top: 1px solid var(--border);
  cursor: pointer;
  border-radius: 0;
}
.user-card:hover .user-line { color: var(--accent); }
.user-meta { min-width: 0; display: grid; gap: 1px; }
.user-sub { color: var(--text-faint); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-avatar {
  width: 30px; height: 30px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--panel-3);
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  font-size: 11.5px; font-weight: 700; color: var(--text-dim);
  overflow: hidden;
}
.user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-line { color: var(--text); font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.account-avatar-row { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.account-avatar-big {
  width: 72px; height: 72px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--panel-3);
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  font-size: 22px; font-weight: 700; color: var(--text-dim);
  overflow: hidden;
}
.account-avatar-big img { width: 100%; height: 100%; object-fit: cover; }

.nav-list { display: flex; flex-direction: column; gap: 2px; }
.nav-section { display: grid; gap: 2px; }
.nav-section-label { padding: 14px 10px 5px; color: var(--text-faint); font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.nav-section:first-child .nav-section-label { padding-top: 4px; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.nav-icon { width: 20px; height: 20px; display: grid; place-items: center; flex-shrink: 0; }
.nav-icon svg { width: 20px; height: 20px; display: block; }
.nav-item:hover { background: var(--panel-2); color: var(--text); }
.nav-item:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.nav-item.active { background: var(--panel-2); color: var(--text); box-shadow: inset 3px 0 0 var(--accent); }
.nav-item.active .nav-icon { color: var(--accent); }
.nav-mobile { display: none; }
.nav-more > summary { list-style: none; }
.nav-more > summary::-webkit-details-marker { display: none; }
.sidebar .spacer { flex: 1; }
.logout { display: flex; align-items: center; gap: 10px; padding: 8px 10px; color: var(--text-faint); font-size: 13px; cursor: pointer; border-radius: var(--radius-sm); transition: color 0.15s var(--ease), background 0.15s var(--ease); }
.logout:hover { color: var(--danger); background: var(--danger-soft); }

.main { flex: 1; padding: 32px 40px 60px; max-width: 1180px; min-width: 0; }
.main h2 { margin: 0 0 6px; font-size: 34px; line-height: 1.05; font-weight: 800; }
.main p.subtitle { color: var(--text-dim); font-size: 13.5px; margin: 0 0 26px; }

.getting-started {
  margin-bottom: 20px;
  padding: 20px 22px;
  border: 1px solid rgba(60, 207, 160, .35);
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--accent-2-soft), var(--panel));
  box-shadow: var(--shadow-sm);
}
.getting-started-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.getting-started-head h3 { margin: 0 0 5px; font-size: 18px; }
.getting-started-head p { margin: 0; color: var(--text-dim); font-size: 13px; }
.getting-started-progress {
  display: grid;
  place-items: center;
  min-width: 48px;
  height: 32px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--accent-2);
  font-weight: 800;
}
.getting-started-steps { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 18px 0; }
.getting-started-step {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--panel);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.getting-started-step.current { border-color: var(--accent); }
.getting-started-step.done { border-color: var(--accent-2); }
.getting-started-step[aria-disabled="true"] { opacity: .55; cursor: default; }
.getting-started-step span:not(.getting-started-number) { display: flex; flex-direction: column; gap: 3px; }
.getting-started-step small { color: var(--text-dim); font-size: 11px; }
.getting-started-number {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--panel-3);
  color: var(--text-dim);
  font-weight: 800;
}
.getting-started-step.current .getting-started-number { background: var(--accent-soft); color: var(--accent); }
.getting-started-step.done .getting-started-number { background: var(--accent-2-soft); color: var(--accent-2); }

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}
.card h3 { margin: 0 0 14px; font-size: 14.5px; font-weight: 700; }

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 6, 9, 0.72);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 20px;
  overflow-y: auto;
  z-index: 100;
  animation: modal-fade-in 0.15s ease-out;
}
@keyframes modal-fade-in { from { opacity: 0; } to { opacity: 1; } }
.modal-dialog {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 720px;
  padding: 26px;
}
.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text-dim);
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-close:hover { color: var(--text); border-color: var(--border-strong); }
/* Fenêtre d'aperçu des pages imprimables (plan de la semaine, bilan de saison). */
.print-preview-overlay { align-items: center; padding: 20px; }
.print-preview-dialog { display: flex; flex-direction: column; max-width: 1000px; height: calc(100vh - 40px); padding: 0; overflow: hidden; }
.print-preview-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px 12px 20px; border-bottom: 1px solid var(--border); }
.print-preview-head strong { flex: 1; min-width: 0; }
.print-preview-head .modal-close { position: static; flex: 0 0 auto; }
.print-preview-frame { flex: 1; width: 100%; border: 0; background: #fff; }
@media (max-width: 760px) {
  .print-preview-overlay { padding: 0; }
  .print-preview-dialog { height: 100vh; min-height: 0; border-radius: 0; padding: 0; }
  .print-preview-head .btn { padding-inline: 10px; }
}
.modal-body .session-detail { border: none; padding: 0; margin: 0; background: none; }
.session-adaptation { display: grid; gap: 4px; margin: 12px 0; padding: 12px 14px; border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border)); border-radius: var(--radius-md); background: var(--accent-soft); }
.session-adaptation p { margin: 0; color: var(--text-dim); font-size: 13px; }
.session-adaptation .btn { justify-self: start; margin-top: 6px; }

.connector-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.connector-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--panel-2);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease), transform 0.15s var(--ease);
}
.connector-tile:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.connector-tile.connected { border-color: var(--accent-2); background: var(--accent-2-soft); }
.connector-tile-check {
  position: absolute;
  top: 8px;
  right: 10px;
  color: var(--accent-2);
  font-weight: 800;
  font-size: 13px;
}
.connector-wordmark { font-size: 17px; font-weight: 800; letter-spacing: 0.01em; }
.connector-wordmark.large { font-size: 26px; margin-bottom: 16px; }
.connector-tile-status { font-size: 11.5px; font-weight: 600; color: var(--text-dim); letter-spacing: 0.01em; }
.connector-tile.connected .connector-tile-status { color: var(--accent-2); }

.connector-logo-img { display: block; object-fit: contain; }
.connector-logo-img.medium { height: 26px; max-width: 100px; }
.connector-logo-img.large { height: 38px; max-width: 160px; margin-bottom: 16px; }
/* Le wordmark Garmin officiel est un monochrome noir — inversé en blanc uniquement en thème
   sombre (attribut absent, voir applyTheme() dans app.js), sinon invisible sur fond sombre. */
:root:not([data-theme="light"]) .connector-logo-img.mono { filter: invert(1); }

.connector-utility-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; align-items: start; }
.connector-utility-grid .card { margin-bottom: 0; }
.cal-chip { cursor: pointer; }
.theme-toggle { display: flex; gap: 8px; }
.theme-toggle-btn { flex: 1; padding: 9px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--panel-2); color: var(--text-dim); font-weight: 600; font-size: 13px; }
.theme-toggle-btn.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.accent-swatches { display: flex; gap: 12px; }
.accent-swatch { width: 36px; height: 36px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0; }
.accent-swatch:hover { transform: scale(1.08); }
.accent-swatch.selected { border-color: var(--text); box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--text); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.01em;
  background: var(--panel-2);
  color: var(--text-dim);
  border: 1px solid var(--border);
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.9; }
.pill.charge { color: var(--accent); background: var(--accent-soft); border-color: rgba(255,90,60,0.35); }
.pill.recuperation { color: var(--accent-2); background: var(--accent-2-soft); border-color: rgba(60,207,160,0.35); }
.pill.absorption { color: var(--danger); background: var(--danger-soft); border-color: rgba(229,72,77,0.35); }
.pill.developpement { color: var(--warn); background: var(--warn-soft); border-color: rgba(242,179,61,0.35); }
.pill.opportunite_progression { color: var(--accent-2); background: var(--accent-2-soft); border-color: rgba(60,207,160,0.35); }
.pill.mesocycle-reprise { color: var(--warn); background: var(--warn-soft); border-color: rgba(242,179,61,0.35); }
.pill.mesocycle-developpement_specifique { color: var(--accent); background: var(--accent-soft); border-color: rgba(255,90,60,0.35); }

.feeling-picker-options { display: flex; gap: 6px; flex-wrap: wrap; }
.feeling-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 74px;
  padding: 8px 6px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text-dim);
  cursor: pointer;
  transition: transform 0.1s ease, border-color 0.15s ease, background 0.15s ease;
}
.feeling-option:hover { transform: translateY(-1px); }
.feeling-option .feeling-emoji { font-size: 22px; line-height: 1; }
.feeling-option .feeling-label { font-size: 10px; text-align: center; line-height: 1.2; }
.feeling-option.selected { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
.pill.mesocycle-affutage { color: var(--accent-2); background: var(--accent-2-soft); border-color: rgba(60,207,160,0.35); }
.pill.mesocycle-competition { color: var(--danger); background: var(--danger-soft); border-color: rgba(229,72,77,0.35); }
.pill.realisee { color: var(--accent-2); background: var(--accent-2-soft); border-color: rgba(60,207,160,0.35); }

.profile-row.selected { border-color: var(--accent); background: var(--panel-3); }
code { background: var(--panel-3); border-radius: 4px; padding: 1px 6px; font-family: "SFMono-Regular", Menlo, monospace; letter-spacing: 0.03em; }

.roster-table { display: flex; flex-direction: column; gap: 4px; overflow-x: auto; }
.roster-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.8fr 0.8fr 1.4fr 1.3fr 0.9fr 1.3fr;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  min-width: 820px;
}
.roster-row.roster-head { color: var(--text-faint); font-size: 11px; text-transform: uppercase; letter-spacing: 0.03em; font-weight: 700; }
.roster-row:not(.roster-head) { background: var(--panel-2); border: 1px solid var(--border); }
.roster-row:not(.roster-head) > div:last-child { display: flex; gap: 6px; }

.athlete-detail { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.athlete-detail h4 { margin: 0 0 10px; font-size: 13px; color: var(--text-dim); }
.session-mini-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; font-size: 13px; border-bottom: 1px solid var(--border); }
.session-mini-row:last-child { border-bottom: none; }

.profile-list, .program-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }

.program-builder-head, .program-library-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.program-builder-head h3, .program-library-head h3 { margin: 0; font-size: 18px; }
.program-sport-field { max-width: 340px; }
.program-duration-fieldset { padding: 0; margin: 20px 0 0; border: 0; }
.program-duration-fieldset legend { margin-bottom: 10px; font-size: 12px; font-weight: 700; color: var(--text-dim); }
.program-duration-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.program-duration-option {
  position: relative;
  display: flex;
  min-height: 112px;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--panel-2);
  cursor: pointer;
  transition: border-color .15s var(--ease), background .15s var(--ease), transform .15s var(--ease);
}
.program-duration-option:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.program-duration-option:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.program-duration-option input { position: absolute; top: 13px; right: 13px; accent-color: var(--accent); }
.program-duration-option > span:last-child { display: flex; flex-direction: column; gap: 7px; padding-right: 18px; }
.program-duration-option strong { font-size: 14px; }
.program-duration-option small { color: var(--text-dim); font-size: 11.5px; line-height: 1.45; }
.program-recommended-badge {
  position: absolute;
  top: -9px;
  left: 12px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.program-quick-modes { margin-top: 12px; }
.program-quick-modes summary { cursor: pointer; color: var(--text-dim); font-size: 12px; font-weight: 600; }
.program-quick-options { display: flex; gap: 18px; padding: 12px 0 2px; color: var(--text-dim); font-size: 12px; }
.program-quick-options label { display: flex; align-items: center; gap: 7px; cursor: pointer; }
.program-quick-options input { accent-color: var(--accent); }
.program-plan-preview {
  margin: 18px 0;
  padding: 14px 16px;
  border: 1px solid rgba(60, 207, 160, .3);
  border-radius: var(--radius-sm);
  background: var(--accent-2-soft);
  font-size: 12.5px;
}
.program-plan-preview ul { margin: 8px 0 0; padding-left: 18px; color: var(--text-dim); line-height: 1.6; }
.program-generate-btn { min-width: 240px; }
.program-empty-state {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--panel-2);
}
.program-empty-state > span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 800;
}
.program-empty-state p { margin: 4px 0 0; color: var(--text-dim); font-size: 12px; }
.program-library { margin-bottom: 18px; }
.program-card-row { padding: 14px 16px; }
.program-card-main, .program-card-actions { display: flex; align-items: center; gap: 12px; }
.program-card-icon { font-size: 22px; }

.profile-row, .program-row {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--panel-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 12px 16px; font-size: 13.5px; cursor: pointer;
  transition: border-color 0.15s var(--ease), transform 0.15s var(--ease), background 0.15s var(--ease);
}
.profile-row:hover, .program-row:hover { border-color: var(--accent); background: var(--panel-3); transform: translateX(2px); }
.meta { color: var(--text-dim); font-size: 12px; }

.day-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 13px; }
.day-row label { width: 80px; color: var(--text-dim); }
.day-row input[type="number"] { width: 80px; }

.zone-editor-rows { display: flex; flex-direction: column; gap: 8px; }
.zone-editor-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.zone-editor-row:last-child { border-bottom: none; }
.zone-editor-label-fixed { flex: 1; min-width: 160px; color: var(--text); }
.zone-editor-label { flex: 1; min-width: 140px; }
.zone-editor-pct { width: 64px; }

.checkbox-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 13.5px; cursor: pointer; }
.checkbox-row input[type="checkbox"] { accent-color: var(--accent); width: 16px; height: 16px; cursor: pointer; }

.record-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.record-tile { background: var(--panel-3); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; }
.record-tile-value { font-size: 22px; font-weight: 800; font-family: "Manrope", sans-serif; color: var(--accent); }
.record-tile-label { font-size: 12px; color: var(--text-dim); margin: 2px 0 6px; }

.week-block { border: 1px solid var(--border); border-radius: var(--radius-md); margin-bottom: 14px; overflow: hidden; background: var(--panel); }
.week-header {
  display: flex; align-items: center; gap: 10px;
  background: var(--panel-2); padding: 12px 16px; font-size: 13.5px; font-weight: 700;
  border-bottom: 1px solid var(--border);
}
.week-rationale { padding: 10px 16px; font-size: 12.5px; color: var(--text-dim); border-bottom: 1px solid var(--border); background: var(--overlay-tint); line-height: 1.5; }
.week-summary {
  display: flex; gap: 24px; flex-wrap: wrap; padding: 10px 16px;
  font-size: 12.5px; color: var(--text); border-bottom: 1px solid var(--border);
}
.week-summary .stat-label { margin-right: 5px; }

.session-row { border-bottom: 1px solid var(--border); padding: 13px 16px; transition: background 0.15s var(--ease); }
.session-row:hover { background: var(--overlay-tint); }
.session-row:last-child { border-bottom: none; }
.session-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.session-title { font-size: 13.5px; font-weight: 700; display: flex; align-items: center; gap: 7px; }
.session-sub { font-size: 12px; color: var(--text-dim); margin-top: 4px; }
.session-actions { display: flex; gap: 6px; flex-wrap: wrap; }

.session-detail { border-bottom: 1px solid var(--border); padding: 16px 0; }
.session-detail:last-child { border-bottom: none; }
.session-stats-row {
  display: flex; gap: 26px; margin: 14px 0; padding: 12px 0;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.session-stats-row > div { display: flex; flex-direction: column; gap: 3px; }
.stat-label { font-size: 10.5px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; }
.stat-value { font-size: 17px; font-weight: 800; font-family: "Manrope", sans-serif; }

.coach-comment {
  background: var(--info-soft); border: 1px solid rgba(77, 163, 255, 0.3);
  border-radius: var(--radius-sm); padding: 11px 13px; font-size: 13px; line-height: 1.55; margin-bottom: 12px;
}
.coach-comment-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--info); font-weight: 800; margin-bottom: 5px; }

.load-row { display: flex; gap: 26px; margin-top: 12px; }
.load-row .stat-value { font-size: 15px; }

.structure-block { margin-top: 12px; font-size: 12.5px; color: var(--text-dim); border-top: 1px dashed var(--border); padding-top: 10px; }
.structure-rep-label { font-weight: 700; color: var(--text); margin: 8px 0 3px; font-size: 12px; }
.structure-rep-group { border-left: 2px dashed var(--border); margin-left: 5px; padding-left: 10px; }

.structure-step-row { display: flex; align-items: flex-start; gap: 9px; padding: 5px 0; }
.dot { flex-shrink: 0; width: 9px; height: 9px; border-radius: 50%; margin-top: 4px; box-shadow: 0 0 0 3px var(--overlay-tint); }
.structure-step-main { color: var(--text); font-size: 13px; font-weight: 500; }
.structure-step-sub { color: var(--text-dim); font-size: 12px; }

.dropzone {
  position: relative;
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.dropzone:hover, .dropzone.dropzone-active { border-color: var(--accent); background: var(--accent-soft); }
.dropzone input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.dropzone-hint { color: var(--text-dim); font-size: 13px; pointer-events: none; }

.inline-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-top: 12px; background: var(--panel-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; }
.inline-form .field { margin-bottom: 0; }
.inline-form .field input { width: 92px; }

.notes-list, .wellness-list { display: flex; flex-direction: column; gap: 8px; }
.note-item, .wellness-item {
  background: var(--panel-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px 13px; font-size: 13px; display: flex; justify-content: space-between; gap: 10px;
  transition: border-color 0.15s var(--ease);
}
.note-item:hover, .wellness-item:hover { border-color: var(--border-strong); }
.custom-fields-manager { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.custom-fields-list { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.note-item .type-tag { font-weight: 800; text-transform: uppercase; font-size: 10.5px; color: var(--danger); letter-spacing: 0.03em; }

.adapt-result { background: var(--panel-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 13px 15px; margin-top: 14px; font-size: 13px; }
.adapt-result ul { margin: 6px 0 0; padding-left: 18px; }

.empty-hint { color: var(--text-faint); font-size: 13px; font-style: italic; }

/* ---- Calendrier ---- */
.cal-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; flex-wrap: wrap; gap: 10px; }
.cal-nav { display: flex; align-items: center; gap: 14px; font-size: 14.5px; font-weight: 700; font-family: "Manrope", sans-serif; }
.cal-nav button { width: 32px; height: 32px; padding: 0; display: flex; align-items: center; justify-content: center; font-size: 15px; }
/* Onglets soulignés façon Nolio plutôt que des boutons pleins : Prévu / Réalisé / Prévu et
   réalisé sont des VUES qui s'excluent, pas des filtres additifs — l'habillage doit le dire
   aussi clairement que le comportement (voir sessionMatchesFilter). */
.cal-filters { display: flex; gap: 4px; border-bottom: 1px solid var(--border); }
.cal-filters .btn[data-cal-filter] {
  background: transparent; border: none; border-radius: 0; padding: 8px 4px; margin-right: 14px;
  color: var(--text-dim); font-weight: 600; box-shadow: none;
  border-bottom: 2px solid transparent;
}
.cal-filters .btn[data-cal-filter]:not(.secondary) { color: var(--accent); border-bottom-color: var(--accent); }
.cal-filters .btn[data-cal-filter]:hover { color: var(--text); }
.cal-filters .btn#cal-export-week { margin-left: 10px; align-self: center; }

.cal-comparison-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.cal-single-layout { display: block; }
.cal-panel {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--panel);
}
.cal-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 14px;
}
.cal-panel-head h3 { margin: 1px 0 3px; font-size: 16px; }
.cal-panel-head p { margin: 0; color: var(--text-dim); font-size: 11.5px; line-height: 1.4; }
.cal-panel-summary {
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
  min-width: 86px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--panel-2);
  text-align: right;
}
.cal-panel-summary strong { color: var(--accent); font-size: 18px; line-height: 1; }
.cal-panel-summary span { margin-top: 3px; color: var(--text-faint); font-size: 10px; }
.cal-comparison-layout .cal-grid {
  grid-template-columns: repeat(7, minmax(0, 1fr)) 64px;
  gap: 4px;
}
.cal-comparison-layout .cal-cell {
  min-width: 0;
  min-height: 78px;
  padding: 5px;
}
.cal-comparison-layout .cal-chip { padding: 3px 4px; }
/* Vue comparée : les colonnes sont trop étroites pour tenir icône + type + durée sur une ligne —
   le type de séance était tronqué jusqu'à disparaître (« 🚴 3 h »). Icône et durée en haut, type
   de séance en dessous sur toute la largeur, en libellé court (compactSessionLabel). */
.cal-comparison-layout .cal-chip { flex-wrap: wrap; white-space: normal; row-gap: 1px; line-height: 1.2; }
.cal-comparison-layout .cal-chip > span:not(.cal-chip-icon) { order: 2; flex: 1 1 100%; min-width: 0; font-size: 9px; }
.cal-comparison-layout .cal-chip small { order: 1; }
.cal-chip > span:not(.cal-chip-icon) { overflow: hidden; text-overflow: ellipsis; }
.cal-chip small { margin-left: auto; color: inherit; font-size: 8.5px; opacity: .85; }
.cal-panel-realise { border-color: rgba(60, 207, 160, .35); }

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr) 92px;
  gap: 7px;
  margin-bottom: 18px;
}
.cal-total-head { color: var(--text-faint); }
.cal-total-cell {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border-radius: var(--radius-sm); background: var(--panel-2); border: 1px solid var(--border);
}
.cal-total-cell.empty { background: transparent; border: none; }
.cal-total-label { font-size: 10px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.03em; }
.cal-total-value { font-size: 13.5px; font-weight: 700; color: var(--accent); }
.cal-headcell { text-align: center; font-size: 11px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.04em; padding-bottom: 6px; font-weight: 700; }
.cal-cell {
  min-height: 84px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 7px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color 0.15s var(--ease), transform 0.12s var(--ease), background 0.15s var(--ease);
}
.cal-cell:hover { border-color: var(--border-strong); background: var(--panel-2); transform: translateY(-1px); }
.cal-cell.empty { background: transparent; border: none; cursor: default; transform: none; }
.cal-cell.outside-month { opacity: 0.45; }
.cal-cell.outside-month:hover { opacity: 0.7; }
.cal-cell.today { border-color: var(--accent-2); box-shadow: 0 0 0 1px rgba(60,207,160,0.35); }
.cal-cell.selected { outline: 2px solid var(--accent); outline-offset: -1px; }
.cal-daynum { font-size: 12px; color: var(--text-dim); font-weight: 700; }
.cal-cell-weekday { display: none; }
/* Pastilles pleines colorées par sport (façon Nolio) plutôt qu'un simple liseré : un mois entier
   se scanne d'un coup d'œil par couleur, sans avoir à lire chaque libellé. */
.cal-chip {
  font-size: 10.5px;
  padding: 3px 6px;
  border-radius: 6px;
  background: var(--text-faint);
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
}
.cal-chip-icon { font-size: 10.5px; flex-shrink: 0; }
.cal-chip.velo { background: var(--info); }
.cal-chip.course { background: #ff8a4d; }
.cal-chip.musculation { background: var(--purple); }
.cal-chip.natation { background: #1fb6c9; }
/* Une séance réalisée reste dans la couleur de son sport (pas de gris/barré, retour utilisateur
   direct : "je n'ai pas envie qu'elle soit barrée") — juste une coche pour la distinguer. */
.cal-chip.realisee .cal-chip-icon::after { content: " ✓"; font-weight: 700; }

.coach-note {
  margin-top: 12px;
  background: var(--accent-2-soft);
  border: 1px solid rgba(60, 207, 160, 0.3);
  border-radius: var(--radius-sm);
  padding: 10px 13px;
  font-size: 13px;
  line-height: 1.55;
}

.session-comments { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.session-comments h4 { margin: 0 0 10px; font-size: 13px; color: var(--text-dim); }
.comment-row { padding: 8px 0; font-size: 13px; border-bottom: 1px solid var(--border); }
.comment-row:last-child { border-bottom: none; }
.comment-row .meta { font-size: 11.5px; }
.note-comments { margin-top: 6px; padding-left: 10px; border-left: 2px solid var(--border); }
.athlete-note-with-reply { margin-bottom: 10px; }
.athlete-note-with-reply:last-child { margin-bottom: 0; }
.session-comments textarea { font: inherit; resize: vertical; }

/* ---- Modèles de séances ---- */
.tpl-category { margin-bottom: 16px; }
.tpl-category-label {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--accent); font-weight: 800; margin-bottom: 8px;
}
.tpl-row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  background: var(--panel-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px 13px; margin-bottom: 7px; font-size: 13.5px; flex-wrap: wrap;
  transition: border-color 0.15s var(--ease);
}
.tpl-row:hover { border-color: var(--border-strong); }
.tpl-step-row { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; }
.tpl-step-row select { width: 110px; }
.tpl-step-row select[data-step-field="zone"] { width: 150px; }
.tpl-step-row input[type="number"] { width: 70px; }
.tpl-step-row input:not([type="number"]) { flex: 1; }
.tpl-step-header { margin-bottom: 8px; }
.tpl-step-header span { font-size: 11px; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; color: var(--text-faint); }

/* ---- Marketplace (entraîneurs) ---- */
.marketplace-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 16px; }
.marketplace-filters .cal-filters { margin-bottom: 0; flex-wrap: wrap; }
.marketplace-filters input[type="text"] { flex: 1; min-width: 180px; }
.marketplace-filters select { min-width: 160px; }
.marketplace-coach-card {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--panel-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 14px; margin-bottom: 10px;
}
.marketplace-coach-avatar {
  flex: none; width: 52px; height: 52px; border-radius: 50%; overflow: hidden;
  background: var(--panel-3); display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: var(--text-dim);
}
.marketplace-coach-avatar img { width: 100%; height: 100%; object-fit: cover; }
.marketplace-coach-body { flex: 1; min-width: 0; }
.marketplace-coach-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 6px; }
.marketplace-stars { color: var(--warn); letter-spacing: 1px; }
.marketplace-coach-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.marketplace-tag { font-size: 11px; font-weight: 700; letter-spacing: 0.02em; padding: 3px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.marketplace-coach-bio { font-size: 13.5px; margin-bottom: 8px; }
.marketplace-coach-price { font-size: 13.5px; color: var(--text-dim); margin-bottom: 10px; }
.marketplace-coach-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.marketplace-reviews { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.marketplace-review-row { margin-bottom: 8px; font-size: 13px; }
.marketplace-review-form { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }

/* ---- Stats ---- */
.stats-chart { width: 100%; height: 220px; display: block; }
.chart-label { fill: var(--text-faint); font-size: 10px; }
.chart-legend { display: flex; gap: 18px; margin-top: 10px; font-size: 12.5px; color: var(--text-dim); }
.chart-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* ---- Courbes réelles de séance (Garmin/Strava streams) ---- */
.activity-streams { display: flex; flex-direction: column; gap: 18px; }
.stream-chart { display: flex; flex-direction: column; }
.stream-chart-svg-wrap { position: relative; }
.stream-chart-svg { width: 100%; height: 200px; display: block; touch-action: pan-y; cursor: crosshair; }
.stream-grid-line { stroke: var(--border); stroke-width: 1; }
.stream-axis-label { fill: var(--text-faint); font-size: 10px; font-variant-numeric: tabular-nums; }
.stream-cursor-line { stroke: var(--text-dim); stroke-width: 1; stroke-dasharray: 3,3; }
.stream-cursor-dot { stroke: var(--panel); stroke-width: 2; }
.stream-tooltip {
  position: absolute; top: 6px; transform: translateX(-50%);
  background: var(--panel-2); border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  padding: 3px 8px; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums;
  white-space: nowrap; pointer-events: none; box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* ---- Profil : aide volume ---- */
.hint {
  background: var(--warn-soft); border: 1px solid rgba(242, 179, 61, 0.3);
  color: var(--text); border-radius: var(--radius-sm); padding: 9px 13px; font-size: 12.5px; margin: 0;
}
.weekly-total { margin-top: 10px; font-size: 13.5px; font-weight: 700; color: var(--accent-2); }
#quick-volume-hours { width: 90px; }

/* ---- Aide : FAQ (accordéon <details> natif) ---- */
.faq-item { border-bottom: 1px solid var(--border); padding: 10px 0; }
.faq-item:last-child { border-bottom: none; }
.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 13.5px;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before { content: "▸"; color: var(--accent); transition: transform 0.15s ease; flex-shrink: 0; }
.faq-item[open] summary::before { transform: rotate(90deg); }
.faq-item p { margin: 8px 0 0; font-size: 13px; color: var(--text-dim); line-height: 1.5; }

/* ---- Coach IA (chat) ---- */
.chat-card { display: flex; flex-direction: column; height: 540px; padding: 16px; }
.chat-messages { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding: 4px 4px 12px; }
.chat-bubble { max-width: 75%; padding: 10px 14px; border-radius: 14px; font-size: 13.5px; line-height: 1.55; white-space: pre-wrap; }
.chat-bubble.user { align-self: flex-end; background: linear-gradient(180deg, #ff6b4d, var(--accent)); color: #fff; border-bottom-right-radius: 4px; box-shadow: 0 4px 14px -6px rgba(255,90,60,0.55); }
.chat-bubble.assistant { align-self: flex-start; background: var(--panel-2); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.chat-bubble.loading { color: var(--text-faint); font-style: italic; }
.chat-input-row { display: flex; gap: 9px; border-top: 1px solid var(--border); padding-top: 12px; }
.chat-input-row input { flex: 1; }

/* ---- Accueil (dashboard) ---- */
.today-card {
  display: flex; gap: 14px; align-items: center;
  background: var(--panel); border: 1px solid var(--border-strong);
  border-radius: var(--radius-md); padding: 16px 18px; margin-bottom: 14px;
  box-shadow: var(--shadow-sm); cursor: pointer;
  transition: border-color 0.15s var(--ease), transform 0.15s var(--ease);
}
.today-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.today-card.rest { cursor: default; opacity: 0.85; }
.today-card.rest:hover { border-color: var(--border-strong); transform: none; }
.today-card.done { border-color: rgba(60, 207, 160, 0.4); }
.today-card.welcome { cursor: default; border-color: var(--accent); background: linear-gradient(135deg, rgba(255, 90, 60, 0.08), var(--panel)); }
.today-card.welcome:hover { transform: none; }
.today-card-icon { font-size: 26px; flex-shrink: 0; }
.today-card-title { font-size: 16px; font-weight: 700; font-family: "Manrope", sans-serif; }
.today-card-sub { color: var(--text-dim); font-size: 12.5px; margin-top: 2px; }
.today-card .structure-bar { margin-top: 8px; }

.race-countdown {
  display: flex; gap: 12px; align-items: center;
  background: var(--panel); border: 1px solid var(--border-strong);
  border-radius: var(--radius-md); padding: 13px 16px; margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}
.metric-toggle-box { display: flex; gap: 10px; }
.metric-toggle-option {
  flex: 1; display: flex; align-items: center; gap: 10px; cursor: pointer;
  padding: 12px 16px; border: 2px solid var(--border); border-radius: var(--radius-md);
  background: var(--panel); font-weight: 600; font-size: 14px; transition: border-color 0.15s, background 0.15s;
}
.metric-toggle-option input { display: none; }
.metric-toggle-icon { font-size: 20px; }
.metric-toggle-option.selected { border-color: var(--accent); background: var(--accent-soft); }
.metric-toggle-option:hover { border-color: var(--border-strong); }
.metric-toggle-box.wrap { flex-wrap: wrap; }
.metric-toggle-box.wrap .metric-toggle-option { flex: 1 1 160px; }

.macro-bar-row { display: grid; grid-template-columns: 78px 1fr auto; align-items: center; gap: 10px; margin-bottom: 10px; }
.macro-bar-label { font-size: 12.5px; font-weight: 600; color: var(--text-dim); }
.macro-bar-track { height: 8px; border-radius: 999px; background: var(--panel-3); overflow: hidden; }
.macro-bar-fill { height: 100%; border-radius: 999px; transition: width 0.2s var(--ease); }
.macro-bar-value { font-size: 12.5px; font-variant-numeric: tabular-nums; color: var(--text-dim); white-space: nowrap; }

.metric-suggestion {
  display: flex; gap: 12px; align-items: center;
  background: var(--accent-2-soft); border: 1px solid rgba(60, 207, 160, 0.35);
  border-radius: var(--radius-md); padding: 11px 16px; margin-bottom: 12px;
}
.alert-banner {
  display: flex; gap: 12px; align-items: flex-start;
  border-radius: var(--radius-md); padding: 13px 16px; margin-bottom: 18px;
  font-size: 13.5px; line-height: 1.5;
}
.alert-banner.warn { background: var(--warn-soft); border: 1px solid rgba(242, 179, 61, 0.35); }
.alert-banner.danger { background: var(--danger-soft); border: 1px solid rgba(229, 72, 77, 0.4); }
.alert-banner-icon { font-size: 18px; flex-shrink: 0; }
.alert-banner-body > div + div { margin-top: 3px; }

.next-session {
  display: flex; gap: 10px; align-items: center;
  margin-top: 14px; padding: 11px 13px;
  background: var(--panel-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
  cursor: pointer; transition: border-color 0.15s var(--ease);
}
.next-session:hover { border-color: var(--accent); }
.dashboard-figure { font-size: 30px; font-weight: 800; font-family: "Manrope", sans-serif; line-height: 1; }

.acwr-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.acwr-row:last-child { border-bottom: none; }
.acwr-row strong { text-transform: capitalize; min-width: 70px; }

.week-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.week-strip-day { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.week-strip-day.today .week-strip-daylabel { color: var(--accent); font-weight: 800; }
.week-strip-daylabel { font-size: 11px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.02em; text-align: center; }
/* Même pastille pleine colorée par sport que le calendrier (.cal-chip) — un sport doit se
   reconnaître à sa couleur partout dans l'app, pas juste dans le calendrier. */
.week-strip-chip {
  font-size: 11px; padding: 6px 4px; border-radius: var(--radius-sm); text-align: center;
  background: var(--text-faint); color: #fff; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.week-strip-chip.rest { color: var(--text-faint); background: transparent; border: 1px dashed var(--border); }
.week-strip-chip.velo { background: var(--info); }
.week-strip-chip.course { background: #ff8a4d; }
.week-strip-chip.musculation { background: var(--purple); }
.week-strip-chip.natation { background: #1fb6c9; }
.week-strip-chip.realisee::after { content: " ✓"; font-weight: 700; }

.fitness-mini-row { display: flex; gap: 24px; }
.fitness-mini-row .stat-value { display: block; font-size: 26px; font-weight: 800; font-family: "Manrope", sans-serif; }

/* ---- Structure intensity bar ---- */
/* Profil façon Zwift/TrainingPeaks : la hauteur de chaque segment suit l'intensité (puissance,
   allure ou RPE cible), pas juste sa couleur — un intervalle dur forme un pic, la récup un creux. */
.structure-bar { display: flex; align-items: flex-end; height: 56px; border-radius: 6px; overflow: hidden; gap: 1px; margin-top: 12px; padding: 0 0 2px; background: var(--panel-2); border-bottom: 2px solid var(--border); }
.structure-bar-seg { min-width: 2px; border-radius: 2px 2px 0 0; }

/* ---- Toasts ---- */
.toast-container {
  position: fixed; bottom: 24px; right: 24px; z-index: 1000;
  display: flex; flex-direction: column; gap: 10px;
  max-width: 340px;
}
.toast {
  background: var(--panel-3); border: 1px solid var(--border-strong); color: var(--text);
  border-radius: var(--radius-sm); padding: 12px 14px; font-size: 13px; line-height: 1.45;
  box-shadow: var(--shadow-lg);
  animation: toast-in 0.2s var(--ease);
  display: flex; gap: 10px; align-items: flex-start;
}
.toast.success { border-color: rgba(60, 207, 160, 0.4); }
.toast.error { border-color: rgba(229, 72, 77, 0.45); }
.toast-icon { flex-shrink: 0; }
.toast.exiting { animation: toast-out 0.18s var(--ease) forwards; }
.toast-undo { align-items: center; }
.toast-undo-msg { flex: 1; }
.toast-undo-btn {
  flex-shrink: 0; background: none; border: none; color: var(--accent);
  font-weight: 700; font-size: 13px; padding: 2px 4px; cursor: pointer;
}
.toast-undo-btn:hover { text-decoration: underline; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toast-out { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(8px); } }

/* ---- Skeletons ---- */
.skeleton-block, .skeleton-line {
  background: linear-gradient(100deg, var(--panel-2) 30%, var(--panel-3) 50%, var(--panel-2) 70%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
  border-radius: var(--radius-sm);
}
.skeleton-block { width: 100%; height: 80px; }
.skeleton-line { height: 12px; margin-bottom: 8px; }
.skeleton-line:last-child { margin-bottom: 0; width: 60%; }
@keyframes skeleton-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) {
  .skeleton-block, .skeleton-line { animation: none; }
}

/* ---- Responsive overrides (kept last so they win the cascade) ---- */
@media (max-width: 880px) {
  .auth-screen { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
}

@media (max-width: 860px) {
  .shell { flex-direction: column; }
  .sidebar {
    position: fixed; bottom: 0; left: 0; right: 0; top: auto; height: auto;
    width: 100%; flex-direction: row; align-items: center;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px));
    border-right: none; border-top: 1px solid var(--border);
    overflow: visible;
    z-index: 100;
  }
  .sidebar .brand-mark, .sidebar .user-card, .sidebar .spacer, .sidebar > .logout, .nav-desktop { display: none; }
  .nav-mobile { display: flex; flex: 1; justify-content: space-around; min-width: 0; }
  .nav-mobile > .nav-item, .nav-more > summary {
    flex-direction: column; gap: 3px; flex: 1;
    padding: 6px 4px; font-size: 11px; text-align: center; min-width: 0;
  }
  .nav-mobile .nav-item.active { background: transparent; box-shadow: none; color: var(--text); }
  .nav-more { position: static; flex: 1; display: flex; }
  .nav-more-panel {
    position: fixed; left: 10px; right: 10px; bottom: calc(70px + env(safe-area-inset-bottom, 0px));
    max-height: min(68vh, 520px); overflow-y: auto;
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px;
    padding: 10px; border: 1px solid var(--border); border-radius: var(--radius-md);
    background: var(--bg-elevated); box-shadow: var(--shadow-lg);
  }
  .nav-more:not([open]) .nav-more-panel { display: none; }
  .nav-more-panel .nav-item { font-size: 13px; }

  .main { padding: 20px 16px 96px; max-width: 100%; }
  .getting-started { padding: 16px; }
  .getting-started-steps { grid-template-columns: 1fr; }
  .getting-started-head h3 { font-size: 16px; }
  .program-duration-grid { grid-template-columns: 1fr; }
  .program-duration-option { min-height: 86px; }
  .program-empty-state { grid-template-columns: auto 1fr; }
  .program-empty-state .btn { grid-column: 1 / -1; width: 100%; }
  .program-generate-btn { width: 100%; min-width: 0; }
  .program-card-row { align-items: flex-start; gap: 12px; }
  .program-card-actions { flex-direction: column; align-items: flex-end; }
  .program-quick-options { flex-direction: column; gap: 9px; }

  .cal-grid { grid-template-columns: 1fr; gap: 8px; }
  .cal-headcell { display: none; }
  .cal-cell.empty { display: none; }
  /* Mobile : la grille devient une liste — on n'affiche que les jours qui ont une séance (et
     aujourd'hui), sinon l'athlète scrolle 30 cases "repos" avant d'atteindre son plan. */
  .cal-cell.no-sessions:not(.today), .cal-cell.outside-month { display: none; }
  .cal-total-cell { flex-direction: row; justify-content: space-between; padding: 8px 14px; margin: -2px 0 6px; }
  .cal-total-cell.empty { display: none; }
  .cal-cell { flex-direction: row; align-items: center; min-height: 0; padding: 10px 12px; gap: 10px; }
  .cal-cell.today { position: relative; }
  .cal-daynum { flex-shrink: 0; display: flex; align-items: baseline; gap: 5px; width: 44px; }
  .cal-cell-weekday { display: inline; font-size: 11px; color: var(--text-faint); text-transform: uppercase; }
  .cal-cell-sessions { display: flex; flex-direction: column; gap: 5px; flex: 1; }
  .cal-cell-sessions:empty::after { content: "repos"; color: var(--text-faint); font-size: 12px; font-style: italic; }

  .toast-container { left: 12px; right: 12px; bottom: 84px; max-width: none; }

  .grid-2, .grid-3 { grid-template-columns: 1fr; }

  /* 7 colonnes égales n'ont pas la place d'afficher un intitulé de séance sur un écran de
     téléphone (~40px/colonne) — tout finissait en "🚴 …" illisible. Même bascule que le
     calendrier juste au-dessus : une liste verticale, un jour par ligne. */
  .week-strip { grid-template-columns: 1fr; gap: 6px; }
  .week-strip-day { flex-direction: row; align-items: center; gap: 10px; flex-wrap: wrap; }
  .week-strip-daylabel { flex-shrink: 0; width: 46px; text-align: left; }
  .week-strip-chip { flex: 1 1 120px; text-align: left; white-space: normal; }

  .modal-overlay { padding: 0; align-items: stretch; }
  .modal-dialog { max-width: none; min-height: 100%; border-radius: 0; border-width: 0 0 1px; padding: 20px 16px 32px; }
  .modal-close { top: 16px; right: 16px; }
}

/* ---- Fiche séance réalisée : hiérarchie inspirée des outils d'analyse sportifs ---- */
.performance-card,
.performance-analysis {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--panel-2);
}
.performance-section-title,
.eyebrow {
  display: block;
  margin-bottom: 9px;
  color: var(--text-faint);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.performance-analysis-head h3,
.planned-section-head h3 {
  margin: 2px 0 14px;
  font-size: 17px;
}
.performance-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(105px, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--border);
}
.performance-metrics > div {
  display: flex;
  min-height: 68px;
  padding: 11px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: var(--panel);
}
.performance-metrics span,
.power-curve-grid span,
.zone-legend span,
.stat-compare { color: var(--text-dim); font-size: 11px; }
.performance-metrics strong { font-family: "Manrope", sans-serif; font-size: 17px; }
.zone-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.zone-distribution { padding: 13px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--panel); }
.zone-stack { display: flex; height: 14px; overflow: hidden; border-radius: 999px; background: var(--panel-3); }
.zone-stack span { min-width: 2px; }
.zone-legend { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px 10px; margin-top: 10px; }
.zone-legend > div { display: grid; grid-template-columns: 8px auto; column-gap: 5px; align-items: center; }
.zone-legend i { width: 8px; height: 8px; border-radius: 50%; grid-row: span 2; }
.zone-legend strong { font-size: 11px; }
.power-curve { margin-top: 14px; }
.power-curve-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(85px, 1fr)); gap: 8px; }
.power-curve-grid > div { display: flex; flex-direction: column; gap: 3px; padding: 9px 10px; border-radius: var(--radius-sm); background: var(--panel); border: 1px solid var(--border); }
.power-curve-grid strong { font-size: 14px; }
.stream-details { margin-top: 15px; border-top: 1px solid var(--border); padding-top: 12px; }
.stream-details summary { cursor: pointer; color: var(--text); font-size: 13px; font-weight: 700; }

.session-verdict {
  margin-top: 16px;
  padding: 15px 16px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--info);
  border-radius: var(--radius-sm);
  background: var(--panel-2);
}
.session-verdict.success { border-left-color: var(--accent-2); background: var(--accent-2-soft); }
.session-verdict.warning { border-left-color: var(--warn); background: var(--warn-soft); }
.session-verdict strong { display: block; font-family: "Manrope", sans-serif; font-size: 16px; }
.session-verdict p { margin: 5px 0 0; color: var(--text-dim); font-size: 13px; line-height: 1.5; }
.session-primary-stats { flex-wrap: wrap; }

.session-section-toggle {
  margin-top: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--panel-2);
}
.session-section-toggle > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
}
.session-section-toggle > summary::-webkit-details-marker { display: none; }
.session-section-toggle > summary .eyebrow { margin-bottom: 3px; }
.session-section-toggle[open] > summary { border-bottom: 1px solid var(--border); }
.session-section-toggle > :not(summary) { margin-left: 16px; margin-right: 16px; }
.session-section-toggle .performance-card { margin: 0; border: 0; background: transparent; }
.session-section-toggle .structure-block { margin-bottom: 16px; }
.session-ai-action { margin-top: 16px; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--panel-2); }
.session-ai-action .btn { margin-top: 8px; }

.planned-section-head { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--border); }
.stat-compare { display: block; margin-top: 2px; text-transform: none; letter-spacing: 0; }

@media (max-width: 640px) {
  .modal-overlay { padding: 0; }
  .modal-dialog { max-width: none; min-height: 100%; border-radius: 0; padding: 18px 14px; }
  .session-stats-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .session-verdict { padding: 13px; }
  .session-section-toggle > summary { padding: 12px; }
  .session-section-toggle > :not(summary) { margin-left: 12px; margin-right: 12px; }
  .performance-card, .performance-analysis { padding: 12px; }
  .performance-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .zone-grid { grid-template-columns: 1fr; }
  .zone-legend { grid-template-columns: repeat(3, 1fr); }
  .session-actions { width: 100%; flex-wrap: wrap; gap: 8px; padding-bottom: 4px; }
  .session-actions .btn { flex: 1 1 calc(50% - 4px); min-width: 0; justify-content: center; }
}


/* ---- Profil sportif guidé ---- */
.profile-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}
.profile-page-head h2 { margin-bottom: 5px; }
.onboarding-step {
  flex: none;
  padding: 7px 11px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
}
.profile-row-main { display: flex; align-items: center; gap: 11px; min-width: 0; }
.profile-sport-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--panel-3);
  font-size: 20px;
}
.profile-row-summary { display: flex; flex-direction: column; align-items: flex-end; }
.profile-row-summary strong { font-size: 15px; }
.profile-row-summary span { color: var(--text-dim); font-size: 10px; }
.profile-setup-card { max-width: 860px; }
.profile-section-heading { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.profile-section-heading h3 { margin: 0 0 3px; font-size: 17px; }
.profile-section-heading p { margin: 0; color: var(--text-dim); font-size: 12.5px; line-height: 1.45; }
.profile-section-number {
  display: grid;
  place-items: center;
  flex: none;
  width: 29px;
  height: 29px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}
.profile-section-spaced { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--border); }
.optional-label {
  margin-left: 5px;
  color: var(--text-faint);
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.weekly-presets { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-bottom: 13px; color: var(--text-dim); font-size: 12px; }
.weekly-preset {
  padding: 6px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel-2);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}
.weekly-preset:hover, .weekly-preset.selected { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.availability-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.availability-day {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--panel-2);
  color: var(--text-dim);
  font-size: 11px;
  font-weight: 700;
}
.availability-day select { width: 100%; background: var(--panel); }
.profile-reassurance { margin: 8px 0 0; color: var(--text-dim); font-size: 11.5px; }
.profile-advanced { margin-top: 22px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--panel-2); }
.profile-advanced summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 15px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}
.profile-advanced summary span { color: var(--text-faint); font-size: 10px; text-transform: uppercase; }
.profile-advanced > p, .profile-advanced > .grid-2 { margin-left: 15px; margin-right: 15px; }
.profile-advanced > .grid-2 { margin-bottom: 15px; }
.profile-form-actions { display: flex; align-items: center; gap: 12px; margin-top: 20px; }
@media (max-width: 760px) {
  .profile-page-head, .profile-form-actions { align-items: stretch; flex-direction: column; }
  .onboarding-step { align-self: flex-start; }
  .availability-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-row { align-items: flex-start; gap: 12px; }
  .profile-row-summary { flex: none; }
  .profile-form-actions .btn { width: 100%; }
}


/* ---- Plan hebdomadaire guidé ---- */
.plan-detail-card { margin-top: 22px; }
.plan-ready-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}
.plan-ready-head h3 { margin: 3px 0 4px; font-size: 21px; }
.plan-ready-head p { margin: 0; color: var(--text-dim); font-size: 12.5px; }
.plan-overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 16px;
}
.plan-overview-grid > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--panel-2);
}
.plan-overview-grid strong { font-family: "Manrope", sans-serif; font-size: 19px; }
.plan-overview-grid span { color: var(--text-dim); font-size: 10.5px; }
.plan-reading-guide {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 15px 0;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--text);
  font-size: 12.5px;
  line-height: 1.5;
}
.plan-reading-guide span { color: var(--text-dim); }
.week-card { margin-bottom: 10px; }
.week-card > summary { list-style: none; }
.week-card > summary::-webkit-details-marker { display: none; }
.week-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 15px;
  cursor: pointer;
  background: var(--panel-2);
}
.week-summary-head::after { content: "▾"; color: var(--text-faint); transition: transform .15s ease; }
.week-card:not([open]) .week-summary-head::after { transform: rotate(-90deg); }
.week-summary-title { display: flex; align-items: center; gap: 10px; }
.week-summary-title > div { display: flex; flex-direction: column; gap: 2px; }
.week-summary-title > div span { color: var(--text-dim); font-size: 10.5px; }
.week-number {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}
.week-summary-meta { display: flex; align-items: center; gap: 9px; color: var(--text-dim); font-size: 11.5px; }
.week-content { border-top: 1px solid var(--border); }
.week-purpose {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 11px 16px;
  background: var(--overlay-tint);
  font-size: 12px;
  line-height: 1.45;
}
.week-purpose span { color: var(--text-dim); }
.session-plan-card { padding: 17px 16px; }
.session-plan-card:hover { background: transparent; }
.session-plan-card.is-complete { border-left: 3px solid var(--accent-2); }
.session-plan-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.session-date { margin-bottom: 4px; color: var(--text-dim); font-size: 10.5px; text-transform: capitalize; }
.session-plan-card .session-title { font-size: 15px; }
.session-status {
  flex: none;
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
}
.session-status.realisee { background: var(--accent-2-soft); color: var(--accent-2); }
.session-status.annulee { background: var(--danger-soft); color: var(--danger); }
.session-essential-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 13px 0;
}
.session-essential-grid > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 9px 11px;
  border-radius: var(--radius-sm);
  background: var(--panel-2);
}
.session-essential-grid span { color: var(--text-dim); font-size: 9.5px; text-transform: uppercase; letter-spacing: .04em; }
.session-essential-grid strong { font-size: 12.5px; }
.session-purpose {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 12px;
  padding: 11px 13px;
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--accent-soft);
  font-size: 12.5px;
  line-height: 1.5;
}
.session-purpose span { color: var(--text-dim); }
.session-adaptive-note {
  margin-bottom: 11px;
  color: var(--text-dim);
  font-size: 11.5px;
  font-style: italic;
}
.session-structure-chart { margin: 8px 0 10px; }
.session-details { margin: 4px 0 13px; border-top: 1px solid var(--border); }
.session-details summary {
  padding: 10px 0;
  color: var(--accent);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}
.session-details .structure-block { margin-top: 0; border-top: 0; padding-top: 0; }
.session-technical-line { margin: 10px 0; color: var(--text-faint); font-size: 10.5px; }
.session-plan-actions { justify-content: space-between; align-items: center; margin-top: 12px; }
.session-export-actions { display: flex; gap: 5px; }
.planned-reference-label { margin-top: 14px; }
.plan-phase-help { margin-top: 15px; padding-top: 12px; border-top: 1px solid var(--border); }
.plan-phase-help summary { color: var(--text-dim); cursor: pointer; font-size: 11.5px; font-weight: 700; }
.plan-phase-help p { color: var(--text-dim); font-size: 11.5px; line-height: 1.55; }
@media (max-width: 760px) {
  .plan-ready-head { flex-direction: column; }
  .plan-ready-head .btn { width: 100%; }
  .plan-overview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .week-summary-head, .week-summary-meta { align-items: flex-start; }
  .week-summary-meta { flex-direction: column; }
  .session-essential-grid { grid-template-columns: 1fr; }
  .session-plan-actions { align-items: stretch; flex-direction: column; }
  .session-plan-actions > .btn { width: 100%; }
  .session-export-actions { justify-content: flex-end; }
}

/* ---- Landing FRENESIT (écran d'entrée, non connecté) ---- */
/* ---- Page d'accueil du site (version 2, reprise de la maquette Webflow) ---- */
.wf-landing { --wf-ink: #17171a; --wf-ink-2: #5d5b58; --wf-ink-3: #8d8a84; --wf-line: #e2dfd8; --wf-soft: #f3f2ee; --wf-or: #f26a1b; --wf-or-ink: #c2540f;
  background: #fff; color: var(--wf-ink); min-height: 100vh; font-family: "Inter", system-ui, sans-serif; }
.wf-landing a { text-decoration: none; cursor: pointer; }
.wf-title, .wf-h2, .wf-step-n, .wf-big, .wf-proof strong, .wf-final strong, .wf-float-title, .wf-foot-brand, .wf-brand { font-family: "Archivo", "Arial Narrow", sans-serif; font-stretch: 86%; }
.wf-hero { position: relative; overflow: hidden; background: #111; color: #fff; }
.wf-hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 35%; }
.wf-hero-shade { position: relative; min-height: 640px; display: flex; flex-direction: column; padding: 22px 48px 56px;
  background: linear-gradient(90deg, rgba(12,14,18,.88) 0%, rgba(12,14,18,.55) 55%, rgba(12,14,18,.15) 100%); }
.wf-nav { display: flex; justify-content: space-between; align-items: center; gap: 16px; max-width: 1280px; width: 100%; margin: 0 auto; }
.wf-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; letter-spacing: .08em; color: #fff; }
.wf-brand .fz-mark { color: #fff; }
.wf-nav-links { display: flex; align-items: center; gap: 24px; }
.wf-nav-link { color: #e8e8e8; font-size: 14px; font-weight: 600; }
.wf-nav-link:hover { color: #fff; }
.wf-btn-outline { color: #fff; font-size: 14px; font-weight: 700; border: 1px solid rgba(255,255,255,.5); padding: 9px 14px; border-radius: 8px; }
.wf-btn-outline:hover { background: rgba(255,255,255,.1); }
.wf-hero-body { flex: 1; display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; margin: 80px auto 0; max-width: 1280px; width: 100%; }
.wf-hero-text { max-width: 620px; display: grid; gap: 18px; }
.wf-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #ff8a3d; }
.wf-title { font-size: 60px; line-height: 1.02; font-weight: 800; letter-spacing: -0.02em; margin: 0; text-wrap: balance; color: #fff; }
.wf-lead { font-size: 18px; line-height: 1.5; color: #e2e4e8; margin: 0; }
.wf-cta-row { display: flex; gap: 12px; flex-wrap: wrap; }
.wf-btn { display: inline-flex; align-items: center; justify-content: center; background: var(--wf-or); color: #fff; font-weight: 700; font-size: 15px; padding: 14px 20px; border-radius: 8px; transition: filter .15s; }
.wf-btn:hover { filter: brightness(1.07); }
.wf-btn-light { display: inline-flex; align-items: center; background: rgba(255,255,255,.12); color: #fff; font-weight: 700; font-size: 15px; padding: 14px 20px; border-radius: 8px; border: 1px solid rgba(255,255,255,.35); }
.wf-btn:focus-visible, .wf-btn-light:focus-visible, .wf-btn-outline:focus-visible, .wf-nav-link:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.wf-fineprint { font-size: 12.5px; color: rgba(255,255,255,.7); }
.wf-float { background: #fff; color: var(--wf-ink); border-radius: 12px; padding: 16px; width: 290px; flex: none; display: grid; gap: 10px; box-shadow: 0 18px 40px rgba(0,0,0,.35); }
.wf-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.wf-tag { font-size: 11px; font-weight: 700; background: #fde8da; color: #b4480b; padding: 4px 8px; border-radius: 999px; }
.wf-mono { font: 700 13px "JetBrains Mono", ui-monospace, monospace; }
.wf-float-title { font-size: 20px; font-weight: 800; }
.wf-bars { display: flex; align-items: flex-end; gap: 2px; height: 56px; }
.wf-bars i { flex: 1; border-radius: 3px 3px 0 0; }
.wf-small { font-size: 12px; color: var(--wf-ink-2); }
.wf-proof { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--wf-soft); border-bottom: 1px solid var(--wf-line); }
.wf-proof > div { padding: 22px 32px; border-left: 1px solid var(--wf-line); display: grid; gap: 4px; }
.wf-proof > div:first-child { border-left: 0; }
.wf-proof strong { font-size: 22px; font-weight: 800; }
.wf-proof span { font-size: 13px; color: var(--wf-ink-2); }
.wf-sec { padding: 64px 48px; display: grid; gap: 18px; max-width: 1280px; margin: 0 auto; box-sizing: border-box; }
.wf-sec-alt { max-width: none; background: var(--wf-soft); }
.wf-sec-alt > * { max-width: 1184px; width: 100%; margin-left: auto; margin-right: auto; }
.wf-eyebrow-dark { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--wf-or-ink); }
.wf-h2 { font-size: 36px; line-height: 1.1; font-weight: 800; letter-spacing: -0.01em; margin: 0; max-width: 720px; text-wrap: balance; color: var(--wf-ink); }
.wf-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 14px; }
.wf-step { display: grid; gap: 8px; align-content: start; border-top: 2px solid var(--wf-ink); padding-top: 16px; }
.wf-step-n { font-size: 44px; font-weight: 800; line-height: 1; color: var(--wf-or); }
.wf-step h3 { margin: 0; font-size: 17px; }
.wf-step p, .wf-card p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--wf-ink-2); }
.wf-cards { display: grid; grid-template-columns: 1fr 1.3fr 1fr; gap: 18px; margin-top: 14px; align-items: start; }
.wf-card { background: #fff; border: 1px solid var(--wf-line); border-radius: 12px; padding: 20px; display: grid; gap: 12px; }
.wf-lbl { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--wf-ink-2); }
.wf-big { font-size: 52px; font-weight: 800; line-height: 1; }
.wf-big small { font-size: 18px; color: var(--wf-ink-3); }
.wf-gauge { position: relative; height: 10px; border-radius: 999px; background: linear-gradient(90deg, #e5484d 0%, #f2994a 30%, #22c55e 55%, #3b82f6 100%); }
.wf-gauge i { position: absolute; top: -4px; width: 4px; height: 18px; margin-left: -2px; background: var(--wf-ink); border-radius: 2px; }
.wf-day { display: flex; align-items: center; gap: 12px; }
.wf-day-l { width: 34px; font-size: 13px; font-weight: 700; color: var(--wf-ink-2); }
.wf-pill { font-size: 13px; font-weight: 700; padding: 6px 10px; border-radius: 6px; color: #fff; }
.wf-pill-rest { background: #eceae4; color: var(--wf-ink-2); }
.wf-note { font-size: 17px; font-weight: 800; }
.wf-undo { justify-self: start; font-size: 13px; font-weight: 700; color: var(--wf-or-ink); border: 1px solid #f2c3a3; border-radius: 8px; padding: 8px 12px; }
.wf-final-wrap { padding: 0 48px 64px; }
.wf-final { max-width: 1184px; margin: 0 auto; background: var(--wf-ink); color: #fff; border-radius: 12px; padding: 28px 32px; display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.wf-final strong { font-size: 26px; font-weight: 800; }
.wf-foot { border-top: 1px solid var(--wf-line); padding: 24px 48px 36px; display: grid; grid-template-columns: auto 1fr; gap: 12px 24px; align-items: center; }
.wf-foot-brand { font-weight: 800; letter-spacing: .08em; }
.wf-foot .auth-footer-links { justify-self: end; }
.wf-foot .auth-footer-links a { color: var(--wf-ink-3); }
.wf-disclaimer { grid-column: 1 / -1; margin: 0; font-size: 12px; line-height: 1.6; color: var(--wf-ink-3); }

/* Bloc inscription/connexion dans la page claire */
.fz-auth { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; max-width: 1184px; margin: 0 auto; padding: 64px 48px; }
.wf-auth-lead { font-size: 16px; line-height: 1.6; color: var(--wf-ink-2); margin: 12px 0 26px; }
.fz-points { list-style: none; padding: 0; margin: 0 0 26px; display: grid; gap: 14px; }
.fz-points li { display: flex; gap: 14px; align-items: flex-start; }
.fz-point-icon { width: 38px; height: 38px; border-radius: 10px; background: var(--wf-soft); border: 1px solid var(--wf-line); display: grid; place-items: center; flex: none; }
.fz-points b { display: block; color: var(--wf-ink); font-size: 15px; margin-bottom: 2px; }
.fz-points span { color: var(--wf-ink-2); font-size: 14px; line-height: 1.5; }
.fz-connectors .connector-badges-label { color: var(--wf-ink-3); }
.fz-auth-card-wrap { padding: 0; min-height: 0; background: transparent; }
.fz-auth-card { background: #fff; border: 1px solid var(--wf-line); color: var(--wf-ink); box-shadow: 0 24px 60px -30px rgba(23,23,26,.35); }
.fz-auth-card h1, .fz-auth-card h2, .fz-auth-card label, .fz-auth-card .checkbox-row { color: var(--wf-ink); }
.fz-auth-card .tag, .fz-auth-card .hint, .fz-auth-card .auth-toggle, .fz-auth-card .auth-legal-note, .fz-auth-card p { color: var(--wf-ink-2); }
.fz-auth-card input, .fz-auth-card select, .fz-auth-card textarea { background: #fff; color: var(--wf-ink); border-color: var(--wf-line); }
.fz-auth-card input:focus { border-color: var(--wf-or); }
.fz-auth-card a { color: var(--wf-or-ink); }
.fz-auth-card .metric-toggle-option { background: #fff; border-color: var(--wf-line); color: var(--wf-ink); }
.fz-auth-card .metric-toggle-option.selected { border-color: var(--wf-or); background: #fff4ec; }
.fz-auth-card .hint { background: var(--wf-soft); border-color: var(--wf-line); }
.fz-auth-card .error-box { background: #fde6e6; border-color: #f0b4b4; color: #9b2c2c; }
.fz-auth-card .btn:not(.fz-google-btn) { background: var(--wf-or); color: #fff; }
.fz-or { display: flex; align-items: center; gap: 12px; margin: 18px 0 12px; color: var(--wf-ink-3); font-size: 12px; text-transform: uppercase; letter-spacing: 2px; }
.fz-or::before, .fz-or::after { content: ""; flex: 1; height: 1px; background: var(--wf-line); }
.fz-google-btn { background: #fff !important; color: #1f2430 !important; border: 1px solid #d5d9e2 !important; display: inline-flex; align-items: center; justify-content: center; gap: 10px; box-shadow: none !important; }
.fz-google-btn:hover { background: #f3f4f7 !important; }

@media (max-width: 991px) {
  .wf-hero-body { flex-direction: column; align-items: flex-start; }
  .wf-title { font-size: 46px; }
  .wf-cards { grid-template-columns: 1fr; }
  .fz-auth { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 767px) {
  .wf-hero-shade { min-height: 0; padding: 16px 16px 28px; }
  .wf-nav-link { display: none; }
  .wf-hero-body { margin-top: 40px; gap: 24px; align-items: stretch; }
  .wf-title { font-size: 36px; }
  .wf-lead { font-size: 15px; }
  .wf-float { width: auto; }
  .wf-proof { grid-template-columns: 1fr 1fr; }
  .wf-proof > div { padding: 14px 16px; border-left: 0; border-top: 1px solid var(--wf-line); }
  .wf-proof strong { font-size: 18px; }
  .wf-sec, .fz-auth { padding: 40px 16px; }
  .wf-h2 { font-size: 26px; }
  .wf-steps { grid-template-columns: 1fr; gap: 22px; }
  .wf-final-wrap { padding: 0 16px 40px; }
  .wf-final strong { font-size: 20px; }
  .wf-foot { grid-template-columns: 1fr; padding: 20px 16px 28px; }
  .wf-foot .auth-footer-links { justify-self: start; flex-wrap: wrap; }
}

/* ---- Jauge Forme (Accueil) ---- */
.form-gauge { margin-top: 12px; }
.form-gauge-track { position: relative; height: 12px; border-radius: 8px; background: linear-gradient(90deg, #f43f5e 0%, #f59e0b 35%, #22c55e 55%, #38bdf8 80%, #94a3b8 100%); opacity: .9; }
.form-gauge-track::after { content: ""; position: absolute; left: 50%; top: -3px; width: 2px; height: 18px; background: var(--text-faint); }
.form-gauge-needle { position: absolute; top: -6px; width: 6px; height: 24px; border-radius: 3px; background: #111; border: 2px solid #fff; transform: translateX(-50%); box-shadow: 0 2px 6px rgba(0,0,0,.35); transition: left .5s ease; }
.form-gauge-scale { display: flex; justify-content: space-between; font-size: 10px; color: var(--text-faint); margin-top: 6px; text-transform: uppercase; letter-spacing: .5px; }
.form-gauge-label { text-align: center; font-weight: 700; font-size: 13px; margin-top: 4px; }

/* ---- Jauge Forme mise en avant (Accueil, façon Nolio) ---- */
@media (max-width: 520px) {
  }

/* Bandeau de suivi des 2 étapes de démarrage (email de bienvenue) — présent sur tous les
   onglets sauf l'Accueil, qui a sa propre section "Bien démarrer" détaillée. */
.onb-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  padding: 12px 16px;
  border: 1px solid var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--accent-soft), var(--panel));
}
.onb-banner-main { display: flex; align-items: center; gap: 14px; flex: 1 1 320px; min-width: 0; }
.onb-progress {
  display: grid;
  place-items: center;
  min-width: 44px;
  height: 30px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--border);
  font-weight: 700;
  font-size: 13px;
}
.onb-steps { display: flex; gap: 10px; flex-wrap: wrap; min-width: 0; }
.onb-step {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 12px 7px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms var(--ease), transform 160ms var(--ease);
}
.onb-step:hover { transform: translateY(-1px); border-color: var(--border-strong); }
.onb-step.current { border-color: var(--accent); }
.onb-step.done { border-color: var(--accent-2); opacity: .75; }
.onb-step-num {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--panel-2);
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 700;
}
.onb-step.current .onb-step-num { background: var(--accent-soft); color: var(--accent); }
.onb-step.done .onb-step-num { background: var(--accent-2-soft); color: var(--accent-2); }
.onb-step-label { display: flex; flex-direction: column; gap: 2px; font-size: 13px; font-weight: 600; min-width: 0; }
.onb-step-label small { color: var(--text-dim); font-size: 11px; font-weight: 400; }

@media (max-width: 720px) {
  .onb-banner { padding: 12px; }
  .onb-banner-main { flex: 1 1 100%; align-items: flex-start; }
  .onb-steps { flex-direction: column; width: 100%; }
  .onb-step { width: 100%; }
  .onb-banner > .btn { width: 100%; }
}

/* Code couleur des zones (fixe, par NUMÉRO de zone) : Z1 gris, Z2 bleu, Z3 vert, Z4 orange,
   Z5 rouge, Z6 rose, Z7 violet. En fréquence cardiaque il n'y a que 5 paliers → on s'arrête
   au rouge. Pastille affichée dans les éditeurs de zones pour que le repère soit explicite. */
.zone-chip {
  flex: none;
  min-width: 30px;
  padding: 2px 7px;
  border-radius: 999px;
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .04em;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .35);
}


/* ---- Zones avec valeurs concrètes ---- */
.zone-profile-card { margin-top: 16px; }
.zone-editor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 15px;
}
.zone-editor-head h3 { margin: 0 0 4px; }
.zone-editor-head p { max-width: 650px; margin: 0; color: var(--text-dim); font-size: 12px; line-height: 1.45; }
.zone-mode-tabs {
  display: flex;
  flex: none;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--panel-2);
}
.zone-mode-tabs button {
  padding: 8px 11px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-dim);
  font: inherit;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
}
.zone-mode-tabs button.active { background: var(--panel); color: var(--accent); box-shadow: var(--shadow-sm); }
.zone-reference-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
  padding: 11px 13px;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--border));
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
}
.zone-reference-banner > div { display: flex; flex-direction: column; gap: 3px; }
.zone-reference-banner strong { font-size: 12.5px; }
.zone-reference-banner span { color: var(--text-dim); font-size: 11.5px; }
.zone-editor-column-head {
  display: grid;
  grid-template-columns: minmax(230px, 1fr) minmax(330px, .8fr);
  gap: 16px;
  padding: 0 10px 7px 52px;
  color: var(--text-faint);
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.zone-value-row { display: grid; grid-template-columns: 42px minmax(220px, 1fr) minmax(330px, .8fr) auto; gap: 10px; padding: 11px 0; }
.zone-value-row .zone-chip { align-self: center; }
.zone-editor-values { display: flex; align-items: center; justify-content: space-between; gap: 13px; }
.zone-editor-percent-controls { display: flex; align-items: center; gap: 6px; color: var(--text-dim); font-size: 11.5px; }
.zone-exact-range {
  min-width: 155px;
  padding: 7px 10px;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}
.zone-editor-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; }
@media (max-width: 900px) {
  .zone-editor-head { flex-direction: column; }
  .zone-mode-tabs { width: 100%; }
  .zone-mode-tabs button { flex: 1; }
  .zone-editor-column-head { display: none; }
  .zone-value-row { grid-template-columns: 40px 1fr auto; }
  .zone-value-row .zone-editor-values { grid-column: 2 / -1; }
}
@media (max-width: 600px) {
  .zone-mode-tabs { flex-direction: column; }
  .zone-value-row { grid-template-columns: 38px minmax(0, 1fr) auto; }
  .zone-editor-values { align-items: stretch; flex-direction: column; }
  .zone-editor-percent-controls { justify-content: space-between; }
  .zone-exact-range { width: 100%; }
  .zone-editor-actions { align-items: stretch; flex-direction: column-reverse; }
  .zone-editor-actions .btn { width: 100%; }
}



/* Le débrief de séance est un résultat métier, pas une publicité pour l'IA. */
.session-auto-debrief {
  margin-top: 14px; padding: 16px 18px;
  border: 1px solid rgba(60, 207, 160, .38);
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--accent-2-soft), var(--panel));
}
.session-auto-debrief-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.session-auto-debrief-head > div { display: grid; gap: 3px; }
.session-auto-debrief-head strong { font-size: 15px; }
.debrief-free-badge {
  flex: 0 0 auto; padding: 4px 9px; border-radius: 999px;
  background: var(--accent-2-soft); color: var(--accent-2);
  border: 1px solid rgba(60, 207, 160, .35); font-size: 11px; font-weight: 800;
}
.session-auto-debrief-text { margin: 12px 0 0; line-height: 1.6; }
.session-auto-debrief-source { margin: 10px 0 0; color: var(--text-faint); font-size: 11px; }
.session-auto-debrief .btn { margin-top: 4px; }

@media (max-width: 720px) {
  .session-auto-debrief { padding: 14px; }
}


/* Centre email : sépare clairement messages transactionnels, marketing facultatif et push. */
.email-status-row {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--panel-2);
}
.email-status-row p { margin: 4px 0 0; }
.email-consent-box, .push-device-box {
  margin-top: 14px; padding: 14px 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--panel-2);
}
.email-consent-box { border-color: rgba(77, 163, 255, .32); }
.email-consent-box small { color: var(--text-dim); line-height: 1.45; }
.push-device-box p { margin: 5px 0 10px; }
@media (max-width: 620px) {
  .email-status-row { align-items: flex-start; flex-direction: column; }
}


.email-verification-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  margin-bottom: 18px; padding: 13px 16px;
  border: 1px solid rgba(242, 179, 61, .4); border-radius: var(--radius-sm);
  background: var(--warn-soft);
}
.email-verification-banner > div { display: grid; gap: 3px; }
.email-verification-banner span { color: var(--text-dim); font-size: 12px; }
@media (max-width: 620px) {
  .email-verification-banner { align-items: flex-start; flex-direction: column; }
}


/* ---- Onboarding guidé ---- */

.first-profile-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow-y: auto;
  background: rgba(8, 9, 13, .78);
  backdrop-filter: blur(10px);
}
.first-profile-dialog {
  width: min(680px, 100%);
  padding: 38px;
  border: 1px solid var(--border-strong);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: 0 32px 100px rgba(0, 0, 0, .45);
  text-align: center;
}
.first-profile-kicker {
  margin-bottom: 16px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.first-profile-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--border));
  border-radius: 20px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 32px;
}
.first-profile-dialog h2 { margin: 0 0 12px; font: 800 clamp(25px, 4vw, 34px) "Manrope", sans-serif; }
.first-profile-dialog > p { max-width: 570px; margin: 0 auto 24px; color: var(--text-dim); line-height: 1.65; }
.first-profile-benefits {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 24px;
  text-align: left;
}
.first-profile-benefits > div {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel-2);
}
.first-profile-benefits strong { font-size: 12px; }
.first-profile-benefits span { color: var(--text-dim); font-size: 11px; line-height: 1.45; }
.first-profile-start { min-width: 260px; padding: 14px 24px; font-size: 15px; }
.first-profile-dialog > small { display: block; max-width: 500px; margin: 16px auto 0; color: var(--text-faint); line-height: 1.5; }
.profile-setup-locked [data-tab]:not([data-tab="profils"]) { opacity: .56; }

@media (max-width: 680px) {
  .first-profile-overlay { align-items: start; padding: 14px; }
  .first-profile-dialog { padding: 26px 18px; border-radius: 18px; }
  .first-profile-benefits { grid-template-columns: 1fr; }
  .first-profile-start { width: 100%; min-width: 0; }
}


/* ---- Comparaison lisible séance prévue / réalisée ---- */
.planned-actual-comparison {
  margin: 16px 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: linear-gradient(145deg, var(--panel-2), var(--panel));
}
.planned-actual-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 13px;
}
.planned-actual-head > div { display: grid; gap: 3px; }
.planned-actual-head strong { font-family: "Manrope", sans-serif; font-size: 17px; }
.comparison-badge {
  flex: 0 0 auto;
  padding: 5px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel-3);
  color: var(--text-dim);
  font-size: 10.5px;
  font-weight: 800;
}
.comparison-badge.success, .comparison-delta.success { color: var(--accent-2); background: var(--accent-2-soft); border-color: rgba(60, 207, 160, .34); }
.comparison-badge.info, .comparison-delta.info { color: var(--info); background: var(--info-soft); border-color: rgba(77, 163, 255, .34); }
.comparison-badge.warning, .comparison-delta.warning { color: var(--warn); background: var(--warn-soft); border-color: rgba(242, 179, 61, .38); }
.comparison-table { display: grid; gap: 0; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.comparison-table-head,
.comparison-row {
  display: grid;
  grid-template-columns: minmax(110px, 1.25fr) repeat(3, minmax(82px, 1fr));
  align-items: center;
  column-gap: 12px;
}
.comparison-table-head {
  padding: 8px 12px;
  background: var(--panel-3);
  color: var(--text-faint);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.comparison-row {
  position: relative;
  min-height: 56px;
  padding: 10px 12px 15px;
  border-top: 1px solid var(--border);
  font-size: 12.5px;
}
.comparison-row > strong { font-size: 12.5px; }
.comparison-row > span:not(.comparison-meter) { color: var(--text-dim); }
.comparison-delta {
  display: inline-flex;
  width: fit-content;
  padding: 3px 7px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-dim);
  background: var(--panel-3);
  font-size: 10.5px;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}
.comparison-meter {
  position: absolute;
  right: 12px;
  bottom: 7px;
  left: 12px;
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--border);
}
.comparison-meter i {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
  background: var(--accent);
}
.comparison-row.success .comparison-meter i { background: var(--accent-2); }
.comparison-row.info .comparison-meter i { background: var(--info); }
.comparison-row.warning .comparison-meter i { background: var(--warn); }
.comparison-meter b {
  position: absolute;
  top: -2px;
  bottom: -2px;
  left: 66.666%;
  width: 2px;
  background: var(--text);
  opacity: .65;
}
.comparison-help,
.planned-actual-comparison.is-free-activity > p {
  margin: 10px 0 0;
  color: var(--text-faint);
  font-size: 10.5px;
  line-height: 1.5;
}
.session-actual-highlights { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.session-verdict.info { border-left-color: var(--info); background: var(--info-soft); }

@media (max-width: 640px) {
  .planned-actual-comparison { padding: 13px; }
  .planned-actual-head { align-items: flex-start; }
  .comparison-table { gap: 8px; border: 0; overflow: visible; }
  .comparison-table-head { display: none; }
  .comparison-row {
    grid-template-columns: 1fr 1fr;
    gap: 8px 12px;
    min-height: 0;
    padding: 12px 12px 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--panel-2);
  }
  .comparison-row > strong { grid-column: 1 / -1; font-size: 13px; }
  .comparison-row > span:not(.comparison-meter)::before {
    display: block;
    margin-bottom: 2px;
    color: var(--text-faint);
    content: attr(data-label);
    font-size: 8.5px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
  }
  .comparison-row > span:nth-of-type(3) { grid-column: 1 / -1; }
  .comparison-meter { right: 12px; bottom: 7px; left: 12px; }
}


/* ---- Parcours d'entraînement unifié : Profil → Objectifs → Programme ---- */
.training-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}
.training-workflow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}
.training-workflow > * {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--panel);
  color: var(--text);
  font: inherit;
  text-align: left;
}
.training-workflow button { cursor: pointer; }
.training-workflow > *.current { border-color: color-mix(in srgb, var(--accent) 58%, var(--border)); background: var(--accent-soft); }
.training-workflow > *.done { border-color: rgba(60, 207, 160, .34); }
.training-workflow > * > span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--panel-3);
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 800;
}
.training-workflow .done > span { background: var(--accent-2-soft); color: var(--accent-2); }
.training-workflow div div,
.training-workflow button div { display: grid; gap: 2px; min-width: 0; }
.training-workflow strong { font-size: 12.5px; }
.training-workflow small { overflow: hidden; color: var(--text-dim); font-size: 10.5px; text-overflow: ellipsis; white-space: nowrap; }
/* Étape facultative (objectifs sans course) : neutre, jamais l'accent d'une étape à faire. */
.training-workflow > *.optional { border-style: dashed; }
/* Page ouverte : repère net, quel que soit l'état de l'étape. */
.training-workflow > *.is-here { border-width: 2px; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.training-workflow > *.is-here strong { color: var(--accent); }
.program-sports-summary {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.program-sports-summary span {
  padding: 8px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel-2);
  font-size: 12px;
}
.program-duration-option.is-disabled { opacity: .55; cursor: not-allowed; }

/* Tests guidés proposés uniquement quand le repère correspondant manque. */
.profile-test-section { grid-column: 1 / -1; margin-top: 8px; }
.profile-test-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 10px; }
.profile-test-card {
  border: 1px solid color-mix(in srgb, var(--info) 32%, var(--border));
  border-radius: var(--radius-md);
  background: var(--info-soft);
  overflow: hidden;
}
.profile-test-card > summary {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 14px;
  list-style: none;
  cursor: pointer;
}
.profile-test-card > summary::-webkit-details-marker { display: none; }
.profile-test-card > summary > span { font-size: 22px; }
.profile-test-card > summary > div { display: grid; gap: 3px; }
.profile-test-card > summary strong { font-size: 13px; }
.profile-test-card > summary small { color: var(--text-dim); font-size: 10.5px; }
.profile-test-card > p,
.profile-test-card > ol,
.profile-test-card > .test-result-row,
.profile-test-card > .test-safety-note { margin-right: 14px; margin-left: 14px; }
.profile-test-card > ol { padding-left: 20px; color: var(--text-dim); font-size: 11.5px; line-height: 1.6; }
.profile-test-card > p { color: var(--text-dim); font-size: 11.5px; line-height: 1.55; }
.test-result-row {
  display: flex;
  align-items: end;
  gap: 10px;
  margin-top: 12px;
  margin-bottom: 12px;
}
.test-result-row label { display: flex; align-items: center; gap: 6px; color: var(--text-dim); font-size: 11px; }
.test-result-row input { width: 92px; }
.test-safety-note {
  padding: 9px 10px;
  border: 1px solid rgba(242, 179, 61, .4);
  border-radius: var(--radius-sm);
  background: var(--warn-soft);
  color: var(--text-dim);
  font-size: 10.5px;
  line-height: 1.5;
}

/* Les objectifs A/B/C vivent enfin dans la même grille que les séances qu'ils pilotent. */
.cal-goal-chip {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 6px;
  border: 1px solid var(--border);
  border-left-width: 3px;
  border-radius: 6px;
  background: var(--panel);
  color: var(--text);
  font-size: 9px;
  font-weight: 800;
  line-height: 1.25;
}
.cal-goal-chip.priority-a, .calendar-goal-card.priority-a { border-color: var(--danger); }
.cal-goal-chip.priority-b, .calendar-goal-card.priority-b { border-color: var(--warn); }
.cal-goal-chip.priority-c, .calendar-goal-card.priority-c { border-color: var(--info); }
.calendar-goal-card {
  display: grid;
  gap: 5px;
  margin: 12px 0;
  padding: 14px 15px;
  border: 1px solid var(--border);
  border-left-width: 4px;
  border-radius: var(--radius-md);
  background: var(--panel-2);
}
.calendar-goal-card > span { color: var(--text-dim); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.calendar-goal-card > strong { font-size: 15px; }
.calendar-goal-card > small { color: var(--text-dim); line-height: 1.45; }

@media (max-width: 720px) {
  .training-page-head { flex-direction: column; }
  .training-page-head .btn { width: 100%; }
  .training-workflow { grid-template-columns: 1fr; }
  .training-workflow small { white-space: normal; }
  .test-result-row { align-items: stretch; flex-direction: column; }
  .test-result-row label { justify-content: space-between; }
  .test-result-row .btn { width: 100%; }
}


@media (max-width: 1100px) {
  .cal-comparison-layout { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .cal-panel { padding: 11px; }
  .cal-panel-head { flex-direction: column; }
  .cal-panel-summary { align-self: stretch; flex-direction: row; justify-content: space-between; text-align: left; }
  .cal-panel .cal-grid { grid-template-columns: 1fr; }
  .cal-chip small { font-size: 10px; }
}

/* Objectifs enrichis et adaptations explicables */
.season-goal-list { display:grid; gap:10px; margin:14px 0 18px; }
.season-goal-card { align-items:flex-start; gap:16px; }
.goal-editor { padding:18px; border:1px solid var(--border); border-radius:14px; background:var(--surface-soft, #faf8f5); }
.goal-editor .form-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
.inline-actions { display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.plan-unexpected { margin:16px 0; padding:16px; border-radius:14px; border:1px solid var(--border); }
.quick-action-grid { display:flex; flex-wrap:wrap; gap:8px; margin-top:10px; }
.adapt-decision-list { display:grid; gap:10px; padding-left:20px; }
.adapt-decision-list li { padding:10px 0; }
.adapt-decision-list .pill { margin-left:8px; }
@media (max-width: 900px) {
  .goal-editor .form-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width: 560px) {
  .goal-editor .form-grid { grid-template-columns:1fr; }
  .season-goal-card { flex-direction:column; }
  .adapt-decision-list .pill { display:block; width:max-content; margin:6px 0 0; }
}

/* ---- Progrès : graphiques datés lisibles au survol (version 2) ---- */
.stats-summary { display: grid; gap: 12px; }
.stats-summary p { margin: 0; font-size: 14px; color: var(--text); }
.stats-label { font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-dim); }
.stats-nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.stats-nums > div { background: var(--panel-2); border-radius: 10px; padding: 10px 12px; display: grid; gap: 2px; }
.stats-nums .v { font-family: var(--display, inherit); font-stretch: 86%; font-size: 26px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.stats-nums .v.is-good { color: var(--accent-2); }
.stats-nums .v.is-bad { color: var(--danger); }
.stats-nums .n { font-size: 12px; color: var(--text-dim); }
.stats-card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.stats-hint { font-size: 12px; color: var(--text-faint); }
.stats-pill { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--panel-2); color: var(--text-dim); }
.stats-explain { background: var(--panel-2); border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; font-size: 13px; line-height: 1.5; color: var(--text-dim); display: grid; gap: 4px; }
.stats-explain b { color: var(--text); }
.stats-note { margin: 8px 0 0; font-size: 13px; line-height: 1.5; color: var(--text-dim); }
.stats-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.stats-grid-2 > .card { margin-bottom: 0; }
.stats-grid-2 { margin-bottom: 16px; }
.stats-hover-chart { position: relative; touch-action: pan-y; }
.stats-hover-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.stats-hover-chart .chart-axis { font-size: 11px; fill: var(--text-faint); }
.stats-hover-chart .chart-axis-strong { font-weight: 700; fill: var(--text-dim); }
.stats-hover-chart .chart-grid { stroke: var(--border); stroke-width: 1; }
.stats-hover-chart .chart-zero { stroke: var(--text-faint); stroke-dasharray: 3 3; }
.stats-hover-chart .chart-limit { stroke: #e5484d; }
.stats-hover-chart .chart-hit { fill: transparent; cursor: crosshair; }
.stats-hover-chart .chart-guide { stroke: var(--text); stroke-width: 1; opacity: 0; pointer-events: none; }
.stats-hover-chart .chart-dot { opacity: 0; pointer-events: none; stroke: var(--panel); stroke-width: 2; }
.stats-hover-chart.is-hover .chart-guide, .stats-hover-chart.is-hover .chart-dot { opacity: 1; }
.stats-hover-chart .chart-week { opacity: .85; }
.stats-hover-chart .chart-week.is-hot { opacity: 1; }
.chart-tip { position: absolute; top: 4px; left: 0; z-index: 5; pointer-events: none; transform: translateX(-50%); opacity: 0; background: #17171a; color: #fff; border-radius: 8px; padding: 8px 10px; font-size: 12px; line-height: 1.45; white-space: nowrap; box-shadow: 0 8px 20px -8px rgba(0,0,0,.4); }
.stats-hover-chart.is-hover .chart-tip { opacity: 1; }
.chart-tip i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }
.chart-tip .dim { color: rgba(255,255,255,.65); }
.chart-legend { flex-wrap: wrap; }
.chart-legend-dash { background: none !important; border-top: 1.5px dashed #e5484d; height: 0 !important; width: 14px !important; vertical-align: 3px !important; }
.chart-legend-outline { background: none !important; border: 1.5px dashed #3b82f6; }
@media (max-width: 860px) {
  .stats-grid-2 { grid-template-columns: 1fr; }
  .stats-nums .v { font-size: 22px; }
}

/* ---- Aujourd'hui : direction « Coach clair » (version 2) ---- */
.home-head { display: grid; gap: 2px; margin-bottom: 18px; }
.home-head .subtitle { margin: 0; text-transform: none; }
.home-head .subtitle::first-letter { text-transform: uppercase; }
.home-head h2 { margin: 0; }
.home-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; margin-bottom: 16px; }
.home-col { display: grid; gap: 16px; min-width: 0; }
.home-col > .card, .home-col > .today-card { margin-bottom: 0; }
.home-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.home-label { font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-dim); }
.home-link { color: var(--accent); font-size: 13px; font-weight: 700; cursor: pointer; text-decoration: none; }
.home-verdict { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 18px; display: grid; gap: 10px; }
.home-verdict-word { font-family: var(--display); font-stretch: 86%; font-size: 36px; line-height: 1; font-weight: 800; letter-spacing: -0.01em; }
.home-verdict.tone-0 .home-verdict-word { color: var(--danger); }
.home-verdict.tone-3 .home-verdict-word, .home-verdict.tone-4 .home-verdict-word { color: var(--accent-2); }
.home-verdict p { margin: 0; color: var(--text-dim); font-size: 14px; line-height: 1.5; }
.home-scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.home-scale i { height: 8px; border-radius: 4px; background: var(--panel-3); }
.home-scale i:nth-child(1).on { background: #e5484d; }
.home-scale i:nth-child(2).on { background: #f2994a; }
.home-scale i:nth-child(3).on { background: #8d8a84; }
.home-scale i:nth-child(4).on, .home-scale i:nth-child(5).on { background: var(--accent-2); }
.home-scale-ends { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--text-faint); margin-top: -4px; }
.home-numbers { border-top: 1px solid var(--border); padding-top: 8px; }
.home-numbers > summary { cursor: pointer; font-size: 13px; font-weight: 700; color: var(--text-dim); list-style: none; }
.home-numbers > summary::-webkit-details-marker { display: none; }
.home-numbers > summary::after { content: " ?"; color: var(--text-faint); }
.home-numbers-row { display: flex; gap: 16px; flex-wrap: wrap; margin: 10px 0 8px; font-size: 13px; color: var(--text-dim); }
.home-numbers-row b { color: var(--text); font-size: 16px; }
.home-today { display: grid; gap: 10px; }
.home-today-title { font-family: var(--display); font-stretch: 86%; font-size: 28px; line-height: 1.05; font-weight: 800; }
.home-today-meta { font-size: 13.5px; color: var(--text-dim); }
.home-today-btn { justify-self: start; }
.home-pill { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); white-space: nowrap; }
.home-pill.is-done { background: var(--accent-2-soft); color: var(--accent-2); }
.home-upcoming { display: grid; gap: 4px; }
.home-upcoming-item { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--border); cursor: pointer; font-size: 14px; }
.home-upcoming-item:first-of-type { border-top: 0; }
.home-upcoming-item:hover .home-upcoming-text b { color: var(--accent); }
.home-upcoming-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-upcoming-dur { color: var(--text-faint); font-size: 13px; font-variant-numeric: tabular-nums; }
.home-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.home-dot.sport-velo { background: #3b82f6; }
.home-dot.sport-course { background: #f2994a; }
.home-dot.sport-natation { background: #06b6d4; }
.home-dot.sport-musculation { background: #17171a; }
.home-race { display: grid; gap: 6px; }
.home-banner { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: var(--panel); border: 1px solid var(--border); border-left: 4px solid #e8a33d; border-radius: 10px; padding: 12px 14px; margin-bottom: 16px; font-size: 14px; }
.home-details { margin-bottom: 16px; }
.home-details > summary { cursor: pointer; font-weight: 700; color: var(--text-dim); padding: 10px 0; }
@media (max-width: 860px) {
  /* Sur téléphone, ordre de la maquette : verdict, séance du jour, à venir. */
  .home-grid { display: flex; flex-direction: column; }
  .home-col { display: contents; }
  .home-verdict { order: 1; }
  .home-today, .home-col > .today-card { order: 2; }
  .home-upcoming { order: 3; }
  .home-race { order: 4; }
  .home-verdict-word { font-size: 30px; }
  .home-today-title { font-size: 24px; }
  .home-banner { flex-direction: column; align-items: flex-start; }
}
.home-pill.is-rest { background: var(--panel-2); color: var(--text-dim); }

/* ---- Calendrier version 2 : prévu et réalisé au même endroit ---- */
.cal-kicker { display: block; margin: 0; }
.cal-chip[style*="--chip"] { background: var(--chip); }
.cal-chip-v2 { font-size: 11.5px; padding: 5px 7px; border-radius: 6px; flex-direction: column; align-items: flex-start; gap: 1px; white-space: normal; line-height: 1.15; font-weight: 700; }
.cal-chip-v2 .cal-chip-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.cal-chip-v2 small { margin-left: 0; font-size: 10.5px; font-weight: 500; opacity: .9; }
.cal-chip-v2.is-free { background: #e9e3d7; color: #4a4439; }
.cal-chip-v2.realisee .cal-chip-icon::after { content: none; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin: 0 0 12px; font-size: 12px; color: var(--text-dim); }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cal-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.cal-legend i.is-free { background: #e9e3d7; }
.cal-mark { font-weight: 800; font-size: 12px; }
.cal-mark.ok { color: var(--accent-2); }
.cal-mark.ko { color: var(--danger); }
.cal-panel-tout { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 14px; }
.cal-grid-v2 { margin-bottom: 0; gap: 6px; grid-template-columns: repeat(7, minmax(0, 1fr)) 104px; }
.cal-cell-v2 { min-height: 104px; border-color: var(--border); background: var(--panel); }
.cal-cell-v2 .cal-daynum { display: flex; justify-content: space-between; align-items: center; }
.cal-cell-v2.today { border: 2px solid var(--accent); box-shadow: none; background: var(--accent-soft); padding: 6px; }
.cal-cell-v2.outside-month { opacity: 1; background: var(--panel-2); }
.cal-cell-v2.outside-month .cal-daynum { color: var(--text-faint); }
.cal-panel-tout .cal-total-cell { background: var(--panel-2); border: 0; align-items: flex-start; padding: 8px; }
.cal-panel-tout .cal-total-value { color: var(--text); font-size: 13px; }
.cal-agenda { display: none; }
.cal-agenda-week { border-top: 1px solid var(--border); padding: 10px 0 4px; }
.cal-agenda-week:first-child { border-top: 0; padding-top: 0; }
.cal-agenda-head { display: flex; justify-content: space-between; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 6px; }
.cal-agenda-head b { letter-spacing: 0; text-transform: none; color: var(--text); }
.cal-agenda-day { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 0; cursor: pointer; }
.cal-agenda-date { display: grid; font-size: 11px; color: var(--text-faint); text-transform: uppercase; line-height: 1.1; }
.cal-agenda-date b { font-size: 20px; color: var(--text); font-family: var(--display); font-stretch: 86%; }
.cal-agenda-day.today .cal-agenda-date, .cal-agenda-day.today .cal-agenda-date b { color: var(--accent); }
.cal-agenda-items { display: grid; gap: 4px; }
.cal-agenda-items .cal-chip-v2 { flex-direction: row; justify-content: space-between; align-items: center; font-size: 13px; padding: 7px 10px; }
@media (max-width: 860px) {
  .cal-panel-tout .cal-grid-v2 { display: none; }
  .cal-panel-tout .cal-agenda { display: block; }
  .cal-panel-tout { padding: 12px; }
}

/* ---- Mon programme version 2 ---- */
.training-page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.plan-v2-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 16px; align-items: start; margin-bottom: 18px; }
.plan-v2-col { display: grid; gap: 16px; min-width: 0; }
.plan-v2-col > .card, .plan-v2-col > details { margin-bottom: 0; }
.plan-label { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 10px; }
.plan-week-list { display: grid; }
.plan-week-row { display: grid; gap: 8px; padding: 11px 0; border-top: 1px solid var(--border); }
.plan-week-row:first-child { border-top: 0; padding-top: 0; }
.plan-week-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 14px; }
.plan-week-head span { color: var(--text-dim); font-size: 13px; }
.plan-week-row.is-current .plan-week-head span { color: var(--accent); font-weight: 700; }
.plan-week-strip { display: flex; gap: 3px; height: 24px; }
.plan-week-strip i { border-radius: 4px; opacity: .55; min-width: 6px; }
.plan-week-strip i.is-done { opacity: 1; }
.plan-week-legend { margin: 8px 0 12px; }
.plan-unexpected .quick-action-grid { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.plan-unexpected .quick-action-grid .btn { border-radius: 999px; }
.plan-unexpected .meta { margin: 0; }
.plan-summary-card { display: grid; gap: 12px; }
.plan-summary-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.plan-summary-head .plan-label { margin: 0; }
.plan-status-pill { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--accent-2-soft); color: var(--accent-2); }
.plan-period { font-family: var(--display); font-stretch: 86%; font-size: 24px; font-weight: 800; line-height: 1.1; }
.plan-summary-card .plan-overview-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; }
.plan-summary-card .plan-overview-grid > div { background: var(--panel-2); border-radius: 10px; padding: 10px 12px; display: grid; gap: 2px; border: 0; }
.plan-summary-card .plan-overview-grid strong { font-family: var(--display); font-stretch: 86%; font-size: 24px; line-height: 1; }
.plan-summary-card .plan-overview-grid span { font-size: 12px; color: var(--text-dim); }
.plan-progress-line { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-dim); }
.plan-progress-line b { color: var(--text); }
.plan-progress { height: 8px; border-radius: 999px; background: var(--panel-3); overflow: hidden; }
.plan-progress i { display: block; height: 100%; background: var(--accent-2); border-radius: 999px; }
.plan-adjust-btn { width: 100%; }
@media (max-width: 860px) {
  .plan-v2-grid { display: flex; flex-direction: column; }
  .plan-v2-col { display: contents; }
  .plan-summary-card { order: 1; }
  .plan-weeks-card { order: 2; }
  .plan-unexpected { order: 3; }
  .plan-v2-col > details { order: 4; }
}

/* ---- Créer un programme version 2 ---- */
.program-builder-head h3 { font-family: var(--display); font-stretch: 86%; font-size: 26px; margin: 0 0 4px; }
.program-builder-head .plan-label { margin-bottom: 4px; }
.builder-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.builder-steps { display: grid; gap: 14px; min-width: 0; }
.builder-step { border: 1px solid var(--border); border-radius: var(--radius-md); padding: 14px; margin: 0; min-width: 0; background: var(--panel); }
.builder-step legend.plan-label { padding: 0 4px; margin-bottom: 6px; }
.builder-step .program-duration-grid { grid-template-columns: 1fr; gap: 8px; }
.builder-sport { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); }
.builder-sport small { display: block; color: var(--text-dim); font-size: 12.5px; }
.builder-check { width: 20px; height: 20px; border-radius: 5px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 800; display: grid; place-items: center; }
.btn-link { background: none; border: 0; padding: 6px 0; color: var(--accent); font-weight: 700; font-size: 13px; cursor: pointer; text-align: left; }
.btn-link:hover { text-decoration: underline; }
.builder-rules { list-style: none; margin: 0; padding: 0; display: grid; }
.builder-rules li { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--border); font-size: 14px; }
.builder-rules li:first-child { border-top: 0; }
.builder-rules li::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--accent-2); flex: none; }
.builder-recap { position: sticky; top: 16px; border: 1px solid var(--border); border-radius: var(--radius-md); padding: 16px; display: grid; gap: 10px; background: var(--panel-2); }
.builder-recap .plan-label { margin: 0; }
.builder-recap-title { font-family: var(--display); font-stretch: 86%; font-size: 22px; line-height: 1.15; }
.builder-recap p { margin: 0; color: var(--text-dim); font-size: 13.5px; line-height: 1.5; }
.builder-recap .program-generate-btn { width: 100%; }
@media (max-width: 860px) {
  .builder-grid { grid-template-columns: 1fr; }
  .builder-recap { position: static; }
}

/* ---- Détail de séance version 2 ---- */
.session-detail-v2 { display: grid; gap: 14px; }
.session-v2-head { display: grid; gap: 4px; padding-right: 36px; }
.session-v2-kicker { font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-dim); }
.session-v2-title-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.session-v2-title { margin: 0; font-family: var(--display); font-stretch: 86%; font-size: 30px; line-height: 1.02; font-weight: 800; }
.session-v2-pill { font-size: 13px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); white-space: nowrap; }
.session-v2-pill.is-done { background: var(--accent-2-soft); color: var(--accent-2); }
.session-detail-v2 .session-verdict { margin: 0; }
.session-detail-v2 .session-verdict .eyebrow { display: block; margin-bottom: 2px; }
.session-effort { display: grid; gap: 8px; }
.session-effort-scale { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
.session-effort-scale span { text-align: center; padding: 9px 2px; border-radius: 8px; background: var(--panel-2); color: var(--text-dim); font-size: 12px; }
.session-effort-scale span.on { background: var(--text); color: var(--bg); font-weight: 700; }
.session-v2-actions { display: grid; gap: 10px; padding-top: 12px; border-top: 1px solid var(--border); }
.session-v2-actions > .btn { width: 100%; }
.session-v2-export { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; color: var(--text-dim); }
.session-v2-export span { margin-right: 4px; }
.session-v2-delete { color: var(--danger); justify-self: center; }
@media (max-width: 520px) {
  .session-v2-title { font-size: 24px; }
  .session-effort-scale span { font-size: 10.5px; }
}

/* ---- Bibliothèque version 2 ---- */
.library-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; align-items: start; margin-bottom: 18px; }
.library-col { display: grid; gap: 16px; min-width: 0; }
.library-col > .card { margin-bottom: 0; }
.library-generator { display: grid; gap: 10px; }
.library-generator .plan-label { margin: 0; }
.library-generator textarea { width: 100%; min-height: 84px; resize: vertical; }
.library-generator .btn { justify-self: start; }
.library-generator .meta { margin: 0; }
.library-empty { border: 1px dashed var(--border-strong); border-radius: var(--radius-md); padding: 28px 18px; display: grid; justify-items: center; text-align: center; gap: 8px; background: var(--panel); }
.library-empty strong { font-family: var(--display); font-stretch: 86%; font-size: 22px; }
.library-empty p { margin: 0; color: var(--text-dim); max-width: 38ch; }
.library-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.library-idea { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 10px; align-items: center; width: 100%; padding: 11px 0; background: none; border: 0; border-top: 1px solid var(--border); color: var(--text); font-size: 14px; text-align: left; cursor: pointer; }
.library-idea:first-of-type { border-top: 0; }
.library-idea:hover span:nth-child(2) { color: var(--accent); }
.library-idea small { color: var(--text-faint); font-size: 13px; }
.library-ideas .meta { margin: 8px 0 0; }
.library-list .tpl-row-main { display: flex; gap: 10px; align-items: center; cursor: pointer; min-width: 0; }
@media (max-width: 860px) {
  .library-grid { grid-template-columns: 1fr; }
}

/* ---- Profil version 2 ---- */
.profile-hero { background: #17171a; color: #fff; border-radius: var(--radius-lg); padding: 20px; display: grid; gap: 16px; margin-bottom: 16px; }
.profile-hero-id { display: flex; align-items: center; gap: 14px; }
.profile-hero-avatar { width: 54px; height: 54px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-family: var(--display); font-stretch: 86%; font-size: 20px; font-weight: 800; flex: none; }
.profile-hero-name { font-family: var(--display); font-stretch: 86%; font-size: 24px; font-weight: 800; line-height: 1.1; }
.profile-hero-sub { font-size: 13px; color: #b4b8c0; margin-top: 2px; }
.profile-hero-tags { display: flex; gap: 6px; margin-top: 6px; }
.profile-hero-tags span { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: #2b2e35; color: #e2e4e8; }
.profile-hero-edit { margin-left: auto; align-self: flex-start; background: none; border: 0; color: #ff9a5c; font-weight: 700; font-size: 13px; cursor: pointer; }
.profile-hero-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 1px; background: #2b2e35; border-radius: 10px; overflow: hidden; }
.profile-hero-stats > div { background: #1f2127; padding: 13px 15px; display: grid; gap: 3px; }
.profile-hero-value { font-family: var(--display); font-stretch: 86%; font-size: 28px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.profile-hero-value small { font-size: 15px; color: #b4b8c0; font-weight: 700; }
.profile-hero-label { font-size: 12px; color: #9a9ea6; }
.profile-hero-alert { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; background: #3a2a17; color: #f7d9b5; border-radius: 10px; padding: 11px 14px; font-size: 14px; }
.profile-hero-alert b { color: #fff; }
.profile-overview-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 16px; align-items: start; margin-bottom: 16px; }
.profile-overview-col { display: grid; gap: 16px; min-width: 0; }
.profile-overview-col > .card { margin-bottom: 0; }
.profile-card-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.profile-card-head h3 { margin: 0; font-size: 20px; }
.profile-card-head p { margin: 2px 0 0; color: var(--text-dim); font-size: 13px; }
.profile-ladder-rows { display: grid; gap: 8px; }
.profile-ladder-row { display: grid; grid-template-columns: 34px 130px minmax(0, 1fr) 92px; gap: 10px; align-items: center; font-size: 13.5px; }
.profile-ladder-z { color: #fff; font-size: 11px; font-weight: 800; text-align: center; padding: 5px 0; border-radius: 6px; }
.profile-ladder-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-ladder-track { position: relative; height: 14px; border-radius: 4px; background: var(--panel-2); }
.profile-ladder-track i { position: absolute; top: 0; height: 100%; border-radius: 4px; }
.profile-ladder-track em { position: absolute; top: -4px; width: 2px; height: 22px; background: var(--text); }
.profile-ladder-w { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.profile-ladder .meta { margin: 10px 0 0; }
.profile-week-bars { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.profile-week-day { display: grid; gap: 4px; text-align: center; font-size: 11.5px; color: var(--text-dim); }
.profile-week-day b { color: var(--text); font-size: 12px; white-space: nowrap; }
.profile-week-bar { height: 90px; border-radius: 6px; background: var(--panel-2); display: flex; align-items: flex-end; overflow: hidden; }
.profile-week-bar i { display: block; width: 100%; background: #3b82f6; border-radius: 6px 6px 0 0; }
.profile-week-total { display: flex; justify-content: space-between; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); font-size: 14px; }
.profile-goal { border-left: 4px solid var(--accent); }
.profile-goal-quote { font-family: var(--display); font-stretch: 90%; font-size: 20px; line-height: 1.3; font-weight: 700; margin: 0 0 12px; }
.profile-goal-empty { display: grid; gap: 10px; background: var(--panel-2); border-radius: 10px; padding: 12px; }
.profile-goal-empty b { display: block; }
.profile-goal-empty span { font-size: 13px; color: var(--text-dim); }
.profile-goal-empty .btn { justify-self: start; }
@media (max-width: 860px) {
  .profile-overview-grid { grid-template-columns: 1fr; }
  .profile-ladder-row { grid-template-columns: 30px minmax(0, 1fr) 84px; }
  .profile-ladder-track { display: none; }
}

/* ---- Records version 2 ---- */
.records-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; align-items: start; }
.records-grid > .card { margin-bottom: 0; }
.records-card .plan-label { margin-bottom: 4px; }
.record-v2 { display: grid; gap: 3px; padding: 12px 0; border-top: 1px solid var(--border); justify-items: start; }
.records-card .plan-label + .record-v2 { border-top: 0; }
.record-v2-label { font-size: 13px; color: var(--text-dim); }
.record-v2-value { font-family: var(--display); font-stretch: 84%; font-size: 30px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.record-v2-date { font-size: 12.5px; color: var(--text-faint); }
.record-v2-flag { margin-top: 4px; font-size: 12px; font-weight: 700; color: #8a5a12; background: #fbf0d9; padding: 5px 8px; border-radius: 8px; }

/* ---- Nutrition version 2 ---- */
.nutrition-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.nutrition-col { display: grid; gap: 12px; min-width: 0; }
.nutrition-col > .card { margin-bottom: 0; }
.nutrition-day-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.nutrition-day-nav strong { font-family: var(--display); font-stretch: 86%; font-size: 22px; }
.nutrition-goal-card { display: grid; gap: 10px; position: sticky; top: 16px; }
.nutrition-goal-card .plan-label { margin: 0; }
.nutrition-goal-kcal { font-family: var(--display); font-stretch: 86%; font-size: 34px; font-weight: 800; line-height: 1; }
.nutrition-goal-kcal span { font-family: inherit; font-size: 14px; font-weight: 500; color: var(--text-dim); font-stretch: 100%; }
.nutrition-goal-macros { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13.5px; color: var(--text-dim); }
.nutrition-goal-macros b { color: var(--text); }
.nutrition-goal-card .meta { margin: 0; }
.nutrition-goal-edit { border-top: 1px solid var(--border); padding-top: 10px; }
.nutrition-goal-edit > summary { cursor: pointer; font-weight: 700; color: var(--accent); margin-bottom: 10px; }
@media (max-width: 860px) {
  .nutrition-grid { grid-template-columns: 1fr; }
  .nutrition-goal-card { position: static; }
}

/* ---- Bien-être version 2 ---- */
.wellness-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; margin-bottom: 16px; }
.wellness-grid > .card { margin-bottom: 0; }
.wellness-card-head .plan-label { margin-bottom: 12px; }
.wellness-card form { display: grid; gap: 12px; }
.wellness-card form .field { margin-bottom: 0; }
.wellness-date { max-width: 200px; }
.wellness-numbers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.wellness-scale { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
.wellness-scale label, .note-type-chips label { position: relative; cursor: pointer; }
.wellness-scale input, .note-type-chips input { position: absolute; opacity: 0; pointer-events: none; }
.wellness-scale span { display: block; text-align: center; padding: 9px 2px; border-radius: 8px; background: var(--panel-2); color: var(--text-dim); font-size: 12px; }
.wellness-scale input:checked + span { background: var(--text); color: var(--bg); font-weight: 700; }
.wellness-scale input:focus-visible + span, .note-type-chips input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }
.note-type-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.note-type-chips span { display: inline-block; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--panel); font-size: 13px; }
.note-type-chips input:checked + span { background: var(--text); border-color: var(--text); color: var(--bg); font-weight: 700; }
.wellness-help > summary, .custom-fields-manager > summary { cursor: pointer; font-size: 13px; font-weight: 700; color: var(--text-dim); }
.wellness-help p { margin: 8px 0 0; font-size: 13px; color: var(--text-dim); line-height: 1.5; }
.wellness-list, .wellness-card .notes-list { margin-top: 14px; display: grid; gap: 8px; }
.wellness-card .custom-fields-manager { margin-top: 12px; border-top: 1px solid var(--border); padding-top: 10px; }
@media (max-width: 860px) {
  .wellness-grid { grid-template-columns: 1fr; }
  .wellness-scale span { font-size: 10.5px; }
}

/* ---- Réglages version 2 ---- */
.settings-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 18px; overflow-x: auto; }
.settings-tabs button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 10px 12px; font-size: 14px; font-weight: 700; color: var(--text-dim); cursor: pointer; white-space: nowrap; margin-bottom: -1px; }
.settings-tabs button:hover { color: var(--text); }
.settings-tabs button.is-active { color: var(--text); border-bottom-color: var(--accent); }
.connector-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }

/* ---- Mon entraîneur version 2 ---- */
.coach-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 16px; align-items: start; margin-bottom: 26px; }
.coach-col { display: grid; gap: 16px; min-width: 0; }
.coach-col > .card { margin-bottom: 0; }
.coach-tools { border-top: 1px solid var(--border); padding-top: 22px; }
.coach-tools-head { margin-bottom: 14px; }
.coach-tools-head .plan-label { margin-bottom: 4px; }
.coach-tools-head h3 { margin: 0 0 4px; font-family: var(--display); font-stretch: 86%; font-size: 26px; }
@media (max-width: 860px) {
  .coach-grid { grid-template-columns: 1fr; }
}

/* ---- Premier profil version 2 ---- */
.onboarding-choice { border: 0; padding: 0; margin: 0 0 14px; min-width: 0; }
.onboarding-choice legend { font-weight: 700; font-size: 13.5px; margin-bottom: 8px; padding: 0; }
.onboarding-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.onboarding-options { display: grid; gap: 8px; }
.onboarding-tile { position: relative; cursor: pointer; }
.onboarding-tile input { position: absolute; opacity: 0; pointer-events: none; }
.onboarding-tile span { display: grid; gap: 2px; border: 1.5px solid var(--border); border-radius: 10px; padding: 11px 13px; background: var(--panel); height: 100%; }
.onboarding-tile small { color: var(--text-dim); font-size: 12px; }
.onboarding-tile input:checked + span { border-color: var(--accent); background: var(--accent-soft); }
.onboarding-tile input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Disciplines secondaires : un athlète qui roule ET court le déclare dès l'inscription, pour
   que son temps soit réparti entre les sports au lieu d'être compté deux fois. */
.onboarding-secondary .hint { margin: 0 0 10px; }
.secondary-sport-list { display: grid; gap: 8px; }
.secondary-sport {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px;
  border: 1.5px solid var(--border); border-radius: 10px; padding: 10px 12px;
  background: var(--panel); cursor: pointer;
}
.secondary-sport.checked { border-color: var(--accent); background: var(--accent-soft); }
.secondary-sport-time select { min-width: 110px; }
.secondary-sport:not(.checked) .secondary-sport-time { opacity: 0.45; }

/* Erreurs champ par champ : on corrige au fur et à mesure au lieu de buter sur un refus global. */
.field-error {
  margin: 6px 0 0; font-size: 12.5px; font-weight: 600; color: var(--danger, #c0392b);
  display: flex; gap: 6px; align-items: flex-start;
}
.field-error::before { content: "⚠"; }
/* display:flex l'emporterait sur l'attribut hidden : on le neutralise explicitement. */
.field-error[hidden] { display: none; }
.field.has-error input,
.field.has-error select { border-color: var(--danger, #c0392b); }
fieldset.has-error .onboarding-tile span { border-color: var(--danger, #c0392b); }

@media (max-width: 640px) {
  .secondary-sport { grid-template-columns: auto 1fr; }
  .secondary-sport-time { grid-column: 2; }
}
.onboarding-race { border: 1px solid var(--border); border-radius: var(--radius-md); padding: 12px 14px; margin: 4px 0 14px; background: var(--panel); }
.onboarding-race > summary { cursor: pointer; display: grid; gap: 2px; }
.onboarding-race > summary span { font-size: 13px; color: var(--text-dim); }
.onboarding-race-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-top: 12px; }
.onboarding-race .meta { margin: 8px 0 0; }
@media (max-width: 700px) {
  .onboarding-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.goal-search-field { grid-column: 1 / -1; }
.goal-search-field small { display: block; margin-top: 4px; }
.goal-distance-row { display: grid; grid-template-columns: minmax(0, 1fr) 90px; gap: 6px; }

/* ---- Profil : zones et semaine type lisibles ---- */
.profile-ladder-intro { margin: -4px 0 12px; font-size: 13.5px; line-height: 1.5; color: var(--text-dim); }
.profile-ladder-row { grid-template-columns: 34px 170px minmax(0, 1fr) 92px; }
.profile-ladder-name { white-space: normal; overflow: visible; display: grid; line-height: 1.2; }
.profile-ladder-name small { font-weight: 500; color: var(--text-faint); font-size: 11.5px; }
.profile-ladder-track.is-bare { background: none; height: 16px; }
.profile-ladder-ftp-row { margin-bottom: -4px; }
.profile-ladder-track .profile-ladder-ftp-label { width: auto; height: auto; top: auto; line-height: 1.4; position: absolute; bottom: 0; transform: translateX(-50%); font-style: normal; font-size: 11px; font-weight: 800; white-space: nowrap; background: var(--text); color: var(--bg); padding: 1px 6px; border-radius: 4px; }
.profile-ladder-axis small { position: absolute; top: 0; transform: translateX(-50%); font-size: 10.5px; color: var(--text-faint); }
.profile-ladder-axis .profile-ladder-w { font-size: 11px; color: var(--text-faint); font-weight: 500; }
.profile-week-bar { position: relative; display: block; }
.profile-week-available { position: absolute; left: 0; right: 0; bottom: 0; background: var(--panel-3) !important; border-radius: 6px 6px 0 0; }
.profile-week-planned { position: absolute; left: 4px; right: 4px; bottom: 0; display: flex; flex-direction: column-reverse; gap: 2px; }
.profile-week-planned i { display: block; width: 100%; border-radius: 4px; min-height: 6px; }
.profile-week-day.has-session { cursor: pointer; }
.profile-week-day.has-session:hover .profile-week-bar, .profile-week-day.has-session:focus-visible .profile-week-bar { outline: 2px solid var(--accent); outline-offset: 2px; }
.profile-week-type { font-size: 10.5px; line-height: 1.2; color: var(--text); font-weight: 600; min-height: 26px; }
@media (max-width: 860px) {
  .profile-ladder-row { grid-template-columns: 30px minmax(0, 1fr) 84px; }
  .profile-ladder-ftp-row, .profile-ladder-axis { display: none; }
}

/* ---- Analyse d'une séance réalisée (version 2) ---- */
.pva-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin-top: 12px; }
.pva-card { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 12px; display: grid; gap: 4px; align-content: start; }
.pva-label { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-dim); }
.pva-label small { text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--text-faint); }
.pva-actual { font-family: var(--display); font-stretch: 86%; font-size: 26px; font-weight: 800; line-height: 1.05; font-variant-numeric: tabular-nums; }
.pva-planned { font-size: 12.5px; color: var(--text-dim); }
.pva-meter { position: relative; height: 8px; border-radius: 999px; background: var(--panel-3); margin: 6px 0 4px; }
.pva-meter i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; background: var(--accent-2); }
.pva-card.info .pva-meter i { background: #3b82f6; }
.pva-card.warning .pva-meter i { background: #f2994a; }
.pva-meter b { position: absolute; top: -4px; width: 2px; height: 16px; background: var(--text); }
.pva-status { font-size: 12.5px; font-weight: 700; line-height: 1.35; }
.pva-status.success { color: var(--accent-2); }
.pva-status.info { color: #2f5fbf; }
.pva-status.warning { color: #b4480b; }
.pva-status.neutral { color: var(--text-faint); }
.session-numbers-title { display: block; margin-top: 4px; }
.session-primary-stats.is-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; border: 0; padding: 0; }
.session-primary-stats.is-tiles > div { background: var(--panel-2); border-radius: 10px; padding: 10px 12px; display: grid; gap: 2px; }
.session-primary-stats.is-tiles .stat-value { font-family: var(--display); font-stretch: 86%; font-size: 22px; font-weight: 800; }
.session-instructions .coach-comment { margin-top: 10px; }

/* ---- Notes : effet sur le plan ---- */
.note-type-effect { margin: 0; background: var(--panel-2); border-radius: 8px; padding: 9px 11px; font-size: 13px; line-height: 1.45; color: var(--text-dim); }
.note-type-effect b { color: var(--text); }
.notes-list-title { margin: 6px 0 0; }
.note-card { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; display: grid; gap: 6px; background: var(--panel); }
.note-card-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.note-card-type { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--panel-2); }
.note-card-type.type-indisponible, .note-card-type.type-repos { background: #fde8da; color: #b4480b; }
.note-card-type.type-inconfort, .note-card-type.type-blessure, .note-card-type.type-malade { background: #fde6e6; color: #9b2c2c; }
.note-card-date { font-size: 12.5px; color: var(--text-faint); }
.note-card-head .btn-link { margin-left: auto; padding: 0; }
.note-card-text { margin: 0; font-size: 14px; }
.note-card-replies > summary { cursor: pointer; font-size: 12.5px; font-weight: 700; color: var(--text-dim); }
.adapt-modal h3 { font-family: var(--display); font-stretch: 86%; font-size: 26px; margin: 4px 0 6px; }
.adapt-modal-list { list-style: none; margin: 14px 0; padding: 0; display: grid; gap: 8px; }
.adapt-modal-list li { border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: 10px; padding: 10px 12px; display: grid; gap: 2px; }
.adapt-modal-date { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-dim); }
.adapt-modal-change { font-weight: 700; color: var(--accent); }
.adapt-modal-list small { color: var(--text-dim); font-size: 12.5px; }
.adapt-modal-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---- Accueil : raccourcis « Que veux-tu faire ? » ---- */
.home-shortcuts { margin: 4px 0 18px; }
.home-shortcuts h3 { font-family: var(--display); font-stretch: 86%; font-size: 24px; margin: 0 0 10px; }
.home-shortcuts-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.home-shortcut { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 10px; align-items: center; text-align: left; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 12px; cursor: pointer; color: var(--text); transition: transform .12s var(--ease), border-color .12s var(--ease), box-shadow .12s var(--ease); }
.home-shortcut:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: var(--shadow-md); }
.home-shortcut:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.home-shortcut-icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.home-shortcut:nth-child(2) .home-shortcut-icon { background: #fde8da; color: #b4480b; }
.home-shortcut:nth-child(3) .home-shortcut-icon { background: var(--accent-2-soft); color: var(--accent-2); }
.home-shortcut:nth-child(n+4) .home-shortcut-icon { background: var(--panel-2); color: var(--text-dim); }
.home-shortcut-text { display: grid; gap: 2px; min-width: 0; }
.home-shortcut-text b { font-size: 14.5px; }
.home-shortcut-text small { font-size: 12px; color: var(--text-dim); line-height: 1.35; }
.home-shortcut-arrow { font-size: 18px; font-weight: 800; color: var(--text-faint); }
.home-shortcut:hover .home-shortcut-arrow { color: var(--accent); }
.home-modal-title { font-family: var(--display); font-stretch: 86%; font-size: 28px; margin: 0 0 12px; }
.home-modal-form { display: grid; gap: 12px; }
.home-modal-form .field { margin-bottom: 0; }
.home-week-list { display: grid; }
.home-week-row { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 12px; align-items: center; padding: 9px 0; border-top: 1px solid var(--border); }
.home-week-row:first-child { border-top: 0; }
.home-week-day { display: grid; font-size: 11.5px; text-transform: uppercase; color: var(--text-faint); line-height: 1.1; }
.home-week-day b { font-family: var(--display); font-stretch: 86%; font-size: 22px; color: var(--text); }
.home-week-row.is-today .home-week-day, .home-week-row.is-today .home-week-day b { color: var(--accent); }
.home-week-items { display: grid; gap: 4px; }
.home-week-session { display: flex; justify-content: space-between; align-items: center; gap: 8px; border: 0; border-radius: 8px; padding: 9px 12px; background: var(--chip); color: #fff; font-weight: 700; font-size: 14px; cursor: pointer; text-align: left; }
.home-week-session small { font-weight: 500; opacity: .9; }
.home-week-session:hover { filter: brightness(1.06); }
.home-week-rest { color: var(--text-faint); font-size: 13px; }
@media (max-width: 1100px) { .home-shortcuts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .home-shortcuts-grid { grid-template-columns: 1fr; } }
