/* ==========================================================================
   MIOS RUNNING CLUB — Feuille de styles
   Direction artistique : bleu topographique du logo + blanc
   --------------------------------------------------------------------------
   1. Variables
   2. Base
   3. Utilitaires (container, boutons, badges, titres)
   4. Transition de page (rideau topo)
   5. En-tête + bordures "lignes de vie"
   6. Héros
   7. Sections génériques + texture topo
   8. Événements
   9. Le Club / Valeurs
   10. Entraînements + carte
   11. Contact
   12. Pied de page
   13. Animations d'apparition
   14. Responsive
   15. Mouvement réduit
   ========================================================================== */


/* 1. VARIABLES ============================================================ */
:root {
  /* Bleu exact du logo et dérivés très proches (dégradés subtils uniquement) */
  --blue:        #03A7FD;   /* bleu logo */
  --blue-600:    #029BEE;
  --blue-700:    #028EDC;   /* sections de contenu : meilleure lisibilité */
  --blue-800:    #0282CB;
  --line-blue:   rgba(1, 120, 190, .55); /* teinte des courbes du logo */

  --white:       #FFFFFF;
  --white-90:    rgba(255,255,255,.92);
  --white-70:    rgba(255,255,255,.78);
  --white-30:    rgba(255,255,255,.30);
  --white-15:    rgba(255,255,255,.15);
  --white-08:    rgba(255,255,255,.08);

  --font:        "Montserrat", "Lato", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius:      18px;
  --radius-sm:   10px;
  --header-h:    78px;
  --container:   1180px;
  --gutter:      clamp(16px, 4vw, 32px);

  --ease:        cubic-bezier(.65, 0, .35, 1);
  --ease-out:    cubic-bezier(.22, 1, .36, 1);
}


/* 2. BASE ================================================================= */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--white);
  background: var(--blue);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.is-locked { overflow: hidden; }

img, svg, canvas, iframe { display: block; max-width: 100%; }

a { color: inherit; }

h1, h2, h3 {
  margin: 0;
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -.01em;
}

p { margin: 0; }

ul { margin: 0; padding: 0; list-style: none; }

:focus-visible {
  outline: 3px solid var(--white);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--white);
  color: var(--blue-800);
  font-weight: 700;
  border-radius: 8px;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }


/* 3. UTILITAIRES ========================================================== */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--white-90);
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}

.section-head {
  max-width: 720px;
  margin: 0 auto clamp(36px, 5vw, 56px);
  text-align: center;
}
.section-head--left { margin-inline: 0; text-align: left; }

.section-title {
  margin-top: 14px;
  font-size: clamp(1.9rem, 4.2vw, 2.9rem);
  text-transform: uppercase;
}

.section-lead {
  margin-top: 16px;
  font-size: 1.08rem;
  font-weight: 500;
  color: var(--white-90);
}

/* Boutons */
.btn {
  --btn-pad: 15px 28px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: var(--btn-pad);
  border: 2px solid var(--white);
  border-radius: 999px;
  font: 700 .95rem/1 var(--font);
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .25s var(--ease-out), background-color .25s, color .25s, box-shadow .25s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--light {
  background: var(--white);
  color: var(--blue-800);
  box-shadow: 0 10px 24px -12px rgba(1, 70, 120, .55);
}
.btn--light:hover { background: transparent; color: var(--white); }

.btn--ghost {
  background: transparent;
  color: var(--white);
}
.btn--ghost:hover { background: var(--white); color: var(--blue-800); }

.btn--sm { --btn-pad: 11px 20px; font-size: .8rem; }

/* Badges de distance */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border: 1.5px solid var(--white);
  border-radius: 999px;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  line-height: 1.2;
}


/* 4. TRANSITION DE PAGE (rideau topo) ===================================== */
.topo-curtain {
  position: fixed;
  inset: 0;
  z-index: 500;
  pointer-events: none;
  visibility: hidden;
}
.topo-curtain.is-active { pointer-events: all; visibility: visible; }

.topo-curtain__layer {
  position: absolute;
  inset: -2px;
  overflow: hidden;
  background-color: var(--blue);
  transform: translateY(102%);
  will-change: transform;
}
/* Les courbes sont sur un calque plus large qui glisse (transform = fluide) */
.topo-curtain__layer::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: calc(100% + 900px);
  background: url("../images/topo.svg") 0 0 / 900px auto;
  will-change: transform;
}
.topo-curtain__layer--1 { background-color: var(--blue-700); opacity: .9; }
.topo-curtain__layer--2::before {
  left: -1200px;
  width: calc(100% + 1200px);
  background-size: 1200px auto;
  background-position: 0 60px;
}

.topo-curtain__mark {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 96px;
  height: 96px;
  margin: -48px 0 0 -48px;
  border-radius: 50%;
  opacity: 0;
  transform: scale(.85);
  box-shadow: 0 0 0 8px var(--white-15);
}

/* Phase d'entrée : les couches montent, les courbes défilent */
.topo-curtain.is-in .topo-curtain__layer--1 { animation: curtain-in .55s var(--ease) forwards; }
.topo-curtain.is-in .topo-curtain__layer--2 { animation: curtain-in .55s .08s var(--ease) forwards; }
.topo-curtain.is-in .topo-curtain__mark     { animation: mark-in .35s .35s var(--ease-out) forwards; }

/* Phase de sortie : elles continuent vers le haut */
.topo-curtain.is-out .topo-curtain__layer--1 { transform: translateY(0); animation: curtain-out .6s .08s var(--ease) forwards; }
.topo-curtain.is-out .topo-curtain__layer--2 { transform: translateY(0); animation: curtain-out .6s var(--ease) forwards; }
.topo-curtain.is-active .topo-curtain__layer--1::before { animation: topo-scroll 1.2s linear infinite; }
.topo-curtain.is-active .topo-curtain__layer--2::before { animation: topo-scroll-rev 1.6s linear infinite; }
.topo-curtain.is-out .topo-curtain__mark     { opacity: 1; transform: scale(1); animation: mark-out .25s var(--ease) forwards; }

@keyframes curtain-in  { from { transform: translateY(102%); } to { transform: translateY(0); } }
@keyframes curtain-out { from { transform: translateY(0); }    to { transform: translateY(-102%); } }
@keyframes mark-in  { to { opacity: 1; transform: scale(1); } }
@keyframes mark-out { to { opacity: 0; transform: scale(1.15); } }
@keyframes topo-scroll     { to { transform: translateX(-900px); } }
@keyframes topo-scroll-rev { to { transform: translateX(1200px); } }


/* 5. EN-TÊTE ============================================================== */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  transition: background-color .35s, box-shadow .35s, height .35s;
}
.site-header.is-scrolled {
  background: var(--blue-600);
  box-shadow: 0 14px 30px -24px rgba(1, 60, 110, .8);
}

.site-header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}
.brand img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--white);
  transition: transform .5s var(--ease-out);
}
.brand:hover img { transform: rotate(-12deg) scale(1.05); }
.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__name { font-weight: 800; font-size: 1rem; text-transform: uppercase; letter-spacing: .04em; }
.brand__tag  { font-weight: 600; font-size: .68rem; letter-spacing: .24em; text-transform: uppercase; color: var(--white-90); }

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.main-nav ul { display: flex; gap: 4px; }
.main-nav ul a {
  position: relative;
  display: block;
  padding: 10px 14px;
  font-weight: 700;
  font-size: .86rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none;
}
/* soulignement en forme de courbe de niveau */
.main-nav ul a::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 2px;
  height: 6px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 6'%3E%3Cpath d='M0 3c5-3 10 3 15 0s10-3 15 0 7 2 10 0' fill='none' stroke='%23fff' stroke-width='1.6'/%3E%3C/svg%3E") repeat-x 0 0 / 40px 6px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s var(--ease-out);
}
.main-nav ul a:hover::after,
.main-nav ul a.is-active::after { transform: scaleX(1); }

/* Bordures "lignes de vie" (en-tête et pied de page) */
.topo-border {
  position: absolute;
  left: 0;
  width: 100%;
  height: 22px;
  overflow: hidden;
  pointer-events: none;
}
.topo-border svg {
  display: block;
  width: 200%;
  max-width: none;
  height: 100%;
  animation: border-drift 28s linear infinite;
  will-change: transform;
}
.topo-border--footer svg { animation-direction: reverse; animation-duration: 34s; }
.topo-border path {
  fill: none;
  stroke: var(--white);
  stroke-width: 1.3;
  vector-effect: non-scaling-stroke;
}
.topo-border path:nth-child(2) { opacity: .75; }
.topo-border path:nth-child(3) { opacity: .5; }
.topo-border path:nth-child(4) { opacity: .28; }

.topo-border--header { top: 100%; margin-top: -11px; opacity: .55; transition: opacity .35s; }
.site-header.is-scrolled .topo-border--header { opacity: 1; }

@keyframes border-drift { to { transform: translateX(-50%); } }

/* Burger */
.burger {
  display: none;
  position: relative;
  z-index: 120;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 2px solid var(--white);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}
.burger span {
  position: absolute;
  left: 12px;
  right: 12px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform .35s var(--ease), opacity .2s;
}
.burger span:nth-child(1) { top: 15px; }
.burger span:nth-child(2) { top: 21px; }
.burger span:nth-child(3) { top: 27px; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }


/* 6. HÉROS ================================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: calc(var(--header-h) + 40px) 0 110px;
  overflow: hidden;
  isolation: isolate;
  contain: paint;
  background:
    radial-gradient(120% 90% at 80% 10%, var(--blue) 0%, var(--blue-600) 60%, var(--blue-700) 100%);
}

.hero__media { position: absolute; inset: 0; z-index: -1; }

/* Photo optionnelle : désaturée + fondue dans le bleu */
.hero__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.1) brightness(1.05);
  mix-blend-mode: multiply;
  opacity: .55;
}

/* Courbes de niveau animées (canvas, voir scripts.js) */
.hero__topo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero__content { position: relative; }

.hero__title { margin-top: 18px; text-transform: uppercase; }
.hero__title-line {
  display: block;
  font-size: clamp(1.3rem, 3vw, 2rem);
  font-weight: 600;
  letter-spacing: .14em;
}
.hero__title-line--big {
  margin-top: 6px;
  font-size: clamp(2.6rem, 8.4vw, 6.4rem);
  font-weight: 800;
  letter-spacing: -.015em;
  line-height: .98;
  text-shadow: 0 6px 40px rgba(1, 80, 140, .35);
}

.hero__lead {
  max-width: 560px;
  margin-top: 24px;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  font-weight: 500;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 36px;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 32px;
  margin-top: 48px;
  padding-top: 22px;
  border-top: 1px solid var(--white-30);
  max-width: 620px;
  font-size: .95rem;
}
.hero__meta strong {
  display: block;
  font-size: .72rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--white-90);
}

.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 30px;
  width: 30px;
  height: 48px;
  margin-left: -15px;
  border: 2px solid var(--white);
  border-radius: 20px;
}
.hero__scroll span {
  position: absolute;
  top: 9px;
  left: 50%;
  width: 4px;
  height: 9px;
  margin-left: -2px;
  border-radius: 2px;
  background: var(--white);
  animation: scroll-hint 1.8s var(--ease) infinite;
}
@keyframes scroll-hint {
  0%   { opacity: 0; transform: translateY(-4px); }
  30%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(14px); }
}


/* 7. SECTIONS GÉNÉRIQUES ================================================== */
.section {
  position: relative;
  padding: clamp(80px, 11vw, 130px) 0;
  isolation: isolate;
}

/* Texture topographique de fond, qui dérive lentement */
.section::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url("../images/topo.svg") center / 1100px auto;
  opacity: .1;
  pointer-events: none;
}

/* Séparateur "courbe de niveau" entre sections */
.section + .section::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 14px;
  transform: translateY(-50%);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 14'%3E%3Cg fill='none' stroke='%23fff'%3E%3Cpath d='M0 4c60-5 140 5 200 0s140-5 200 0' stroke-width='1.2'/%3E%3Cpath d='M0 10c70-6 130 6 200 0s130-6 200 0' stroke-width='1' opacity='.5'/%3E%3C/g%3E%3C/svg%3E") repeat-x 0 0 / 400px 14px;
  opacity: .7;
}

.section--events   { background: linear-gradient(180deg, var(--blue-700), var(--blue-600)); }
.section--club     { background: var(--blue-700); }
.section--training { background: linear-gradient(180deg, var(--blue-700), var(--blue-800)); }
.section--contact  { background: var(--blue); }


/* 8. ÉVÉNEMENTS ===========================================================
   Chaque <article class="event"> est autonome : on peut en ajouter
   ou en retirer autant qu'on veut, la grille s'adapte toute seule.
   ======================================================================== */
.events {
  display: grid;
  gap: 16px;
  counter-reset: evt;
}

.event {
  position: relative;
  display: grid;
  grid-template-columns: 96px 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 20px 24px 20px 20px;
  border: 1.5px solid var(--white-30);
  border-radius: var(--radius);
  background: var(--white-08);
  overflow: hidden;
  transition: border-color .3s, background-color .3s, transform .35s var(--ease-out);
}
/* petites courbes qui apparaissent au survol */
.event::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url("../images/topo.svg") center / 700px auto;
  opacity: 0;
  transition: opacity .4s;
}
.event:hover {
  border-color: var(--white);
  background: var(--white-15);
  transform: translateX(4px);
}
.event:hover::before { opacity: .22; }

.event__date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  border: 2px solid var(--white);
  border-radius: 50%;
  line-height: 1;
}
.event__day   { font-size: 2rem; font-weight: 800; }
.event__month { margin-top: 4px; font-size: .74rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }

.event__name  { font-size: clamp(1.15rem, 2vw, 1.4rem); font-weight: 800; }
.event__place { margin-top: 4px; font-size: .95rem; font-weight: 500; color: var(--white-90); }
.event__badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

.events__empty {
  padding: 28px;
  border: 1.5px dashed var(--white-30);
  border-radius: var(--radius);
  text-align: center;
  font-weight: 500;
}
.events__empty a { font-weight: 700; }


/* 9. LE CLUB / VALEURS ==================================================== */
.values {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.value {
  padding: 32px 26px;
  border: 1.5px solid var(--white-30);
  border-radius: var(--radius);
  background: var(--white-08);
  transition: border-color .3s, transform .35s var(--ease-out);
}
.value:hover { border-color: var(--white); transform: translateY(-4px); }

.value__icon {
  width: 52px;
  height: 52px;
  margin-bottom: 22px;
  fill: none;
  stroke: var(--white);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.value__title {
  margin-bottom: 10px;
  font-size: 1.15rem;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.value p { font-size: .97rem; font-weight: 500; color: var(--white-90); }


/* 10. ENTRAÎNEMENTS + CARTE =============================================== */
.training {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: stretch;
}

.slots {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.slot {
  padding: 24px;
  border: 1.5px solid var(--white-30);
  border-radius: var(--radius);
  background: var(--white-08);
}
.slot__day  { font-size: .78rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--white-90); }
.slot__time { margin: 4px 0 8px; font-size: 2.6rem; font-weight: 800; line-height: 1; }
.slot__text { font-size: .95rem; font-weight: 500; }

.training__place {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 24px;
  font-weight: 500;
}
.training__place svg {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  margin-top: 2px;
  fill: none;
  stroke: var(--white);
  stroke-width: 2;
}

/* Carte : Google Maps passée en niveaux de gris inversés + teinte bleue */
.map {
  position: relative;
  min-height: 420px;
  border: 2px solid var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--blue-800);
  isolation: isolate;
}
.map__frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  filter: grayscale(1) invert(.9) contrast(.95) brightness(1.05);
}
.map__tint {
  position: absolute;
  inset: 0;
  background: var(--blue-700);
  mix-blend-mode: multiply;
  pointer-events: none;
}
.map__link {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--white);
  color: var(--blue-800);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none;
}


/* 11. CONTACT ============================================================= */
.contact {
  max-width: 780px;
  text-align: center;
}
.contact .hero__actions { justify-content: center; }
.contact .btn--light { text-transform: none; letter-spacing: .02em; }


/* 12. PIED DE PAGE ======================================================== */
.site-footer {
  position: relative;
  padding-top: 72px;
  background: var(--blue-800);
  isolation: isolate;
}
.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url("../images/topo.svg") center bottom / 1000px auto;
  opacity: .14;
}

.topo-border--footer { top: 0; height: 34px; }

.site-footer__inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
}

.footer-brand img { width: 112px; height: 112px; border-radius: 50%; margin-bottom: 18px; }
.footer-brand p { max-width: 300px; font-size: .95rem; font-weight: 500; color: var(--white-90); }

.footer-title {
  margin-bottom: 16px;
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .22em;
  text-transform: uppercase;
}
.footer-col li + li { margin-top: 8px; }
.footer-col a {
  font-weight: 500;
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat;
  transition: background-size .3s var(--ease-out);
}
.footer-col a:hover { background-size: 100% 1.5px; }
.footer-col address { font-style: normal; font-weight: 500; line-height: 1.8; }

.socials { display: flex; gap: 12px; }
.socials a {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 2px solid var(--white);
  border-radius: 50%;
  background: none;
  transition: background-color .25s, transform .25s var(--ease-out);
}
.socials a:hover { background: var(--white); transform: translateY(-3px); }
.socials svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--white);
  stroke-width: 2;
  stroke-linejoin: round;
  transition: stroke .25s;
}
.socials svg .fill { fill: var(--white); stroke: none; }
.socials a:hover svg { stroke: var(--blue-800); }
.socials a:hover svg .fill { fill: var(--blue-800); }

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding-block: 22px;
  border-top: 1px solid var(--white-30);
  font-size: .85rem;
  font-weight: 500;
}
.legal { display: flex; gap: 20px; }
.legal a { text-decoration: none; }
.legal a:hover { text-decoration: underline; }


/* 13. ANIMATIONS D'APPARITION ============================================= */
.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .8s var(--ease-out), transform .8s var(--ease-out);
  transition-delay: var(--delay, 0s);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

.hero__content > * { animation: hero-in 1s var(--ease-out) both; }
.hero__content > *:nth-child(2) { animation-delay: .1s; }
.hero__content > *:nth-child(3) { animation-delay: .2s; }
.hero__content > *:nth-child(4) { animation-delay: .3s; }
.hero__content > *:nth-child(5) { animation-delay: .4s; }
@keyframes hero-in { from { opacity: 0; transform: translateY(30px); } }


/* 14. RESPONSIVE ========================================================== */
@media (max-width: 1080px) {
  .values { grid-template-columns: repeat(2, 1fr); }
  .site-footer__inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 960px) {
  :root { --header-h: 70px; }

  .burger { display: block; }

  /* Menu mobile plein écran avec courbes topo */
  .main-nav {
    position: fixed;
    inset: 0;
    z-index: 110;
    flex-direction: column;
    justify-content: center;
    gap: 36px;
    padding: 100px var(--gutter) 40px;
    background:
      linear-gradient(rgba(2, 150, 230, .86), rgba(2, 142, 220, .9)),
      var(--blue-600) url("../images/topo.svg") center / 900px auto;
    clip-path: circle(0 at calc(100% - 44px) 35px);
    visibility: hidden;
    transition: clip-path .6s var(--ease), visibility 0s .6s;
  }
  .main-nav.is-open {
    clip-path: circle(150% at calc(100% - 44px) 35px);
    visibility: visible;
    transition: clip-path .7s var(--ease), visibility 0s;
  }
  .main-nav ul { flex-direction: column; align-items: center; gap: 6px; }
  .main-nav ul a { font-size: 1.5rem; padding: 10px 16px; }
  .main-nav ul a::after { bottom: 0; }

  .training { grid-template-columns: 1fr; }
  .map { min-height: 340px; }
}

@media (max-width: 720px) {
  .brand__tag { display: none; }
  .brand__name { font-size: .88rem; }

  .event {
    grid-template-columns: 72px 1fr;
    gap: 16px 18px;
    padding: 18px;
  }
  .event__day { font-size: 1.6rem; }
  .event__month { font-size: .66rem; }
  .event__cta { grid-column: 1 / -1; width: 100%; }

  .slots { grid-template-columns: 1fr; }
  .hero__meta { gap: 14px 24px; }
}

@media (max-width: 540px) {
  .values { grid-template-columns: 1fr; }
  .site-footer__inner { grid-template-columns: 1fr; gap: 32px; }
  .hero__actions .btn { flex: 1 1 100%; }
  .contact .btn--light { white-space: normal; }
}


/* 16. FENÊTRE "LE SITE SE REFAIT UNE BEAUTÉ" ============================== */
.notice {
  --progress: 92%;
  width: min(600px, calc(100% - 32px));
  max-height: calc(100% - 32px);
  margin: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--white);
  overflow: visible;
}
.notice::backdrop {
  background: rgba(1, 95, 160, .55);
}
.notice[open] { animation: notice-in .6s var(--ease-out) both; }
.notice[open]::backdrop { animation: fade-in .4s ease both; }
.notice.is-closing { animation: notice-out .35s var(--ease) both; }
.notice.is-closing::backdrop { animation: fade-in .35s ease reverse both; }

@keyframes notice-in  { from { opacity: 0; transform: translateY(30px) scale(.96); } }
@keyframes notice-out { to   { opacity: 0; transform: translateY(20px) scale(.97); } }
@keyframes fade-in    { from { opacity: 0; } }

.notice__card {
  position: relative;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  padding: 40px clamp(22px, 5vw, 44px) 32px;
  border: 2px solid var(--white);
  border-radius: 24px;
  text-align: center;
  background: var(--blue);
  box-shadow: 0 0 0 8px var(--white-15), 0 30px 60px -20px rgba(1, 60, 110, .6);
  isolation: isolate;
}
.notice__card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: url("../images/topo.svg") center / 700px auto;
  opacity: .16;
}

.notice__close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 2px solid var(--white);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: background-color .25s, transform .3s var(--ease-out);
}
.notice__close:hover { background: var(--white); transform: rotate(90deg); }
.notice__close svg { width: 18px; height: 18px; fill: none; stroke: var(--white); stroke-width: 2.4; stroke-linecap: round; }
.notice__close:hover svg { stroke: var(--blue-800); }

.notice__mark {
  width: 84px;
  height: 84px;
  margin: 0 auto 18px;
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--white), 0 0 0 12px var(--white-15);
}

.notice__eyebrow::after {
  content: "";
  width: 28px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}
.notice__title {
  margin-top: 12px;
  font-size: clamp(1.8rem, 6vw, 2.5rem);
  text-transform: uppercase;
}
.notice__text {
  margin-top: 14px;
  font-weight: 500;
  font-size: 1.02rem;
}

/* Profil de course + coureur */
.notice__course { margin: 30px 0 22px; }
.notice__profile {
  display: block;
  width: 100%;
  height: 46px;
  overflow: visible;
}
.notice__profile-line {
  fill: none;
  stroke: var(--white);
  stroke-width: 2;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 2 6;
  opacity: .8;
}
.notice__track {
  position: relative;
  height: 6px;
  margin-top: 8px;
  border-radius: 6px;
  background: var(--white-30);
}
.notice__track::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--progress);
  border-radius: inherit;
  background: var(--white);
  transform-origin: left;
  animation: track-fill 1.6s .3s var(--ease-out) both;
}
@keyframes track-fill { from { transform: scaleX(0); } }

.notice__runner {
  position: absolute;
  top: 50%;
  left: var(--progress);
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 3px solid var(--blue);
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 0 0 3px var(--white);
  animation: runner-in 1.6s .3s var(--ease-out) both, runner-pulse 1.8s 2s ease-out infinite;
}
@keyframes runner-in { from { left: 0; } }
@keyframes runner-pulse {
  0%   { box-shadow: 0 0 0 3px var(--white), 0 0 0 3px rgba(255,255,255,.6); }
  100% { box-shadow: 0 0 0 3px var(--white), 0 0 0 16px rgba(255,255,255,0); }
}

.notice__labels {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}
/* Bulle "km" qui suit le coureur (sans déborder de la carte) */
.notice__km {
  position: absolute;
  bottom: 20px;
  left: clamp(38px, var(--progress), calc(100% - 38px));
  transform: translateX(-50%);
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--white);
  color: var(--blue-800);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .06em;
  white-space: nowrap;
  text-transform: uppercase;
  animation: km-in 1.6s .3s var(--ease-out) both;
}
@keyframes km-in { from { left: 38px; opacity: 0; } 30% { opacity: 1; } }

.notice__info {
  padding-top: 18px;
  border-top: 1px solid var(--white-30);
  font-size: .92rem;
  font-weight: 500;
}

.notice__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}

.notice[data-closable="false"] [data-notice-close] { display: none; }
.notice:not([data-closable="false"]) .notice__blocking-only { display: none; }

/* --- Mode BLOQUANT : écran plein, site entièrement masqué (fonctionne sans JS) --- */
.notice[data-closable="false"][open] {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 16px;
  overflow-y: auto;
  background:
    radial-gradient(120% 90% at 80% 10%, var(--blue) 0%, var(--blue-600) 60%, var(--blue-700) 100%);
}
.notice[data-closable="false"][open]::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: url("../images/topo.svg") center / 1100px auto;
  opacity: .14;
  pointer-events: none;
}
.notice[data-closable="false"] .notice__card { width: min(600px, 100%); }

/* Tout le reste de la page disparaît : ni visible, ni cliquable, ni lu par les lecteurs d'écran */
body:has(> .notice[data-closable="false"][data-notice="on"][open]) > :not(.notice) {
  display: none !important;
}

@media (max-width: 540px) {
  .notice__actions .btn { flex: 1 1 100%; }
  .notice__mark { width: 72px; height: 72px; }
}


/* 15. MOUVEMENT RÉDUIT ==================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}
