/* ==========================================================================
   css/recherche_avancee.css — RECHERCHE AVANCÉE, PC + téléphone
   idf-immobilier.com — v1 (19/11/2026)
   Couleur d'accent selon le choix : bleu nuit (tout), bleu (location),
   vert (vente). Plus de violet : il est réservé à l'Espace Pro.
   ========================================================================== */
body.ra-body {
  --ra-acc: #1a3c5e; --ra-acc-fonce: #0f2a45; --ra-fond: #eef3f8; --ra-bord: #c9d6e3; --ra-anneau: rgba(26,60,94,.14);
  --ra-noir: #1a1a2e; --ra-texte: #374151; --ra-gris: #6b7280; --ra-gris-c: #9ca3af; --ra-ligne: #e5e7eb;
  --ra-display: 'Outfit', system-ui, sans-serif; --ra-corps: 'DM Sans', system-ui, sans-serif;
  background: #f4f6f9; font-family: var(--ra-corps); color: var(--ra-texte);
}
body.ra-body[data-trans="location"] { --ra-acc: #0064E0; --ra-acc-fonce: #0050b4; --ra-fond: #f0f6ff; --ra-bord: #bfdbfe; --ra-anneau: rgba(0,100,224,.14); }
body.ra-body[data-trans="vente"]    { --ra-acc: #00A86B; --ra-acc-fonce: #008a58; --ra-fond: #ecfdf5; --ra-bord: #a7f3d0; --ra-anneau: rgba(0,168,107,.16); }
body.ra-lock { overflow: hidden; }
body.ra-lock .m-tabbar { display: none !important; }   /* filtres ouverts sur téléphone : le bouton « Afficher » reste visible */
.ra-page { max-width: 1280px; padding-bottom: 48px; }
.ra-page [hidden] { display: none !important; }

/* ---------- Mise en page ---------- */
.ra-grid { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 26px; align-items: start; }

/* ---------- Colonne des filtres ---------- */
.ra-side { position: sticky; top: 92px; }
.ra-form { background: var(--ra-fond); border: 1px solid var(--ra-bord); border-radius: 18px; display: flex; flex-direction: column;
  max-height: calc(100vh - 110px); overflow: hidden; box-shadow: 0 1px 2px rgba(16,24,40,.04), 0 6px 20px rgba(16,24,40,.06);
  transition: background-color .3s, border-color .3s; }
.ra-side-head { display: flex; align-items: center; gap: 10px; padding: 16px 18px 12px; border-bottom: 1px solid var(--ra-bord); }
.ra-side-head h2 { font-family: var(--ra-display); font-weight: 800; font-size: 1.05rem; color: var(--ra-noir); margin: 0; display: flex; align-items: center; gap: 8px; }
.ra-side-head h2 i { color: var(--ra-acc); }
.ra-raz { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--ra-acc); text-decoration: none; }
.ra-raz:hover { text-decoration: underline; }
.ra-fermer { display: none; margin-left: auto; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--ra-bord); background: #fff; color: var(--ra-texte); font-size: 16px; }
.ra-side-body { overflow-y: auto; padding: 6px 18px 12px; overscroll-behavior: contain; }
.ra-side-foot { padding: 12px 18px 16px; border-top: 1px solid var(--ra-bord); background: var(--ra-fond); }

.ra-fs { padding: 14px 0; border-bottom: 1px solid rgba(0,0,0,.06); }
.ra-fs:last-child { border-bottom: 0; }
.ra-fs-t { font-family: var(--ra-display); font-weight: 700; font-size: 13.5px; color: var(--ra-noir); margin-bottom: 10px; display: flex; align-items: center; gap: 7px; }
.ra-fs-t i { color: var(--ra-acc); font-size: 15px; }
.ra-mt { margin-top: 14px; }
.ra-lbl { display: block; font-size: 12px; font-weight: 600; color: var(--ra-gris); margin: 8px 0 5px; }
.ra-in { width: 100%; height: 42px; border: 1.5px solid #fff; border-radius: 10px; background: #fff; padding: 0 12px; font-size: 14.5px; color: var(--ra-noir);
  box-shadow: 0 1px 2px rgba(16,24,40,.06); outline: none; transition: border-color .15s, box-shadow .15s; }
select.ra-in { appearance: none; padding-right: 32px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%236b7280' stroke-width='1.8'/%3E%3C/svg%3E") no-repeat right 12px center; cursor: pointer; }
.ra-in:hover { border-color: var(--ra-bord); }
.ra-in:focus { border-color: var(--ra-acc); box-shadow: 0 0 0 4px var(--ra-anneau); }
.ra-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ra-duo .ra-lbl { margin-top: 0; }
.ra-suf { position: relative; }
.ra-suf .ra-in { padding-right: 34px; }
.ra-suf span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 13px; color: var(--ra-gris-c); font-weight: 600; pointer-events: none; }
.ra-aide { font-size: 12px; color: var(--ra-gris); margin: 8px 0 0; }

/* Boutons segmentés (transaction, type) */
.ra-seg { display: flex; background: #fff; border-radius: 12px; padding: 4px; gap: 4px; box-shadow: 0 1px 2px rgba(16,24,40,.06); }
.ra-seg + .ra-seg { margin-top: 8px; }
.ra-seg label { flex: 1; margin: 0; cursor: pointer; }
.ra-seg input, .ra-chips input, .ra-checks input, .ra-dpe input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.ra-seg span { display: flex; align-items: center; justify-content: center; gap: 5px; height: 36px; border-radius: 9px; font-family: var(--ra-display); font-weight: 700; font-size: 13.5px; color: var(--ra-gris); transition: background .15s, color .15s; white-space: nowrap; }
.ra-seg label:hover span { color: var(--ra-noir); }
.ra-seg input:checked + span { background: var(--ra-fond); color: var(--ra-noir); box-shadow: inset 0 0 0 1.5px var(--ra-bord); }
.ra-seg-trans .is-loc span { color: #0064E0; }
.ra-seg-trans .is-ven span { color: #00A86B; }
.ra-seg-trans input:checked + span { background: #1a3c5e; color: #fff; box-shadow: none; }
.ra-seg-trans .is-loc input:checked + span { background: #0064E0; color: #fff; box-shadow: 0 3px 10px rgba(0,100,224,.25); }
.ra-seg-trans .is-ven input:checked + span { background: #00A86B; color: #fff; box-shadow: 0 3px 10px rgba(0,168,107,.25); }
.ra-seg input:focus-visible + span, .ra-chips input:focus-visible + span, .ra-checks input:focus-visible + span, .ra-dpe input:focus-visible + span { outline: 3px solid var(--ra-anneau); outline-offset: 1px; }

/* Puces (pièces, étage, annonceur) */
.ra-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ra-chips label { margin: 0; cursor: pointer; }
.ra-chips span { display: inline-flex; align-items: center; height: 34px; padding: 0 12px; border-radius: 18px; background: #fff; border: 1.5px solid #fff; font-size: 13px; font-weight: 600; color: var(--ra-texte); box-shadow: 0 1px 2px rgba(16,24,40,.06); transition: all .15s; }
.ra-chips label:hover span { border-color: var(--ra-acc); color: var(--ra-acc); }
.ra-chips input:checked + span { background: var(--ra-acc); border-color: var(--ra-acc); color: #fff; }

/* Cases (équipements) */
.ra-checks { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.ra-checks label { margin: 0; cursor: pointer; }
.ra-checks span { display: flex; align-items: center; gap: 7px; min-height: 38px; padding: 6px 10px; border-radius: 10px; background: #fff; border: 1.5px solid #fff; font-size: 13px; font-weight: 500; color: var(--ra-texte); box-shadow: 0 1px 2px rgba(16,24,40,.06); line-height: 1.2; transition: all .15s; }
.ra-checks span i { color: var(--ra-gris-c); font-size: 14px; }
.ra-checks label:hover span { border-color: var(--ra-bord); }
.ra-checks input:checked + span { border-color: var(--ra-acc); color: var(--ra-acc); font-weight: 700; }
.ra-checks input:checked + span i { color: var(--ra-acc); }
.ra-checks input:checked + span::after { content: "\F26E"; font-family: 'bootstrap-icons'; margin-left: auto; font-size: 14px; }

/* DPE / GES */
.ra-dpe { display: flex; flex-wrap: wrap; gap: 4px; }
.ra-dpe label { margin: 0; cursor: pointer; }
.ra-dpe span { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 32px; padding: 0 6px; border-radius: 7px; font-family: var(--ra-display); font-weight: 800; font-size: 13px; color: #fff; opacity: .45; transition: opacity .15s, transform .15s, box-shadow .15s; }
.ra-dpe label:hover span { opacity: .8; }
.ra-dpe input:checked + span { opacity: 1; transform: translateY(-1px); box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ra-noir); }
.ra-dpe .is-tous span { background: #fff; color: var(--ra-texte); opacity: 1; border: 1.5px solid var(--ra-bord); font-size: 12px; padding: 0 10px; }
.ra-dpe .is-tous input:checked + span { box-shadow: none; border-color: var(--ra-acc); color: var(--ra-acc); }
.dpe-a span, span.dpe-a { background: #319834; } .dpe-b span, span.dpe-b { background: #33a357; } .dpe-c span, span.dpe-c { background: #51b84b; }
.dpe-d span, span.dpe-d { background: #f2e500; color: #333 !important; } .dpe-e span, span.dpe-e { background: #f0b400; }
.dpe-f span, span.dpe-f { background: #eb8235; } .dpe-g span, span.dpe-g { background: #ed1b23; }
.ges-a span { background: #b9a3f0; } .ges-b span { background: #a283ea; } .ges-c span { background: #8b64e0; } .ges-d span { background: #7448d0; }
.ges-e span { background: #5f33b5; } .ges-f span { background: #4a2391; } .ges-g span { background: #351567; }

/* Plus de critères */
.ra-plus { border-top: 1px solid rgba(0,0,0,.06); margin-top: 2px; }
.ra-plus > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; padding: 14px 0; font-family: var(--ra-display); font-weight: 700; font-size: 14px; color: var(--ra-acc); }
.ra-plus > summary::-webkit-details-marker { display: none; }
.ra-plus > summary i { transition: transform .2s; }
.ra-plus[open] > summary i { transform: rotate(180deg); }

/* Bouton Afficher */
.ra-go { width: 100%; min-height: 48px; border: 0; border-radius: 12px; background: var(--ra-acc); color: #fff; font-family: var(--ra-display); font-weight: 800; font-size: 15px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; box-shadow: 0 6px 16px var(--ra-anneau); transition: background .2s, opacity .2s; }
.ra-go:hover { background: var(--ra-acc-fonce); }
.ra-go.is-attente { opacity: .75; }
.ra-go.is-vide { background: #9ca3af; box-shadow: none; }

/* ---------- Résultats ---------- */
.ra-bar { display: flex; gap: 10px; align-items: center; background: #fff; border: 1px solid var(--ra-ligne); border-radius: 14px; padding: 8px; box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.ra-q { flex: 1; display: flex; align-items: center; gap: 8px; padding: 0 10px; min-width: 0; }
.ra-q i { color: var(--ra-gris-c); }
.ra-q input { flex: 1; min-width: 0; border: 0; outline: none; height: 40px; font-size: 15px; background: transparent; color: var(--ra-noir); }
.ra-btn-filtres { display: none; align-items: center; gap: 7px; height: 40px; padding: 0 14px; border-radius: 10px; border: 1.5px solid var(--ra-bord); background: var(--ra-fond); color: var(--ra-noir); font-family: var(--ra-display); font-weight: 700; font-size: 14px; }
.ra-nb { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--ra-acc); color: #fff; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; }
.ra-tri select { height: 40px; border: 1.5px solid var(--ra-ligne); border-radius: 10px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%236b7280' stroke-width='1.8'/%3E%3C/svg%3E") no-repeat right 12px center;
  appearance: none; padding: 0 34px 0 12px; font-size: 14px; font-weight: 600; color: var(--ra-texte); cursor: pointer; }
.ra-tri select:focus { outline: none; border-color: var(--ra-acc); box-shadow: 0 0 0 4px var(--ra-anneau); }
.ra-count { margin: 14px 2px 10px; font-size: 14px; color: var(--ra-gris); }
.ra-count strong { font-family: var(--ra-display); color: var(--ra-noir); font-size: 16px; }

.ra-actifs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; }
.ra-tag { display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 8px 0 12px; border-radius: 16px; background: var(--ra-fond); border: 1px solid var(--ra-bord); color: var(--ra-noir); font-size: 13px; font-weight: 600; text-decoration: none; transition: border-color .15s; }
.ra-tag i { font-size: 18px; color: var(--ra-gris); }
.ra-tag:hover { border-color: var(--ra-acc); color: var(--ra-acc); }
.ra-tag:hover i { color: var(--ra-acc); }
.ra-tag-raz { font-size: 13px; font-weight: 700; color: var(--ra-gris); text-decoration: underline; text-underline-offset: 3px; margin-left: 4px; }
.ra-tag-raz:hover { color: var(--ra-noir); }

.ra-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.ra-card { background: #fff; border: 1px solid var(--ra-ligne); border-radius: 16px; overflow: hidden; text-decoration: none; color: inherit; display: flex; flex-direction: column;
  box-shadow: 0 1px 2px rgba(16,24,40,.04); transition: transform .2s, box-shadow .2s, border-color .2s; }
.ra-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(16,24,40,.10); color: inherit; }
.ra-card.is-loc:hover { border-color: #bfdbfe; } .ra-card.is-ven:hover { border-color: #a7f3d0; }
.ra-card-img { position: relative; aspect-ratio: 4 / 3; background: #eef1f5; overflow: hidden; }
.ra-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.ra-card:hover .ra-card-img img { transform: scale(1.04); }
.ra-noimg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 2.2rem; color: #c3cad3; }
.ra-card-tag { position: absolute; top: 10px; left: 10px; padding: 4px 10px; border-radius: 6px; font-family: var(--ra-display); font-weight: 800; font-size: 11px; letter-spacing: .3px; text-transform: uppercase; color: #fff; }
.is-loc .ra-card-tag { background: #0064E0; } .is-ven .ra-card-tag { background: #00A86B; }
.ra-card-pro { position: absolute; top: 10px; right: 10px; padding: 3px 8px; border-radius: 6px; background: rgba(26,26,46,.78); color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; gap: 4px; align-items: center; }
.ra-card-dpe { position: absolute; bottom: 10px; right: 10px; width: 28px; height: 28px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; font-family: var(--ra-display); font-weight: 900; font-size: 12px; color: #fff; }
.ra-card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; }
.ra-card-prix { font-family: var(--ra-display); font-weight: 900; font-size: 1.25rem; line-height: 1.1; }
.is-loc .ra-card-prix { color: #0064E0; } .is-ven .ra-card-prix { color: #00A86B; }
.ra-card-prix small { font-size: 12px; font-weight: 600; color: var(--ra-gris-c); }
.ra-card-titre { font-family: var(--ra-display); font-weight: 700; font-size: 14.5px; color: var(--ra-noir); }
.ra-card-lieu { font-size: 13.5px; color: var(--ra-gris); display: flex; gap: 5px; align-items: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.ra-vide { text-align: center; background: #fff; border: 1px dashed var(--ra-bord); border-radius: 16px; padding: 46px 24px; color: var(--ra-gris); }
.ra-vide > i { font-size: 2.4rem; color: var(--ra-bord); display: block; margin-bottom: 10px; }
.ra-vide p { margin: 0 0 6px; }
.ra-vide strong { color: var(--ra-noir); font-family: var(--ra-display); font-size: 16px; }
.ra-vide-btn { display: inline-flex; align-items: center; gap: 7px; margin-top: 14px; height: 44px; padding: 0 20px; border-radius: 11px; border: 1.5px solid var(--ra-acc); color: var(--ra-acc); font-family: var(--ra-display); font-weight: 700; text-decoration: none; background: #fff; }
.ra-vide-btn:hover { background: var(--ra-fond); color: var(--ra-acc-fonce); }

.ra-pages { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 28px; flex-wrap: wrap; }
.ra-pg { min-width: 42px; height: 42px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; border: 1px solid var(--ra-ligne); background: #fff; color: var(--ra-texte); font-family: var(--ra-display); font-weight: 700; text-decoration: none; }
.ra-pg:hover { border-color: var(--ra-acc); color: var(--ra-acc); }
.ra-pg.is-on { background: var(--ra-acc); border-color: var(--ra-acc); color: #fff; }
.ra-pg.is-off { opacity: .4; pointer-events: none; }
.ra-pg-dots { color: var(--ra-gris-c); padding: 0 4px; }

/* ---------- Écrans moyens ---------- */
@media (max-width: 1200px) { .ra-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Tablette et téléphone : les filtres passent dans un panneau ---------- */
@media (max-width: 991px) {
  .ra-grid { grid-template-columns: 1fr; }
  .ra-btn-filtres { display: inline-flex; }
  .ra-side { position: fixed; inset: 0 0 0 auto; width: min(420px, 100%); z-index: 5000; transform: translateX(105%); transition: transform .3s cubic-bezier(.4,0,.2,1); visibility: hidden; }
  .ra-side.is-open { transform: none; visibility: visible; }
  .ra-form { height: 100%; max-height: none; border-radius: 0; border: 0; }
  .ra-fermer { display: inline-flex; align-items: center; justify-content: center; }
  .ra-raz { margin-left: auto; }
  .ra-raz + .ra-fermer { margin-left: 4px; }
  .ra-side-foot { padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
  .ra-voile { position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 4999; }
}
@media (max-width: 768px) {
  .ra-page { padding-top: 14px; padding-left: 12px; padding-right: 12px; }
  .ra-page > nav { display: none; }
  .page-header-block { background: none !important; border: 0 !important; padding: 0 !important; margin: 0 0 12px !important; box-shadow: none !important; }
  .page-header-block h1 { font-family: var(--ra-display); font-weight: 800; font-size: 1.35rem; color: var(--ra-noir); margin: 0 0 2px; }
  .page-header-block p { font-size: 13.5px; color: var(--ra-gris); margin: 0; }
  .ra-bar { flex-wrap: wrap; padding: 6px; }
  .ra-q { flex: 1 1 100%; border-bottom: 1px solid var(--ra-ligne); padding-bottom: 4px; }
  .ra-q input { font-size: 16px; }   /* 16 px : pas de zoom automatique sur iPhone */
  .ra-btn-filtres { flex: 1; justify-content: center; height: 44px; }
  .ra-tri { flex: 1; }
  .ra-tri select { width: 100%; height: 44px; font-size: 16px; }
  .ra-in { height: 46px; font-size: 16px; }
  .ra-cards { grid-template-columns: 1fr; gap: 14px; }
  .ra-card { flex-direction: row; }
  .ra-card-img { width: 38%; flex-shrink: 0; aspect-ratio: auto; min-height: 118px; }
  .ra-card-tag { font-size: 10px; padding: 3px 7px; top: 8px; left: 8px; }
  .ra-card-pro, .ra-card-dpe { display: none; }
  .ra-card-body { padding: 12px 14px; justify-content: center; min-width: 0; }
  .ra-card-prix { font-size: 1.1rem; }
  .ra-card-titre { font-size: 14px; }
  .ra-side { width: 100%; }
  .ra-checks span, .ra-chips span { min-height: 40px; }
}