/**
 * Hero accueil : barre de recherche au-dessus de la carte France (resto + hôtel).
 */

.kl-section-hero-home,
.kl-hero-home {
	position: relative;
	z-index: 120;
	overflow: visible;
}

.kl-hero-home__lcp {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	z-index: 0;
	pointer-events: none;
}

.kl-hero-home > .container {
	position: relative;
	z-index: 1;
}

.kl-hero-home__search {
	position: relative;
	z-index: 130;
	overflow: visible;
	min-height: auto;
}

.kl-hero-home .kl-search-establishment {
	position: relative;
	z-index: 131;
	overflow: visible;
}

.kl-hero-home .kl-search-establishment__form {
	overflow: visible;
}

.kl-hero-home .kl-search-establishment__item .dropdown {
	position: static;
}

@media (min-width: 992px) {
	.kl-hero-home .kl-search-establishment__item .dropdown {
		position: relative;
	}
}

.kl-hero-home .kl-search-establishment .dropdown-menu,
.kl-hero-home .kl-search-establishment .dropdown-menu.show {
	z-index: 10100 !important;
	max-height: min(320px, 50vh);
	overflow-y: auto;
}

/*
 * Tom Select (#field-villes) : dropdownParent body (custom-select.js).
 * Sur l'accueil, listing-progressive.css n'est pas chargé — ces règles
 * doivent vivre ici pour passer au-dessus de la carte France (z-index ~20).
 */
body > .ts-dropdown {
	z-index: 10100 !important;
	margin-top: 4px;
	max-height: none;
	overflow: visible;
	box-sizing: border-box;
}

body > .ts-dropdown .ts-dropdown-content {
	max-height: min(320px, 50vh);
	overflow-y: auto;
	overscroll-behavior: contain;
}

body > .ts-dropdown .optgroup:first-child .optgroup-header {
	padding-top: 8px;
}

.kl-hero-home .kl-search-establishment__item[data-field="search"] .kl-search {
	overflow: visible;
	position: relative;
}

.kl-hero-home .kl-search .kl-autocomplete-results,
.kl-hero-home .kl-search .kl-autocomplete-results.is-open {
	z-index: 10200 !important;
	position: absolute !important;
}

.kl-hero-home .kl-search .kl-autocomplete-results--loading {
	z-index: 10201 !important;
}

/* Carte France : sous la barre de recherche du hero */
.kl-section-map-groupe-france {
	position: relative;
	z-index: 10;
}

/* Listing (hub + sous-pages) : barre intégrée au-dessus de la carte split */
.kl-linsting-cpt .kl-linsting-cpt__search--row--integrated,
.kl-linsting-cpt__search--filters .kl-search-establishment {
	position: relative;
	z-index: 100;
	isolation: isolate;
	overflow: visible;
}

.kl-linsting-cpt .kl-search-establishment .dropdown-menu,
.kl-linsting-cpt .kl-search-establishment .dropdown-menu.show,
.kl-linsting-cpt .kl-search-establishment .ts-dropdown,
.kl-linsting-cpt .kl-search-establishment .ts-dropdown-content {
	z-index: 10100 !important;
}

/* Bootstrap display=static : menu sous le champ, jamais flip vers le haut. */
.kl-search-establishment .dropdown-menu {
	position: absolute !important;
	top: 100% !important;
	bottom: auto !important;
	left: 0 !important;
	right: auto !important;
	transform: none !important;
	inset: auto !important;
	margin-top: 4px;
	width: 100% !important;
	min-width: 0 !important;
	max-width: 100% !important;
	box-sizing: border-box;
	max-height: min(320px, 50vh);
	overflow-y: auto;
}

.kl-search-establishment__item[data-field="rayon"] .dropdown-menu,
.kl-search-establishment__item[data-field="specificites"] .dropdown-menu {
	max-width: min(280px, 100%) !important;
}
