/* ============================================================================
   BENIN-IMMO — FacetedSelect : styles natifs, isolés, sans dépendance externe.
   ----------------------------------------------------------------------------
   Principes de stabilité :
   • Design System BENIN-IMMO : toutes les couleurs passent par des VARIABLES
     (--biv2fs-*). Aucune couleur codée en dur dans les règles.
   • Résilience : les tokens sont définis sur :root ET sur les éléments racines
     du composant → ils se résolvent toujours, même dans l'iframe de l'éditeur
     Elementor ou si un optimiseur retire le bloc :root.
   • Isolation : classes toutes préfixées « biv2fs- », aucun sélecteur générique
     (input/select/button). Les propriétés critiques de lisibilité (fond + texte
     du champ) sont verrouillées pour ne jamais être écrasées par Elementor /
     Houzez (resets du type `button{background:transparent;color:inherit}`).
   • Rendu identique backend (aperçu Elementor) / frontend : même feuille de
     style chargée via get_style_depends + elementor/preview/enqueue_styles.
   ========================================================================== */

/* ── Design System : source unique des couleurs (aussi sur les racines du
      composant pour une résolution garantie hors :root / dans une iframe) ── */
:root,
.biv2-search-builder-wrapper, .biv2fs-drawer, .biv2-mobile-entry,
.biv2fs-native, .biv2fs-trigger, .biv2fs-dropdown, .biv2fs-backdrop, .biv2fs-badges {
  /* ── Design Tokens PUBLICS (--biv2-*) : pilotés par le Style Manager Elementor.
        Les tokens internes --biv2fs-* les CONSOMMENT (fallback = charte BENIN-IMMO).
        Changer une valeur dans Elementor → tout le Search Builder s'adapte. ── */
  --biv2fs-accent: var(--biv2-accent, #C8A96E);            /* or BENIN-IMMO */
  --biv2fs-accent-d: var(--biv2-accent-hover, #B8934A);    /* or foncé (hover) */
  --biv2fs-accent-text:#8A6D3B;       /* or lisible comme TEXTE sur blanc (~5:1) */
  --biv2fs-navy: var(--biv2-text, #1A2B4A);                /* texte principal */
  --biv2fs-text:#1C1C1E;             /* texte neutre */
  --biv2fs-muted: var(--biv2-muted, #6B7280);              /* texte discret */
  --biv2fs-border: var(--biv2-border, #D0D5DD);            /* bordures/séparateurs */
  --biv2fs-border-hover:#B7BEC9;
  --biv2fs-bg: var(--biv2-bg, #FFFFFF);
  --biv2fs-bg-soft:#F3F4F6;
  --biv2fs-hover:rgba(200,169,110,.10);
  --biv2fs-weak:rgba(200,169,110,.12);
  --biv2fs-ring:rgba(200,169,110,.20);
  --biv2fs-badge-border:rgba(200,169,110,.40);
  --biv2fs-shadow:0 12px 34px rgba(26,43,74,.14);
  --biv2fs-scrim:rgba(13,27,42,.45);
  --biv2fs-radius: var(--biv2-radius, 8px);
  --biv2fs-h: var(--biv2-field-height, 56px);
  /* Tokens de dimensions/animation pilotables (défauts = valeurs actuelles). */
  --biv2-gap: 10px;
  --biv2-drawer-width: clamp(480px, 40vw, 760px);
  --biv2-drawer-width-tablet: clamp(420px, 60vw, 620px);
  --biv2-drawer-width-mobile: 100%;
  --biv2-radio-size: 46px;
  --biv2-checkbox-size: 22px;
  --biv2-accordion-speed: .24s;
  --biv2-accordion-ease: cubic-bezier(.4,0,.2,1);
  --biv2fs-css-version:1.6.1;         /* lu par le mode diagnostic ?biv2-debug=1 */
}

/* Le <select> natif reste dans le DOM (source de vérité) mais masqué visuellement. */
select.biv2fs-native{ position:absolute!important; width:1px!important; height:1px!important;
  padding:0!important; margin:-1px!important; overflow:hidden!important; clip:rect(0 0 0 0)!important;
  white-space:nowrap!important; border:0!important; }

/* ── Trigger : hauteur FIXE, résumé une seule ligne, lisibilité verrouillée ── */
.biv2fs-trigger{
  -webkit-appearance:none; -moz-appearance:none; appearance:none;
  display:flex; align-items:center; gap:8px; width:100%;
  height:var(--biv2fs-h); min-height:var(--biv2fs-h); max-height:var(--biv2fs-h);
  box-sizing:border-box; padding:0 14px; margin:0;
  /* Verrous d'isolation : jamais transparent, texte toujours navy. */
  background:var(--biv2fs-bg) !important;
  border:1px solid var(--biv2fs-border) !important;
  border-radius:var(--biv2fs-radius);
  cursor:pointer; text-align:left;
  font:inherit; font-size:15px; line-height:1.2;
  color:var(--biv2fs-navy) !important;
  -webkit-text-fill-color:var(--biv2fs-navy);
  transition:border-color .18s, box-shadow .18s;
}
.biv2fs-trigger:hover{ border-color:var(--biv2fs-border-hover) !important; }
.biv2fs-trigger[aria-expanded="true"],
.biv2fs-trigger:focus-visible{ outline:none; border-color:var(--biv2fs-accent) !important; box-shadow:0 0 0 2px var(--biv2fs-ring); }
.biv2fs-trigger > *{ pointer-events:none; }
.biv2fs-trigger-txt{ flex:1 1 auto; min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
/* Placeholder et valeur sélectionnée : couleurs verrouillées (toujours lisibles). */
.biv2fs-trigger.is-empty  .biv2fs-trigger-txt{ color:var(--biv2fs-muted) !important; -webkit-text-fill-color:var(--biv2fs-muted); font-weight:400; }
.biv2fs-trigger.has-value .biv2fs-trigger-txt{ color:var(--biv2fs-navy)  !important; -webkit-text-fill-color:var(--biv2fs-navy);  font-weight:600; }
.biv2fs-trigger-car{ flex:0 0 auto; width:10px; height:10px; border-right:2px solid var(--biv2fs-muted);
  border-bottom:2px solid var(--biv2fs-muted); transform:rotate(45deg) translateY(-2px); transition:transform .18s; }
.biv2fs-trigger[aria-expanded="true"] .biv2fs-trigger-car{ transform:rotate(-135deg) translateY(2px); border-color:var(--biv2fs-accent); }

/* ── Backdrop (mobile bottom-sheet) ─────────────────────────────────────── */
.biv2fs-backdrop{ position:fixed; inset:0; background:var(--biv2fs-scrim); z-index:100049;
  opacity:0; visibility:hidden; transition:opacity .2s; }
.biv2fs-backdrop.show{ opacity:1; visibility:visible; }
body.biv2fs-lock{ overflow:hidden; }

/* ── Dropdown overlay (desktop) : position:fixed, jamais tronqué ─────────── */
.biv2fs-dropdown{
  position:fixed; z-index:100050; box-sizing:border-box; display:flex; flex-direction:column;
  background:var(--biv2fs-bg); border:1px solid var(--biv2fs-border); border-radius:12px;
  box-shadow:var(--biv2fs-shadow); overflow:hidden; max-height:min(380px,70vh);
  color:var(--biv2fs-text);
  opacity:0; transform:translateY(-8px);
  transition:opacity .2s ease, transform .22s cubic-bezier(.16,.84,.44,1);
}
.biv2fs-dropdown.show{ opacity:1; transform:none; }
/* Seul le menu affiché intercepte les événements ; les menus masqués sont neutralisés. */
.biv2fs-dropdown{ pointer-events:none; }
.biv2fs-dropdown.show{ pointer-events:auto; }
.biv2fs-dropdown[hidden]{ display:none !important; }
/* Desktop : on masque la barre de titre (popover), mais on GARDE le pied
   « Terminé » → fermeture explicite après sélection (plus besoin de cliquer
   dans le vide). */
.biv2fs-dropdown:not(.is-sheet) .biv2fs-dd-head{ display:none; }
.biv2fs-dropdown:not(.is-sheet) .biv2fs-dd-foot{ padding:8px 10px; }
.biv2fs-dropdown:not(.is-sheet) .biv2fs-done{ height:40px; font-size:14px; }

/* ── Bottom-sheet (mobile, façon Airbnb) ────────────────────────────────── */
.biv2fs-dropdown.is-sheet{
  position:fixed; left:0; right:0; bottom:0; top:auto; width:100%;
  max-height:85vh; border-radius:18px 18px 0 0; transform:translateY(100%);
}
.biv2fs-dropdown.is-sheet.show{ transform:translateY(0); }
.biv2fs-dd-head{ display:flex; align-items:center; justify-content:space-between;
  padding:16px 18px; border-bottom:1px solid var(--biv2fs-border); flex:0 0 auto; }
.biv2fs-dd-title{ font-family:inherit; font-weight:700; font-size:16px; color:var(--biv2fs-navy); }
.biv2fs-dd-close{ -webkit-appearance:none; appearance:none; background:none; border:none;
  font-size:26px; line-height:1; color:var(--biv2fs-muted); cursor:pointer; width:40px; height:40px; border-radius:50%; }
.biv2fs-dd-close:hover{ background:var(--biv2fs-bg-soft); color:var(--biv2fs-navy); }
.biv2fs-dd-foot{ padding:12px 16px; border-top:1px solid var(--biv2fs-border); flex:0 0 auto; }
.biv2fs-done{ -webkit-appearance:none; appearance:none; width:100%; background:var(--biv2fs-accent);
  color:var(--biv2fs-navy); border:none; border-radius:8px; padding:13px; font:inherit; font-weight:700; cursor:pointer; }
.biv2fs-done:hover{ background:var(--biv2fs-accent-d); color:var(--biv2fs-bg); }

/* ── Recherche instantanée (sticky) ─────────────────────────────────────── */
.biv2fs-search{ padding:10px 12px 6px; flex:0 0 auto; }
.biv2fs-search-inp{ -webkit-appearance:none; appearance:none; width:100%; box-sizing:border-box;
  background:var(--biv2fs-bg); border:1px solid var(--biv2fs-border); border-radius:8px;
  padding:10px 12px; font:inherit; font-size:14px; color:var(--biv2fs-text); -webkit-text-fill-color:var(--biv2fs-text); }
.biv2fs-search-inp::placeholder{ color:var(--biv2fs-muted); opacity:1; }
.biv2fs-search-inp:focus{ outline:none; border-color:var(--biv2fs-accent); box-shadow:0 0 0 2px var(--biv2fs-ring); }

/* ── Tout sélectionner / désélectionner (sticky) ────────────────────────── */
.biv2fs-bulk{ display:flex; gap:14px; padding:4px 14px 8px; flex:0 0 auto; }
.biv2fs-bulk button{ -webkit-appearance:none; appearance:none; background:none; border:none; padding:0;
  cursor:pointer; font:inherit; font-size:12.5px; font-weight:600; color:var(--biv2fs-accent-text); }
.biv2fs-bulk button:hover{ text-decoration:underline; }

/* ── Liste virtualisée (SEUL élément défilant) ──────────────────────────── */
.biv2fs-list{ position:relative; overflow-y:auto; overflow-x:hidden; flex:1 1 auto;
  min-height:0; overscroll-behavior:contain; -webkit-overflow-scrolling:touch; padding:0 6px 8px; }
.is-sheet .biv2fs-list{ height:auto !important; max-height:none; flex:1 1 auto; }
.biv2fs-spacer{ width:1px; }
.biv2fs-canvas{ position:absolute; top:0; left:6px; right:6px; }
.biv2fs-opt{ display:flex; align-items:center; gap:10px; width:100%;
  padding:0 8px; border-radius:8px; cursor:pointer; font-size:14px; color:var(--biv2fs-text); box-sizing:border-box; }
.biv2fs-opt:hover, .biv2fs-opt.is-active{ background:var(--biv2fs-hover); }
.biv2fs-opt input[type="checkbox"]{ width:17px; height:17px; accent-color:var(--biv2fs-accent); flex:0 0 auto; margin:0; pointer-events:none; }
.biv2fs-opt-lbl{ flex:1 1 auto; min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; color:var(--biv2fs-text); }
.biv2fs-cnt{ color:var(--biv2fs-muted); font-size:12.5px; font-weight:400; }

/* ── Badges de filtres actifs (réutilisable) : filtres actifs, pas de simples tags ── */
.biv2fs-badges{ display:flex; flex-wrap:wrap; gap:10px; }
.biv2fs-badges:empty{ display:none; }
.biv2fs-badge{ display:inline-flex; align-items:center; gap:8px; background:var(--biv2fs-weak);
  border:1px solid var(--biv2fs-badge-border); color:var(--biv2fs-navy); font-size:13px; font-weight:600;
  padding:7px 8px 7px 13px; border-radius:22px; line-height:1.2; cursor:default;
  transition:background .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease; }
.biv2fs-badge--in{ animation:biv2fs-badge-in .2s cubic-bezier(.16,.84,.44,1) both; }
.biv2fs-badge:hover{ background:var(--biv2fs-hover); border-color:var(--biv2fs-accent);
  box-shadow:0 3px 10px rgba(200,169,110,.22); transform:translateY(-1px); }
.biv2fs-badge--out{ animation:biv2fs-badge-out .16s ease forwards; }
.biv2fs-badge-ico{ width:7px; height:7px; border-radius:50%; background:var(--biv2fs-accent); flex:0 0 auto; }
.biv2fs-badge-x{ -webkit-appearance:none; appearance:none; background:none; border:none; cursor:pointer;
  font-size:16px; line-height:1; color:var(--biv2fs-navy); opacity:.55; padding:0 2px;
  transition:opacity .15s ease, transform .15s ease; }
.biv2fs-badge-x:hover{ opacity:1; transform:scale(1.15); }
@keyframes biv2fs-badge-in{ from{ opacity:0; transform:translateY(4px) scale(.94); } to{ opacity:1; transform:none; } }
@keyframes biv2fs-badge-out{ from{ opacity:1; transform:none; } to{ opacity:0; transform:scale(.88); } }

/* Respect des préférences de mouvement réduit. */
@media (prefers-reduced-motion: reduce){
  .biv2fs-dropdown, .biv2fs-badge, .biv2fs-badge-x, .biv2fs-trigger, .biv2fs-trigger-car{ transition:none !important; animation:none !important; }
}

/* ── Verrou d'isolation renforcé ─────────────────────────────────────────
   Bat les resets encadrés des frameworks (ex. `.elementor-widget-container
   button{...!important}`, spécificité 0,2,0) qui écraseraient un simple
   `.biv2fs-trigger` (0,1,0) et rendraient le texte illisible. On ne verrouille
   QUE les propriétés critiques de lisibilité, toujours via les variables. */
.biv2fs-trigger.biv2fs-trigger.biv2fs-trigger{
  background:var(--biv2fs-bg) !important;
  color:var(--biv2fs-navy) !important;
  -webkit-text-fill-color:var(--biv2fs-navy) !important;
  border:1px solid var(--biv2fs-border) !important;
  font-family:inherit !important;
}
.biv2fs-trigger.is-empty.is-empty  .biv2fs-trigger-txt{ color:var(--biv2fs-muted) !important; -webkit-text-fill-color:var(--biv2fs-muted) !important; }
.biv2fs-trigger.has-value.has-value .biv2fs-trigger-txt{ color:var(--biv2fs-navy)  !important; -webkit-text-fill-color:var(--biv2fs-navy)  !important; }

/* ── Drawer latéral (Drawer Manager) : la barre ne change jamais de hauteur ── */
.biv2fs-drawer-backdrop{ position:fixed; inset:0; background:var(--biv2fs-scrim); z-index:99997;
  opacity:0; visibility:hidden; transition:opacity .25s ease; }
.biv2fs-drawer-backdrop.is-open{ opacity:1; visibility:visible; }
/* Géométrie verrouillée (!important) → résiste aux styles hôtes du panneau
   extensible (.biv2-advanced-filters{display:none;width:100%}) et à Elementor. */
.biv2fs-drawer{ position:fixed !important; top:0 !important; right:0 !important; left:auto !important; bottom:auto !important;
  height:100vh !important; width:var(--biv2-drawer-width, clamp(480px, 40vw, 760px)) !important; max-width:94vw !important; max-height:none !important;
  box-sizing:border-box; margin:0 !important; padding:0 !important; overflow:hidden;
  background:var(--biv2fs-bg); color:var(--biv2fs-text);
  box-shadow:-18px 0 48px rgba(26,43,74,.18); z-index:99998; display:flex !important; flex-direction:column;
  transform:translateX(100%); transition:transform .28s cubic-bezier(.16,.84,.44,1); }
.biv2fs-drawer.is-open{ transform:none; }
.biv2fs-drawer[hidden]{ display:none !important; }
.biv2fs-drawer .biv2-drawer-head{ flex:0 0 auto; display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between;
  padding:18px 22px; border-bottom:1px solid var(--biv2fs-border); }
.biv2fs-drawer .biv2-drawer-title{ font-family:inherit; font-weight:700; font-size:18px; color:var(--biv2fs-navy); }
/* Résumé des filtres actifs (sous le titre) — vue d'ensemble permanente. */
.biv2fs-drawer .biv2-drawer-summary{ flex-basis:100%; margin-top:6px; font-size:12.5px; font-weight:600;
  color:var(--biv2fs-accent-text); letter-spacing:.2px; }
.biv2fs-drawer .biv2-drawer-summary.is-empty{ display:none; }
.biv2fs-drawer .biv2-drawer-close{ -webkit-appearance:none; appearance:none; background:none; border:none;
  font-size:26px; line-height:1; color:var(--biv2fs-muted); cursor:pointer; width:40px; height:40px; border-radius:50%; }
.biv2fs-drawer .biv2-drawer-close:hover{ background:var(--biv2fs-bg-soft); color:var(--biv2fs-navy); }
.biv2fs-drawer .biv2-drawer-body{ flex:1 1 auto; min-height:0; overflow-y:auto; overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch; padding:20px 22px; }
/* Groupes de filtres (TYPE / LOCALISATION / PRIX / CARACTÉRISTIQUES / AUTRES) */
.biv2-drawer-group{ margin-bottom:6px; display:block; }
.biv2-drawer-group-title{ font-family:inherit; font-size:12px; font-weight:700; letter-spacing:.6px;
  text-transform:uppercase; color:var(--biv2fs-accent-text); margin:20px 0 12px; padding-bottom:7px;
  border-bottom:1px solid var(--biv2fs-border); }
.biv2-drawer-group:first-child .biv2-drawer-group-title{ margin-top:0; }
/* Dans le drawer, les champs sont TOUJOURS empilés en pleine largeur (pas de flex-wrap). */
.biv2fs-drawer .biv2-advanced-filters-inner{ display:block !important; }
.biv2fs-drawer .biv2-field-group{ width:100% !important; max-width:none !important; margin:0 0 28px; }
.biv2fs-drawer .biv2-drawer-acc-inner > .biv2-field-group:last-child{ margin-bottom:4px; }
/* 12px entre un label et son contrôle (numériques, texte). */
.biv2fs-drawer .biv2-field-group .elementor-field-label{ display:block; margin:0 0 12px; }
.biv2fs-drawer .biv2-field-icon-wrap{ width:100%; }

/* ── Accordéons du drawer (une seule catégorie ouverte, compact) ─────────── */
.biv2fs-drawer .biv2-drawer-acc{ border-bottom:1px solid var(--biv2fs-border); }
.biv2fs-drawer .biv2-drawer-acc[hidden]{ display:none !important; }
.biv2fs-drawer .biv2-drawer-acc-head{ -webkit-appearance:none; appearance:none; width:100%; display:flex; align-items:center;
  gap:10px; background:none; border:none; cursor:pointer; padding:15px 2px; font:inherit; text-align:left; }
.biv2fs-drawer .biv2-drawer-acc-title{ flex:1 1 auto; font-weight:700; font-size:12.5px; letter-spacing:.6px;
  text-transform:uppercase; color:var(--biv2fs-navy); }
.biv2fs-drawer .biv2-drawer-acc-count{ flex:0 0 auto; color:var(--biv2fs-muted); font-size:12.5px; font-weight:600; }
.biv2fs-drawer .biv2-drawer-acc-caret{ flex:0 0 auto; width:9px; height:9px; border-right:2px solid var(--biv2fs-muted);
  border-bottom:2px solid var(--biv2fs-muted); transform:rotate(45deg); transition:transform .2s ease; }
.biv2fs-drawer .biv2-drawer-acc.is-open .biv2-drawer-acc-caret{ transform:rotate(-135deg); border-color:var(--biv2fs-accent-d); }
/* Animation de hauteur 100% CSS sur le wrapper interne (fluide, sans mesure JS).
   overflow:hidden collapse proprement ; les menus déroulants sont rendus dans
   <body> (z-index élevé) donc jamais tronqués par l'accordéon. */
.biv2fs-drawer .biv2-drawer-acc-body{ display:block; }
.biv2fs-drawer .biv2-drawer-acc-inner{ overflow:hidden; max-height:0; opacity:0; padding:0 2px;
  transition:max-height var(--biv2-accordion-speed,.24s) var(--biv2-accordion-ease,cubic-bezier(.4,0,.2,1)), opacity .2s ease, padding .2s ease; }
/* 24px entre le titre de l'accordéon et le 1er champ (padding-top 12 + head 15). */
.biv2fs-drawer .biv2-drawer-acc.is-open .biv2-drawer-acc-inner{ max-height:1600px; opacity:1; padding:12px 2px 24px; }
/* Champs pleine largeur (radio / grille de cases) : bloc simple pour que la
   hauteur du contenu (grille de 35 cases) se propage — sinon le .elementor-field-group
   (flex) s'effondre à ~84px et l'accordéon tronque la grille. Pas d'icône résiduelle. */
/* flow-root = contexte de formatage de bloc → le champ CONTIENT toute la hauteur
   de son contenu flex (radio 84px) ; sinon il reste bloqué à ~56px et déborde
   sur le groupe suivant. Marge inter-groupes forcée (28px). */
.biv2fs-drawer .biv2-fg-full{ display:flow-root !important; height:auto !important; min-height:0 !important;
  max-height:none !important; overflow:visible !important; margin-bottom:28px !important; }
/* Le thème force height:56px sur .elementor-field-group : on gagne en spécificité. */
.biv2fs-drawer .biv2-drawer-acc-inner > .biv2-field-group.biv2-fg-full{ height:auto !important; min-height:0 !important; max-height:none !important; }
/* Les groupes radio (contenu flex 84px) ne grandissent pas → min-height garantit
   qu'ils contiennent leurs boutons + un vrai espace avant le groupe suivant. */
.biv2fs-drawer .biv2-drawer-acc-inner > .biv2-field-group.biv2-fg-full:has(.biv2-rbtn){ min-height:92px !important; }
.biv2fs-drawer .biv2-drawer-acc-inner > .biv2-field-group:last-child.biv2-fg-full{ margin-bottom:4px !important; }
/* La grille de cases vit dans le wrapper Houzez/Elementor (.elementor-field /
   .elementor-select-wrapper / .form-group) qui est plafonné à ~56px (hauteur
   d'un input) et tronque la grille : on libère la hauteur de toute la chaîne. */
.biv2fs-drawer .biv2-fg-full .elementor-field,
.biv2fs-drawer .biv2-fg-full .elementor-select-wrapper,
.biv2fs-drawer .biv2-fg-full .form-group,
.biv2fs-drawer .biv2-fg-full .elementor-field-group{ display:block !important; height:auto !important;
  min-height:0 !important; max-height:none !important; overflow:visible !important; }
.biv2fs-drawer .biv2-fg-full .biv2-checkgrid-list{ width:100%; }
.biv2fs-drawer .biv2-fg-full .biv2-field-icon,
.biv2fs-drawer .biv2-fg-full .biv2-field-icon-wrap::before{ display:none !important; }
.biv2fs-drawer .biv2-fg-full .biv2-field-icon-wrap{ padding-left:0 !important; }
/* Header du drawer : toujours visible en haut ; sous la barre admin WP si présente. */
.biv2fs-drawer .biv2-drawer-head{ z-index:2; }
@media (min-width:769px){
  body.admin-bar .biv2fs-drawer{ top:32px !important; height:calc(100vh - 32px) !important; }
}
@media (min-width:601px) and (max-width:782px){
  body.admin-bar .biv2fs-drawer{ /* bottom-sheet : la barre admin ne gêne pas le bas */ }
}
/* ── Field Renderer : boutons ronds (Hébergement) ────────────────────────── */
/* Structure flex-column : titre au-dessus, boutons dessous, écart net (pas de
   margin-collapse → plus aucun chevauchement titre/boutons, même sur mobile). */
.biv2-rbtn{ display:flex; flex-direction:column; gap:14px; margin:0; }
.biv2fs-drawer .biv2-rbtn-title,
.biv2-rbtn-title{ display:block; font-size:13px; font-weight:700; color:var(--biv2fs-navy); margin:0; }
/* 28–32px entre deux groupes (Chambres / Salles de bain / Meublé). */
.biv2fs-drawer .biv2-fg-full{ margin-bottom:30px; }
.biv2fs-drawer .biv2-drawer-acc-inner > .biv2-field-group:last-child.biv2-fg-full{ margin-bottom:6px; }
.biv2-rbtn-opts{ display:flex; flex-wrap:wrap; align-items:center; gap:10px; }
/* Boutons parfaitement ronds, même diamètre, non déformés. */
/* États VERROUILLÉS en !important : le thème Houzez applique aux <button> un
   fond navy par défaut et BLANC au :focus → sans verrou, le bouton sélectionné
   perdait sa couleur dès qu'un autre bouton était cliqué. On force les 3 états. */
.biv2fs-drawer .biv2-rbtn-opt,
.biv2-rbtn-opt{ -webkit-appearance:none; appearance:none; cursor:pointer; flex:0 0 auto; width:var(--biv2-radio-size,46px); height:var(--biv2-radio-size,46px); padding:0;
  border-radius:50% !important; border:1.5px solid var(--biv2fs-border) !important; background:var(--biv2fs-bg) !important; color:var(--biv2fs-navy) !important;
  font:inherit; font-weight:700; font-size:14px; line-height:1; display:flex; align-items:center; justify-content:center; box-shadow:none !important;
  transition:border-color .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease; }
.biv2fs-drawer .biv2-rbtn-opt:hover{ border-color:var(--biv2fs-accent) !important; background:var(--biv2fs-weak) !important; color:var(--biv2fs-navy) !important; }
.biv2fs-drawer .biv2-rbtn-opt:focus,
.biv2fs-drawer .biv2-rbtn-opt:focus-visible,
.biv2-rbtn-opt:focus{ outline:none !important; }
/* SÉLECTIONNÉ : or BENIN-IMMO, PERSISTANT — aucun état hover/focus du thème ne le masque. */
.biv2fs-drawer .biv2-rbtn-opt.is-active,
.biv2fs-drawer .biv2-rbtn-opt.is-active:hover,
.biv2fs-drawer .biv2-rbtn-opt.is-active:focus,
.biv2-rbtn-opt.is-active{ background:var(--biv2fs-accent) !important; border-color:var(--biv2fs-accent-d) !important; color:var(--biv2fs-navy) !important; box-shadow:0 0 0 3px var(--biv2fs-ring) !important; }

/* ── Field Renderer : grille de cases à cocher (Équipements, style Immooz) ── */
.biv2-checkgrid-list{ display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:10px 22px; margin:2px 0; }
.biv2-checkgrid-item{ display:flex; align-items:center; gap:10px; cursor:pointer; font-size:14px; color:var(--biv2fs-navy);
  line-height:1.3; padding:3px 0; }
.biv2-checkgrid-item .biv2-checkgrid-cb{ position:absolute; opacity:0; width:1px; height:1px; }
.biv2-checkgrid-box{ flex:0 0 auto; width:var(--biv2-checkbox-size,22px); height:var(--biv2-checkbox-size,22px); border-radius:6px; border:2px solid var(--biv2fs-muted);
  background:var(--biv2fs-bg); position:relative; transition:border-color .16s ease, background .16s ease; }
.biv2-checkgrid-item:hover .biv2-checkgrid-box{ border-color:var(--biv2fs-navy); }
.biv2-checkgrid-cb:checked + .biv2-checkgrid-box{ background:var(--biv2fs-navy); border-color:var(--biv2fs-navy); }
.biv2-checkgrid-cb:checked + .biv2-checkgrid-box::after{ content:""; position:absolute; left:6px; top:2px; width:5px; height:10px;
  border:solid #fff; border-width:0 2.2px 2.2px 0; transform:rotate(45deg); }
.biv2-checkgrid-cb:focus-visible + .biv2-checkgrid-box{ outline:2px solid var(--biv2fs-accent); outline-offset:2px; }
.biv2-checkgrid-txt{ flex:1 1 auto; }

/* Miroir Barre↔Drawer : le <select> natif du miroir reste la source de l'état
   mais TOUJOURS caché (seul le trigger FacetedSelect est visible) → jamais de
   champ vide dupliqué, quelles que soient les classes thème résiduelles. */
.biv2fs-drawer select[data-biv2-mirror]{ position:absolute !important; width:1px !important; height:1px !important;
  padding:0 !important; margin:-1px !important; border:0 !important; overflow:hidden !important;
  clip:rect(0 0 0 0) !important; white-space:nowrap !important; opacity:0 !important; pointer-events:none !important; }

/* ── Select natif (Prix) : dropdown OS, TOUJOURS au-dessus, jamais tronqué ───
   Cause racine du bug « prix derrière l'accordéon » : l'ancien selectpicker
   (bootstrap-select) rendait son menu EN FLUX dans l'accordéon (overflow:hidden
   + stacking du drawer). Un <select> natif délègue son menu à l'OS → aucun
   z-index/overflow ne peut le masquer. */
.biv2fs-drawer .biv2-native-select{ -webkit-appearance:none; -moz-appearance:none; appearance:none; width:100%;
  height:48px; padding:0 38px 0 14px; box-sizing:border-box; border:1.5px solid var(--biv2fs-border);
  border-radius:var(--biv2fs-radius); background-color:var(--biv2fs-bg); color:var(--biv2fs-navy); font:inherit;
  font-size:14px; line-height:48px; cursor:pointer; transition:border-color .18s ease, box-shadow .18s ease;
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='none' stroke='%236B7280' stroke-width='2' d='M1 1l5 5 5-5'/></svg>");
  background-repeat:no-repeat; background-position:right 14px center; }
.biv2fs-drawer .biv2-native-select:hover{ border-color:var(--biv2fs-border-hover); }
.biv2fs-drawer .biv2-native-select:focus{ outline:none; border-color:var(--biv2fs-accent); box-shadow:0 0 0 3px var(--biv2fs-ring); }
/* Diagnostic (?biv2-debug=1) : avertissement de désynchronisation. */
.biv2fs-debug-warn b{ color:#C0392B; }
.biv2fs-debug-b{ max-height:60vh; overflow:auto; }

/* Le wrapper interne est un BLOC simple : sa hauteur = celle de son contenu.
   (Un parent flex/grid s'effondre à ~84px et tronque la grille de cases — la
   hauteur d'un enfant grid ne se propage pas à un parent flex/grid indéfini.)
   La grille de cases garde ses 2 colonnes en interne. */
.biv2fs-drawer .biv2-drawer-acc-inner{ display:block; }
.biv2fs-drawer .biv2-drawer-acc-inner > .biv2-field-group{ width:100% !important; max-width:none !important; }
/* ── Sous-accordéons : taxonomies hiérarchiques (parents → sous-catégories) ──
   IMPORTANT : préfixés .biv2fs-drawer + !important pour battre le style boutons
   du thème (.elementor-kit-6 button impose sinon un fond navy → titre invisible). */
.biv2fs-drawer .biv2-checkgrid-hier{ display:block; }
.biv2fs-drawer .biv2-checkgrid-hier > .biv2-checkgrid-list{ margin:0 0 8px; }   /* feuilles de 1er niveau */
.biv2fs-drawer .biv2-subacc{ border-top:1px solid var(--biv2fs-border); }
.biv2fs-drawer .biv2-subacc:first-child{ border-top:0; }
.biv2fs-drawer .biv2-subacc-head{ -webkit-appearance:none !important; appearance:none !important; width:100%;
  display:flex; align-items:center; gap:9px; background:transparent !important; border:none !important;
  box-shadow:none !important; border-radius:0 !important; min-height:0 !important; height:auto !important;
  cursor:pointer; padding:13px 2px !important; margin:0 !important; font:inherit !important; text-align:left;
  text-transform:none !important; letter-spacing:normal !important; color:var(--biv2fs-navy) !important; }
.biv2fs-drawer .biv2-subacc-head:hover{ background:var(--biv2fs-bg-soft) !important; }
.biv2fs-drawer .biv2-subacc-caret{ flex:0 0 auto; width:8px; height:8px; border-right:2px solid var(--biv2fs-muted);
  border-bottom:2px solid var(--biv2fs-muted); transform:rotate(-45deg); transition:transform .2s ease; }
.biv2fs-drawer .biv2-subacc.is-open .biv2-subacc-caret{ transform:rotate(45deg); border-color:var(--biv2fs-accent-d); }
.biv2fs-drawer .biv2-subacc-title{ flex:1 1 auto; font-weight:700; font-size:13px; color:var(--biv2fs-navy); }
.biv2fs-drawer .biv2-subacc-count{ flex:0 0 auto; color:var(--biv2fs-muted); font-size:12.5px; font-weight:600; }
.biv2fs-drawer .biv2-subacc.has-selected .biv2-subacc-title,
.biv2fs-drawer .biv2-subacc.has-selected .biv2-subacc-count{ color:var(--biv2fs-accent-text); }
.biv2fs-drawer .biv2-subacc.has-selected .biv2-subacc-count[data-sel]:not([data-sel=""])::after{ content:" · " attr(data-sel) " ✓"; }
/* Animation fluide (hauteur pilotée en JS via scrollHeight → naturelle, sans coupure). */
.biv2fs-drawer .biv2-subacc-body{ overflow:hidden; max-height:0; transition:max-height .28s cubic-bezier(.4,0,.2,1); }
.biv2fs-drawer .biv2-subacc-inner{ padding:4px 2px 14px; }

@media (max-width:768px){
  .biv2-checkgrid-list{ grid-template-columns:1fr; }
}

/* Pied TOUJOURS visible (collé en bas), même si le corps défile. */
.biv2fs-drawer .biv2-drawer-footer{ flex:0 0 auto; margin:0; border-top:1px solid var(--biv2fs-border);
  background:var(--biv2fs-bg); padding:16px 22px; display:flex; flex-direction:column; gap:10px;
  box-shadow:0 -8px 24px rgba(26,43,74,.06); }
.biv2fs-drawer .biv2-drawer-footer .biv2-clear-btn{ order:1; }
.biv2fs-drawer .biv2-drawer-footer .biv2-search-btn{ order:2; }
/* Mobile : bottom-sheet (même logique, meilleure ergonomie tactile). */
@media (max-width:768px){
  .biv2fs-drawer{ top:auto !important; bottom:0 !important; left:0 !important; right:0 !important;
    width:var(--biv2-drawer-width-mobile,100%) !important; max-width:100vw !important; height:auto !important; max-height:90vh !important;
    border-radius:18px 18px 0 0; transform:translateY(100%); }
  .biv2fs-drawer.is-open{ transform:none; }
  /* Badges : défilables horizontalement plutôt que sur plusieurs lignes. */
  .biv2fs-badges{ flex-wrap:nowrap; overflow-x:auto; overscroll-behavior-x:contain;
    -webkit-overflow-scrolling:touch; padding-bottom:4px; }
  .biv2fs-badge{ flex:0 0 auto; }
}

/* ── MobileLayout : point d'entrée « Affiner votre recherche » (mode bouton) ── */
.biv2-mobile-entry{ display:none; }
.biv2-affiner{ -webkit-appearance:none; appearance:none; width:100%; display:flex; align-items:center; gap:12px;
  /* Couleurs verrouillées (résistent aux styles bouton hôtes Elementor/Houzez). */
  background:var(--biv2fs-bg) !important; border:1.5px solid var(--biv2fs-accent) !important; border-radius:12px !important;
  padding:15px 18px; cursor:pointer; text-align:left; font:inherit; color:var(--biv2fs-navy) !important;
  -webkit-text-fill-color:var(--biv2fs-navy); box-shadow:0 6px 18px rgba(26,43,74,.08);
  transition:background .18s ease, box-shadow .18s ease; }
.biv2-affiner:hover{ background:var(--biv2fs-weak) !important; box-shadow:0 8px 22px rgba(200,169,110,.18); }
.biv2-affiner:focus-visible{ outline:none; border-color:var(--biv2fs-accent-d); box-shadow:0 0 0 3px var(--biv2fs-ring); }
.biv2-affiner-ico{ flex:0 0 auto; width:22px; height:22px; display:inline-flex; align-items:center; justify-content:center; color:var(--biv2fs-accent-d); }
.biv2-affiner-ico svg{ width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.biv2-affiner-txt{ flex:1 1 auto; min-width:0; display:flex; flex-direction:column; gap:2px; }
.biv2-affiner-label{ font-weight:700; font-size:15px; color:var(--biv2fs-navy) !important; -webkit-text-fill-color:var(--biv2fs-navy); }
.biv2-affiner-summary{ font-size:13px; color:var(--biv2fs-muted) !important; -webkit-text-fill-color:var(--biv2fs-muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.biv2-affiner-summary .biv2-affiner-vals{ color:var(--biv2fs-navy) !important; -webkit-text-fill-color:var(--biv2fs-navy); font-weight:600; }
.biv2-affiner-more{ color:var(--biv2fs-accent-d); margin-left:6px; font-weight:600; }
.biv2-affiner-car{ flex:0 0 auto; width:9px; height:9px; border-right:2px solid var(--biv2fs-muted); border-bottom:2px solid var(--biv2fs-muted); transform:rotate(-45deg); }
@media (max-width:768px){
  .biv2-mobile-mode-button .biv2-search-row{ display:none !important; }
  .biv2-mobile-mode-button .biv2-mobile-entry{ display:flex; flex-direction:column; gap:10px; }
  .biv2-mobile-mode-button .biv2-mobile-entry .biv2-search-btn{ width:100%; }
  .biv2fs-drawer .biv2-field-group{ width:100% !important; max-width:none !important; margin:0 0 6px; }
  .biv2fs-drawer .biv2-field-icon-wrap{ width:100%; }
}
@media (min-width:769px){ .biv2-mobile-entry{ display:none !important; } }
.biv2-hide-titles .elementor-field-label{ display:none !important; }

/* ── Panneau de diagnostic (?biv2-debug=1) — entièrement absent en production ── */
.biv2fs-debug{ position:fixed; right:14px; bottom:14px; z-index:2147483000; width:290px;
  background:var(--biv2fs-navy); color:var(--biv2fs-bg); border-radius:12px; overflow:hidden;
  font-family:inherit; font-size:12px; box-shadow:var(--biv2fs-shadow); }
.biv2fs-debug-h{ display:flex; align-items:center; justify-content:space-between;
  padding:10px 12px; background:rgba(255,255,255,.06); }
.biv2fs-debug-h b{ color:var(--biv2fs-accent); font-size:12.5px; letter-spacing:.3px; }
.biv2fs-debug-x{ -webkit-appearance:none; appearance:none; background:none; border:none;
  color:var(--biv2fs-bg); font-size:18px; line-height:1; cursor:pointer; opacity:.7; }
.biv2fs-debug-x:hover{ opacity:1; }
.biv2fs-debug-b{ padding:8px 12px; }
.biv2fs-debug-row{ display:flex; justify-content:space-between; gap:10px; padding:3px 0; border-bottom:1px solid rgba(255,255,255,.08); }
.biv2fs-debug-row:last-child{ border-bottom:none; }
.biv2fs-debug-row span{ color:rgba(255,255,255,.6); }
.biv2fs-debug-row b{ color:var(--biv2fs-bg); text-align:right; word-break:break-word; }
.biv2fs-debug-r{ -webkit-appearance:none; appearance:none; width:100%; background:var(--biv2fs-accent);
  color:var(--biv2fs-navy); border:none; padding:9px; font:inherit; font-weight:700; font-size:12px; cursor:pointer; }
.biv2fs-debug-r:hover{ background:var(--biv2fs-accent-d); color:var(--biv2fs-bg); }

@media (max-width:768px){
  .biv2fs-dropdown{ max-height:85vh; }
}
