/* Pages du tableau : « Du quai » (chronologie, tracé des 320 m), « L'île » (carte, carnet), « Tarifs » (grille, conditions). */
.page { min-height: 0; }
.regle, .prevoir, .legende-tarifs, .volet p, .carte-lieu, .vignette figcaption { text-wrap: pretty; }

/* ---------- Du quai ---------- */
.page--quai { display: grid; gap: 18px; padding: 8px 0 8px; }
.quai__haut { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; font: 700 16px/1.3 var(--sans); }
.quai__haut .lien { font-size: 15px; color: var(--pal-txt); }
.chrono { display: grid; gap: 0; }
.chrono__rang { position: relative; display: flex; align-items: center; gap: 14px; min-height: 52px; }
.chrono__t { font: 600 16px/1.3 var(--sans); }
.chrono__rang:last-child .chrono__h .ft { color: var(--orange); }
/* Téléphone : le plan va d'un bord à l'autre, comme la photo dessous ; le tireté vers le billet n'a rien à rejoindre. */
.trace { margin-inline: calc(-1 * var(--bord)); height: 330px; }
.trace__svg { display: block; width: 100%; height: 100%; }
.trace__terre { fill: #141b22; }
.trace__bati { fill: #1c252e; }
.trace__ponton { fill: none; stroke: #2a343e; stroke-width: 1; vector-effect: non-scaling-stroke; }
.trace__marche { fill: none; stroke: var(--pal-txt); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.trace__suite { fill: none; stroke: var(--orange); stroke-width: 2; stroke-dasharray: 6 5; vector-effect: non-scaling-stroke; }
.trace__pass { fill: var(--tableau); stroke: var(--pal-txt); stroke-width: 2.5; vector-effect: non-scaling-stroke; }
.trace__comptoir { fill: var(--orange); }
.trace__nom { font: 600 calc(12.5px * var(--u, 1)) var(--sans); fill: var(--gris); paint-order: stroke; stroke: var(--tableau); stroke-width: calc(4px * var(--u, 1)); stroke-linejoin: round; }
.trace__fin { fill: var(--orange); }
.trace__nord path { fill: var(--gris); }
.trace__nord text { font: 600 calc(12px * var(--u, 1)) var(--sans); fill: var(--gris); }
.trace__osm { font: 400 calc(11px * var(--u, 1)) var(--sans); fill: #6f7a85; }
@media (max-width: 859px) { .trace__suite { display: none; } }
.prevoir { display: grid; gap: 6px; font-size: 15px; line-height: 1.45; color: var(--pal-txt); }
.prevoir li { position: relative; padding-left: 18px; }
.prevoir li::before { content: ""; position: absolute; left: 0; top: .5em; width: 8px; height: 8px; background: var(--gris); }
.quai-photo { display: block; margin-inline: calc(-1 * var(--bord)); }
.quai-photo img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: 50% 60%; }

@media (min-width: 860px) {
  .page--quai {
    grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto auto; column-gap: 28px; row-gap: 8px;
    height: 100%; padding: 0 0 4px;
  }
  .quai__haut { grid-area: 1 / 1; }
  .chrono { grid-area: 2 / 1; grid-template-rows: repeat(6, minmax(var(--rang, 40px), 1fr)); max-height: calc(var(--rang, 40px) * 9); padding-left: 22px; }
  .chrono__rang::before { content: ""; position: absolute; left: -16px; top: 50%; width: 8px; height: 8px; margin-top: -4px; background: var(--gris); }
  .chrono__rang::after { content: ""; position: absolute; left: -13px; top: calc(50% + 6px); bottom: calc(-50% + 6px); width: 2px; background: #2a343e; }
  .chrono__rang:last-child::before { background: var(--orange); }
  .chrono__rang:last-child::after { display: none; }
  .chrono__rang { min-height: 0; }
  .chrono__rang:last-child .chrono__t .ft { color: var(--orange); }
  /* Le plan se fond dans le tableau par ses bords gauche et haut : un dessin du tableau, pas une plaque collée. */
  .trace {
    grid-area: 1 / 2 / 4 / 3; margin: 0 -18px 0 0; height: auto; min-height: 260px;
    -webkit-mask: linear-gradient(to right, transparent, #000 72px), linear-gradient(transparent, #000 48px);
    -webkit-mask-composite: source-in;
    mask: linear-gradient(to right, transparent, #000 72px) intersect, linear-gradient(transparent, #000 48px);
  }
  .prevoir { grid-area: 3 / 1; max-width: 52ch; }
  .quai-photo { grid-area: 4 / 1 / 5 / 3; margin: 12px 0 0; }
}
@media (min-width: 1200px) and (min-height: 620px) {
  .quai-photo { display: none; }
  .trace { grid-area: 1 / 2 / 5 / 3; margin-right: -22px; }
}

/* ---------- L'île ---------- */
/* Téléphone : la carte, puis le lieu touché (la Meule : sa photo et sa légende dessous), puis le carnet. */
.page--ile { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; padding-top: 12px; }
.carte { position: relative; margin-inline: calc(-1 * var(--bord)); aspect-ratio: 928 / 583; }
.ile { display: block; width: 100%; height: 100%; }
.ile__terre { fill: var(--palette); }
.ile__plage { fill: #27313b; }
.ile__rue { fill: none; stroke: #2c3640; stroke-width: .8; vector-effect: non-scaling-stroke; }
.ile__route { fill: none; stroke: #4f5b66; stroke-width: 1; vector-effect: non-scaling-stroke; }
.ile__axe { fill: none; stroke: #7f8b96; stroke-width: 1.3; vector-effect: non-scaling-stroke; }
/* Le trajet : une chaîne de cases blanches, comme un rang de palettes posé sur la route. */
.ile__trace { fill: none; stroke: var(--pal-txt); stroke-width: 5; stroke-dasharray: 0 9; stroke-linecap: square; vector-effect: non-scaling-stroke; }
.ile__revele { fill: none; stroke: #fff; stroke-width: calc(16px * var(--u, 1)); stroke-dasharray: 1 1; stroke-linecap: round; }
.ile__osm { font: 400 calc(11px * var(--u, 1)) var(--sans); fill: #6f7a85; }
.pt { cursor: pointer; outline: none; }
.pt__cible { fill: transparent; }
.pt__carre { fill: var(--gris); }
.pt--etape .pt__carre { fill: var(--pal-txt); stroke: var(--tableau); stroke-width: 2; vector-effect: non-scaling-stroke; }
.pt__quai { fill: var(--orange); }
.pt__nom {
  font: 600 calc(12.5px * var(--u, 1)) var(--sans); fill: var(--gris);
  paint-order: stroke; stroke: var(--tableau); stroke-width: calc(4px * var(--u, 1)); stroke-linejoin: round;
}
.pt--etape .pt__nom, .pt--quai .pt__nom { fill: var(--pal-txt); }
.pt--sel .pt__nom { fill: #fff; font-weight: 800; text-decoration: underline; }
.pt:focus-visible .pt__cible { stroke: var(--orange); stroke-width: 2; vector-effect: non-scaling-stroke; }
.vignette { display: grid; gap: 6px; margin: 0; }
.vignette img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: 50% 62%; }
.vignette figcaption, .carte-lieu { font-size: 15px; line-height: 1.4; color: var(--pal-txt); }
.vignette__fermer { justify-self: start; font-size: 15px; color: var(--pal-txt); }
.carte-lieu:empty { display: none; }
.carnet { display: grid; gap: 14px; align-content: start; }
.boucles { display: grid; gap: 2px; }
.boucle { display: flex; align-items: center; min-height: 44px; text-align: left; }
.boucle[aria-checked="true"] .fc, .boucle[aria-checked="true"] .fc > span { background: var(--orange); color: var(--tableau); }
@media (hover: hover) { .boucle[aria-checked="false"]:hover .fc > span { color: var(--orange); } }
.chiffres { display: grid; gap: 6px; }
.chiffres div { display: flex; align-items: center; gap: 12px; }
.chiffres dt { font: 600 12.5px/1.2 var(--sans); color: var(--gris); }
.jauge { display: flex; align-items: center; gap: 12px; }
.jauge__cases { display: inline-flex; gap: var(--cg); }
.jauge__case { width: var(--cw); height: var(--ch); border-radius: 2px; background: var(--palette); box-shadow: inset 0 -13px 0 #172029; }
.jauge__case.plein { background: var(--orange); box-shadow: inset 0 -13px 0 #f25f10; }
.jauge__nom { font: 600 12.5px/1.2 var(--sans); color: var(--gris); }
.regle { font-size: 14px; line-height: 1.45; color: var(--pal-txt); }

/* Liste large et vue unique basse : la carte sur 5 colonnes, le carnet à droite ; la photo de la Meule prend la place du carnet. */
@media (min-width: 860px) {
  .page--ile { grid-template-columns: minmax(0, 5fr) minmax(0, 3fr); grid-template-rows: minmax(0, 1fr) auto; column-gap: 24px; height: 100%; padding-top: 6px; }
  .carte { grid-area: 1 / 1; margin: 0; aspect-ratio: auto; min-height: 240px; }
  .carte-lieu { grid-area: 2 / 1; }
  .carnet { grid-area: 1 / 2 / 3 / 3; align-content: center; }
  .vignette { grid-area: 1 / 2 / 3 / 3; align-self: center; }
  .vignette img { aspect-ratio: 4 / 3; object-position: 50% 50%; }
  .page--ile:has(.vignette:not([hidden])) .carnet { visibility: hidden; }
}

/* Grand écran : la carte en haut, le carnet en bandeau dessous ; la photo se pose dans la mer, au nord-est. */
@media (min-width: 1200px) and (min-height: 820px) {
  .page--ile { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; row-gap: 18px; padding-bottom: 16px; }
  .page--ile .carte { grid-area: 1 / 1; }
  .page--ile .carte-lieu { grid-area: 1 / 1; align-self: start; justify-self: end; width: clamp(200px, 27%, 380px); pointer-events: none; }
  .page--ile .vignette { grid-area: 1 / 1; z-index: 2; align-self: start; justify-self: end; width: clamp(200px, 27%, 380px); padding-bottom: 4px; background: var(--tableau); }
  .page--ile .vignette img { outline: 2px solid var(--pal-txt); outline-offset: -2px; }
  .page--ile:has(.vignette:not([hidden])) .carnet { visibility: visible; }
  .page--ile .carnet { grid-area: 2 / 1; grid-template-columns: repeat(3, max-content); justify-content: space-between; align-items: start; column-gap: 24px; }
  .page--ile .jauge { flex-direction: column; align-items: flex-start; gap: 8px; }
  .page--ile .regle { grid-column: 3; grid-row: 1; align-self: end; max-width: 26ch; }
  .page--ile .jauge { grid-column: 3; grid-row: 1; align-self: start; }
}

/* ---------- Tarifs ---------- */
.page--tarifs { position: relative; display: grid; align-content: start; gap: 6px; padding-top: 8px; }
.grille__table { width: 100%; border-collapse: separate; border-spacing: 0 4px; }
.grille__table thead th { font: 600 12.5px/1.2 var(--sans); color: var(--gris); text-align: right; white-space: nowrap; padding: 0 0 2px 12px; }
.grille__table tbody th { text-align: left; font-weight: 400; white-space: nowrap; }
.grille__table td { text-align: right; white-space: nowrap; padding-left: 12px; }
.g-eur { margin-left: 4px; font: 400 22px/1 var(--mono); color: var(--gris); vertical-align: middle; }
/* Téléphone : la grille pivotée tient dans 328 px (360 moins les marges) ; l'unité est dite une fois, en tête. */
.grille__table--tel { border-spacing: 0; table-layout: fixed; }
.grille__table--tel tr > :first-child { width: 28%; }
.grille__table--tel .g-unite { white-space: normal; }
.grille__table--tel thead th { padding: 0 0 8px 6px; white-space: normal; line-height: 1.15; vertical-align: bottom; }
.grille__table--tel .g-unite { font: 600 12.5px/1.15 var(--sans); color: var(--gris); vertical-align: bottom; padding-bottom: 8px; }
.grille__table--tel tbody th { font: 600 14px/1.2 var(--sans); color: var(--pal-txt); padding: 11px 0; border-top: 1px solid #1a2129; }
.grille__table--tel td { font: 400 22px/1 var(--mono); color: var(--pal-txt); padding: 11px 0 11px 6px; border-top: 1px solid #1a2129; }
.grille__table--tel .g-v { display: inline-block; }
.grille__table--tel tr:last-child th, .grille__table--tel tr:last-child td { color: var(--gris); }
/* Écran de 320 px : le libellé de la durée passe sur deux lignes plutôt que de pousser la grille hors de l’écran. */
@media (max-width: 359px) { .grille__table--tel tbody th { white-space: normal; } .grille__table--tel td { padding-left: 4px; } .conditions { --cw: 16px; } }
.legende-tarifs { font-size: 13px; line-height: 1.45; color: var(--gris); }
.compris { display: none; }
@media (min-width: 1200px) and (min-height: 820px) {
  .legende-tarifs { display: none; }
  .compris { display: grid; gap: 4px; align-self: start; margin-top: 10px; }
  .compris li { display: flex; justify-content: space-between; min-height: calc(var(--ch) + 8px); align-items: center; }
}
/* Conditions : un rang de palettes par question, la réponse s'ouvre dessous (téléphone) ou recouvre la grille (tableau). */
.conditions { display: grid; margin-top: 12px; gap: 2px; }
.cond { display: flex; align-items: center; width: 100%; min-height: 44px; text-align: left; color: var(--pal-txt); }
.cond__txt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cond[aria-expanded="true"] .fc, .cond[aria-expanded="true"] .fc > span { background: var(--orange); color: var(--tableau); }
.volet { display: grid; gap: 4px; margin: 2px 0 10px; padding: 12px 14px 4px; background: var(--palette); font-size: 16px; line-height: 1.5; color: var(--pal-txt); }
.volet__titre { display: none; }
.volet__fermer { justify-self: start; color: var(--pal-txt); }
@media (min-width: 860px) {
  .page--tarifs { height: 100%; padding: 0 0 14px; grid-template-rows: auto auto auto 1fr; gap: 4px; }
  .grille__table { border-spacing: 0; }
  .grille__table tbody tr { height: min(var(--rang, 40px), calc(var(--ch) + 24px)); }
  .conditions { align-self: end; grid-template-columns: repeat(2, max-content); justify-content: space-between; column-gap: 24px; margin: 0; }
  .cond { width: auto; min-height: calc(var(--ch) + 16px); }
  .volet {
    position: absolute; left: 0; right: 0; z-index: 3; align-content: center; gap: 14px; margin: 0;
    padding: 0 2px; background: var(--tableau); font-size: 18px;
  }
  .volet[hidden] { display: none; }
  .volet p:not(.volet__titre) { max-width: 44ch; }
  .volet__titre { display: block; }
}
@media (hover: hover) { .cond[aria-expanded="false"]:hover .fc > span { color: var(--orange); } }
