@font-face { font-family: "Archivo Black"; src: url(polices/archivo-black.woff2) format("woff2"); font-display: swap; }

:root {
  --asp-tapenade: #141414;
  --asp-picholine: #1e7a3c;
  --asp-huile-d-or: #f2c230;
  --asp-tomette: #d42a1e;
  --asp-ciel-de-tramontane: #1f3f9e;
  --asp-creme-de-nougat: #f6ecc8;
  --asp-olivier-argente: #7fa98a;
  --asp-miel: #ffb000;
  --asp-suie: #2f2c22;
  --asp-charbon: #1d1c18;
  --asp-nappe: #fffdf5;
  --asp-lait-d-amande: #fbfaf6;
  --asp-papier-jauni: #f3efe4;
  --asp-vitre-de-cabanon: #cfe6f5;

  --asp-encre: var(--asp-tapenade);
  --asp-papier: var(--asp-creme-de-nougat);
  --asp-estompe: #141414b3;
  --asp-filet: #14141433;
  --asp-accent: var(--asp-huile-d-or);
  --asp-marge: 16px;
  --asp-gouttiere: 18px;
  --asp-rayon: 0;
  --asp-corps: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --asp-titre: "Archivo Black", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --asp-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --asp-empattement: "Iowan Old Style", Palatino, Georgia, serif;

  --asp-papier-estompe: #f6ecc8b3;
  --asp-papier-filet: #f6ecc84d;
  --asp-papier-voile: #f6ecc8ee;
  --asp-ombre-legere: #3d3a2e12;
  --asp-ombre-portee: #3d3a2e1f;
  --asp-nuit-de-fenestron: #1d1c18ee;

  --asp-boulegue: 0.25s;
  --asp-coup-de-tampon: 0.35s;
  --asp-pause: 0.5s;
  --asp-sieste: 0.7s;
  --asp-pas-du-promeneur: 0.55s;
  --asp-trot-du-sanglier: 0.3s;
  --asp-battement: 0.42s;
  --asp-brise: 3.6s;
  --asp-fumee: 3.4s;
  --asp-carillon: 0.45s;

  --asp-reperes: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28'%3E%3Cpath d='M14 10v8M10 14h8' stroke='%23f2c230' stroke-width='1.3'/%3E%3C/svg%3E");
}

html:has(> .asp-village), .asp-village { height: 100%; }
body { margin: 0; font: 14px/1.55 var(--asp-corps); color: var(--asp-encre); background: var(--asp-ciel-de-tramontane) var(--asp-reperes) 0 0 / 28px 28px; -webkit-tap-highlight-color: transparent; }
.asp-village { overflow: hidden; touch-action: none; }
/* Le fond passe au rouge dans le hall des jeux et dans chaque jeu. */
.asp-village:has(.asp-panneau-de-jeu:not([hidden])) { background-color: var(--asp-tomette); }
[hidden], .asp-a-la-sieste { display: none !important; }
:focus-visible { outline: 3px solid var(--asp-tomette); outline-offset: 2px; }
.asp-carrefour button:focus-visible, .asp-signature a:focus-visible { outline-color: #fff; }

.asp-reserve-de-symboles { position: absolute; width: 0; height: 0; }

/* Le bandeau : le nom en grotesque, la fiche technique à droite. */
.asp-bandeau { position: fixed; left: 0; right: 0; top: 0; height: 50px; padding: 0 var(--asp-gouttiere) 0 0; display: flex; align-items: center; gap: 12px; pointer-events: none; user-select: none; background: var(--asp-encre); }
.asp-bandeau-rameau { width: 50px; height: 50px; padding: 12px 8px; box-sizing: border-box; background: var(--asp-accent); color: var(--asp-encre); }
.asp-bandeau-nom { font: 400 21px/1 var(--asp-titre); letter-spacing: -0.01em; text-transform: uppercase; color: var(--asp-papier); }
.asp-bandeau-fiche { margin-left: auto; transform: translateY(-8px); color: var(--asp-papier); font: 10px/1 var(--asp-mono); font-style: normal; letter-spacing: 0.08em; }
.asp-bandeau-code-barres { width: 54px; height: 26px; flex: none;
  background: repeating-linear-gradient(90deg, var(--asp-papier) 0 2px, transparent 2px 3px, var(--asp-papier) 3px 4px, transparent 4px 7px, var(--asp-papier) 7px 10px, transparent 10px 12px); }
.asp-signature { position: fixed; right: 84px; top: 30px; margin: 0; font: 10px/1 var(--asp-mono); color: var(--asp-papier-estompe); letter-spacing: 0.04em; }
.asp-signature a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--asp-papier-filet); }

/* Chaque tableau : un panneau crème, bord noir, ombre portée or sans flou. Sa référence est un onglet noir posé sur le bord. */
.asp-panneau, .asp-feuillet { position: relative; background: var(--asp-papier); border: 3px solid var(--asp-encre); box-shadow: 8px 8px 0 var(--asp-accent); }
.asp-panneau { position: fixed; inset: 88px 24px 78px 16px; display: grid; place-items: center; }
.asp-panneau canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.asp-panneau::before, .asp-feuillet::before { content: attr(data-ref); position: absolute; z-index: 3; left: -3px; bottom: 100%; white-space: nowrap;
  padding: 8px 14px 7px; background: var(--asp-encre); color: var(--asp-accent); font: 400 12px/1 var(--asp-titre); letter-spacing: 0.06em; pointer-events: none; }
.asp-panneau::after { content: "N 43.784 / E 7.245 / ALT. ENV. 500 M"; position: absolute; z-index: 3; right: -3px; bottom: 100%;
  padding: 6px 10px 5px; background: var(--asp-encre); color: var(--asp-papier); font: 10px/1 var(--asp-mono); letter-spacing: 0.06em; pointer-events: none; }

/* La navigation : des blocs numérotés, à angle droit. */
.asp-carrefour { counter-reset: tab; position: fixed; left: 0; right: 0; bottom: max(14px, env(safe-area-inset-bottom)); display: flex; flex-wrap: nowrap; justify-content: safe center; gap: 4px;
  overflow-x: auto; touch-action: pan-x; scrollbar-width: none; padding: 0 var(--asp-marge); }
.asp-carrefour::-webkit-scrollbar { display: none; }
.asp-carrefour button { display: inline-flex; align-items: center; flex: none; height: 36px; padding: 0 14px 0 10px; white-space: nowrap; cursor: pointer;
  background: var(--asp-encre); color: var(--asp-papier); border: 0; border-radius: var(--asp-rayon);
  font: 400 11px/1 var(--asp-titre); letter-spacing: 0.06em; text-transform: uppercase; }
.asp-carrefour button::before { counter-increment: tab; content: counter(tab, decimal-leading-zero); margin-right: 9px; font: 10px/1 var(--asp-mono); color: var(--asp-accent); }
.asp-carrefour button:hover { color: var(--asp-accent); }
.asp-carrefour button[aria-pressed="true"], .asp-carrefour button[aria-pressed="true"]:hover { background: var(--asp-accent); color: var(--asp-encre); }
.asp-carrefour button[aria-pressed="true"]::before { color: var(--asp-tomette); }
/* Fondu du côté où du contenu reste caché (data-more posé par le script). */
.asp-carrefour[data-more="right"] { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); }
.asp-carrefour[data-more="left"] { -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to left, #000 calc(100% - 28px), transparent); }
.asp-carrefour[data-more="both"] { -webkit-mask-image: linear-gradient(to right, transparent, #000 28px, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to right, transparent, #000 28px, #000 calc(100% - 28px), transparent); }

.asp-cigale { position: absolute; left: 0; right: 0; bottom: 4px; margin: 0; text-align: center; font: 11px/1.5 var(--asp-mono); color: var(--asp-estompe); pointer-events: none; padding: 0 20px; }
.asp-cigale b { font-weight: 400; color: var(--asp-encre); }

/* Le cabanon : filtres, liste des itinéraires, trace à télécharger. */
.asp-cabanon { position: absolute; left: var(--asp-gouttiere); top: 4px; bottom: 34px; width: min(318px, 46vw); display: flex; flex-direction: column; gap: 9px; pointer-events: none; }
.asp-rangee-d-olives { display: flex; flex-wrap: wrap; gap: 5px; pointer-events: auto; }
.asp-rangee-d-olives.asp-rangee-du-belvedere { position: absolute; left: var(--asp-gouttiere); top: 27%; flex-direction: column; align-items: flex-start; }
.asp-olive { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; border-radius: var(--asp-rayon);
  border: 2px solid var(--asp-encre); background: var(--asp-papier); color: var(--asp-encre); font: 11px/1.2 var(--asp-mono); text-transform: uppercase; padding: 5px 9px 5px 7px; }
.asp-olive:hover { border-color: var(--asp-estompe); }
.asp-olive[aria-pressed="true"] { background: var(--asp-encre); color: var(--asp-papier); border-color: var(--asp-encre); }
.asp-noyau { width: 9px; height: 9px; border-radius: var(--asp-rayon); background: var(--asp-teinte, var(--asp-encre)); flex: none; opacity: 0.35; }
.asp-olive[aria-pressed="true"] .asp-noyau { opacity: 1; }
.asp-ardoise-des-sentiers { margin: 0; padding: 6px 8px; list-style: none; font-size: 13px; overflow-y: auto; touch-action: pan-y; pointer-events: auto; scrollbar-width: thin;
  background: var(--asp-papier); border: 2px solid var(--asp-encre); }
.asp-ardoise-des-sentiers button { font: inherit; display: flex; align-items: center; gap: 8px; width: 100%; padding: 3px 4px 3px 7px; background: none; border: 0; color: var(--asp-encre); cursor: pointer; text-align: left; }
.asp-ruban { width: 18px; height: 4px; flex: none; border-radius: 2px; background: var(--asp-teinte); }
.asp-ardoise-des-sentiers button:hover { background: var(--asp-ombre-legere); }
.asp-ardoise-des-sentiers button[aria-pressed="true"] { background: var(--asp-accent); font-weight: 600; }
.asp-trace-gpx { font: 11px/1.4 var(--asp-mono); text-transform: uppercase; letter-spacing: 0.04em; color: var(--asp-encre); cursor: pointer; pointer-events: auto; align-self: flex-start;
  text-decoration: underline 2px var(--asp-tomette); text-underline-offset: 3px; }
.asp-poignee { display: none; }
.asp-mention-osm { position: absolute; right: 14px; bottom: 26px; margin: 0; font-size: 10px; font-family: var(--asp-mono); color: var(--asp-estompe); }
.asp-mention-osm a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--asp-filet); }
.asp-etiquettes { pointer-events: none; }

/* Le calque posé sur la carte : le tracé révélé et la troupe. */
.asp-calque { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: hidden; }
.asp-trace-revelee { fill: none; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; stroke-dasharray: 1; stroke-dashoffset: 1; }
#asp-trace-ombre { stroke: var(--asp-suie); stroke-width: 8; }
#asp-trace-claire { stroke: var(--asp-miel); stroke-width: 4.6; }
.asp-trace-revelee.asp-se-dessine { animation: asp-dessiner 4s ease-in-out forwards; }
#asp-comete { fill: #fff; stroke: var(--asp-miel); stroke-width: 3; }
@keyframes asp-dessiner { to { stroke-dashoffset: 0; } }

/* La troupe de la carte, en couleurs. Les règles visent les symboles eux-mêmes : c'est là que le navigateur les applique aux instances.
   Ce qui varie d'une instance à l'autre (couleur, cadence, arrêt) descend par héritage : currentColor et variables. */
#asp-promeneurs use, #asp-decor use { filter: drop-shadow(0 0 1px var(--asp-nappe)) drop-shadow(0 0 1px var(--asp-nappe)); }
.asp-marcheur, .asp-vehicule { fill: var(--asp-encre); stroke: var(--asp-encre); stroke-linecap: round; }
.asp-faune { fill: var(--asp-suie); stroke: var(--asp-suie); stroke-linecap: round; }
.asp-faune.asp-volette { stroke: #5a3a10; --asp-cadence: 0.22s; }
.asp-faune.asp-sanglier { fill: #6b4423; stroke: #3a2412; }
.asp-faune.asp-sanglier.asp-au-repos { --asp-trot-en-route: paused; }
.asp-faune.asp-oiseau { stroke: currentColor; }
.asp-faune.asp-plane { --asp-cadence: 2.6s; }
.asp-flore { stroke: #5a3d22; stroke-linecap: round; }
.asp-hameau { fill: #fff6e0; stroke: var(--asp-encre); stroke-width: 0.7; stroke-linejoin: round; }
.asp-hameau.asp-carillonne { --asp-carillon-en-route: running; }
symbol .asp-manteau { fill: currentColor; stroke: currentColor; }
symbol .asp-tete { fill: #f3c9a2; stroke: var(--asp-encre); stroke-width: 0.6; }
symbol .asp-sac { fill: var(--asp-huile-d-or); stroke: var(--asp-encre); }
symbol .asp-casque { fill: var(--asp-huile-d-or); stroke: var(--asp-encre); stroke-width: 0.5; }
symbol .asp-vitre { fill: var(--asp-vitre-de-cabanon); stroke: none; }
symbol .asp-pneu { fill: var(--asp-encre); stroke: none; }
#asp-car .asp-manteau { stroke: var(--asp-encre); }
#asp-walker .asp-patte { transform-origin: 0 -3px; animation: asp-trotter var(--asp-pas-du-promeneur) ease-in-out infinite alternate; }
#asp-boar .asp-patte { transform-origin: 0 -1px; animation: asp-trotter var(--asp-trot-du-sanglier) ease-in-out infinite alternate; animation-play-state: var(--asp-trot-en-route, running); }
symbol .asp-patte.asp-contrepas { animation-direction: alternate-reverse; }
#asp-boar .asp-defense { stroke: var(--asp-nappe); }
#asp-bird .asp-plumage { fill: currentColor; stroke: none; }
symbol .asp-aile { transform-origin: 0 0; animation: asp-battre var(--asp-cadence, var(--asp-battement)) ease-in-out infinite alternate; }
symbol .asp-balancement { transform-origin: 0 3px; animation: asp-se-balancer var(--asp-brise) ease-in-out infinite alternate; }
symbol .asp-feuillage { stroke: none; }
#asp-olive .asp-feuillage { fill: #8fae5d; } #asp-pine .asp-feuillage { fill: #1f6b3a; } #asp-oak .asp-feuillage { fill: #4f9a3a; } #asp-cypress .asp-feuillage { fill: #14532d; }
#asp-mimosa .asp-feuillage { fill: var(--asp-huile-d-or); } #asp-mimosa .asp-coeur { fill: #ffe98a; stroke: none; } #asp-lavender .asp-feuillage { fill: #7a5bc0; }
#asp-flower .asp-feuillage { fill: currentColor; } #asp-flower .asp-coeur { fill: var(--asp-huile-d-or); stroke: none; }
symbol .asp-maison-ocre { fill: #f6d98a; } symbol .asp-maison-rose { fill: #f2b49a; } symbol .asp-maison-claire { fill: #fff6e0; } symbol .asp-toit { fill: var(--asp-tomette); }
symbol .asp-cypres { fill: #14532d; } symbol .asp-fenetre { fill: var(--asp-ciel-de-tramontane); stroke: none; } symbol .asp-colline { fill: #1e7a3c40; stroke: none; }
symbol .asp-fumee-du-four { fill: var(--asp-encre); stroke: none; opacity: 0; animation: asp-fumer var(--asp-fumee) ease-out infinite; }
symbol .asp-fumee-du-four.asp-fumee-tardive { animation-delay: 1.7s; }
/* Quand la cloche sonne, le clocher se balance. */
#asp-hamlet .asp-clocher { transform-origin: 1.5px 2px; animation: asp-carillonner var(--asp-carillon) ease-in-out infinite alternate; animation-play-state: var(--asp-carillon-en-route, paused); }
@keyframes asp-battre { from { transform: scaleY(1); } to { transform: scaleY(-0.55); } }
@keyframes asp-se-balancer { from { transform: rotate(-4deg); } to { transform: rotate(4deg); } }
@keyframes asp-fumer { 0% { opacity: 0.45; transform: translate(0, 0) scale(0.6); } 100% { opacity: 0; transform: translate(3px, -9px) scale(1.5); } }
@keyframes asp-trotter { from { transform: rotate(-24deg); } to { transform: rotate(24deg); } }
@keyframes asp-carillonner { from { transform: rotate(-6deg); } to { transform: rotate(6deg); } }
@media (prefers-reduced-motion: reduce) {
  .asp-trace-revelee.asp-se-dessine { animation: none; stroke-dashoffset: 0; }
  symbol .asp-patte, symbol .asp-aile, symbol .asp-balancement, symbol .asp-fumee-du-four, #asp-hamlet .asp-clocher { animation: none !important; }
}

/* Les tableaux de texte : faits du jour, venir, village. */
.asp-on-dit, .asp-hall, .asp-guichet { box-sizing: border-box; max-height: 100%; overflow-y: auto; touch-action: pan-y; padding: 18px 16px; }
.asp-on-dit { width: min(680px, 90vw); scrollbar-width: thin; }
.asp-on-dit.asp-on-dit-large { width: min(820px, 92vw); }
.asp-on-dit h2, .asp-hall h2, .asp-feuillet h1 { font: 400 30px/1.02 var(--asp-titre); letter-spacing: -0.02em; text-transform: uppercase; color: var(--asp-encre);
  width: fit-content; max-width: 100%; box-sizing: border-box; padding: 8px 0.3em; background: var(--asp-accent); }
.asp-on-dit h2 { margin: 0 0 14px; }
.asp-on-dit h3, .asp-feuillet h2 { margin: 22px 0 6px; font: 400 11px/1.3 var(--asp-titre); letter-spacing: 0.14em; text-transform: uppercase; color: var(--asp-encre); }
.asp-on-dit h3::before, .asp-feuillet h2::before { content: ""; display: inline-block; width: 9px; height: 9px; margin-right: 8px; background: var(--asp-picholine); }
.asp-on-dit dl { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 5px 22px; }
.asp-on-dit dt, .asp-feuillet dt { font: 11px/1.9 var(--asp-mono); text-transform: uppercase; letter-spacing: 0.05em; }
.asp-on-dit dd { margin: 0; }
.asp-on-dit p { margin: 6px 0; }
.asp-on-dit a, .asp-oiseaux-du-mois a, .asp-chapeau a, .asp-feuillet a:not(.asp-retour) { color: inherit; text-decoration: underline 2px var(--asp-accent); text-underline-offset: 3px; }
.asp-on-dit .asp-d-apres { margin-top: 20px; font-size: 11px; font-family: var(--asp-mono); font-style: normal; color: var(--asp-estompe); }
.asp-fil-des-siecles { margin: 0; padding: 0 0 0 2px; list-style: none; border-left: 1px solid var(--asp-encre); }
.asp-fil-des-siecles li { position: relative; padding: 0 0 12px var(--asp-gouttiere); }
.asp-fil-des-siecles li::before { content: ""; position: absolute; left: -6px; top: 0.55em; width: 9px; height: 9px; border-radius: var(--asp-rayon); background: var(--asp-tomette); }
.asp-fil-des-siecles b { margin-right: 10px; font: 12px/1 var(--asp-mono); color: var(--asp-encre); background: var(--asp-accent); padding: 2px 5px; }
.asp-courbe-des-habitants { display: block; width: 100%; height: auto; }
.asp-courbe-des-habitants text { font: 11px var(--asp-mono); fill: var(--asp-estompe); }
.asp-courbe-axe { stroke: #3d3a2e55; fill: none; }
.asp-courbe-aire { fill: #6b744630; stroke: none; }
.asp-courbe-trait { fill: none; stroke: #6b7446; stroke-width: 2; stroke-linejoin: round; }
.asp-courbe-point { fill: #b5573a; }
.asp-vitrine { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.asp-vitrine button { padding: 0; border: 0; background: none; cursor: zoom-in; aspect-ratio: 4 / 3; overflow: hidden; box-sizing: border-box; }
.asp-vitrine img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform var(--asp-pause) ease; }
.asp-vitrine button:hover img { transform: scale(1.06); }
.asp-fenestron { position: fixed; inset: 0; z-index: 5; display: grid; place-items: center; align-content: center; gap: 10px; background: var(--asp-nuit-de-fenestron); color: var(--asp-papier-jauni); cursor: zoom-out; padding: 20px; }
.asp-fenestron img { width: auto; height: auto; max-width: 92vw; max-height: 78vh; display: block; }
.asp-fenestron p { margin: 0; max-width: 760px; text-align: center; font-size: 13px; }
.asp-fenestron a { color: inherit; }

/* Le hall des jeux : des cases numérotées. */
.asp-hall { width: min(760px, 92vw); }
.asp-hall h2 { margin: 0 0 18px; }
.asp-casiers { counter-reset: game; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.asp-casiers button { font: inherit; text-align: left; position: relative; background: var(--asp-papier); color: var(--asp-encre); border: 3px solid var(--asp-encre); padding: 34px 16px 16px; cursor: pointer; }
.asp-casiers button::before { counter-increment: game; content: "08." counter(game); position: absolute; left: 0; top: 0; padding: 5px 8px 4px; background: var(--asp-encre); color: var(--asp-accent); font: 10px/1 var(--asp-mono); }
.asp-casiers button:hover { background: var(--asp-accent); }
.asp-casiers b { display: block; font: 400 17px/1.05 var(--asp-titre); letter-spacing: -0.01em; text-transform: uppercase; margin-bottom: 8px; }
.asp-casiers span { color: var(--asp-encre); font: 11px/1.5 var(--asp-mono); }
.asp-hall.asp-oiseaux-du-mois { width: min(560px, 90vw); }
.asp-oiseaux-du-mois .asp-d-apres { font: 11px/1.5 var(--asp-mono); color: var(--asp-estompe); margin-top: 18px; }

/* Les jeux. */
.asp-devinette { position: absolute; left: 24px; top: 10px; width: min(300px, 80vw); background: var(--asp-papier-voile); padding: 10px 12px; border: 2px solid var(--asp-encre);
  max-height: calc(100% - 20px); overflow-y: auto; box-sizing: border-box; }
.asp-devinette p { margin: 0 0 8px; }
.asp-devinette input { width: 100%; accent-color: var(--asp-tomette); }
.asp-devinette button, .asp-guichet button, .asp-oiseaux-du-mois > button, .asp-retour { font: 400 11px/1 var(--asp-titre); letter-spacing: 0.08em; text-transform: uppercase;
  padding: 10px 18px 9px; background: var(--asp-encre); color: var(--asp-papier); border: 0; border-radius: var(--asp-rayon); cursor: pointer; text-decoration: none; }
.asp-devinette button:hover, .asp-guichet button:hover, .asp-retour:hover { background: var(--asp-tomette); color: var(--asp-papier); }
.asp-choix { display: grid; gap: 6px; margin: 10px 0; }
.asp-devinette .asp-choix button, .asp-choix button { text-align: left; padding: 9px 12px; background: var(--asp-papier); color: var(--asp-encre); border: 2px solid var(--asp-encre); border-radius: var(--asp-rayon); cursor: pointer;
  font: 13px/1.2 var(--asp-corps); letter-spacing: 0; text-transform: none; }
.asp-choix button:hover { background: var(--asp-accent); color: var(--asp-encre); }
.asp-choix button.asp-juste, .asp-choix button.asp-juste:hover { background: var(--asp-picholine); color: var(--asp-papier); }
.asp-choix button.asp-rate, .asp-choix button.asp-rate:hover { background: var(--asp-tomette); color: var(--asp-papier); }

/* Le panneau d'entrée, et sa barre de sortie. */
.asp-parvis { max-height: 100%; overflow-y: auto; touch-action: pan-y; box-sizing: border-box; padding: 12px 0; width: 100%; }
.asp-enseigne { position: relative; padding: 0.32em 0.9em 0.26em; background: #fff; border: 0.14em solid var(--asp-tomette); border-radius: 0.2em;
  font: 400 clamp(30px, 8.5vw, 104px)/1 var(--asp-titre); letter-spacing: 0; color: var(--asp-charbon); overflow: hidden; cursor: pointer;
  width: fit-content; max-width: 100%; margin-inline: auto; }
.asp-enseigne::after { content: ""; position: absolute; left: -10%; right: -10%; top: 50%; height: 0.16em; margin-top: -0.08em; background: var(--asp-tomette);
  transform: rotate(-17deg) scaleX(0); transition: transform var(--asp-coup-de-tampon) ease; }
.asp-enseigne.asp-barree::after { transform: rotate(-17deg) scaleX(1); }
.asp-sous-enseigne { margin: 22px 0 0; text-align: center; color: var(--asp-estompe); font: 11px/1.5 var(--asp-mono); letter-spacing: 0.04em; }
.asp-chapeau { max-width: 560px; margin: 14px auto 0; padding: 0 20px; text-align: center; font-size: 14px; font-weight: 400; }
h1.asp-chapeau { margin-top: 26px; font: 400 22px/1.1 var(--asp-titre); letter-spacing: -0.01em; text-transform: uppercase; color: var(--asp-encre); }
.asp-chapeau.asp-chapeau-discret { font-size: 12px; color: var(--asp-estompe); }

/* La carte postale. */
.asp-carte-postale { position: relative; width: min(620px, 88vw); aspect-ratio: 3 / 2; perspective: 1400px; cursor: pointer; }
.asp-carte-postale > div { position: absolute; inset: 0; background: var(--asp-lait-d-amande); border: 1px solid var(--asp-filet); box-shadow: 0 10px 30px var(--asp-ombre-portee);
  backface-visibility: hidden; transition: transform var(--asp-sieste) ease; }
.asp-carte-postale .asp-verso { transform: rotateY(180deg); display: grid; grid-template-columns: 1fr 1fr; }
.asp-carte-postale.asp-retournee .asp-recto { transform: rotateY(-180deg); }
.asp-carte-postale.asp-retournee .asp-verso { transform: rotateY(0deg); }
.asp-carte-postale .asp-recto p { position: absolute; left: 14px; bottom: 9px; margin: 0; font-size: 12px; font-style: italic; color: var(--asp-estompe); }
.asp-verso textarea { margin: 18px 12px 18px 18px; border: 0; border-right: 1px solid var(--asp-filet); padding: 0 12px 0 0; resize: none; background: none; outline: none;
  font: italic 15px/1.9 var(--asp-empattement); color: var(--asp-encre); }
.asp-verso .asp-verso-droit { position: relative; padding: var(--asp-gouttiere); }
.asp-timbre { position: absolute; right: var(--asp-gouttiere); top: var(--asp-gouttiere); width: 64px; height: 78px; border: 1px dashed var(--asp-estompe); display: grid; place-items: center; color: var(--asp-picholine); font-size: 10px; }
.asp-timbre svg { width: 50px; height: 25px; }
.asp-tampon-de-la-mairie { position: absolute; right: 58px; top: 44px; width: 86px; height: 86px; border: 1.5px solid var(--asp-estompe); border-radius: 50%; display: grid; place-items: center; text-align: center;
  font: 9px/1.3 var(--asp-corps); letter-spacing: 0.1em; color: var(--asp-estompe); transform: rotate(-14deg); }
.asp-adresse { position: absolute; left: var(--asp-gouttiere); right: var(--asp-gouttiere); bottom: 22px; }
.asp-adresse span { display: block; border-bottom: 1px solid var(--asp-filet); padding: 5px 0 2px; font-style: italic; min-height: 1.3em; }

/* La mairie annexe. */
.asp-guichet { width: min(430px, 88vw); text-align: center; }
.asp-afficheur { margin: 0 auto 14px; padding: 10px 0 6px; border: 3px solid var(--asp-encre); }
.asp-afficheur small { display: block; font-size: 11px; font-family: var(--asp-mono); letter-spacing: 0.22em; text-transform: uppercase; color: var(--asp-estompe); }
.asp-afficheur output { display: block; font: 400 64px/1.1 var(--asp-titre); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.asp-guichet ul { margin: 18px 0 0; padding: 0; list-style: none; text-align: left; font-size: 13px; color: var(--asp-estompe); }
.asp-guichet li { padding: 4px 0 4px 20px; position: relative; }
.asp-guichet li::before { content: ""; position: absolute; left: 2px; top: 0.7em; width: 7px; height: 7px; border-radius: var(--asp-rayon); background: var(--asp-picholine); }
.asp-horaires { margin: 14px 0 0; font-size: 11px; font-family: var(--asp-mono); font-style: normal; color: var(--asp-estompe); }

@media (pointer: coarse) { .asp-carrefour button { height: 44px; } .asp-panneau { bottom: 88px; } }
@media (max-width: 640px) {
  .asp-bandeau-fiche, .asp-bandeau-code-barres, .asp-panneau::after { display: none; }
  .asp-bandeau { height: 44px; }
  .asp-bandeau-rameau { width: 44px; height: 44px; padding: 11px 7px; }
  .asp-bandeau-nom { font-size: 18px; }
  /* Le crédit descend dans la rangée entre l'en-tête et le panneau ; l'onglet se tronque pour ne pas le heurter. */
  .asp-signature { right: var(--asp-marge); top: 46px; color: var(--asp-papier); }
  .asp-signature-prefixe { display: none; }
  .asp-panneau::before { font-size: 10px; padding: 6px 10px 5px; box-sizing: border-box; max-width: 56%; overflow: hidden; text-overflow: ellipsis; }
  .asp-panneau { left: 8px; right: 14px; top: 78px; box-shadow: 5px 5px 0 var(--asp-accent); }
  .asp-on-dit h2, .asp-hall h2 { font-size: 23px; }
  .asp-on-dit, .asp-hall, .asp-guichet { padding: 14px 12px; }
  /* La nav : une grille de quatre colonnes sur deux rangées, tout visible, rien ne défile. */
  .asp-carrefour, .asp-carrefour[data-more] { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; padding: 0 10px; overflow: visible; bottom: max(10px, env(safe-area-inset-bottom)); -webkit-mask-image: none; mask-image: none; }
  .asp-carrefour button { display: block; height: 34px; line-height: 34px; padding: 0 4px; min-width: 0; text-align: center; font-size: 9.5px; letter-spacing: 0; overflow: hidden; text-overflow: ellipsis; }
  .asp-carrefour button::before { display: none; }
  .asp-panneau { bottom: 92px; }
}
@media (max-width: 480px) {
  .asp-on-dit dl { grid-template-columns: 1fr; gap: 2px 0; }
  .asp-on-dit dd { margin-bottom: 10px; }
}
/* Les sentiers et le panorama, sur téléphone (portrait ou paysage) : filtres en une rangée défilante, liste en tiroir bas. */
@media (max-width: 640px), (max-height: 480px) {
  .asp-cabanon { left: 6px; right: 6px; top: 4px; bottom: 56px; width: auto; justify-content: flex-start; gap: 8px; }
  .asp-rangee-d-olives:not(.asp-rangee-du-belvedere) { flex-wrap: nowrap; overflow-x: auto; touch-action: pan-x; scrollbar-width: none; }
  .asp-rangee-d-olives:not(.asp-rangee-du-belvedere)::-webkit-scrollbar { display: none; }
  .asp-olive { flex: none; min-height: 32px; }
  .asp-trace-gpx { margin-top: auto; }
  /* La liste des itinéraires est un tiroir replié : fermé, seul le bouton de repli reste, avec l'itinéraire choisi. */
  .asp-poignee { display: block; pointer-events: auto; width: 100%; text-align: left; padding: 8px 10px; background: var(--asp-encre); color: var(--asp-papier); border: 0; cursor: pointer;
    font: 400 11px/1.2 var(--asp-titre); letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .asp-poignee::after { content: " \25B4"; color: var(--asp-accent); }
  .asp-cabanon.asp-ouvert .asp-poignee::after { content: " \25BE"; }
  .asp-ardoise-des-sentiers { max-height: 0; padding: 0 8px; border-width: 0; overflow: hidden; transition: max-height var(--asp-boulegue) ease; }
  .asp-cabanon.asp-ouvert .asp-ardoise-des-sentiers { max-height: 45%; padding: 6px 8px; border-width: 2px; overflow-y: auto; }
  .asp-cabanon:not(.asp-ouvert) .asp-trace-gpx { margin-top: auto; }
  .asp-ardoise-des-sentiers button { min-height: 32px; }
  .asp-rangee-d-olives.asp-rangee-du-belvedere { left: 8px; top: auto; bottom: 112px; }
  .asp-devinette { left: 8px; top: 8px; width: min(280px, calc(100% - 40px)); }
  .asp-mention-osm { right: 8px; }
  #sentiers .asp-cigale { bottom: 2px; font-size: 10px; line-height: 1.4; padding: 0 10px; }
  /* La mention OSM quitte le bas, que la note occupe, pour le haut à droite sous les filtres. */
  .asp-mention-osm { top: 40px; bottom: auto; right: 10px; }
  /* Panorama : la légende prend une bande à elle sous le canevas, le bandeau des caps reste lisible. */
  #panorama canvas { height: calc(100% - 54px); }
  #panorama .asp-cigale { bottom: 0; height: 54px; box-sizing: border-box; overflow: hidden; padding: 5px 10px; background: var(--asp-papier); border-top: 1px solid var(--asp-encre); font-size: 10px; line-height: 1.4; }
}
/* Hauteur courte (téléphone en paysage) : tout se resserre. Placé après pointer: coarse, il l'emporte (même spécificité, ordre). */
@media (max-height: 480px) {
  .asp-bandeau { height: 36px; }
  .asp-bandeau-rameau { width: 36px; height: 36px; padding: 8px 6px; }
  .asp-bandeau-nom { font-size: 15px; }
  .asp-bandeau-fiche, .asp-bandeau-code-barres, .asp-panneau::after { display: none; }
  .asp-panneau::before { font-size: 10px; padding: 5px 10px 4px; }
  .asp-panneau { top: 60px; bottom: 50px; left: 10px; right: 14px; box-shadow: 5px 5px 0 var(--asp-accent); }
  .asp-carrefour, .asp-carrefour[data-more] { display: grid; grid-template-columns: repeat(8, 1fr); gap: 3px; padding: 0 10px; overflow: visible; bottom: 6px; -webkit-mask-image: none; mask-image: none; }
  .asp-carrefour button { display: block; height: 30px; line-height: 30px; padding: 0 4px; min-width: 0; text-align: center; font-size: 9.5px; letter-spacing: 0; overflow: hidden; text-overflow: ellipsis; }
  .asp-carrefour button::before { display: none; }
  .asp-panneau { bottom: 44px; }
  .asp-signature { top: 40px; right: var(--asp-marge); color: var(--asp-papier); }
  .asp-signature-prefixe { display: none; }
  .asp-enseigne { font-size: clamp(26px, min(8.5vw, 11vh), 104px); }
  .asp-carte-postale { width: min(620px, 88vw, calc(1.5 * (100vh - 150px))); }
}
/* Petit téléphone : les libellés de la nav passent sur deux lignes plutôt que d'être coupés. */
@media (max-width: 380px) {
  .asp-carrefour button { display: flex; align-items: center; justify-content: center; height: 36px; line-height: 1.1; padding: 0 3px; font-size: 9px; white-space: normal; }
  .asp-panneau { bottom: 96px; }
}
/* Tablette et fenêtre moyenne : la nav tient sur une rangée de huit colonnes égales. */
@media (min-width: 641px) and (max-width: 1100px) and (min-height: 481px) {
  .asp-carrefour, .asp-carrefour[data-more] { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; padding: 0 12px; overflow: visible; -webkit-mask-image: none; mask-image: none; }
  .asp-carrefour button { display: block; line-height: 36px; padding: 0 6px; min-width: 0; text-align: center; font-size: 9.5px; letter-spacing: 0; overflow: hidden; text-overflow: ellipsis; }
  .asp-carrefour button::before { display: none; }
}
@media (max-width: 640px) and (max-height: 480px) {
  .asp-carrefour, .asp-carrefour[data-more] { grid-template-columns: repeat(4, 1fr); }
  .asp-panneau { bottom: 76px; }
}

/* Le surlignage d'une ancre : un fond, jamais une barre. */
.asp-cueillie, dt.asp-cueillie + dd, .asp-casiers button.asp-cueillie, .asp-ardoise-des-sentiers li.asp-cueillie button { background: var(--asp-accent); }
.asp-on-dit h2.asp-cueillie, .asp-hall h2.asp-cueillie, .asp-feuillet h1.asp-cueillie { background: var(--asp-tomette); color: var(--asp-papier); }
.asp-vitrine button.asp-cueillie { padding: 4px; }
#panorama canvas { cursor: grab; }
#panorama canvas.asp-main-tendue { cursor: pointer; }

/* Texte présent pour la lecture sans image, aux moteurs de recherche et aux lecteurs d'écran, sans prendre de place à l'écran. */
.asp-murmure { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
