/* Page /bivouacs — l'adresse du QR code de l'affiche (D162, D165).
   Lue debout, sur un téléphone, dans la rue : grandes dates, peu de mots. */

.bivouac-ouverture { position: relative; }
.bivouac-ouverture img { display: block; width: 100%; height: min(62vh, 560px); object-fit: cover; }
.bivouac-ouverture::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(11, 3, 6, 0.3) 0%, rgba(11, 3, 6, 0.92) 88%);
}
.bivouac-titre {
  position: absolute; left: 0; right: 0; bottom: clamp(22px, 5vw, 56px); z-index: 2;
  max-width: var(--largeur); margin: 0 auto; padding-inline: clamp(16px, 5vw, 64px);
}
.bivouac-titre h1 {
  font-size: clamp(30px, 6.4vw, 66px); line-height: 1.04; text-transform: uppercase;
  letter-spacing: 0.02em; margin: 12px 0 14px;
}
.bivouac-fenetre {
  margin: 0; font-size: clamp(17px, 2.2vw, 22px); color: var(--ivoire);
  letter-spacing: 0.04em;
}

/* ——— Novembre Numérique ———————————————————————————————————————————
   Les bivouacs sont une programmation du réseau culturel français : le dire
   en haut de page, c'est ce qui permet aux circuits de l'Institut français de
   relayer cette adresse sans avoir à la reformuler. */
.bivouac-cadre {
  margin: 10px 0 0; max-width: 46ch;
  font-size: clamp(14px, 1.7vw, 16px); line-height: 1.5;
  color: rgba(243, 239, 233, 0.72); letter-spacing: 0.02em;
}
.bivouac-cadre strong { color: var(--ivoire); font-weight: 400; }

.cadre-nn {
  margin: clamp(22px, 3.4vw, 30px) 0 0; max-width: 72ch;
  font-size: clamp(15px, 1.8vw, 17px); line-height: 1.65; color: var(--gris);
}
.cadre-nn + .cadre-nn { margin-top: 12px; }
.cadre-nn strong { color: rgba(243, 239, 233, 0.9); font-weight: 400; }
.cadre-nn a { color: var(--terre); text-decoration: none; border-bottom: 1px solid var(--trait); }
.cadre-nn a:hover { color: var(--ivoire); border-bottom-color: var(--ivoire); }

main { max-width: var(--largeur); margin: 0 auto; padding-inline: clamp(16px, 5vw, 64px); }

.quoi { padding: clamp(34px, 6vw, 60px) 0 clamp(26px, 4vw, 40px); max-width: 60ch; }
.quoi p { margin: 0 0 12px; font-size: clamp(17px, 2vw, 21px); color: rgba(243, 239, 233, 0.88); }
.quoi-fort { color: var(--ivoire) !important; font-weight: 400; }

/* ——— Les cinq bivouacs ——— */
.liste { padding-bottom: clamp(36px, 6vw, 64px); border-top: 1px solid var(--trait); padding-top: clamp(30px, 5vw, 48px); }
.liste h2 {
  font-size: clamp(22px, 3.2vw, 34px); text-transform: uppercase; letter-spacing: 0.08em;
  margin: 0 0 clamp(20px, 3vw, 32px);
}
.bivouacs { list-style: none; margin: 0; padding: 0; }
.bivouacs li {
  padding: clamp(18px, 2.6vw, 26px) 0;
  border-bottom: 1px solid var(--trait);
}
.bivouacs li:first-child { border-top: 1px solid var(--trait); }
.bivouacs p { margin: 0; }
.jour {
  font-size: clamp(20px, 2.8vw, 28px); line-height: 1.2; font-weight: 300;
  letter-spacing: 0.02em;
}
.lieu { margin-top: 6px !important; font-size: clamp(16px, 1.9vw, 19px); color: rgba(243, 239, 233, 0.9); }
.precision { font-size: 15px; color: var(--gris); }
.horaire {
  margin-top: 8px !important; font-size: 14px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--terre);
}
/* Le lien vers la page propre à chaque lieu, quand elle existe. */
.suite { margin-top: 12px !important; font-size: 16px; }
.suite a { color: var(--ivoire); text-decoration: none; border-bottom: 1px solid var(--terre); padding-bottom: 2px; }
.suite a:hover, .suite a:focus-visible { color: var(--terre); }
.suite span { color: var(--terre); }
.mise-a-jour { margin: clamp(18px, 3vw, 28px) 0 0; font-size: 14px; color: var(--gris); }

/* ——— L'exposition ——— */
.apres {
  border-top: 1px solid var(--trait);
  padding: clamp(32px, 5vw, 56px) 0 clamp(20px, 3vw, 32px);
}
.apres h2 {
  font-size: clamp(24px, 3.6vw, 40px); text-transform: uppercase; letter-spacing: 0.06em;
  margin: 12px 0 16px;
}
.apres p { margin: 0 0 14px; max-width: 58ch; font-size: clamp(16px, 1.9vw, 19px); }
.apres strong { font-weight: 400; color: #fff; }
.apres-liens { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px !important; }
.bouton {
  display: inline-block; padding: 14px 22px; border-radius: 999px; background: var(--terre);
  color: var(--ivoire) !important; text-decoration: none; font-size: 14px;
  letter-spacing: 0.14em; text-transform: uppercase;
}
.bouton:hover { background: #A93424; }
.bouton-discret { background: transparent; box-shadow: inset 0 0 0 1px var(--trait); }
.bouton-discret:hover { background: rgba(243, 239, 233, 0.08); }

.bivouac-pied {
  max-width: var(--largeur); margin: 0 auto;
  padding: clamp(30px, 5vw, 48px) clamp(16px, 5vw, 64px) clamp(44px, 7vw, 72px);
  border-top: 1px solid var(--trait);
  font-size: 13px; color: var(--gris); line-height: 1.8;
}
.bivouac-pied p { margin: 0 0 6px; }

/* ——— Avec : les soutiens, et les lieux qui accueillent ———
   Les logos sont les fichiers officiels des partenaires, en PNG transparent.
   Ceux qui sont dessinés en noir — Alliance Française, La Cambre — sont pris
   dans leur version renversée : la forme garde son alpha, l'encre sombre passe
   au blanc, et le « af » rouge garde sa couleur. C'est ce que prévoient les
   chartes pour un fond foncé. Pas de plaque blanche : elle salissait la nuit.
   Une hauteur commune rendrait l'Alliance Française illisible et La Cambre
   écrasante : un logo empilé a besoin de plus de hauteur qu'un bloc-mot pour
   peser le même poids à l'œil. On les règle donc un par un. */
.soutiens { border-top: 1px solid var(--trait); padding: clamp(30px, 5vw, 48px) 0; }
.soutiens h2 {
  font-size: clamp(14px, 1.7vw, 16px); text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--gris); font-weight: 400; margin: 0 0 clamp(16px, 2.4vw, 22px);
}
.soutiens h2 + .logos + h2 { margin-top: clamp(26px, 4vw, 38px); }
.logos {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; align-items: center; gap: clamp(22px, 4vw, 42px);
}
.logos img { display: block; width: auto; }
.logo-af img      { height: clamp(44px, 6.4vw, 62px); }
/* Le logo officiel de l'Institut français porte son cadre ET sa marge de
   sécurité : le cadre n'occupe que 68,6 % de la hauteur du fichier. Pour que
   le cadre paraisse de la taille des autres logos, l'image doit donc être
   1,46 fois plus haute qu'eux — ici la taille de l'Alliance, multipliée.
   Ne jamais la recoloriser ni la rogner : c'est interdit par leur charte.
   Le plancher de 76 px n'est pas esthétique : c'est leur taille minimale de
   85 px de LARGE (charte p. 6). À 76 px d'image, le cadre fait 85,6 px de
   large — en dessous, on passe sous le minimum sur les petits écrans. */
.logo-if img      { height: clamp(76px, 9.3vw, 90px); }
.logo-bourges img { height: clamp(42px, 6vw, 58px); }
.logo-cambre img  { height: clamp(40px, 5.6vw, 54px); }
.logo-mccs img    { height: clamp(38px, 5.4vw, 52px); }
.logo-mot span {
  font-size: clamp(17px, 2.4vw, 22px); color: var(--ivoire); letter-spacing: 0.02em;
}

/* ——— La carte des bivouacs ———————————————————————————————————————
   Un carré de 7,2 km de côté, dessiné par nous : le site ne charge aucune
   tuile d'un tiers (D182). La géométrie vient d'OpenStreetMap et dort dans
   js/fond-bruxelles.js ; les points, eux, sont la liste ci-dessous, relue.
   Tant que le script n'a pas tourné, la boîte n'existe pas et la liste
   s'affiche seule : la page du QR code marche sans JavaScript. */
.carte-boite {
  position: relative; aspect-ratio: 1; width: 100%;
  margin: 0 0 clamp(14px, 2.4vw, 20px);
  background: #080206;
  border: 1px solid var(--trait);
  overflow: hidden;
}
.carte-boite:not(.carte-faite) { display: none; }
.carte-fond { position: absolute; inset: 0; width: 100%; height: 100%; }

.c-parc    { fill: rgba(92, 112, 74, 0.21); stroke: rgba(92, 112, 74, 0.4); stroke-width: 1; }
.c-limite  { fill: none; stroke: rgba(243, 239, 233, 0.17); stroke-width: 0.9; }
.c-etang   { fill: rgba(60, 92, 122, 0.4); stroke: rgba(60, 92, 122, 0.5); stroke-width: 0.8; }
.c-eau     { fill: none; stroke: rgba(60, 92, 122, 0.72); stroke-width: 4.4; stroke-linecap: round; stroke-linejoin: round; }
.c-pentagone { fill: rgba(243, 239, 233, 0.022); stroke: rgba(243, 239, 233, 0.3); stroke-width: 1.6; }

/* ——— Les quatre points ———
   Posés en pour cent, jamais en pixels : la fenêtre est un carré de terrain,
   donc un pour cent de largeur vaut un pour cent de hauteur, et le repère
   garde sa taille que la carte fasse trois cents pixels ou six cents. */
.carte-points { position: absolute; inset: 0; }
.pt {
  position: absolute; width: 0; height: 0; padding: 0;
  background: none; border: 0; cursor: pointer; color: inherit;
  font: inherit; line-height: 1;
}
.pt-halo, .pt-anneau {
  position: absolute; left: 50%; top: 50%; border-radius: 50%;
  transform: translate(-50%, -50%);
}
.pt-halo {
  width: 44px; height: 44px;
  background: radial-gradient(circle, rgba(200, 65, 47, 0.3) 0%, rgba(200, 65, 47, 0) 68%);
  opacity: 0; transition: opacity 0.35s ease;
}
.pt-anneau {
  width: 15px; height: 15px;
  border: 2px solid var(--terre);
  background: rgba(11, 3, 6, 0.65);
  transition: width 0.25s ease, height 0.25s ease, background 0.25s ease;
}
.pt-mot {
  position: absolute; white-space: nowrap;
  color: rgba(243, 239, 233, 0.62);
  transition: color 0.25s ease;
}
.pt-mot b { display: block; font-size: 14px; font-weight: 400; letter-spacing: 0.02em; }
.pt-mot i {
  display: block; font-style: normal; font-size: 11px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--gris); margin-top: 2px;
}
.pt-droite .pt-mot { left: 15px; top: -16px; text-align: left; }
.pt-gauche .pt-mot { right: 15px; top: -16px; text-align: right; }
.pt-haut .pt-mot   { left: 50%; bottom: 16px; transform: translateX(-50%); text-align: center; }
.pt-bas .pt-mot    { left: 50%; top: 16px; transform: translateX(-50%); text-align: center; }

.pt:hover .pt-mot, .pt:focus-visible .pt-mot { color: var(--ivoire); }
.pt:hover .pt-anneau { width: 19px; height: 19px; }
.pt-choisi .pt-halo { opacity: 1; }
.pt-choisi .pt-anneau { width: 21px; height: 21px; background: var(--terre); }
.pt-choisi .pt-mot { color: #fff; }
.pt-choisi .pt-mot i { color: var(--terre); }
.pt:focus-visible { outline: none; }
.pt:focus-visible .pt-anneau { box-shadow: 0 0 0 3px rgba(243, 239, 233, 0.75); }

/* ——— L'échelle et le nord : ce qui fait d'un dessin une carte ——— */
.carte-echelle { position: absolute; left: 16px; bottom: 14px; }
.carte-barre {
  display: block; height: 1px; background: rgba(243, 239, 233, 0.5);
  box-shadow: 0 -3px 0 -2px rgba(243, 239, 233, 0.5), 0 3px 0 -2px rgba(243, 239, 233, 0.5);
}
.carte-mesure {
  display: block; margin-top: 7px; font-size: 10px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--gris); white-space: nowrap;
}
.carte-nord {
  position: absolute; right: 18px; top: 16px; text-align: center;
  font-size: 11px; letter-spacing: 0.1em; color: rgba(243, 239, 233, 0.45);
}
.carte-fleche {
  display: block; margin: 0 auto 4px; width: 0; height: 0;
  border-left: 4px solid transparent; border-right: 4px solid transparent;
  border-bottom: 11px solid rgba(243, 239, 233, 0.45);
}

.carte-mode-emploi {
  margin: 0 0 clamp(20px, 3vw, 28px) !important;
  font-size: 14px; color: var(--gris);
}
.carte-boite:not(.carte-faite) + .carte-mode-emploi { display: none; }
.carte-source { margin: 10px 0 0; font-size: 12px; color: rgba(140, 130, 121, 0.75); }
.carte-source a { color: inherit; }

/* ——— La liste, devenue la légende de la carte ———
   Elle reste la source : la carte la lit. Mais dès qu'il y a une carte, elle
   se resserre et se laisse cliquer ligne à ligne. */
.avec-carte .bivouacs li { cursor: pointer; transition: border-color 0.25s ease; }
.avec-carte .bivouacs .jour { font-size: clamp(18px, 2.3vw, 23px); }
.avec-carte .bivouacs li:hover .lieu { color: #fff; }
.avec-carte .bivouacs li.li-choisi { border-left: 2px solid var(--terre); padding-left: 16px; }
.avec-carte .bivouacs li.li-choisi .jour { color: #fff; }

/* Deux colonnes : la carte à gauche, la liste à droite. Les rangées sont
   calées au contenu, et la liste va jusqu'en bas : c'est elle, la plus haute,
   qui absorbe la place restante — sinon la ligne d'aide s'échouait tout en bas
   de la carte, à cent pixels de ce qu'elle explique. */
@media (min-width: 900px) {
  .avec-carte {
    display: grid; grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "titre  titre"
      "carte  liste"
      "aide   liste"
      "source liste"
      ".      liste"
      ".      fin";
    /* La rangée vide en 1fr encaisse la hauteur de la liste : sans elle, le
       surplus s'étalait entre la ligne d'aide et la mention de la source. */
    grid-template-rows: auto auto auto auto 1fr auto;
    grid-auto-rows: min-content; column-gap: clamp(28px, 4vw, 48px);
    align-items: start;
  }
  .avec-carte h2 { grid-area: titre; }
  .avec-carte .carte-boite { grid-area: carte; margin-bottom: 14px; }
  .avec-carte .carte-mode-emploi { grid-area: aide; margin: 0 0 10px !important; }
  .avec-carte .carte-source { grid-area: source; margin: 0; }
  .avec-carte .bivouacs { grid-area: liste; }
  .avec-carte .mise-a-jour { grid-area: fin; }
}

@media (prefers-reduced-motion: reduce) {
  .pt-halo, .pt-anneau, .pt-mot { transition: none; }
}
