/* Styles principaux pour Up Leaflet KMZ Map */
:root{
	--tooltip-bg: rgba(0, 0, 0, 0.85);
	--tooltip-txt: #fff;
	--popup-bg: #fff;
	--popup-txt: #333;
}
.up-leaflet-kmz-container {
	position: relative;
	margin: 20px 0;
	border: 1px solid #ddd;
	border-radius: 8px;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
	overflow: hidden;
	background-color: #f9f9f9;
	display: flex;
}

/* Agencement des Sidebars */
.up-leaflet-kmz-container.up-layout-sidebar-left {
	flex-direction: row;
}

.up-leaflet-kmz-container.up-layout-sidebar-right {
	flex-direction: row-reverse;
}

.up-leaflet-kmz-container.up-layout-classic {
	display: block;
}

.up-leaflet-kmz-map-canvas {
	flex: 1;
	height: 100%;
}

/* Style de la barre latérale */
.up-map-sidebar {
	width: 260px;
	height: 100%;
	background-color: #fff;
	border-right: 1px solid #ddd;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	z-index: 10;
}

.up-layout-sidebar-right .up-map-sidebar {
	border-right: none;
	border-left: 1px solid #ddd;
}

.up-sidebar-header {
	background-color: #f7f9fa;
	padding: 15px;
	font-weight: bold;
	font-size: 15px;
	color: #2c3e50;
	border-bottom: 1px solid #eee;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.up-sidebar-list {
	flex: 1;
	overflow-y: auto;
	padding: 10px 0;
}

.up-sidebar-loading, .up-sidebar-empty {
	padding: 20px;
	text-align: center;
	color: #7f8c8d;
	font-style: italic;
	font-size: 13px;
}

.up-sidebar-item {
	padding: 12px 20px;
	border-bottom: 1px solid #f5f6f7;
	cursor: pointer;
	font-weight: 500;
	color: #34495e;
	transition: all 0.2s ease;
	display: flex;
	align-items: center;
	gap: 10px;
}

.up-sidebar-item::before {
	content: "📍";
	font-size: 14px;
}

.up-sidebar-item:hover {
	background-color: #f1f5f9;
	color: #0073aa;
}

.up-sidebar-item.active {
	background-color: #e2e8f0;
	color: #005177;
	border-left: 4px solid #0073aa;
	padding-left: 16px;
}

/* Responsive pour mobile */
@media (max-width: 768px) {
	.up-leaflet-kmz-container.up-layout-sidebar-left,
	.up-leaflet-kmz-container.up-layout-sidebar-right {
		flex-direction: column;
	}
	
	.up-map-sidebar {
		width: 100%;
		height: 180px;
		border-right: none;
		border-left: none;
		border-bottom: 1px solid #ddd;
	}
	
	.up-layout-sidebar-right .up-map-sidebar {
		border-top: 1px solid #ddd;
		border-bottom: none;
	}

}

/* Personnalisation des Popups Leaflet */
.up-leaflet-kmz-container .leaflet-popup-content-wrapper {
	border-radius: 6px;
	padding: 5px;
	box-shadow: 0 3px 14px rgba(0,0,0,0.2);
	background-color: var(--popup-bg);
}
.up-leaflet-kmz-container .leaflet-popup-tip{
	background-color: var(--popup-bg);
}
.up-leaflet-kmz-container .leaflet-container a.leaflet-popup-close-button{
	color: var(--popup-txt);
}

.up-leaflet-kmz-container .leaflet-popup-content {
	margin: 10px 12px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	font-size: 14px;
	line-height: 1.4;
	color: var(--popup-txt);
}

/* Popup Zone d'intervention (Succès / Contact) */
.up-leaflet-popup-inside {
	text-align: center;
}

.up-leaflet-popup-inside .up-popup-title {
	font-weight: bold;
	color: #27ae60;
	margin-bottom: 8px;
	font-size: 15px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
}

.up-leaflet-popup-inside .up-contact-btn {
	display: inline-block;
	background-color: #0073aa;
	color: #fff !important;
	text-decoration: none !important;
	padding: 8px 16px;
	border-radius: 4px;
	font-weight: 600;
	margin-top: 10px;
	transition: background-color 0.2s ease;
}

.up-leaflet-popup-inside .up-contact-btn:hover {
	background-color: #005177;
}

/* Popup Hors Zone d'intervention */
.up-leaflet-popup-outside {
	text-align: center;
}

.up-leaflet-popup-outside .up-popup-title {
	font-weight: bold;
	color: #c0392b;
	margin-bottom: 8px;
	font-size: 15px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
}

.up-leaflet-popup-outside .up-msg-content {
	color: #555;
	font-size: 13px;
}

/* Loader pendant le chargement du fichier KMZ */
.up-map-loader {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(255, 255, 255, 0.8);
	z-index: 1000;
	display: flex;
	justify-content: center;
	align-items: center;
	flex-direction: column;
	font-family: sans-serif;
	font-size: 16px;
	color: #333;
	transition: opacity 0.3s ease;
}

.up-map-loader.hidden {
	opacity: 0;
	pointer-events: none;
}

.up-spinner {
	border: 4px solid #f3f3f3;
	border-top: 4px solid #3498db;
	border-radius: 50%;
	width: 40px;
	height: 40px;
	animation: up-spin 1s linear infinite;
	margin-bottom: 12px;
}

@keyframes up-spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

/* Styles pour les marqueurs personnalisés SVG */
.custom-svg-marker {
	background: none !important;
	border: none !important;
	box-shadow: none !important;
	display: flex !important;
	justify-content: center;
	align-items: center;
}
.up-svg-marker-wrapper {
	width: 32px !important;
	height: 32px !important;
	display: flex !important;
	justify-content: center;
	align-items: center;
}
.custom-svg-marker svg {
	display: block;
	width: 32px !important;
	height: 32px !important;
	max-width: 32px !important;
	max-height: 32px !important;
}

/* Styles pour les étiquettes de zone permanentes */
.up-zone-permanent-label {
	background-color: rgba(255, 255, 255, 0.85) !important;
	border: 1px solid #ccd0d4 !important;
	border-radius: 4px !important;
	padding: 4px 8px !important;
	font-size: 11px !important;
	font-weight: bold !important;
	color: #2c3e50 !important;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15) !important;
	white-space: nowrap !important;
	pointer-events: none !important; /* Ne bloque pas le clic sur la carte/zone sous-jacente */
}

/* Enlever la flèche par défaut de Leaflet Tooltip */
.up-zone-permanent-label::before {
	display: none !important;
}

/* Styles pour le tooltip de survol dynamique */
.up-hover-tooltip {
	position: absolute;
	pointer-events: none; /* Crucial pour ne pas bloquer les événements de souris sous-jacents */
	z-index: 99999;
	background: var(--tooltip-bg, rgba(0, 0, 0, 0.85));

	color: var(--tooltip-txt, #fff);
	padding: .75rem;
	border-radius: 4px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	font-size: 12px;
	font-weight: bold;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
	white-space: nowrap;
	transition: opacity 0.1s ease;
}
.up-hover-tooltip.hidden {
	display: none !important;
}

/* Masquer tous les tooltips Leaflet natifs quand l'option "never" est activée */
.up-leaflet-kmz-container.up-hide-tooltips .leaflet-tooltip {
	display: none !important;
}
.up-leaflet-kmz-container.up-hide-tooltips .leaflet-tooltip-pane {
	display: none !important;
}
 /* img.leaflet-tile{
    filter: invert(100%) hue-rotate(180deg) brightness(95%) contrast(90%);
} */
