/* Combe Laval Cycles : jetons, polices, éléments communs.
   Couleurs relevées sur le lieu : bitume et ombre des tunnels (asphalte), calcaire au soleil,
   gris froid et jamais beige ; jaune-vert des gilets et de la signalisation (chartreuse). */
@font-face { font-family: "Big Shoulders Display"; src: url("fonts/big-shoulders-display.woff2") format("woff2"); font-weight: 500 900; font-display: swap; }
@font-face { font-family: "Hanken Grotesk"; src: url("fonts/hanken-grotesk.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("fonts/jetbrains-mono.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }

:root {
  --asphalt: #131614;
  --asphalt-2: #191d1a;
  --asphalt-3: #222723;
  --line: #333a35;
  --muted: #8d948f;
  --stone: #b8beb9;
  --text: #e4e7e4;
  --white: #ffffff;
  --calc: #d6d9d7;
  --calc-2: #bfc4c1;
  --ink: #131614;
  --ink-2: #454d48;
  --chart: #d4f22e;
  --chart-hi: #e2ff4d;
  --water: #7d97a1;
  --g1: #4a514c;
  --g2: #8c948e;
  --g3: #c3d47a;
  --g4: #d4f22e;
  --head: 64px;
  --gut: clamp(16px, 4vw, 56px);
  /* Bord du contenu : la gouttière, puis le bord de la colonne de 1360 px sur grand écran.
     En-tête et héros s’y alignent, comme toutes les sections. */
  --edge: max(var(--gut), calc((100% - 1360px) / 2 + var(--gut)));
  --display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --sans: "Hanken Grotesk", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--head) + 12px); }
body { margin: 0; background: var(--asphalt); color: var(--text); font: 400 17px/1.55 var(--sans); overflow-x: clip; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { margin: 0; font-family: var(--display); font-weight: 800; line-height: 0.92; letter-spacing: -0.005em; }
h1, h2, h3, h4 { text-wrap: balance; }
p, li, dd, figcaption { text-wrap: pretty; }
h2 { font-size: clamp(46px, 6.4vw, 96px); }
h3 { font-size: clamp(27px, 2.5vw, 36px); line-height: 1; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
table { border-collapse: collapse; width: 100%; }
figure { margin: 0; }
strong { font-weight: 700; }
sup { font-size: .7em; line-height: 0; vertical-align: super; }
.wrap { width: 100%; max-width: 1360px; margin: 0 auto; padding: 0 var(--gut); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.small { font-size: 15px; color: var(--stone); }
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }
/* Tableau plus large que l'écran : il s'efface à droite tant qu'il reste des colonnes à faire défiler. */
.scroll-x.is-clip { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 56px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 56px), transparent); }
.scroll-x.is-clip-l { -webkit-mask-image: linear-gradient(270deg, #000 calc(100% - 56px), transparent); mask-image: linear-gradient(270deg, #000 calc(100% - 56px), transparent); }
.scroll-x.is-clip.is-clip-l { -webkit-mask-image: linear-gradient(90deg, transparent, #000 56px, #000 calc(100% - 56px), transparent); mask-image: linear-gradient(90deg, transparent, #000 56px, #000 calc(100% - 56px), transparent); }

:focus-visible { outline: 3px solid var(--chart); outline-offset: 3px; }
.skip { position: absolute; left: 12px; top: -80px; z-index: 100; padding: 12px 16px; background: var(--chart); color: var(--ink); font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }

/* Boutons et liens */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 4px 24px 2px;
  background: var(--chart); color: var(--ink); border: 0; border-radius: 2px; text-decoration: none;
  font: 800 21px/1 var(--display); text-transform: uppercase; transition: background-color .2s, transform .2s;
}
.btn:hover { background: var(--chart-hi); }
.btn:active { transform: translateY(1px); }
.btn:disabled { background: var(--asphalt-3); color: var(--muted); cursor: not-allowed; }
.btn--sm { min-height: 44px; padding: 3px 18px 1px; font-size: 18px; }
.btn--full { width: 100%; }
.link { color: var(--text); font-weight: 600; text-decoration: underline; text-decoration-color: var(--chart); text-decoration-thickness: 2px; text-underline-offset: 6px; }
.link:hover { color: var(--white); text-decoration-thickness: 4px; }
.linkbtn { background: none; border: 0; padding: 0; min-height: 44px; text-decoration: underline; text-underline-offset: 3px; }

/* Options soulignées (jamais de pastilles) */
.opts { display: flex; flex-wrap: wrap; gap: 4px 22px; }
.opt { min-height: 44px; padding: 8px 0 6px; background: none; border: 0; border-bottom: 3px solid transparent; color: var(--stone); font-weight: 600; font-size: 16px; }
.opt:hover { color: var(--white); }
.opt[aria-pressed="true"] { color: var(--white); border-bottom-color: var(--chart); }

/* Curseurs */
.field { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 6px 12px; margin-bottom: 22px; }
.field label, .field__l { font-weight: 600; margin: 0; }
.field output { font: 600 15px/1 var(--mono); color: var(--chart); }
.field input[type="range"], .field .opts { grid-column: 1 / -1; }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 44px; background: transparent; margin: 0; }
input[type="range"]::-webkit-slider-runnable-track { height: 4px; background: linear-gradient(90deg, var(--chart) var(--fill, 50%), var(--line) var(--fill, 50%)); }
input[type="range"]::-moz-range-track { height: 4px; background: var(--line); }
input[type="range"]::-moz-range-progress { height: 4px; background: var(--chart); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; margin-top: -10px; background: var(--chart); border: 3px solid var(--asphalt); border-radius: 2px; }
input[type="range"]::-moz-range-thumb { width: 20px; height: 20px; background: var(--chart); border: 3px solid var(--asphalt); border-radius: 2px; }
input[type="range"]:disabled { opacity: .35; }
input[type="range"]:focus-visible { outline-offset: 0; }
.check { display: flex; align-items: center; gap: 6px; min-height: 44px; margin-bottom: 8px; font-weight: 600; cursor: pointer; }
.check input {
  -webkit-appearance: none; appearance: none; flex: none; width: 44px; height: 44px; margin: 0 0 0 -11px; cursor: pointer;
  background: no-repeat center / 22px 22px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 22'%3E%3Crect x='1' y='1' width='20' height='20' fill='none' stroke='%23131614' stroke-width='2'/%3E%3C/svg%3E");
}
.check input:checked { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 22'%3E%3Crect x='1' y='1' width='20' height='20' fill='%23d4f22e' stroke='%23131614' stroke-width='2'/%3E%3Cpath d='M5.5 11.5l3.5 3.5 7.5-8' fill='none' stroke='%23131614' stroke-width='2.4'/%3E%3C/svg%3E"); }
.check input:focus-visible { outline: 3px solid var(--ink); outline-offset: -6px; }

/* Plaque de col : le motif des bornes cyclistes, repris pour le profil */
.sign { background: #f3f4f3; color: var(--ink); border-radius: 6px; padding: 6px; box-shadow: 0 18px 40px rgba(0, 0, 0, .35); }
.sign__band { margin: 0; padding: 9px 12px 7px; background: var(--chart); border-radius: 3px 3px 0 0; font: 800 22px/1 var(--display); text-transform: uppercase; }
.sign__alt { margin: 0; padding: 10px 12px 4px; border-inline: 2px solid var(--ink); font: 900 64px/0.9 var(--display); }
.sign__data { margin: 0; padding: 6px 12px 10px; border: 2px solid var(--ink); border-top: 0; border-radius: 0 0 3px 3px; }
.sign__data div { display: flex; justify-content: space-between; gap: 16px; padding: 3px 0; }
.sign__data dt { font-size: 14px; }
.sign__data dd { margin: 0; font: 700 15px/1.3 var(--mono); }

/* Figures photo */
.ph img { width: 100%; object-fit: cover; }
.ph figcaption { margin-top: 10px; font-size: 14px; color: var(--muted); max-width: 52ch; }

/* En-tête */
.top {
  position: fixed; z-index: 50; top: var(--demobar-offset, 0px); left: 0; right: 0; height: var(--head);
  display: flex; align-items: center; gap: 22px; padding: 0 var(--edge); background: var(--asphalt);
  transition: box-shadow .3s;
}
.top.is-scrolled { box-shadow: 0 1px 0 var(--line); }
main { display: block; padding-top: var(--head); }
main:focus { outline: none; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; margin-right: auto; min-height: 44px; }
.brand__mark { width: 36px; height: 36px; }
.brand__name { font: 900 25px/0.9 var(--display); text-transform: uppercase; letter-spacing: 0.01em; }
.brand__name span { color: var(--chart); }
.nav { display: flex; align-items: center; gap: 24px; }
.nav a { font-weight: 600; font-size: 15.5px; text-decoration: none; color: var(--stone); padding: 12px 0; }
.nav a:hover { color: var(--white); }
.lang { background: none; border: 0; color: var(--muted); font: 600 14px var(--mono); min-height: 44px; min-width: 44px; }
.status { margin: 0; font: 500 13px/1.2 var(--mono); color: var(--stone); white-space: nowrap; }
.status b { font-weight: 600; color: var(--chart); }
.status--closed b { color: var(--stone); }
.menu { display: none; }

/* Pied de page */
.foot { background: #0d0f0e; padding: 72px 0 110px; font-size: 15px; color: var(--stone); }
.foot__grid { display: grid; grid-template-columns: 1.1fr 1fr 1.5fr; gap: 48px; }
.foot__name { font: 900 34px/0.9 var(--display); text-transform: uppercase; color: var(--text); }
.foot a { color: var(--text); }
.foot__credits p { font-size: 13px; line-height: 1.6; }
.foot__credits a { display: inline-block; padding: 12px 0; margin: -12px 0; }

@media (max-width: 1180px) {
  .status { display: none; }
  .nav { gap: 18px; }
}
@media (max-width: 1023px) {
  .top { gap: 12px; }
  .menu { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; padding: 0 4px; background: none; border: 0; font: 700 16px var(--sans); color: var(--text); text-decoration: underline; text-decoration-color: var(--chart); text-underline-offset: 5px; }
  .nav { position: fixed; top: calc(var(--head) + var(--demobar-offset, 0px)); left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; padding: 8px var(--gut) 24px; background: var(--asphalt-2); box-shadow: 0 24px 40px rgba(0, 0, 0, .45); transform: translateY(-8px); opacity: 0; visibility: hidden; transition: opacity .2s, transform .2s, visibility .2s; }
  .nav.is-open { opacity: 1; transform: none; visibility: visible; }
  .nav a { font: 800 30px/1 var(--display); color: var(--text); padding: 12px 0; }
  .lang { align-self: flex-start; padding: 0; text-align: left; font-size: 16px; }
  .foot__grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .brand__name { font-size: 21px; }
  .brand__mark { width: 32px; height: 32px; }
  .top .btn--sm { padding: 3px 12px 1px; font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
