:root {
	--popup-padding: 20px;
	--popup-background-color: #fff;
	--popup-fermer-svg-fill: #fff;
	--popup-fermer-background-color: #7f7a5a;
	--popup-fermer-background-color-hover: #020305;
	--infobox-telephone-color: #ba0000;
	--cluster-background-color: #ba0000;
	--cluster-background-color-fade: rgba(186, 0, 0, 0.2);
}

@media only screen and (min-width: 841px) {
	:root {
		--popup-padding: 50px;
	}
}

body.noscroll {
	height: 100%;
	overflow: hidden;
}

#popup-leaflet {
	display: none;
}

#popup-leaflet.afficher {
	display: flex;
	position: fixed;
	top: 0; left: 0;
	width: 100%; height: 100%;
	z-index: 100000;
	justify-content: center;
	align-items: center;
	padding: var(--popup-padding);
	background: var(--popup-background-color);
}

#popup-leaflet .fermer {
	position: absolute;
	top: 0; right: 0;
	width: 40px; height: 40px;
	z-index: 10;
	display: flex;
	justify-content: center;
	align-items: center;
	background: var(--popup-fermer-background-color);
}

#popup-leaflet .fermer svg {
	width: 18px;
}

#popup-leaflet .fermer svg * {
	fill: var(--popup-fermer-svg-fill);
}

#popup-leaflet .fermer:hover {
	cursor: pointer;
	background: var(--popup-fermer-background-color-hover);
}

@media only screen and (min-width: 841px) {
	
	#popup-leaflet .fermer {
		width: 50px; height: 50px;
	}
	
	#popup-leaflet .fermer svg {
		width: 22px;
	}

}

#popup-leaflet #leaflet {
	position: relative;
	z-index: 5;
	width: 100%;
	height: 100%;
}

.leaflet-popup-content .titre {
	font-weight: bold;
}

.leaflet-popup-content .telephone {
	font-weight: bold;
	margin-top: 5px;
	color: var(--infobox-telephone-color);
}

/* Clusters */

.leaflet-cluster-anim .leaflet-marker-icon, .leaflet-cluster-anim .leaflet-marker-shadow {
	-webkit-transition: -webkit-transform 0.3s ease-out, opacity 0.3s ease-in;
	-moz-transition: -moz-transform 0.3s ease-out, opacity 0.3s ease-in;
	-o-transition: -o-transform 0.3s ease-out, opacity 0.3s ease-in;
	transition: transform 0.3s ease-out, opacity 0.3s ease-in;
}

.leaflet-cluster-spider-leg {
	-webkit-transition: -webkit-stroke-dashoffset 0.3s ease-out, -webkit-stroke-opacity 0.3s ease-in;
	-moz-transition: -moz-stroke-dashoffset 0.3s ease-out, -moz-stroke-opacity 0.3s ease-in;
	-o-transition: -o-stroke-dashoffset 0.3s ease-out, -o-stroke-opacity 0.3s ease-in;
	transition: stroke-dashoffset 0.3s ease-out, stroke-opacity 0.3s ease-in;
}

.marker-cluster-small {
	background-color: var(--cluster-background-color-fade);
}
.marker-cluster-small div {
	background-color: var(--cluster-background-color);
}

.marker-cluster-medium {
	background-color: var(--cluster-background-color-fade);
}
.marker-cluster-medium div {
	background-color: var(--cluster-background-color);
}

.marker-cluster-large {
	background-color: var(--cluster-background-color-fade);
}
.marker-cluster-large div {
	background-color: var(--cluster-background-color);
}

.marker-cluster {
	background-clip: padding-box;
	border-radius: 20px;
}
.marker-cluster div {
	width: 30px;
	height: 30px;
	margin-left: 5px;
	margin-top: 5px;
	text-align: center;
	border-radius: 15px;
	font: bold 12px "Helvetica Neue", Arial, Helvetica, sans-serif;
	color: #fff;
}
.marker-cluster span {
	line-height: 30px;
}

/*
<div id="carte-pharmacies">
	<div class="textes">
		<form class="recherche">';
			<input type="search" name="recherche" placeholder="'.esc_attr($placeholder).'">';
			<button type="submit" class="rechercher">'.$bouton.'</button>';
		</form>';
		<div class="resultats"></div>
	</div>
	<div id="leaflet"></div>
</div>
*/

#carte-pharmacies {
	display: grid;
	grid-template-columns: 300px auto;
}

#carte-pharmacies .textes {
	display: grid;
	grid-template-rows: 60px auto;
	background: #fff;
}

#carte-pharmacies .textes .recherche {
	height: 50px;
	display: grid;
	grid-template-columns: auto 40px;
	padding: 10px;
	gap: 10px;
}

#carte-pharmacies .textes .recherche input {
	-moz-appearance: none;
	-webkit-appearance: none;
	appearance: none;
	border: none;
	background: #7f7a5a;
	color: #fff;
	height: 40px;
	padding: 0 10px;
	line-height: 40px;
	font: inherit;
	border-radius: none;
}
#carte-pharmacies .textes .recherche input::placeholder {
	color: #fff;
	opacity: 0.8;
}

#carte-pharmacies .textes .recherche button {
	-moz-appearance: none;
	-webkit-appearance: none;
	appearance: none;
	background: #020305;
	width: 40px; height: 40px;
	display: flex;
	justify-content: center;
	align-items: center;
	border: none;
}

#carte-pharmacies .textes .recherche button:hover {
	cursor: pointer;
}

#carte-pharmacies .textes .recherche button svg {
	width: 20px;
	height: auto;
}
#carte-pharmacies .textes .recherche button svg * {
	fill: #fff;
}

#carte-pharmacies .textes .resultats {
	padding: 10px;
	height: calc(500px - 60px);
	overflow: scroll;
}

#carte-pharmacies .textes .resultats .marqueur-leaflet {
	padding: 10px 0;
	line-height: 20px;
}

#carte-pharmacies .textes .resultats .marqueur-leaflet:hover {
	cursor: pointer;
}

#carte-pharmacies .textes .resultats .marqueur-leaflet .titre {
	font-weight: bold;
}

#carte-pharmacies .textes .resultats .marqueur-leaflet:hover .titre {
	color: var(--infobox-telephone-color);
}

#carte-pharmacies .textes .resultats .marqueur-leaflet .adresse {
	font-size: 0.8em;
}

#carte-pharmacies .textes .resultats .marqueur-leaflet .telephone {
	font-size: 0.8em;
	color: var(--infobox-telephone-color);
}

#carte-pharmacies .textes .resultats .marqueur-leaflet + .marqueur-leaflet {
	border-top: 1px solid rgba(55, 55, 55, 0.2);
}

@media only screen and (max-width: 840px) {
	
	#carte-pharmacies {
		display: block;
	}
	
	#carte-pharmacies .textes .resultats {
		display: none;
	}

}

#carte-pharmacies #leaflet {
	width: 100%;
	height: 500px;
}
