/* Trail de Trilport 2027 — feuille de style
   Aucune ressource externe : polices hébergées avec la page. */

@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/inter-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 800; font-display: swap; src: url("../fonts/inter-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 900; font-display: swap; src: url("../fonts/inter-latin-900-normal.woff2") format("woff2"); }

:root {
  --forest: #0A4226;
  --forest-2: #135A35;
  --anis: #BBD649;
  --anis-hover: #CBE35E;
  --forest-deep: #06301B;
  --band: #1E7A45;
  --cream: #F4F1E8;
  --paper: #FFFFFF;
  --line: rgba(10, 66, 38, .14);
  --muted: #47594D;
  --d6: #5399D1;
  --d9: #5FBB53;
  --d18: #D11F43;
  --r-xl: 0;
  --r-l: 0;
  --r-m: 0;
  --wrap: 1280px;
  --gap: clamp(16px, 3vw, 28px);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --shadow: 0 1px 0 rgba(10, 66, 38, .06), 0 18px 40px -24px rgba(10, 66, 38, .45);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--cream); color: var(--forest);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 1.0625rem; line-height: 1.55; font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; letter-spacing: -0.03em; line-height: 1; }
h2 { font-size: clamp(2.1rem, 5vw, 3.6rem); font-weight: 900; }
h3 { font-size: 1.35rem; font-weight: 800; letter-spacing: -0.015em; }
.wrap { width: min(100% - 2 * var(--gap), var(--wrap)); margin-inline: auto; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--forest); color: #fff; padding: 10px 18px; border-radius: 0; font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--d6); outline-offset: 3px; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 52px; padding: .75em 1.45em; border-radius: 0; border: 2px solid transparent;
  font: inherit; font-weight: 800; font-size: 1rem; text-decoration: none; cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 200ms ease, border-color 200ms ease, color 200ms ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.97); }
.btn svg { width: 1.1em; height: 1.1em; flex: none; }
.btn-sm { min-height: 44px; padding: .55em 1.15em; font-size: .95rem; }
.btn-wide { width: 100%; }
.btn-forest { background: var(--forest); color: #fff; }
.btn-anis { background: var(--anis); color: var(--forest); }
.btn-ghost { border-color: var(--line); color: var(--forest); background: transparent; }
.btn-line-light { border-color: rgba(255, 255, 255, .35); color: #fff; }
@media (hover: hover) and (pointer: fine) {
  .btn-forest:hover { background: var(--forest-2); }
  .btn-anis:hover { background: var(--anis-hover); }
  .btn-ghost:hover { border-color: var(--forest); }
  .btn-line-light:hover { border-color: #fff; }
}

/* ---------- En-tête ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(244, 241, 232, .9); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); }
.site-header .wrap { display: flex; align-items: center; gap: 16px; min-height: 72px; }
.brand { display: flex; text-decoration: none; }
.brand img { height: 40px; width: auto; }
.nav { display: none; gap: 2px; margin-left: auto; }
.nav a { padding: 8px 14px; border-radius: 0; text-decoration: none; font-weight: 600; font-size: .95rem; transition: background-color 200ms ease; }
.site-header .btn { margin-left: auto; }
@media (min-width: 820px) { .nav { display: flex; } .site-header .btn { margin-left: 6px; } }

/* ---------- Accueil ---------- */
.hero { padding-top: clamp(24px, 5vw, 56px); }
.hero-grid { display: grid; gap: 40px; align-items: center; }

.lead { font-size: clamp(1.1rem, 1.8vw, 1.3rem); color: var(--muted); max-width: 34ch; margin: 26px 0 30px; line-height: 1.45; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Le dossard : le seul élément incliné de la page */
.bib {
  position: relative; justify-self: center; width: min(100%, 340px);
  background: var(--paper); border-radius: var(--r-l); box-shadow: var(--shadow);
  padding: 30px 28px 26px; transform: rotate(-3deg); text-align: center;
}
.pin { position: absolute; width: 10px; height: 10px; background: var(--cream); box-shadow: inset 0 1px 2px rgba(10, 66, 38, .35); }
.p1 { top: 14px; left: 14px; } .p2 { top: 14px; right: 14px; } .p3 { bottom: 14px; left: 14px; } .p4 { bottom: 14px; right: 14px; }
.bib-top { margin: 0 0 10px; font-weight: 800; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.bib-num { margin: 0; font-size: clamp(5rem, 16vw, 6.6rem); font-weight: 900; letter-spacing: -0.06em; line-height: .9; font-variant-numeric: tabular-nums; }
.bib-num span { color: var(--anis); }
.bib-day { margin: 10px 0 0; font-weight: 800; }
.bib-cd { display: grid; gap: 2px; margin-top: 18px; padding-top: 16px; border-top: 2px dashed var(--line); }
.bib-cd[hidden] { display: none; }
.cd-label { font-size: .82rem; color: var(--muted); font-weight: 600; }
.cd-vals { font-weight: 600; font-size: 1.05rem; }
.cd-vals b { font-weight: 900; font-size: 1.35rem; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.cd-done { margin: 18px 0 0; padding-top: 16px; border-top: 2px dashed var(--line); font-weight: 800; }

.photo-band { position: relative; margin: clamp(40px, 6vw, 72px) 0 0; height: clamp(260px, 46vw, 520px); border-radius: var(--r-xl); overflow: hidden; background: var(--forest); }
.photo-band img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 28%; }

/* ---------- Sections ---------- */
.section { padding-top: clamp(72px, 10vw, 128px); }
.head { display: grid; gap: 14px; margin-bottom: 32px; }
@media (min-width: 900px) { .head { grid-template-columns: 1fr 1fr; align-items: end; gap: 48px; } }
.head p { margin: 0; color: var(--muted); font-size: 1.1rem; max-width: 44ch; }

/* ---------- Choix de la distance (onglets) ---------- */
.seg { position: relative; display: inline-block; max-width: 100%; margin-bottom: 18px; }
.seg-list { display: flex; gap: 0; padding: 0; background: var(--paper); border: 2px solid var(--forest); }
.seg-tab {
  display: inline-flex; align-items: center; gap: .55em; min-height: 52px; padding: 0 1.35em;
  border: 0; border-radius: 0; background: transparent; color: var(--forest);
  font: inherit; font-weight: 900; font-size: 1.15rem; letter-spacing: -0.02em; cursor: pointer; white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.seg-tab i { width: 10px; height: 10px; flex: none; }
.seg-list .seg-tab:nth-child(1) i { background: var(--d18); }
.seg-list .seg-tab:nth-child(2) i { background: var(--d9); }
.seg-list .seg-tab:nth-child(3) i { background: var(--d6); }
/* Copie « active » superposée, découpée sur l'onglet choisi (transition de couleur sans à-coup) */
.seg-overlay { position: absolute; inset: 0; pointer-events: none; background: var(--forest); border-color: var(--forest); display: none;
  clip-path: inset(0 var(--r, 100%) 0 var(--l, 0)); transition: clip-path 260ms var(--ease-out); }
.seg-overlay .seg-tab { color: #fff; }
.seg.is-ready .seg-overlay { display: flex; }
.seg.no-anim .seg-overlay { transition: none; }

.panels { display: grid; gap: var(--gap); }
.panel { position: relative; background: var(--paper); border-radius: var(--r-xl); box-shadow: var(--shadow); padding: clamp(24px, 4vw, 44px); display: grid; gap: 28px; }
.panel::before { content: ""; position: absolute; left: clamp(24px, 4vw, 44px); top: 0; width: 64px; height: 6px;  background: var(--c); }
.panel.r18 { --c: var(--d18); } .panel.r9 { --c: var(--d9); } .panel.r6 { --c: var(--d6); }
.panel-main { display: grid; gap: 18px; align-items: end; }
@media (min-width: 760px) { .panel-main { grid-template-columns: auto 1fr; gap: 36px; } }
.panel-main .panel-km { color: var(--forest); }
.panel-km { margin: 0; font-size: clamp(5rem, 13vw, 8.5rem); font-weight: 900; letter-spacing: -0.06em; line-height: .82; }
.panel-km small { font-size: .3em; letter-spacing: -0.01em; margin-left: .06em; }
.panel h3 { margin-bottom: 8px; }
.panel-main p { margin: 0; color: var(--muted); max-width: 40ch; }
.tiles { margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 760px) { .tiles { grid-template-columns: repeat(4, 1fr); } }
.tiles div { background: var(--cream); border-radius: var(--r-m); padding: 14px 16px; }
.tiles dt { font-size: .8rem; font-weight: 600; color: var(--muted); }
.tiles dd { margin: 2px 0 0; font-weight: 900; font-size: 1.15rem; letter-spacing: -0.01em; line-height: 1.25; }
.panel .btn { justify-self: start; width: auto; }
/* Avec le script : un seul panneau visible ; sans script, les trois restent affichés */
.js-tabs .panel[hidden] { display: none; }
.panel.is-entering { animation: panel-in 220ms var(--ease-out); }
@keyframes panel-in { from { opacity: 0; transform: translateY(6px); } }
.note { margin: 20px 0 0; padding: 16px 20px; border-radius: var(--r-m); border: 1px solid var(--line); font-size: .98rem; color: var(--muted); }
.note strong { color: var(--forest); font-weight: 800; }

/* ---------- Tracés à venir ---------- */
.soon { display: grid; gap: 28px; padding: clamp(28px, 5vw, 56px); border-radius: var(--r-xl); background: var(--forest); color: #fff; overflow: hidden; }
@media (min-width: 900px) { .soon { grid-template-columns: 1.2fr 1fr; align-items: center; } .soon-line { grid-column: 1 / -1; } }
.soon-line { width: 100%; height: auto; }
.soon-line path { fill: none; stroke: var(--anis); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 1 16; }
.soon-line circle { fill: #fff; }
.soon h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
.soon-copy p { margin: 14px 0 0; color: rgba(255, 255, 255, .8); max-width: 44ch; }
.soon-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.soon-list li { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: var(--r-m); background: rgba(255, 255, 255, .07); font-weight: 900; font-size: 1.15rem; }
.soon-list i { width: 10px; height: 10px; }
.soon-list .d18 { background: var(--d18); } .soon-list .d9 { background: var(--d9); } .soon-list .d6 { background: var(--d6); }
.soon-list span { margin-left: auto; font-weight: 600; font-size: .85rem; color: rgba(255, 255, 255, .7); }

/* ---------- Infos ---------- */
.rows { margin: 0; border-top: 1px solid var(--line); }
.rows div { display: grid; gap: 4px; padding: 22px 0; border-bottom: 1px solid var(--line); }
@media (min-width: 760px) { .rows div { grid-template-columns: 260px 1fr; gap: 32px; } }
.rows dt { font-weight: 900; font-size: 1.15rem; letter-spacing: -0.015em; }
.rows dd { margin: 0; color: var(--muted); max-width: 62ch; }
.inline { color: var(--forest); font-weight: 800; text-underline-offset: 3px; }

/* ---------- Partenaires ---------- */
.small-title { font-size: 1.35rem; font-weight: 900; letter-spacing: -0.015em; margin-bottom: 18px; }
.partners { list-style: none; margin: 0; padding: 22px; display: flex; flex-wrap: wrap; justify-content: space-around; align-items: center; gap: 22px 36px; background: var(--paper); border-radius: var(--r-xl); }
.partners img { height: 52px; width: auto; }

/* ---------- Réseaux ---------- */
.follow { padding-top: clamp(72px, 10vw, 128px); }
.follow-panel { display: grid; gap: 18px; justify-items: start; padding: clamp(28px, 5vw, 56px); border-radius: var(--r-xl); background: var(--anis); }
.follow-panel h2 { font-size: clamp(2.1rem, 5vw, 3.6rem); }
.follow-panel p { margin: 0; max-width: 52ch; font-size: 1.1rem; }
.follow-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.follow-panel .btn-anis { background: var(--forest); color: #fff; }
.follow-panel .btn-line-light { border-color: var(--forest); color: var(--forest); }
@media (hover: hover) and (pointer: fine) {
  .follow-panel .btn-anis:hover { background: var(--forest-2); }
  .follow-panel .btn-line-light:hover { background: rgba(10, 66, 38, .08); }
}

/* ---------- Pied de page ---------- */
.site-footer { padding: 44px 0 40px; margin-top: 64px; border-top: 1px solid var(--line); font-size: .95rem; }
.site-footer .wrap { display: grid; gap: 22px; }
@media (min-width: 900px) { .site-footer .wrap { grid-template-columns: auto 1fr auto; align-items: center; gap: 40px; } }
.site-footer img { height: 44px; width: auto; }
.site-footer address { font-style: normal; color: var(--muted); }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; padding: 0; list-style: none; }
.foot-links a { font-weight: 600; text-underline-offset: 3px; }

/* ---------- Pages de texte (mentions légales, 404) ---------- */
.doc { padding: 24px 0 0; }
.doc-panel { background: var(--paper); border-radius: var(--r-xl); padding: clamp(24px, 5vw, 64px); box-shadow: var(--shadow); max-width: 860px; margin-inline: auto; }
.doc h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 900; margin-bottom: 18px; }
.doc h2 { font-size: 1.5rem; font-weight: 900; margin: 40px 0 12px; padding-top: 8px; }
.doc p, .doc li { color: #24392C; }
.doc ul { padding-left: 1.2em; }
.doc li { margin-bottom: .4em; }
.doc .back { display: inline-flex; margin-bottom: 24px; font-weight: 800; text-decoration: none; }
.doc .back:hover { text-decoration: underline; }

/* ---------- Entrée de la page (vue une fois par visite) ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
@keyframes bib-in { from { opacity: 0; transform: translateY(14px) rotate(1deg); } }
@keyframes reveal { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes fade { from { opacity: 0; } }
.hero .lead { animation: rise 320ms 170ms var(--ease-out) both; }
.hero-actions { animation: rise 320ms 210ms var(--ease-out) both; }
.bib { animation: bib-in 520ms 160ms var(--ease-out) both; }
.photo-band { animation: reveal 800ms 220ms var(--ease-in-out) both; }
@media (prefers-reduced-motion: reduce) {
  .hero h1, .hero-date, .hero .lead, .runners, .nature, .hero-actions, .bib, .photo-band { animation: fade 200ms ease both; animation-delay: 0ms; }
  .btn:active { transform: none; }
  .seg-overlay { transition: none; }
  .panel.is-entering { animation: fade 150ms ease; }
}

.seg-list .seg-tab + .seg-tab { border-left: 2px solid var(--forest); }
.seg-overlay .seg-tab + .seg-tab { border-left-color: transparent; }

/* ---------- v3 : finitions ---------- */
::selection { background: var(--anis); color: var(--forest); }
html { accent-color: var(--forest); }
a { text-decoration-thickness: 2px; text-underline-offset: 4px; }

/* Liens du menu : un trait qui se dessine sous le lien, à la souris */
.nav a { position: relative; }
.nav a::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 2px; background: var(--forest);
  transform: scaleX(0); transform-origin: left; transition: transform 220ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .nav a:hover::after { transform: scaleX(1); } }

/* Partenaires : logos sur fond blanc, séparés par des filets */
.partners { padding: 0; gap: 0; justify-content: stretch; }
.partners li { flex: 1 1 160px; display: grid; place-items: center; min-height: 112px; padding: 22px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* ---------- Vidéo (chargée seulement au clic) ---------- */
.film { position: relative; aspect-ratio: 16 / 9; background: var(--forest-deep); overflow: hidden; }
.film iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.film-play { position: absolute; inset: 0; width: 100%; display: grid; align-content: end; justify-items: start; gap: clamp(18px, 3vw, 28px);
  padding: clamp(22px, 5vw, 56px); border: 0; background: var(--forest); color: #fff; font: inherit; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.film-title { position: relative; font-size: clamp(2rem, 6vw, 4.6rem); font-weight: 900; letter-spacing: -0.045em; line-height: .92; }
.film-btn { position: relative; display: inline-flex; align-items: center; gap: .6em; min-height: 56px; padding: 0 1.4em 0 1.1em;
  background: var(--anis); color: var(--forest); font-weight: 900; font-size: 1.05rem; transition: transform 160ms var(--ease-out), background-color 200ms ease; }
.film-btn svg { width: 1.3em; height: 1.3em; }
.film-play:active .film-btn { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) {
  .film-play:hover .film-btn { background: var(--anis-hover); }
  .film-play:hover }
.film-play:focus-visible { outline-offset: -6px; outline-color: var(--anis); }
.film-note { margin: 14px 0 0; font-size: .92rem; color: var(--muted); max-width: 70ch; }

.foot-credit { grid-column: 1 / -1; margin: 0; font-size: .85rem; color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
    .film-play:active .film-btn { transform: none; }
}

/* ---------- Accueil, d'après le flyer 2027 ---------- */
.hero { background: var(--forest); color: #fff; padding-top: clamp(32px, 6vw, 72px); padding-bottom: clamp(40px, 6vw, 72px); overflow: hidden; }
.hero-grid { align-items: start; }
.hero-date { margin: 0 0 14px; color: var(--anis); font-weight: 900; font-size: clamp(1.4rem, 3.2vw, 2.5rem); letter-spacing: -0.01em; text-transform: uppercase; line-height: 1; }
.hero h1 { text-transform: uppercase; font-weight: 900; line-height: .84; letter-spacing: -0.04em; }
.hero h1 .t1 { display: block; font-size: clamp(5.2rem, 19vw, 13rem); letter-spacing: -0.035em; }
.hero h1 .t2 { display: inline-flex; align-items: center; gap: .14em; font-size: clamp(2.5rem, 9vw, 6.2rem); letter-spacing: -0.02em; }
.t-year { writing-mode: vertical-rl; transform: rotate(180deg); font-size: .3em; letter-spacing: .02em; line-height: 1; padding: .2em .12em; background: #fff; color: var(--forest); }
.hero .lead { color: rgba(255, 255, 255, .86); max-width: 38ch; }
.hero .btn-line-light { border-color: rgba(255, 255, 255, .45); }
@media (hover: hover) and (pointer: fine) { .hero .btn-line-light:hover { border-color: #fff; background: rgba(255, 255, 255, .06); } }
.hero .bib { color: var(--forest); margin-top: 12px; }


/* La scène : photo de la forêt, les deux coureurs du flyer posés dessus */
.stage { position: relative; margin-top: clamp(32px, 5vw, 64px); padding-top: clamp(110px, 13vw, 170px); }
.scene { position: relative; }
.stage .photo-band { margin: 0; }
.runners { position: absolute; z-index: 2; right: clamp(8px, 5vw, 64px); bottom: 3%; width: min(78%, 690px); pointer-events: none; }
.runners img { width: 100%; height: auto; filter: drop-shadow(0 18px 24px rgba(0, 0, 0, .28)); }
.nature { position: absolute; z-index: 3; left: 0; top: clamp(0px, 3vw, 24px); margin: 0; display: grid; justify-items: start; gap: 6px; transform: rotate(-6deg); transform-origin: left bottom; }
.nature-big { font-weight: 900; font-size: clamp(1.6rem, 4vw, 2.8rem); text-transform: uppercase; letter-spacing: -0.01em; line-height: 1; color: #fff; }
.nature-small { background: var(--anis); color: var(--forest); font-weight: 600; font-size: clamp(.95rem, 1.6vw, 1.1rem); line-height: 1.2; padding: 10px 16px; }
.nature-small strong { font-weight: 900; }

/* Les trois distances, sur leurs barres de couleur, comme au bas du flyer */
.dist-bars { list-style: none; margin: 0; padding: 22px 0 0; display: grid; gap: 18px; color: #fff; }
@media (min-width: 640px) { .dist-bars { grid-template-columns: repeat(3, 1fr); gap: 24px; } }
.dist-bars li { border-top: 6px solid var(--c); padding-top: 10px; font-weight: 600; font-size: 1rem; color: rgba(255, 255, 255, .86); }
.dist-bars b { display: block; color: #fff; font-weight: 900; font-size: 1.15rem; }
.dist-bars .b6 { --c: var(--d6); } .dist-bars .b9 { --c: var(--d9); } .dist-bars .b18 { --c: var(--d18); }

@keyframes run-in { from { opacity: 0; transform: translateX(-48px); } }
@keyframes tag-in { from { opacity: 0; transform: rotate(-6deg) translateY(12px); } }
.hero-date { animation: rise 320ms var(--ease-out) both; }
.hero h1 { animation: rise 380ms 60ms var(--ease-out) both; }
.runners { animation: run-in 900ms 300ms var(--ease-out) both; }
.nature { animation: tag-in 420ms 700ms var(--ease-out) both; }

/* Panneaux des distances : barre de couleur sur toute la largeur */
.panel::before { left: 0; right: 0; width: auto; height: 8px; }

/* Vidéo : barres des trois distances au lieu du tracé (réservé à « Parcours ») */
.film-play { background: var(--forest-deep); }
.film-bars { position: absolute; left: clamp(22px, 5vw, 56px); right: clamp(22px, 5vw, 56px); top: clamp(22px, 5vw, 56px); display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.film-bars i { height: 6px; }
.film-bars i:nth-child(1) { background: var(--d6); } .film-bars i:nth-child(2) { background: var(--d9); } .film-bars i:nth-child(3) { background: var(--d18); }
.film-title { text-transform: uppercase; letter-spacing: -0.03em; }

/* Bandeau vert du bas, comme sur le flyer */
.band { margin: clamp(56px, 8vw, 96px) 0 0; background: var(--band); text-align: center; }
.band a { display: block; padding: 22px var(--gap); color: #fff; font-weight: 900; text-transform: uppercase; letter-spacing: .01em; text-decoration: none; font-size: clamp(1rem, 2vw, 1.25rem); }
@media (hover: hover) and (pointer: fine) { .band a:hover { text-decoration: underline; } }
main:has(.band) + .site-footer { margin-top: 0; border-top: 0; }

/* Titres de section en capitales, comme sur le flyer */
.section h2, .follow-panel h2, .soon h2 { text-transform: uppercase; letter-spacing: -0.025em; line-height: .92; }
.doc h2, .doc h1 { text-transform: none; }
@media (max-width: 639px) {
  .runners { width: 100%; right: 0; }
  .nature-small { max-width: 20ch; }
  .stage { padding-top: 150px; }
}

/* Compte à rebours avec secondes : chiffres de largeur fixe, aucun saut */
.cd-vals b { display: inline-block; min-width: 1.25em; text-align: right; }
.cd-vals #cd-d { min-width: 0; }

/* ---------- Photos de l'édition 2024 ---------- */
.panel-photo, .gallery-item, .wide-photo { margin: 0; overflow: hidden; background: var(--forest); }
.panel-photo img, .gallery-item img, .wide-photo img { width: 100%; height: 100%; object-fit: cover; }
.panel-photo { aspect-ratio: 4 / 3; }
@media (min-width: 900px) {
  .panel { grid-template-columns: minmax(0, 1fr) minmax(0, 440px); column-gap: clamp(28px, 4vw, 48px); }
  .panel > * { grid-column: 1; }
  .panel > .panel-photo { grid-column: 2; grid-row: 1 / span 3; align-self: stretch; aspect-ratio: auto; min-height: 100%; }
  .panel .tiles { grid-template-columns: repeat(2, 1fr); }
}
.gallery { list-style: none; margin: clamp(28px, 4vw, 44px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(8px, 1.4vw, 16px); }
@media (min-width: 900px) { .gallery { grid-template-columns: repeat(4, 1fr); } }
.gallery-item { aspect-ratio: 1; }
.wide-photo { aspect-ratio: 21 / 9; margin-bottom: 28px; }
@media (max-width: 639px) { .wide-photo { aspect-ratio: 16 / 9; } }
.panel-photo picture, .gallery-item picture, .wide-photo picture { display: block; height: 100%; }

/* ---------- Accueil sur grand écran : tout le premier écran d'un coup d'œil ---------- */
.hero-grid { grid-template-areas: "copy" "bib" "stage" "bars"; }
.hero-copy { grid-area: copy; } .hero .bib { grid-area: bib; } .stage { grid-area: stage; } .dist-bars { grid-area: bars; }
.stage { margin-top: 0; }
@media (min-width: 1100px) {
  .hero { padding-top: clamp(28px, 4vh, 48px); padding-bottom: clamp(32px, 5vh, 56px); }
  .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); grid-template-areas: "copy stage" "bib stage" "bib bars"; column-gap: clamp(40px, 5vw, 80px); row-gap: 28px; align-items: start; }
  .hero h1 .t1 { font-size: clamp(7rem, 10.5vw, 11.5rem); }
  .hero h1 .t2 { font-size: clamp(3.4rem, 5vw, 5.4rem); }
  .hero .lead { margin: 22px 0 26px; }
  /* Le dossard devient horizontal, comme un vrai dossard */
  .hero .bib { justify-self: start; align-self: start; width: min(100%, 520px); margin: 8px 0 0 6px; padding: 22px 26px; display: grid; grid-template-columns: auto 1fr; column-gap: 26px; align-items: center; text-align: left; transform: rotate(-2deg); }
  .hero .bib .bib-top { grid-column: 1 / -1; margin-bottom: 6px; }
  .hero .bib .bib-num { grid-column: 1; grid-row: 2 / span 2; font-size: 5.6rem; }
  .hero .bib .bib-day { grid-column: 2; margin: 0; }
  .hero .bib .bib-cd, .hero .bib .cd-done { grid-column: 2; margin-top: 8px; padding-top: 8px; }
  .stage { padding-top: 112px; }
  .stage .photo-band { height: clamp(380px, 52vh, 520px); }
  .runners { width: 96%; right: -2%; bottom: 2%; }
  .nature { top: 0; }
  .dist-bars { padding-top: 0; grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .dist-bars li { font-size: .95rem; }
}
@media (min-width: 1100px) {
  .runners { width: 82%; right: -3%; }
  .nature { left: -10px; }
  .nature-big { font-size: 2.2rem; }
  .nature-small { font-size: .95rem; max-width: 24ch; }
}

/* Partenaire unique : logo et une phrase, sur fond blanc */
div.partners { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 32px; padding: 24px clamp(20px, 3vw, 32px); background: var(--paper); justify-content: flex-start; }
div.partners img { height: 72px; width: auto; }
div.partners p { margin: 0; max-width: 52ch; color: var(--muted); font-size: 1.05rem; }
@media (max-width: 639px) { .stage { padding-top: 196px; } .nature-small { max-width: 24ch; } }

/* ---------- Typographie (revue better-typography) ---------- */
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
h1, h2, h3, .lead, .head p, .film-title, .nature-small, .panel-main p { text-wrap: balance; }
p, dd, li { text-wrap: pretty; }
.doc p, .doc li { max-width: 68ch; }
.nature-small { line-height: 1.3; }
.cd-vals, .bib-num, .dist-bars li { font-variant-numeric: tabular-nums; }
a { text-decoration-thickness: from-font; text-underline-offset: .22em; }
.inline, .foot-links a { text-decoration-thickness: 2px; }
.rows dd a, .note a { overflow-wrap: anywhere; }
.film-note a { overflow-wrap: anywhere; }
.btn, .seg-tab, .nav a { white-space: nowrap; }
@media (max-width: 380px) { .btn { white-space: normal; text-align: center; } }
@media (max-width: 420px) {
  .seg { display: block; }
  .seg-list .seg-tab, .seg-overlay .seg-tab { flex: 1 1 0; justify-content: center; padding: 0 .6em; font-size: 1.05rem; }
}
.nowrap { white-space: nowrap; }

/* ---------- Tablette et petit écran d'ordinateur (820 à 1099 px) ----------
   Titre et dossard côte à côte, puis la scène des coureurs sur toute la largeur. */
@media (min-width: 820px) and (max-width: 1099px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr) 320px; grid-template-areas: "copy bib" "stage stage" "bars bars"; column-gap: 48px; row-gap: 32px; align-items: center; }
  .hero .bib { margin-top: 0; }
  .stage { padding-top: 150px; }
  .stage .photo-band { height: clamp(340px, 44vw, 460px); }
  .runners { width: 70%; right: 2%; }
  .dist-bars { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Ajustements par largeur (revue adapt) ---------- */
.cd-vals { white-space: nowrap; }
@media (min-width: 1100px) and (max-width: 1279px) {
  .hero .bib .bib-num { font-size: 4.6rem; }
  .hero .bib { column-gap: 20px; padding: 20px 22px; }
}
@media (min-width: 640px) and (max-width: 1099px) {
  .hero .bib { justify-self: start; }
  .stage { padding-top: 170px; }
  .stage .photo-band { height: clamp(320px, 44vw, 460px); }
  .runners { width: 64%; right: 2%; }
  .nature-big { font-size: 2.2rem; }
  .nature-small { max-width: 22ch; font-size: 1rem; }
}
