/* L'interface de la visite du Chalet du Parc, dans la DA de chaletduparc.fr (toile « Interface de la
   visite », 15/10/2026) : crème, encre, vert canard et vert citron ; filets noirs de 2 px, angles droits,
   petit carré noir au coin des boutons ; titres en capitales très condensées, chiffres en mono ; le logo
   dans son carré, une volée de petits carrés dessous. Polices du site : Nan Holo Compressed (titres),
   Narrow (texte) et Mono (chiffres), sous licence du Chalet (polices/, les fichiers woff2 du site) ; tant
   qu'elles manquent, les plus proches que l'appareil a déjà. Des libellés, aucune phrase. */

@font-face { font-family: "nanholocompressed"; font-weight: 700; font-style: normal; font-display: swap; src: url("polices/nanholocompressed-bold.woff2") format("woff2"); }
@font-face { font-family: "nanholonarrow"; font-weight: 400; font-style: normal; font-display: swap; src: url("polices/nanholonarrow-regular.woff2") format("woff2"); }
@font-face { font-family: "nanholonarrow"; font-weight: 500; font-style: normal; font-display: swap; src: url("polices/nanholonarrow-medium.woff2") format("woff2"); }
@font-face { font-family: "nanholonarrow"; font-weight: 700; font-style: normal; font-display: swap; src: url("polices/nanholonarrow-bold.woff2") format("woff2"); }
@font-face { font-family: "nanholomono"; font-weight: 400; font-style: normal; font-display: swap; src: url("polices/nanholomono-regular.woff2") format("woff2"); }
@font-face { font-family: "nanholomono"; font-weight: 500; font-style: normal; font-display: swap; src: url("polices/nanholomono-medium.woff2") format("woff2"); }

:root {
	--creme: #fbfbf0;
	--creme-2: #eeeee0;
	--encre: #010101;
	--encre-douce: rgba(1, 1, 1, 0.55);
	--canard: #014d4a;
	--citron: #cdff3c;
	--citron-voile: rgba(205, 255, 60, 0.35);
	--titre: "nanholocompressed", "DIN Condensed", "Avenir Next Condensed", "Arial Narrow", "sans-serif-condensed", sans-serif;
	--texte: "nanholonarrow", "Avenir Next Condensed", "Arial Narrow", "sans-serif-condensed", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
	--mono: "nanholomono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
	--filet: 2px solid var(--encre);
	/* Nan Holo met ses capitales 0,05 em sous le milieu de la ligne (haut des capitales 0,70 em, hampe
	   1,00 + 0,20 em) : 0,1 em de plus en bas les recentre dans leur case (0,12 pour le Mono). */
	--rehausse: 0.1em;
	--cible: 52px;
	--marge: 24px;
	--logo: 80px;
	/* Clair seulement : la scène reste claire quel que soit le réglage du système. */
	color-scheme: light;
}

* { box-sizing: border-box; }

html, body {
	margin: 0;
	height: 100%;
	overflow: hidden;
	background: var(--creme);
	color: var(--encre);
	font-family: var(--texte);
	font-size: 17px;
	-webkit-font-smoothing: antialiased;
	-webkit-tap-highlight-color: transparent;
	-webkit-user-select: none;
	user-select: none;
	overscroll-behavior: none;
}

button {
	font: inherit;
	color: inherit;
	margin: 0;
	cursor: pointer;
}

[hidden] { display: none !important; }

svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: square; stroke-linejoin: miter; }

:focus-visible {
	outline: 2px solid var(--canard);
	outline-offset: 2px;
}

/* ── La scène et ce qui flotte dessus ─────────────────────────────────── */

#scene {
	position: fixed;
	inset: 0;
	touch-action: none;
}

#etiquettes {
	position: fixed;
	inset: 0;
	pointer-events: none;
	overflow: hidden;
}

/* Noms des pièces : pastilles crème à filet noir ; un carré vert citron pour les espaces privatisables. */
.etiquette {
	position: absolute;
	left: 0;
	top: 0;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: calc(6px - 0.05em) 14px calc(6px + 0.05em) 10px;
	border: var(--filet);
	border-radius: 999px;
	background: var(--creme);
	color: var(--encre);
	font-family: var(--texte);
	font-size: 16px;
	font-weight: 500;
	line-height: 1;
	white-space: nowrap;
	will-change: transform;
	transition: opacity 0.2s ease;
}

.etiquette::before {
	content: "";
	flex: 0 0 auto;
	width: 7px;
	height: 7px;
	background: var(--encre);
}

.etiquette.privatisable::before {
	width: 11px;
	height: 11px;
	border: 1.5px solid var(--encre);
	background: var(--citron);
}

.etiquette.cachee { opacity: 0; }

/* Croix fine, centre ouvert (on voit ce qu'on vise), crème liserée d'encre : lisible sur un mur clair
   comme sur le parc. Le carré citron d'avant faisait « gros point » (l'utilisateur, 15/10). */
#viseur {
	position: fixed;
	left: 50%;
	top: 50%;
	width: 22px;
	height: 22px;
	margin: -11px 0 0 -11px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 22'%3E%3Cpath d='M11 2.5v5M11 14.5v5M2.5 11h5M14.5 11h5' stroke='%23010101' stroke-width='3.5' stroke-linecap='round'/%3E%3Cpath d='M11 2.5v5M11 14.5v5M2.5 11h5M14.5 11h5' stroke='%23fbfbf0' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") center / 22px 22px no-repeat;
	pointer-events: none;
}

/* ── Le cadre des commandes ───────────────────────────────────────────── */

#interface {
	position: fixed;
	inset: 0;
	pointer-events: none;   /* la scène reçoit tout ce qui n'est pas un bouton */
}

.haut,
.bas {
	position: absolute;
	left: 0;
	right: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	padding-left: max(var(--marge), env(safe-area-inset-left));
	padding-right: max(var(--marge), env(safe-area-inset-right));
}

.haut {
	top: 0;
	padding-top: max(var(--marge), env(safe-area-inset-top));
	align-items: flex-start;
	justify-content: space-between;
}

.bas {
	bottom: 0;
	padding-bottom: max(var(--marge), env(safe-area-inset-bottom));
	align-items: flex-end;
	justify-content: space-between;
}

.haut > *,
.bas > * { pointer-events: auto; }

/* Le logo dans son carré, le mode accolé, une volée de petits carrés dessous (comme l'en-tête du site). */
.tete {
	position: relative;
	display: flex;
	align-items: flex-start;
}

.nom-lieu {
	width: var(--logo);
	height: var(--logo);
	border: var(--filet);
	background: var(--creme);
	display: flex;
	align-items: center;
	justify-content: center;
}

.marque { display: flex; align-items: center; }

.logo {
	display: block;
	height: calc(var(--logo) * 0.62);
	width: auto;
}

/* Le logo mène au site du Chalet du Parc : au survol la case passe au vert canard et les lettres au citron ; au clic,
   un petit rebond avant de partir (principal.js). */
.filtres { position: absolute; width: 0; height: 0; overflow: hidden; }
a.nom-lieu { color: inherit; text-decoration: none; cursor: pointer; transition: background-color 0.18s ease; }
a.nom-lieu:focus-visible { outline: 3px solid var(--citron); outline-offset: 2px; }
a.nom-lieu:focus-visible,
a.nom-lieu.rebond { background: var(--canard); }
a.nom-lieu:focus-visible .logo,
a.nom-lieu.rebond .logo { filter: url(#logo-citron); }
a.nom-lieu.rebond { animation: rebond-logo 0.42s cubic-bezier(0.3, 1.6, 0.5, 1); transition: none; }

@keyframes rebond-logo {
	0% { transform: scale(1); }
	30% { transform: scale(0.88); }
	65% { transform: scale(1.06); }
	100% { transform: scale(1); }
}

@media (hover: hover) {
	a.nom-lieu:hover { background: var(--canard); }
	a.nom-lieu:hover .logo { filter: url(#logo-citron); }
}

@media (prefers-reduced-motion: reduce) {
	a.nom-lieu.rebond { animation: none; }
}

.damier {
	position: absolute;
	left: 0;
	top: calc(var(--logo) - 2px);
	pointer-events: none;
}

.tete .damier { --c: calc(var(--logo) * 0.35); }

.damier i {
	position: absolute;
	width: var(--c);
	height: var(--c);
	border: var(--filet);
	background: var(--creme);
}

.damier i:nth-child(2) { left: calc(var(--c) - 2px); background: var(--citron); }
.damier i:nth-child(3) { left: calc(var(--c) - 2px); top: calc(var(--c) - 2px); }
.damier i:nth-child(4) { left: calc(2 * var(--c) - 4px); top: calc(var(--c) - 2px); background: var(--canard); }

/* ── Cases jointes : le mode, les niveaux ─────────────────────────────── */

.segments {
	display: flex;
	border: var(--filet);
	background: var(--creme);
}

.segments.mode {
	height: var(--logo);
	border-left: 0;
}

.segments button {
	min-height: var(--cible);
	padding: 0 24px var(--rehausse);
	border: 0;
	background: transparent;
	color: var(--encre-douce);
	font-family: var(--titre);
	font-weight: 700;
	font-size: 28px;
	line-height: 1;
	letter-spacing: 0.01em;
	text-transform: uppercase;
	white-space: nowrap;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.segments button + button { border-left: var(--filet); }

.segments.mode button {
	min-width: calc(var(--logo) * 1.9);
	font-size: calc(var(--logo) * 0.4);
}

.segments button[aria-checked="true"] {
	background: var(--canard);
	color: var(--citron);
}

@media (hover: hover) {
	.segments button:hover:not([aria-checked="true"]) { background: var(--creme-2); color: var(--encre); }
}

#barre-maquette { margin: 0 auto; flex-wrap: wrap; }
#barre-maquette button { min-height: 60px; }

/* ── Boutons : rectangle à filet noir, petit carré noir au coin ───────── */

.bouton {
	position: relative;
	min-height: var(--cible);
	padding: 0 20px var(--rehausse);
	border: var(--filet);
	border-radius: 0;
	background: var(--creme);
	color: var(--encre);
	font-family: var(--texte);
	font-weight: 500;
	font-size: 19px;
	white-space: nowrap;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	transition: background-color 0.15s ease;
}

.bouton::before {
	content: "";
	position: absolute;
	left: -12px;
	bottom: -2px;
	width: 10px;
	height: 10px;
	background: var(--encre);
}

.droite .bouton::after {
	content: "";
	width: 7px;
	height: 7px;
	margin-left: -2px;
	border-top: 2.5px solid currentColor;
	border-right: 2.5px solid currentColor;
	transform: rotate(45deg);
	flex: 0 0 auto;
}

.bouton[aria-pressed="true"],
.bouton.actif { background: var(--citron); }
.bouton:disabled { opacity: 0.35; cursor: default; }

@media (hover: hover) {
	.bouton:hover:not(:disabled):not([aria-pressed="true"]):not(.actif) { background: var(--citron-voile); }
}

/* Les boutons restent sur la bande du logo : côte à côte s'il y a la place, sinon l'un sous l'autre, à
   droite, de même largeur ; jamais à la ligne sous le logo (ils flottaient sur la maquette, 15/10). */
.haut { flex-wrap: nowrap; }

.haut > .droite {
	display: flex;
	justify-content: flex-end;
	gap: 24px;
	margin-left: auto;
	padding-left: 12px;
}

#cloisons .libelle-court,
#mobilier .libelle-court { display: none; }

/* Les deux libellés d'action l'un sur l'autre : le bouton garde la largeur du plus long. */
.libelle-long { display: inline-grid; }
.libelle-long > span { grid-area: 1 / 1; }
.bouton.actif .si-non,
.bouton:not(.actif) .si-oui { visibility: hidden; }

@media (max-width: 959px) {
	.haut > .droite { flex-direction: column; align-items: stretch; gap: 12px; }
	.haut > .droite .bouton { justify-content: space-between; }
}

@media (max-width: 719px) {
	#cloisons .libelle-long,
	#mobilier .libelle-long { display: none; }
	#cloisons .libelle-court,
	#mobilier .libelle-court { display: inline; }
}

/* ── Le parcours : visite, point précédent, point, point suivant, lecture ── */

.parcours-barre {
	position: relative;
	display: flex;
	height: 64px;
	margin-left: auto;
	max-width: 100%;
	border: var(--filet);
	background: var(--creme);
}

.menu {
	position: relative;
	display: flex;
	min-width: 0;
}

.case {
	min-height: var(--cible);
	padding: 0 18px var(--rehausse);
	border: 0;
	border-right: var(--filet);
	background: transparent;
	color: var(--encre);
	font-family: var(--texte);
	font-weight: 500;
	font-size: 20px;
	white-space: nowrap;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	transition: background-color 0.15s ease;
}

.parcours-barre > .case:last-child { border-right: 0; }

.case.fleche { width: 60px; padding: 0; flex: 0 0 auto; }
.case.lecture { width: 64px; padding: 0; flex: 0 0 auto; background: var(--citron); }
.case:disabled { color: rgba(1, 1, 1, 0.25); cursor: default; }

@media (hover: hover) {
	.case:hover:not(:disabled):not(.lecture) { background: var(--creme-2); }
}

.titre-case {
	font-family: var(--titre);
	font-weight: 700;
	font-size: 30px;
	line-height: 1;
	letter-spacing: 0.01em;
	text-transform: uppercase;
}

.choix::after {
	content: "";
	width: 8px;
	height: 8px;
	margin: -5px 0 0 2px;
	border-right: 2.5px solid currentColor;
	border-bottom: 2.5px solid currentColor;
	transform: rotate(45deg);
	flex: 0 0 auto;
}

/* Une seule visite : son nom reste écrit, mais ce n'est plus un menu. */
.choix.seule { cursor: default; }
.choix.seule::after { display: none; }
.choix.seule:disabled { color: var(--encre); }

/* Largeurs fixes : la barre ne change plus de taille d'un point ni d'une visite à l'autre (« ‹ » ne
   restait pas sous le doigt) ; un nom trop long pour la case finit en ellipse. */
@media (min-width: 641px) {
	.menu-visite { flex: none; }
	#visite-courante { min-width: 190px; }
	/* une largeur et non une base : la largeur propre de la barre ne dépend plus du nom du point */
	.menu-point { flex: 0 1 auto; width: 380px; min-width: 250px; }
	.point { width: 100%; min-width: 0; }
}

/* De 641 à 760 px, la barre tient sur sa ligne : la case du point se resserre. */
@media (min-width: 641px) and (max-width: 760px) {
	#visite-courante { min-width: 160px; }
	.menu-point { min-width: 0; }
}

.numero {
	flex: 0 0 auto;
	font-family: var(--mono);
	font-size: 14px;
	font-weight: 400;
	color: var(--encre-douce);
	font-variant-numeric: tabular-nums;
}

/* numéro et nom dans une seule ligne de texte : même ligne de base */
.point-texte {
	flex: 1 1 auto;
	min-width: 0;
	text-align: left;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.point-texte .numero { margin-right: 12px; }

#lecture svg { fill: currentColor; stroke: none; }
#lecture .icone-pause { display: none; }
#lecture.actif .icone-lecture { display: none; }
#lecture.actif .icone-pause { display: inline; }

/* Listes qui s'ouvrent au-dessus de la barre */
.liste {
	position: absolute;
	bottom: calc(100% + 10px);
	left: -2px;
	min-width: 300px;
	max-height: min(60vh, 440px);
	overflow-y: auto;
	margin: 0;
	padding: 0;
	list-style: none;
	border: var(--filet);
	background: var(--creme);
	scrollbar-width: thin;
	scrollbar-color: var(--encre) transparent;
}

/* Les points s'ouvrent du côté droit de leur case, assez larges pour la ligne la plus longue. */
@media (min-width: 641px) {
	#liste-points { min-width: 380px; left: auto; right: -2px; }
}

/* numéro (Mono) et nom (Narrow) sur la même ligne de base, la ligne centrée dans la case : align-content ne centre
   que dans un conteneur à plusieurs lignes (wrap) ; le nom part d'une largeur nulle, il ne passe donc jamais à la
   ligne et finit en points de suspension (avec nowrap, la ligne restait collée en haut : n° 43 du 16/10) */
.liste li {
	min-height: 48px;
	padding: 0 16px 0.05em;
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	align-content: center;
	gap: 12px;
	border-bottom: 1px solid rgba(1, 1, 1, 0.14);
	font-size: 18px;
	font-weight: 500;
	white-space: nowrap;
	cursor: pointer;
}

.liste li:last-child { border-bottom: 0; }
.liste li[aria-selected="true"] { background: var(--canard); color: var(--creme); font-weight: 700; }
.liste li[aria-selected="true"] .numero { color: var(--citron); }
.liste li:focus-visible { outline-offset: -4px; }

@media (hover: hover) {
	.liste li:hover:not([aria-selected="true"]) { background: var(--creme-2); }
}

.liste .numero { min-width: 22px; }

.liste .nom-liste {
	flex: 1 1 0;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
}

.liste .niveau-liste {
	flex: none;
	margin-left: auto;
	padding-left: 0;
	font-family: var(--mono);
	font-size: 12px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--encre-douce);
}

.liste li[aria-selected="true"] .niveau-liste { color: rgba(251, 251, 240, 0.7); }

/* ── Le lieu où l'on se tient, et la fiche d'un espace privatisable ──── */

/* À la mesure du nom ; avec la fiche d'un espace privatisable, la largeur de la toile (460 px). */
.lieu {
	width: fit-content;
	min-width: min(280px, 100%);
	max-width: 100%;
	padding: 20px 24px 24px;
	border: var(--filet);
	background: var(--canard);
	color: var(--creme);
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.lieu:has(> .espace:not([hidden])) { width: 460px; }

.lieu-texte {
	display: flex;
	flex-direction: column;
	gap: 12px;
	min-width: 0;
}

.lieu .niveau {
	display: flex;
	align-items: center;
	gap: 10px;
	font-family: var(--mono);
	font-size: 13px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--citron);
}

.lieu .niveau::before {
	content: "";
	width: 10px;
	height: 10px;
	margin-top: 0.12em;   /* au milieu des capitales, qui tombent 0,06 em sous le milieu de la ligne */
	background: var(--citron);
}

.nom-zone {
	font-family: var(--titre);
	font-weight: 700;
	font-size: 76px;
	line-height: 0.86;
	letter-spacing: 0.01em;
	text-transform: uppercase;
	color: var(--creme);
	overflow-wrap: break-word;
}

.espace {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.espace-mesures,
.espace-ensemble {
	margin: 0;
	font-family: var(--mono);
	font-size: 14px;
	color: rgba(251, 251, 240, 0.82);
	font-variant-numeric: tabular-nums;
}

.espace-capacites {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.pastille {
	padding: calc(5px - 0.06em) 12px calc(5px + 0.06em);
	border: 1px solid rgba(255, 255, 255, 0.7);
	border-radius: 999px;
	font-family: var(--mono);
	font-size: 13px;
	color: var(--creme);
}

.espace-boutons {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 4px;
}

.espace .bouton { min-height: 46px; padding: 0 18px var(--rehausse); font-size: 18px; }
.espace .bouton::before { display: none; }
.espace .espace-mobilier { background: var(--citron); border-color: var(--citron); }
.espace .espace-cotes { background: transparent; border-color: var(--creme); color: var(--creme); }
.espace .espace-cotes[aria-pressed="true"] { background: var(--creme); color: var(--canard); }
.espace .espace-projection { background: transparent; border-color: var(--creme); color: var(--creme); }
.espace .espace-projection[aria-pressed="true"] { background: var(--creme); color: var(--canard); }
/* Projection en cours : la fiche se replie sur le nom et les boutons, l'écran reste visible (projection.js). */
.espace.projection .espace-mesures,
.espace.projection .espace-capacites,
.espace.projection .espace-ensemble { display: none; }
.espace :focus-visible { outline-color: var(--citron); }

@media (hover: hover) {
	.espace .espace-mobilier:hover { background: #dcff73; }
	.espace .espace-cotes:hover:not([aria-pressed="true"]),
	.espace .espace-projection:hover:not([aria-pressed="true"]) { background: rgba(251, 251, 240, 0.12); }
}

/* Taper 1871 sur la page, ou #1871 dans l'adresse (principal.js). */
.compteur-fps {
	position: absolute;
	left: max(var(--marge), env(safe-area-inset-left));
	top: calc(max(var(--marge), env(safe-area-inset-top)) + var(--logo) + 70px);
	max-width: min(560px, calc(100vw - 2 * var(--marge)));
	padding: 8px 10px;
	background: rgba(0, 0, 0, 0.82);
	color: #fff;
	font: 12px/1.35 ui-monospace, Menlo, monospace;
	font-variant-numeric: tabular-nums;
	pointer-events: none;
	z-index: 5;
}
.diag-texte { margin: 0; white-space: pre-wrap; font: inherit; }
.diag-boutons { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.diag-boutons button {
	pointer-events: auto;
	font: 12px ui-monospace, Menlo, monospace;
	color: #fff;
	background: rgba(255, 255, 255, 0.12);
	border: 1px solid rgba(255, 255, 255, 0.25);
	padding: 3px 8px;
}
.diag-boutons button[aria-pressed="false"] { opacity: 0.45; text-decoration: line-through; }
/* « Pointer » armé (signalement.js) : le prochain clic dans la scène est un signalement. */
.diag-boutons button.arme { background: var(--citron); border-color: var(--citron); color: var(--encre); }
#scene.pointage, #scene.pointage canvas { cursor: crosshair !important; }
@media (max-width: 640px) { .compteur-fps { font-size: 10.5px; } }

/* ── Tablette et casque : des cibles de 60 px pour viser du regard ────── */

.grand { --cible: 60px; }
.grand .etiquette { font-size: 17px; }
.grand .liste li { min-height: 60px; }
.grand .parcours-barre { height: 68px; }
.grand .espace .bouton { min-height: 60px; }

/* ── Chargement : le logo dans son carré, une jauge de carrés ─────────── */

.chargement {
	--c: 48px;
	position: fixed;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 48px;
	background: var(--creme);
	transition: opacity 0.5s ease;
}

.chargement.fini { opacity: 0; pointer-events: none; }

.chargement-nom {
	position: relative;
	width: calc(3 * var(--c));
	height: calc(3 * var(--c));
	margin-bottom: calc(1.9 * var(--c));   /* les petits carrés descendent de 2 carrés sous le logo */
	border: var(--filet);
	background: var(--creme);
	display: flex;
	align-items: center;
	justify-content: center;
}

.chargement-nom .logo { height: calc(1.9 * var(--c)); }

.chargement-nom .damier { top: 0; left: 0; }
.chargement-nom .damier i { width: calc(var(--c) + 2px); height: calc(var(--c) + 2px); background: transparent; }
.chargement-nom .damier i:nth-child(1) { left: calc(-2 * var(--c) - 2px); top: calc(var(--c) - 2px); }
.chargement-nom .damier i:nth-child(2) { left: calc(-2 * var(--c) - 2px); top: calc(2 * var(--c) - 2px); background: transparent; }
.chargement-nom .damier i:nth-child(3) { left: calc(-1 * var(--c) - 2px); top: calc(2 * var(--c) - 2px); }
.chargement-nom .damier i:nth-child(4) { left: calc(-1 * var(--c) - 2px); top: calc(3 * var(--c) - 2px); background: var(--citron); }
.chargement-nom .damier i:nth-child(5) { left: -2px; top: calc(3 * var(--c) - 2px); }
.chargement-nom .damier i:nth-child(6) { left: calc(-1 * var(--c) - 2px); top: calc(4 * var(--c) - 2px); }

/* 24 carrés : la jauge se remplit d'un carré entier à la fois (principal.js arrondit). */
.jauge {
	--carre: 16px;
	--pas: 22px;
	width: calc(24 * var(--pas));
	height: var(--carre);
	background: repeating-linear-gradient(90deg, rgba(1, 1, 1, 0.14) 0 var(--carre), transparent var(--carre) var(--pas));
}

#jauge-remplie {
	position: relative;
	width: 0;
	height: 100%;
	background: repeating-linear-gradient(90deg, var(--canard) 0 var(--carre), transparent var(--carre) var(--pas));
	transition: width 0.2s ease;
}

/* Le carré suivant bat doucement : une animation d'opacité, que le navigateur joue même quand la page calcule (une
   étape longue au téléphone ne fige plus la jauge, 22/10/2026). */
#jauge-remplie::after {
	content: "";
	position: absolute;
	top: 0;
	left: 100%;
	width: var(--carre);
	height: 100%;
	background: var(--canard);
	opacity: 0.15;
	animation: carre-suivant 0.9s ease-in-out infinite alternate;
	will-change: opacity;
}

.jauge[aria-valuenow="100"] #jauge-remplie::after { display: none; }

@keyframes carre-suivant { to { opacity: 0.75; } }

@media (prefers-reduced-motion: reduce) {
	#jauge-remplie::after { animation: none; opacity: 0.4; }
}

.chargement.erreur .jauge { display: none; }

.tuiles {
	position: absolute;
	right: 0;
	bottom: 0;
	--t: 72px;
	width: calc(3 * var(--t));
	height: calc(3 * var(--t));
	pointer-events: none;
}

.tuiles i { position: absolute; width: var(--t); height: var(--t); }
.tuiles i:nth-child(1) { right: 0; bottom: 0; background: #521d78; }
.tuiles i:nth-child(2) { right: var(--t); bottom: 0; background: var(--canard); }
.tuiles i:nth-child(3) { right: calc(2 * var(--t)); bottom: 0; background: #d89e9c; }
.tuiles i:nth-child(4) { right: 0; bottom: var(--t); background: #bf9e39; }
.tuiles i:nth-child(5) { right: var(--t); bottom: var(--t); background: #8e9e3c; }
.tuiles i:nth-child(6) { right: 0; bottom: calc(2 * var(--t)); background: #7e2c33; }

/* ── Téléphone ────────────────────────────────────────────────────────── */

@media (max-width: 640px) {
	:root { --marge: 12px; --logo: 52px; --cible: 44px; }

	.etiquette { font-size: 13px; padding: calc(4px - 0.05em) 10px calc(4px + 0.05em) 8px; gap: 6px; }
	.etiquette::before { width: 5px; height: 5px; }
	.etiquette.privatisable::before { width: 8px; height: 8px; }

	.haut > .droite { gap: 10px; }
	.segments.mode button { min-width: 84px; padding: 0 12px var(--rehausse); font-size: 23px; }
	.bouton { font-size: 17px; padding: 0 14px var(--rehausse); }
	.droite .bouton::after { display: none; }

	.bas { flex-direction: column; align-items: stretch; gap: 10px; }

	.lieu, .lieu:has(> .espace:not([hidden])) { width: auto; padding: 14px 16px 16px; gap: 10px; }
	.lieu-texte { gap: 8px; }
	.lieu .niveau { font-size: 12px; }
	.nom-zone { font-size: 56px; }
	.espace { gap: 10px; }
	.espace-mesures, .espace-ensemble { font-size: 13px; }
	.pastille { font-size: 12px; padding: calc(4px - 0.06em) 10px calc(4px + 0.06em); }
	/* La fiche laisse voir la pièce : nom plus petit, capacités sur une ligne, boutons à parts égales sur une
	   ligne (trois dans la Grande salle : le libellé passe sur deux lignes s'il le faut) ; cotes tracées ou
	   projection en cours, elle se replie sur le nom et les boutons (espaces.js). */
	.lieu:has(> .espace:not([hidden])) .nom-zone { font-size: 40px; }
	.espace .bouton { min-height: 44px; padding: 2px 6px var(--rehausse); font-size: 15px; line-height: 1.05;
		white-space: normal; text-align: center; }
	.espace-boutons { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; }
	.espace-capacites { flex-wrap: nowrap; gap: 5px; }
	.espace .pastille { font-size: 11px; padding: calc(3px - 0.06em) 7px calc(3px + 0.06em); white-space: nowrap; }
	.espace.cotes .espace-mesures,
	.espace.cotes .espace-capacites,
	.espace.cotes .espace-ensemble { display: none; }

	/* Deux lignes : la visite et ses commandes, puis le point, sur toute la largeur. */
	.parcours-barre {
		display: grid;
		grid-template-columns: minmax(0, 1fr) 52px 52px 56px;
		grid-template-areas: "visite prec suiv lecture" "point point point point";
		height: auto;
		margin-left: 0;
	}
	.parcours-barre .menu { position: static; }
	.menu-visite { grid-area: visite; }
	#point-precedent { grid-area: prec; }
	#point-suivant { grid-area: suiv; }
	#lecture { grid-area: lecture; }
	.menu-point { grid-area: point; border-top: var(--filet); }
	.menu-visite > .case { width: 100%; justify-content: space-between; }
	.menu-point > .case { border-right: 0; }
	.parcours-barre .case { min-height: 52px; }
	.case.fleche { width: auto; }
	.case.lecture { width: auto; }
	.titre-case { font-size: 26px; padding: 0 16px var(--rehausse); }
	.point { min-width: 0; max-width: none; width: 100%; padding: 0 12px var(--rehausse); gap: 10px; font-size: 18px; }
	.numero { font-size: 13px; }
	/* la liste des points tient entre le haut de l'écran (logo) et la barre */
	.parcours-barre .liste {
		left: -2px;
		right: -2px;
		min-width: 0;
		max-height: calc(100dvh - 236px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
	}

	#barre-maquette {
		width: 100%;
		display: grid;
		grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr) minmax(0, 1fr);
	}
	#barre-maquette button { min-height: 52px; padding: 0 6px var(--rehausse); font-size: 19px; }

	.chargement { --c: 34px; gap: 36px; }
	.jauge { --carre: 9px; --pas: 13px; }
	.tuiles { --t: 44px; }
}

@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; }
}

/* Panneau 1871, bouton Interface : la scène seule (le panneau reste, pour la rendre) */
.sans-interface #interface,
.sans-interface #etiquettes,
.sans-interface #viseur {
	visibility: hidden !important;
}
