/* Nova Map — store locator (OpenStreetMap / Leaflet) */

.nova-map {
	--nova-map-accent: #00a1b9;
	--nova-map-radius: 16px;
	--nova-map-gap: 20px;
	--nova-map-list-width: 380px;
	--nova-map-height: 560px;
	--nova-map-text: #1a1a1a;
	--nova-map-muted: #5c5c5c;
	--nova-map-border: #e8e8e8;
	display: grid;
	gap: var(--nova-map-gap);
	width: 100%;
	box-sizing: border-box;
	align-items: stretch;
}

.nova-map--list_left {
	grid-template-columns: minmax(260px, var(--nova-map-list-width)) minmax(0, 1fr);
}

.nova-map--list_right {
	grid-template-columns: minmax(0, 1fr) minmax(260px, var(--nova-map-list-width));
}

.nova-map--list_right .nova-map__list {
	order: 2;
}

.nova-map--list_right .nova-map__map-col {
	order: 1;
}

.nova-map--map_only,
.nova-map--list_only {
	grid-template-columns: 1fr;
}

.nova-map__list {
	min-width: 0;
	min-height: 0;
	height: var(--nova-map-height);
	max-height: var(--nova-map-height);
	display: flex;
	flex-direction: column;
	overflow: visible;
}

.nova-map__list > .nova-map__load-more--list {
	flex: 0 0 auto;
	position: relative;
	z-index: 5;
	margin: 12px auto 0;
}

.nova-map__list-viewport {
	position: relative;
	flex: 1 1 auto;
	min-height: 0;
	/* pas de height:100% — sinon le bouton sous la liste est poussé hors du cadre */
	width: 100%;
	overflow: hidden;
}

.nova-map__list-scroll {
	position: absolute;
	inset: 0;
	overflow-y: auto !important;
	overflow-x: hidden !important;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
	touch-action: pan-y;
	display: block;
	padding-right: 14px;
	box-sizing: border-box;
	/* Masquer scrollbar native (flèches OS incluses) */
	scrollbar-width: none;
	-ms-overflow-style: none;
}

.nova-map__list-scroll::-webkit-scrollbar {
	width: 0 !important;
	height: 0 !important;
	display: none !important;
	background: transparent !important;
}

/* Scrollbar custom — rail gris + thumb teal, sans flèches */
.nova-map__scrollbar {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	width: 6px;
	pointer-events: none;
	z-index: 2;
}

.nova-map__scrollbar-track {
	position: relative;
	width: 100%;
	height: 100%;
	background: #e7e7e7;
	border-radius: 999px;
	overflow: hidden;
	pointer-events: auto;
}

.nova-map__scrollbar-thumb {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	min-height: 40px;
	background: var(--nova-map-accent, #00a1b9);
	border-radius: 999px;
	pointer-events: auto;
	cursor: grab;
	touch-action: none;
	will-change: transform, height;
}

.nova-map__scrollbar-thumb:hover,
.nova-map__scrollbar.is-dragging .nova-map__scrollbar-thumb {
	background: #008fa5;
	cursor: grabbing;
}

.nova-map__scrollbar.is-hidden {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
}

.nova-map__list-item {
	display: block;
	margin-bottom: 14px;
}

.nova-map__list-item:last-child {
	margin-bottom: 0;
}

.nova-map__list-item.is-collapsed,
.nova-map__list-item[hidden] {
	display: none !important;
}

.nova-map__empty {
	margin: 0;
	padding: 24px;
	color: var(--nova-map-muted);
	font-size: 14px;
}

.nova-map__map-col {
	min-width: 0;
	min-height: 0;
}

.nova-map__map-shell {
	position: relative;
	height: var(--nova-map-height);
	border-radius: var(--nova-map-radius);
	overflow: hidden;
	background: #eef2f4;
	isolation: isolate;
}

.nova-map__map-shell > .nova-map__load-more {
	z-index: 1100;
}

.nova-map__canvas {
	position: relative;
	width: 100%;
	height: 100%;
	border-radius: inherit;
	z-index: 1;
}

.nova-map__canvas .leaflet-container {
	width: 100%;
	height: 100%;
	font: inherit;
	background: #eef2f4;
}

.nova-map__canvas .leaflet-bottom.leaflet-right {
    display: flex;
    flex-direction: column-reverse;
    align-items: flex-end;
    gap: 10px;
    margin: 0 20px 20px 0;
}

.nova-map__canvas .leaflet-control-zoom {
	border: 0 !important;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
	border-radius: 10px;
	overflow: hidden;
	float: none !important;
	margin: 0 !important;
}

.nova-map__canvas .leaflet-control-zoom a {
	width: 36px !important;
	height: 36px !important;
	line-height: 36px !important;
	color: #222 !important;
	border: 0 !important;
}

.nova-map-marker {
	background: transparent !important;
	border: 0 !important;
}

.nova-map__load-more {
	position: absolute;
	left: 50%;
	bottom: 18px;
	transform: translateX(-50%);
	z-index: 1000;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 44px;
	padding: 10px 22px;
	border: 0;
	border-radius: 999px;
	background: var(--nova-map-accent);
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	pointer-events: auto;
	box-shadow: 0 8px 24px rgba(0, 161, 185, 0.35);
	transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.nova-map__load-more:hover {
	filter: brightness(1.05);
	transform: translateX(-50%) translateY(-1px);
}

.nova-map__load-more:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.nova-map__load-more--list {
	position: static;
	transform: none;
	margin: 14px auto 8px;
	display: flex;
	width: fit-content;
	box-shadow: none;
}

.nova-map__load-more--list:hover {
	filter: brightness(1.05);
	transform: translateY(-1px);
}

/* ---- Store card (default template) ---- */
.nova-map-card {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 18px 18px 16px;
	background: #fff;
	border: 1px solid var(--nova-map-border);
	border-radius: 16px;
	box-sizing: border-box;
	color: var(--nova-map-text);
	cursor: pointer;
	transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.nova-map-card:hover,
.nova-map-card.is-active,
.nova-map__list-item.is-active .nova-map-card {
	border-color: var(--nova-map-accent);
	box-shadow: 0 8px 24px rgba(0, 161, 185, 0.12);
}

.nova-map-card:focus-visible {
	outline: 2px solid var(--nova-map-accent);
	outline-offset: 2px;
}

.nova-map-card__eyebrow {
	margin: 0;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.02em;
	color: var(--nova-map-accent);
}

.nova-map-card__title {
	margin: 0;
	font-size: 18px;
	line-height: 1.25;
	font-weight: 700;
	color: var(--nova-map-text);
}

.nova-map-card__row {
	display: grid;
	grid-template-columns: 22px 1fr;
	gap: 10px;
	align-items: start;
}

.nova-map-card__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-top: 2px;
	color: var(--nova-map-accent);
}

.nova-map-card__text,
.nova-map-card__contact {
	margin: 0;
	font-size: 14px;
	line-height: 1.45;
	color: var(--nova-map-muted);
}

.nova-map-card__contact {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.nova-map-card__phone,
.nova-map-card__email {
	color: inherit;
	text-decoration: none;
}

.nova-map-card__email {
	color: var(--nova-map-accent);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.nova-map-card__email:hover {
	filter: brightness(0.9);
}

.nova-map-card__cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	align-self: flex-start;
	margin-top: 6px;
	min-height: 40px;
	padding: 8px 16px;
	border: 1.5px solid var(--nova-map-accent);
	border-radius: 999px;
	background: transparent;
	color: var(--nova-map-accent);
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	transition: background 0.15s ease, color 0.15s ease;
}

.nova-map-card__cta:hover {
	background: var(--nova-map-accent);
	color: #fff;
}

.nova-map-card__cta-icon {
	display: inline-flex;
	line-height: 0;
}

@media (max-width: 1024px) {
	.nova-map--list_left,
	.nova-map--list_right {
		grid-template-columns: 1fr;
	}

	.nova-map--list_right .nova-map__list,
	.nova-map--list_right .nova-map__map-col {
		order: initial;
	}

	.nova-map__list {
		height: 420px;
		max-height: 420px;
	}

	.nova-map__map-shell {
		min-height: 360px;
	}
}

@media (max-width: 640px) {
	.nova-map {
		--nova-map-height: 420px;
	}

	.nova-map__list {
		height: 360px;
		max-height: 360px;
	}

	.nova-map-card__title {
		font-size: 16px;
	}
}
