/* ==========================================================================
   Tour de France 2026 · style
   La Libre · Cyclisme
   Marque : #d30c43 · accent course (maillot jaune) : #ffcc00
   Zéro caractère em-dash dans tout le fichier.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Polices auto-hébergées (aucun CDN Google)
   Oswald · titres / Average Sans · texte / Inconsolata · menu, labels, data
   -------------------------------------------------------------------------- */
@font-face { font-family:'Oswald'; font-style:normal; font-weight:500;
  font-display:swap; src:url('fonts/oswald-latin-500-normal.woff2') format('woff2'); unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family:'Oswald'; font-style:normal; font-weight:500;
  font-display:swap; src:url('fonts/oswald-latin-ext-500-normal.woff2') format('woff2'); unicode-range:U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family:'Oswald'; font-style:normal; font-weight:600;
  font-display:swap; src:url('fonts/oswald-latin-600-normal.woff2') format('woff2'); unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+2000-206F,U+20AC,U+2122; }
@font-face { font-family:'Oswald'; font-style:normal; font-weight:600;
  font-display:swap; src:url('fonts/oswald-latin-ext-600-normal.woff2') format('woff2'); unicode-range:U+0100-024F,U+1E00-1EFF,U+20A0-20CF,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family:'Oswald'; font-style:normal; font-weight:700;
  font-display:swap; src:url('fonts/oswald-latin-700-normal.woff2') format('woff2'); unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+2000-206F,U+20AC,U+2122; }
@font-face { font-family:'Oswald'; font-style:normal; font-weight:700;
  font-display:swap; src:url('fonts/oswald-latin-ext-700-normal.woff2') format('woff2'); unicode-range:U+0100-024F,U+1E00-1EFF,U+20A0-20CF,U+2C60-2C7F,U+A720-A7FF; }

@font-face { font-family:'Average Sans'; font-style:normal; font-weight:400;
  font-display:swap; src:url('fonts/average-sans-latin-400-normal.woff2') format('woff2'); unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+2000-206F,U+20AC,U+2122; }
@font-face { font-family:'Average Sans'; font-style:normal; font-weight:400;
  font-display:swap; src:url('fonts/average-sans-latin-ext-400-normal.woff2') format('woff2'); unicode-range:U+0100-024F,U+1E00-1EFF,U+20A0-20CF,U+2C60-2C7F,U+A720-A7FF; }

@font-face { font-family:'Inconsolata'; font-style:normal; font-weight:400;
  font-display:swap; src:url('fonts/inconsolata-latin-400-normal.woff2') format('woff2'); unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+2000-206F,U+20AC,U+2122; }
@font-face { font-family:'Inconsolata'; font-style:normal; font-weight:400;
  font-display:swap; src:url('fonts/inconsolata-latin-ext-400-normal.woff2') format('woff2'); unicode-range:U+0100-024F,U+1E00-1EFF,U+20A0-20CF,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family:'Inconsolata'; font-style:normal; font-weight:700;
  font-display:swap; src:url('fonts/inconsolata-latin-700-normal.woff2') format('woff2'); unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+2000-206F,U+20AC,U+2122; }
@font-face { font-family:'Inconsolata'; font-style:normal; font-weight:700;
  font-display:swap; src:url('fonts/inconsolata-latin-ext-700-normal.woff2') format('woff2'); unicode-range:U+0100-024F,U+1E00-1EFF,U+20A0-20CF,U+2C60-2C7F,U+A720-A7FF; }

/* --------------------------------------------------------------------------
   Jetons de thème
   -------------------------------------------------------------------------- */
:root {
  --ink: #16130f;            /* sombre fixe : topbar, hero, footer */
  --red: #d30c43;            /* marque + montagne + flamme rouge */
  --jaune: #ffcc00;          /* maillot jaune : chrono, tracé, touches */
  --jaune-deep: #e0a900;
  --vert: #1b9e57;           /* plaine */
  --ardoise: #6a7689;        /* accidentée */

  --display: 'Oswald', 'Helvetica Neue', 'Arial Narrow', system-ui, sans-serif;
  --body: 'Average Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --mono: 'Inconsolata', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  --top: 58px;
  --maxw: 1320px;

  /* clair (défaut) */
  --bg: #f4f2ec;
  --surface: #ffffff;
  --surface-2: #faf8f2;
  --text: #16130f;
  --muted: #5d574e;
  --line: #e3ded3;
  --map-shell: #e9e5db;
  --shadow: rgba(0,0,0,.10);
}

html[data-theme="dark"] {
  --bg: #131110;
  --surface: #1e1a16;
  --surface-2: #181411;
  --text: #f1ede4;
  --muted: #a99f92;
  --line: #2d2720;
  --map-shell: #0f0d0b;
  --shadow: rgba(0,0,0,.5);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--body);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.55;
  transition: background .25s ease, color .25s ease;
}
a { color: inherit; }

/* --------------------------------------------------------------------------
   Topbar
   -------------------------------------------------------------------------- */
.topbar {
  position: sticky; top: 0; z-index: 1000;
  height: var(--top);
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: nowrap;
  padding: 0 clamp(14px, 3vw, 34px);
  background: var(--ink); color: #fff;
  border-bottom: 2px solid var(--red);
}
.topbar-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; white-space: nowrap; }
.brand-mark { font-family: var(--display); font-weight: 700; font-size: 19px; text-transform: uppercase; letter-spacing: .02em; }
/* Logo La Libre (png/svg). La topbar est toujours sombre, donc on force le
   logo en blanc. Retire le filtre si ton fichier est déjà clair. */
.topbar-brand img { height: 22px; width: auto; display: block; filter: brightness(0) invert(1); }
.brand-sep { opacity: .5; }
.brand-kicker { font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--jaune); }

.topbar-nav { display: flex; gap: 20px; margin-left: auto; flex-wrap: nowrap; }
.topbar-nav a {
  font-family: var(--mono); text-decoration: none; font-size: 13px; letter-spacing: .04em;
  color: #d8d2c8; padding: 4px 0; border-bottom: 2px solid transparent; white-space: nowrap;
}
.topbar-nav a:hover { color: #fff; border-bottom-color: var(--jaune); }

.topbar-sep { width: 1px; height: 20px; background: rgba(255,255,255,.22); flex: none; margin: 0 2px; }
.topbar-tools { display: flex; align-items: center; gap: 14px; font-family: var(--mono); flex-wrap: nowrap; }
.meteo { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: #e7e1d6; min-width: 0; }
.meteo-ico { font-size: 15px; line-height: 1; }
.meteo-temp { font-weight: 700; }
.meteo-ville { color: #aaa295; font-size: 11px; letter-spacing: .04em; max-width: 130px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.clock { font-size: 13px; font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; min-width: 46px; text-align: right; }
.dateday { font-size: 12px; font-weight: 600; color: #cfc8bb; letter-spacing: .02em; white-space: nowrap; }
@media (max-width: 480px) { .dateday { display: none; } }

.theme-toggle {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.25); background: transparent; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .15s ease, border-color .15s ease;
}
.theme-toggle:hover { background: rgba(255,255,255,.12); border-color: var(--jaune); }
.theme-ico { width: 16px; height: 16px; display: block; position: relative; }
/* lune (mode clair -> propose le sombre) */
.theme-ico::before {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  box-shadow: inset -5px -2px 0 0 #ffd24a; transform: rotate(-20deg);
}
html[data-theme="dark"] .theme-ico::before {
  /* soleil (mode sombre -> propose le clair) */
  box-shadow: none; background: #ffd24a; inset: 3px;
}
html[data-theme="dark"] .theme-ico::after {
  content: ''; position: absolute; inset: -3px; border-radius: 50%;
  background: radial-gradient(circle, transparent 55%, #ffd24a 56% 60%, transparent 61%);
}

@media (max-width: 900px) { .topbar-nav { display: none; } .topbar-sep { display: none; } }
@media (min-width: 901px) and (max-width: 1100px) {
  .topbar-nav { gap: 13px; }
  .topbar-nav a { font-size: 12px; letter-spacing: .02em; }
  .dateday { display: none; }
  .meteo-ville { display: none; }
}
@media (max-width: 560px) { .meteo-ville { display: none; } .brand-kicker { display: none; } }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative; overflow: hidden;
  background: var(--ink); color: #f4f2ec;
  padding: clamp(48px, 9vw, 110px) clamp(16px, 4vw, 40px) clamp(40px, 7vw, 80px);
}
/* Slot image : déposer img/hero.jpg. Repli dégradé si absente. */
.hero-media {
  position: absolute; inset: 0; z-index: 0;
  background:
    linear-gradient(180deg, rgba(18,15,12,.55) 0%, rgba(18,15,12,.78) 55%, rgba(18,15,12,.96) 100%),
    radial-gradient(1100px 480px at 80% -10%, rgba(211,12,67,.28), transparent 60%),
    image-set(url('img/hero.jpg') 1x);
  background-size: cover; background-position: center; background-repeat: no-repeat;
}
.hero-media { background-image:
    linear-gradient(180deg, rgba(18,15,12,.55) 0%, rgba(18,15,12,.78) 55%, rgba(18,15,12,.96) 100%),
    radial-gradient(1100px 480px at 80% -10%, rgba(211,12,67,.28), transparent 60%),
    url('img/hero.jpg');
}
/*
.hero-media::after {
  content: ''; position: absolute; right: -6%; top: 6%; width: 60%; height: 110%;
  background-image: repeating-linear-gradient(115deg, rgba(255,204,0,.16) 0 2px, transparent 2px 17px);
  -webkit-mask: radial-gradient(120% 90% at 72% 30%, #000 38%, transparent 72%);
          mask: radial-gradient(120% 90% at 72% 30%, #000 38%, transparent 72%);
  transform: rotate(-6deg); opacity: .8;
}
*/
.hero-inner { position: relative; z-index: 2; max-width: var(--maxw); margin: 0 auto; }

.hero-eyebrow { margin: 0 0 18px; font-family: var(--mono); font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: #d7cfc1; }
.hero-eyebrow::before { content: ''; display: inline-block; vertical-align: middle; width: 28px; height: 3px; margin-right: 12px; background: var(--jaune); }

.hero-title {
  font-family: var(--display); font-weight: 700; text-transform: uppercase;
  letter-spacing: .005em; line-height: .88; margin: 0;
  font-size: clamp(56px, 14.5vw, 196px);
}
.hero-title .line-2 { display: block; }
.hero-title em { font-style: normal; color: var(--jaune); }
/* Variante logo : remplace le titre texte, reste responsive */
.hero-title--logo { line-height: 0; }
.hero-title--logo img { display: block; width: clamp(280px, 52vw, 660px); height: auto; max-width: 100%; }

.hero-lede { max-width: 56ch; margin: 26px 0 0; font-size: clamp(16px, 1.7vw, 20px); color: #e7e1d6; }

.hero-stats {
  list-style: none; padding: 0; margin: 42px 0 0;
  display: grid; gap: 1px; grid-template-columns: repeat(4, 1fr);
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.14);
  max-width: 760px;
}
.hero-stats li { background: var(--ink); padding: 18px 20px; }
.stat-num { display: block; font-family: var(--display); font-weight: 700; font-size: clamp(28px, 4vw, 44px); line-height: 1; }
.stat-num::first-letter { color: inherit; }
.hero-stats li:nth-child(1) .stat-num { color: var(--jaune); }
.stat-lab { display: block; margin-top: 6px; font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: #aaa295; }
@media (max-width: 720px) { .hero-stats { grid-template-columns: repeat(2, 1fr); } }

.hero-cta {
  display: inline-block; margin-top: 38px; background: var(--red); color: #fff; text-decoration: none;
  font-family: var(--mono); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; font-size: 14px;
  padding: 14px 26px; border-radius: 2px; transition: transform .18s ease, background .18s ease, border-color .18s ease;
}
.hero-cta:hover { background: #b30a39; transform: translateY(-2px); }

/* Groupe de boutons du hero */
.hero-ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 38px; }
.hero-ctas .hero-cta { margin-top: 0; }
.hero-cta--ghost {
  background: transparent; border: 1.5px solid rgba(255,255,255,.45); color: #fff;
  display: inline-flex; align-items: center; gap: 9px;
}
.hero-cta--ghost:hover { background: rgba(255,255,255,.12); border-color: #fff; }
.hero-cta--ghost i { font-size: 13px; color: var(--jaune); }

/* Mobile : on garde "Explorer le parcours" en entier, les deux autres en icône seule */
@media (max-width: 600px) {
  .hero-cta--ghost .cta-label { display: none; }
  .hero-cta--ghost { gap: 0; padding: 14px 17px; }
  .hero-cta--ghost i { font-size: 16px; }
}

/* --------------------------------------------------------------------------
   Explorer : carte + timeline
   -------------------------------------------------------------------------- */
.explorer { background: var(--bg); }
.explorer .container-fluid { padding: 0; max-width: none; }

.explorer-mapcol { background: var(--map-shell); }
.mapwrap { position: sticky; top: var(--top); height: calc(100vh - var(--top)); }
#map { width: 100%; height: 100%; background: var(--map-shell); }

/* Légende */
.legend {
  position: absolute; left: 16px; bottom: 16px; z-index: 500;
  background: var(--surface); border: 1px solid var(--line); border-radius: 4px;
  padding: 12px 14px; max-width: min(86vw, 330px); box-shadow: 0 6px 24px var(--shadow);
}

/* Bouton vue d'ensemble (haut droite de la carte) */
.map-overview {
  position: absolute; top: 14px; right: 14px; z-index: 500;
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 6px;
  padding: 9px 13px; cursor: pointer; color: var(--text);
  font-family: var(--mono); font-size: 12.5px; letter-spacing: .02em;
  box-shadow: 0 4px 16px var(--shadow); transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.map-overview:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.map-overview i { font-size: 12px; color: var(--jaune-deep); }
.map-overview:hover i { color: var(--jaune); }
@media (max-width: 560px) { .map-overview span { display: none; } .map-overview { padding: 10px; } }
.legend-title { display: block; font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.legend .lg {
  display: inline-flex; align-items: center; gap: 7px; margin: 3px 8px 3px 0; padding: 4px 9px 4px 8px;
  font-family: var(--mono); font-size: 12.5px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--text); cursor: pointer;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.legend .lg::before { content: ''; width: 11px; height: 11px; border-radius: 50%; }
.lg--clm::before { background: var(--jaune); }
.lg--plaine::before { background: var(--vert); }
.lg--accidentee::before { background: var(--ardoise); }
.lg--montagne::before { background: var(--red); }
.legend .lg:hover { background: var(--surface-2); }
.legend .lg.is-on { border-color: var(--text); background: var(--text); color: var(--surface); }
.legend-hint { display: block; margin-top: 8px; font-size: 11px; color: var(--muted); }

/* Bouton filtre (visible seulement sur mobile, voir media query) */
.legend-toggle {
  display: none; position: absolute; left: 16px; bottom: 16px; z-index: 600;
  width: 44px; height: 44px; border-radius: 50%; align-items: center; justify-content: center;
  background: var(--surface); border: 1px solid var(--line); color: var(--text);
  box-shadow: 0 6px 24px var(--shadow); cursor: pointer; font-size: 16px;
}
.legend-toggle.is-open { background: var(--red); border-color: var(--red); color: #fff; }

/* Pastilles d'étape */
.stage-pin {
  display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%;
  background: var(--pin, var(--red)); color: #fff; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.35);
  font-family: var(--display); font-weight: 700; font-size: 13px; transition: transform .16s ease, box-shadow .16s ease;
}
.stage-pin.type-clm { color: #2b2200; }
.stage-pin b { line-height: 1; }
.stage-pin.is-summit { box-shadow: 0 0 0 3px rgba(255,255,255,.85), 0 0 0 5px var(--pin), 0 2px 8px rgba(0,0,0,.4); }
.stage-pin.is-hover { transform: scale(1.22); }
.stage-pin.is-active { transform: scale(1.35); box-shadow: 0 0 0 4px rgba(255,255,255,.9), 0 4px 12px rgba(0,0,0,.45); z-index: 5; }

/* Drapeaux départ et arrivée */
.rl-flag {
  display: flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.4);
  font-size: 11px; line-height: 1;
}
.rl-flag.rl-start { color: var(--vert, #1b9e57); }
.rl-flag.rl-finish { color: #16130f; }
.rl-flag i { display: block; }

/* Popup */
.leaflet-popup-content-wrapper { border-radius: 4px; }
.leaflet-popup-content { margin: 10px 14px; }
.pop { font-family: var(--body); }
.pop-n { display: block; font-family: var(--mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--red); font-weight: 700; }
.pop strong { display: block; font-family: var(--display); font-weight: 600; font-size: 16px; text-transform: uppercase; margin: 2px 0 3px; }
.pop-meta { font-family: var(--mono); font-size: 12px; color: #555; }

/* --------------------------------------------------------------------------
   Timeline
   -------------------------------------------------------------------------- */
.explorer-listcol { background: var(--bg); border-left: 1px solid var(--line); }
.listwrap { padding: clamp(22px, 3vw, 40px) clamp(16px, 2.6vw, 34px) 60px; }
.list-head { margin-bottom: 22px; }
.list-head h2 { font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: .01em; font-size: clamp(26px, 3.4vw, 38px); margin: 0 0 6px; }
.list-head p { margin: 0; color: var(--muted); font-size: 14px; }

.stages { display: flex; flex-direction: column; gap: 10px; }
.stage { position: relative; cursor: pointer; outline: none; perspective: 1600px; }
.stage-inner { position: relative; transition: transform .55s cubic-bezier(.22,1,.36,1); transform-style: preserve-3d; }
.stage.is-flipped .stage-inner { transform: rotateY(180deg); }
.stage-face {
  -webkit-backface-visibility: hidden; backface-visibility: hidden;
  background: var(--surface); border: 1px solid var(--line);
  border-left: 4px solid var(--type, var(--ardoise)); border-radius: 4px;
  transition: box-shadow .16s ease, border-color .16s ease, transform .16s ease;
}
.stage-front { position: relative; display: grid; grid-template-columns: 56px 1fr; gap: 16px; padding: 16px 16px 16px 10px; }
.stage-back { position: absolute; inset: 0; transform: rotateY(180deg); display: flex; flex-direction: column; padding: 12px 14px; overflow: hidden; }
.stage[data-type="clm"] { --type: var(--jaune-deep); }
.stage[data-type="plaine"] { --type: var(--vert); }
.stage[data-type="accidentee"] { --type: var(--ardoise); }
.stage[data-type="montagne"] { --type: var(--red); }
.stage:hover .stage-front { transform: translateX(3px); box-shadow: 0 8px 22px var(--shadow); }
.stage.is-flipped:hover .stage-front { transform: none; box-shadow: none; }
.stage:focus-visible .stage-front { box-shadow: 0 0 0 3px rgba(211,12,67,.4); }
.stage.is-active .stage-front { border-color: var(--type); box-shadow: 0 10px 26px var(--shadow); }

/* Verso de la card (flip) : profil interactif, desktop et mobile */
.flip-toggle {
  display: flex; align-items: center; gap: 7px;
  width: fit-content; margin: 12px 0 0 auto;
  background: var(--text); color: var(--surface); border: 0; border-radius: 3px;
  font-family: var(--mono); font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: .04em;
  padding: 9px 14px; cursor: pointer; transition: opacity .15s ease, transform .15s ease;
}
.flip-toggle:hover { opacity: .85; transform: translateY(-1px); }
.flip-toggle i { font-size: 11px; }
/* En mobile, la card retournée gagne de la hauteur pour un profil lisible */
@media (max-width: 900px) {
  .stage.is-flipped .stage-front { min-height: 340px; }
}
.back-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.back-title { font-family: var(--display); font-weight: 600; font-size: 14px; text-transform: uppercase; line-height: 1.1; }
.flip-back { background: none; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); font-family: var(--mono); font-size: 12px; padding: 5px 9px; cursor: pointer; flex: none; }
.flip-back:hover { color: var(--text); border-color: var(--text); }
.back-prof { position: relative; width: 100%; flex: 1; min-height: 0; }
.back-prof .bg-svg { display: block; width: 100%; height: 100%; }
.bg-area { fill: var(--type); opacity: .14; }
.bg-line { fill: none; stroke: var(--type); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.bg-grid { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.bg-col { fill: var(--red); stroke: var(--surface); stroke-width: 1; }
.bg-cursor { stroke: var(--red); stroke-width: 1; stroke-dasharray: 3 3; opacity: 0; vector-effect: non-scaling-stroke; pointer-events: none; }
.bg-dot { fill: var(--red); opacity: 0; pointer-events: none; }
.bg-tip { position: absolute; pointer-events: none; background: var(--ink); color: #fff; font-family: var(--mono); font-size: 11px; padding: 4px 7px; border-radius: 4px; white-space: nowrap; opacity: 0; transform: translate(-50%, -135%); transition: opacity .1s ease; z-index: 3; }
.bg-tip b { color: var(--jaune); }
.colflag { position: absolute; transform: translate(-50%, -100%); pointer-events: auto; border: 0; padding: 0; background: none; cursor: pointer; transition: transform .15s ease; }
.colflag:hover, .colflag:focus-visible { transform: translate(-50%, -100%) scale(1.28); outline: none; z-index: 3; }
.colflag .cat { display: block; min-width: 15px; height: 15px; line-height: 15px; text-align: center; background: var(--red); color: #fff; font-family: var(--mono); font-weight: 700; font-size: 9px; border-radius: 2px; }
.back-cols { list-style: none; margin: 8px 0 0; padding: 0; overflow: auto; }
.back-cols li { display: flex; align-items: center; gap: 8px; font-size: 12.5px; padding: 3px 0; }
.back-cols .cf { flex: none; min-width: 16px; height: 16px; line-height: 16px; text-align: center; background: var(--red); color: #fff; font-family: var(--mono); font-weight: 700; font-size: 9px; border-radius: 2px; }
.back-cols .ca { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.cat-HC, .cf.cat-HC { background: #16130f; }
.cat-1, .cf.cat-1 { background: var(--red); }
.cat-2, .cf.cat-2 { background: #d8632a; }
.cat-3, .cf.cat-3 { background: #e8943a; }
.cat-4, .cf.cat-4 { background: #6a7689; }
.colflag .cat.cat-x, .cf.cat-x { background: var(--ardoise); }

/* Cols cliquables dans la liste du verso */
.back-cols .col-item { cursor: pointer; border-radius: 6px; padding: 3px 6px; margin: 0 -6px; transition: background .15s ease; }
.back-cols .col-item:hover, .back-cols .col-item:focus-visible { background: rgba(127,127,127,.12); outline: none; }
.back-cols .col-pin { color: var(--ardoise); font-size: 11px; opacity: 0; transition: opacity .15s ease; }
.back-cols .col-item:hover .col-pin, .back-cols .col-item:focus-visible .col-pin { opacity: 1; }

/* Marqueur du col sur la carte (goutte type pin) */
.rl-col { display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); color: #fff; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.35); }
.rl-col i { transform: rotate(45deg); font-size: 12px; }
.col-popup strong { display: block; font-family: var(--display); font-size: 14px; letter-spacing: .2px; }
.col-popup .cp-line { display: block; font-size: 12px; margin-top: 2px; }
.col-popup .cp-meta { display: block; font-family: var(--mono); font-size: 11px; color: var(--muted); margin-top: 3px; }
.back-hint { font-family: var(--mono); font-size: 10.5px; color: var(--muted); margin: 8px 0 0; line-height: 1.5; }

.stage-num { display: flex; align-items: flex-start; justify-content: center; }
.dossard { font-family: var(--display); font-weight: 700; font-size: 32px; line-height: 1; color: var(--type, var(--text)); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }

.stage-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.stage-date { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.badge { font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; font-weight: 700; padding: 3px 9px; border-radius: 999px; color: #fff; white-space: nowrap; }
.badge--clm { background: var(--jaune); color: #2b2200; }
.badge--plaine { background: var(--vert); }
.badge--accidentee { background: var(--ardoise); }
.badge--montagne { background: var(--red); }

.stage-route { font-family: var(--display); font-weight: 600; font-size: clamp(18px, 2.1vw, 23px); line-height: 1.08; margin: 8px 0 6px; text-transform: uppercase; }
.stage-route .arrow { color: var(--type); }
.stage-note { margin: 0 0 10px; font-size: 14px; color: var(--muted); }
.stage-meta { display: flex; gap: 14px; align-items: baseline; }
.stage-meta .km { font-family: var(--mono); font-weight: 700; font-size: 14px; color: var(--text); }
.stage-meta .pays { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.stage-tags { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 11px 0 0; padding: 0; }
.stage-tags li { font-family: var(--mono); font-size: 11px; padding: 3px 8px; border-radius: 3px; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); }
.stage--summit .stage-tags li:first-child { border-color: var(--type); color: var(--text); }

.rest { display: flex; align-items: center; gap: 12px; padding: 12px 16px; margin: 2px 0; border: 1px dashed var(--line); border-radius: 4px; font-family: var(--mono); font-size: 13px; color: var(--muted); }
.rest-icon { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--muted); flex: none; }
.rest-text strong { color: var(--text); }

/* Filtre actif */
body[data-filter="clm"] .stage:not([data-type="clm"]),
body[data-filter="plaine"] .stage:not([data-type="plaine"]),
body[data-filter="accidentee"] .stage:not([data-type="accidentee"]),
body[data-filter="montagne"] .stage:not([data-type="montagne"]) { opacity: .32; }
body[data-filter="clm"] .stage-pin:not(.type-clm),
body[data-filter="plaine"] .stage-pin:not(.type-plaine),
body[data-filter="accidentee"] .stage-pin:not(.type-accidentee),
body[data-filter="montagne"] .stage-pin:not(.type-montagne) { opacity: .28; filter: grayscale(.4); }

/* --------------------------------------------------------------------------
   Articles La Libre
   -------------------------------------------------------------------------- */
.articles { background: var(--surface-2); border-top: 1px solid var(--line); padding: clamp(40px, 6vw, 80px) clamp(16px, 4vw, 40px); }
.articles-inner { max-width: var(--maxw); margin: 0 auto; }
.articles-head { margin-bottom: 26px; }
.articles-head h2 { font-family: var(--display); font-weight: 700; text-transform: uppercase; font-size: clamp(26px, 3.4vw, 40px); margin: 0 0 6px; }
.articles-head p { margin: 0; color: var(--muted); font-size: 14px; }

.articles-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 860px) { .articles-grid { grid-template-columns: 1fr; } }

.art-card {
  display: flex; flex-direction: column; text-decoration: none; color: var(--text);
  background: var(--surface); border: 1px solid var(--line); border-radius: 6px; overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
}
.art-card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px var(--shadow); }
.art-thumb { aspect-ratio: 16 / 10; background: var(--map-shell) center/cover no-repeat; position: relative; }
.art-thumb::after { content: ''; position: absolute; inset: 0; box-shadow: inset 0 -40px 40px -30px rgba(0,0,0,.35); }
.art-body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 8px; }
.art-kicker { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--red); font-weight: 700; }
.art-title { font-family: var(--display); font-weight: 600; text-transform: none; font-size: 19px; line-height: 1.18; margin: 0; }
.art-card:hover .art-title { color: var(--red); }

.articles-more { margin-top: 30px; text-align: center; }
.more-btn {
  display: inline-block; text-decoration: none; font-family: var(--mono); font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase; font-size: 13px;
  padding: 14px 28px; border-radius: 2px; color: #fff; background: var(--ink);
  border: 2px solid var(--ink); transition: background .16s ease, color .16s ease, border-color .16s ease;
}
.more-btn:hover { background: var(--red); border-color: var(--red); }

/* --------------------------------------------------------------------------
   Pied de page
   -------------------------------------------------------------------------- */
.foot { background: var(--ink); color: #cfc8bd; padding: 40px clamp(16px, 4vw, 40px); border-top: 2px solid var(--red); }
.foot-credit { margin: 0 0 8px; font-family: var(--mono); font-size: 14px; }
.foot-credit strong { color: #fff; }
.foot-note { margin: 0; font-size: 12px; color: #8f887c; max-width: 70ch; }
.foot-author { margin: 14px 0 0; font-family: var(--mono); font-size: 12px; letter-spacing: .02em; color: #8f887c; }
.foot-author a { color: #cfc8bd; text-decoration: none; border-bottom: 1px solid rgba(207,200,189,.35); }
.foot-author a:hover { color: #fff; border-bottom-color: var(--jaune); }

/* --------------------------------------------------------------------------
   Responsive carte
   -------------------------------------------------------------------------- */
@media (max-width: 991.98px) {
  /* La colonne carte se fige en haut, la liste des étapes défile dessous. */
  .explorer-mapcol { position: sticky; top: var(--top); z-index: 5; }
  .mapwrap { position: relative; top: 0; height: 35vh; min-height: 260px; }
  .explorer-listcol { border-left: 0; border-top: 1px solid var(--line); }

  /* Légende repliée par défaut pour gagner de la place, ouverte au tap. */
  .legend-toggle { display: flex; }
  .legend { left: 16px; bottom: 70px; max-width: min(80vw, 300px); display: none; }
  .legend.is-open { display: block; }
}
@media (prefers-reduced-motion: reduce) {
  .stage, .stage-pin, .hero-cta, .art-card, .body, .theme-toggle { transition: none; }
}

/* --------------------------------------------------------------------------
   Profil d'altitude dans la carte d'étape
   -------------------------------------------------------------------------- */
.stage-profile { margin: 8px 0 12px; }
.stage-profile svg { width: 100%; height: 44px; display: block; overflow: visible; }
.stage-profile .area { fill: var(--type); opacity: .13; }
.stage-profile .line { fill: none; stroke: var(--type); stroke-width: 1.5; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.stage-profile .base { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.stage-profile .peak { fill: var(--type); stroke: var(--surface); stroke-width: 1.2; }

/* --------------------------------------------------------------------------
   Favoris
   -------------------------------------------------------------------------- */
.favoris { background: var(--bg); border-top: 1px solid var(--line); padding: clamp(40px, 6vw, 80px) clamp(16px, 4vw, 40px); }
.favoris-inner { max-width: var(--maxw); margin: 0 auto; }
.favoris-head { margin-bottom: 28px; }
.favoris-eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--red); margin: 0 0 8px; }
.favoris-head h2 { font-family: var(--display); font-weight: 700; text-transform: uppercase; font-size: clamp(28px, 4vw, 46px); margin: 0 0 6px; }
.favoris-sub { margin: 0; color: var(--muted); font-size: 15px; max-width: 62ch; }

.favoris-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 980px) { .favoris-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .favoris-grid { grid-template-columns: 1fr; } }

.rider { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; display: flex; flex-direction: column; }
.rider-photo { position: relative; aspect-ratio: 4 / 3; background: var(--map-shell) center / cover no-repeat; display: flex; align-items: center; justify-content: center; }
.rider-photo::after { content: ''; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, transparent 42%, rgba(0,0,0,.45)); }
.rider-initials { position: relative; z-index: 0; font-family: var(--display); font-weight: 700; font-size: 54px; color: rgba(255,255,255,.22); letter-spacing: .04em; }
html[data-theme="dark"] .rider-initials { color: rgba(255,255,255,.12); }
.rider-statut { position: absolute; left: 12px; top: 12px; z-index: 2; font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #fff; padding: 4px 9px; border-radius: 999px; background: var(--red); }
.rider--red .rider-statut { background: var(--red); }
.rider--jaune .rider-statut { background: var(--jaune); color: #2b2200; }
.rider--vert .rider-statut { background: var(--vert); }
.rider--ardoise .rider-statut { background: var(--ardoise); }

/* Coureur ayant abandonné : badge en haut à droite + carte estompée */
.rider-abandon { position: absolute; right: 12px; top: 12px; z-index: 2; display: inline-flex; align-items: center; gap: 5px; font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #fff; padding: 4px 9px; border-radius: 999px; background: #1a1a1a; border: 1px solid rgba(255,255,255,.25); }
.rider.is-out .rider-photo { filter: grayscale(1); }
.rider.is-out .rider-photo::after { background: linear-gradient(180deg, rgba(0,0,0,.35) 0%, rgba(0,0,0,.6)); }
.rider.is-out .rider-statut { opacity: .55; }
.rider.is-out .rider-name { text-decoration: line-through; text-decoration-thickness: 2px; text-decoration-color: var(--red); }

.rider-body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.rider-name { font-family: var(--display); font-weight: 700; text-transform: uppercase; font-size: 22px; margin: 0; line-height: 1.02; }
.rider-flag { font-size: 17px; }
.rider-meta { margin: 0; font-family: var(--mono); font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.rider-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 12px 0; }
.rstat { text-align: center; }
.rstat-v { display: block; font-family: var(--display); font-weight: 700; font-size: 18px; line-height: 1.05; color: var(--text); }
.rstat-l { display: block; font-family: var(--mono); font-size: 10px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }
.rider-atout { margin: 0; font-size: 14px; color: var(--muted); }

/* --------------------------------------------------------------------------
   Tracés réels sur la carte (filtre de légende) + stats de profil
   -------------------------------------------------------------------------- */
.route-line { cursor: pointer; transition: opacity .2s ease; }
body[data-filter="clm"] .route-line:not(.type-clm),
body[data-filter="clm"] .route-casing:not(.type-clm),
body[data-filter="plaine"] .route-line:not(.type-plaine),
body[data-filter="plaine"] .route-casing:not(.type-plaine),
body[data-filter="accidentee"] .route-line:not(.type-accidentee),
body[data-filter="accidentee"] .route-casing:not(.type-accidentee),
body[data-filter="montagne"] .route-line:not(.type-montagne),
body[data-filter="montagne"] .route-casing:not(.type-montagne) { opacity: .12; }

.profile-stats {
  display: flex; gap: 16px; margin: 2px 0 12px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .03em;
  text-transform: uppercase; color: var(--muted);
}
.profile-stats b { color: var(--text); font-weight: 700; }

/* ==========================================================================
   AJOUTS : sélection jaune, curseur, pictos, classement, équipes, modale,
   diaporama hero, histoire, animations d'apparition
   ========================================================================== */

/* Sélection de texte en jaune */
::selection { background: var(--jaune); color: #16130f; }
::-moz-selection { background: var(--jaune); color: #16130f; }

/* Curseur personnalisé (pointeur fin uniquement, classe posée par le JS) */
.cursor-dot {
  position: fixed; top: 0; left: 0; width: 14px; height: 14px; margin: -7px 0 0 -7px;
  border-radius: 50%; background: var(--jaune); pointer-events: none; z-index: 99999;
  transition: width .18s ease, height .18s ease, background .18s ease, margin .18s ease, opacity .2s ease;
  will-change: transform;
}
.cursor-dot.is-hover { width: 36px; height: 36px; margin: -18px 0 0 -18px; background: rgba(255,204,0,.28); border: 2px solid var(--jaune); }
.cursor-dot.is-hidden { opacity: 0; }
body.has-custom-cursor, body.has-custom-cursor a, body.has-custom-cursor button,
body.has-custom-cursor .stage, body.has-custom-cursor .team-cell, body.has-custom-cursor [role="button"] { cursor: none; }

/* Ligne de stats à pictos dans les cartes d'étape */
.stage-stats { display: flex; flex-wrap: wrap; gap: 14px; margin: 6px 0 10px; font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.stage-stats .st { display: inline-flex; align-items: center; gap: 6px; }
.stage-stats .st i { color: var(--type, var(--red)); font-size: 12px; width: 15px; text-align: center; }

/* --------------------------------------------------------------------------
   Classement 2025
   -------------------------------------------------------------------------- */
.classement { background: var(--surface-2); border-top: 1px solid var(--line); padding: clamp(40px,6vw,80px) clamp(16px,4vw,40px); }
.classement-inner { max-width: var(--maxw); margin: 0 auto; }
.classement-eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--red); margin: 0 0 8px; }
.classement-head h2 { font-family: var(--display); font-weight: 700; text-transform: uppercase; font-size: clamp(28px,4vw,46px); margin: 0 0 6px; }
.classement-sub { margin: 0 0 20px; color: var(--muted); font-size: 15px; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 18px; }
.tab { font-family: var(--mono); font-size: 12.5px; letter-spacing: .04em; text-transform: uppercase; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted); cursor: pointer; transition: color .15s, background .15s, border-color .15s; }
.tab:hover { color: var(--text); border-color: var(--text); }
.tab.is-on { background: var(--ink); color: #fff; border-color: var(--ink); }
.standings-wrap { overflow-x: auto; }
.standings { width: 100%; border-collapse: collapse; }
.standings td { padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.standings .rk { font-family: var(--display); font-weight: 700; font-size: 18px; color: var(--red); width: 44px; text-align: center; }
.standings tr:first-child .rk { color: var(--jaune-deep); }
.standings .nm { font-size: 15px; }
.standings .fl { margin-right: 8px; }
.standings .tm { display: block; font-family: var(--mono); font-size: 11px; color: var(--muted); margin-top: 2px; }
.standings .vl { text-align: right; font-family: var(--mono); font-weight: 700; white-space: nowrap; color: var(--text); }
/* Timeline des éditions : swipe horizontal, récentes en grand à gauche */
.years-line { display: flex; align-items: baseline; gap: 4px; margin: 0 0 16px;
  border-bottom: 1px solid var(--line); padding-bottom: 0;
  overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.years-line::-webkit-scrollbar { display: none; }
.year-chip { flex: none; background: none; border: 0; cursor: pointer;
  font-family: var(--display); font-weight: 600; color: var(--text); letter-spacing: .01em;
  padding: 6px 9px 10px; line-height: 1; position: relative;
  border-bottom: 3px solid transparent; margin-bottom: -1px;
  transition: opacity .15s ease, color .15s ease, border-color .15s ease, font-size .2s ease; }
.year-chip:hover { opacity: 1 !important; color: var(--red); }
.year-chip:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.year-chip.is-on { color: var(--red); border-bottom-color: var(--red); opacity: 1; }
.year-chip.is-live { display: inline-flex; align-items: baseline; gap: 7px; }
.year-chip.is-live .tab-dot { align-self: center; }
.year-chip.is-live.is-on .tab-dot { background: var(--jaune); animation: none; }

/* Onglet de l'édition en cours : pastille rouge pulsée */
.tab.is-live { display: inline-flex; align-items: center; gap: 7px; }
.tab.is-live .tab-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--red); flex: 0 0 auto; animation: tabPulse 1.8s ease-in-out infinite; }
.tab.is-live.is-on .tab-dot { background: var(--jaune); animation: none; }
@keyframes tabPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .35; transform: scale(.78); }
}
@media (prefers-reduced-motion: reduce) { .tab.is-live .tab-dot { animation: none; } }

/* Maillot jaune : le leader de l'édition en cours est mis en avant */
.standings.is-live tr:first-child { background: color-mix(in srgb, var(--jaune) 14%, transparent); }
.standings.is-live tr:first-child .nm { font-weight: 700; }

/* Mention de source sous le tableau */
.standings-source { margin: 14px 0 0; font-family: var(--mono); font-size: 11.5px; line-height: 1.5; color: var(--muted); }

.standings-more { margin-top: 18px; text-align: center; }
.more-btn.ghost { background: transparent; color: var(--text); border: 2px solid var(--line); }
.more-btn.ghost:hover { background: var(--red); color: #fff; border-color: var(--red); }

/* --------------------------------------------------------------------------
   Équipes (quadrillage + modale)
   -------------------------------------------------------------------------- */
.equipes { background: var(--bg); border-top: 1px solid var(--line); padding: clamp(40px,6vw,80px) clamp(16px,4vw,40px); }
.equipes-inner { max-width: var(--maxw); margin: 0 auto; }
.equipes-eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--red); margin: 0 0 8px; }
.equipes-head h2 { font-family: var(--display); font-weight: 700; text-transform: uppercase; font-size: clamp(28px,4vw,46px); margin: 0 0 6px; }
.equipes-sub { margin: 0 0 22px; color: var(--muted); font-size: 14px; max-width: 60ch; }

.equipes-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 1px; background: var(--jaune); border: 1px solid var(--jaune); border-radius: 6px; overflow: visible; }
@media (max-width: 1100px) { .equipes-grid { grid-template-columns: repeat(6, 1fr); } }
@media (max-width: 820px)  { .equipes-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 520px)  { .equipes-grid { grid-template-columns: repeat(2, 1fr); } }

.team-cell {
  border: 0; background: var(--surface); padding: 16px 10px 14px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  transition: transform .5s cubic-bezier(.22,1,.36,1), box-shadow .5s ease, background .45s ease, opacity .5s ease;
  transition-delay: .22s; /* traîne : la cellule quittée reste agrandie un instant avant de redescendre */
  will-change: transform;
}
.team-cell:hover {
  background: var(--jaune); transform: scale(1.12) translateY(-5px);
  box-shadow: 0 16px 34px rgba(0,0,0,.24); position: relative; z-index: 3;
  transition: transform .26s cubic-bezier(.22,1,.36,1), box-shadow .26s ease, background .2s ease;
  transition-delay: 0s; /* zoom immédiat à l'entrée */
}
.team-cell:hover .team-name { color: #16130f; }
.team-jersey { position: relative; width: 70%; aspect-ratio: 3 / 4; }
.tj-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.team-name { font-family: var(--mono); font-size: 12px; line-height: 1.25; text-align: center; color: var(--text); transition: color .18s ease; }

/* Modale équipe */
.team-modal { position: fixed; inset: 0; z-index: 5000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.team-modal[hidden] { display: none; }
.team-modal-backdrop { position: absolute; inset: 0; background: rgba(10,8,6,.62); backdrop-filter: blur(3px); }
.team-modal-box { position: relative; z-index: 2; width: min(560px, 100%); max-height: 88vh; overflow: auto; background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--jaune); border-radius: 10px; padding: 26px; box-shadow: 0 30px 80px rgba(0,0,0,.5); animation: modalin .25s ease; }
@keyframes modalin { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.team-modal-close { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; font-size: 15px; }
.team-modal-close:hover { background: var(--red); color: #fff; border-color: var(--red); }
.tm-head { display: flex; gap: 16px; align-items: center; margin-bottom: 14px; padding-right: 30px; }
.tm-jersey { width: 60px; flex: none; }
.tm-flag { font-size: 18px; }
.tm-id h3 { font-family: var(--display); font-weight: 700; text-transform: uppercase; font-size: 22px; line-height: 1.05; margin: 4px 0 6px; }
.tm-stars i { color: var(--jaune); font-size: 12px; }
.tm-stars i.off { color: var(--line); }
.tm-note { color: var(--muted); font-size: 14px; margin: 0 0 12px; }
.tm-leadlabel { font-family: var(--mono); font-size: 13px; margin: 0 0 6px; color: var(--text); }
.tm-leadlabel i { color: var(--red); margin-right: 6px; }
.tm-riders { list-style: none; padding: 0; margin: 10px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
@media (max-width: 460px) { .tm-riders { grid-template-columns: 1fr; } }
.tm-riders li { display: flex; align-items: center; gap: 8px; font-size: 14px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.tm-riders li i { color: var(--muted); font-size: 12px; width: 15px; text-align: center; }
.tm-riders li.is-leader { font-weight: 700; }
.tm-riders li.is-leader i { color: var(--jaune-deep); }
.tm-prov { margin: 14px 0 0; font-family: var(--mono); font-size: 11px; color: var(--muted); }
body.modal-open { overflow: hidden; }

/* --------------------------------------------------------------------------
   Diaporama du hero
   -------------------------------------------------------------------------- */
.hero-slideshow { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.hero-slide { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; transition: opacity 1.4s ease; }
.hero-slide.is-on { opacity: 1; animation: kenburns 6.5s ease-out forwards; }
@keyframes kenburns { from { transform: scale(1.09); } to { transform: scale(1); } }
.hero .hero-media { z-index: 1; background:
  linear-gradient(180deg, rgba(18,15,12,.45) 0%, rgba(18,15,12,.72) 55%, rgba(18,15,12,.94) 100%),
  radial-gradient(1100px 480px at 80% -10%, rgba(211,12,67,.22), transparent 60%); }
@media (prefers-reduced-motion: reduce) { .hero-slide.is-on { animation: none; } }

/* --------------------------------------------------------------------------
   Histoire
   -------------------------------------------------------------------------- */
.histoire { background: var(--bg); border-top: 1px solid var(--line); padding: clamp(40px,6vw,90px) clamp(16px,4vw,40px); }
.histoire-inner { max-width: 820px; margin: 0 auto; }
.histoire-eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--red); margin: 0 0 8px; }
.histoire-head h2 { font-family: var(--display); font-weight: 700; text-transform: uppercase; font-size: clamp(28px,4.4vw,52px); margin: 0 0 18px; }
.histoire-body p { font-size: 16px; line-height: 1.7; color: var(--text); margin: 0 0 16px; }
.histoire-body em { font-style: italic; }
.histoire-sub2 { font-family: var(--display); font-weight: 700; text-transform: uppercase; font-size: 22px; margin: 30px 0 14px; }
.facts { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.facts li { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--jaune); border-radius: 4px; padding: 12px 14px; }
.fact-ico { flex: none; }
.fact-txt { flex: 1; min-width: 0; }
.fact-ico i { color: var(--jaune-deep); font-size: 16px; width: 18px; text-align: center; }

/* --------------------------------------------------------------------------
   Apparitions au scroll (cascade) · gating html.js-reveal pour éviter de
   cacher le contenu si le JS ne tourne pas
   -------------------------------------------------------------------------- */
html.js-reveal .reveal,
html.js-reveal .stage,
html.js-reveal .rider,
html.js-reveal .art-card { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
html.js-reveal .reveal.in,
html.js-reveal .stage.in,
html.js-reveal .rider.in,
html.js-reveal .art-card.in { opacity: 1; transform: none; }
/* Cartes équipe : apparition en opacité seule pour ne pas bloquer le zoom de survol */
html.js-reveal .team-cell:not(.in) { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  html.js-reveal .reveal, html.js-reveal .stage, html.js-reveal .rider,
  html.js-reveal .art-card { opacity: 1; transform: none; transition: none; }
  .stage-inner { transition: none; }
  /* On neutralise l'apparition au scroll, mais on laisse vivre le survol des équipes. */
  html.js-reveal .team-cell { opacity: 1; }
}

/* ==========================================================================
   Tab bar d'accès rapide aux blocs (mobile / tablette)
   Prend le relais quand la nav de la topbar disparaît (< 900px).
   ========================================================================== */
.tabbar { display: none; }

/* Les sections visées laissent la place à la topbar lors d'un saut d'ancre */
#carte, #favoris, #classement, #equipes, #articles, #histoire { scroll-margin-top: var(--top); }

@media (max-width: 900px) {
  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1200;
    background: var(--surface); border-top: 1px solid var(--line);
    box-shadow: 0 -6px 22px var(--shadow);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  }
  .tabbar a {
    flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 3px; padding: 9px 2px 8px; text-decoration: none; color: var(--muted);
    font-family: var(--mono); font-size: 9px; letter-spacing: .02em; text-transform: uppercase;
    transition: color .15s ease; -webkit-tap-highlight-color: transparent;
  }
  .tabbar a i { font-size: 17px; transition: color .15s ease, transform .15s ease; }
  .tabbar a span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tabbar a.is-active { color: var(--text); }
  .tabbar a.is-active i { color: var(--red); transform: translateY(-1px); }

  /* Le pied de page n'est pas masqué par la barre fixe */
  .foot { padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 360px) {
  .tabbar a span { display: none; }
  .tabbar a { padding: 11px 2px; }
}

/* ==========================================================================
   Garde anti-conflit (CSS global La Libre / CMS / mouvement réduit)
   On ré-assure l'effet de survol des équipes avec une spécificité forte
   (#equipes) et un !important ciblé sur les seules propriétés vitales.
   C'est ici que vivent désormais les valeurs de réglage de l'effet.
   ========================================================================== */
#equipes .equipes-grid { overflow: visible !important; }
#equipes .team-cell {
  transition: transform .5s cubic-bezier(.22,1,.36,1), box-shadow .5s ease, background .45s ease, opacity .5s ease;
  transition-delay: .22s;
  will-change: transform;
}
#equipes .team-cell:hover {
  transform: scale(1.12) translateY(-5px) !important;
  box-shadow: 0 16px 34px rgba(0,0,0,.24);
  z-index: 3;
  transition: transform .26s cubic-bezier(.22,1,.36,1), box-shadow .26s ease, background .2s ease !important;
  transition-delay: 0s !important;
}


/* ============================================================
   Bloc IA · beta, expose sur la page making-of (Mistral via php/ia.php)
   ============================================================ */
.ia-section { padding: 44px 22px; position: relative; overflow: hidden;
  background: linear-gradient(120deg,#2b6cff,#6a4cff,#b14cff,#ff5bb0,#7a4cff,#2b6cff);
  background-size: 300% 300%; animation: iaflow 16s ease infinite; }
.mo-ia { border-radius: 22px; margin: 6px 0 44px; }
@keyframes iaflow { 0%{background-position:0% 50%} 50%{background-position:100% 50%} 100%{background-position:0% 50%} }
.ia { --ia-line: rgba(22,19,15,.12); --ia-chip: #fbf9f4;
  max-width: 1060px; margin: 0 auto; background: var(--surface);
  border: 1px solid var(--ia-line); border-radius: 18px; padding: 22px 28px 24px;
  box-shadow: 0 18px 50px rgba(22,19,15,.10); position: relative; overflow: hidden; }
html[data-theme="dark"] .ia { --ia-line: rgba(241,237,228,.14); --ia-chip: #221e18;
  box-shadow: 0 18px 50px rgba(0,0,0,.45); }
.ia::before { content:""; position:absolute; inset:0 0 auto 0; height:4px;
  background: linear-gradient(90deg, var(--red), var(--jaune)); }
.ia-beta { position:absolute; top:16px; right:18px; z-index:2; font-family:var(--display);
  font-weight:700; font-size:11px; letter-spacing:.16em; color:#fff; background:var(--red);
  border-radius:999px; padding:3px 9px; line-height:1; }
.ia-eyebrow { display:inline-flex; align-items:center; gap:8px; font-family:var(--display);
  font-size:12px; letter-spacing:.16em; text-transform:uppercase; color:var(--red); font-weight:700; margin-bottom:8px; }
.ia-eyebrow i { font-size:14px; }
.ia h2 { font-family:var(--display); font-weight:600; font-size:clamp(22px,3.2vw,30px);
  line-height:1.1; letter-spacing:.2px; margin:0 0 6px; color:var(--text); }
.ia .lead { color:var(--muted); font-size:14px; margin:0 0 18px; max-width:72ch; }
.ia .lead b { color:var(--text); }
.ia-grps { display:grid; grid-template-columns:repeat(auto-fit,minmax(252px,1fr)); gap:18px 22px; }
.ia-grp { margin:0; }
.ia-grp-label { font-family:var(--display); font-size:12px; letter-spacing:.12em; text-transform:uppercase;
  color:var(--muted); font-weight:700; margin:0 0 9px; display:flex; align-items:center; gap:8px; }
.ia-grp-label::after { content:""; flex:1; height:1px; background:var(--ia-line); }
.ia-chips { display:flex; flex-direction:column; gap:7px; }
.ia-chip { border:1px solid var(--ia-line); background:var(--ia-chip); color:var(--text);
  border-radius:11px; padding:9px 13px; font-family:var(--body); font-size:13.5px; cursor:pointer;
  text-align:left; line-height:1.3; transition:border-color .15s, background .15s, transform .15s; }
.ia-chip:hover { border-color:var(--red); background:var(--surface); transform:translateX(2px); }
.ia-chip:focus-visible { outline:2px solid var(--red); outline-offset:2px; }
.ia-askwrap { margin-top:22px; border-radius:16px; padding:16px; position:relative; overflow:hidden;
  background:linear-gradient(120deg,#2b6cff,#6a4cff,#b14cff,#ff5bb0,#7a4cff,#2b6cff);
  background-size:300% 300%; animation:iaflow 16s ease infinite; }
.ia-ask { display:flex; gap:10px; align-items:flex-end; }
.ia-ask .ia-fld { flex:1; }
.ia-ask label { display:block; font-family:var(--display); font-size:12px; letter-spacing:.1em;
  text-transform:uppercase; color:#fff; font-weight:700; margin-bottom:7px; text-shadow:0 1px 2px rgba(0,0,0,.22); }
.ia-ask textarea { width:100%; resize:none; min-height:46px; border:0; background:rgba(255,255,255,.97);
  color:#16130f; border-radius:11px; padding:12px 14px; font-family:var(--body); font-size:14.5px;
  line-height:1.4; box-shadow:0 6px 20px rgba(20,10,40,.18); }
.ia-ask textarea::placeholder { color:#8a8580; }
.ia-ask textarea:focus { outline:none; box-shadow:0 0 0 3px rgba(255,255,255,.55), 0 6px 20px rgba(20,10,40,.18); }
.ia-send { flex:none; border:0; background:#fff; color:#16130f; border-radius:11px; height:46px; padding:0 18px;
  font-family:var(--display); font-weight:700; font-size:14px; letter-spacing:.04em; cursor:pointer;
  display:inline-flex; align-items:center; gap:8px; box-shadow:0 6px 20px rgba(20,10,40,.18); transition:transform .15s; }
.ia-send:hover { transform:translateY(-1px); }
.ia-foot { margin-top:16px; font-size:12px; color:var(--muted); display:flex; align-items:flex-start; gap:8px;
  border-top:1px solid var(--ia-line); padding-top:14px; }
.ia-foot i { color:var(--ardoise); margin-top:2px; }
.ia-warn { color:var(--red); font-weight:600; }

/* modal IA */
.ia-ov { position:fixed; inset:0; background:rgba(12,10,8,.55); backdrop-filter:blur(3px);
  display:none; align-items:flex-start; justify-content:center; padding:40px 18px; z-index:1200; opacity:0; transition:opacity .2s; }
.ia-ov.on { display:flex; } .ia-ov.show { opacity:1; }
.ia-modal { background:var(--surface); border:1px solid var(--ia-line); border-radius:18px;
  width:min(680px,100%); max-height:86vh; overflow:auto; box-shadow:0 24px 60px rgba(0,0,0,.4);
  transform:translateY(12px); transition:transform .22s ease; }
.ia-ov.show .ia-modal { transform:translateY(0); }
.ia-mhead { position:sticky; top:0; background:var(--surface); border-bottom:1px solid var(--ia-line);
  padding:20px 24px 16px; display:flex; gap:14px; align-items:flex-start; z-index:2; }
.ia-mhead .ia-q { flex:1; }
.ia-mhead .ia-tag { font-family:var(--display); font-size:11px; letter-spacing:.14em; text-transform:uppercase;
  color:var(--red); font-weight:700; display:flex; align-items:center; gap:7px; margin-bottom:6px; }
.ia-mhead h3 { font-family:var(--display); font-weight:600; font-size:20px; line-height:1.2; margin:0; color:var(--text); }
.ia-x { flex:none; border:1px solid var(--ia-line); background:var(--surface); color:var(--text);
  width:34px; height:34px; border-radius:9px; cursor:pointer; display:grid; place-items:center; font-size:15px; }
.ia-x:hover { border-color:var(--red); }
.ia-mbody { padding:20px 24px 8px; }
.ia-answer { font-size:15px; line-height:1.62; color:var(--text); }
.ia-answer p { margin:0 0 13px; } .ia-answer ul { margin:0 0 13px; padding-left:20px; }
.ia-answer li { margin:0 0 6px; } .ia-answer strong { color:var(--text); }
.ia-demo { display:inline-block; font-family:var(--display); font-size:10.5px; letter-spacing:.1em; text-transform:uppercase;
  color:var(--ardoise); border:1px solid var(--ia-line); border-radius:999px; padding:3px 9px; margin-bottom:12px; }
.ia-load { padding:6px 0 14px; }
.ia-loader { display:flex; align-items:center; gap:11px; margin:2px 0 16px; }
.ia-spin { width:24px; height:24px; border-radius:50%; flex:none;
  background:conic-gradient(from 0deg, #2b6cff, #6a4cff, #b14cff, #ff5bb0, #2b6cff);
  -webkit-mask:radial-gradient(farthest-side, transparent calc(100% - 3.5px), #000 0);
          mask:radial-gradient(farthest-side, transparent calc(100% - 3.5px), #000 0);
  animation:iaspin .85s linear infinite; }
@keyframes iaspin { to { transform:rotate(360deg); } }
.ia-think { font-size:13px; color:var(--muted); }
.ia-dots i { font-style:normal; animation:iadot 1.3s infinite both; }
.ia-dots i:nth-child(2){ animation-delay:.18s; }
.ia-dots i:nth-child(3){ animation-delay:.36s; }
@keyframes iadot { 0%,70%,100%{opacity:.2} 35%{opacity:1} }
.ia-load .ia-bar { height:12px; border-radius:6px; margin-bottom:11px; width:100%;
  background:linear-gradient(90deg,var(--ia-line),rgba(127,127,127,.06),var(--ia-line));
  background-size:200% 100%; animation:iash 1.1s linear infinite; }
.ia-load .ia-bar + .ia-bar { width:78%; }
@keyframes iash { to { background-position:-200% 0; } }
.ia-srcwrap { margin-top:8px; border-top:1px solid var(--ia-line); padding:18px 0 4px; }
.ia-srcwrap h4 { font-family:var(--display); font-size:12px; letter-spacing:.13em; text-transform:uppercase;
  color:var(--text); font-weight:700; margin:0 0 12px; display:flex; align-items:center; gap:8px; }
.ia-srcwrap h4 i { color:var(--red); font-size:13px; }
.ia-srcwrap h4 .ia-cnt { color:var(--muted); font-weight:600; letter-spacing:.06em; }
.ia-srclist { display:grid; gap:9px; }
.ia-source { display:flex; gap:12px; align-items:center; border:1px solid var(--ia-line); background:var(--ia-chip);
  border-radius:11px; padding:11px 13px; text-decoration:none; color:inherit; transition:border-color .15s, transform .15s; }
.ia-source:hover { border-color:var(--red); transform:translateX(2px); }
.ia-badge { flex:none; font-family:var(--display); font-size:10px; font-weight:700; letter-spacing:.04em;
  color:#fff; border-radius:6px; padding:5px 8px; line-height:1; white-space:nowrap; }
.b-llb{background:#ac115d}.b-dh{background:#e1001a}.b-av{background:#00e25d;color:#16130f}
.b-wiki{background:#5b5d61}.b-letour{background:#ffcc00;color:#16130f}
.b-mq{background:#ffed00;color:#16130f}.b-pm{background:#000}.b-aso{background:#16130f}
.ia-source .ia-meta { flex:1; min-width:0; }
.ia-source .ia-t { font-size:13.5px; font-weight:600; line-height:1.3; color:var(--text);
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.ia-source .ia-d { font-size:11.5px; color:var(--muted); margin-top:2px; }
.ia-source .ia-go { flex:none; color:var(--ardoise); font-size:13px; }
.ia-mfoot { padding:14px 24px 22px; font-size:11.5px; color:var(--muted); display:flex; gap:8px; align-items:flex-start; line-height:1.45; }
.ia-mfoot i { color:var(--ardoise); margin-top:1px; }
@media (max-width:560px){ .ia{padding:22px 18px} .ia-ask{flex-direction:column;align-items:stretch} .ia-send{height:46px;justify-content:center} }
@media (prefers-reduced-motion:reduce){ .ia-section{animation:none} .ia-askwrap{animation:none} .ia-load .ia-bar{animation:none} .ia-spin{animation:none} .ia-dots i{animation:none;opacity:.55} .ia-ov,.ia-modal,.ia-chip,.ia-source,.ia-send{transition:none} }

/* ---- ajouts SEO : chapeau secondaire + aides d'interface ---- */
.hero-lede--seo { margin-top: 12px; font-size: clamp(13.5px, 1.3vw, 15.5px); color: #cfc8bb; max-width: 64ch; }
.list-hint { margin: 8px 0 0 !important; font-size: 12.5px !important; color: var(--muted); font-style: italic; }
.equipes-hint { margin: -12px 0 22px; color: var(--muted); font-size: 12.5px; font-style: italic; }
.regarder { border-top: 0; padding-top: 0; }
