/* === VARIABLES GLOBALES ET THÈME === */
:root {
  --bg: #eef8f5;
  --card: #fff;
  --card2: #f7fcfa;
  --line: #d3e7e1;
  --acc: #2b8a7b;
  --hot: #1f6e62;
  --mint: #7fc8b8;
  --soft: #d9f0ea;
  --text: #1d3b37;
  --mut: #5f7773;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
*,
*::before,
*::after {
  box-sizing: inherit;
}

/* === STRUCTURE GÉNÉRALE === */
html {scroll-padding-top: env(safe-area-inset-top, 0px);}
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1100px 500px at 85% -10%,#bfe8dd 0, transparent 60%),
    var(--bg);
  color: var(--text);
  font: 16px/1.55 Barlow, system-ui, sans-serif;
}
h1, h2, h3,
.big {
  margin: 0;
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  letter-spacing: .01em;
}
main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 20px 60px;
}

/* === HEADER ET NAVIGATION === */
nav.main-nav {
  position: sticky;
  top: 0;
  z-index: 2000;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(238, 248, 245, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
nav.main-nav a,
nav.main-nav button {
  text-decoration: none;
  border: 0;
  border-bottom: none;
  background: transparent;
  color: var(--mut);
  font: 600 15px Barlow, sans-serif;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}
nav.main-nav a:hover,
nav.main-nav button:hover {
  color: var(--text);
  background: var(--soft);
  text-decoration: none;
}
nav.main-nav a.on,
nav.main-nav a:active,
nav.main-nav button.on,
nav.main-nav button:active {
  background: #48b89f;
  color: #fff;
  text-decoration: none;
}
nav.main-nav a:focus-visible,
nav.main-nav button:focus-visible {
  outline: 2px solid var(--acc);
  outline-offset: 2px;
}
header.main-header {
  position: relative;
  z-index: 1000;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 560px;
  padding: 28px 4% 44px;
  background-image: url("./images/index.jpeg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-bottom: 1px solid var(--line);
}

/* --- PARTIE HAUTE --- */
.header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 25px;
  width: 100%;
}
.header-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  flex-shrink: 0;
}
header.main-header {
  position: relative;
  z-index: 1000;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 560px;
  padding: 28px 4% 44px;
  background-image: url("./images/index.jpeg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-bottom: 1px solid var(--line);
}
.header-content {
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.header-content h1 {
  margin: 0;
  color: var(--text);
  font: 800 clamp(48px, 7vw, 88px)/0.98 "Barlow Condensed", sans-serif;
  text-align: center;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.brand i,
.brand .dot-green {
  display: inline-block;
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #2b8a7b;
  box-shadow: 0 0 0 4px rgba(56, 184, 124, 0.3);
}
.header-brand .brand {
  color: var(--hot);
  font: 800 30px "Barlow Condensed", sans-serif;
}

/* === ACCESSIBILITÉ ET FOCUS === */
a:focus-visible,
button:focus-visible,
select:focus-visible,
label:focus-within {
  outline: 2px solid var(--acc);
  outline-offset: 2px;
}

/* === HERO / SECTION D'ACCUEIL === */
.hero {
  margin-bottom: 22px;
}
.hero h1 {
  font-size: clamp(40px, 8vw, 84px);
  line-height: .95;
  font-weight: 800;
  margin-bottom: 18px;
  animation: in .7s ease both;
}
.hero h1 span {
  color: var(--acc);
}
.hero p {
  max-width: 60ch;
  margin: 8px 0 0;
  color: var(--mut);
}
.hero .hero-line {
  max-width: 100%;
  padding-bottom: 2px;
  white-space: nowrap;
  overflow-x: auto;
}
.hero-duo {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 8px 48px;
}
.hero-duo h1 {
  font-size: clamp(40px, 6.5vw, 72px);
  margin-bottom: 6px;
}
.hero .hero-cap {
  margin: 0 0 12px;
  font-weight: 600;
}
.hero-subtitle {
    color: #808f8d;
}
/* Animation d'apparition */
@media (prefers-reduced-motion: no-preference) {
  @keyframes in {
    from {
      opacity: 0;
      transform: translateY(14px);
    }
  }
}

/* === CARTES ET GRILLE=== */
.card {
  min-width: 0;
  padding: 18px;
  background: linear-gradient(180deg, var(--card), var(--card2));
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(43, 138, 123, .07);
}
.card h3 {
  margin-bottom: 2px;
  font-size: 22px;
  font-weight: 700;
}
.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}
.c12 { grid-column: span 12; }
.c8  { grid-column: span 8; }
.c6  { grid-column: span 6; }
.c4  { grid-column: span 4; }
.c3  { grid-column: span 3; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.stats-grid .card {
  min-width: 0;
  grid-column: auto;
}
.records-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}
.records-grid .card {
  grid-column: auto;
  min-width: 0;
  padding: 14px 10px;
}
.record-details {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 0px;
  flex-wrap: nowrap;
}
.record-details small {
  font-size: 12px;
}

/* === INDICATEURS KPI === */
.kpi .big {
  font-size: 46px;
  font-weight: 800;
  line-height: 1;
}
.kpi small {
  display: block;
  margin-top: 6px;
  color: var(--mut);
}
.up { color: var(--hot); }
.dn { color: #8a9a96; }

/* === COMPOSANTS INTERACTIFS=== */
.seg {
  display: inline-flex;
  overflow: hidden;
  margin-bottom: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.seg button {
  padding: 7px 14px;
  border: 0;
  background: none;
  color: var(--mut);
  font: 600 14px Barlow, sans-serif;
  cursor: pointer;
}
.seg button.on {
  background: var(--acc);
  color: #fff;
}
.btn {
  padding: 10px 18px;
  border: 0;
  border-radius: 9px;
  background: var(--acc);
  color: #fff;
  font: 700 15px Barlow, sans-serif;
  cursor: pointer;
}
.btn:hover {
  background: var(--hot);
}
.btn.ghost {
  background: none;
  border: 1px solid var(--line);
  color: var(--text);
}
.btn.ghost:hover {
  border-color: var(--acc);
}
.tag {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 99px;
  background: var(--soft);
  color: var(--hot);
  font-size: 12px;
  font-weight: 600;
}
.tag.m {
  background: #d3e9e2;
  color: #1d3b37;
}

/* === TYPOGRAPHIE ET ÉLÉMENTS DE TEXTE === */
.sub {
  margin: 0 0 12px;
  color: var(--mut);
  font-size: 14px;
}
.msg {
  min-height: 20px;
  margin-top: 8px;
  color: var(--hot);
  font-size: 14px;
}
.empty {
  padding: 22px;
  color: var(--mut);
  text-align: center;
}
.note {
  margin-bottom: 16px;
  padding: 10px 14px;
  background: var(--soft);
  border-radius: 10px;
  font-size: 14px;
}
.note a {
  color: var(--hot);
  font-weight: 600;
}
code {
  padding: 1px 6px;
  background: #fff;
  border-radius: 5px;
}

/* === TABLEAUX ET DONNÉES === */
.scroll {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
th, td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}
th {
  color: var(--mut);
  font-size: 13px;
  font-weight: 600;
}
td.n, th.n {
  text-align: right;
}
tr[data-run] {
  cursor: pointer;
}
tr[data-run]:hover {
  background: var(--soft);
}
.tall {
  max-height: 480px;
  overflow: auto;
}
.tall th {
  position: sticky;
  top: 0;
  background: #fff;
}

/* === GRAPHIQUES SVG === */
svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
svg text {
  fill: #5f7773;
  font: 11px Barlow, sans-serif;
}

/* === CARTE GÉOGRAPHIQUE === */
.map {
  position: relative;
  z-index: 0;
  height: 440px;
  overflow: hidden;
  background: var(--soft);
  border-radius: 12px;
}

/* === FLUX D'ACTIVITÉS === */
.feed {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px;
  cursor: pointer;
}
.item:hover {
  border-color: var(--mint);
}
.item-title {
  margin: 6px 0;
}
.th {
  flex: none;
  width: 130px;
  padding: 4px;
  background: var(--soft);
  border-radius: 10px;
}
.th svg {
  height: 84px;
}
.th.lift {
  position: relative;
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  min-height: 92px;
  box-sizing: border-box;
  overflow: hidden;
  background: #d3e9e2;
  color: #1d3b37;
  border-radius: 10px;
}
.th.lift img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 65%;
  height: 100%;
  object-fit: contain;
  display: block;
  margin: 0;
}
.item .st {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-weight: 600;
}
.item .st small {
  display: block;
  color: var(--mut);
  font-size: 12px;
  font-weight: 400;
}
.feed2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}
.feed2 > div {
  min-width: 0;
}
.col-title {
  margin: 0 0 10px;
  color: #185b4e;
  font-size: 24px;
  font-weight: 700;
}

/* === IMPORT DE FICHIERS === */
.drop {
  display: block;
  padding: 26px;
  background: #fff;
  border: 2px dashed var(--acc);
  border-radius: 14px;
  text-align: center;
  font-weight: 600;
  cursor: pointer;
}
.drop.hot {
  background: var(--soft);
}
.drop input {
  display: none;
}

/* === PRÉPARATION COMPÉTITION === */
.prep {
  margin: 0 0 18px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 6px 20px rgba(43, 138, 123, .08);
  transition: box-shadow .2s, border-color .2s;
  width: min(1100px, calc(100vw - 60px));
  margin: 0 0 18px 50%;
  transform: translateX(-50%);
}
.prep:hover {
  border-color: var(--mint);
  box-shadow: 0 10px 28px rgba(43, 138, 123, .16);
}
.prep[open] {
  border-color: var(--acc);
}
.prep summary {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 20px 22px;
  background: linear-gradient(135deg, #f2faf8, #fff);
  list-style: none;
  cursor: pointer;
  user-select: none;
}
.prep summary::-webkit-details-marker {
  display: none;
}
.prep summary:focus-visible {
  outline: 3px solid var(--acc);
  outline-offset: -4px;
}
.prep[open] summary {
  background: linear-gradient(135deg, var(--soft), #f2faf8);
  border-bottom: 1px solid var(--line);
}
.prep-badge {
  display: grid;
  place-content: center;
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--mint), var(--acc));
  color: #fff;
  text-align: center;
  line-height: 1;
}
.prep-badge b {
  font: 800 28px "Barlow Condensed", sans-serif;
}
.prep-badge small {
  font-size: 11px;
  letter-spacing: .05em;
  text-transform: uppercase;
  opacity: .9;
}
.prep-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.prep-title {
  color: var(--text);
  font: 800 26px/1.15 "Barlow Condensed", sans-serif;
}
.prep-sub {
  color: var(--mut);
  font-size: 14px;
}
.prep-progress {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 6px;
}
.prep-bar {
  flex: 1 1 160px;
  max-width: 320px;
  height: 8px;
  overflow: hidden;
  background: #e3f1ed;
  border-radius: 99px;
}
.prep-bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--mint), var(--acc));
  border-radius: 99px;
}
.prep-pct {
  color: var(--hot);
  font-size: 13px;
  font-weight: 600;
}
.prep-chev {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--acc);
  transition: transform .25s, background .2s;
}
.prep-chev::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 9px;
  height: 9px;
  border-right: 2.5px solid #fff;
  border-bottom: 2.5px solid #fff;
  transform: translate(-50%, -70%) rotate(45deg);
}
.prep[open] .prep-chev {
  transform: rotate(180deg);
  background: var(--hot);
}
.prep-body {
  display: grid;
  gap: 18px;
  padding: 20px 22px 24px;
}
.prep-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}
.prep-kpi {
  padding: 12px 16px;
  background: #f2faf8;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.prep-kpi b {
  display: block;
  color: var(--acc);
  font: 800 30px/1.1 "Barlow Condensed", sans-serif;
}
.prep-kpi span {
  color: var(--mut);
  font-size: 13px;
}
.wk {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
}
.wk-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 18px;
  background: #f2faf8;
  border-bottom: 1px solid var(--line);
}
.wk-head h4 {
  margin: 0;
  color: var(--hot);
  font: 800 22px "Barlow Condensed", sans-serif;
}
.wk-km {
  font-size: 14px;
}
.wk-km small {
  color: var(--mut);
  font-size: 13px;
}
.ss {
  display: grid;
  grid-template-columns: 90px minmax(0, 0.65fr) minmax(0, 0.65fr) 65px 75px;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  box-sizing: border-box;
}
.wk-list .ss:first-child {
  border-top: 0;
}
.ss > * {
  grid-row: 1;
  min-width: 0;
  box-sizing: border-box;
}
.ss-day b {
  display: block;
  font-weight: 700;
  white-space: nowrap;
  font-size: 13px;
}
.ss-day em {
  display: inline-block;
  margin-top: 3px;
  padding: 2px 7px;
  background: var(--acc);
  color: white;
  border-radius: 99px;
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
}
.ss-col {
  min-width: 0;
}
.ss-lab {
  display: block;
  margin-bottom: 3px;
  color: var(--mut);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.ss-col p {
  margin: 0;
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: normal;
  word-break: normal;
}
.ss-chip {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 7px;
  background: var(--soft);
  color: var(--hot);
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.ss-status {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-align: center;
}
.status-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 29px;
  height: 29px;
  border-radius: 50%;
  color: white;
  font-size: 17px;
  font-weight: 900;
  font-style: normal;
}
.status-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  color: inherit;
  font-size: 22px;
  font-weight: 900;
  font-style: normal;
  background: none;
}
.status-icon.plus {
  color: #06e62f;
}
.status-icon.ok {
  color: #05ad24;
}
.status-icon.partial {
  color: #E99A32;
}
.status-icon.no {
  color: #D94A49;
}
.status-empty {
  color: var(--mut);
}
.ss-km {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: nowrap;
  line-height: 1.1;
}
.ss-km b {
  font: 800 23px "Barlow Condensed", sans-serif;
  color: var(--hot);
}

/* === ENTRAINEMENT 10 KM PAR JOUR === */
.daily10k {
  margin: 28px 0;
  padding: 22px;
  background: var(--card, #fff);
  border: 1px solid var(--line, #d3e7e1);
  border-radius: 18px;
  box-shadow: 0 5px 18px rgba(30, 90, 75, .06);
}
.daily10k-head h2 {
  margin: 0;
  color: var(--hot, #1f6e62);
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 30px;
  font-weight: 800;
}
.daily10k-head p {
  margin: 5px 0 18px;
  color: #71847e;
  font-size: 13px;
}
.daily10k-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}
.daily10k-stats span {
  padding: 7px 15px;
  border-radius: 30px;
  background: #e4f4ef;
  color: #247967;
  font-size: 13px;
  font-weight: 800;
}
.daily10k-scroll {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line, #d3e7e1);
  border-radius: 12px;
  -webkit-overflow-scrolling: touch;
}
.daily10k-table {
  width: 100%;
  min-width: 1250px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12px;
}
.daily10k-table th,
.daily10k-table td {
  min-width: 145px;
  padding: 12px;
  vertical-align: top;
  text-align: left;
  border-right: 1px solid var(--line, #d3e7e1);
  border-bottom: 1px solid var(--line, #d3e7e1);
}
.daily10k-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #e6f4ef;
  color: #246f61;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}
.daily10k-table thead th:first-child {
  min-width: 100px;
}
.daily10k-week {
  width: 100px;
  min-width: 100px !important;
  background: #edf7f3;
  color: #246f61;
  text-align: center !important;
  vertical-align: middle !important;
}
.daily10k-week strong {
  display: block;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 23px;
  font-weight: 800;
}
.daily10k-week small {
  display: block;
  margin-top: 5px;
  color: #71847e;
  font-size: 10px;
}
.daily10k-plan td {
  background: #fff;
  color: #354d46;
}
.daily10k-done td {
  background: #f5faf8;
  color: #526a62;
}
.daily10k-label {
  display: inline-block;
  margin-bottom: 7px;
  padding: 3px 8px;
  border-radius: 20px;
  background: #e1f2ec;
  color: #247967;
  font-size: 10px;
  font-weight: 800;
}
.daily10k-done .daily10k-label {
  background: #e9eee9;
  color: #64776d;
}
.daily10k-table td div {
  line-height: 1.65;
  overflow-wrap: break-word;
}
.daily10k-table tr:last-child td {
  border-bottom: 0;
}
.daily10k-table th:last-child,
.daily10k-table td:last-child {
  border-right: 0;
}

/* === BARRES D'OUTILS ET UTILITAIRES === */
.section-title {
  margin: 24px 0 12px;
  font-size: 30px;
}
.mb {
  margin-bottom: 10px;
}
.mut {
  color: var(--mut);
}
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 14px;
}
.toolbar-select {
  min-width: 200px;
}
.share-row {
  margin: 10px 0;
}
.share-head {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
}
.share-track {
  height: 8px;
  background: #e3f1ed;
  border-radius: 9px;
}
.share-fill {
  height: 8px;
  background: linear-gradient(90deg, #7fc8b8, var(--text));
  border-radius: 9px;
}
.brand-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
.pick {
  margin: 0;
  padding: 3px 12px;
  font-size: 13px;
}
.tall {
  max-height: 480px;
  overflow: auto;
}

/* === Compétition : résultat officiel d'une course === */
.race {
  border: 1px solid #e8caca;
  border-radius: 16px;
  overflow: hidden;
  background: #fffafa;
}
.race-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px 12px;
  flex-wrap: wrap;
  padding: 14px 18px;
  background: linear-gradient(135deg, #f8e5e5, #fff4f4);
  border-bottom: 1px solid #e8caca;
}
.race-head h4 {
  margin: 0;
  font: 800 24px "Barlow Condensed", sans-serif;
  color: #8b1e2d;
}
.race-date {
  color: #a52a38;
  font-size: 14px;
}
.race-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  padding: 16px 18px;
}
.race-field .race-kpis {
  padding: 0;
}
.race-kpi {
  background: #fff0f0;
  border: 1px solid #efd0d0;
  border-radius: 14px;
  padding: 12px 14px;
}
.race-kpi b {
  display: block;
  font: 800 28px/1.1 "Barlow Condensed", sans-serif;
  color: #a52a38;
}
.race-kpi span {
  font-size: 13px;
}
.race-kpi small {
  display: block;
  font-size: 12px;
  color: #9b7777;
}
.race-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
  padding: 0 18px 16px;
}
.race-grid.one {
  grid-template-columns: 1fr;
}
.race h5 {
  margin: 0 0 8px;
  font: 700 13px Barlow, sans-serif;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #9b5555;
}
.race-map {
  height: 440px;
  border-radius: 12px;
  overflow: hidden;
  background: #fff0f0;
  position: relative;
  z-index: 0;
}
.race-field {
  padding: 0 18px 12px;
}
.race-note,
.race-source {
  margin: 10px 0 0;
  font-size: 12px;
  color: #9b7777;
}
.race-source {
  padding: 0 18px 14px;
  margin: 0;
}

/* === ENCADREMENTS DES RÉSULTATS OFFICIELS === */
.official-prep .race {
  border: none !important;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible;
}
.official-prep .race-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: stretch;
  padding: 0 18px 18px;
}
.official-prep .race-grid.one {
  grid-template-columns: 1fr;
}
.official-prep .race-panel {
  min-width: 0;
  padding: 16px;
  background: #fff5f5;
  border: 1px solid #e5bfc3;
  border-radius: 14px;
  box-sizing: border-box;
}
.official-prep .race-panel h5 {
  margin: 0 0 14px;
  padding-bottom: 10px;
  color: #922b3e;
  border-bottom: 1px solid #e5bfc3;
}
.official-prep .race-splits table {
  width: 100%;
  border-collapse: collapse;
}
.official-prep .race-splits th,
.official-prep .race-splits td {
  padding: 9px 7px;
  border-bottom: 1px solid #efdfe1;
  text-align: left;
  font-size: 12px;
}
.official-prep .race-splits th {
  color: #922b3e;
  background: #f8e5e8;
  font-weight: 800;
}
.official-prep .race-splits .n {
  text-align: right;
}
.official-prep .race-gps .race-map {
  height: 440px;
  border-radius: 10px;
  overflow: hidden;
}
details.official-prep {
  border: 1px solid #e5bfc3 !important;
  border-radius: 16px;
  overflow: hidden;
}
details.official-prep > summary {
  background: linear-gradient(135deg, #f5dfe2, #fff1f2) !important;
  border-color: #e5bfc3 !important;
}
details.official-prep .prep-chev {
  background: #922b3e !important;
  border: none !important;
  color: #fff !important;
}
details.official-prep .prep-chev::before {
  border-right: 2.5px solid #fff !important;
  border-bottom: 2.5px solid #fff !important;
}
details.official-prep .prep-badge {
  background: #922b3e !important;
  color: #fff !important;
}
details.official-prep .prep-title {
  color: #922b3e !important;
}
details.official-prep .prep-sub {
  color: #a15d68 !important;
}
details.official-prep .prep-body {
  background: #fffafa !important;
}
details.official-prep[open] {
  border-color: #d9aab1 !important;
}
details.official-prep[open] > summary {
  background: linear-gradient(135deg, #f0d3d8, #fcebed) !important;
}

/* === PAGE SANTÉ === */
.health-app {
  width: min(1200px, 94%);
  margin: 30px auto 60px;
  color: var(--text, #263b37);
}
.health-app * {
  box-sizing: border-box;
}
.health-intro,
.health-section-heading,
.chart-heading,
.kpi-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.health-intro {
  margin-bottom: 25px;
}
.health-intro h2,
.health-section-heading h2 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 30px;
  margin: 4px 0;
  font-weight: 800;
}
.health-intro p,
.chart-heading p {
  margin: 3px 0;
  color: var(--muted, #82918d);
}
.health-eyebrow {
  color: var(--acc, #2b8a7b);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.6px;
}
.health-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 35px;
}
.health-kpi {
  background: var(--card, #fff);
  border: 1px solid var(--line, #d3e7e1);
  border-radius: 17px;
  padding: 22px;
  box-shadow: 0 4px 16px rgba(30, 80, 65, .04);
}
.ferritin-kpi {
  border-top: 4px solid #c58b38;
}
.hemoglobin-kpi {
  border-top: 4px solid var(--acc, #2b8a7b);
}
.kpi-heading {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
}
.kpi-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--card2, #f7fcfa);
  color: var(--acc, #2b8a7b);
  font-weight: 800;
}
.kpi-value {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 46px;
  font-weight: 800;
  line-height: 1.1;
  margin-top: 18px;
}
.kpi-unit {
  color: var(--muted, #82918d);
  font-size: 13px;
}
.kpi-footer,
.kpi-trend {
  font-size: 12px;
  margin-top: 12px;
  color: var(--muted, #82918d);
}
.kpi-trend {
  font-weight: 700;
  color: var(--acc, #2b8a7b);
}
.health-section {
  margin-top: 38px;
}
.health-section-heading {
  margin-bottom: 17px;
}
.health-section-heading h2 {
  font-size: 26px;
}
.health-charts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.health-card {
  background: var(--card, #fff);
  border: 1px solid var(--line, #d3e7e1);
  border-radius: 16px;
  padding: 20px;
  min-width: 0;
  box-shadow: 0 4px 16px rgba(30, 80, 65, .035);
}
.chart-heading h3 {
  margin: 0;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 23px;
}
.chart-heading p {
  font-size: 12px;
}
.chart-unit {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted, #82918d);
}
.health-chart {
  width: 100%;
  min-height: 215px;
  margin-top: 15px;
  overflow: hidden;
}
.health-chart svg {
  width: 100%;
  display: block;
  overflow: visible;
}
.health-chart .chart-grid {
  stroke: var(--line, #d3e7e1);
  stroke-dasharray: 4 4;
}
.health-chart .chart-line {
  fill: none;
  stroke: var(--acc, #2b8a7b);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.health-chart .chart-area {
  fill: var(--acc, #2b8a7b);
  opacity: .09;
}
.health-chart .chart-point {
  fill: var(--card, #fff);
  stroke: var(--acc, #2b8a7b);
  stroke-width: 3;
}
.health-chart .chart-label {
  font-size: 10px;
  fill: var(--muted, #82918d);
}
.health-chart .chart-value {
  font-size: 11px;
  font-weight: 700;
  fill: var(--text, #263b37);
}
.chart-reference {
  margin-top: 12px;
  font-size: 10px;
  color: var(--muted, #82918d);
  display: flex;
  align-items: center;
  gap: 7px;
}
.reference-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--acc, #2b8a7b);
}
.health-btn {
  border: 0;
  border-radius: 9px;
  padding: 11px 16px;
  font-family: 'Barlow', sans-serif;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: .2s;
}
.health-btn.primary {
  background: var(--acc, #2b8a7b);
  color: white;
}
.health-btn:hover {
  filter: brightness(.94);
  transform: translateY(-1px);
}
.history-filters,
.compare-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
  margin-bottom: 18px;
}
.health-app label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 12px;
  font-weight: 700;
}
.health-app input,
.health-app select,
.health-app textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line, #d3e7e1);
  border-radius: 8px;
  padding: 11px;
  background: var(--card2, #f7fcfa);
  color: var(--text, #263b37);
  font-family: 'Barlow', sans-serif;
  font-size: 13px;
}
.health-app input:focus,
.health-app select:focus,
.health-app textarea:focus {
  outline: 2px solid var(--acc, #2b8a7b);
  outline-offset: 1px;
}
.table-scroll {
  width: 100%;
  overflow-x: auto;
}
.health-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
  white-space: nowrap;
}
.health-table th {
  text-align: left;
  padding: 12px 10px;
  color: var(--muted, #82918d);
  background: var(--card2, #f7fcfa);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.health-table td {
  padding: 13px 10px;
  border-bottom: 1px solid var(--line, #d3e7e1);
}
.health-table tbody tr:last-child td {
  border-bottom: 0;
}
.result-value {
  font-weight: 800;
}
.status-normal,
.status-low,
.status-high,
.status-unknown {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
}
.status-normal {
  background: #e5f4ec;
  color: #287a52;
}
.status-low {
  background: #fff0e5;
  color: #bd6729;
}
.status-high {
  background: #fce9e9;
  color: #bb4848;
}
.status-unknown {
  background: #edf0f1;
  color: #66736f;
}
.health-categories {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.category-card {
  background: var(--card, #fff);
  border: 1px solid var(--line, #d3e7e1);
  border-radius: 13px;
  padding: 17px;
}
.category-card h3 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 19px;
  margin: 0 0 12px;
}
.category-card p {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  padding: 7px 0;
  margin: 0;
  border-bottom: 1px solid var(--line, #d3e7e1);
}
.category-card p:last-child {
  border: 0;
}
.category-card strong {
  white-space: nowrap;
}
.health-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 17px;
}
.full-width {
  grid-column: 1 / -1;
}
.form-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}
#formMessage {
  font-size: 12px;
  color: var(--acc, #2b8a7b);
}
.health-disclaimer {
  font-size: 11px;
  line-height: 1.6;
  color: var(--muted, #82918d);
  margin: 35px 0;
}

/* ---------- Records sur une ligne (page course) ---------- */
.rec-row{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:12px
}
.rec-row .card{
  padding:12px 14px
}
.rec-row .card b{
  font:800 26px/1.1 "Barlow Condensed",sans-serif
}

/* === FOOTER === */
footer {
  padding: 24px;
  color: var(--mut);
  font-size: 13px;
  text-align: center;
}

/* === RESPONSIVE === */
@media (max-width: 820px) {
  .c8, .c6, .c4 {
    grid-column: span 12;
  }
  .c3 {
    grid-column: span 6;
  }
  .feed2 {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 760px) {
  .prep summary {
    grid-template-columns: auto 1fr;
    padding: 16px;
  }
  .prep-chev {
    display: none;
  }
  .prep-title {
    font-size: 22px;
  }
  .prep-body {
    padding: 14px;
  }
  .ss {
    grid-template-columns: 1fr 1fr;
    gap: 10px 14px;
  }
  .ss-day {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .ss-day em {
    margin-top: 0;
  }
  .ss-km {
    grid-column: 1 / -1;
    text-align: left;
  }
}
@media (max-width: 720px) {
  .hero .hero-line {
    white-space: normal;
  }
}
@media (max-width: 560px) {
  .item {
    flex-direction: column;
    align-items: stretch;
  }
  .th {
    width: 100%;
  }
}

@media(max-width:900px) {
  .rec-row{
    grid-template-columns:repeat(2,minmax(0,1fr))
  }
}

@media(max-width:820px) {
  .race-grid{
    grid-template-columns:1fr
  }
}
@media(max-width: 750px) {
  .health-charts {
    grid-template-columns: 1fr;
  }

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

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

  .health-intro {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media(max-width: 480px) {
  .health-kpis {
    grid-template-columns: 1fr 1fr;
    gap: 9px;
  }

  .health-kpi {
    padding: 13px;
  }

  .kpi-value {
    font-size: 34px;
  }

  .health-kpi .kpi-heading {
    font-size: 10px;
  }

  .health-section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .health-categories {
    grid-template-columns: 1fr;
  }

  .health-form,
  .history-filters,
  .compare-controls {
    grid-template-columns: 1fr;
  }

  .health-card {
    padding: 14px;
  }
}
.health-actions{display:flex;gap:10px;flex-wrap:wrap}

/* ---------- Colonne « Fait ? » des séances (compétition) ---------- */
.ss{grid-template-columns:110px 1fr 1fr 64px 90px}
.ss-st{text-align:center}
.ss-st .ss-lab{margin-bottom:6px}
.st{display:inline-flex;align-items:center;justify-content:center}
.st svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:2.6;stroke-linecap:round;stroke-linejoin:round;overflow:visible}
.st-plus,.st-ok{color:#1f9d55}
.st-part{color:#e8890c}
.st-ko{color:#d64545}
.st-legend{display:flex;flex-wrap:wrap;align-items:center;gap:6px 18px;margin:0;font-size:13px;color:var(--mut)}
.st-leg{display:inline-flex;align-items:center;gap:6px}
.st-legend .st svg{width:16px;height:16px}
@media(max-width:760px){
  .ss{grid-template-columns:1fr 1fr}
  .ss-st{grid-column:1/-1;display:flex;align-items:center;gap:10px;text-align:left}
  .ss-st .ss-lab{margin:0}
}

/* ---------- Santé : grand graphique « résultats par rapport aux références » ---------- */
.overview-scroll{overflow-x:auto}
.overview-svg{min-width:760px}
.overview-svg .ov-cat{font:800 15px "Barlow Condensed",sans-serif;letter-spacing:.05em;text-transform:uppercase;fill:#2b8a7b}
.overview-svg .ov-sep{stroke:#d3e7e1}
.overview-svg .ov-name{font:13px Barlow,sans-serif;fill:#1d3b37}
.overview-svg .ov-band{fill:#d9f0ea}
.overview-svg .ov-edge{stroke:#8fd3c3;stroke-dasharray:3 4}
.overview-svg .ov-axis{font:11px Barlow,sans-serif;fill:#5f7773;text-anchor:middle}
.overview-svg .ov-link{stroke:#c9dad6;stroke-width:1.5}
.overview-svg .ov-prev{fill:#fff;stroke:#9bb0ab;stroke-width:1.5}
.overview-svg .ov-dot{stroke:#fff;stroke-width:2}
.overview-svg .ov-normal{fill:#2b8a7b}
.overview-svg .ov-low,.overview-svg .ov-high{fill:#e8890c}
.overview-svg .ov-unknown{fill:#9bb0ab}
.overview-svg .ov-val{font:700 13px Barlow,sans-serif;fill:#1d3b37}
.overview-svg .ov-val.low,.overview-svg .ov-val.high{fill:#c26a00}
.ov-legend{display:flex;flex-wrap:wrap;gap:6px 20px;margin-bottom:10px;font-size:13px;color:var(--mut)}
.ov-legend span{display:inline-flex;align-items:center;gap:7px}
.ov-key{display:inline-block;width:12px;height:12px;border-radius:50%}
.ov-key.ov-normal{background:#2b8a7b}
.ov-key.ov-low{background:#e8890c}
.ov-key.ov-prev{background:#fff;border:1.5px solid #9bb0ab}
