/*
 * Nova Filters widget — base styles
 */

.nova-filters-form {
    --nova-filters-cols: 12;
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

/* The FOUC prevention is now handled globally at the Elementor widget wrapper level
   (see add_js_detection_script() + widget-reveal.js). The data-nova-state attribute
   may still be set on the form for backwards compat, but it no longer drives visibility. */

.nova-filters-fields {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 16px;
    width: 100%;
}

.nova-filter-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    grid-column: span 12;
    min-width: 0;
    position: relative;
}

.nova-filter-field--w-3  { grid-column: span 3; }
.nova-filter-field--w-4  { grid-column: span 4; }
.nova-filter-field--w-6  { grid-column: span 6; }
.nova-filter-field--w-8  { grid-column: span 8; }
.nova-filter-field--w-9  { grid-column: span 9; }
.nova-filter-field--w-12 { grid-column: span 12; }

@media (max-width: 1024px) {
    .nova-filter-field--w-3,
    .nova-filter-field--w-4 { grid-column: span 6; }
    .nova-filter-field--w-8,
    .nova-filter-field--w-9 { grid-column: span 12; }
}

@media (max-width: 600px) {
    .nova-filter-field { grid-column: span 12; }
}

.nova-filter-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
    line-height: 1.2;
}

.nova-filter-required {
    color: #d92121;
    font-weight: 700;
}

.nova-filter-input,
.nova-filter-select,
.nova-filter-textarea {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 100%;
    box-sizing: border-box;
    padding: 10px 14px;
    border: 1px solid #d6d6d6;
    border-radius: 8px;
    background-color: #ffffff;
    color: inherit;
    font: inherit;
    line-height: 1.4;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.nova-filter-textarea {
    resize: vertical;
    min-height: 80px;
}

/* .nova-filter-select {
    background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
                      linear-gradient(135deg, currentColor 50%, transparent 50%);
    background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    padding-right: 36px;
} */

.nova-filter-input:focus,
.nova-filter-select:focus,
.nova-filter-textarea:focus {
    outline: none;
    border-color: #01ABC4;
    box-shadow: 0 0 0 3px rgba(6, 102, 221, 0.18);
}

.nova-filter-input--range {
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none;
    height: 24px;
}

/* ----- Range (noUiSlider) — trigger like NiceSelect ----- */
.nova-filter-field--range {
    position: relative;
}

.nova-filter-field--range:has(.nova-filter-range.open) {
    z-index: 60;
}

.nova-filter-range {
    position: relative;
    width: 100%;
}

.nova-filter-range-trigger {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 44px;
    padding: 10px 36px 10px 14px;
    margin: 0;
    border: 1px solid #d6d6d6;
    border-radius: 8px;
    background-color: #ffffff;
    box-shadow: none;
    font: inherit;
    font-size: inherit;
    font-weight: 500;
    line-height: 1.4;
    color: inherit;
    text-align: left;
    cursor: pointer;
    appearance: none;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

.nova-filter-range-trigger:hover,
.nova-filter-range.open .nova-filter-range-trigger,
.nova-filter-range-trigger:focus {
    outline: none;
    border-color: #01ABC4;
    box-shadow: 0 0 0 3px rgba(6, 102, 221, 0.18);
}

.nova-filter-range-trigger::after {
    content: "";
    position: absolute;
    right: 14px;
    top: 50%;
    width: 8px;
    height: 8px;
    margin-top: -6px;
    border: solid currentColor;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    pointer-events: none;
    transition: transform 0.15s ease;
}

.nova-filter-range.open .nova-filter-range-trigger::after {
    transform: rotate(-135deg);
    margin-top: -2px;
}

.nova-filter-range-display {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-height: 1.3em;
}

.nova-filter-range-panel {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 8px);
    z-index: 1000;
    padding: 16px 18px 18px;
    background: #ffffff;
    border: 1px solid #e6e6e6;
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
    min-width: 260px;
}

.nova-filter-range-panel[hidden] {
    display: none !important;
}

.nova-filter-range-track {
    height: 6px;
    margin: 4px 4px 2px;
}

.nova-filter-range-track .noUi-target {
    background: #e8eaf3;
    border: none;
    border-radius: 999px;
    box-shadow: none;
}

.nova-filter-range-track .noUi-connect {
    background: #01ABC4;
}

.nova-filter-range-track .noUi-handle {
    width: 20px;
    height: 20px;
    right: -10px;
    top: -7px;
    border-radius: 50%;
    border: 2px solid #01ABC4;
    background: #fff;
    box-shadow: 0 1px 4px rgba(16, 24, 40, 0.12);
    cursor: grab;
}

.nova-filter-range-track .noUi-handle::before,
.nova-filter-range-track .noUi-handle::after {
    display: none;
}

.nova-filter-range-track .noUi-handle:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(6, 102, 221, 0.2);
}

.nova-filter-radio-group,
.nova-filter-checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
}

.nova-filter-radio,
.nova-filter-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    line-height: 1.3;
}

.nova-filter-radio input,
.nova-filter-checkbox input {
    margin: 0;
    cursor: pointer;
}

.nova-filter-help {
    display: block;
    font-size: 0.85em;
    color: #6b6b6b;
    line-height: 1.4;
}

/* ----- Actions ----- */
.nova-filters-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.nova-filters-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: 1px solid transparent;
    border-radius: 8px;
    background-color: #01ABC4;
    color: #ffffff;
    font: inherit;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.05s ease;
}

.nova-filters-submit:hover,
.nova-filters-submit:focus {
    background-color: #0552b3;
    outline: none;
}

.nova-filters-submit:active {
    transform: translateY(1px);
}

.nova-filters-submit--full { flex: 1 1 100%; }
.nova-filters-submit--half { flex: 1 1 50%; }
.nova-filters-submit--auto { flex: 0 0 auto; }

.nova-filters-submit-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.nova-filters-submit-icon i,
.nova-filters-submit-icon svg {
    font-size: 1em;
    width: 1em;
    height: 1em;
    fill: currentColor;
}

/* Icon-only submit (square button) */
.nova-filters-submit.nova-filters-submit--icon-only {
    gap: 0;
    padding: 12px;
    aspect-ratio: 1 / 1;
    min-width: 44px;
    min-height: 44px;
    border-radius: 8px;
}

.nova-filters-submit.nova-filters-submit--icon-only .nova-filters-submit-icon {
    font-size: 1.2em;
}

.nova-filters-reset {
    appearance: none;
    background: transparent;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    color: #6b6b6b;
    font: inherit;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.nova-filters-reset:hover,
.nova-filters-reset:focus {
    color: #d92121;
    outline: none;
}

/* ----- NiceSelect2 — structure partagée Nova Cards (.nova-cards-meta-filter--nice) ----- */
.nova-filter-field--select .nova-cards-meta-filter,
.nova-filter-field--multiselect .nova-cards-meta-filter {
    width: 100%;
}

.nova-filter-field--select .nova-cards-meta-filter__body,
.nova-filter-field--multiselect .nova-cards-meta-filter__body {
    width: 100%;
}

.nova-filter-field--select .nova-cards-meta-filter__control,
.nova-filter-field--multiselect .nova-cards-meta-filter__control {
    width: 100%;
}

/* Styles pill / liste déroulante : voir nova-cards-style.css */

/* ----- Flatpickr integration ----- */
.nova-filter-field .flatpickr-input,
.nova-filter-field input.flatpickr-input.form-control.input {
    background-color: #ffffff;
}

.flatpickr-calendar {
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
    border: 1px solid #e6e6e6;
    font-family: inherit;
}

.flatpickr-day.selected,
.flatpickr-day.selected:hover,
.flatpickr-day.startRange,
.flatpickr-day.endRange {
    background: #01ABC4;
    border-color: #01ABC4;
}

.flatpickr-day.today {
    border-color: #01ABC4;
    color: #01ABC4;
}

.flatpickr-day.today:hover {
    background: rgba(6, 102, 221, 0.12);
    color: #01ABC4;
}

.flatpickr-months .flatpickr-month,
.flatpickr-weekdays {
    color: #222222;
}

.flatpickr-current-month .flatpickr-monthDropdown-months,
.flatpickr-current-month input.cur-year {
    font-weight: 600;
}

/* When using flatpickr's static:true the calendar is positioned absolutely relative
   to the field wrapper. Ensure it floats above siblings and has enough z-index. */
.nova-filter-field .flatpickr-calendar.static {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 50;
}

.nova-filter-field .flatpickr-calendar.static.open {
    z-index: 1000;
}

/* Native radio / checkbox baseline so accent-color works visibly */
.nova-filter-radio input[type="radio"],
.nova-filter-checkbox input[type="checkbox"] {
    accent-color: #01ABC4;
    flex-shrink: 0;
}

/* ------------------------------------------------------------------
 * Keyup live — popup résultats (inspiré NiceSelect)
 * ------------------------------------------------------------------ */
.nova-filter-live {
    position: relative;
    width: 100%;
}

.nova-filter-live__control {
    position: relative;
    width: 100%;
}

.nova-filter-live__input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.nova-filter-live__icon {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    pointer-events: none;
    z-index: 1;
}

.nova-filter-live__input {
    padding-left: 30px !important;
    width: 100%;
}

.nova-filter-live__input::-webkit-search-cancel-button {
    -webkit-appearance: none;
}

.nova-filter-live__dropdown {
    position: static;
    display: block;
    width: 100%;
    max-height: 292px;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    margin: 8px 0 0;
    padding: 4px 0 8px;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    z-index: auto;
    scrollbar-width: thin;
    scrollbar-color: #c8c8c8 transparent;
}

.nova-filter-live__dropdown::-webkit-scrollbar {
    width: 6px;
}

.nova-filter-live__dropdown::-webkit-scrollbar-thumb {
    background: #c8c8c8;
    border-radius: 6px;
}

.nova-filter-live__dropdown::-webkit-scrollbar-track {
    background: transparent;
}

.nova-filter-live__dropdown[hidden] {
    display: none !important;
}

/* Panneau dans le form : pleine largeur, le parent s’expand (pas absolute) */
.nova-filters-form.is-live-open {
    flex-wrap: wrap;
    align-items: stretch;
    height: auto !important;
    overflow: visible !important;
}

.nova-filters-form > .nova-filter-live__dropdown {
    flex: 0 0 100%;
    width: 100%;
    order: 99;
    background: transparent;
    box-shadow: none;
}

.nova-filter-live.is-open .nova-filter-live__dropdown {
    display: block;
}

/* Placeholder thumb si pas d’image (aligne le texte comme les autres lignes) */
.nova-filter-live-item__thumb--empty,
.nova-filter-live__option-thumb--empty {
    background: #f0f0f0;
}
.nova-filter-live__option-thumb img, .nova-filter-live-item__thumb img {
    border-radius: 8px !important;
}
.nova-filter-live__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.nova-filter-live__option {
    display: block;
    margin: 0;
    padding: 0 12px 0 0;
    cursor: pointer;
    width: max-content;
}

.nova-filter-live__option.is-focus, .nova-filter-live__option:hover {
    background: #F8F8F8;
}
.nova-filter-live__option-inner, .nova-filter-live-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0;
    text-decoration: none;
    color: inherit;
}

.nova-filter-live__option-thumb,
.nova-filter-live-item__thumb {
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    border-radius: 8px;
    overflow: hidden;
    background: #eee;
}

.nova-filter-live__option-thumb img,
.nova-filter-live-item__thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nova-filter-live__option-text, .nova-filter-live-item__text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.nova-filter-live__option-title, .nova-filter-live-item__title {
    font-weight: 500;
    font-size: 16px;
    line-height: 100%;
    letter-spacing: 0%;
    color: #2A2A2A;
}

.nova-filter-live__option-desc, .nova-filter-live-item__desc {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
    font-size: 15px;
    line-height: 120%;
    letter-spacing: -2%;
    color: #7B7B7B;
}

/* Mode guides : dispo / M'avertir */
.nova-filter-live__option {
    width: 100%;
}
.nova-filter-live__option-inner--guide {
    width: 100%;
    min-width: 280px;
    padding-right: 4px;
}
.nova-filter-live__option.is-disponible {
    cursor: pointer;
}
.nova-filter-live__option.is-unavailable .nova-filter-live__option-inner--guide {
    cursor: default;
}
.nova-filter-live__alert-wrap {
    flex: 0 0 auto;
    margin-left: auto;
    display: inline-flex;
    align-items: center;
}
.nova-filter-live__alert-wrap.vc_btn3-container {
    margin-bottom: 0;
}
.nova-filter-live__alert-btn.vc_btn3,
a.nova-filter-live__alert-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0 !important;
    padding: 12px 18px !important;
    border: 0;
    border-radius: 999px !important;
    background-color: #7900F0;
    color: #fff !important;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none !important;
    box-shadow: none !important;
}
.nova-filter-live__alert-btn.vc_btn3:hover,
.nova-filter-live__alert-btn.vc_btn3:focus-visible,
a.nova-filter-live__alert-btn:hover,
a.nova-filter-live__alert-btn:focus-visible {
    color: #fff !important;
    outline: none;
    text-decoration: none !important;
}
.nova-filter-live__alert-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
}
.nova-filter-live__alert-btn-icon img {
    display: block;
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.nova-filter-live__empty,
.nova-filter-live__loading {
    padding: 14px 16px;
    font-size: 13px;
    color: #7B7B7B;
}

/* Pendant le fetch : liste reste lisible et cliquable (pas d’opacité à zéro) */
.nova-filter-live__dropdown.is-fetching .nova-filter-live__list {
    opacity: 1;
}

.nova-filter-live__loading {
    display: none !important;
}


/* ---- Meta filter + pill NiceSelect (cards-style) ---- */
.nova-cards-meta-filter {
	display: flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
}

.nova-cards-meta-filter--stacked {
	align-items: flex-start;
}

.nova-cards-meta-filter--stacked.has-icon .nova-cards-meta-filter__icon {
	margin-top: 18px;
}

.nova-cards-meta-filter__body {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
	flex: 1 1 auto;
}

.nova-cards-meta-filter__title {
	display: block;
	font-size: 11px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #E85D04;
	margin: 0;
	padding: 0;
	cursor: default;
}

label.nova-cards-meta-filter__title {
	cursor: pointer;
}

.nova-cards-meta-filter--input {
	width: 100%;
	flex-direction: column;
	align-items: stretch;
}

.nova-cards-meta-filter__icon {
	display: inline-flex;
	flex-shrink: 0;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
}

.nova-cards-meta-filter__icon img {
	display: block;
	width: 22px;
	height: 22px;
	object-fit: contain;
}

.nova-cards-meta-filter__control {
	min-width: 0;
	flex: 1 1 auto;
}

.nova-cards-meta-filter-input {
	max-width: 100%;
	min-width: 140px;
	font-size: inherit;
	line-height: 1.4;
}

.nova-cards-meta-filter__checkbox-label {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	white-space: nowrap;
}

.nova-cards-meta-filter__checkbox-label input {
	margin: 0;
}

/* ============================================================
 * Anti-flash : le widget reçoit `style="opacity:0;visibility:hidden;"`
 * inline en PHP (garantit l'application immédiate, sans dépendre du
 * chargement CSS). cards.js retire ces inline styles à la fin de
 * l'initialisation, en deux étapes :
 *   1) visibility:''      → widget visible mais encore opacity:0
 *   2) rAF → opacity:''   → fade-in via la transition ci-dessous
 *
 * Filet de sécurité <noscript> dans le PHP forcera la visibilité si
 * le JS est désactivé.
 * ============================================================ */
.nova-cards-widget {
	transition: opacity .35s ease;
}

/* Archive taxonomie (Nova Page) : état final rendu en PHP, pas de fade-in. */
.nova-cards-widget--server-ready,
html.nova-page-embed .nova-cards-widget,
html.nova-taxonomy-mirror .nova-page-widget .nova-cards-widget {
	opacity: 1 !important;
	visibility: visible !important;
	transition: none !important;
}

/* ============================================================
 * Habillage « pill » pour les selects (NiceSelect2)
 *  - Activé par .nova-cards-meta-filter--nice (posé par cards.js)
 *  - L'icône à gauche (.has-icon) est intégrée dans le pill
 * ============================================================ */
:root {
	--nova-mfilter-bg: #ffffff;
	--nova-mfilter-border: #E1E4F4;
	--nova-mfilter-text: #1A1B3D;
	--nova-mfilter-muted: #6B6F8E;
	--nova-mfilter-accent: #2E48F0;
	--nova-mfilter-radius: 999px;
	--nova-mfilter-height: 52px;
	--nova-mfilter-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.nova-cards-meta-filter--nice {
	background: var(--nova-mfilter-bg);
	border: 1px solid var(--nova-mfilter-border);
	border-radius: var(--nova-mfilter-radius);
	padding: 0 18px;
	gap: 12px;
	min-height: var(--nova-mfilter-height);
	box-shadow: var(--nova-mfilter-shadow);
	transition: border-color .15s ease, box-shadow .15s ease;
}
.nova-cards-meta-filter--nice:hover,
.nova-cards-meta-filter--nice:focus-within {
	border-color: var(--nova-mfilter-accent);
	box-shadow: 0 1px 6px rgba(46, 72, 240, 0.12);
}

.nova-cards-meta-filter--nice .nova-cards-meta-filter__icon {
	color: var(--nova-mfilter-accent);
	width: 24px;
	height: 24px;
}
.nova-cards-meta-filter--nice .nova-cards-meta-filter__icon img {
	width: 24px;
	height: 24px;
}
/* Séparateur vertical entre l'icône et le pseudo-select. */
.nova-cards-meta-filter--nice.has-icon .nova-cards-meta-filter__icon {
	position: relative;
	padding-right: 12px;
	margin-right: 0;
}
.nova-cards-meta-filter--nice.has-icon .nova-cards-meta-filter__icon::after {
	content: "";
	position: absolute;
	right: 0;
	top: 50%;
	transform: translateY(-50%);
	width: 1px;
	height: 22px;
	background: var(--nova-mfilter-border);
}

.nova-cards-meta-filter--nice .nova-cards-meta-filter__control {
	display: flex;
	align-items: center;
	min-width: 160px;
}

/* Surcharge NiceSelect2 quand il est dans notre wrapper. */
.nova-cards-meta-filter--nice .nice-select {
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
	padding: 0 30px 0 0 !important;
	height: auto !important;
	line-height: 1.4 !important;
	font-size: 15px;
	font-weight: 500;
	color: var(--nova-mfilter-text);
	min-width: 140px;
	width: 100%;
	position: relative;
}
.nova-cards-meta-filter--nice .nice-select:not([data-nova-arrow="1"]):not(.open)::after,
.nova-cards-meta-sort .nice-select:not([data-nova-arrow="1"]):not(.open)::after {
	display: block !important;
	content: '' !important;
	border: none !important;
	width: 7px !important;
	height: 5px !important;
	right: 0 !important;
	top: 50% !important;
	margin-top: 0 !important;
	transform: translateY(-50%) !important;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='7' height='5' viewBox='0 0 7 5' fill='none'%3E%3Cpath d='M6.5 0.5L3.5 3.5L0.5 0.5' stroke='%23373737' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat !important;
}
.nova-cards-meta-filter--nice .nice-select.open:not([data-nova-arrow="1"])::after,
.nova-cards-meta-sort .nice-select.open:not([data-nova-arrow="1"])::after {
	display: block !important;
	content: '' !important;
	border: none !important;
	position: absolute !important;
	width: 7px !important;
	height: 5px !important;
	right: 0 !important;
	top: 50% !important;
	margin-top: 0 !important;
	transform: translateY(-50%) !important;
	filter: none !important;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 7 5' width='7' height='5'%3E%3Cpath fill='none' stroke='%23373737' stroke-linecap='round' d='m6.5 4.5l-3-3-3 3'/%3E%3C/svg%3E") center / contain no-repeat !important;
}
.nova-cards-meta-filter--nice .nice-select.open {
	z-index: 20;
	box-shadow: none !important;
}
.nova-cards-meta-sort .nice-select-search-box,
.nova-filters-form .nice-select-search-box {
	padding: 8px 12px 4px;
	position: sticky;
	top: 0;
	z-index: 2;
	background: inherit;
}

.nova-cards-meta-filter--nice .nice-select-search,
.nova-cards-meta-sort .nice-select-search,
.nova-filters-form .nice-select-search {
	width: 100%;
	box-sizing: border-box;
	padding: 8px 10px;
	border: 1px solid var(--nova-mfilter-border, #d8dee4);
	border-radius: 6px;
	font-size: 14px;
	line-height: 1.3;
	color: var(--nova-mfilter-text, #373737);
	background: #fff;
	outline: none;
}

.nova-cards-meta-filter--nice .nice-select-search:focus,
.nova-cards-meta-sort .nice-select-search:focus,
.nova-filters-form .nice-select-search:focus {
	border-color: var(--nova-mfilter-accent, #01abc4);
}

.nova-cards-meta-filter--nice .nice-select .current {
	color: var(--nova-mfilter-text);
	font-weight: 500;
}
.nova-cards-meta-filter--nice .nice-select .list {
	border: 1px solid var(--nova-mfilter-border);
	border-radius: 14px;
	box-shadow: 0 12px 28px rgba(16, 24, 40, 0.08);
	margin-top: 10px;
	padding: 6px 0;
	min-width: 220px;
	max-height: 220px;
	overflow-y: auto;
	overflow-x: hidden;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
}

/* NiceSelect2 : le scroll doit être sur .nice-select-dropdown (le .list est forcé overflow:visible en compat) */
.nova-cards-meta-filter--nice .nice-select .nice-select-dropdown,
.nova-cards-meta-sort .nice-select .nice-select-dropdown,
.nova-filters-form .nice-select .nice-select-dropdown {
	max-height: min(280px, 55vh);
	overflow-x: hidden;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior: contain;
	background-color: #fff;
	border-radius: 14px;
	box-shadow: 0 12px 28px rgba(16, 24, 40, 0.08);
	scrollbar-width: thin;
	scrollbar-color: rgba(121, 0, 240, 0.35) transparent;
}

.nova-cards-meta-filter--nice .nice-select .nice-select-dropdown > .list,
.nova-cards-meta-sort .nice-select .nice-select-dropdown > .list,
.nova-filters-form .nice-select .nice-select-dropdown > .list {
	border: 0;
	border-radius: 0;
	box-shadow: none;
	margin-top: 0;
	max-height: none;
	overflow: visible;
	min-width: 220px;
	padding: 6px 0;
}

/* Le positionnement dynamique du dropdown (viewport / mobile) est appliqué
 * en style inline par nova-nice-select-arrow.js directement sur
 * `.nice-select-dropdown` (left / right). Aucune règle CSS n'est nécessaire
 * ici — et il faut éviter `!important` qui écraserait l'inline. */

.nova-cards-meta-filter--nice .nice-select .option {
	font-size: 14px;
	color: var(--nova-mfilter-text);
	padding: 8px 16px;
	min-height: 36px;
	line-height: 1.4;
}
.nova-cards-meta-filter--nice .nice-select .option:hover,
.nova-cards-meta-filter--nice .nice-select .option.focus,
.nova-cards-meta-filter--nice .nice-select .option.selected.focus {
	background: var(--nova-mfilter-accent);
	color: #fff;
}

/* On masque le <select> natif (NiceSelect2 le fait déjà via display:none ;
 * on s'assure qu'aucun reset ne le ré-affiche par-dessus). */
.nova-cards-meta-filter--nice select.nova-cards-meta-filter-input,
.nova-cards-meta-filter--nice select.nova-cards-sort-select {
	display: none !important;
}

/* ============================================================
 * Filtre plage (budget) — noUiSlider, déclenché comme NiceSelect
 * ============================================================ */
.nova-cards-meta-filter--range .nova-cards-meta-filter__control {
	position: relative;
}

.nova-cards-meta-filter__range {
	position: relative;
	width: 100%;
	min-width: 160px;
}

.nova-cards-meta-filter__range-display-input {
	display: block;
	width: 100%;
	min-width: 140px;
	padding: 0 30px 0 0;
	margin: 0;
	border: 0;
	background: transparent;
	box-shadow: none;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.4;
	color: var(--nova-mfilter-text);
	cursor: pointer;
	appearance: none;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.nova-cards-meta-filter__range-display-input::placeholder {
	color: var(--nova-mfilter-text);
	opacity: 1;
}

.nova-cards-meta-filter__range-display-input:focus {
	outline: none;
}

.nova-cards-meta-filter__range::after {
	content: "";
	position: absolute;
	right: 6px;
	top: 50%;
	width: 8px;
	height: 8px;
	margin-top: -6px;
	border: solid var(--nova-mfilter-text);
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
	pointer-events: none;
	transition: transform .15s ease;
}

.nova-cards-meta-filter--range:has(.nova-cards-meta-filter__range.open) {
	position: relative;
	z-index: 60;
