/* ==========================================================
   Trail di a Sant'Andria — feuille commune
   Charte : rouge #D9494A, noir #1A1A1A, blanc.
   Parcours : rouge (long), bleu #3F63C4 (court), vert #4E9455 (marche).
   ========================================================== */

@font-face {
  font-family: "Lucidity";
  src: url("../fonts/lucidity-condensed.woff2") format("woff2");
  font-display: swap;
}
/* Police « TRAIL » des affiches : déposer le fichier dans assets/fonts/ */
@font-face {
  font-family: "Tan Rosebud";
  src: url("../fonts/tan-rosebud.woff2") format("woff2");
  font-display: swap;
}

:root {
  --rouge: #D9494A;
  --rouge-fonce: #B83236;
  --rose: #F4DCDB;
  --noir: #1A1A1A;
  --blanc: #FFFFFF;
  --bleu: #3F63C4;
  --vert: #4E9455;
  /* encres des parcours, version web : plus denses, façon impression riso */
  --encre-rouge: #C9363B;
  --encre-bleu: #2B4C9E;
  --encre-vert: #2F6B45;

  --f-affiche: "Lucidity", "Barlow Condensed", sans-serif;
  --f-groove: "Tan Rosebud", "Lucidity", "Barlow Condensed", sans-serif;
  --f-titre: "Barlow Condensed", sans-serif;
  --f-texte: "Barlow", system-ui, sans-serif;

  --gutter: clamp(16px, 5vw, 64px);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-snap: cubic-bezier(.34, 1.56, .64, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--rose);
  color: var(--noir);
  font: 400 1.0625rem/1.55 var(--f-texte);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: geometricPrecision;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.kicker {
  font: 600 .8rem/1 var(--f-titre);
  letter-spacing: .28em;
  text-transform: uppercase;
}

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: .6em 1.3em;
  font: 700 1rem/1 var(--f-titre); letter-spacing: .08em; text-transform: uppercase;
  text-decoration: none; border-radius: 999px; border: 2px solid currentColor;
  transition: transform .25s var(--ease-snap), background .2s, color .2s;
}
.btn:hover { transform: translateY(-2px) rotate(-1.5deg); }
.btn--light { background: var(--blanc); color: var(--rouge); border-color: var(--blanc); }
.btn--ghost { background: transparent; color: var(--blanc); }
.btn--ghost:hover { background: var(--blanc); color: var(--noir); }
.btn--red { background: var(--rouge); color: var(--blanc); border-color: var(--rouge); }
.btn--xl { font-size: clamp(1.1rem, 2.4vw, 1.5rem); padding: .9em 1.8em; }

/* ---------- En-tête ---------- */
.top {
  position: fixed; inset: 0 0 auto; z-index: 50;
  display: flex; align-items: center; gap: 1.5rem;
  padding: 14px var(--gutter);
  color: var(--blanc);
  transition: background .35s, padding .35s;
}
.top::before { /* voile pour lire le menu sur les nuages */
  content: ""; position: absolute; inset: 0 0 -40px; z-index: -1; pointer-events: none;
  background: linear-gradient(rgba(140, 30, 34, .45), rgba(140, 30, 34, 0));
  transition: opacity .35s;
}
.top.is-solid::before { opacity: 0; }
.top.is-solid { background: var(--rouge); padding-block: 10px; }
.top__mark {
  font: 1.35rem/1 var(--f-affiche); text-transform: uppercase; text-decoration: none;
  opacity: 0; transform: translateY(-6px); transition: opacity .3s, transform .3s;
}
.top.is-solid .top__mark { opacity: 1; transform: none; }
.top__nav { margin-left: auto; display: flex; gap: 1.6rem; }
.top__nav a {
  font: 600 .95rem/1 var(--f-titre); letter-spacing: .14em; text-transform: uppercase; text-decoration: none;
  background: linear-gradient(currentColor 0 0) 0 100% / 0 2px no-repeat; padding-bottom: 4px;
  transition: background-size .3s var(--ease-out);
}
.top__nav a:hover { background-size: 100% 2px; }
/* pages intérieures : lien Accueil à gauche, même style que les onglets */
.top__home {
  font: 600 .95rem/1 var(--f-titre); letter-spacing: .14em; text-transform: uppercase; text-decoration: none;
  background: linear-gradient(currentColor 0 0) 0 100% / 0 2px no-repeat; padding-bottom: 4px;
  transition: background-size .3s var(--ease-out);
}
.top__home:hover { background-size: 100% 2px; }
.top__cta { min-height: 40px; }
.top__burger {
  display: none; width: 44px; height: 44px; margin-left: auto;
  background: none; border: 0; color: inherit; cursor: pointer; position: relative;
}
.top__burger span:not(.sr) {
  position: absolute; left: 10px; right: 10px; height: 2px; background: currentColor;
  transition: transform .3s var(--ease-out);
}
.top__burger span:nth-child(1) { top: 17px; }
.top__burger span:nth-child(2) { top: 25px; }
.top__burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.top__burger[aria-expanded="true"] span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

.menu {
  position: fixed; inset: 0; z-index: 40;
  background: var(--rouge); color: var(--blanc);
  display: flex; flex-direction: column; justify-content: center;
  padding: 90px var(--gutter) 40px;
}
.menu[hidden] { display: none; }
.menu__list { display: flex; flex-direction: column; gap: .1em; }
.menu__list a {
  font: clamp(2.4rem, 11vw, 4.5rem)/1 var(--f-affiche); text-transform: uppercase; text-decoration: none;
  animation: menu-in .5s var(--ease-out) both;
}
.menu__list a:nth-child(n) { animation-delay: calc(var(--i, 0) * 40ms); }
.menu__foot { display: flex; gap: 1.5rem; margin-top: 2.5rem; font: 600 .95rem var(--f-titre); letter-spacing: .14em; text-transform: uppercase; }
.menu__foot a { text-decoration: none; opacity: .85; }
@keyframes menu-in { from { opacity: 0; transform: translateY(24px); } }

@media (max-width: 860px) {
  .top__nav { display: none; }
  .top__cta { margin-left: auto; }
  .top__burger { display: block; margin-left: 0; }
  .top { gap: .75rem; }
  .top__mark { font-size: 1.1rem; }
}
@media (max-width: 420px) {
  .top.is-solid .top__mark { display: none; }
}

/* ==========================================================
   HERO — affiche en calques
   ========================================================== */
.hero { position: relative; height: 230vh; background: var(--rose); }
.hero__sticky {
  position: sticky; top: 0; height: 100vh; height: 100svh;
  overflow: hidden; background: var(--rose);
}
.hero__logo {
  position: absolute; z-index: 6; top: 64px; left: var(--gutter);
  width: clamp(130px, 13vw, 190px); height: auto;
}

/* Scène : même ratio que l'affiche (1196 × 1566), couvre l'écran */
.stage {
  position: absolute; left: 50%; top: 0;
  width: max(100vw, 100svh * 0.7637);
  aspect-ratio: 1196 / 1566;
  transform: translateX(-50%);
  --mx: 0; --my: 0;
}
.layer { position: absolute; left: 0; width: 100%; will-change: transform; }
.layer img { width: 100%; height: auto; }
.layer__in { position: relative; transition: transform 1.6s var(--ease-out), opacity 1.2s ease, filter 1.6s var(--ease-out); }
.l3 { top: 0; }
.l2 { top: 13.857%; }  /* 217 / 1566 */
.l1 { top: 47.318%; }  /* 741 / 1566 */

/* Brume qui dérive */
.fog { top: 4%; height: 32%; pointer-events: none; mix-blend-mode: screen; }
.fog .layer__in {
  height: 100%;
  background: url("../img/brume.webp") 0 0 / auto 100% repeat-x;
  animation: drift 140s linear infinite;
  opacity: .55;
}
.fog--front { top: 30%; height: 26%; }
.fog--front .layer__in { animation-duration: 90s; animation-direction: reverse; opacity: .4; }
@keyframes drift { to { background-position: -1600px 0; } }

/* Grain riso vivant */
.grain {
  position: absolute; inset: -50%; z-index: 4; pointer-events: none;
  background: url("../img/grain.png");
  opacity: .16; mix-blend-mode: soft-light;
  animation: grain .9s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -4%); } 60% { transform: translate(-4%, -1%); }
  80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); }
}

/* Typo de l'affiche */
.hero__type {
  position: absolute; z-index: 5;
  left: var(--gutter); right: var(--gutter); bottom: max(9vh, 64px);
  color: var(--blanc);
  font-family: var(--f-affiche); text-transform: uppercase; line-height: .95;
}
.t-line { overflow: hidden; padding-bottom: .04em; }
.t-line span { display: inline-block; }
.t-sm { font-size: clamp(2rem, 4.6vw, 4rem); }
.t-md { font-size: clamp(1.7rem, 3.6vw, 3.2rem); }
.t-place { margin-top: .9em; }
.t-xl {
  font-weight: 400; margin: .18em 0 .28em -.03em;
  font-size: min(17.5vw, 25vh, 15rem); line-height: .88; white-space: nowrap;
}
.split .ch { display: inline-block; will-change: transform; }
.hero__type, .hero__type * { will-change: transform, opacity; }

/* Chaussure */
.shoe {
  position: absolute; z-index: 5;
  right: max(-2vw, -20px); bottom: -2px;
  width: clamp(160px, 27vw, 400px); height: auto;
  transform-origin: 80% 100%;
}

/* Mouflon façon découpage South Park */
.mouflon {
  position: absolute; z-index: 2;
  left: 70%; top: 37%;
  width: max(5.2%, 40px);
  padding: 0; border: 0; background: none; cursor: pointer;
  transform: translate(-50%, -96%);
}
.mouflon img { width: 100%; height: auto; transform-origin: 50% 100%; }
.mouflon.is-right img { transform: scaleX(-1); }
.bubble { /* bulle de chant du mouflon ; --bx (0 à 1) la décale vers l'intérieur de l'écran */
  position: absolute; bottom: 112%; left: 50%; z-index: 5;
  width: max-content; max-width: min(250px, 70vw);
  padding: .6em .95em .65em; border-radius: 1.2em;
  background: var(--blanc); color: var(--rouge-fonce);
  font: .98rem/1.12 var(--f-affiche); text-transform: uppercase; text-align: center;
  box-shadow: 0 6px 18px rgba(0,0,0,.15);
  transform: translateX(calc(var(--bx, .5) * -100%)) scale(0);
  transform-origin: calc(var(--bx, .5) * 100%) 120%;
  transition: transform .35s var(--ease-snap);
  pointer-events: none;
}
.bubble::before { content: "♪ "; color: var(--rouge); }
.bubble::after {
  content: ""; position: absolute; top: 100%; margin-left: -7px;
  left: clamp(16px, calc(var(--bx, .5) * 100%), calc(100% - 16px));
  border: 7px solid transparent; border-top-color: var(--blanc);
}
.is-talking > .bubble { transform: translateX(calc(var(--bx, .5) * -100%)) scale(1); }

.hero__scroll {
  position: absolute; z-index: 6; left: 50%; bottom: 18px; transform: translateX(-50%);
  color: var(--blanc); text-decoration: none;
  font: 600 .75rem/1 var(--f-titre); letter-spacing: .3em; text-transform: uppercase;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.hero__scroll::after { content: ""; width: 1px; height: 28px; background: currentColor; animation: tick 1.6s ease-in-out infinite; transform-origin: top; }
@keyframes tick { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }
@media (max-width: 860px) { .hero__scroll { display: none; } }

/* ---------- Intro : l'affiche se compose ---------- */
.js .hero:not(.is-ready) .l3 .layer__in { opacity: 0; transform: scale(1.08); filter: blur(14px); }
.js .hero:not(.is-ready) .l2 .layer__in { opacity: 0; transform: translateY(14%); }
.js .hero:not(.is-ready) .l1 .layer__in { opacity: 0; transform: translateY(22%); }
.js .hero:not(.is-ready) .fog .layer__in { opacity: 0; }
.l2 .layer__in { transition-delay: .25s; }
.l1 .layer__in { transition-delay: .45s; }

.js .hero .t-line span,
.js .hero .split .ch,
.js .hero .shoe,
.js .hero .hero__logo,
.js .hero .mouflon img { transition: transform 1s var(--ease-out), opacity .8s ease; }

.js .hero:not(.is-ready) .t-line span { transform: translateY(105%); }
.js .hero:not(.is-ready) .split .ch { transform: translateY(-60%) rotate(var(--r0, 0deg)); opacity: 0; }
.js .hero:not(.is-ready) .shoe { transform: translate(40%, 50%) rotate(18deg); opacity: 0; }
.js .hero:not(.is-ready) .hero__logo { opacity: 0; transform: translateY(-12px); }
.js .hero:not(.is-ready) .mouflon img { transform: scale(0); }

.hero.is-ready .t-line:nth-child(1) span { transition-delay: .9s; }
.hero.is-ready .t-line:nth-child(2) span { transition-delay: 1s; }
.hero.is-ready .t-line:nth-child(4) span { transition-delay: 1.5s; }
.hero.is-ready .t-line:nth-child(5) span { transition-delay: 1.58s; }
.hero.is-ready .t-line:nth-child(6) span { transition-delay: 1.7s; }
.hero.is-ready .split .ch { transition-delay: calc(1.1s + var(--i) * 45ms); transition-timing-function: var(--ease-snap); }
.hero.is-ready .shoe { transition: transform .7s var(--ease-snap) 1.9s, opacity .3s 1.9s; }
.hero.is-ready .hero__logo { transition-delay: .6s; }
.hero.is-ready .mouflon img { transition: transform .5s var(--ease-snap) 2.4s; }
/* une fois posé, les transitions ne gênent plus le scroll */
.hero.is-settled .t-line span, .hero.is-settled .split .ch, .hero.is-settled .shoe { transition: none; }

/* ==========================================================
   BANDEAU
   ========================================================== */
.ticker {
  position: relative; z-index: 2;
  background: var(--noir); color: var(--blanc);
  overflow: hidden; padding: .7em 0;
  font: clamp(1.3rem, 2.6vw, 2rem)/1 var(--f-affiche); text-transform: uppercase; white-space: nowrap;
}
.ticker__track { display: inline-flex; gap: 1.2em; animation: ticker 32s linear infinite; padding-left: 1.2em; }
.ticker i { font-style: normal; color: var(--rouge); }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ==========================================================
   PANCARTE TIRÉE PAR LE MOUFLON
   ========================================================== */
.trail { position: relative; overflow: hidden; background: var(--rose); }
.tow {
  position: relative;
  display: flex; justify-content: center;
  padding: clamp(64px, 9vw, 130px) var(--gutter) clamp(72px, 10vw, 150px);
}
.trail__intro {
  position: relative; z-index: 2;
  width: min(100%, 50rem);
  padding: clamp(1.8rem, 4vw, 3.2rem) clamp(1.6rem, 4vw, 3.4rem) clamp(2rem, 4vw, 3.4rem);
  background: var(--blanc); color: var(--noir);
  transform: rotate(-1.2deg);
  box-shadow: 0 14px 34px rgba(120, 30, 30, .16);
  will-change: transform;
}
.trail__intro .kicker { color: var(--rouge); }
.trail__intro h2 {
  font: 700 clamp(2.4rem, 5.6vw, 4.6rem)/.95 var(--f-titre); text-transform: uppercase;
  margin: .35em 0 .45em;
}
.trail__intro p:last-child { font-size: clamp(1.05rem, 1.6vw, 1.3rem); max-width: 40ch; }
.tow__mouflon {
  position: absolute; left: 0; top: 0; z-index: 3;
  width: clamp(70px, 8vw, 120px); height: auto;
  visibility: hidden; will-change: transform;
}
.tow__rope { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 1; }
.tow__rope path { fill: none; stroke: #6b4a3a; stroke-width: 3; stroke-linecap: round; }
/* tant que l'animation n'a pas eu lieu, la pancarte attend hors champ */
.tow.is-waiting .trail__intro { visibility: hidden; }

/* ==========================================================
   PARCOURS
   ========================================================== */
.parcours { display: grid; grid-template-columns: 1fr; grid-auto-rows: 1fr; }
.course {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 2rem;
  padding: clamp(28px, 4vw, 48px);
  color: var(--blanc);
  isolation: isolate;
}
.course::before { /* grain sur l'aplat */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: url("../img/grain.png"); opacity: .55; mix-blend-mode: overlay;
}
/* photo en duotone : gris -> encre du parcours / blanc */
.course__duo {
  position: absolute; inset: 0 0 35% 0; z-index: -2;
  background: var(--duo) 50% 30% / cover no-repeat;
  mix-blend-mode: screen; opacity: .62;
  -webkit-mask-image: linear-gradient(#000 40%, transparent);
          mask-image: linear-gradient(#000 40%, transparent);
  transition: transform 1.2s var(--ease-out);
}
.course:hover .course__duo { transform: scale(1.04); }
.course--rouge { background-color: var(--encre-rouge); --duo: url("../img/duo-teppa.webp"); }
.course--bleu { background-color: var(--encre-bleu); --duo: url("../img/duo-falcunaghja.webp"); }
.course--vert { background-color: var(--encre-vert); --duo: url("../img/duo-pieve.webp"); }
.course h3, .course__tag { text-shadow: 0 1px 14px rgba(0, 0, 0, .18); }
/* en-tête : étiquette + compteur sur la 1re ligne (hauteur fixe pour aligner les titres), nom dessous */
.route__panel .course__head { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: minmax(5.2rem, auto) auto; align-items: start; gap: 0 1rem; }
.route__panel .course__head .course__tag { grid-column: 1; grid-row: 1; }
.route__panel .course__head h2 { grid-column: 1 / -1; grid-row: 2; }
.route__panel .course__head .places { grid-column: 2; grid-row: 1; padding: .55rem .7rem .65rem; gap: .15rem .5rem; }
.route__panel .course__head .places__label { font-size: .62rem; letter-spacing: .16em; }
.route__panel .course__head .places__n { font-size: clamp(1.9rem, 2.6vw, 2.5rem); }
/* accueil : compteur à droite du nom (passe dessous si la place manque) */
.course__title { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 1rem 1.5rem; min-height: 6.2rem; }
.course__title .places { margin-bottom: .3rem; }
.course__tag { font: 600 .82rem/1.3 var(--f-titre); letter-spacing: .2em; text-transform: uppercase; opacity: .9; }
.course h3 {
  font: 400 clamp(2.8rem, 4.6vw, 4.6rem)/.9 var(--f-affiche); text-transform: uppercase;
  margin-top: .4em;
}
/* Places restantes (N'Juko) */
.places {
  align-self: flex-start;
  display: grid; grid-template-columns: auto auto; align-items: end; gap: .2rem 1rem;
  padding: .8rem 1rem .9rem;
  background: rgba(255, 255, 255, .12);
  border: 2px solid rgba(255, 255, 255, .85);
  border-radius: 4px;
  transform: rotate(-1.5deg);
  backdrop-filter: blur(2px);
}
.places__label {
  grid-column: 1 / -1;
  font: 600 .78rem/1 var(--f-titre); letter-spacing: .22em; text-transform: uppercase;
}
.places__n { font: clamp(2.6rem, 4.4vw, 3.6rem)/.85 var(--f-affiche); font-variant-numeric: tabular-nums; }
.places__n small { font-size: .42em; opacity: .75; margin-left: .15em; }
.places__bar { grid-column: 1 / -1; height: 6px; background: rgba(255, 255, 255, .25); border-radius: 3px; overflow: hidden; }
.places__bar i {
  display: block; height: 100%; background: var(--blanc);
  transform-origin: left; transform: scaleX(0);
  transition: transform 1.4s var(--ease-out) .1s;
}
.places.is-in .places__bar i { transform: scaleX(var(--taux, 0)); }
.places.is-low { animation: pulse 1.6s ease-in-out infinite; }
.places.is-low .places__label::before { content: "● "; }
.places.is-full { opacity: .85; }
@keyframes pulse { 50% { transform: rotate(-1.5deg) scale(1.04); } }
@media (prefers-reduced-motion: reduce) { .places.is-low { animation: none; } }

.course__stats { margin: auto 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.course__stats div { border-top: 2px solid rgba(255,255,255,.5); padding-top: .6rem; }
.course__stats dt { font: 600 .8rem/1 var(--f-titre); letter-spacing: .2em; text-transform: uppercase; opacity: .85; }
.course__stats dd { margin: .2em 0 0; font: clamp(3.4rem, 6vw, 5.6rem)/.9 var(--f-affiche); }
.course__stats small { font-size: .38em; margin-left: .25em; }
.course__links { display: flex; flex-wrap: wrap; gap: .6rem; }
.course--rouge .btn--light { color: var(--encre-rouge); }
.course--bleu .btn--light { color: var(--encre-bleu); }
.course--vert .btn--light { color: var(--encre-vert); }
.course h3, .course__stats dd { transition: transform .5s var(--ease-out); }
.course:hover h3 { transform: translateX(6px); }

@media (max-width: 900px) {
  .parcours { grid-template-columns: 1fr; }
  .course { min-height: 0; }
  .course__stats { grid-template-columns: 1fr 1fr; }
}

/* ==========================================================
   INFOS
   ========================================================== */
.infos {
  background: var(--blanc);
  padding: clamp(56px, 9vw, 120px) var(--gutter);
  display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(32px, 6vw, 96px); align-items: center;
}
.viewfinder {
  position: relative; padding: clamp(28px, 4vw, 48px);
  --c: var(--rouge);
  background:
    linear-gradient(var(--c) 0 0) 0 0 / 34px 3px, linear-gradient(var(--c) 0 0) 0 0 / 3px 34px,
    linear-gradient(var(--c) 0 0) 100% 0 / 34px 3px, linear-gradient(var(--c) 0 0) 100% 0 / 3px 34px,
    linear-gradient(var(--c) 0 0) 0 100% / 34px 3px, linear-gradient(var(--c) 0 0) 0 100% / 3px 34px,
    linear-gradient(var(--c) 0 0) 100% 100% / 34px 3px, linear-gradient(var(--c) 0 0) 100% 100% / 3px 34px;
  background-repeat: no-repeat;
}
.viewfinder h2 { font: clamp(2.6rem, 5vw, 4.4rem)/.92 var(--f-affiche); text-transform: uppercase; color: var(--rouge); }
.viewfinder p { margin-top: 1rem; max-width: 30ch; }
.infos__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-top: 2px solid var(--noir); }
.infos__grid li { border-bottom: 2px solid var(--noir); }
.infos__grid li:nth-child(odd) { border-right: 2px solid var(--noir); }
.infos__grid a {
  display: flex; flex-direction: column; gap: .3rem; height: 100%;
  padding: 1.4rem 1.2rem 1.6rem; text-decoration: none;
  transition: background .25s, color .25s;
}
.infos__grid a:hover { background: var(--rouge); color: var(--blanc); }
.infos__grid .n { font: 600 .8rem var(--f-titre); letter-spacing: .2em; opacity: .6; }
.infos__grid strong { font: 700 clamp(1.5rem, 2.4vw, 2rem)/1 var(--f-titre); text-transform: uppercase; }
.infos__grid span:last-child { font-size: .95rem; opacity: .8; }
@media (max-width: 900px) {
  .infos { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .infos__grid { grid-template-columns: 1fr; }
  .infos__grid li:nth-child(odd) { border-right: 0; }
}

/* ==========================================================
   PARTENAIRES
   ========================================================== */
.partners {
  background: var(--rose);
  padding: clamp(56px, 9vw, 120px) var(--gutter);
  text-align: center;
}
.partners__head .kicker { color: var(--rouge); }
.partners__head h2 { font: clamp(2.6rem, 6vw, 5rem)/.95 var(--f-affiche); text-transform: uppercase; color: var(--rouge-fonce); margin-top: .3em; }
.partners__grid {
  list-style: none; margin: clamp(32px, 5vw, 64px) auto 0; padding: 0;
  max-width: 1100px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px;
}
.partners__grid--main { grid-template-columns: repeat(3, 1fr); max-width: 960px; }
.partners__grid--main .partner { aspect-ratio: 16 / 10; }
.partners__grid--main + .partners__grid { margin-top: 14px; grid-template-columns: repeat(4, 1fr); max-width: 960px; }
@media (max-width: 700px) {
  .partners__grid--main { grid-template-columns: 1fr 1fr; }
  .partners__grid--main .partner:first-child { grid-column: 1 / -1; aspect-ratio: 2 / 1; }
  .partners__grid--main + .partners__grid { grid-template-columns: 1fr 1fr; }
}
.partner {
  aspect-ratio: 3 / 2;
  background: var(--blanc);
  display: grid; place-items: center;
  border-radius: 6px;
  transition: transform .4s var(--ease-snap), box-shadow .3s;
}
.partner:nth-child(3n+1) { transform: rotate(-1deg); }
.partner:nth-child(3n+2) { transform: rotate(.8deg); }
.partner:hover { transform: rotate(0) translateY(-4px); box-shadow: 0 12px 26px rgba(120, 30, 30, .14); }
.partner { position: relative; overflow: hidden; }
.partner a { position: absolute; inset: 0; }
.partner a:focus-visible { outline: 3px solid var(--rouge); outline-offset: 3px; border-radius: 6px; }
.partner img {
  position: absolute; inset: 14% 16%; width: 68%; height: 72%; object-fit: contain;
  transition: filter .3s, opacity .3s;
}
/* sur ordinateur : logos en niveaux de gris, couleur au survol */
@media (hover: hover) {
  .partner img { filter: grayscale(1) contrast(1.05); opacity: .8; }
  .partner:hover img { filter: none; opacity: 1; }
}
.partner--empty { background: transparent; border: 2px dashed rgba(184, 50, 54, .35); }
.partner--empty span { font: 600 .8rem var(--f-titre); letter-spacing: .2em; text-transform: uppercase; color: rgba(184, 50, 54, .6); }
.partners__cta { margin-top: 2rem; }
.partners__cta a { color: var(--rouge-fonce); font-weight: 600; }

/* ==========================================================
   PRÉ-PIED + PIED
   ========================================================== */
.go {
  background: var(--blanc); text-align: center;
  padding: clamp(64px, 10vw, 140px) var(--gutter);
}
.go__big { font: clamp(3.4rem, 11vw, 9.5rem)/1.08 var(--f-groove); text-transform: uppercase; color: var(--rouge); margin-bottom: .4em; }

.foot {
  background: var(--rouge); color: var(--blanc);
  padding: clamp(48px, 7vw, 88px) var(--gutter) 40px;
  display: grid; grid-template-columns: auto 1fr; gap: clamp(32px, 6vw, 96px); align-items: end;
}
.foot__logo { width: 160px; height: auto; }
.foot__cols { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2rem; }
.foot__title { font: 700 1.3rem/1.1 var(--f-titre); text-transform: uppercase; letter-spacing: .04em; }
.foot nav { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; }
.foot nav a { font: 600 .9rem var(--f-titre); letter-spacing: .14em; text-transform: uppercase; text-decoration: none; }
.foot nav a:hover { text-decoration: underline; }
@media (max-width: 640px) { .foot { grid-template-columns: 1fr; } }

/* ==========================================================
   Mouvement réduit
   ========================================================== */
@media (prefers-reduced-motion: reduce) {
  .hero { height: auto; }
  .hero__sticky { position: relative; }
  .grain, .fog .layer__in, .ticker__track, .hero__scroll::after { animation: none; }
  .js .hero:not(.is-ready) *, .js .hero:not(.is-ready) .layer__in { opacity: 1 !important; transform: none !important; filter: none !important; }
  * { transition-duration: 0s !important; transition-delay: 0s !important; }
}

/* ==========================================================
   PAGES INTÉRIEURES
   ========================================================== */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .9s var(--ease-out); }
.reveal.is-in { opacity: 1; transform: none; }
.no-js .reveal, html:not(.js) .reveal { opacity: 1; transform: none; }

.top__nav a[aria-current="page"] { background-size: 100% 2px; }
.menu__list a[aria-current="page"] { color: var(--noir); }

/* Bandeau de page : photo duotone + grain + grand titre */
.phero {
  position: relative; overflow: hidden; isolation: isolate;
  min-height: min(72vh, 640px);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 120px var(--gutter) clamp(84px, 9vw, 120px);
  background: var(--rouge) url("../img/phero-village.webp") var(--pos, 36% 50%) / cover no-repeat;
  color: var(--blanc);
}
.phero::before { /* assombrit le bas pour la lisibilité */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(transparent 35%, rgba(150, 28, 32, .55));
}
.phero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: url("../img/grain.png"); opacity: .35; mix-blend-mode: overlay;
}
.phero--bleu { background-color: var(--encre-bleu); background-blend-mode: luminosity; }
.phero--bleu::before { background: linear-gradient(rgba(43, 76, 158, .35), rgba(30, 50, 110, .75)); }
.phero__back {
  align-self: flex-start;
  font: 600 .8rem/1 var(--f-titre); letter-spacing: .22em; text-transform: uppercase; text-decoration: none;
  opacity: .9;
}
.phero__back:hover { text-decoration: underline; }
.phero .kicker { margin-bottom: .8rem; }
.phero h1 {
  font: 400 clamp(3.6rem, 13vw, 11rem)/.86 var(--f-affiche); text-transform: uppercase;
  margin-left: -.04em;
}
.phero__sub { margin-top: 1rem; max-width: 38ch; font-size: clamp(1.05rem, 1.6vw, 1.25rem); }
.phero__walker { /* mouflon qui se promène sur le bord bas, piloté par site.js */
  position: absolute; left: 0; bottom: -2px; z-index: 2;
  width: clamp(56px, 6.5vw, 96px);
  padding: 0; border: 0; background: none; cursor: pointer; color: inherit;
  will-change: transform;
}
.phero__sticker {
  display: block; width: 100%; height: auto; transform-origin: 50% 100%;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .18));
}

.page-sec { padding: clamp(56px, 8vw, 112px) var(--gutter); }
.page-sec--white { background: var(--blanc); }
.page-sec--rose { background: var(--rose); }
.wrap { max-width: 1180px; margin: 0 auto; }
.wrap--narrow { max-width: 820px; }
.h-sec {
  font: 400 clamp(2.4rem, 5.5vw, 4.4rem)/.92 var(--f-affiche); text-transform: uppercase; color: var(--rouge);
  margin-bottom: .5em;
}
.h-sec--groove { font-family: var(--f-groove); line-height: 1.08; color: var(--rouge-fonce); }
.lead { font-size: clamp(1.15rem, 2vw, 1.45rem); line-height: 1.45; max-width: 46ch; }
.prose p + p { margin-top: 1em; }
.prose strong { font-weight: 600; }
.note { font-size: .92rem; opacity: .75; margin-top: 1rem; }

/* ---------- Parcours détaillés ---------- */
.route {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  background: var(--blanc);
}
.route + .route { border-top: 14px solid var(--rose); }
.route--flip { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
.route--flip .route__panel { order: 2; }
.route__panel {
  position: relative; overflow: hidden; isolation: isolate;
  min-height: min(90vh, 760px);
  display: flex; flex-direction: column; gap: 1.6rem;
  padding: clamp(28px, 4vw, 56px);
  color: var(--blanc);
}
.route__panel::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: url("../img/grain.png"); opacity: .55; mix-blend-mode: overlay;
}
.route__panel .course__duo { inset: 0 0 25% 0; }
.route--rouge .route__panel { background-color: var(--encre-rouge); --duo: url("../img/duo-teppa.webp"); }
.route--bleu .route__panel { background-color: var(--encre-bleu); --duo: url("../img/duo-falcunaghja.webp"); }
.route--vert .route__panel { background-color: var(--encre-vert); --duo: url("../img/duo-pieve.webp"); }
.route__panel h2 { font: 400 clamp(3rem, 6.5vw, 6rem)/.86 var(--f-affiche); text-transform: uppercase; text-shadow: 0 1px 14px rgba(0,0,0,.18); }
.route__panel .course__tag { text-shadow: 0 1px 14px rgba(0,0,0,.18); }
.route__big { margin-top: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.route__big div { border-top: 2px solid rgba(255,255,255,.5); padding-top: .6rem; }
.route__big dt { font: 600 .8rem/1 var(--f-titre); letter-spacing: .2em; text-transform: uppercase; opacity: .85; }
.route__big dd { margin: .2em 0 0; font: clamp(3rem, 5.5vw, 5rem)/.9 var(--f-affiche); }
.route__big small { font-size: .38em; margin-left: .25em; }
.route__body { padding: clamp(28px, 4.5vw, 64px); display: flex; flex-direction: column; gap: 1.8rem; }
.route__body .lead { max-width: none; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0; margin: 0; border-top: 2px solid var(--noir); }
.facts div { padding: .9rem 0 1rem; border-bottom: 1px solid rgba(26,26,26,.18); padding-right: 1rem; }
.facts dt { font: 600 .75rem/1 var(--f-titre); letter-spacing: .2em; text-transform: uppercase; opacity: .6; }
.facts dd { margin: .35em 0 0; font: 700 1.35rem/1.1 var(--f-titre); text-transform: uppercase; }
.route__links { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: auto; }
.btn--outline { background: transparent; color: var(--noir); border-color: var(--noir); }
.btn--outline:hover { background: var(--noir); color: var(--blanc); }
.route--rouge .btn--red { background: var(--encre-rouge); border-color: var(--encre-rouge); }
.route--bleu .btn--red { background: var(--encre-bleu); border-color: var(--encre-bleu); }
.route--vert .btn--red { background: var(--encre-vert); border-color: var(--encre-vert); }
details.kit { border: 2px solid var(--noir); border-radius: 6px; }
details.kit summary {
  cursor: pointer; list-style: none; padding: .9rem 1.1rem;
  font: 700 1.1rem/1 var(--f-titre); letter-spacing: .06em; text-transform: uppercase;
  display: flex; justify-content: space-between; align-items: center;
}
details.kit summary::-webkit-details-marker { display: none; }
details.kit summary::after { content: "+"; font-size: 1.6rem; transition: transform .3s var(--ease-out); }
details.kit[open] summary::after { transform: rotate(45deg); }
details.kit > div { padding: 0 1.1rem 1.1rem; }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.checklist li { position: relative; padding-left: 1.7rem; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: .32em; width: .95em; height: .95em;
  border: 2px solid var(--rouge); border-radius: 2px;
  background: linear-gradient(var(--rouge) 0 0) center / 45% 45% no-repeat;
}
@media (max-width: 900px) {
  .route, .route--flip { grid-template-columns: 1fr; }
  .route--flip .route__panel { order: 0; }
  .route__panel { min-height: 0; }
  .route__panel .course__duo { inset: 0; }
}
.map-cta {
  display: grid; grid-template-columns: 1fr auto; gap: 1.5rem; align-items: center;
  background: var(--noir); color: var(--blanc);
  padding: clamp(32px, 5vw, 56px) var(--gutter);
}
.map-cta p:first-child { font: clamp(2rem, 5vw, 3.6rem)/.95 var(--f-affiche); text-transform: uppercase; }
@media (max-width: 640px) { .map-cta { grid-template-columns: 1fr; } }

/* ---------- Étapes (inscription) ---------- */
.steps { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; counter-reset: s; }
.steps li {
  position: relative; background: var(--blanc); padding: 1.6rem 1.4rem 1.8rem; border-radius: 6px;
  display: flex; flex-direction: column; gap: .7rem;
}
.steps li:nth-child(2) { transform: rotate(.6deg); }
.steps li:nth-child(3) { transform: rotate(-.6deg); }
.steps .n { font: 400 3.4rem/.8 var(--f-affiche); color: var(--rouge); }
.steps h3 { font: 700 1.5rem/1 var(--f-titre); text-transform: uppercase; }
.steps .btn { align-self: flex-start; margin-top: auto; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } .steps li { transform: none !important; } }

.prices { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 2rem; }
.price {
  position: relative; overflow: hidden; isolation: isolate;
  padding: 1.4rem 1.3rem 1.5rem; color: var(--blanc); border-radius: 6px;
  display: flex; flex-direction: column; gap: .5rem; min-height: 250px;
}
.price::before { content: ""; position: absolute; inset: 0; z-index: -1; background: url("../img/grain.png"); opacity: .5; mix-blend-mode: overlay; }
.price--rouge { background: var(--encre-rouge); }
.price--bleu { background: var(--encre-bleu); }
.price--vert { background: var(--encre-vert); }
.price--noir { background: var(--noir); }
.price h3 { font: 400 1.9rem/.92 var(--f-affiche); text-transform: uppercase; }
.price .amount { margin-top: auto; font: 400 clamp(3.2rem, 5vw, 4.4rem)/.9 var(--f-affiche); }
.price .amount small { font-size: .4em; margin-left: .15em; }
.price p:last-child { font-size: .92rem; opacity: .9; }
.price .places { transform: none; padding: .5rem .7rem .6rem; margin: .3rem 0; }
.price .places__n { font-size: 2rem; }
@media (max-width: 1000px) { .prices { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .prices { grid-template-columns: 1fr; } }

/* ---------- Frise horaire ---------- */
.day + .day { margin-top: clamp(48px, 7vw, 88px); }
.day__title { display: flex; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.day__title h2 { font: 400 clamp(2.6rem, 6vw, 4.8rem)/.9 var(--f-affiche); text-transform: uppercase; color: var(--rouge); }
.day__title p { font: 600 .9rem var(--f-titre); letter-spacing: .2em; text-transform: uppercase; opacity: .7; }
.timeline { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--noir); }
.timeline li {
  display: grid; grid-template-columns: minmax(110px, 180px) 1fr auto; gap: 1rem 2rem; align-items: baseline;
  padding: 1.1rem 0; border-bottom: 1px solid rgba(26,26,26,.2);
}
.timeline time { font: 400 clamp(2rem, 4vw, 3rem)/.9 var(--f-affiche); color: var(--noir); }
.timeline strong { display: block; font: 700 clamp(1.15rem, 2vw, 1.45rem)/1.1 var(--f-titre); text-transform: uppercase; }
.timeline span { font-size: .95rem; opacity: .8; }
.tag {
  display: inline-block; padding: .35em .8em; border-radius: 999px;
  font: 700 .72rem/1 var(--f-titre); letter-spacing: .14em; text-transform: uppercase; white-space: nowrap;
  background: var(--noir); color: var(--blanc);
}
.tag--rouge { background: var(--encre-rouge); }
.tag--bleu { background: var(--encre-bleu); }
.tag--vert { background: var(--encre-vert); }
.timeline li.is-barrier time { color: var(--rouge); }
.timeline li.is-key { background: linear-gradient(90deg, rgba(217,73,74,.08), transparent 70%); }
@media (max-width: 640px) {
  .timeline li { grid-template-columns: 1fr; gap: .3rem; }
  .timeline .tag { justify-self: start; }
}

/* ---------- Cartes info (organisation) ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 2rem; }
.card {
  background: var(--blanc); border-radius: 6px; padding: 1.5rem 1.4rem 1.7rem;
  display: flex; flex-direction: column; gap: .6rem;
}
.card h3 { font: 700 1.45rem/1.05 var(--f-titre); text-transform: uppercase; }
.card .n { font: 400 2.6rem/.8 var(--f-affiche); color: var(--rouge); }
@media (max-width: 860px) { .cards { grid-template-columns: 1fr; } }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
@media (max-width: 860px) { .cols { grid-template-columns: 1fr; } }
.polaroid {
  background: var(--blanc); padding: 12px 12px 48px; transform: rotate(-2deg);
  box-shadow: 0 14px 34px rgba(120, 30, 30, .18);
}
.polaroid img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; }
.polaroid figcaption { font: 1.2rem var(--f-affiche); text-transform: uppercase; color: var(--rouge); margin-top: .7rem; text-align: center; }

/* ---------- Bande d'appel ---------- */
.cta-band {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--rouge); color: var(--blanc); text-align: center;
  padding: clamp(56px, 9vw, 120px) var(--gutter);
}
.cta-band::before { content: ""; position: absolute; inset: 0; z-index: -1; background: url("../img/grain.png"); opacity: .5; mix-blend-mode: overlay; }
.cta-band p:first-child { font: clamp(3rem, 10vw, 8.5rem)/1.08 var(--f-groove); text-transform: uppercase; margin-bottom: .35em; }
.cta-band .btn--light { color: var(--rouge); }

/* ---------- Formulaire ---------- */
.form { display: grid; gap: 1.4rem; margin-top: 2rem; }
.form label { display: grid; gap: .45rem; font: 600 .82rem/1 var(--f-titre); letter-spacing: .2em; text-transform: uppercase; }
.form input, .form textarea, .form select {
  font: 400 1.1rem/1.4 var(--f-texte); color: var(--noir);
  background: var(--blanc); border: 2px solid var(--noir); border-radius: 6px;
  padding: .8rem 1rem; width: 100%;
  transition: border-color .2s, box-shadow .2s;
}
.form textarea { min-height: 180px; resize: vertical; }
.form input:focus, .form textarea:focus, .form select:focus { outline: none; border-color: var(--rouge); box-shadow: 0 0 0 4px rgba(217, 73, 74, .2); }
.form .btn { justify-self: start; cursor: pointer; font-size: 1.1rem; padding: .9em 1.8em; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chips button {
  font: 600 .9rem/1 var(--f-titre); letter-spacing: .1em; text-transform: uppercase;
  padding: .6em 1em; border-radius: 999px; border: 2px solid var(--noir); background: transparent; cursor: pointer;
  transition: background .2s, color .2s;
}
.chips button[aria-pressed="true"], .chips button:hover { background: var(--noir); color: var(--blanc); }
.contact-side { display: grid; gap: 1.2rem; align-content: start; }
.contact-side .card { background: var(--rose); }

/* Partenaires : page dédiée */
.partners--page { padding-top: clamp(48px, 7vw, 96px); }

/* Champ piège anti-spam : invisible pour les humains, rempli par les robots */
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.sent { margin: 0 0 1.4rem; padding: 1rem 1.2rem; border-radius: 6px; background: var(--encre-vert); color: var(--blanc); font-weight: 600; }
/* MOBILE : les 3 boutons alignés sur une seule ligne */
@media (max-width: 600px) {
  .route__links {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
  }

  .route__links > a {
    flex: 0 1 auto;
    width: auto !important;
    min-width: 0;
    margin: 0 !important;
   padding: 17px 17px;
    white-space: nowrap;
    font-size: 17px;
  }
}