/* Gutelia — Carte des toilettes (V2)
 * Couleurs : modifiez les variables ci-dessous pour les caler sur la charte.
 */
.gwc {
	--gwc-primary: #0e7c66;
	--gwc-primary-dark: #0a5f4e;
	--gwc-primary-soft: #e3f3ee;
	--gwc-ink: #1b2a2f;
	--gwc-muted: #5d6b70;
	--gwc-line: #e3e8ea;
	--gwc-surface: #ffffff;
	--gwc-gratuit: #1f9d6b;
	--gwc-payant: #e0812b;
	--gwc-code: #7c5cd6;
	--gwc-pmr: #1d4ed8;
	--gwc-radius: 16px;
	--gwc-shadow: 0 6px 24px rgba(16, 38, 44, .16), 0 1px 3px rgba(16, 38, 44, .12);

	/* La mise en page suit la largeur du composant (colonne Elementor, pleine page…), pas celle de l'écran. */
	container: gwc / inline-size;
	position: relative;
	height: var(--gwc-height, 80vh);
	min-height: 480px;
	overflow: hidden;
	isolation: isolate;
	color: var(--gwc-ink);
	font-family: inherit;
	font-size: 15px;
	line-height: 1.4;
	background: #eef2f3;
}
.gwc *, .gwc *::before, .gwc *::after { box-sizing: border-box; }
.gwc button { font: inherit; cursor: pointer; }
.gwc svg { width: 20px; height: 20px; flex: none; }
.gwc-sr, .gwc-hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.gwc-hp { left: -9999px; }

.gwc-map { position: absolute; inset: 0; z-index: 0; }
.gwc .leaflet-container { font: inherit; background: #eef2f3; }
/* Protection contre les styles du thème / d'Elementor (ex. « canvas, img { max-width: 100%; height: auto } ») :
   la carte dessine ses ronds dans un canvas plus large que le cadre ; s'il est redimensionné,
   les ronds restent visibles mais ne répondent plus aux clics. */
.gwc .leaflet-container canvas,
.gwc .leaflet-container .leaflet-pane img,
.gwc .leaflet-container .leaflet-pane svg {
	max-width: none !important;
	max-height: none !important;
	min-width: 0 !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	box-shadow: none !important;
	transition: none !important;
}

/* ---------------------------------------------------------------- panneau */
.gwc-panel {
	position: absolute; z-index: 500;
	top: 16px; left: 16px; bottom: 16px;
	width: 420px;
	display: flex; flex-direction: column; gap: 10px;
	pointer-events: none;
}
.gwc-panel > * { pointer-events: auto; }

.gwc-bar {
	position: relative;
	display: flex; align-items: center; gap: 8px;
	padding: 8px;
	background: var(--gwc-surface);
	border-radius: var(--gwc-radius);
	box-shadow: var(--gwc-shadow);
}
.gwc-is-loading .gwc-bar::after {
	content: ""; position: absolute; left: 16px; right: 16px; bottom: 3px; height: 3px; border-radius: 3px;
	background: linear-gradient(90deg, transparent, var(--gwc-primary), transparent);
	background-size: 40% 100%; background-repeat: no-repeat;
	animation: gwc-load 1s linear infinite;
}
@keyframes gwc-load { from { background-position: -40% 0; } to { background-position: 140% 0; } }

.gwc-locate {
	display: inline-flex; align-items: center; gap: 8px;
	height: 46px; padding: 0 16px;
	border: 0; border-radius: 12px;
	background: var(--gwc-primary); color: #fff;
	font-weight: 600; white-space: nowrap;
	transition: background .15s;
}
.gwc-locate:hover, .gwc-locate:focus-visible { background: var(--gwc-primary-dark); }
.gwc-locate.gwc-busy svg { animation: gwc-spin 1s linear infinite; }
@keyframes gwc-spin { to { transform: rotate(360deg); } }

.gwc-or { color: var(--gwc-muted); font-size: 13px; }

.gwc-search { flex: 1; min-width: 0; display: flex; align-items: center; position: static; }
.gwc-search-icon { position: absolute; margin-left: 12px; color: var(--gwc-muted); pointer-events: none; }
.gwc .gwc-input {
	width: 100%; height: 46px; margin: 0;
	padding: 0 12px 0 40px;
	border: 1.5px solid var(--gwc-line); border-radius: 12px;
	background: #f7f9fa; color: var(--gwc-ink);
	font: inherit; font-size: 16px; /* évite le zoom automatique sur iOS */
	box-shadow: none; outline: none;
	-webkit-appearance: none; appearance: none;
}
.gwc .gwc-input:focus { border-color: var(--gwc-primary); background: #fff; }
.gwc .gwc-input::placeholder { color: #8a979b; }

.gwc-suggest {
	position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 10;
	margin: 0; padding: 6px; list-style: none;
	background: var(--gwc-surface); border-radius: var(--gwc-radius);
	box-shadow: var(--gwc-shadow);
	max-height: 340px; overflow-y: auto;
}
.gwc-suggest li {
	display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; column-gap: 10px;
	margin: 0; padding: 9px 12px; border-radius: 10px; cursor: pointer;
}
.gwc-suggest li.is-active, .gwc-suggest li:hover { background: var(--gwc-primary-soft); }
.gwc-s-name { font-weight: 600; }
.gwc-s-meta { grid-row: 2; color: var(--gwc-muted); font-size: 13px; }
.gwc-s-count {
	grid-row: 1 / 3; grid-column: 2; align-self: center;
	font-size: 12px; font-weight: 600; color: var(--gwc-primary-dark);
	background: var(--gwc-primary-soft); border-radius: 99px; padding: 2px 8px;
}
.gwc-suggest li.gwc-s-loading { display: block; color: var(--gwc-muted); font-size: 13px; cursor: default; background: none; }

/* ----------------------------------------------------------------- filtres */
.gwc-filters {
	display: flex; flex-wrap: wrap; gap: 6px;
	padding: 2px; margin: -2px;
}
.gwc-filters::-webkit-scrollbar { display: none; }
.gwc-chip, .gwc-zone-chip {
	display: inline-flex; align-items: center; gap: 6px; flex: none;
	height: 36px; padding: 0 12px;
	border: 1.5px solid transparent; border-radius: 99px;
	background: var(--gwc-surface); color: var(--gwc-ink);
	font-size: 14px; font-weight: 500;
	box-shadow: 0 2px 8px rgba(16, 38, 44, .14);
}
.gwc-chip svg { width: 17px; height: 17px; color: var(--gwc-pmr); }
.gwc-chip[aria-pressed="true"] { border-color: var(--gwc-primary); background: var(--gwc-primary-soft); color: var(--gwc-primary-dark); font-weight: 600; }
.gwc-zone-chip { background: var(--gwc-ink); color: #fff; font-weight: 600; }
.gwc-zone-chip svg { width: 16px; height: 16px; }
.gwc-zone-chip[hidden] { display: none; }
.gwc-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.gwc-c-gratuit { background: var(--gwc-gratuit); }
.gwc-c-payant { background: var(--gwc-payant); }
.gwc-c-code { background: var(--gwc-code); }

/* ------------------------------------------------------------ fiche résultats */
.gwc-sheet {
	display: flex; flex-direction: column; min-height: 0;
	background: var(--gwc-surface); border-radius: var(--gwc-radius);
	box-shadow: var(--gwc-shadow);
	overflow: hidden;
}
.gwc-sheet[hidden] { display: none; }
.gwc-sheet-head { display: flex; align-items: center; gap: 8px; padding: 14px 10px 6px 18px; }
.gwc-sheet-title { flex: 1; margin: 0; font-weight: 700; font-size: 16px; }
.gwc-sheet-close, .gwc-modal-close {
	cursor: pointer;
	display: grid; place-items: center; width: 36px; height: 36px; flex: none;
	border: 0; border-radius: 50%; background: #f1f4f5; color: var(--gwc-ink);
}
.gwc-results { margin: 0; padding: 4px 10px 12px; list-style: none; overflow-y: auto; }
.gwc-results > li { position: relative; margin: 0 0 8px; padding: 12px; border: 1.5px solid var(--gwc-line); border-radius: 14px; }
.gwc-results > li.gwc-first { border-color: var(--gwc-primary); background: #f6fbf9; }
.gwc-results > li.gwc-loading-row, .gwc-results > li.gwc-empty { border-style: dashed; color: var(--gwc-muted); }
.gwc-tag {
	display: inline-block; margin-bottom: 6px; padding: 2px 9px; border-radius: 99px;
	background: var(--gwc-primary); color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .02em;
}

/* ------------------------------------------------- carte de lieu (popup + liste) */
.gwc-pop { font-size: 14px; }
.gwc-pop p { margin: 0 0 6px; }
.gwc-pop-title { font-weight: 700; font-size: 15px; }
.gwc-pop-dist { color: var(--gwc-ink); }
.gwc-pop-addr { color: var(--gwc-muted); font-size: 13px; }
.gwc-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.gwc-badge { padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; color: #fff; }
.gwc-b-gratuit { background: var(--gwc-gratuit); }
.gwc-b-payant { background: var(--gwc-payant); }
.gwc-b-code { background: var(--gwc-code); }
.gwc-b-pmr { background: #e8eefc; color: var(--gwc-pmr); }
.gwc-pop-actions { display: flex; gap: 8px; margin-top: 10px; }
.gwc .gwc-go, .gwc-popup .gwc-go {
	display: inline-flex; align-items: center; justify-content: center; flex: 1;
	min-height: 42px; padding: 0 14px; border-radius: 11px;
	background: var(--gwc-primary, #0e7c66); color: #fff !important; text-decoration: none !important;
	font-weight: 700;
}
.gwc-show {
	min-height: 42px; padding: 0 12px; border-radius: 11px;
	border: 1.5px solid var(--gwc-line); background: #fff; color: var(--gwc-ink); font-weight: 600;
}
.gwc-popup .leaflet-popup-content-wrapper { border-radius: 14px; box-shadow: var(--gwc-shadow); }
.gwc-popup .leaflet-popup-content { margin: 14px 16px; }

/* ------------------------------------------------------------- statut + ajout */
.gwc-status {
	position: absolute; z-index: 450; left: 50%; bottom: 16px; transform: translateX(-50%);
	max-width: min(560px, calc(100% - 200px)); margin: 0; padding: 8px 14px;
	background: rgba(27, 42, 47, .88); color: #fff; border-radius: 99px;
	font-size: 13px; text-align: center;
}
.gwc-status[hidden], .gwc-status:empty { display: none; }

.gwc-add {
	position: absolute; z-index: 450; left: 16px; bottom: 16px;
	display: inline-flex; align-items: center; gap: 6px;
	height: 42px; padding: 0 16px; border: 0; border-radius: 99px;
	background: var(--gwc-surface); color: var(--gwc-ink); font-weight: 600;
	box-shadow: var(--gwc-shadow);
}
.gwc-add svg { width: 18px; height: 18px; color: var(--gwc-primary); }
.gwc .leaflet-bottom.leaflet-right { margin-bottom: 4px; }
.gwc .leaflet-control-zoom a { width: 38px; height: 38px; line-height: 38px; font-size: 20px; }

/* ------------------------------------------------------- marqueurs et bulles */
.gwc-cluster {
	display: grid; place-items: center;
	border-radius: 50%;
	background: rgba(14, 124, 102, .92); color: #fff;
	border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
	font-weight: 700; font-size: 13px;
}
.gwc-bubble { display: grid; place-items: center; }
.gwc-bubble button {
	width: 100%; height: 100%; padding: 0;
	display: grid; place-items: center;
	border: 3px solid #fff; border-radius: 50%;
	background: var(--gwc-primary); color: #fff;
	box-shadow: 0 3px 12px rgba(0, 0, 0, .25);
	transition: transform .15s;
}
.gwc-bubble button:hover { transform: scale(1.08); }
.gwc-bubble b { font-size: 14px; }
.gwc-bubble.gwc-sm b { font-size: 11px; }
.gwc-bubble.gwc-sm button { border-width: 2px; }
.gwc-bubble-name {
	position: absolute; top: 100%; left: 50%; transform: translateX(-50%); margin-top: 3px;
	white-space: nowrap; font-size: 12px; font-weight: 700; color: var(--gwc-ink);
	text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 0 3px #fff;
	pointer-events: none;
	display: none;
}
.gwc-bubble:hover .gwc-bubble-name, .gwc-bubble:focus-within .gwc-bubble-name { display: block; z-index: 2; }
@container gwc (min-width: 900px) {
	.gwc-lvl-region .gwc-bubble-name { display: block; }
}
.gwc-me { overflow: visible; }
.gwc-me::before {
	content: ""; position: absolute; inset: -14px; border-radius: 50%;
	background: rgba(37, 99, 235, .18); border: 1.5px solid rgba(37, 99, 235, .35);
	animation: gwc-pulse 2.2s ease-out infinite;
}
.gwc-me span {
	position: relative; display: block; width: 22px; height: 22px; border-radius: 50%;
	background: #2563eb; border: 4px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .35);
}
@keyframes gwc-pulse {
	0% { transform: scale(.6); opacity: 1; }
	100% { transform: scale(1.25); opacity: .35; }
}

/* ------------------------------------------------------------------ formulaire */
.gwc-modal {
	--gwc-primary: #0e7c66; --gwc-primary-dark: #0a5f4e; --gwc-muted: #5d6b70; --gwc-ink: #1b2a2f;
	font-size: 15px; line-height: 1.4;
	position: fixed; inset: 0; z-index: 100000;
	display: grid; place-items: center; padding: 16px;
	background: rgba(16, 28, 32, .5);
}
.gwc-modal[hidden] { display: none; }
.gwc-modal *, .gwc-modal *::before, .gwc-modal *::after { box-sizing: border-box; }
.gwc-modal button { font: inherit; cursor: pointer; }
.gwc-modal svg { width: 20px; height: 20px; flex: none; }
.gwc-modal-box {
	position: relative; width: 100%; max-width: 440px; max-height: calc(100vh - 32px); overflow-y: auto;
	padding: 24px; border-radius: 20px; background: #fff; color: var(--gwc-ink, #1b2a2f);
	box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
}
.gwc-modal-close { position: absolute; top: 14px; right: 14px; }
.gwc-modal-box h3 { margin: 0 40px 4px 0; font-size: 20px; }
.gwc-modal-intro { margin: 0 0 16px; color: var(--gwc-muted, #5d6b70); font-size: 14px; }
.gwc-form label { display: block; margin-bottom: 12px; font-weight: 600; font-size: 14px; }
.gwc-form input[type=text] {
	display: block; width: 100%; margin-top: 6px; height: 46px; padding: 0 12px;
	border: 1.5px solid #e3e8ea; border-radius: 12px; font: inherit; font-size: 16px; font-weight: 400;
}
.gwc-form input[type=text]:focus { outline: none; border-color: var(--gwc-primary, #0e7c66); }
.gwc-opt { color: var(--gwc-muted, #5d6b70); font-weight: 400; }
.gwc-where { margin-bottom: 12px; }
.gwc-where label { margin-bottom: 8px; }
.gwc-here {
	width: 100%; min-height: 42px; border: 1.5px dashed var(--gwc-primary, #0e7c66); border-radius: 12px;
	background: #f6fbf9; color: var(--gwc-primary-dark, #0a5f4e); font-weight: 600;
}
.gwc-here-ok { margin: 6px 0 0; color: var(--gwc-primary-dark, #0a5f4e); font-weight: 600; font-size: 14px; }
.gwc-form fieldset { margin: 0 0 12px; padding: 0; border: 0; }
.gwc-form legend { margin-bottom: 6px; font-weight: 600; font-size: 14px; }
.gwc-form .gwc-radio, .gwc-form .gwc-check { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-weight: 400; }
.gwc-form-msg { min-height: 1.2em; margin: 8px 0; font-size: 14px; }
.gwc-form-msg.is-error { color: #b42318; }
.gwc-form-msg.is-ok { color: var(--gwc-primary-dark, #0a5f4e); font-weight: 600; }
.gwc-submit {
	width: 100%; height: 48px; border: 0; border-radius: 12px;
	background: var(--gwc-primary, #0e7c66); color: #fff; font-weight: 700; font-size: 16px;
}
.gwc-submit:disabled { opacity: .6; }
.gwc-noscript { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; }

/* -------------------------------------------------------------------- mobile */
@container gwc (max-width: 719px) {
	.gwc-panel, .gwc-status, .gwc-add { font-size: 14px; }
	/* Mobile : une seule rangée qui défile au doigt, avec un fondu tant qu'il reste des filtres à droite. */
	.gwc-filters {
		flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain;
		-webkit-mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent);
		mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent);
	}
	.gwc-filters.is-end { -webkit-mask-image: none; mask-image: none; }
	.gwc-panel { top: 10px; left: 10px; right: 10px; bottom: 10px; width: auto; gap: 8px; }
	.gwc-bar { padding: 6px; gap: 6px; border-radius: 14px; }
	.gwc-or { display: none; }
	.gwc-locate { height: 44px; padding: 0 12px; }
	.gwc .gwc-input { height: 44px; }
	.gwc-sheet { margin-top: auto; max-height: 55%; border-radius: 18px; }
	/* Au-dessus du bouton « Ajouter », sans recouvrir les boutons de zoom à droite. */
	.gwc-status { left: 10px; bottom: 60px; transform: none; max-width: calc(100% - 80px); width: max-content; text-align: left; border-radius: 14px; }
	.gwc-add { left: 10px; bottom: 10px; height: 40px; }
	.gwc-has-sheet .gwc-status, .gwc-has-sheet .gwc-add, .gwc-has-sheet .leaflet-control-zoom { display: none; }
}
@media (max-width: 600px) {
	.gwc-modal { place-items: end center; padding: 0; }
	.gwc-modal-box { max-width: none; border-radius: 20px 20px 0 0; max-height: 92vh; }
}
@container gwc (max-width: 420px) {
	.gwc-locate span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
	.gwc-locate { width: 44px; padding: 0; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
	.gwc *, .gwc *::before, .gwc *::after { animation: none !important; transition: none !important; }
}
