/**
 * Composant « lv-select » — menu déroulant custom partagé.
 *
 * Amélioration progressive d'un <select> natif (assets/js/lv-select.js) :
 * même rendu que les combos du store locator Concessionnaires
 * (assets/css/concessionnaires.css). Variantes : --dark (footer anthracite),
 * --up (menu vers le haut), --compact (hauteur réduite, sans libellé interne).
 */

.lv-select {
	position: relative;
	width: 100%;
}

/* Select natif conservé dans le DOM (formulaires / scripts) mais masqué. */
.lv-select__native {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
	clip-path: inset(50%) !important;
	white-space: nowrap !important;
}

/* Les états :hover/:focus/:active neutralisent le style de bouton
   GeneratePress (fond anthracite + texte blanc), plus spécifique que la
   classe seule — même parade que pour les combos Concessionnaires. */
.lv-select__btn,
.lv-select__btn:hover,
.lv-select__btn:focus,
.lv-select__btn:active {
	width: 100%;
	height: 58px;
	padding: 8px 20px;
	border-radius: 16px;
	border: 1px solid rgba(161, 116, 81, 0.22);
	background: rgba(126, 74, 37, 0.06);
	color: #28201b;
	cursor: pointer;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: flex-start;
	text-align: left;
	transition: border-color 220ms ease;
}

.lv-select__btn:hover,
.lv-select__btn:focus {
	background: rgba(126, 74, 37, 0.1);
}

.lv-select.is-open .lv-select__btn { border-color: #c09a53; }

.lv-select__label {
	font-family: 'Open Sans', sans-serif;
	font-size: 11px;
	letter-spacing: 0.28em;
	text-transform: uppercase;
	color: #a17451;
	margin-bottom: 2px;
}

.lv-select__value-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	width: 100%;
	font-family: 'Baskervville', serif;
	font-size: 17px;
	color: #28201b;
}

.lv-select__value {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.lv-select__value.is-default { color: rgba(40, 32, 27, 0.55); }

.lv-select__value-row svg {
	flex-shrink: 0;
	margin-left: 10px;
	transition: transform 220ms ease;
	color: #a17451;
}

.lv-select.is-open .lv-select__value-row svg { transform: rotate(180deg); }

.lv-select__menu {
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
	right: 0;
	background: #fefcfb;
	border-radius: 16px;
	border: 1px solid rgba(161, 116, 81, 0.22);
	box-shadow: 0 30px 60px -20px rgba(46, 31, 20, 0.25);
	padding: 8px;
	z-index: 30;
	max-height: 320px;
	overflow-y: auto;
}

.lv-select__opt,
.lv-select__opt:hover,
.lv-select__opt:focus,
.lv-select__opt:active {
	width: 100%;
	text-align: left;
	padding: 10px 14px;
	border-radius: 10px;
	border: none;
	background: transparent;
	cursor: pointer;
	font-family: 'Baskervville', serif;
	font-size: 16px;
	color: #28201b;
}

.lv-select__opt:hover,
.lv-select__opt:focus {
	background: rgba(126, 74, 37, 0.06);
}

.lv-select__opt.is-active,
.lv-select__opt.is-active:hover,
.lv-select__opt.is-active:focus {
	background: rgba(192, 154, 83, 0.18);
	color: #73632f;
}

/* Valeurs inatteignables (filtrage facetté de la recherche). */
.lv-select__opt.is-disabled,
.lv-select__opt.is-disabled:hover,
.lv-select__opt.is-disabled:focus {
	opacity: 0.35;
	cursor: default;
	background: transparent;
}

/* ── Variante compacte (sans libellé interne) ─────────────────── */

.lv-select--compact .lv-select__btn,
.lv-select--compact .lv-select__btn:hover,
.lv-select--compact .lv-select__btn:focus,
.lv-select--compact .lv-select__btn:active {
	height: 46px;
	padding: 0 16px;
	border-radius: 12px;
}

.lv-select--compact .lv-select__value-row { font-size: 15px; }

/* ── Variante « menu vers le haut » (footer) ──────────────────── */

.lv-select--up .lv-select__menu {
	top: auto;
	bottom: calc(100% + 8px);
}

/* ── Variante sombre (footer anthracite --main-2) ─────────────── */

.lv-select--dark .lv-select__btn,
.lv-select--dark .lv-select__btn:hover,
.lv-select--dark .lv-select__btn:focus,
.lv-select--dark .lv-select__btn:active {
	border-color: rgba(255, 255, 255, 0.16);
	background: rgba(255, 255, 255, 0.06);
	color: #f9f7f2;
}

.lv-select--dark .lv-select__btn:hover,
.lv-select--dark .lv-select__btn:focus {
	background: rgba(255, 255, 255, 0.1);
}

.lv-select--dark.is-open .lv-select__btn { border-color: #c09a53; }

.lv-select--dark .lv-select__value-row { color: #f9f7f2; }
.lv-select--dark .lv-select__value.is-default { color: rgba(249, 247, 242, 0.6); }
.lv-select--dark .lv-select__value-row svg { color: #c09a53; }

.lv-select--dark .lv-select__menu {
	background: #2f3336;
	border-color: rgba(255, 255, 255, 0.12);
	box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.5);
}

.lv-select--dark .lv-select__opt,
.lv-select--dark .lv-select__opt:hover,
.lv-select--dark .lv-select__opt:focus,
.lv-select--dark .lv-select__opt:active {
	color: #f9f7f2;
}

.lv-select--dark .lv-select__opt:hover,
.lv-select--dark .lv-select__opt:focus {
	background: rgba(192, 154, 83, 0.12);
}

.lv-select--dark .lv-select__opt.is-active,
.lv-select--dark .lv-select__opt.is-active:hover,
.lv-select--dark .lv-select__opt.is-active:focus {
	background: rgba(192, 154, 83, 0.2);
	color: #c09a53;
}

/* ── Sélecteur de langue du footer ────────────────────────────── */

/* Le select natif masqué ne donne plus de largeur au bloc Polylang. */
#lv-site-footer .wp-block-polylang-language-switcher { min-width: 168px; }
