
/* =====================================================
   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;
    }
}


/* =====================================================
   DPEP Recherche Biens — alignements résultats / budget
   Correction CSS uniquement, sans JavaScript et sans surcharge PHP.
===================================================== */

body.dpep-recherche-biens-v1 .half-map-right-wrap {
    padding-top: 22px !important;
}

body.dpep-recherche-biens-v1 .page-title-wrap,
body.dpep-recherche-biens-v1 .listing-tools-wrap {
    margin-top: 18px !important;
    margin-bottom: 20px !important;
    padding-top: 14px !important;
    padding-bottom: 14px !important;
}

body.dpep-recherche-biens-v1 .page-title-wrap .page-title {
    line-height: 1.35 !important;
    margin-bottom: 0 !important;
}

body.dpep-recherche-biens-v1 .sort-by {
    margin-top: 12px !important;
    margin-bottom: 12px !important;
    padding-top: 6px !important;
}

body.dpep-recherche-biens-v1 #houzez_ajax_container {
    padding-top: 12px !important;
}

body.dpep-recherche-biens-v1 .search-no-results-found-wrap,
body.dpep-recherche-biens-v1 .search-no-results-found,
body.dpep-recherche-biens-v1 .map-notfound {
    margin-top: 18px !important;
    margin-bottom: 28px !important;
}

body.dpep-recherche-biens-v1 .range-wrap,
body.dpep-recherche-biens-v1 .price-range-wrap {
    position: relative !important;
    padding-top: 8px !important;
}

body.dpep-recherche-biens-v1 .range-title,
body.dpep-recherche-biens-v1 .range-text {
    position: relative !important;
    z-index: 5 !important;
    display: inline-block !important;
    background: #fff !important;
    padding-right: 10px !important;
    margin-bottom: 18px !important;
}

body.dpep-recherche-biens-v1 .ui-slider,
body.dpep-recherche-biens-v1 .price-range {
    margin-top: 10px !important;
    z-index: 1 !important;
}

@media (max-width: 767px) {
    body.dpep-recherche-biens-v1 .page-title-wrap,
    body.dpep-recherche-biens-v1 .listing-tools-wrap {
        margin: 16px 14px 18px !important;
        padding: 14px !important;
    }
}

/* =====================================================
   DPEP Recherche Biens V30 — corrections half-map ciblées
   CSS uniquement, pour éviter les surcouches JS.
===================================================== */

body.dpep-recherche-biens-v1 .half-map-right-wrap > .advanced-search,
body.dpep-recherche-biens-v1 .half-map-right-wrap .advanced-search,
body.dpep-recherche-biens-v1 .half-map-right-wrap .advanced-search-v2 {
    margin-bottom: 26px !important;
}

body.dpep-recherche-biens-v1 .half-map-right-wrap .page-title-wrap,
body.dpep-recherche-biens-v1 .half-map-right-wrap .listing-tools-wrap,
body.dpep-recherche-biens-v1 .half-map-right-wrap .sort-by,
body.dpep-recherche-biens-v1 .half-map-right-wrap .sort-by-title {
    clear: both !important;
}

body.dpep-recherche-biens-v1 .half-map-right-wrap .page-title-wrap,
body.dpep-recherche-biens-v1 .half-map-right-wrap .listing-tools-wrap {
    margin: 24px 0 18px !important;
    padding: 14px 16px !important;
}

body.dpep-recherche-biens-v1 .half-map-right-wrap .sort-by {
    display: block !important;
    margin: 18px 0 20px !important;
    padding: 10px 0 !important;
}

body.dpep-recherche-biens-v1 .half-map-right-wrap .sort-by-title {
    display: inline-block !important;
    margin-right: 6px !important;
}

body.dpep-recherche-biens-v1 .half-map-right-wrap .search-no-results-found,
body.dpep-recherche-biens-v1 .half-map-right-wrap .search-no-results-found-wrap,
body.dpep-recherche-biens-v1 .half-map-left-wrap .map-notfound {
    margin: 24px 0 30px !important;
    padding: 12px 16px !important;
}

body.dpep-recherche-biens-v1 .half-map-right-wrap .range-wrap,
body.dpep-recherche-biens-v1 .half-map-right-wrap .price-range-wrap,
body.dpep-recherche-biens-v1 .half-map-right-wrap .form-group {
    overflow: visible !important;
}

body.dpep-recherche-biens-v1 .half-map-right-wrap .range-title,
body.dpep-recherche-biens-v1 .half-map-right-wrap .range-text {
    position: relative !important;
    z-index: 10 !important;
    background: #fff !important;
    padding: 0 12px 8px 0 !important;
}

body.dpep-recherche-biens-v1 .half-map-right-wrap input[type="range"].hz-price-range-from,
body.dpep-recherche-biens-v1 .half-map-right-wrap input[type="range"].hz-price-range-to {
    margin-top: 16px !important;
}

/* =====================================================
   DPEP V54 — Formulaire half-map desktop propre
   Layout géré côté PHP : pas de déplacement JS des champs.
===================================================== */
body.dpep-recherche-biens-v1 .dpep-halfmap-search-clean-v54 {
    background: #fff !important;
    padding: 26px 0 28px !important;
    margin: 0 0 26px !important;
    border-bottom: 1px solid rgba(47,37,29,.08) !important;
}

body.dpep-recherche-biens-v1 .dpep-halfmap-search-clean-v54 .container {
    width: 100% !important;
    max-width: 760px !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
}

body.dpep-recherche-biens-v1 .dpep-halfmap-form-v54 {
    display: block !important;
    width: 100% !important;
}

body.dpep-recherche-biens-v1 .dpep-halfmap-form-v54 .form-group {
    margin: 0 !important;
}

body.dpep-recherche-biens-v1 .dpep-search-location-row-v54 {
    margin-bottom: 18px !important;
}

body.dpep-recherche-biens-v1 .dpep-location-group-v54 .location-search {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
}

body.dpep-recherche-biens-v1 .dpep-location-group-v54 input[name="search_location"] {
    width: 100% !important;
    height: 48px !important;
    padding: 0 58px 0 18px !important;
    border: 1px solid rgba(23,43,77,.14) !important;
    border-radius: 16px !important;
    background: #fff !important;
    color: #2f251d !important;
    font-size: 14px !important;
    box-shadow: none !important;
}

body.dpep-recherche-biens-v1 .dpep-location-trigger-v54 {
    position: absolute !important;
    right: 6px !important;
    top: 6px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 38px !important;
    height: 36px !important;
    border: 1px solid rgba(23,43,77,.12) !important;
    border-radius: 13px !important;
    background: #fff !important;
    color: #214a68 !important;
    box-shadow: none !important;
    cursor: pointer !important;
}

body.dpep-recherche-biens-v1 .dpep-radius-row-v54 {
    display: grid !important;
    grid-template-columns: max-content minmax(180px, 1fr) !important;
    align-items: center !important;
    column-gap: 18px !important;
    margin: 0 0 24px !important;
}

body.dpep-recherche-biens-v1 .dpep-radius-label-v54 {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin: 0 !important;
    color: #2f251d !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
}

body.dpep-recherche-biens-v1 .dpep-radius-label-v54 input[type="checkbox"] {
    width: 18px !important;
    height: 18px !important;
    margin: 0 !important;
    accent-color: #087f64 !important;
}

body.dpep-recherche-biens-v1 .dpep-radius-label-v54 strong {
    margin-left: 8px !important;
    font-weight: 800 !important;
}

body.dpep-recherche-biens-v1 .dpep-radius-slider-v54 {
    display: block !important;
    width: 100% !important;
    height: 4px !important;
    margin: 0 !important;
    accent-color: #087f64 !important;
}

body.dpep-recherche-biens-v1 .dpep-filter-row-v54 {
    display: grid !important;
    gap: 14px !important;
    margin: 0 0 18px !important;
    align-items: end !important;
}

body.dpep-recherche-biens-v1 .dpep-main-filter-row-v54 {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, .85fr) !important;
}

body.dpep-recherche-biens-v1 .dpep-surface-row-v54 {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

body.dpep-recherche-biens-v1 .dpep-filter-col-v54 {
    min-width: 0 !important;
}

body.dpep-recherche-biens-v1 .dpep-field-label-v54 {
    display: block !important;
    margin: 0 0 7px !important;
    color: rgba(47,37,29,.72) !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    line-height: 1.15 !important;
    letter-spacing: .08em !important;
    text-transform: uppercase !important;
    white-space: nowrap !important;
}

body.dpep-recherche-biens-v1 .dpep-halfmap-form-v54 .bootstrap-select,
body.dpep-recherche-biens-v1 .dpep-halfmap-form-v54 .bootstrap-select > .dropdown-toggle,
body.dpep-recherche-biens-v1 .dpep-halfmap-form-v54 select,
body.dpep-recherche-biens-v1 .dpep-halfmap-form-v54 input[type="text"]:not(#search_location) {
    width: 100% !important;
    max-width: 100% !important;
    height: 44px !important;
    min-height: 44px !important;
    border-radius: 13px !important;
    border: 1px solid rgba(23,43,77,.14) !important;
    background: #fff !important;
    color: #2f251d !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    box-shadow: none !important;
}

body.dpep-recherche-biens-v1 .dpep-halfmap-form-v54 .bootstrap-select > .dropdown-toggle {
    display: flex !important;
    align-items: center !important;
    padding: 0 16px !important;
}

body.dpep-recherche-biens-v1 .dpep-halfmap-form-v54 input[type="text"]:not(#search_location) {
    padding: 0 14px !important;
    font-weight: 500 !important;
}

body.dpep-recherche-biens-v1 .dpep-halfmap-form-v54 .filter-option-inner-inner {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

body.dpep-recherche-biens-v1 .dpep-halfmap-form-v54 .dropdown-menu {
    border: 1px solid rgba(47,37,29,.12) !important;
    border-radius: 16px !important;
    box-shadow: 0 18px 45px rgba(18,28,38,.16) !important;
}

body.dpep-recherche-biens-v1 .dpep-filter-col-label-v54 .dropdown-menu {
    min-width: min(520px, 82vw) !important;
}

body.dpep-recherche-biens-v1 .dpep-filter-col-label-v54 .dropdown-menu li a,
body.dpep-recherche-biens-v1 .dpep-filter-col-label-v54 .dropdown-menu .dropdown-item {
    white-space: normal !important;
    line-height: 1.35 !important;
    padding-top: 9px !important;
    padding-bottom: 9px !important;
}

body.dpep-recherche-biens-v1 .dpep-budget-row-v54 {
    margin: 8px 0 24px !important;
}

body.dpep-recherche-biens-v1 .dpep-budget-row-v54 .range-wrap,
body.dpep-recherche-biens-v1 .dpep-budget-row-v54 .dpep-price-clean {
    display: block !important;
    width: 100% !important;
    padding-top: 0 !important;
}

body.dpep-recherche-biens-v1 .dpep-budget-row-v54 .range-text,
body.dpep-recherche-biens-v1 .dpep-budget-row-v54 .dpep-price-head {
    display: flex !important;
    align-items: baseline !important;
    gap: 8px !important;
    margin: 0 0 12px !important;
    padding: 0 !important;
    background: transparent !important;
    color: #2f251d !important;
    font-weight: 800 !important;
}

body.dpep-recherche-biens-v1 .dpep-budget-row-v54 .sliders_control,
body.dpep-recherche-biens-v1 .dpep-budget-row-v54 .dpep-price-slider {
    display: block !important;
    position: relative !important;
    min-height: 22px !important;
}

body.dpep-recherche-biens-v1 .dpep-budget-row-v54 input[type="range"] {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    accent-color: #087f64 !important;
}

body.dpep-recherche-biens-v1 .dpep-action-row-v54 {
    display: grid !important;
    grid-template-columns: 1.45fr 1fr .8fr !important;
    gap: 10px !important;
    align-items: stretch !important;
}

body.dpep-recherche-biens-v1 .dpep-action-row-v54 .btn,
body.dpep-recherche-biens-v1 .dpep-action-row-v54 button,
body.dpep-recherche-biens-v1 .dpep-action-row-v54 a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 7px !important;
    height: 46px !important;
    min-height: 46px !important;
    padding: 0 18px !important;
    border-radius: 13px !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    text-align: center !important;
    text-decoration: none !important;
    box-shadow: none !important;
}

body.dpep-recherche-biens-v1 .dpep-search-submit-v54 {
    background: #7f8b87 !important;
    border: 1px solid #7f8b87 !important;
    color: #fff !important;
}

body.dpep-recherche-biens-v1 .dpep-save-search-v54 {
    background: #087f64 !important;
    border: 1px solid #087f64 !important;
    color: #fff !important;
}

body.dpep-recherche-biens-v1 .dpep-reset-search-v54 {
    background: #fff !important;
    border: 1px solid rgba(23,43,77,.14) !important;
    color: #6f7774 !important;
}

@media (max-width: 1280px) {
    body.dpep-recherche-biens-v1 .dpep-halfmap-search-clean-v54 .container {
        max-width: 720px !important;
    }
    body.dpep-recherche-biens-v1 .dpep-surface-row-v54 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 991px) {
    body.dpep-recherche-biens-v1 .dpep-halfmap-search-clean-v54 {
        display: none !important;
    }
}


/* DPEP V55 — libellés de filtres plus courts et plus lisibles */
body.dpep-recherche-biens-v1 .dpep-halfmap-form-v54 .dpep-field-label-v54 {
    color: rgba(47,37,29,.66) !important;
    font-size: 9.5px !important;
    letter-spacing: .075em !important;
    margin-bottom: 6px !important;
}

body.dpep-recherche-biens-v1 .dpep-halfmap-form-v54 input::placeholder {
    color: rgba(47,37,29,.46) !important;
    font-weight: 500 !important;
}

body.dpep-recherche-biens-v1 .dpep-halfmap-form-v54 .bootstrap-select > .dropdown-toggle,
body.dpep-recherche-biens-v1 .dpep-halfmap-form-v54 input[type="text"]:not(#search_location) {
    font-size: 13px !important;
    font-weight: 650 !important;
}

body.dpep-recherche-biens-v1 .dpep-halfmap-form-v54 .filter-option-inner-inner {
    color: #2f251d !important;
    font-weight: 750 !important;
}

body.dpep-recherche-biens-v1 .dpep-radius-label-v54 span {
    text-transform: none !important;
}

body.dpep-recherche-biens-v1 .dpep-radius-label-v54 strong {
    color: #2f251d !important;
    min-width: 52px !important;
}

body.dpep-recherche-biens-v1 .dpep-action-row-v54 {
    grid-template-columns: 1.25fr .9fr .75fr !important;
}

body.dpep-recherche-biens-v1 .dpep-search-submit-v54,
body.dpep-recherche-biens-v1 .dpep-save-search-v54,
body.dpep-recherche-biens-v1 .dpep-reset-search-v54 {
    text-transform: none !important;
}


/* DPEP V56 - compteur de résultats lisible */
body.dpep-recherche-biens-v1 .dpep-clean-results-count {
    display: inline-flex !important;
    align-items: baseline !important;
    gap: 6px !important;
    color: #2f251d !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    font-size: 15px !important;
    font-weight: 650 !important;
    letter-spacing: 0 !important;
    white-space: nowrap !important;
}
body.dpep-recherche-biens-v1 .dpep-clean-results-count #total-results {
    color: #1f4e79 !important;
    font-size: 16px !important;
    font-weight: 800 !important;
}
body.dpep-recherche-biens-v1 .dpep-clean-results-count .dpep-clean-results-count-label {
    color: #2f251d !important;
    font-size: 15px !important;
    font-weight: 650 !important;
}
