/* Fiche détaillée d'une via ferrata. */

.fiche {
  padding-top: 10px;
}
.fiche__attente {
  height: 60vh;
  border-radius: var(--r-18);
  background: var(--brume);
}
.fiche .h2 .ico {
  width: 26px;
  height: 26px;
}

/* ---------- En-tête de fiche ---------- */

/* Ordinateur : texte à gauche, photos à droite, carnet sous le texte.
   Téléphone : texte, photos, puis carnet (il ne doit pas repousser la photo). */
.fhead {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  grid-template-areas:
    "txt gal"
    "car gal";
  grid-template-rows: auto 1fr;
  gap: 18px 40px;
  align-items: start;
  margin-top: 6px;
}
.fhead__txt {
  grid-area: txt;
}
.gallery {
  grid-area: gal;
}
.carnet {
  grid-area: car;
}
.fhead__txt {
  display: grid;
  gap: 14px;
  justify-items: start;
}
.fhead__grade {
  display: flex;
  align-items: center;
  gap: 14px;
}
.fhead__tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
}
.fhead__kname {
  flex-basis: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 14px;
  font: 600 var(--t-20) / 1.1 var(--f-titre);
}
.fhead__kname span::first-letter {
  text-transform: uppercase;
}
.fhead__kname a {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  font: 400 var(--t-15) var(--f-texte);
}
.fhead .h1 {
  font-size: clamp(var(--t-30), 4.2vw, 3rem);
  text-wrap: balance;
}
.fhead__place {
  font: 500 var(--t-20) / 1.3 var(--f-titre);
}
.fhead__place > .flag {
  width: 24px;
  height: 16px;
  margin-right: 8px;
  vertical-align: -1px;
}
.fhead__place span {
  display: block;
  color: var(--encre-2);
  font: 400 var(--t-15) / 1.4 var(--f-texte);
}
.fhead__local {
  color: var(--encre-2);
  font-size: var(--t-15);
}
.fhead__trust {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.fhead__trust .tag {
  min-height: 30px;
  padding: 4px 12px 4px 9px;
  font-size: var(--t-15);
  text-decoration: none;
}
.fhead__trust a.tag:hover {
  box-shadow: inset 0 0 0 2px var(--encre);
  color: var(--encre);
}
.fhead__trust .tag .ico {
  width: 17px;
  height: 17px;
}
.tag--conf {
  background: var(--jaune-clair);
}
.tag--conf[data-conf="high"] {
  background: var(--foret);
}
.tag--conf[data-conf="low"] {
  background: var(--rouge-clair);
}
.chapo {
  font-size: var(--t-20);
  line-height: 1.45;
}

/* Ordinateur : la photo prend exactement la hauteur du texte d'en-tête. Pas de trou sous l'un ni sous l'autre. */
@media (min-width: 901px) {
  .gallery:not(:has(.is-missing)) {
    align-self: stretch;
    grid-template-rows: minmax(0, 1fr) auto;
  }
  .gallery:not(:has(.is-missing)) .gallery__main {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }
  .gallery:not(:has(.is-missing)) .gallery__zoom {
    flex: 1 1 auto;
    min-height: 340px;
    max-height: 640px;
  }
  .gallery:not(:has(.is-missing)) .gallery__zoom img {
    position: absolute;
    inset: 0;
    height: 100%;
    aspect-ratio: auto;
  }
}

.alerte {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--encre);
  border-radius: var(--r-12);
  background: var(--jaune-clair);
  font-size: var(--t-15);
  line-height: 1.4;
}
.alerte .ico {
  width: 22px;
  height: 22px;
  margin-top: 1px;
}
.alerte--rouge {
  background: var(--rouge);
  color: #fff;
  font-weight: 700;
}
.alerte--rouge a {
  color: #fff;
  white-space: nowrap;
}
.alerte--discret {
  border: 0;
  padding: 10px 14px;
  background: var(--lac);
}
.alerte--approx {
  border-style: dashed;
  background: var(--jaune-clair);
}

/* Randonnée avec passage équipé : sobre, contour pointillé comme son épingle sur la carte. */
.kindnote {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 11px 14px 12px;
  border: 2px dashed var(--encre-2);
  border-radius: var(--r-12);
  background: var(--blanc);
  font-size: var(--t-15);
  line-height: 1.45;
}
.kindnote__t {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font: 600 var(--t-17) / 1.3 var(--f-titre);
}
.kindnote__t .ico {
  width: 20px;
  height: 20px;
  margin-top: 1px;
}
.kindnote__why {
  padding-left: 28px;
  color: var(--encre-2);
}

/* Pépite : l'éclat jaune et la raison, en citation. */
.fpep {
  display: grid;
  gap: 8px;
  width: 100%;
}
.fpep__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
}
.fpep__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 13px 4px 9px;
  border: 2px solid var(--encre);
  border-radius: 999px;
  background: var(--jaune);
  font: 600 var(--t-15) / 1.2 var(--f-titre);
}
.fpep__badge .ico {
  width: 18px;
  height: 18px;
  fill: var(--blanc);
  stroke: var(--encre);
  stroke-width: 1.6;
}
.fpep__head a {
  font-size: var(--t-15);
}
.fpep__why {
  max-width: 58ch;
  padding: 2px 0 2px 14px;
  border-left: 4px solid var(--jaune);
  font: 500 var(--t-17) / 1.45 var(--f-titre);
}

/* Notoriété : cinq crans, discrets ; le détail se déplie. */
.notor {
  width: 100%;
  max-width: 560px;
}
.notor summary {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  min-height: 36px;
  border-radius: 8px;
  font: 500 var(--t-15) / 1.2 var(--f-titre);
  cursor: pointer;
  list-style: none;
}
.notor summary::-webkit-details-marker {
  display: none;
}
.notor__lbl {
  color: var(--encre-2);
}
.notor__gauge {
  display: inline-flex;
  gap: 3px;
}
.notor__gauge i {
  width: 16px;
  height: 9px;
  border: 1.5px solid var(--encre);
  border-radius: 3px;
  background: var(--blanc);
}
.notor__gauge i.on {
  background: var(--encre);
}
.notor__why {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: var(--lien);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.16em;
}
.notor summary:hover .notor__why {
  color: var(--encre);
}
.notor__why .ico {
  width: 16px;
  height: 16px;
  transition: transform 160ms var(--ease);
}
.notor[open] .notor__why .ico {
  transform: rotate(180deg);
}
.notor__body {
  display: grid;
  gap: 8px;
  margin-top: 6px;
  padding: 12px 14px;
  border: 1.5px solid var(--bord);
  border-radius: var(--r-12);
  background: var(--blanc);
  font-size: var(--t-15);
  line-height: 1.45;
}
.notor__body ul {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 18px;
}
.notor__body .note {
  font-size: var(--t-13);
}

.feats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.feats li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px 5px 8px;
  border: 1.5px solid var(--bord);
  border-radius: 999px;
  background: var(--blanc);
  font: 500 var(--t-15) / 1.2 var(--f-titre);
}
.feats .ico {
  width: 18px;
  height: 18px;
}

.fhead__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
  padding-bottom: 3px;
}
[data-carnet][aria-pressed="true"][data-carnet="done"] {
  background: var(--vert);
  border-color: var(--encre);
}
[data-carnet][aria-pressed="true"][data-carnet="todo"] {
  background: var(--jaune);
  color: var(--encre);
  box-shadow: 0 1px 0 var(--encre);
}
[data-carnet][aria-pressed="true"][data-carnet="todo"] .ico {
  fill: var(--encre);
}

/* ---------- Mon carnet : s'ouvre sous les boutons ---------- */

.carnet-hint {
  display: flex;
  align-items: center;
  gap: 7px;
}
/* Fond blanc : le jaune pâle est réservé aux mises en garde. */
.carnet {
  display: grid;
  gap: 16px;
  padding: 18px 20px 16px;
  border: 2px solid var(--encre);
  border-radius: var(--r-18);
  background: var(--blanc);
}
.carnet h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--t-20);
}
.carnet__row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
}
.carnet__field {
  display: grid;
  gap: 6px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.carnet__field > label,
.carnet__field > legend {
  padding: 0;
  font: 600 var(--t-15) / 1.2 var(--f-titre);
}
.carnet__field > legend {
  margin-bottom: 6px;
}
.input {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 2px solid var(--encre);
  border-radius: var(--r-12);
  background: var(--blanc);
}
.input::placeholder {
  color: var(--encre-2);
  opacity: 1;
}
textarea.input {
  min-height: 96px;
  line-height: 1.45;
  resize: vertical;
}
/* Étoiles dans l'ordre 1 → 5 (les flèches du clavier vont dans le bon sens) ; le remplissage remonte avec :has(). */
.stars {
  display: inline-flex;
  gap: 2px;
}
.stars input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.stars label {
  display: grid;
  place-items: center;
  width: 44px;
  height: 46px;
  cursor: pointer;
}
.stars label .ico {
  width: 34px;
  height: 34px;
  fill: var(--brume);
  transition: transform 120ms var(--ease);
}
.stars label:hover .ico {
  transform: scale(1.12);
}
.stars input:checked + label .ico,
.stars label:has(~ input:checked) .ico,
.stars label:hover .ico,
.stars label:has(~ label:hover) .ico {
  fill: var(--jaune);
}
.stars input:focus-visible + label {
  outline: 3px solid var(--bleu);
  outline-offset: -2px;
  border-radius: 10px;
}
.carnet__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 16px;
  font-size: var(--t-15);
}
.carnet__meta a {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
}
.carnet__saved {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--vert-texte);
  font: 600 var(--t-15) var(--f-titre);
}
.carnet__saved .ico {
  stroke-width: 3;
}

/* ---------- Galerie ---------- */

.gallery {
  display: grid;
  gap: 10px;
}
.gallery__main {
  margin: 0;
}
.gallery__zoom {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 2px solid var(--encre);
  border-radius: var(--r-18);
  background: var(--foret);
  box-shadow: var(--socle);
  overflow: hidden;
  cursor: zoom-in;
}
.gallery__zoom:disabled {
  box-shadow: none;
  cursor: default;
}
.gallery__zoom:disabled .gallery__loupe {
  display: none;
}
.gallery__main img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.gallery__main.is-missing > img {
  border: 2px solid var(--encre);
  border-radius: var(--r-18);
}
.gallery__loupe {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 2px solid var(--encre);
  border-radius: 50%;
  background: var(--blanc);
}
.gallery__zoom:hover .gallery__loupe {
  background: var(--jaune);
}
.gallery figcaption {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2px 14px;
  margin-top: 10px;
  color: var(--encre-2);
  font-size: var(--t-13);
  line-height: 1.4;
}
.gallery figcaption a,
.lightbox figcaption a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 24px;
  color: inherit;
  white-space: nowrap;
}
.gallery figcaption .ico,
.lightbox figcaption .ico {
  width: 13px;
  height: 13px;
}
.gallery__thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 3px;
  margin: -3px;
  scrollbar-width: thin;
}
.gallery__thumbs button {
  flex: none;
  width: 72px;
  height: 72px;
  padding: 0;
  border: 2px solid var(--encre);
  border-radius: var(--r-12);
  background: var(--foret);
  overflow: hidden;
  opacity: 0.72;
  transition: opacity 120ms;
}
.gallery__thumbs button:hover {
  opacity: 1;
}
.gallery__thumbs button[aria-current="true"] {
  opacity: 1;
  box-shadow: 0 0 0 3px var(--jaune);
}
.gallery__thumbs img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lightbox {
  width: 100vw;
  max-width: none;
  height: 100vh;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 16px;
  border: 0;
  background: rgb(18 28 24 / 0.96);
  color: #fff;
}
.lightbox[open] {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 56px;
  align-items: center;
  gap: 8px;
}
.lightbox::backdrop {
  background: rgb(18 28 24 / 0.9);
}
.lightbox figure {
  display: grid;
  justify-items: center;
  gap: 12px;
  margin: 0;
  min-width: 0;
}
.lightbox img {
  max-width: 100%;
  max-height: calc(100dvh - 110px);
  border-radius: var(--r-12);
  object-fit: contain;
}
.lightbox figcaption {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 18px;
  font-size: var(--t-15);
}
.lightbox__btn {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: none;
  color: #fff;
}
.lightbox__btn:hover {
  background: var(--jaune);
  border-color: var(--jaune);
  color: var(--encre);
}
.lightbox__btn .ico {
  width: 24px;
  height: 24px;
}
.lightbox__close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 1;
}
.lightbox.is-solo .lightbox__prev,
.lightbox.is-solo .lightbox__next {
  visibility: hidden;
}
.lightbox :focus-visible {
  outline-color: var(--jaune);
}

/* ---------- Chiffres clés ---------- */

/* La plaque et les tuiles ont toujours la même hauteur : pas de trou sous la plus courte. */
.figures {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 16px 40px;
  align-items: stretch;
  margin-top: 28px;
}
.figures--seules {
  grid-template-columns: minmax(0, 1fr);
}

/* La plaque jaune de la durée : même forme que le panneau indicateur.
   Le contour encre suit la pointe grâce aux ombres portées du conteneur. */
.plaque-wrap {
  display: grid;
  filter: drop-shadow(2px 0 0 var(--encre)) drop-shadow(-2px 0 0 var(--encre)) drop-shadow(0 2px 0 var(--encre)) drop-shadow(0 -2px 0 var(--encre));
}
.plaque {
  position: relative;
  display: grid;
  align-content: center;
  gap: 16px;
  height: 100%;
  padding: 22px 56px 22px 26px;
  background: var(--jaune);
  clip-path: polygon(0 0, calc(100% - 34px) 0, 100% 50%, calc(100% - 34px) 100%, 0 100%);
  border-radius: var(--r-18) 0 0 var(--r-18);
}
.plaque__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  font: 500 var(--t-20) / 1 var(--f-titre);
}
.plaque__top span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.plaque__top strong {
  font: 600 var(--t-54) / 0.9 var(--f-titre);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
/* Barre proportionnelle aux trois temps, puis les trois temps en colonnes égales. */
.legs__track {
  display: flex;
  gap: 4px;
  margin-bottom: -6px;
}
.legs__track span {
  flex: 1 1 0;
  min-width: 16px;
  height: 14px;
  border: 2px solid var(--encre);
  border-radius: 999px;
  background: var(--blanc);
}
.legs__track [data-leg="ferrata"],
.legs li[data-leg="ferrata"]::before {
  background: var(--k, var(--encre));
}
.legs__track [data-leg="descent"],
.legs li[data-leg="descent"]::before {
  background: repeating-linear-gradient(-55deg, var(--blanc) 0 4px, var(--encre) 4px 6px);
}
.legs {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.legs li {
  position: relative;
  display: grid;
  gap: 2px;
  padding-left: 18px;
  font-size: var(--t-15);
  line-height: 1.25;
}
.legs li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 11px;
  height: 11px;
  border: 2px solid var(--encre);
  border-radius: 50%;
  background: var(--blanc);
}
.legs__lbl {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.legs__lbl .ico {
  width: 16px;
  height: 16px;
}
.legs b {
  font: 600 var(--t-20) / 1.1 var(--f-titre);
}
.plaque__note {
  display: flex;
  gap: 7px;
  align-items: flex-start;
  font-size: var(--t-13);
  line-height: 1.35;
}
.plaque__note .ico {
  width: 16px;
  height: 16px;
  margin-top: 1px;
}
/* Temps incomplets : pas de barre proportionnelle, donc pas de pastilles de légende. */
.legs--seuls li {
  padding-left: 0;
}
.legs--seuls li::before {
  content: none;
}

/* Tuiles : posées, pas cliquables, donc sans socle. Grille de 6 : la largeur de chaque tuile (--w, --n sur téléphone)
   est calculée pour que chaque ligne soit pleine, sans tuile orpheline. Chiffres tabulaires ici, et seulement ici. */
.tiles {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: 12px;
  margin: 0;
}
.tile {
  grid-column: span var(--w, 2);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  padding: 12px 14px 12px;
  border: 2px solid var(--encre);
  border-radius: var(--r-18);
  background: var(--blanc);
}
.tile dt {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  color: var(--encre-2);
  font-size: var(--t-13);
  line-height: 1.3;
}
.tile dt .ico {
  width: 17px;
  height: 17px;
  color: var(--encre);
}
.tile dd {
  margin: 0;
  font: 600 var(--t-24) / 1.1 var(--f-titre);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.tile dd small {
  margin-left: 3px;
  font-size: 0.62em;
  font-weight: 500;
}
/* Valeur en mots (saison, orientation) : un cran plus petit, et libre de passer à la ligne. */
.tile--txt dd {
  font-size: var(--t-20);
  line-height: 1.15;
  white-space: normal;
  text-wrap: balance;
}

/* ---------- Sommaire collant ---------- */

.rail {
  position: sticky;
  top: var(--top-h);
  z-index: 900;
  margin: 32px -20px 0;
  padding: 0 20px;
  border-bottom: 2px solid var(--encre);
  background: var(--papier);
}
.rail ul {
  --fl: 0px;
  --fr: 0px;
  display: flex;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 var(--fl), #000 calc(100% - var(--fr)), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 var(--fl), #000 calc(100% - var(--fr)), transparent 100%);
}
.rail ul.fade-l {
  --fl: 32px;
}
.rail ul.fade-r {
  --fr: 32px;
}
.rail ul::-webkit-scrollbar {
  display: none;
}
.rail li {
  flex: none;
}
.rail a {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 14px;
  border-radius: var(--r-12) var(--r-12) 0 0;
  color: var(--encre-2);
  font: 500 var(--t-17) var(--f-titre);
  text-decoration: none;
  white-space: nowrap;
}
.rail a:hover {
  background: var(--jaune-clair);
  color: var(--encre);
}
/* Section en cours : onglet jaune, souligné d'encre. */
.rail a[aria-current] {
  background: var(--jaune);
  color: var(--encre);
}
.rail a[aria-current]::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 0;
  height: 4px;
  border-radius: 4px 4px 0 0;
  background: var(--encre);
}
.rail a:focus-visible {
  outline-offset: -3px;
}
.fiche [id] {
  scroll-margin-top: calc(var(--top-h) + 64px);
}

/* ---------- Corps ---------- */

.fbody {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
  margin-top: 36px;
}
.fmain {
  display: grid;
  gap: 34px;
}
.fside {
  position: sticky;
  top: var(--stick, calc(var(--top-h) + 68px));
  display: grid;
  gap: 22px;
}

.sec {
  display: grid;
  gap: 10px;
}
.sec p {
  max-width: 52ch;
}
.sec--danger {
  gap: 14px;
  padding: 18px 20px 20px;
  border: 2px solid var(--encre);
  border-radius: var(--r-18);
  background: var(--rouge-clair);
}
.sec--danger .h2 .ico {
  color: var(--rouge);
}
.sec--danger .sos {
  border-radius: var(--r-12);
}
.sec--matos {
  padding: 18px 20px 20px;
  border: 2px solid var(--encre);
  border-radius: var(--r-18);
  background: var(--foret);
}

.profil svg {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 4px;
}
.pf-axis {
  fill: var(--encre-2);
  font: 400 12px var(--f-texte);
}
.pf-alt {
  fill: var(--encre);
  font: 600 17px var(--f-titre);
}
.pf-leg {
  fill: var(--encre-2);
  font: 400 13px var(--f-texte);
}

.card {
  display: grid;
  gap: 16px;
  padding: 20px;
  border: 2px solid var(--encre);
  border-radius: var(--r-18);
  background: var(--blanc);
}
.acc {
  display: grid;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--filet);
  font-size: var(--t-15);
  line-height: 1.5;
}
.card > .h2 + .acc {
  padding-top: 0;
  border-top: 0;
}
.acc h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--t-17);
}
.acc h3 .ico {
  width: 22px;
  height: 22px;
}
.acc h3 .tag {
  margin-left: auto;
}
.acc__poi {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 10px 12px;
  border-radius: var(--r-12);
  background: var(--brume);
  line-height: 1.4;
}
.acc__poi .ico {
  margin-top: 1px;
}
.acc__btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 3px;
}
.btn--cff {
  height: auto;
  padding-top: 7px;
  padding-bottom: 7px;
  text-align: left;
}

/* ---------- Sur la carte ---------- */

.carte {
  display: grid;
  gap: 16px;
  margin-top: 56px;
}
.carte__in {
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}
.carte__side {
  display: grid;
  gap: 16px;
}
.carte__side p a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  font-size: var(--t-15);
}
.carte__side p a .ico {
  width: 14px;
  height: 14px;
}
.minimap {
  height: 440px;
  border: 2px solid var(--encre);
  border-radius: var(--r-18);
  overflow: hidden;
  z-index: 0;
}
.minimap .leaflet-top.leaflet-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  padding: 12px 12px 0 0;
}
.minimap .leaflet-top.leaflet-right .leaflet-control {
  margin: 0;
}
.legende {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--t-15);
  line-height: 1.4;
}
.legende li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.legende__pin {
  width: 22px;
  height: 22px;
  flex: none;
  border: 2px solid var(--encre);
  border-radius: 50% 50% 50% 0;
  background: var(--k);
  transform: rotate(-45deg) scale(0.86);
}
.legende__poi {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: none;
  border: 2px solid var(--encre);
  border-radius: 8px;
  background: var(--blanc);
  font: 600 13px / 1 var(--f-titre);
}
.legende__poi--p {
  background: var(--bleu);
  color: #fff;
}
.legende__poi .ico {
  width: 14px;
  height: 14px;
}

/* ---------- Sources, commentaires ---------- */

.sources,
.comments {
  display: grid;
  gap: 14px;
  margin-top: 56px;
  padding-top: 32px;
  border-top: 2px solid var(--encre);
}
.comments {
  border-top: 1px solid var(--filet);
}
.sources > p,
.notes p {
  max-width: 58ch;
}
.sources__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0 28px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: src;
}
.sources__list li {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  column-gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--filet);
  counter-increment: src;
  line-height: 1.3;
}
.sources__list li::before {
  content: counter(src);
  grid-row: span 2;
  align-self: center;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--brume);
  font: 600 var(--t-13) / 1 var(--f-titre);
}
.sources__list a {
  display: flex;
  align-items: flex-end;
  min-height: 26px;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.sources__list span {
  color: var(--encre-2);
  font-size: var(--t-13);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.conf {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-self: start;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--jaune-clair);
  font: 500 var(--t-15) var(--f-titre);
}
.conf[data-conf="high"] {
  background: var(--foret);
}
.conf[data-conf="low"] {
  background: var(--rouge-clair);
}
.notes {
  border: 1.5px solid var(--bord);
  border-radius: var(--r-12);
  background: var(--blanc);
}
.notes summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 0 16px;
  border-radius: var(--r-12);
  font: 500 var(--t-17) var(--f-titre);
  cursor: pointer;
  list-style: none;
}
.notes summary::-webkit-details-marker {
  display: none;
}
.notes summary .ico {
  transition: transform 160ms var(--ease);
}
.notes[open] summary .ico {
  transform: rotate(180deg);
}
.notes p {
  padding: 0 16px 16px;
  font-size: var(--t-15);
}

.comments__soon {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  max-width: 640px;
  padding: 16px 18px;
  border: 2px dashed var(--bord);
  border-radius: var(--r-18);
}
.comments__soon > .ico {
  width: 26px;
  height: 26px;
  margin-top: 1px;
}
.comments__soon p + p {
  margin-top: 4px;
  color: var(--encre-2);
  font-size: var(--t-15);
}
.comments__soon b {
  font: 600 var(--t-17) / 1.2 var(--f-titre);
}

/* ---------- Une colonne ---------- */

@media (max-width: 900px) {
  .fhead,
  .figures,
  .fbody,
  .carte__in {
    grid-template-columns: minmax(0, 1fr);
  }
  .fhead {
    grid-template-areas:
      "txt"
      "gal"
      "car";
    grid-template-rows: none;
    gap: 22px;
  }
  .figures {
    margin-top: 26px;
  }
  .rail {
    margin-top: 26px;
  }
  .fside {
    position: static;
  }
  .fbody {
    gap: 30px;
    margin-top: 28px;
  }
  /* Sur téléphone on répond d'abord à « comment y aller, combien ça coûte », puis aux dangers, puis au récit. */
  .fmain,
  .fside {
    display: contents;
  }
  .card--acces {
    order: -3;
  }
  .card--pratique {
    order: -2;
  }
  .sec--danger {
    order: -1;
  }
  .carte {
    margin-top: 40px;
  }
  .carte__in {
    gap: 18px;
  }
  .minimap {
    height: 340px;
  }
  .plaque {
    padding: 20px 44px 20px 20px;
    clip-path: polygon(0 0, calc(100% - 26px) 0, 100% 50%, calc(100% - 26px) 100%, 0 100%);
  }
  .lightbox[open] {
    grid-template-columns: minmax(0, 1fr);
    padding: 8px;
  }
  .lightbox__prev,
  .lightbox__next {
    position: absolute;
    bottom: 16px;
  }
  .lightbox__prev {
    left: 16px;
  }
  .lightbox__next {
    right: 16px;
  }
  .lightbox img {
    max-height: calc(100dvh - 190px);
  }
  .lightbox figcaption {
    padding: 0 64px;
    text-align: center;
  }
}

@media (max-width: 520px) {
  .page {
    padding-left: 16px;
    padding-right: 16px;
  }
  .rail {
    margin-left: -16px;
    margin-right: -16px;
    padding: 0 6px;
  }
  .plaque__top strong {
    font-size: var(--t-40);
  }
  .legs {
    gap: 6px;
  }
  .legs__lbl .ico {
    display: none;
  }
  .legs b {
    font-size: var(--t-17);
  }
  .tiles {
    grid-auto-rows: auto;
    gap: 8px;
  }
  .tile {
    grid-column: span var(--n, 3);
    padding: 10px 10px 10px;
    border-radius: 14px;
  }
  .tile dd {
    font-size: var(--t-20);
  }
  .tile--txt dd {
    font-size: var(--t-17);
  }
  .fhead__actions .btn {
    flex: 1 1 auto;
  }
  .fhead__actions .btn--jaune {
    flex-basis: 100%;
  }
  .card,
  .carnet,
  .sec--danger,
  .sec--matos {
    padding: 16px;
  }
  .sec--danger .sos {
    padding: 10px 12px 8px;
  }
}
