/* CTS Coaching — fiches de la bibliothèque (www.cts-coaching.com/bibliotheque)
   Identité du site : Montserrat, bleu nuit #2F2D4E, teal #0C6E5F, blanc cassé #F3F7F0.
   Une seule apparence, claire, comme le site. */

/* Montserrat servie par le site, comme sur le reste de cts-coaching.com : plus aucune
   requête vers Google, qui recevait l'adresse IP de chaque lecteur. Sous-ensemble latin,
   licence OFL (polices/OFL.txt). */
@font-face { font-family: Montserrat; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/bibliotheque/polices/montserrat-400.woff") format("woff"); }
@font-face { font-family: Montserrat; font-style: italic; font-weight: 400; font-display: swap;
  src: url("/bibliotheque/polices/montserrat-400i.woff") format("woff"); }
@font-face { font-family: Montserrat; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/bibliotheque/polices/montserrat-600.woff") format("woff"); }
@font-face { font-family: Montserrat; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/bibliotheque/polices/montserrat-700.woff") format("woff"); }
@font-face { font-family: Montserrat; font-style: normal; font-weight: 800; font-display: swap;
  src: url("/bibliotheque/polices/montserrat-800.woff") format("woff"); }

:root {
  --navy: #2f2d4e;
  --navy-dark: #1f1d38;
  --teal: #0c6e5f;
  --teal-light: #8fd1c3;
  --teal-wash: #e1efea;
  --cream: #f3f7f0;
  --line: rgba(47, 45, 78, 0.12);
  --muted: #6f6d85;
}

* { box-sizing: border-box; }

html { color-scheme: light; }

body {
  margin: 0;
  background: #ffffff;
  color: var(--navy);
  font-family: Montserrat, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--teal); text-underline-offset: 3px; }
a:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }

/* En-tête */
.entete {
  background: var(--navy);
  color: #fff;
  padding: 1.1rem 1.5rem;
}
.entete-inner {
  max-width: 60rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.marque {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-size: 0.85rem;
  color: #fff;
  text-decoration: none;
}
.retour {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal-light);
  text-decoration: none;
}

/* Logo : le même que l'en-tête du site et de /plan, à la même taille. */
.marque img { width: 2.5rem; height: 2.5rem; object-fit: contain; }

/* Titre de fiche */
.titre {
  background: var(--navy);
  color: #fff;
  padding: 2.6rem 1.5rem 3rem;
  border-bottom: 5px solid var(--teal);
}
.titre-inner { max-width: 44rem; margin: 0 auto; }
.surtitre {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal-light);
  margin-bottom: 0.8rem;
}
h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.chapeau {
  margin: 1rem 0 0;
  font-size: 1.05rem;
  color: #d8d9e6;
  max-width: 38rem;
}
.lecture { margin-top: 1.2rem; font-size: 0.78rem; color: var(--teal-light); letter-spacing: 0.06em; }

/* Corps */
main { max-width: 44rem; margin: 0 auto; padding: 2.5rem 1.5rem 4rem; }

.essentiel {
  background: var(--cream);
  border-top: 3px solid var(--teal);
  padding: 1.3rem 1.5rem 1.1rem;
  margin: 0 0 2.6rem;
}
.essentiel h2 { margin-top: 0; font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--teal); }
.essentiel ul { margin: 0; padding-left: 1.1rem; }
.essentiel li { margin-bottom: 0.45rem; }

h2 {
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 2.6rem 0 0.8rem;
  text-wrap: balance;
}
h3 { font-size: 1.02rem; font-weight: 700; margin: 1.6rem 0 0.4rem; color: var(--teal); }
p { margin: 0 0 1rem; }
ul, ol { padding-left: 1.2rem; margin: 0 0 1rem; }
li { margin-bottom: 0.35rem; }
strong { font-weight: 700; }

/* Tableaux */
.tableau { overflow-x: auto; margin: 1rem 0 1.6rem; }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; font-variant-numeric: tabular-nums; }
th {
  background: var(--navy);
  color: #fff;
  text-align: left;
  font-weight: 600;
  padding: 0.6rem 0.8rem;
}
td { padding: 0.55rem 0.8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:nth-child(even) td { background: var(--cream); }
/* Sur téléphone, les tableaux tiennent dans l'écran au lieu de défiler sans le dire : à
   390 px, la fiche zones cachait 2 colonnes sur 5 et la colonne « Verdict » de la fiche
   récupération était coupée en plein mot (audit du 27/09/2026, C24). La césure suit la
   langue de la page (lang="fr"), sur les mots de 7 lettres et plus, jamais moins de 3
   de chaque côté : « Do-maine » ou « Modé-ré » se lisaient mal. Tout tient à 390 px ; à
   360 px, seul le tableau des zones (5 colonnes) défile encore, de quelques pixels. */
@media (max-width: 480px) {
  table { font-size: 0.82rem; }
  th, td {
    padding: 0.45rem 0.5rem;
    -webkit-hyphens: auto;
    hyphens: auto;
    hyphenate-limit-chars: 7 3 3;
  }
  /* Les en-têtes et la première colonne (l'intitulé de la ligne) ne sont jamais coupés (« Com-mencer », « Glu-cides », 10/10/2026). */
  th, td:first-child { -webkit-hyphens: manual; hyphens: manual; }
  /* Dans l'encadré coaching, plus étroit, la première colonne peut se couper (vitesse critique, 360 px). */
  .essentiel td:first-child { -webkit-hyphens: auto; hyphens: auto; }
}

/* Encadré d'alerte */
/* Check-list à cocher (fiche checklist, 10/10/2026) : une case vide devant chaque ligne, imprimable. */
.coche { list-style: none; padding-left: 0; }
.coche li { position: relative; padding-left: 1.75rem; margin-bottom: 0.4rem; }
.coche li::before {
  content: ""; position: absolute; left: 0; top: 0.32em;
  width: 0.95em; height: 0.95em; border: 2px solid var(--teal); border-radius: 3px; background: #ffffff;
}
.coche li.cle { font-weight: 700; }

.attention {
  border-left: 4px solid var(--navy);
  background: #ecebf2;
  padding: 0.9rem 1.2rem;
  margin: 1.4rem 0;
}
.attention p:last-child { margin-bottom: 0; }

/* Sources */
.sources {
  margin-top: 3rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
  color: var(--muted);
}
.sources h2 { font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin: 0 0 0.6rem; }
.sources ol { padding-left: 1.2rem; }

/* Le second étage, « Pour comprendre » : la science vulgarisée (version 3 du prompt, décision coach du
   09/10/2026). Un filet teal le sépare du premier étage, celui qui sert à agir. */
.comprendre {
  margin-top: 3rem;
  padding-top: 1.6rem;
  border-top: 3px solid var(--teal);
}
.comprendre > h2 { margin-top: 0; }
/* Les renvois vers les références : [3] */
a.ref { font-size: 0.8em; text-decoration: none; white-space: nowrap; }
.sources li:target { background: var(--teal-wash); }

/* Les schémas (version 4 du prompt, décision coach du 09/10/2026) : SVG dans la page, dessinés pour
   le téléphone d'abord (viewBox d'environ 360 de large), plafonnés à 30rem sur ordinateur. */
.schema { margin: 1.6rem auto 2rem; max-width: 30rem; }
.schema svg { display: block; width: 100%; height: auto; font-family: Montserrat, "Helvetica Neue", Arial, sans-serif; }
.schema figcaption { margin-top: 0.5rem; font-size: 0.8rem; color: var(--muted); text-align: center; }

/* « Sur le terrain » : ce que chaque rubrique de « Pour comprendre » change pour le coureur. */
.terrain {
  background: var(--teal-wash);
  border-left: 4px solid var(--teal);
  padding: 0.75rem 1rem;
  margin: 0.4rem 0 1.8rem;
}

/* Une seule colonne partout, ordinateur compris (décision coach du 10/10/2026) : sur un écran, on
   lit en faisant défiler, et deux colonnes forçaient à remonter ; les blocs se suivent de haut en bas. */
.deux-colonnes { display: block; }
.deux-colonnes > div:first-child > h3:first-child { margin-top: 0.4rem; }

/* « À retenir » : l'encadré bleu nuit de la fiche PDF. */
.retenir {
  background: var(--navy);
  color: #ffffff;
  padding: 1.1rem 1.4rem;
  margin: 2.2rem 0;
  font-weight: 600;
}
.retenir p { margin: 0; }
.retenir strong { color: var(--teal-light); }

/* Le tableau des zones aux couleurs de l'échelle d'effort (fiche zones ; même dessin que le
   calculateur « Ton profil de traileur »). */
table.zones { width: 100%; border-collapse: separate; border-spacing: 0 4px; margin: 0.8rem 0 1.2rem; }
table.zones th { background: none; color: var(--muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; padding: 0.2rem 0.6rem; text-align: left; font-weight: 600; }
table.zones td, table.zones tr:nth-child(even) td { padding: 0.6rem; vertical-align: middle; background: #ffffff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 0.88rem; }
table.zones td:last-child { border-right: 1px solid var(--line); border-radius: 0 6px 6px 0; }
table.zones td.nomzone { color: #ffffff; border: none; border-radius: 6px 0 0 6px; }
table.zones td.nomzone strong { display: block; font-size: 0.92rem; -webkit-hyphens: none; hyphens: none; }
table.zones td.nomzone span { display: block; font-size: 0.75rem; opacity: 0.9; }
table.zones td small { display: block; color: var(--muted); font-size: 0.75rem; }
table.zones tr.z1 td.nomzone { background: #cde8e1; color: var(--navy); }
table.zones tr.z2 td.nomzone { background: #8fd1c3; color: var(--navy); }
table.zones tr.z3 td.nomzone { background: #5fae9f; }
table.zones tr.z4 td.nomzone { background: #2e8a7a; }
table.zones tr.z5 td.nomzone { background: #0c6e5f; }
table.zones tr.z6 td.nomzone { background: #245a63; }
table.zones tr.z7 td.nomzone { background: #2f2d4e; }
@media (max-width: 480px) { table.zones td, table.zones tr:nth-child(even) td { padding: 0.5rem 0.45rem; font-size: 0.82rem; } }
@media print { table.zones td.nomzone { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }

.pied {
  background: var(--navy-dark);
  color: #b9b8cc;
  font-size: 0.78rem;
  padding: 1.6rem 1.5rem;
}
.pied-inner { max-width: 44rem; margin: 0 auto; }

/* Index */
.grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 1rem; margin-top: 1.5rem; }
.carte {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  border-top: 3px solid var(--teal);
  background: var(--cream);
  padding: 1.1rem 1.2rem 1.2rem;
  text-decoration: none;
  color: var(--navy);
}
.carte:hover, .carte:focus-visible { background: var(--teal-wash); }
.carte-titre { font-weight: 800; font-size: 1.05rem; line-height: 1.25; }
.carte-texte { font-size: 0.88rem; color: var(--muted); }

@media print {
  @page { size: A4; margin: 14mm; }
  body { font-size: 11pt; }
  .entete, .pied { display: none; }
  .titre { padding: 1.2rem 1rem 1.4rem; }
  main { padding: 1rem 0; }
  a { color: var(--navy); }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
