
/* =====================================================
   DPEP Recherche Biens V1 — Correctif footer half-map
   Page : /resultats-de-recherche/
===================================================== */

/*
   Problème constaté :
   sur le layout half-map Houzez, le footer peut remonter dans la colonne
   des résultats et apparaître derrière les annonces.
*/

/* Marqueur de correction */
body.dpep-recherche-biens-v1 {
    background: #fff !important;
}

/* La page half-map doit occuper une vraie zone, sans laisser le footer remonter */
body.dpep-recherche-biens-v1 .main-wrap,
body.dpep-recherche-biens-v1 main,
body.dpep-recherche-biens-v1 .half-map-wrap,
body.dpep-recherche-biens-v1 .half-map-right-wrap,
body.dpep-recherche-biens-v1 .half-map-left-wrap,
body.dpep-recherche-biens-v1 .listing-v1 {
    position: relative !important;
}

/* Colonne résultats : fond opaque et couche au-dessus du footer */
body.dpep-recherche-biens-v1 .half-map-right-wrap,
body.dpep-recherche-biens-v1 .listing-view,
body.dpep-recherche-biens-v1 .listing-v1,
body.dpep-recherche-biens-v1 .list-view,
body.dpep-recherche-biens-v1 .property-listing,
body.dpep-recherche-biens-v1 .property-listing-wrap {
    background: #fff !important;
    z-index: 20 !important;
}

/* Le conteneur principal half-map doit passer au-dessus du footer */
body.dpep-recherche-biens-v1 .half-map-wrap,
body.dpep-recherche-biens-v1 .main-wrap .half-map-wrap,
body.dpep-recherche-biens-v1 section.half-map-wrap {
    z-index: 15 !important;
    background: #fff !important;
    min-height: calc(100vh - 190px) !important;
}

/* Sécurité : le footer ne doit jamais être superposé aux résultats half-map */
body.dpep-recherche-biens-v1 footer,
body.dpep-recherche-biens-v1 .footer-wrap,
body.dpep-recherche-biens-v1 .footer-bottom-wrap,
body.dpep-recherche-biens-v1 .footer-top-wrap,
body.dpep-recherche-biens-v1 .dpep-footer {
    position: relative !important;
    z-index: 0 !important;
    clear: both !important;
}

/*
   Sur le half-map, le footer n'apporte pas de valeur dans la zone de recherche.
   On le masque uniquement sur cette page pour éviter qu'il apparaisse derrière
   les annonces ou dans la colonne de résultats.
*/
body.dpep-recherche-biens-v1 footer,
body.dpep-recherche-biens-v1 .footer-wrap,
body.dpep-recherche-biens-v1 .footer-bottom-wrap,
body.dpep-recherche-biens-v1 .footer-top-wrap {
    display: none !important;
}

/* Sécurité si le footer est injecté sous une classe custom dans la colonne */
body.dpep-recherche-biens-v1 .half-map-right-wrap footer,
body.dpep-recherche-biens-v1 .half-map-right-wrap .footer-wrap,
body.dpep-recherche-biens-v1 .half-map-right-wrap .footer-bottom-wrap,
body.dpep-recherche-biens-v1 .half-map-right-wrap .footer-top-wrap {
    display: none !important;
}

/* Empêche les liens du footer de rester cliquables s'ils sont techniquement présents */
body.dpep-recherche-biens-v1 footer a,
body.dpep-recherche-biens-v1 .footer-wrap a {
    pointer-events: none !important;
}

/* Assure que les cartes annonces restent devant */
body.dpep-recherche-biens-v1 .item-wrap,
body.dpep-recherche-biens-v1 .property-item,
body.dpep-recherche-biens-v1 .listing-view .item-wrap,
body.dpep-recherche-biens-v1 .grid-view .item-wrap {
    position: relative !important;
    z-index: 30 !important;
}

/* Barre de filtres et top controls devant tout élément résiduel */
body.dpep-recherche-biens-v1 .advanced-search,
body.dpep-recherche-biens-v1 .advanced-search-nav,
body.dpep-recherche-biens-v1 .listing-tools-wrap,
body.dpep-recherche-biens-v1 .sort-by {
    position: relative !important;
    z-index: 35 !important;
}

/* Mobile : on garde le flux normal, mais toujours sans footer superposé */
@media (max-width: 991px) {
    body.dpep-recherche-biens-v1 .half-map-wrap,
    body.dpep-recherche-biens-v1 .half-map-right-wrap,
    body.dpep-recherche-biens-v1 .half-map-left-wrap {
        min-height: auto !important;
        height: auto !important;
    }
}
