/**
 * Exposants Plan — front-end styles.
 * The plan is a still image; the zones are an SVG overlay in percentage units,
 * so signage colours and stand numbers stay aligned at any zoom level.
 */

.exmp-root {
	--exmp-free: #12A150;
	--exmp-reserved: #C88A04;
	--exmp-poi: #6B7280;
	--exmp-zone-opacity: 0.7;
	--exmp-height: 620px;
	--exmp-ratio: 16 / 10;
	--exmp-scale: 1;

	position: relative;
	display: block;
}

/* ------------------------------------------------------------------- bar */

.exmp-bar {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
	justify-content: space-between;
	padding-bottom: 14px;
}

.exmp-search {
	position: relative;
	flex: 1 1 260px;
	min-width: 0;
}

.exmp-search-icon {
	position: absolute;
	left: 16px;
	top: 50%;
	transform: translateY(-50%);
	width: 18px;
	height: 18px;
	fill: none;
	stroke: var(--exm-muted, #6B7280);
	stroke-width: 1.8;
	stroke-linecap: round;
	pointer-events: none;
}

.exmp-root input[type="search"] {
	width: 100%;
	font: inherit;
	font-size: 16px;
	color: var(--exm-ink, #14161A);
	background: var(--exm-surface, #fff);
	border: 1px solid var(--exm-line, rgba(20, 22, 26, 0.12));
	border-radius: 999px;
	padding: 12px 18px 12px 44px;
	margin: 0;
	-webkit-appearance: none;
	appearance: none;
}

.exmp-root input[type="search"]:focus {
	border-color: var(--exm-ink, #14161A);
	outline: none;
	box-shadow: 0 0 0 3px var(--exm-tint, rgba(20, 22, 26, 0.04));
}

.exmp-suggestions {
	position: absolute;
	z-index: 30;
	top: calc(100% + 6px);
	left: 0;
	right: 0;
	margin: 0;
	padding: 6px;
	list-style: none;
	background: var(--exm-surface, #fff);
	border: 1px solid var(--exm-line, rgba(20, 22, 26, 0.12));
	border-radius: 14px;
	box-shadow: 0 18px 40px -22px rgba(20, 22, 26, 0.55);
	max-height: 320px;
	overflow-y: auto;
}

.exmp-suggestions[hidden] {
	display: none;
}

.exmp-suggestions li {
	list-style: none;
	margin: 0;
}

.exmp-root .exmp-suggestion {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	font: inherit;
	font-size: 14px;
	text-align: left;
	color: var(--exm-ink, #14161A);
	background: none;
	border: 0;
	border-radius: 9px;
	padding: 9px 10px;
	cursor: pointer;
}

.exmp-root .exmp-suggestion:hover {
	background: var(--exm-tint, rgba(20, 22, 26, 0.04));
}

.exmp-suggestion-code {
	font-family: var(--exm-mono, ui-monospace, monospace);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.04em;
	color: #fff;
	background: var(--exm-ink, #14161A);
	border-radius: 5px;
	padding: 4px 8px;
	flex: none;
}

.exmp-suggestion--empty {
	padding: 10px;
	font-size: 14px;
	color: var(--exm-muted, #6B7280);
}

.exmp-bar-tools {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
}

.exmp-zoom {
	display: inline-flex;
	gap: 2px;
	padding: 3px;
	background: var(--exm-tint, rgba(20, 22, 26, 0.04));
	border-radius: 999px;
}

.exmp-zoom-btn {
	width: 34px;
	height: 34px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font: inherit;
	font-size: 17px;
	line-height: 1;
	color: var(--exm-ink, #14161A);
	background: transparent;
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	padding: 0;
	transition: background-color 0.16s ease;
}

.exmp-zoom-btn:hover {
	background: var(--exm-surface, #fff);
}

.exmp-zoom-btn svg {
	width: 15px;
	height: 15px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
}

/* -------------------------------------------------------------- viewport */

.exmp-viewport {
	position: relative;
	height: var(--exmp-height);
	overflow: hidden;
	background: #fbfbfc;
	border: 1px solid var(--exm-line-soft, rgba(20, 22, 26, 0.07));
	border-radius: var(--exm-radius, 14px);
	touch-action: none;
	cursor: grab;
	/* A faint grid reads as the hall floor beneath the plan. */
	background-image:
		linear-gradient(to right, rgba(20, 22, 26, 0.035) 1px, transparent 1px),
		linear-gradient(to bottom, rgba(20, 22, 26, 0.035) 1px, transparent 1px);
	background-size: 26px 26px;
}

.exmp-root.is-panning .exmp-viewport {
	cursor: grabbing;
}

.exmp-root:fullscreen .exmp-viewport,
.exmp-root.is-tall .exmp-viewport {
	height: calc(100vh - 120px);
}

.exmp-root:fullscreen {
	background: #fff;
	padding: 16px;
}

.exmp-canvas {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	aspect-ratio: var(--exmp-ratio);
	transform-origin: 0 0;
	will-change: transform;
}

.exmp-image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	user-select: none;
	-webkit-user-drag: none;
}

.exmp-zones {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	overflow: visible;
}

/* ------------------------------------------------------------------ zones */

.exmp-zone {
	--exmp-fill: #2547E8;
	fill: var(--exmp-fill);
	fill-opacity: var(--exmp-zone-opacity);
	stroke: #fff;
	stroke-width: 0.12;
	stroke-linejoin: round;
	cursor: pointer;
	transition: fill-opacity 0.18s ease, stroke-width 0.18s ease;
	vector-effect: non-scaling-stroke;
}

.exmp-zone:hover,
.exmp-zone:focus-visible {
	fill-opacity: 1;
	stroke-width: 0.3;
	outline: none;
}

.exmp-zone.is-free {
	fill-opacity: 0.25;
	stroke-dasharray: 0.8 0.6;
}

.exmp-zone.is-reserved {
	fill-opacity: 0.45;
}

.exmp-zone--poi {
	fill-opacity: 0.3;
	cursor: default;
}

/* Favourites stand out only while the visitor asks for their route. */
.exmp-root.is-route .exmp-zone {
	fill-opacity: 0.18;
}

.exmp-root.is-route .exmp-zone.is-favorite {
	fill-opacity: 1;
	stroke: var(--exm-ink, #14161A);
	stroke-width: 0.35;
}

.exmp-zone.is-pulsing {
	animation: exmp-pulse 1.4s ease-out 2;
}

@keyframes exmp-pulse {
	0%, 100% {
		fill-opacity: var(--exmp-zone-opacity);
		stroke-width: 0.12;
	}
	40% {
		fill-opacity: 1;
		stroke-width: 0.6;
	}
}

/* ----------------------------------------------------------- labels, POI */

.exmp-labels,
.exmp-pois {
	position: absolute;
	inset: 0;
	pointer-events: none;
}

.exmp-labels[hidden] {
	display: none;
}

.exmp-label {
	position: absolute;
	transform: translate(-50%, -50%);
	font-family: var(--exm-mono, ui-monospace, monospace);
	/* Counter-scaled so numbers stay legible at any zoom. */
	font-size: calc(11px / var(--exmp-scale));
	font-weight: 600;
	letter-spacing: 0.02em;
	line-height: 1;
	color: #fff;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
	white-space: nowrap;
}

.exmp-poi {
	position: absolute;
	transform: translate(-50%, -50%);
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: calc(3px / var(--exmp-scale));
}

.exmp-poi-dot {
	width: calc(9px / var(--exmp-scale));
	height: calc(9px / var(--exmp-scale));
	border-radius: 50%;
	background: var(--exmp-poi);
	box-shadow: 0 0 0 calc(2px / var(--exmp-scale)) #fff;
}

.exmp-poi-text {
	font-size: calc(10px / var(--exmp-scale));
	font-weight: 600;
	letter-spacing: 0.02em;
	color: var(--exm-ink, #14161A);
	background: rgba(255, 255, 255, 0.88);
	border-radius: calc(4px / var(--exmp-scale));
	padding: calc(2px / var(--exmp-scale)) calc(6px / var(--exmp-scale));
	white-space: nowrap;
}

/* --------------------------------------------------------------- tooltip */

.exmp-tooltip {
	position: absolute;
	top: 0;
	left: 0;
	z-index: 12;
	max-width: 240px;
	display: flex;
	flex-direction: column;
	gap: 3px;
	padding: 10px 13px;
	background: var(--exm-ink, #14161A);
	color: #fff;
	border-radius: 10px;
	pointer-events: none;
	box-shadow: 0 12px 28px -16px rgba(0, 0, 0, 0.7);
}

.exmp-tooltip[hidden] {
	display: none;
}

.exmp-tooltip-code {
	font-family: var(--exm-mono, ui-monospace, monospace);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.08em;
	opacity: 0.75;
}

.exmp-tooltip-name {
	font-size: 14px;
	font-weight: 600;
	line-height: 1.25;
}

.exmp-tooltip-sub {
	font-size: 12px;
	opacity: 0.7;
}

/* ---------------------------------------------------------------- legend */

.exmp-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 18px;
	padding-top: 14px;
}

.exmp-legend-item {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	font-size: 12px;
	font-weight: 500;
	color: var(--exm-muted, #6B7280);
}

.exmp-legend-dot {
	width: 10px;
	height: 10px;
	border-radius: 3px;
	flex: none;
}

/* ------------------------------------------------------------ free stand */

.exmp-free {
	text-align: center;
	padding: 18px 0 6px;
}

.exmp-free .exm-plaque {
	position: static;
	margin-bottom: 14px;
}

.exmp-notice {
	padding: 26px;
	text-align: center;
	font-size: 14px;
	color: var(--exm-muted, #6B7280);
	border: 1px dashed var(--exm-line, rgba(20, 22, 26, 0.12));
	border-radius: var(--exm-radius, 14px);
}

/* ------------------------------------------------------- responsive, print */

@media (max-width: 640px) {
	.exmp-search {
		flex: 0 0 auto;
		width: 100%;
	}

	.exmp-bar {
		flex-direction: column;
		align-items: stretch;
	}

	.exmp-bar-tools {
		justify-content: space-between;
	}

	.exmp-viewport {
		height: min(var(--exmp-height), 62vh);
	}
}

@media print {
	.exmp-bar,
	.exmp-tooltip,
	.exm-panel {
		display: none !important;
	}

	.exmp-viewport {
		height: auto;
		overflow: visible;
		border: 0;
	}

	.exmp-canvas {
		position: relative;
		transform: none !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	.exmp-zone,
	.exmp-canvas {
		transition: none !important;
		animation: none !important;
	}
}
