/* ---------------------------------------------------------------------------------------------
 * Carte v2 (carte2.html / page/carte2026.php) - 26/11/2026 - ASCII uniquement
 * Charge dans le <head> par index2020.php quand $page == "carte2026".
 * ------------------------------------------------------------------------------------------- */

.c26 {
	--c26-bleu: #1ca9e3;
	--c26-bleu-fonce: #0e8cc0;
	--c26-texte: #1f2a37;
	--c26-gris: #64748b;
	--c26-bord: rgba(15, 23, 42, .08);
	--c26-ombre: 0 12px 32px rgba(15, 23, 42, .18), 0 2px 6px rgba(15, 23, 42, .08);
	position: relative;
	width: 100%;
	height: calc(100vh - var(--c26-top, 110px));
	height: calc(100svh - var(--c26-top, 110px));
	min-height: 460px;
	margin: 0;
	background: #e9eef2;
	overflow: hidden;
	color: var(--c26-texte);
}

/* La carte cree son propre contexte d'empilement : les z-index internes de Leaflet (400 a 1000)
   ne passent plus au-dessus des menus deroulants du header ni du tiroir mobile. */
.c26-map {
	position: absolute;
	inset: 0;
	z-index: 0;
	background: #e9eef2;
	font-family: 'Neutra Text', sans-serif;
}

/* --- Cartouche des filtres (bureau) ---------------------------------------------------------- */
.c26-panel {
	position: absolute;
	z-index: 2;
	top: 16px;
	left: 16px;
	width: 340px;
	max-height: calc(100% - 32px);
	display: flex;
	flex-direction: column;
	background: rgba(255, 255, 255, .88);
	-webkit-backdrop-filter: blur(12px) saturate(1.3);
	backdrop-filter: blur(12px) saturate(1.3);
	border: 1px solid rgba(255, 255, 255, .7);
	border-radius: 18px;
	box-shadow: var(--c26-ombre);
	font-size: 1rem;
	line-height: 1.3;
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
	.c26-panel { background: rgba(255, 255, 255, .96); }
}

.c26-head {
	position: relative;
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 14px 12px 12px 18px;
	border-bottom: 1px solid var(--c26-bord);
}
.c26-head-txt { flex: 1 1 auto; min-width: 0; }
.c26-title {
	margin: 0;
	font-family: 'Neutra Text', sans-serif;
	font-weight: 700;
	font-size: 1.2rem;
	line-height: 1.2;
	color: var(--c26-texte);
}
.c26-count { margin-top: 2px; font-size: .9rem; color: var(--c26-gris); }
.c26-count strong { color: var(--c26-bleu); font-size: 1.05rem; }
.c26-handle { display: none; }

.c26-iconbtn {
	flex: 0 0 auto;
	display: grid;
	place-items: center;
	width: 34px;
	height: 34px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(15, 23, 42, .05);
	color: var(--c26-texte);
	cursor: pointer;
	transition: background .15s, transform .2s;
}
.c26-iconbtn:hover { background: rgba(28, 169, 227, .15); }
.c26-iconbtn:focus-visible,
.c26-reset:focus-visible,
.c26-voir:focus-visible,
.c26-fab:focus-visible,
.c26-info:focus-visible,
.c26-fit:focus-visible { outline: 3px solid rgba(28, 169, 227, .5); outline-offset: 2px; }
.c26-collapse i { transition: transform .2s; }
.c26-panel.is-collapsed .c26-collapse i { transform: rotate(180deg); }
.c26-close { display: none; }

.c26-body {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	padding: 4px 10px 12px 12px;
	scrollbar-width: thin;
	scrollbar-color: rgba(15, 23, 42, .25) transparent;
}
.c26-panel.is-collapsed .c26-body,
.c26-panel.is-collapsed .c26-foot { display: none; }
.c26-panel.is-collapsed .c26-head { border-bottom: 0; }

.c26-group { border: 0; margin: 12px 0 0; padding: 0; min-width: 0; }
.c26 .c26-group legend {
	display: flex;
	align-items: center;
	gap: 4px;
	float: none;
	width: auto;
	margin: 0 0 4px 8px;
	padding: 0;
	font-family: 'Neutra Text', sans-serif;
	font-size: .78rem;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--c26-gris);
	line-height: 1.2;
}

/* Lignes a cocher */
.c26-row { display: flex; align-items: center; gap: 2px; border-radius: 10px; transition: background .12s; }
.c26-row:hover { background: rgba(28, 169, 227, .08); }
.c26-check {
	display: flex;
	align-items: center;
	gap: 10px;
	flex: 1 1 auto;
	min-width: 0;
	min-height: 36px;
	margin: 0;
	padding: 5px 8px;
	cursor: pointer;
	font-size: 1rem;
	line-height: 1.25;
	color: var(--c26-texte);
}
.c26-check input {
	-webkit-appearance: none;
	appearance: none;
	display: grid;
	place-content: center;
	flex: 0 0 20px;
	width: 20px;
	height: 20px;
	margin: 0;
	border: 2px solid #b6c2ce;
	border-radius: 6px;
	background: #fff;
	cursor: pointer;
	transition: background .15s, border-color .15s;
}
.c26-check input::before {
	content: "";
	width: 10px;
	height: 5px;
	margin-top: -2px;
	border-left: 2px solid #fff;
	border-bottom: 2px solid #fff;
	transform: rotate(-45deg);
	opacity: 0;
}
.c26-check input:checked { background: var(--c26-bleu); border-color: var(--c26-bleu); }
.c26-check input:checked::before { opacity: 1; }
.c26-check input:focus-visible { outline: 3px solid rgba(28, 169, 227, .5); outline-offset: 2px; }
.c26-lbl { min-width: 0; }
.c26-handi { vertical-align: -3px; height: 17px; width: auto; }

.c26-badge {
	display: inline-block;
	margin-right: 2px;
	padding: 1px 6px;
	border-radius: 4px;
	font-size: .7rem;
	line-height: 1.5;
	color: #fff;
	vertical-align: 1px;
	font-family: 'Neutra Text', sans-serif;
}
.c26-badge-noir { background: #000; }
.c26-badge-vert { background: #58ba47; }

.c26-info {
	display: grid;
	place-items: center;
	flex: 0 0 auto;
	width: 30px;
	height: 30px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #9aa7b4;
	cursor: pointer;
	font-size: .95rem;
	letter-spacing: 0;
	text-transform: none;
}
.c26-info:hover,
.c26-info[aria-expanded="true"] { color: var(--c26-bleu); background: rgba(28, 169, 227, .12); }
.c26-desc {
	margin: 0 6px 8px 38px;
	padding: 8px 10px;
	border-radius: 8px;
	background: rgba(28, 169, 227, .07);
	font-size: .88rem;
	line-height: 1.4;
	color: #475569;
}

/* Fun dose : pastilles radio */
.c26-fd { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 2px 6px 0 8px; }
.c26-chip { position: relative; display: block; margin: 0; cursor: pointer; }
.c26-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.c26-pill {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 38px;
	padding: 4px 10px;
	border: 1.5px solid #d5dde5;
	border-radius: 999px;
	background: #fff;
	font-size: .95rem;
	transition: border-color .15s, background .15s, box-shadow .15s;
}
.c26-pill img { height: 20px; width: auto; max-width: 100%; }
.c26-chip:hover .c26-pill { border-color: #9fd8f1; }
.c26-chip input:checked + .c26-pill { border-color: var(--c26-bleu); background: rgba(28, 169, 227, .1); box-shadow: inset 0 0 0 1px var(--c26-bleu); font-weight: 700; }
.c26-chip input:focus-visible + .c26-pill { outline: 3px solid rgba(28, 169, 227, .5); outline-offset: 2px; }
.c26-chip-all { grid-column: 1 / -1; }

/* Pied du cartouche */
.c26-foot {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 14px 12px 18px;
	border-top: 1px solid var(--c26-bord);
}
.c26-reset {
	padding: 6px 2px;
	border: 0;
	background: none;
	color: var(--c26-texte);
	font-size: .95rem;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}
.c26-reset:disabled { color: #a8b3bf; cursor: default; text-decoration: none; }
.c26-voir { display: none; }

/* --- Bouton mobile, fond, messages ------------------------------------------------------------- */
.c26-fab { display: none; }
.c26-backdrop { display: none; }

.c26-hint {
	position: absolute;
	z-index: 1;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: rgba(15, 23, 42, .42);
	color: #fff;
	font-family: 'Neutra Text', sans-serif;
	font-size: 1.35rem;
	text-align: center;
	opacity: 0;
	pointer-events: none;
	transition: opacity .3s;
}
.c26-hint.is-on { opacity: 1; }

.c26-empty {
	position: absolute;
	z-index: 2;
	left: 50%;
	bottom: 28px;
	transform: translateX(-50%);
	display: flex;
	align-items: center;
	gap: 12px;
	max-width: calc(100% - 32px);
	padding: 10px 12px 10px 16px;
	border-radius: 14px;
	background: #fff;
	box-shadow: var(--c26-ombre);
	font-size: .95rem;
}
.c26-empty[hidden] { display: none; }

/* --- Controles et bulles Leaflet ------------------------------------------------------------- */
.c26 .leaflet-top.leaflet-right { top: 6px; right: 6px; }
.c26 .leaflet-bar { border: 0; border-radius: 12px; overflow: hidden; box-shadow: 0 4px 14px rgba(15, 23, 42, .18); }
.c26 .leaflet-bar a,
.c26 .leaflet-bar a:hover { width: 38px; height: 38px; line-height: 38px; color: var(--c26-texte); font-size: 20px; text-decoration: none; }
.c26 .leaflet-bar a:hover { background: #f1f5f9; }
.c26-fit {
	display: grid;
	place-items: center;
	width: 38px;
	height: 38px;
	padding: 0;
	border: 0;
	border-radius: 12px;
	background: #fff;
	color: var(--c26-texte);
	font-size: 15px;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(15, 23, 42, .18);
}
.c26-fit:hover { background: #f1f5f9; }
.c26 .leaflet-control-attribution { font-size: 10px; background: rgba(255, 255, 255, .75); border-radius: 8px 0 0 0; }

.c26-cluster { background: transparent; }
.c26-cluster span {
	display: grid;
	place-items: center;
	width: 100%;
	height: 100%;
	border: 3px solid #fff;
	border-radius: 50%;
	background: var(--c26-bleu);
	color: #fff;
	font-family: 'Neutra Text', sans-serif;
	font-weight: 700;
	font-size: .95rem;
	box-shadow: 0 0 0 5px rgba(28, 169, 227, .25), 0 4px 10px rgba(15, 23, 42, .25);
	transition: transform .15s;
}
.c26-cluster:hover span { transform: scale(1.08); }
.c26-cluster-m span { font-size: 1.02rem; }
.c26-cluster-l span { font-size: 1.1rem; box-shadow: 0 0 0 7px rgba(28, 169, 227, .25), 0 4px 12px rgba(15, 23, 42, .28); }

.c26 .c26-popup .leaflet-popup-content-wrapper { padding: 0; border-radius: 16px; overflow: hidden; box-shadow: 0 14px 34px rgba(15, 23, 42, .28); }
.c26 .c26-popup .leaflet-popup-content { margin: 0; font-family: 'Neutra Text', sans-serif; font-size: .95rem; line-height: 1.35; color: var(--c26-texte); }
.c26 .c26-popup .leaflet-popup-content p { margin: 0; }
.c26 .c26-popup a.leaflet-popup-close-button {
	top: 8px;
	right: 8px;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: rgba(255, 255, 255, .92);
	color: #111;
	font: 20px/28px Tahoma, Verdana, sans-serif;
	box-shadow: 0 1px 4px rgba(0, 0, 0, .2);
	z-index: 1;
}
.c26-pop-img { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #e5e7eb; }
.c26-pop-img img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.c26-pop-img:hover img { transform: scale(1.04); }
.c26-pop-body { padding: 12px 14px 14px; }
.c26-pop-kicker { font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--c26-gris); }
.c26-pop-name { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 2px 0 8px; font-size: 1.2rem; font-weight: 700; line-height: 1.2; }
.c26-pop-stars { display: inline-flex; gap: 1px; }
.c26-pop-stars img { width: 13px; height: 13px; }
.c26-pop-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.c26-pop-note { padding: 2px 8px; border-radius: 8px 8px 8px 2px; background: var(--c26-bleu); color: #fff; font-weight: 700; }
.c26-pop-avis { font-size: .85rem; color: var(--c26-gris); }
.c26-pop-fd { height: 18px; width: auto; }
.c26-pop-note + .c26-pop-fd,
.c26-pop-avis + .c26-pop-fd { margin-left: auto; }
.c26-pop-tags { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 12px; padding: 0; list-style: none; }
.c26-pop-tags li { padding: 2px 8px; border-radius: 999px; background: #f1f5f9; color: #334155; font-size: .76rem; }
.c26-pop-tags li.is-on { background: rgba(28, 169, 227, .15); color: #0b6f99; }
.c26 a.c26-pop-btn,
.c26 a.c26-pop-btn:hover {
	display: block;
	padding: 9px 12px;
	border-radius: 999px;
	background: var(--c26-bleu);
	color: #fff;
	text-align: center;
	text-decoration: none;
	text-transform: uppercase;
	letter-spacing: .05em;
	font-weight: 700;
	font-size: .85rem;
}
.c26 a.c26-pop-btn:hover { background: var(--c26-bleu-fonce); }

/* --- Mobile : tiroir qui monte du bas ---------------------------------------------------------- */
@media (max-width: 767.98px) {
	.c26 { min-height: 420px; }

	.c26-fab {
		position: absolute;
		z-index: 3;
		left: 50%;
		bottom: 22px;
		transform: translateX(-50%);
		display: inline-flex;
		align-items: center;
		gap: 8px;
		max-width: calc(100% - 32px);
		padding: 12px 20px;
		border: 0;
		border-radius: 999px;
		background: var(--c26-texte);
		color: #fff;
		font-family: 'Neutra Text', sans-serif;
		font-size: 1rem;
		white-space: nowrap;
		box-shadow: 0 10px 24px rgba(15, 23, 42, .35);
		cursor: pointer;
	}
	.c26-fab-badge {
		display: inline-grid;
		place-items: center;
		min-width: 22px;
		height: 22px;
		padding: 0 6px;
		border-radius: 999px;
		background: var(--c26-bleu);
		color: #fff;
		font-size: .8rem;
		font-weight: 700;
	}
	.c26-fab-badge[hidden] { display: none; }
	.c26-fab-sep { width: 1px; height: 18px; background: rgba(255, 255, 255, .35); }

	.c26-empty { bottom: 86px; }

	.c26-backdrop {
		display: block;
		position: fixed;
		z-index: 1044;
		inset: 0;
		background: rgba(15, 23, 42, .4);
		opacity: 0;
		transition: opacity .25s;
	}
	.c26-backdrop[hidden] { display: none; }
	.c26-backdrop.is-on { opacity: 1; }

	.c26-panel {
		position: fixed;
		z-index: 1045;
		top: auto;
		left: 0;
		right: 0;
		bottom: 0;
		width: auto;
		max-height: 85vh;
		max-height: 85svh;
		padding-bottom: env(safe-area-inset-bottom, 0);
		border-radius: 20px 20px 0 0;
		border-bottom: 0;
		background: rgba(255, 255, 255, .97);
		transform: translateY(105%);
		visibility: hidden;
		transition: transform .3s cubic-bezier(.2, .8, .2, 1), visibility 0s linear .3s;
	}
	.c26-panel.is-open {
		transform: translateY(0);
		visibility: visible;
		transition: transform .3s cubic-bezier(.2, .8, .2, 1), visibility 0s;
	}
	.c26-panel.is-dragging { transition: none; }
	.c26-panel.is-collapsed .c26-body,
	.c26-panel.is-collapsed .c26-foot { display: block; }
	.c26-panel.is-collapsed .c26-foot { display: flex; }

	.c26-head { padding: 24px 12px 12px 18px; touch-action: none; }
	.c26-handle {
		display: block;
		position: absolute;
		top: 8px;
		left: 50%;
		width: 42px;
		height: 5px;
		margin-left: -21px;
		border-radius: 3px;
		background: #cbd5e1;
	}
	.c26-collapse { display: none; }
	.c26-close { display: grid; }

	.c26-body { overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
	.c26-check { min-height: 44px; }
	.c26-pill { min-height: 44px; }

	.c26-voir {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		flex: 1 1 auto;
		min-height: 46px;
		margin-left: auto;
		padding: 10px 18px;
		border: 0;
		border-radius: 999px;
		background: var(--c26-bleu);
		color: #fff;
		font-family: 'Neutra Text', sans-serif;
		font-weight: 700;
		font-size: 1rem;
		cursor: pointer;
	}

	.c26 .leaflet-top.leaflet-right { top: 4px; right: 4px; }
	.c26-hint { font-size: 1.15rem; }
}

html.c26-lock,
html.c26-lock body { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
	.c26-panel,
	.c26-backdrop,
	.c26-hint,
	.c26-pop-img img,
	.c26-cluster span { transition: none !important; }
}
