/* ─── Carte interactive Leaflet ─── */

.gpc-map-container {
	padding: 2rem;
	background-color: #f8f9fa;
	border-radius: 8px;
}

.gpc-map-container h2 {
	font-size: 1.75rem;
	font-weight: 700;
	color: #1f2937;
}

.gpc-map-description {
	color: #6b7280;
	font-size: 0.95rem;
}

/* ─── Conteneur parent ─── */
.gpc-map-wrapper {
	display: flex;
	justify-content: center;
	width: 100%;
	margin: 0;
	padding: 0;
}

/* ─── Conteneur de la carte ─── */
#gpc-map {
	width: 100%;
	max-width: 680px;
	height: auto;
	aspect-ratio: 1 / 1;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 16px 40px rgba(2, 8, 23, 0.2);
	margin: 0 auto;
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
	.gpc-map-container {
		padding: 1rem;
	}

	.gpc-map-container h2 {
		font-size: 1.5rem;
	}
}

/* ─── Styles Leaflet personnalisés ─── */

.gpc-map-popup .leaflet-popup-content p {
	margin: 0 !important;
}

.leaflet-container .gpc-map-popup a,
.leaflet-container .gpc-map-popup a:hover,
.leaflet-container .gpc-map-popup a:focus-visible {
	color: white;
}

.gpc-map-popup .leaflet-popup-content-wrapper {
	background-color: rgba(255, 255, 255, 0.96);
	border-radius: 12px;
	box-shadow: 0 12px 30px rgba(2, 8, 23, 0.16);
	border: none;
	padding: 1rem 0 0.2rem 0;
	backdrop-filter: blur(6px);
}

.gpc-map-popup .leaflet-popup-content {
	width: auto;
	padding: 0;
}

.gpc-map-popup .leaflet-popup-tip {
	background-color: rgba(255, 255, 255, 0.96);
	border: none;
}

.leaflet-container .gpc-map-popup .leaflet-popup-close-button {
	position: absolute;
	top: 0.35rem !important;
	right: 0.35rem !important;
	width: 1.35rem !important;
	height: 1.35rem !important;
	font-size: 1.1rem !important;
	font-weight: 700 !important;
	color: var(--fcspe-color-blue-dark) !important;
	line-height: 1 !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	transform: translateY(1px) !important;
	z-index: 9999 !important;
}

.gpc-map-popup .leaflet-popup-close-button:hover,
.gpc-map-popup .leaflet-popup-close-button:focus-visible {
	opacity: 1;
	color: var(--fcspe-color-blue-dark);
}

/* ─── Contenu de la popup ─── */
.gpc-popup-content {
	display: grid;
	gap: 1.5rem;
	min-width: 0;
}

.gpc-popup-info {
	display: grid;
	gap: 0.35rem;
}

.gpc-popup-title {
	margin: 0;
	font-size: 1rem;
	font-weight: 700;
	color: #111827;
	line-height: 1.25;
}

.gpc-popup-address {
	margin: 0;
	font-size: 0.85rem;
	font-weight: 400;
	color: #4b5563;
	line-height: 1.35;
}

.gpc-popup-formations {
	display: inline-flex;
	align-items: baseline;
	gap: 0.35rem;
	margin: 0;
	border-radius: 10px;
	font-size: 0.85rem;
	color: #1e293b;
	font-weight: bold;
	line-height: 1.25;
	width: fit-content;
}

.gpc-popup-formations__count {
	color: var(--fcspe-color-orange);
	font-weight: 700;
}

.gpc-popup-formations__label {
	font-weight: bold;
}

.gpc-popup-cta {
	display: flex;
	justify-content: flex-end;
}

.gpc-popup-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.45rem 1rem;
	background-color: var(--fcspe-color-orange);
	color: var(--fcspe-color-text-light);
	text-decoration: none;
	border-radius: 9999px;
	font-weight: 700;
	font-size: 0.88rem;
	border: 0;
	box-shadow: none;
	transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.gpc-popup-link:active {
	transform: translateY(0);
}

/* ─── Tooltip minimal au survol ─── */
.gpc-marker-tooltip {
	background: rgba(17, 24, 39, 0.95) !important;
	color: #fff !important;
	padding: 4px 8px !important;
	border-radius: 4px !important;
	font-size: 0.82rem !important;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12) !important;
}

/* ─── Masquage de l'élément JSON ─── */
.gpc-map-data {
	display: none;
}

/* ─── Bulle d'indication pour l'activation du zoom molette ─── */
.gpc-map-hint {
	position: absolute;
	top: 8px;
	left: 8px;
	background: rgba(17, 24, 39, 0.9);
	color: #ffffff;
	padding: 6px 10px;
	font-size: 0.78rem;
	border-radius: 9999px;
	z-index: 1200;
	pointer-events: none;
	opacity: 0.95;
}

.gpc-map-hint--hidden { display: none; }