/* ============================================================
   Twing'Raid Lycée Astier — feuille de style
   Direction artistique : « road-book de rallye »
   ============================================================ */


/* ------------------------------------------------------------
   1. VARIABLES
   ------------------------------------------------------------ */
:root {
  /* Couleurs */
  --iceberg: #2A9DC7;   /* bleu de la Twingo, fond du hero */
  --ink: #0E2230;       /* bleu nuit, texte */
  --ground: #F2EEE6;    /* poussière de piste, fond de page */
  --panel: #E6DFD2;
  --signal: #E2672B;    /* orange balise, réservé aux appels à l'action */
  --on-blue: #F7FBFD;
  --muted: #4A5D69;
  --white: #FFFFFF;
  --on-ink-soft: #A9BBC7; /* étiquettes secondaires sur fond --ink */

  /* Polices */
  --f-display: "Archivo", "Arial Narrow", Arial, sans-serif; /* titres, grands chiffres, citations */
  --f-stencil: "Big Shoulders Stencil Display", Impact, sans-serif; /* uniquement logo + tampon du hero */
  --font-body: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  /* Mise en page */
  --container: 76rem;
  --gutter: clamp(1rem, 4vw, 2.5rem); /* jamais moins de 16 px */
  --section-space: clamp(4.5rem, 9vw, 8rem); /* padding vertical commun à toutes les sections */
  --scroll-offset: 0px; /* hauteur du header s'il devient sticky, mise à jour par script.js */
  --hero-photo-position: center 35%; /* 0% = haut de la photo, 100% = bas */
}


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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--scroll-offset) + 1rem);
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

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

h1,
h2,
h3,
p,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

/* Style commun des titres (Archivo étroit) */
h1,
h2,
h3 {
  font-family: var(--f-display);
  font-weight: 800;
  font-stretch: 75%;
  line-height: 1.02;
  text-transform: uppercase;
  letter-spacing: 0;
}

a {
  color: inherit;
}

::selection {
  background: var(--ink);
  color: var(--on-blue);
}

/* Focus visible : contour orange, doublé d'un liseré bleu nuit
   pour rester lisible sur le fond bleu du hero. */
:focus-visible {
  outline: 3px solid var(--signal);
  outline-offset: 3px;
  box-shadow: 0 0 0 3px var(--ink);
}

.container {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 100;
  padding: 0.6rem 0.9rem;
  background: var(--ink);
  color: var(--on-blue);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}


/* ------------------------------------------------------------
   3. COMPOSANTS PARTAGÉS
   ------------------------------------------------------------ */

/* Étiquette monospace (façon case de road-book) */
.tag {
  display: inline-block;
  padding: 0.45rem 0.7rem 0.4rem;
  background: var(--ink);
  color: var(--on-blue);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.tag--light {
  background: var(--ground);
  color: var(--ink);
}

/* Surbrillance façon autocollant */
.highlight {
  background: var(--white);
  color: var(--ink);
  padding: 0 0.12em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* Boutons : texte assez grand (20 px) et gras (800)
   pour respecter les contrastes « grand texte » sur le bleu. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 3.25rem;
  padding: 0.7rem 1.35rem 0.6rem;
  border: 3px solid transparent;
  font-family: var(--f-display);
  font-size: 1.25rem;
  font-weight: 800;
  font-stretch: 75%;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  text-decoration: none;
  text-align: center;
}

.btn__icon {
  width: 1.1em;
  height: 1.1em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: square;
}

.btn--signal {
  background: var(--signal);
  border-color: var(--signal);
  color: var(--ink);
  box-shadow: 5px 5px 0 var(--ink);
}

.btn--signal:hover {
  transform: translate(-2px, -2px);
  box-shadow: 7px 7px 0 var(--ink);
}

.btn--signal:focus-visible {
  box-shadow: 0 0 0 3px var(--ink), 5px 5px 0 var(--ink);
}

.btn--ghost {
  background: transparent;
  border-color: var(--white);
  color: var(--white);
}

.btn--ghost:hover {
  background: var(--white);
  color: var(--ink);
}

/* Variante contour bleu nuit, pour les fonds clairs */
.btn--outline {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}

.btn--outline:hover {
  background: var(--ink);
  color: var(--on-blue);
}

/* Bouton HelloAsso tant que la cagnotte n'est pas en ligne */
.btn[aria-disabled="true"] {
  cursor: not-allowed;
}

.btn--signal[aria-disabled="true"]:hover {
  transform: none;
  box-shadow: 5px 5px 0 var(--ink);
}

/* Barre de titre monospace des fiches (checklist, pilote, contact…) */
.panel-bar {
  display: block;
  margin: 0;
  padding: 0.6rem 0.9rem 0.55rem;
  background: var(--ink);
  color: var(--on-blue);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.3;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

/* Texte à compléter : volontairement très visible.
   Retirer la classe une fois le contenu définitif saisi. */
.todo {
  padding: 0 0.25em;
  background: #FFE27A;
  color: var(--ink);
  outline: 1px dashed var(--ink);
  outline-offset: -1px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}


/* ------------------------------------------------------------
   4. HEADER
   ------------------------------------------------------------ */
.site-header {
  position: relative;
  z-index: 2;
  background: var(--iceberg);
  color: var(--white);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 1rem;
}

.logo {
  display: inline-flex;
  flex-direction: column;
  padding: 0.45rem 0.65rem 0.4rem;
  background: var(--white);
  color: var(--ink);
  font-family: var(--f-stencil);
  font-weight: 900;
  line-height: 0.85;
  text-transform: uppercase;
  text-decoration: none;
}

.logo__main {
  font-size: 1.625rem;
  letter-spacing: 0.01em;
}

.logo__sub {
  margin-top: 0.2rem;
  padding-top: 0.2rem;
  border-top: 2px solid var(--ink);
  font-size: 0.9375rem;
  letter-spacing: 0.14em;
}

/* Navigation : masquée sur mobile */
.site-nav {
  display: none;
}

.site-nav__list {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: inline-block;
  padding-block: 0.35rem;
  font-family: var(--f-display);
  font-size: 1.1875rem;
  font-weight: 800;
  font-stretch: 75%;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
  text-decoration: none;
  text-underline-offset: 0.25em;
  text-decoration-thickness: 3px;
}

.site-nav a:hover {
  text-decoration-line: underline;
}

.site-nav .site-nav__cta {
  padding: 0.5rem 0.8rem 0.4rem;
  background: var(--ink);
  color: var(--on-blue);
}

.site-nav .site-nav__cta:hover {
  text-decoration-line: none;
  background: var(--white);
  color: var(--ink);
}

@media (min-width: 48em) {
  .site-nav {
    display: block;
  }
}

@media (min-width: 64em) {
  .site-nav__list {
    gap: 1.75rem;
  }
}


/* ------------------------------------------------------------
   5. HERO
   ------------------------------------------------------------ */
/* Note contraste : --on-blue sur --iceberg ≈ 3:1, suffisant
   uniquement pour le grand texte gras (titre, boutons, nav).
   Le texte courant du hero est donc en --ink (≈ 5,2:1). */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--iceberg);
  color: var(--white);
  padding-block: clamp(2rem, 5vw, 4.5rem) clamp(4rem, 8vw, 6.5rem);
}

/* Ligne de piste en pointillés */
.hero__track {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  max-width: none;
  fill: none;
  stroke: var(--white);
  stroke-width: 4;
  stroke-dasharray: 22 16;
  stroke-linecap: butt;
  opacity: 0.4;
}

.hero__grid {
  display: grid;
  gap: clamp(3rem, 6vw, 4.5rem);
  align-items: center;
}

.hero__content {
  min-width: 0;
}

.hero__title {
  max-width: 14em;
  margin-block: 1.25rem 1.5rem;
  font-size: clamp(2.375rem, 5.2vw, 4.25rem); /* 38 px → 68 px */
  overflow-wrap: break-word;
  text-wrap: balance;
}

.hero__lead {
  max-width: 36em;
  padding-left: 1rem;
  border-left: 4px solid var(--ink);
  color: var(--ink);
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  font-weight: 500;
  line-height: 1.5;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.25rem;
  margin-top: 2rem;
}

/* Photo dans un cadre blanc incliné */
.hero__media {
  position: relative;
  min-width: 0;
  padding-bottom: 1.5rem;
}

.photo-frame {
  width: 100%;
  max-width: min(100%, calc(70vh * 4 / 5));
  padding: clamp(0.6rem, 1.2vw, 0.9rem);
  background: var(--white);
  box-shadow: 8px 8px 0 var(--ink);
  transform: rotate(1.5deg);
}

/* Emplacement photo hachuré, partagé par toutes les images du site
   (.photo-frame__inner dans le hero, .media-slot ailleurs) */
.photo-frame__inner,
.media-slot {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background:
    repeating-linear-gradient(
      -45deg,
      var(--panel) 0 12px,
      var(--ground) 12px 24px
    );
}

/* Cadre portrait 4:5 pour la photo d'équipage (origine 9:16) */
.photo-frame__inner {
  aspect-ratio: 4 / 5;
  max-height: 70vh;
}

.photo-frame__inner img,
.media-slot img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-frame__inner img {
  object-position: var(--hero-photo-position);
}

.photo-frame__placeholder,
.media-slot__placeholder {
  max-width: 80%;
  padding: 0.6rem 0.8rem;
  background: var(--ground);
  border: 2px dashed var(--muted);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Ajoutée par script.js si l'image est introuvable */
[data-photo].is-missing img {
  display: none;
}

/* Tampon qui déborde en bas à gauche */
.stamp {
  position: absolute;
  left: -0.5rem;
  bottom: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0.45em;
  padding: 0.65rem 0.95rem 0.55rem;
  background: var(--ink);
  color: var(--on-blue);
  font-family: var(--f-stencil);
  font-size: clamp(1.125rem, 1rem + 0.6vw, 1.5rem);
  font-weight: 900;
  line-height: 0.9;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  outline: 1.5px dashed rgba(247, 251, 253, 0.6);
  outline-offset: -6px;
  transform: rotate(-2.5deg);
}

.stamp span:last-child {
  font-size: 0.72em;
  letter-spacing: 0.12em;
}

@media (min-width: 60em) {
  .hero__grid {
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  }

  .photo-frame {
    max-width: 100%;
  }

  .photo-frame__inner {
    max-height: none;
  }

  .stamp {
    left: -1.5rem;
  }
}


/* ------------------------------------------------------------
   6. BANDEAU COMPTEUR
   ------------------------------------------------------------ */
.stats {
  background: var(--ink);
  color: var(--on-blue);
}

.stats__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stat {
  min-width: 0;
  padding: 1.25rem 0.75rem 1.4rem;
}

.stat:nth-child(odd) {
  padding-left: 0;
}

/* Séparateurs en pointillés, version 2 colonnes */
.stat:nth-child(odd):not(:last-child) {
  border-right: 1px dashed rgba(247, 251, 253, 0.28);
}

.stat:nth-child(n + 3) {
  border-top: 1px dashed rgba(247, 251, 253, 0.28);
}

.stat--countdown {
  grid-column: 1 / -1;
}

.stat__label {
  color: var(--on-ink-soft);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.stat__value {
  margin-top: 0.45rem;
  font-family: var(--f-display);
  font-size: clamp(1.5rem, 1rem + 2.4vw, 2.25rem);
  font-weight: 800;
  font-stretch: 75%;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.stat__unit {
  margin-left: 0.35em;
  color: var(--on-ink-soft);
  font-family: var(--font-mono);
  font-size: 0.5em;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stat--countdown .stat__value {
  color: var(--iceberg);
}

/* Compte à rebours en direct : "127 j 06 h 14 min 32 s" */
.countdown {
  display: flex;
  align-items: baseline;
  gap: 0.4em;
  font-family: var(--font-mono);
  font-weight: 600;
  font-stretch: normal;
  font-variant-numeric: tabular-nums;
}

.countdown__part {
  display: inline-flex;
  align-items: baseline;
}

.countdown__part[hidden] {
  display: none;
}

.countdown__unit {
  margin-left: 0.15em;
  color: var(--on-blue);
  font-size: 0.5em;
  font-weight: 400;
  opacity: 0.7;
}

/* "En route" / "Raid terminé" après le départ */
.countdown--status {
  display: block;
  font-family: var(--f-display);
  font-weight: 800;
  font-stretch: 75%;
  text-transform: uppercase;
}

/* Sous 520 px : jours et heures seulement */
@media (max-width: 32.4375em) {
  .countdown__part--minutes,
  .countdown__part--seconds {
    display: none;
  }
}

@media (min-width: 64em) {
  /* La case compte à rebours est plus large pour tenir "j h min s" */
  .stats__list {
    grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(0, 1.4fr);
  }

  .stat--countdown .countdown {
    font-size: clamp(1.25rem, 1.8vw + 0.25rem, 2rem);
  }

  .stat:nth-child(n) {
    padding: 1.6rem 1rem 1.75rem;
    border-top: 0;
    border-right: 0;
  }

  .stat + .stat {
    border-left: 1px dashed rgba(247, 251, 253, 0.28);
  }

  .stat:first-child {
    padding-left: 0;
  }

  .stat--countdown {
    grid-column: auto;
  }

  .stat__value {
    font-size: clamp(1.75rem, 3.2vw - 0.25rem, 2.5rem);
  }
}


/* ------------------------------------------------------------
   7. SECTIONS : base commune
   ------------------------------------------------------------ */
.section {
  padding-block: var(--section-space);
}

.section--ground {
  background: var(--ground);
  color: var(--ink);
}

/* Sur le bleu, seul le grand texte gras est en blanc ;
   le texte courant passe en --ink pour le contraste. */
.section--blue {
  background: var(--iceberg);
  color: var(--white);
}

.section--ink {
  background: var(--ink);
  color: var(--ground);
}

.section__head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.25rem;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.section__title {
  max-width: 24ch;
  font-size: clamp(1.875rem, 3.8vw, 3rem); /* 30 px → 48 px */
  line-height: 1.05;
  overflow-wrap: break-word;
  text-wrap: balance;
}

.section__intro {
  max-width: 40em;
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
  line-height: 1.6;
}

.section--blue .section__intro {
  padding-left: 1rem;
  border-left: 4px solid var(--ink);
  color: var(--ink);
  font-weight: 500;
}


/* ------------------------------------------------------------
   8. SECTION LE PROJET DU LYCÉE (#lycee)
   ------------------------------------------------------------ */
.lycee__grid {
  display: grid;
  gap: 2.5rem;
}

.lycee__main {
  display: grid;
  gap: 2.5rem;
  min-width: 0;
}

.lycee__copy {
  display: grid;
  gap: 1rem;
}

.lycee__side {
  display: grid;
  gap: 2.5rem;
  align-content: start;
  min-width: 0;
}

/* Checklist façon fiche de contrôle */
.checklist-panel {
  background: var(--white);
  border: 2px solid var(--ink);
}

.checklist {
  margin: 0;
  padding: 0;
  list-style: none;
}

.checklist li {
  position: relative;
  display: grid;
  grid-template-columns: 1.5rem minmax(0, 1fr);
  gap: 0.9rem;
  align-items: start;
  padding: 0.85rem 1rem;
  font-weight: 500;
}

.checklist li + li {
  border-top: 1px dashed rgba(14, 34, 48, 0.3);
}

/* Case à cocher */
.checklist li::before {
  content: "";
  width: 1.375rem;
  height: 1.375rem;
  margin-top: 0.15rem;
  border: 2px solid var(--ink);
}

/* Coche qui déborde légèrement de la case, comme au crayon */
.checklist li::after {
  content: "";
  position: absolute;
  top: 0.75rem;
  left: 1.45rem;
  width: 0.55rem;
  height: 1.05rem;
  border: solid var(--ink);
  border-width: 0 3px 3px 0;
  transform: rotate(40deg);
}

/* Infos clés */
.facts {
  background: var(--ink);
  color: var(--on-blue);
}

.facts__item {
  padding: 1.1rem 1.25rem 1.2rem;
}

.facts__item + .facts__item {
  border-top: 1px dashed rgba(247, 251, 253, 0.28);
}

.facts__label {
  color: var(--on-ink-soft);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.facts__value {
  margin-top: 0.4rem;
  font-family: var(--f-display);
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
  font-weight: 800;
  font-stretch: 75%;
  line-height: 1.05;
  text-transform: uppercase;
}

/* Citation */
.quote::before {
  content: "“";
  display: block;
  height: 0.5em;
  color: var(--iceberg);
  font-family: var(--f-display);
  font-size: 8rem;
  font-weight: 800;
  font-stretch: 75%;
  line-height: 0.85;
}

.quote__text {
  font-family: var(--f-display);
  font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem);
  font-weight: 700;
  font-stretch: 87.5%;
  line-height: 1.35;
}

.quote__author {
  margin-top: 1rem;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.quote__author::before {
  content: "— ";
}

/* Galerie */
.gallery {
  display: grid;
  gap: 1.75rem;
  margin: clamp(3rem, 6vw, 4.5rem) 0 0;
  padding: 0;
  list-style: none;
}

.gallery__item {
  padding: 0.6rem 0.6rem 0;
  background: var(--white);
  border: 2px solid var(--ink);
}

.gallery__caption {
  padding: 0.75rem 0.2rem 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

@media (min-width: 48em) {
  .gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .gallery li:nth-child(1) .gallery__item { transform: rotate(-1deg); }
  .gallery li:nth-child(2) .gallery__item { transform: rotate(0.75deg) translateY(0.75rem); }
  .gallery li:nth-child(3) .gallery__item { transform: rotate(-0.5deg); }
}

@media (min-width: 60em) {
  .lycee__grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    gap: 4.5rem;
    align-items: start;
  }
}


/* ------------------------------------------------------------
   9. SECTION L'ÉQUIPAGE (#equipage)
   ------------------------------------------------------------ */
.crew {
  display: grid;
  gap: 1.75rem;
}

/* Fiche pilote / copilote */
.fiche {
  min-width: 0;
  background: var(--ground);
  color: var(--ink);
  border: 2px solid var(--ink);
  container-type: inline-size;
}

.fiche__body {
  display: grid;
  gap: 1.25rem;
  padding: 1.25rem;
}

.fiche__content {
  min-width: 0;
}

.fiche__name {
  font-size: clamp(1.625rem, 1.3rem + 1vw, 2.125rem);
}

.fiche__role {
  display: inline-block;
  margin: 0.75rem 0 1rem;
  padding: 0.3rem 0.55rem 0.25rem;
  border: 1.5px solid var(--ink);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.media-slot--portrait {
  aspect-ratio: 4 / 3;
}

@container (min-width: 32rem) {
  .fiche__body {
    grid-template-columns: minmax(0, 11rem) minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
  }

  .media-slot--portrait {
    aspect-ratio: 4 / 5;
  }
}

.fiche--eleve .fiche__body {
  grid-template-columns: minmax(0, 1fr);
  padding: 1rem;
}

.fiche--eleve .fiche__name {
  font-size: clamp(1.375rem, 1.1rem + 1vw, 1.75rem);
  overflow-wrap: break-word;
}

.fiche--eleve .fiche__role {
  margin: 0.55rem 0 0;
}

.media-slot--initial {
  aspect-ratio: 1;
}

.media-slot__initial {
  font-family: var(--f-display);
  font-size: clamp(3rem, 8vw, 4.5rem);
  font-weight: 800;
  font-stretch: 75%;
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
  background: transparent;
  border: 0;
  padding: 0;
  max-width: none;
}

.atelier {
  margin-top: 1.75rem;
  background: var(--ground);
  color: var(--ink);
  border: 2px solid var(--ink);
}

.atelier__inner {
  padding: 1.25rem;
}

.atelier__title {
  margin-bottom: 1.25rem;
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
}

.atelier__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

@media (min-width: 60em) {
  .crew {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
  }

  .atelier {
    margin-top: 2rem;
  }

  .atelier__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}


/* ------------------------------------------------------------
   10. SECTION LE RAID (#raid)
   ------------------------------------------------------------ */
.raid__grid {
  display: grid;
  gap: 3rem;
}

.raid__intro {
  min-width: 0;
}

/* Légende des tracés */
.legend {
  display: grid;
  gap: 0.75rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}

.legend__item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.legend__item::before {
  content: "";
  width: 2.5rem;
  border-top: 4px dashed var(--line-color);
}

.legend__item--spain,
.roadbook__list--spain {
  --line-color: var(--ink);
}

.legend__item--morocco,
.roadbook__list--morocco {
  --line-color: var(--iceberg);
}

/* Road-book vertical */
.roadbook {
  min-width: 0;
}

.roadbook__country {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.roadbook__country span {
  padding: 0.45rem 0.7rem 0.4rem;
}

.roadbook__country::after {
  content: "";
  flex: 1;
  border-top: 2px solid currentColor;
}

.roadbook__country--spain span {
  background: var(--ink);
  color: var(--on-blue);
}

/* Passage de frontière : le tracé change de couleur */
.roadbook__country--morocco span {
  background: var(--iceberg);
  color: var(--ink);
}

.roadbook__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.leg {
  position: relative;
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr);
  column-gap: 1.1rem;
  padding-bottom: 1.75rem;
}

/* Tracé en pointillés entre deux repères */
.leg::before {
  content: "";
  position: absolute;
  top: 2.75rem;
  bottom: 0;
  left: calc(1.5rem - 2px);
  border-left: 4px dashed var(--line-color);
}

.roadbook__list--morocco .leg:last-child {
  padding-bottom: 0;
}

.roadbook__list--morocco .leg:last-child::before {
  display: none;
}

.leg__num {
  grid-row: 1 / span 3;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 2.75rem;
  background: var(--ground);
  border: 2px solid var(--ink);
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.leg--key .leg__num {
  background: var(--ink);
  color: var(--on-blue);
}

.leg__date {
  grid-column: 2;
  padding-top: 0.15rem;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.leg__route {
  grid-column: 2;
  margin-top: 0.3rem;
  font-family: var(--f-display);
  font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem);
  font-weight: 800;
  font-stretch: 75%;
  line-height: 1.02;
  text-transform: uppercase;
  overflow-wrap: break-word;
}

.leg__note {
  grid-column: 2;
  margin-top: 0.45rem;
  font-weight: 500;
}

.leg--key .leg__note {
  justify-self: start;
  padding: 0.1rem 0.45rem;
  background: var(--ink);
  color: var(--on-blue);
}

@media (min-width: 60em) {
  .raid__grid {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 5rem;
    align-items: start;
  }

  .raid__intro {
    position: sticky;
    top: calc(var(--scroll-offset) + 2rem);
  }
}


/* ------------------------------------------------------------
   11. SECTION SOLIDARITÉ (#solidarite)
   ------------------------------------------------------------ */
.causes {
  display: grid;
}

.cause {
  min-width: 0;
}

.cause + .cause {
  margin-top: 3rem;
  padding-top: 3rem;
  border-top: 1px dashed rgba(247, 251, 253, 0.28);
}

.cause__figure {
  color: var(--iceberg);
  font-family: var(--f-display);
  font-size: clamp(4rem, 2rem + 7vw, 7.5rem);
  font-weight: 800;
  font-stretch: 75%;
  line-height: 0.9;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.cause__unit {
  margin-left: 0.12em;
  color: var(--on-blue);
  font-size: 0.4em;
  text-transform: uppercase;
}

.cause__figure-label {
  margin-top: 0.75rem;
  color: var(--on-ink-soft);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.cause__name {
  margin: 2rem 0 0.75rem;
  color: var(--on-blue);
  font-size: 1.625rem;
}

.cause p:last-child {
  max-width: 34em;
}

@media (min-width: 48em) {
  .causes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cause:first-child {
    padding-right: clamp(2rem, 4vw, 3.5rem);
  }

  .cause + .cause {
    margin-top: 0;
    padding-top: 0;
    padding-left: clamp(2rem, 4vw, 3.5rem);
    border-top: 0;
    border-left: 1px dashed rgba(247, 251, 253, 0.28);
  }
}


/* ------------------------------------------------------------
   12. SECTION SUIVEZ LA PRÉPARATION (#instagram)
   ------------------------------------------------------------ */
.insta__head {
  display: grid;
  gap: 0 4rem;
}

.insta__head .section__head {
  margin-bottom: 1.5rem;
}

.insta__intro {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.5rem;
  min-width: 0;
}

@media (min-width: 60em) {
  .insta__head {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: end;
  }

  .insta__head .section__head {
    margin-bottom: 0;
  }
}


/* ------------------------------------------------------------
   13. SECTION SOUTENIR (#soutenir)
   ------------------------------------------------------------ */
.support {
  display: grid;
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  border-top: 2px solid var(--ink);
}

.support__col {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding-block: 2rem;
}

.support__col + .support__col {
  border-top: 2px dashed rgba(255, 255, 255, 0.7);
}

.support__col > p {
  color: var(--ink);
  font-weight: 500;
}

.support__col > .support__kicker {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.support__title {
  margin: 0.75rem 0 1rem;
  font-size: clamp(1.625rem, 1.3rem + 1vw, 2.125rem);
}

.support__action {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 1.75rem;
}

.support__note {
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.support__note[hidden] {
  display: none;
}

.support__legal {
  padding-top: 1.25rem;
  border-top: 1px dashed rgba(14, 34, 48, 0.45);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
}

@media (min-width: 60em) {
  .support {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 2.5rem;
  }

  .support__col {
    padding: 2.25rem 2rem 0.5rem;
  }

  .support__col:first-child {
    padding-left: 0;
  }

  .support__col:last-child {
    padding-right: 0;
  }

  .support__col + .support__col {
    border-top: 0;
    border-left: 2px dashed rgba(255, 255, 255, 0.7);
  }
}


/* ------------------------------------------------------------
   14. SECTION PRESSE & CONTACT (#contact)
   ------------------------------------------------------------ */
.contact__grid {
  display: grid;
  gap: 2.5rem;
}

.contact-card {
  min-width: 0;
  align-self: start;
  background: var(--white);
  border: 2px solid var(--ink);
}

.contact-card__list {
  margin: 0;
}

.contact-card__row {
  display: grid;
  gap: 0.5rem;
  padding: 1.15rem 1.25rem;
  border-bottom: 1px dashed rgba(14, 34, 48, 0.3);
}

.contact-card__row dt {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.contact-card__row dd {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  min-width: 0;
}

.contact-card__row a {
  font-weight: 600;
  text-underline-offset: 0.2em;
}

.contact-card__people {
  padding: 1.15rem 1.25rem;
  font-weight: 500;
}

@media (min-width: 60em) {
  .contact__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 4.5rem;
    align-items: end;
  }
}


/* ------------------------------------------------------------
   15. FOOTER
   ------------------------------------------------------------ */
.site-footer {
  padding-block: clamp(3rem, 6vw, 4.5rem);
  background: var(--ink);
  color: var(--ground);
}

.site-footer__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px dashed rgba(247, 251, 253, 0.28);
}

.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer__nav a {
  display: inline-block;
  padding-block: 0.25rem;
  font-family: var(--f-display);
  font-size: 1.1875rem;
  font-weight: 800;
  font-stretch: 75%;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  text-decoration: none;
  text-underline-offset: 0.25em;
  text-decoration-thickness: 3px;
}

.site-footer__nav a:hover {
  text-decoration-line: underline;
}

.site-footer__legal {
  display: grid;
  gap: 0.5rem;
  max-width: 60em;
  padding-top: 1.5rem;
  color: var(--on-ink-soft);
  font-size: 0.875rem;
}


/* ------------------------------------------------------------
   16. ANIMATIONS (désactivées si prefers-reduced-motion)
   ------------------------------------------------------------ */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }

  .btn,
  .site-nav a {
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, color 0.15s ease;
  }

  /* La piste se « déroule » une seule fois au chargement */
  .hero__track path {
    animation: track-roll 1.6s ease-out both;
  }

  @keyframes track-roll {
    from {
      stroke-dashoffset: 380;
    }
  }
}


/* Professeur référent : carte à part, sous l'équipe atelier */
.referent {
  margin-top: 1.75rem;
}
.fiche--referent .fiche__body {
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
}
.fiche--referent .fiche__name {
  font-size: clamp(1.375rem, 1.1rem + 1vw, 1.75rem);
}
.fiche--referent .fiche__content p:last-child {
  margin: 0.6rem 0 0;
  max-width: 60ch;
}
@media (max-width: 30em) {
  .fiche--referent .fiche__body {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }
}
