/* ============================================================================
   [NEXTRETAIL] WRAPPER GLOBAL SÉCURISÉ - DISPLAY BLOCK + HEIGHT AUTO
   ============================================================================ */


/* Le titre ajouté dynamiquement (Alt de l'image) */
.layerdev-popup-title {
    font-weight: bold;
    margin-bottom: 5px;
    display: block;
}

/* Le prix (repositionné et stylisé) */
.layerdev-popup-price {
    border-top: 1px solid #eee;
    margin-top: 5px !important;
	margin-bottom : 5px !important;
    padding-top: 10px;
    display: block !important;
    text-align: center;
    width: 100%;
}

/* Le texte "Localisation approximative" */
.layerdev-popup-approx {
    font-size: 10px;
    text-align: center;
    color: #888;
    margin-top: 5px;
    display: block;
}

.LAYERDEV-halfmap-secure-wrapper {
    display: block;
    width: 90%;
	place-self: center;
    height: auto !important;
    min-height: calc(100vh - var(--header-height, 100px)) !important
    position: relative !important;
    overflow: visible !important;
    isolation: isolate !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Section half-map à l'intérieur du wrapper */
.LAYERDEV-halfmap-secure-wrapper .half-map-wrap {
    display: flex !important;
    flex-direction: row-reverse !important;
    width: 100% !important;
    min-height: calc(100vh - var(--header-height, 0px)) !important;
    height: calc(100vh - var(--header-height, 0px)) !important;
    overflow: hidden !important; /* IMPORTANT : hidden sur le parent flex */
    position: relative !important;
}

/* Listing : 60% avec SCROLL VERTICAL */
.LAYERDEV-halfmap-secure-wrapper .half-map-right-wrap {
    width: 60% !important;
    flex: 0 0 60% !important;
    max-width: 60% !important;
    height: 100% !important;
    overflow-y: auto !important; /* SCROLL VERTICAL */
    overflow-x: hidden !important; /* PAS de scroll horizontal */
    position: relative !important;
    z-index: 10 !important;
    padding-top: 20px !important;
}

/* Map : 40% */
.LAYERDEV-halfmap-secure-wrapper .half-map-left-wrap {
    width: 40% !important;
    flex: 0 0 40% !important;
    max-width: 40% !important;
    height: 100% !important;
    position: sticky !important;
    top: var(--header-height, 0px) !important;
    z-index: 5 !important;
    overflow: hidden !important; /* Contenir la map */
}

.LAYERDEV-halfmap-secure-wrapper .half-map-left-wrap .map-wrap {
    width: 100% !important;
    height: 100% !important;
    position: relative !important;
}

.LAYERDEV-halfmap-secure-wrapper #houzez-properties-map {
    width: 100% !important;
    height: 100% !important;
}

/* ============================================================================
   FIX BOUTONS MAP (ZOOM +/-, NAVIGATION)
   ============================================================================ */

/* Contrôles Leaflet */
.LAYERDEV-halfmap-secure-wrapper .leaflet-control-container,
.LAYERDEV-halfmap-secure-wrapper .leaflet-control-zoom,
.LAYERDEV-halfmap-secure-wrapper .leaflet-control-zoom-in,
.LAYERDEV-halfmap-secure-wrapper .leaflet-control-zoom-out,
.LAYERDEV-halfmap-secure-wrapper .leaflet-bar,
.LAYERDEV-halfmap-secure-wrapper .leaflet-control,
.LAYERDEV-halfmap-secure-wrapper .leaflet-top,
.LAYERDEV-halfmap-secure-wrapper .leaflet-bottom,
.LAYERDEV-halfmap-secure-wrapper .leaflet-left,
.LAYERDEV-halfmap-secure-wrapper .leaflet-right {
    z-index: 1000 !important;
    position: relative !important;
}

/* Boutons personnalisés Houzez dans la map */
.LAYERDEV-halfmap-secure-wrapper .map-next-prev,
.LAYERDEV-halfmap-secure-wrapper .gm-style-mtc,
.LAYERDEV-halfmap-secure-wrapper .gm-svpc,
.LAYERDEV-halfmap-secure-wrapper .gm-control-active,
.LAYERDEV-halfmap-secure-wrapper .map-buttons,
.LAYERDEV-halfmap-secure-wrapper .map-street-view,
.LAYERDEV-halfmap-secure-wrapper .control-btn {
    z-index: 1000 !important;
    position: relative !important;
}

/* Google Maps controls */
.LAYERDEV-halfmap-secure-wrapper .gm-bundled-control,
.LAYERDEV-halfmap-secure-wrapper .gm-fullscreen-control {
    z-index: 1000 !important;
}

/* ============================================================================
   RECHERCHE ET FORMULAIRES - OVERFLOW VISIBLE
   ============================================================================ */

.LAYERDEV-halfmap-secure-wrapper .e-n-tabs-content,
.LAYERDEV-halfmap-secure-wrapper .search-wrap,
.LAYERDEV-halfmap-secure-wrapper .advanced-search,
.LAYERDEV-halfmap-secure-wrapper .advanced-search-v1,
.LAYERDEV-halfmap-secure-wrapper .advanced-search-v3,
.LAYERDEV-halfmap-secure-wrapper .advanced-search-v4 {
    display: block !important;
    overflow: visible !important;
    height: auto !important;
    position: relative !important;
    z-index: 9999 !important;
    isolation: isolate !important;
}

.LAYERDEV-halfmap-secure-wrapper .form-group,
.LAYERDEV-halfmap-secure-wrapper .col-md-2,
.LAYERDEV-halfmap-secure-wrapper .col-md-4,
.LAYERDEV-halfmap-secure-wrapper .col-sm-12,
.LAYERDEV-halfmap-secure-wrapper .row {
    overflow: visible !important;
}

/* ESPACE APRÈS LA RECHERCHE POUR LES DROPDOWNS */
.LAYERDEV-halfmap-secure-wrapper .e-n-tabs-content,
.LAYERDEV-halfmap-secure-wrapper .search-wrap {
    margin-bottom: 400px !important;
}

/* ============================================================================
   DROPDOWNS BOOTSTRAP SELECT - Z-INDEX MAXIMUM
   ============================================================================ */

.LAYERDEV-halfmap-secure-wrapper .bootstrap-select {
    position: relative !important;
    z-index: 10000 !important;
    display: block !important;
}

.LAYERDEV-halfmap-secure-wrapper .bootstrap-select.show .dropdown-menu,
.LAYERDEV-halfmap-secure-wrapper .bootstrap-select .dropdown-menu.show {
    position: absolute !important;
    z-index: 999999 !important;
    top: 100% !important;
    left: 0 !important;
    right: auto !important;
    margin-top: 2px !important;
    transform: none !important;
    will-change: auto !important;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2) !important;
}

.LAYERDEV-halfmap-secure-wrapper .bootstrap-select .dropdown-toggle {
    position: relative !important;
    z-index: 1 !important;
}

.LAYERDEV-halfmap-secure-wrapper .dropdown-menu {
    position: absolute !important;
    z-index: 999999 !important;
}

.LAYERDEV-halfmap-secure-wrapper .dropdown-menu .inner {
    max-height: 300px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

.LAYERDEV-halfmap-secure-wrapper .dropdown-menu .bs-searchbox {
    position: sticky !important;
    top: 0 !important;
    z-index: 1 !important;
    background: #fff !important;
    border-bottom: 1px solid #ddd !important;
}

/* ============================================================================
   AUTOCOMPLETE ET SELECT2
   ============================================================================ */

.LAYERDEV-halfmap-secure-wrapper .auto-complete,
.LAYERDEV-halfmap-secure-wrapper #auto_complete_ajax,
.LAYERDEV-halfmap-secure-wrapper .ui-autocomplete,
.LAYERDEV-halfmap-secure-wrapper .autocomplete-suggestions,
.LAYERDEV-halfmap-secure-wrapper .select2-container,
.LAYERDEV-halfmap-secure-wrapper .select2-dropdown {
    position: absolute !important;
    z-index: 999999 !important;
}

.select2-container--open {
    z-index: 999999 !important;
}

.select2-dropdown {
    z-index: 999999 !important;
}

/* ============================================================================
   Z-INDEX HIÉRARCHIE COMPLÈTE
   ============================================================================ */

/* Map container en dessous du listing */
.LAYERDEV-halfmap-secure-wrapper .half-map-left-wrap {
    z-index: 5 !important;
}

/* Map elle-même */
.LAYERDEV-halfmap-secure-wrapper #houzez-properties-map,
.LAYERDEV-halfmap-secure-wrapper .leaflet-container {
    z-index: 1 !important;
}

/* Contrôles map AU-DESSUS de la map */
.leaflet-control-container,
.leaflet-control-zoom,
.map-arrows-actions,
.map-next-prev-actions,
.map-zoom-actions {
    z-index: 1000 !important;
}

/* Popups map visibles MAIS sous les dropdowns */
.LAYERDEV-halfmap-secure-wrapper .leaflet-popup-pane,
.LAYERDEV-halfmap-secure-wrapper .leaflet-popup {
    z-index: 700 !important;
}

/* Listing au-dessus de la map */
.LAYERDEV-halfmap-secure-wrapper .half-map-right-wrap {
    z-index: 10 !important;
}

/* Recherche et formulaires */
.LAYERDEV-halfmap-secure-wrapper .e-n-tabs-content,
.LAYERDEV-halfmap-secure-wrapper .search-wrap {
    z-index: 9999 !important;
}

/* Dropdowns au-dessus de tout */
.bootstrap-select.show .dropdown-menu,
.dropdown-menu.show {
    z-index: 999999 !important;
}

/* Modals au-dessus de tout */
.modal,
.popover,
.tooltip {
    z-index: 9999999 !important;
}

/* ============================================================================
   DÉSACTIVATION FOOTER
   ============================================================================ */

body.LAYERDEV-half-map-no-footer .elementor-location-footer,
body.LAYERDEV-half-map-no-footer .before-footer-section,
body.LAYERDEV-half-map-no-footer footer,
body.LAYERDEV-half-map-no-footer #footer,
body.LAYERDEV-half-map-no-footer .footer,
body.LAYERDEV-half-map-no-footer [data-elementor-type="footer"],
body.LAYERDEV-half-map-no-footer .site-footer,
body.LAYERDEV-half-map-no-footer #colophon,
body.LAYERDEV-half-map-no-footer .site-info,
body.LAYERDEV-half-map-no-footer .footer-widgets,
body.LAYERDEV-half-map-no-footer .footer-bottom {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* ============================================================================
   SCROLLBAR PERSONNALISÉE
   ============================================================================ */

.LAYERDEV-halfmap-secure-wrapper .half-map-right-wrap::-webkit-scrollbar {
    width: 8px;
}

.LAYERDEV-halfmap-secure-wrapper .half-map-right-wrap::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.LAYERDEV-halfmap-secure-wrapper .half-map-right-wrap::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.LAYERDEV-halfmap-secure-wrapper .half-map-right-wrap::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* ============================================================================
   GRID LAYOUT
   ============================================================================ */

.grid-view.gx-4.gy-4.mx-0.row.row-cols-1.row-cols-md-2 {
    display: grid !important;
	padding : 0 10px;
    grid-template-columns: repeat(2, 1fr) !important;
}

.layerdev-uniform-height {
    width: 100% !important;
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

@media (max-width: 991px) {
	.LAYERDEV-halfmap-secure-wrapper {
    width: 100% !important;
}
	
    .LAYERDEV-halfmap-secure-wrapper .half-map-wrap {
        flex-direction: column !important;
        height: auto !important;
    }
    
    .LAYERDEV-halfmap-secure-wrapper .half-map-right-wrap,
    .LAYERDEV-halfmap-secure-wrapper .half-map-left-wrap {
        width: 100% !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
        position: relative !important;
    }
    
    .LAYERDEV-halfmap-secure-wrapper .half-map-left-wrap {
        height: 500px !important;
        display: none !important;
    }
    
    .grid-view.gx-4.gy-4.mx-0.row.row-cols-1.row-cols-md-2 {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .half-map-right-wrap .grid-view .item-listing-wrap {
        width: 100% !important;
    }
}

@media (max-width: 600px) {
    .grid-view.gx-4.gy-4.mx-0.row.row-cols-1.row-cols-md-2 {
        display: grid !important;
        grid-template-columns: repeat(1, 1fr) !important;
    }
}

/* ============================================================================
   PAGINATION
   ============================================================================ */

a.page-link {
    background: #0e62fc !important;
} 

li.active.page-item,
li.active.page-item > a {
    background: unset !important;
    color: #0e62fc !important;	
}

.map-notfound {
    padding: 10px !important;
}

#houzez-map-message {
	display : none !important;
}
	
.LAYERDEV-fts-safe-wrapper {
    clear: both;
    width: 100%;
    position: relative;
    z-index: 1;
}
	
li.page-item.disabled {
    display: none;
}

	
/* ========================================================================
   HOUZEZ FORM SYNC - STYLES
   ======================================================================== */

/* Animation fade-in pour les messages */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.no-results-message,
.ajax-error-message {
    animation: fadeIn 0.3s ease-in;
}

.ajax-loader-spinner {
    animation: fadeIn 0.2s ease-in;
}

/* Smooth scroll pour le conteneur de résultats */
#half-map-listing-area {
    scroll-behavior: smooth;
}

.text-primary {
    color: #007bff !important;
}

.visually-hidden {
    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;
}	

.advanced-search-nav {
	display : none !important;
}