/* La Lucarne — Carte du monde */
.lwm-map {
	--lwm-on: #f47b20;
	--lwm-off: #e5e5e5;
	--lwm-line: #fff;
	--lwm-line-w: 1;
	--lwm-radius: 0px;

	/* Grille d'animation du site : trois durées, une seule courbe. */
	--lwm-ease: cubic-bezier( 0.25, 0.46, 0.45, 0.94 );
	--lwm-dur-color: 160ms; /* changements de couleur */
	--lwm-dur-move: 260ms; /* mouvements au survol */
	--lwm-dur-open: 320ms; /* ouverture / fermeture */

	/* Typographie : héritée du thème quand il expose ses variables. */
	--lwm-font-display: var( --font-display, system-ui, -apple-system, "Segoe UI", sans-serif );
	--lwm-font-body: var( --font-body, system-ui, -apple-system, "Segoe UI", sans-serif );

	position: relative;
	width: 100%;
	margin-inline: auto;
	line-height: 0;
	border-radius: var(--lwm-radius);
	overflow: hidden;
}

/* --lwm-ar est posé par le serveur d'après le cadrage : la place est réservée
   avant même que le SVG soit peint, donc aucun décalage de mise en page. */
.lwm-svg {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: var( --lwm-ar, auto );
	overflow: visible;
}

.lwm-c {
	fill: var(--lwm-off);
	stroke: var(--lwm-line);
	stroke-width: var(--lwm-line-w);
	stroke-linejoin: round;
	vector-effect: non-scaling-stroke;
	transition: fill var(--lwm-dur-color) var(--lwm-ease);
}

.lwm-c.is-on {
	fill: var(--lwm-on);
}

.lwm-pt {
	stroke-width: 0;
}

/* Zoom / déplacement */
.lwm-has-nav .lwm-svg {
	cursor: grab;
	touch-action: none;
}

.lwm-has-nav.is-dragging .lwm-svg {
	cursor: grabbing;
}

.lwm-map:focus-visible {
	outline: 2px solid var(--lwm-on);
	outline-offset: 2px;
}

.lwm-nav {
	position: absolute;
	z-index: 4;
	top: 10px;
	right: 10px;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.lwm-btn {
	width: 30px;
	height: 30px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	margin: 0;
	border: 1px solid rgba( 0, 0, 0, 0.12 );
	border-radius: 6px;
	background: rgba( 255, 255, 255, 0.92 );
	color: #1b1b1b;
	font-family: var( --lwm-font-display );
	font-size: 17px;
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 1px 3px rgba( 0, 0, 0, 0.12 );
	transition: background var(--lwm-dur-move) var(--lwm-ease);
}

.lwm-btn:hover,
.lwm-btn:focus-visible {
	background: #fff;
}

.lwm-btn-reset {
	opacity: 0;
	pointer-events: none;
	transition: opacity var(--lwm-dur-move) var(--lwm-ease),
		background var(--lwm-dur-move) var(--lwm-ease);
}

.lwm-map.is-zoomed .lwm-btn-reset {
	opacity: 1;
	pointer-events: auto;
}

.lwm-hint {
	position: absolute;
	z-index: 6;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba( 20, 20, 20, 0.45 );
	color: #fff;
	font-family: var( --lwm-font-body );
	font-size: 15px;
	font-weight: 500;
	line-height: 1.4;
	text-align: center;
	pointer-events: none;
	opacity: 0;
	transition: opacity var(--lwm-dur-open) var(--lwm-ease);
}

.lwm-hint.is-visible {
	opacity: 1;
}

/* Info-bulle */
.lwm-tooltip {
	position: absolute;
	z-index: 5;
	top: 0;
	left: 0;
	padding: 4px 9px;
	border-radius: 4px;
	background: #1b1b1b;
	color: #fff;
	font-family: var( --lwm-font-body );
	font-size: 13px;
	line-height: 1.35;
	white-space: nowrap;
	pointer-events: none;
	opacity: 0;
	transform: translate(-50%, -130%);
	transition: opacity var(--lwm-dur-color) var(--lwm-ease);
}

.lwm-tooltip.is-visible {
	opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
	.lwm-c,
	.lwm-tooltip,
	.lwm-btn,
	.lwm-btn-reset,
	.lwm-hint {
		transition: none;
	}
}
