/* Grési'courant Le Versoud : maquette « Deux versants »
   Polices : Epilogue (titres, jours, distances) + IBM Plex Sans (texte) */

:root {
  --orange: #FF7F27;      /* disque du badge, maillots */
  --noir: #161412;        /* cercle et coureurs du badge */
  --brule: #A64200;       /* liens orange sur clair */
  --ciel: #3BA4E6;        /* ciel de l'affiche du marathon */
  --banniere: #1E2A6B;    /* ruban « Partez comme un avion ! » */
  --bitume: #ECEEEF;      /* piste, fonds secondaires */
  --gris: #5A5650;        /* texte secondaire */
  --titre: "Epilogue", "Arial Black", sans-serif;
  --texte: "IBM Plex Sans", "Segoe UI", Arial, sans-serif;
  --large: 76rem;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--texte);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--noir);
  background: #fff;
}

img { display: block; max-width: 100%; height: auto; }

a { color: var(--brule); text-underline-offset: .18em; }
a:hover { color: var(--noir); }

:focus-visible {
  outline: 3px solid var(--noir);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px var(--orange);
}

h1, h2, h3 {
  font-family: var(--titre);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -.015em;
  margin: 0 0 .5em;
}
h2 { font-size: clamp(1.9rem, 4.5vw, 3rem); }
h3 { font-size: 1.35rem; letter-spacing: -.005em; }

p, li, dd { max-width: 66ch; }
p { margin: 0 0 1em; }

.cadre {
  width: 100%;
  max-width: var(--large);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2.5rem);
}

.lien-evitement {
  position: absolute; left: -999px; top: 0;
  background: var(--noir); color: #fff; padding: .5rem 1rem;
}
.lien-evitement:focus { left: 0; z-index: 10; }
.masque {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.versants { position: relative; }

/* Bandeau maquette */
.bandeau-maquette {
  background: var(--bitume);
  font-size: .875rem;
  padding: .4rem 0;
  border-bottom: 1px solid #d5d8da;
}
.bandeau-maquette p { margin: 0 auto; max-width: var(--large); }

/* En-tête */
.entete { border-bottom: 3px solid var(--noir); }
.entete .cadre {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: .75rem 1.5rem; padding-block: .75rem;
}
.marque {
  display: flex; align-items: center; gap: .7rem;
  color: var(--noir); text-decoration: none; margin-right: auto;
}
.marque img { width: 56px; height: 56px; }
.marque span {
  font-family: var(--titre); font-weight: 800; font-size: 1.2rem;
  line-height: 1.05;
}
.marque small {
  display: block; font-family: var(--texte); font-weight: 500;
  font-size: .85rem; color: var(--gris);
}
.nav ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1.25rem;
}
.nav a {
  color: var(--noir); text-decoration: none; font-weight: 600;
  padding: .3rem 0; border-bottom: 3px solid transparent;
}
.nav a:hover { border-bottom-color: var(--orange); }
.nav a[aria-current="page"] { border-bottom-color: var(--noir); }
.nav .adherer {
  background: var(--orange); border: 2px solid var(--noir);
  padding: .35rem .8rem; border-radius: 3px;
}
.nav .adherer:hover { background: #fff; }

/* Boutons */
.bouton {
  display: inline-block; font-weight: 600; text-decoration: none;
  padding: .65rem 1.1rem; border-radius: 3px;
  border: 2px solid var(--noir);
  background: var(--noir); color: #fff;
}
.bouton:hover { background: #fff; color: var(--noir); }
.bouton.orange { background: var(--orange); color: var(--noir); }
.bouton.orange:hover { background: #fff; }
.bouton.bleu {
  background: var(--banniere); border-color: var(--banniere); color: #fff;
}
.bouton.bleu:hover { background: #fff; color: var(--banniere); }

/* Ouverture de l'accueil */
.ouverture {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: stretch;
  border-bottom: 3px solid var(--noir);
}
.ouverture-texte {
  padding: clamp(2rem, 5vw, 4rem) clamp(1rem, 4vw, 2.5rem);
  padding-left: max(clamp(1rem, 4vw, 2.5rem),
    calc((100vw - var(--large)) / 2 + 2.5rem));
  display: flex; flex-direction: column; justify-content: center;
}
.ouverture h1 {
  font-size: clamp(2.5rem, 4.3vw, 3.7rem);
  font-weight: 900;
  letter-spacing: -.035em;
  margin-bottom: .15em;
}
.ouverture .lieu {
  font-family: var(--titre); font-weight: 700;
  font-size: clamp(1.2rem, 2.2vw, 1.6rem);
  margin-bottom: 1.2rem;
}
.ouverture figure { margin: 0; position: relative; }
.ouverture figure img {
  width: 100%; height: 100%; object-fit: cover; min-height: 18rem;
}
.ouverture figcaption {
  position: absolute; left: 0; bottom: 0;
  background: #fff; padding: .35rem .7rem; font-size: .85rem;
  max-width: 90%;
}

.prochaine {
  background: var(--orange);
  border-bottom: 3px solid var(--noir);
  padding-block: .9rem;
}
.prochaine p { margin: 0 auto; max-width: var(--large); font-weight: 500; }
.prochaine strong { font-family: var(--titre); font-weight: 800; }
.prochaine a { color: var(--noir); font-weight: 600; }

/* Sections génériques */
.section { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.section.bitume { background: var(--bitume); }
.intro-section { font-size: 1.15rem; }
.citation-club {
  font-family: var(--titre); font-weight: 700; font-size: 1.3rem;
  border-left: 6px solid var(--orange); padding-left: .9rem;
  margin: 1.5rem 0;
}

/* La semaine (tableau) */
.semaine {
  width: 100%; border-collapse: collapse; margin-top: 1.5rem;
}
.semaine caption { text-align: left; color: var(--gris); padding-bottom: .5rem; }
.semaine th, .semaine td {
  text-align: left; vertical-align: top;
  padding: .9rem .9rem .9rem 0;
  border-top: 2px solid var(--noir);
}
.semaine thead th {
  border-top: 0; font-size: .9rem; font-weight: 600; color: var(--gris);
  padding-block: .3rem;
}
.semaine tbody th {
  font-family: var(--titre); font-weight: 800;
  font-size: clamp(1.6rem, 3.6vw, 2.6rem);
  line-height: 1; letter-spacing: -.02em; width: 30%;
}
.semaine .seance { font-weight: 600; font-size: 1.15rem; }
.semaine .seance span {
  display: block; font-weight: 400; font-size: .95rem; color: var(--gris);
}
.semaine .heure { white-space: nowrap; font-variant-numeric: tabular-nums; }
.semaine .seance .en-cours, .en-cours {
  display: inline-block; color: var(--noir); margin-top: .35rem;
  background: var(--orange); color: var(--noir);
  font-size: .9rem; font-weight: 600; padding: .1rem .45rem;
}

/* Bandeau du départ du marathon, au-dessus des deux versants */
.bande-piste {
  margin: 0; background: var(--bitume);
  border-top: 3px solid var(--noir);
}
.bande-piste img {
  width: 100%; max-width: 1454px; margin-inline: auto;
}
.bande-piste figcaption {
  display: grid; grid-template-columns: 1fr 1fr;
  border-top: 3px solid var(--noir); padding: 0;
}
.bande-piste figcaption::before { content: ""; background: var(--orange); }
.bande-piste figcaption span {
  background: var(--ciel); color: var(--banniere);
  border-left: 3px solid var(--noir);
  padding: .55rem clamp(1rem, 4vw, 3rem) 0;
  font-weight: 600; font-size: .95rem;
}
.bande-piste + .versants { border-top: 0; }
.tarif-ligne { margin-top: -.5rem; }
.titre-docs { margin-top: 2rem; }

/* Signature : les deux versants */
.versants {
  display: grid; grid-template-columns: 1fr 1fr;
  border-block: 3px solid var(--noir);
}
.versant { padding: clamp(2rem, 5vw, 3.5rem) clamp(1rem, 4vw, 3rem); }
.versant.coteaux { background: var(--orange); color: var(--noir); }
.versant.plaine {
  background: var(--ciel); color: var(--banniere);
  border-left: 3px solid var(--noir);
}
.versant-entete { margin-bottom: 1.5rem; }
.versant .saison { font-weight: 600; margin: 0 0 .2rem; }
.versant h2, .versant h3.nom {
  font-size: clamp(1.7rem, 3.4vw, 2.6rem); margin-bottom: .2rem;
}
.versant .date {
  font-family: var(--titre); font-weight: 900;
  font-size: clamp(2.2rem, 5.5vw, 4.4rem);
  letter-spacing: -.04em; line-height: 1; margin: 0;
  font-variant-numeric: tabular-nums;
}
.epreuves {
  list-style: none; margin: 0 0 1.5rem; padding: 0;
  display: grid; grid-template-columns: max-content minmax(0, 1fr);
}
.epreuves li {
  display: grid; grid-column: 1 / -1;
  grid-template-columns: subgrid;
  grid-template-areas: "km nom" "km dplus";
  column-gap: 1rem; align-items: baseline;
  padding-block: .7rem;
  border-top: 2px solid currentColor;
  max-width: none;
}
.epreuves .km {
  grid-area: km;
  font-family: var(--titre); font-weight: 900;
  font-size: clamp(2rem, 4.4vw, 3.3rem); line-height: .95;
  letter-spacing: -.04em; font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.epreuves .km small { font-size: .45em; letter-spacing: 0; }
.epreuves .nom { grid-area: nom; font-weight: 600; font-size: 1.1rem; }
.epreuves .dplus { grid-area: dplus; font-variant-numeric: tabular-nums; }
.versant .depart { margin-bottom: 1.25rem; }
.versant a:not(.bouton) { color: inherit; }

/* Nous rejoindre */
.etapes {
  list-style: none; counter-reset: etape; margin: 1.5rem 0 2rem; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0;
}
.etapes li {
  counter-increment: etape;
  padding: 1rem 1.25rem 1rem 0; margin-right: 1.25rem;
  border-top: 3px solid var(--noir);
}
.etapes li::before {
  content: counter(etape);
  display: block; font-family: var(--titre); font-weight: 900;
  font-size: 2.4rem; line-height: 1; margin-bottom: .4rem;
  color: var(--brule);
}
.etapes h3 { font-size: 1.2rem; margin-bottom: .3rem; }

/* Contact (seul aplat noir du site) */
.contact { background: var(--noir); color: #fff; }
.contact h2 { color: #fff; }
.contact .mail {
  font-family: var(--titre); font-weight: 800;
  font-size: clamp(1.25rem, 4.6vw, 2.8rem); letter-spacing: -.02em;
  color: var(--orange); overflow-wrap: anywhere;
}
.contact a { color: var(--orange); }
.contact a:hover { color: #fff; }
.contact :focus-visible { outline-color: #fff; }
.contact dl { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1.25rem; }
.contact dt { font-weight: 600; }
.contact dd { margin: 0; }

/* Pied de page */
.pied { border-top: 3px solid var(--noir); padding-block: 1.5rem; font-size: .95rem; }
.pied .cadre { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; }
.pied img { width: 44px; height: 44px; }
.pied p { margin: 0; }

/* Pages intérieures */
.tete-page { padding-block: clamp(2rem, 5vw, 3.5rem) 1.5rem; }
.tete-page h1 {
  font-size: clamp(2.4rem, 6.5vw, 5rem); font-weight: 900;
  letter-spacing: -.035em; margin-bottom: .3em;
}
.tete-page p { font-size: 1.15rem; }
.sommaire { list-style: none; padding: 0; margin: 1rem 0 0;
  display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
.sommaire a { font-weight: 600; }

.deux-col {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start;
}
.deux-col.inverse { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }

.course-titre {
  border-top: 3px solid var(--noir);
  padding-top: clamp(2rem, 5vw, 3.5rem);
}
.course-titre .date, .course-date {
  font-family: var(--titre); font-weight: 900;
  font-size: clamp(2rem, 4.6vw, 3.6rem); letter-spacing: -.035em;
  line-height: 1; margin: 0 0 .3rem; font-variant-numeric: tabular-nums;
}
.pastille {
  display: inline-block; font-weight: 600; font-size: .95rem;
  padding: .15rem .55rem; border: 2px solid var(--noir);
}
.pastille.orange { background: var(--orange); }
.pastille.ciel { background: var(--ciel); color: var(--banniere); border-color: var(--banniere); }

.donnees { width: 100%; border-collapse: collapse; margin: 1rem 0 1.75rem; }
.donnees caption {
  text-align: left; font-family: var(--titre); font-weight: 800;
  font-size: 1.3rem; padding-bottom: .5rem;
}
.donnees th, .donnees td {
  text-align: left; padding: .6rem .75rem .6rem 0; vertical-align: top;
  border-bottom: 1px solid #b9bcbf;
}
.donnees thead th {
  border-bottom: 2px solid var(--noir); font-size: .9rem; color: var(--gris);
  font-weight: 600;
}
.donnees td.nb, .donnees th.nb {
  text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.donnees tbody th { font-weight: 600; }
.donnees .grand {
  font-family: var(--titre); font-weight: 800; font-size: 1.25rem;
}
.table-defile { overflow-x: auto; }

.programme { list-style: none; padding: 0; margin: 1rem 0 1.75rem; }
.programme li {
  display: grid; grid-template-columns: 4.5rem 1fr; gap: 1rem;
  padding-block: .35rem; border-bottom: 1px solid #b9bcbf;
}
.programme time {
  font-family: var(--titre); font-weight: 800; font-variant-numeric: tabular-nums;
}

.photo-bas { margin-top: 2rem; }
.bloc-suivant { margin-top: 2.5rem; }
.affiche { margin: 0; border: 3px solid var(--noir); }
.affiche + p, figure figcaption { font-size: .9rem; color: var(--gris); }
figure { margin: 0; }
figure figcaption { padding-top: .4rem; }


.temoignages {
  display: grid; grid-template-columns: 1fr 1fr; gap: 2rem;
  margin: 1.5rem 0 0;
}
.temoignages blockquote {
  margin: 0; padding: 1.25rem 1.25rem 1.25rem 1.4rem;
  background: var(--ciel); color: var(--banniere);
  border-left: 6px solid var(--banniere);
}
.temoignages blockquote p {
  font-family: var(--titre); font-weight: 700; font-size: 1.2rem;
  line-height: 1.3;
}
.temoignages cite { font-style: normal; font-weight: 600; }

.encart {
  border: 3px solid var(--noir); padding: 1.25rem 1.4rem; margin: 1.5rem 0;
}
.encart h3 { margin-bottom: .4rem; }

.cycles { list-style: none; padding: 0; margin: 1.25rem 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 3px solid var(--noir); }
.cycles li { padding: 1rem 1rem 1rem 0; border-right: 1px solid #b9bcbf;
  padding-left: 1rem; }
.cycles li:first-child { padding-left: 0; }
.cycles li:last-child { border-right: 0; }
.cycles .mois {
  display: block; font-family: var(--titre); font-weight: 800;
  font-size: 1.35rem; margin-bottom: .3rem;
}
.cycles li.actuel { background: var(--orange); padding-left: 1rem; }
.cycles li.actuel:first-child { padding-left: 1rem; }

.lieux { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 2rem; margin: 1rem 0 0; }
.lieux div { border-top: 1px solid #b9bcbf; padding-block: .7rem; }
.lieux dt { font-weight: 600; }
.lieux dd { margin: 0; color: var(--gris); }

.photos-ligne { display: grid; gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 1.5rem; }
.photos-ligne img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }

.liste-sobre { padding-left: 1.2rem; }
.liste-sobre li { margin-bottom: .35rem; }

.docs { list-style: none; padding: 0; margin: 1rem 0; }
.docs li { padding-block: .55rem; border-bottom: 1px solid #b9bcbf; }
.docs a { font-weight: 600; }

/* Responsive */
@media (max-width: 900px) {
  .ouverture { grid-template-columns: minmax(0, 1fr); }
  .ouverture figure img { height: auto; }
  .ouverture h1 { font-size: clamp(2.2rem, 10vw, 5rem); }
  .ouverture-texte { padding-left: clamp(1rem, 4vw, 2.5rem); }
  .ouverture figure img { min-height: 0; aspect-ratio: 2 / 1; }
  .versants { grid-template-columns: minmax(0, 1fr); }
  .bande-piste img { min-height: 12rem; object-fit: cover; }
  .bande-piste figcaption { display: block; }
  .bande-piste figcaption::before { content: none; }
  .bande-piste figcaption span {
    display: block; border-left: 0; padding-bottom: .55rem;
    background: var(--bitume); color: var(--noir);
  }
  .bande-piste + .versants { border-top: 3px solid var(--noir); }
  .versant.plaine { border-left: 0; border-top: 3px solid var(--noir); }
  .deux-col, .deux-col.inverse { grid-template-columns: minmax(0, 1fr); }
  .cycles { grid-template-columns: 1fr 1fr; }
  .cycles li { border-right: 0; border-bottom: 1px solid #b9bcbf; padding-left: 0; }
  .cycles li.actuel { padding-left: 1rem; }
}
@media (max-width: 700px) {
  .semaine thead { display: none; }
  .semaine, .semaine tbody, .semaine tr, .semaine th, .semaine td {
    display: block; width: auto;
  }
  .semaine tr { border-top: 2px solid var(--noir); padding-block: .8rem; }
  .semaine th, .semaine td { border: 0; padding: .1rem 0; }
  .semaine tbody th { margin-bottom: .3rem; width: auto; }
  .semaine caption { display: block; }
  .ouverture figcaption { position: static; max-width: none; }
  .etapes { grid-template-columns: 1fr; }
  .etapes li { margin-right: 0; }
  .temoignages { grid-template-columns: 1fr; }
  .lieux { grid-template-columns: 1fr; }
  .photos-ligne { grid-template-columns: 1fr 1fr; }
  .contact dl { grid-template-columns: 1fr; gap: 0 1rem; }
  .contact dd { margin-bottom: .6rem; }
}
@media (max-width: 480px) {
  .cycles { grid-template-columns: 1fr; }
  .marque img { width: 44px; height: 44px; }
  .marque span { font-size: 1.05rem; }
  .nav ul { gap: .25rem 1rem; }
  .photos-ligne { grid-template-columns: 1fr; }
  .resultats thead { display: none; }
  .resultats, .resultats tbody, .resultats tr, .resultats td,
  .resultats tbody th { display: block; }
  .resultats tr { border-bottom: 1px solid #b9bcbf; padding-block: .5rem; }
  .resultats td, .resultats tbody th { border: 0; padding: .05rem 0; }
  .resultats td.nb { text-align: left; }
}

@media print {
  .bandeau-maquette, .nav { display: none; }
}
