/* Overlay Search V3 only. Chip / search / select visuals stay in Elementor. */
.elementor-element-c7srch1 .e-search-results-container {
	display: none !important;
}

/* Subcategory chips: wrap on several lines, no horizontal scroll */
.elementor-element-c7taxf1 .e-filter,
.elementor-element-61773347 .e-filter {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	overflow-x: visible;
	overflow-y: visible;
	white-space: normal;
	width: 100%;
	max-width: 100%;
}

.elementor-element-c7taxf1 .e-filter-item,
.elementor-element-61773347 .e-filter-item {
	flex: 0 1 auto;
	white-space: normal;
}

/* Hide chips row container (padding/gap) when no category is selected */
.elementor-element-61773347.cem-annuaire-chips-host--hidden,
[data-id="61773347"].cem-annuaire-chips-host--hidden {
	display: none !important;
}

/* —— Map layout (toggle look stays in Elementor global classes) —— */
/* Zone carte stays hidden in list view; Elementor already sets display:none on 3609de5f. */

.elementor-element-42dc5792.cem-annuaire--map {
	display: flex !important;
	flex-direction: row !important;
	flex-wrap: nowrap !important;
	align-items: flex-start !important;
	gap: 24px !important;
}

.elementor-element-42dc5792.cem-annuaire--map .elementor-element-1406433b {
	flex: 0 0 38%;
	max-width: 38%;
	min-width: 0;
}

/*
 * !important required: Elementor V4 stores display:none on 3609de5f (Zone carte)
 * in the local class styles, which otherwise wins over our map-mode rule.
 */
.elementor-element-42dc5792.cem-annuaire--map .elementor-element-3609de5f {
	display: flex !important;
	flex: 1 1 62%;
	max-width: 62%;
	min-width: 0;
	min-height: 480px;
	position: sticky;
	top: 1rem;
	align-self: flex-start;
}

.elementor-element-42dc5792.cem-annuaire--map .elementor-element-c7loop1 .elementor-grid {
	grid-template-columns: 1fr !important;
}

.cem-annuaire-map {
	width: 100%;
	height: min(80vh, 640px);
	min-height: 480px;
	border-radius: 8px;
	overflow: hidden;
	background: #e8e8e8;
	position: relative;
}

/* MarkerCluster custom icons */
.cem-annuaire-cluster {
	background: #d31451;
	border-radius: 50%;
	color: #fff;
	font-family: Mulish, sans-serif;
	font-weight: 700;
	font-size: 14px;
	line-height: 40px;
	text-align: center;
	width: 40px !important;
	height: 40px !important;
	margin-left: -20px !important;
	margin-top: -20px !important;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.cem-annuaire-cluster span {
	display: block;
	line-height: 40px;
}

/* Pagination */
.cem-annuaire-pager-wrap {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	margin-top: 24px;
	width: 100%;
}

.cem-annuaire-pager {
	display: flex;
	align-items: center;
	gap: 12px;
}

.cem-annuaire-pager button {
	font-family: Mulish, sans-serif;
	font-size: 14px;
	font-weight: 700;
	padding: 8px 16px;
	border-radius: 999px;
	border: 1px solid #e5e7eb;
	background: #fff;
	color: #4f4c4d;
	cursor: pointer;
}

.cem-annuaire-pager button:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

.cem-annuaire-pager__status {
	font-family: Mulish, sans-serif;
	font-size: 14px;
	color: #6b7177;
}

.e-loop-item.cem-annuaire-page-hide {
	display: none !important;
}

@media (max-width: 1024px) {
	.elementor-element-42dc5792.cem-annuaire--map {
		flex-direction: column !important;
	}

	/* Map first, list + pager below */
	.elementor-element-42dc5792.cem-annuaire--map .elementor-element-3609de5f {
		order: -1;
		flex: 0 0 auto;
		max-width: 100%;
		width: 100%;
		position: static;
		top: auto;
		min-height: 0;
		align-self: stretch;
	}

	.elementor-element-42dc5792.cem-annuaire--map .elementor-element-1406433b {
		order: 0;
		flex: 1 1 auto;
		max-width: 100%;
		width: 100%;
		position: static;
	}

	.elementor-element-42dc5792.cem-annuaire--map .cem-annuaire-map {
		height: 420px;
		min-height: 420px;
	}
}

@media (max-width: 767px) {
	.elementor-element-42dc5792.cem-annuaire--map .cem-annuaire-map {
		height: 360px;
		min-height: 360px;
	}
}

/* Expand overlay (not Fullscreen API — works on iOS) */
.cem-annuaire-map-backdrop {
	position: fixed;
	inset: 0;
	z-index: 100040;
	background: rgba(17, 24, 39, 0.6);
	border: 0;
	border-radius: 0;
	padding: 0;
	margin: 0;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
	box-shadow: none;
	outline: none;
}

.cem-annuaire-map.cem-annuaire-map--expanded {
	position: fixed !important;
	inset: 16px;
	z-index: 100050;
	width: auto !important;
	height: auto !important;
	min-height: 0 !important;
	border-radius: 12px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

body.cem-annuaire-map-expanded-lock {
	overflow: hidden;
}

.leaflet-control.cem-annuaire-map-expand a {
	all: unset;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	line-height: 1;
	cursor: pointer;
	text-decoration: none;
	color: #333;
	background: #fff;
	border-radius: 0;
	border: 0;
	padding: 0;
	margin: 0;
	font: inherit;
	box-shadow: none;
	appearance: none;
	-webkit-appearance: none;
}

.leaflet-control.cem-annuaire-map-expand a:hover {
	background: #f4f4f4;
}

.leaflet-control.cem-annuaire-map-expand svg {
	width: 16px;
	height: 16px;
	display: block;
	pointer-events: none;
}
