#property-search-form-container {
    background-color: #F0EADC;
    border-radius: 20px;
    padding: 21px;
}

#property-search-form-container .property-search-form {
    gap: 10px;
    display: flex;
    flex-wrap: wrap;
}

#property-search-wrapper .property-search-field {
    border-radius: 9px;
    padding: 18px;
    background-color: #FFFFFF;
    color: #000000;
    font-size: 14px;
    line-height: 14px;
    border: 0px;
    height: 100%;
}

.property-search-price-wrapper.js-price-rent-wrapper {
    height: 100%;
}

#property-search-wrapper .property-search-field-small {
    width: 120px;
}

@media (max-width: 767px) {
    #property-search-wrapper .property-search-guest-wrapper .property-search-field-small {
        width: 100%
    }
}

#property-search-form-container .property-search-button-primary {
    align-self: flex-start;
    padding: 12px 20px;
    color: #FFFFFF;
    border-radius: 9px;
    font-size: 14px;
    text-align: center;
    background-color: #24148A;
    border-color: #24148A;
    border: 0px;
}


#property-search-form-container .property-search-button-secondary {
    border: 1px solid rgba(255, 255, 255, 0.36);
    border-radius: 9px;
    color: rgb(36, 20, 138);
    background-color: transparent;
}

#property-search-form-container .property-search-button-reset {
    align-self: flex-start;
    padding: 12px 20px;
    border-radius: 9px;
    font-size: 14px;
    text-align: center;
    background-color: #73b9e9;
    color: #ffffff;
    border: 0;
}

/* Masque les multiselects conditionnels (ex: District) */
.property-search-multiselect.is-hidden {
    display: none;
}

/* === GRID EN 3 COLONNES === */
.property-results-inner {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.is-view-map .property-results-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* === CARTE === */
.property-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

.property-card__inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.property-card__badge {
    border-color: #24148A;
    background-color: #24148A;
    color: #FFFFFF;
    border-radius: 5px;
    border: 1px solid transparent;
    padding: 0 0.5em;
    position: absolute;
    z-index: 100;
    font-size: 13px
}

.property-card__badge.property-card__type {
    top: 10px;
    left: 10px;
}

.property-card__badge.property-card__agreement {
    top: 10px;
    right: 10px;
}

/* === SLIDER / IMAGE === */
.property-card__media {
    position: relative;
    overflow: hidden;
}

.property-card__slider {
    width: 100%;
    height: 350px;
    /* hauteur fixe */
}

.property-card__slider .property-card__slide {
    height: 350px;
}

.property-card__slider .property-card__img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    /* recadrage propre */
}

/* Si Slick est utilisé */
.property-card__slider .slick-slide {
    height: 350px;
}

/* === CONTENU TEXTE === */
.property-card__body {
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.property-card__title {
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 30px;
    font-size: 19px;
    text-transform: none;
    margin: 0;
    white-space: nowrap;
}

.property-card__sub {
    display: flex;
    align-items: center;
}

.property-card__location {
    margin-right: 15px;
}

.property-card__location,
.property-card__ref {
    font-size: 14px;
    color: #7B7B7B;
    display: flex;
    align-items: center;
    gap: 6px;
}

.property-card__price {
    color: rgb(28, 16, 105);
    line-height: 36px;
    font-size: 18px;
    font-weight: 600;
    font-family: "Plus Jakarta Sans";
    word-spacing: 2px;
}

.property-card__meta {
    display: flex;
    // gap: 16px;
    margin-top: 10px;
    font-size: 13px;
}

.property-card__meta> :not(:last-child) {
    margin-right: 21px !important;
    border-right-width: 1px !important;
    padding-right: 21px !important;
    border-right-style: solid !important;
    border-color: #D5D5D5 !important;
}

.property-card__meta-item {
    display: flex;
    flex-direction: column;
}

.property-card__meta-label {
    font-size: 12px;
    color: #7B7B7B;
}

.property-card__meta-value {
    font-family: "Plus Jakarta Sans";
    font-weight: 600;
    color: rgb(28, 16, 105);
    line-height: 30px;
    font-size: 19px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.property-card__meta-item--guests .property-card__meta-value>img {
    height: 22px !important;
}

.property-card__media {
    pointer-events: none;
}

.property-card__slider,
.property-card__slider * {
    pointer-events: auto;
}

.property-card__media .slick-arrow {
    position: absolute;
    z-index: 50;
    pointer-events: auto;
    border-radius: 50%;
    padding: 5px;
    width: 25px;
    height: 25px;
}

.property-card__media:hover .slick-arrow {
    background-color: white;
    transition: 0.2s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.property-card__media {
    position: relative;
    pointer-events: auto;
}

.property-card__media * {
    pointer-events: auto;
}

.slick-next {
    right: 10px;
}

.slick-prev {
    left: 10px;
}

.slick-prev img {
    position: absolute;
    top: 0;
    bottom: 0;
    margin: auto auto auto -9px !important;
    height: 15px;
}

.slick-next:before,
.slick-prev:before {
    content: '';
    display: none;
}

@media (max-width: 991px) {
    .property-results-inner {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575px) {
    .property-results-inner {
        grid-template-columns: 1fr !important;
    }
}

.property-search-layout {
    display: block;
}

.property-search-layout.is-view-map {
    display: flex;
    gap: 24px;
}

.property-results {
    flex: 1 1 50%;
    max-height: 75vh;
    overflow-y: auto;
}

.property-search-map {
    z-index: 9;
    flex: 1 1 50%;
    min-height: 400px;
    max-height: 75vh;
}

.property-amenities-toggle {
    align-self: flex-start;
    padding: 12px 10px;
}

.property-search-toggle {
    cursor: pointer;
}

.property-search-toggle.is-active {
    font-weight: 600;
}

.property-search-map-container {
    position: relative;
}

#property-search-wrapper {
    margin-top: 20px;
}

/* Mode carte : 2 colonnes fixes 50/50 */
#property-search-wrapper .property-search-layout.is-view-map {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: stretch;
}

/* Colonne liste */
#property-search-wrapper .property-search-layout.is-view-map .property-results {
    max-height: 75vh;
    overflow-y: auto;
}

/* Colonne carte */
#property-search-wrapper .property-search-layout.is-view-map .property-search-map {
    height: 75vh;
    /* hauteur fixe pour Leaflet */
    min-height: 400px;
}

/* IMPORTANT : Leaflet prend 100% de son conteneur */
#property-search-wrapper .property-search-map .leaflet-container {
    width: 100% !important;
    height: 100% !important;
}

/* Mode liste : on masque la carte, la liste prend toute la largeur */
#property-search-wrapper .property-search-layout.is-view-list .property-search-map-container {
    display: none;
}

#property-search-wrapper .property-search-layout.is-view-list .property-results {
    max-height: none;
    overflow: visible;
}

.property-search-field .js-status-multiselect-label {
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

.property-search-multiselect__option.is-unavailable {
    opacity: .35;
}

.property-search-multiselect__option.is-unavailable input {
    pointer-events: none;
}

.property-search-field .js-type-multiselect-label {
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

.js-area-multiselect .js-area-multiselect-label {
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

.js-area-multiselect .property-search-multiselect__panel {
    display: none;
}

.js-area-multiselect.is-open .property-search-multiselect__panel {
    display: block;
}


/* === WRAPPER DU MULTISELECT CITY === */
.property-search-multiselect {
    position: relative;
    max-width: 300px;
    width: 200px;
}

.property-search-multiselect .js-city-multiselect-label {
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

.js-price-range-multiselect-label {
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

/* Bouton principal (réutilise ton style .property-search-field) */
.property-search-multiselect__toggle {
    width: 100%;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

/* Petite flèche à droite */
.property-search-multiselect__toggle::after {
    content: "▾";
    font-size: 12px;
    margin-left: 8px;
}

/* État verrouillé (city forcée) */
.property-search-multiselect.is-locked .property-search-multiselect__toggle {
    cursor: default;
    opacity: 0.8;
}

/* PANEL DU DROPDOWN */
.property-search-multiselect__panel {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    margin-top: 4px;
    background: #FFFFFF;
    border-radius: 9px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    z-index: 1000;
    max-height: 260px;
    overflow-y: auto;
    padding: 8px 0;
    display: none;
    /* caché par défaut, géré par JS (slideToggle) */
}

/* Si tu veux aussi gérer via la classe .is-open (en plus du slideToggle) */
.property-search-multiselect.is-open .property-search-multiselect__panel {
    display: block;
}

/* Options */
.property-search-multiselect__option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    font-size: 14px;
    cursor: pointer;
}

.property-search-multiselect__option input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
}

.property-search-multiselect__option input[type="radio"] {
    margin: 0;
    cursor: pointer;
}

.property-search-multiselect__option span {
    flex: 1;
}

/* Hover */
.property-search-multiselect__option:hover {
    background-color: #F5F3EC;
}

/* Désactivation des options quand city est forcé */
.property-search-multiselect.is-locked .property-search-multiselect__option {
    cursor: default;
}

.property-search-multiselect.is-locked .property-search-multiselect__option input[type="checkbox"] {
    cursor: not-allowed;
}


/* Avant initialisation de Slick : n'afficher que la première image */
.property-card__slider:not(.slick-initialized) .property-card__slide:not(:first-child) {
    display: none;
}

/* Quand Slick est prêt */
.property-card__slider.slick-initialized {
    visibility: visible;
}

/* Optionnel : limiter l'overflow pendant l'init */
.property-card__slider {
    overflow: hidden;
}

/* ===== TOGGLE LISTE / CARTE ===== */
.property-search-view-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 18px 0 24px;
    flex-wrap: wrap;
}

.property-search-view-toggle-col-1 {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Groupe bouton Liste / Carte */
.property-search-toggle-group {
    display: inline-flex;
    padding: 3px;
    border-radius: 999px;
    background: rgba(36, 20, 138, 0.06);
    border: 1px solid rgba(36, 20, 138, 0.12);
}

/* Boutons dans le groupe */
.property-search-toggle {
    position: relative;
    border: 0;
    background: transparent;
    padding: 8px 18px;
    border-radius: 999px;
    font-size: 13px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    color: #24148A;
    transition:
        background-color 0.18s ease,
        color 0.18s ease,
        box-shadow 0.18s ease,
        transform 0.08s ease;
    white-space: nowrap;
}

.property-search-toggle__icon {
    font-size: 14px;
}

.property-search-toggle__label {
    font-weight: 500;
}

.property-search-toggle.is-active {
    background-color: #24148A;
    color: #FFFFFF;
    box-shadow: 0 6px 14px rgba(36, 20, 138, 0.25);
}

.property-search-toggle:not(.is-active):hover {
    background-color: rgba(36, 20, 138, 0.08);
}

.property-search-toggle:active {
    transform: translateY(1px);
}

/* ===== "RECHERCHER AU DÉPLACEMENT" ===== */
.property-search-autosearch {
    z-index: 10;
    position: absolute;
    top: 16px;
    left: 0;
    right: 0;
    margin: auto;
    width: 150px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: white;
    background: rgba(36, 20, 138, 1);
    border-radius: 999px;
    padding: 6px 12px;
    cursor: pointer;
    border: 1px solid rgba(36, 20, 138, 0.1);
    white-space: nowrap;
}

html[lang^="fr"] .property-search-autosearch {
    width: 200px;
}

html[lang^="fr"] #property-search-wrapper .property-search-form input[name="area_min"].property-search-field-small,
html[lang^="fr"] #property-search-wrapper .property-search-form input[name="area_max"].property-search-field-small {
    width: 129px;
}

html[lang^="fr"] #property-search-wrapper .property-search-form .js-status-multiselect {
    width: 200px;
}

.property-search-autosearch input[type="checkbox"] {
    width: 14px;
    height: 14px;
    margin: 0;
}

/* Mobile : centre les éléments */
@media (max-width: 767px) {
    .property-search-view-toggle {
        flex-direction: column;
        align-items: stretch;
    }

    .property-search-toggle-group {
        align-self: stretch;
        justify-content: center;
    }

    .property-search-autosearch {
        align-self: center;
    }
}

.property-pagination {
    text-align: center;
}

.leaflet-popup-content {
    margin: 0;
}

.property-map-popup .leaflet-popup-content {
    padding: 0;
}

.property-card--map {
    max-width: 340px;
}

.property-card--map .property-card__slider .slick-slide {
    height: 200px !important;
}

.leaflet-popup-close-button {
    color: #1c1069 !important;
    margin: 6px !important;
}


.property-map-preview {
    display: none;
    position: absolute;
    left: 16px;
    bottom: 16px;
    right: 16px;
    max-height: 45%;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 500;
}

@media (max-width: 1024px) {
    .property-map-preview.is-visible {
        display: block;
    }
}

.property-map-preview.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.property-map-preview__close {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 10;
    border: none;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    font-size: 16px;
    cursor: pointer;
    line-height: 24px;
    text-align: center;
}

.property-map-preview__inner {
    max-height: 100%;
    overflow-y: auto;
}

/* on réutilise le design des cards existantes */
.property-map-preview .property-card {
    margin: 0;
    border-radius: 12px;
}

.leaflet-popup-content .property-card__media {
    height: 200px;
}

.leaflet-popup-content .property-card__meta> :not(:last-child) {
    margin-right: 10px !important;
    padding-right: 10px !important;
}

/* Mobile : filtres en 2 colonnes */
@media (max-width: 575px) {
    #property-search-form-container .property-search-form>* {
        width: 48% !important;
    }

    .property-search-multiselect {
        width: 100% !important;
    }

    #property-search-form-container .property-search-form .property-amenities.js-property-amenities {
        width: 100% !important;
    }

    #property-search-form-container .property-search-form .property-amenities.js-property-amenities .property-amenities-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;

    }

    /* Le bouton principal sur toute la largeur */
    #property-search-form-container .property-search-form .property-search-button-primary {
        flex: 0 0 100%;
    }

    /* Multiselect en pleine largeur de sa colonne */
    #property-search-form-container .property-search-form .property-search-multiselect {
        max-width: 100%;
        width: 100%;
    }

    #property-search-wrapper .property-search-field-small {
        width: 100% !important;
    }

    .property-search-price-wrapper .property-search-field:first-of-type {
        margin-bottom: 8px;
    }
}

/* Mobile : en mode carte -> carte en 1er, liste dessous */
@media (max-width: 767px) {
    #property-search-wrapper .property-search-layout.is-view-map {
        grid-template-columns: 1fr;
        /* au lieu de 1fr 1fr */
        grid-template-rows: auto auto;
    }

    /* Carte en 1er */
    #property-search-wrapper .property-search-layout.is-view-map .property-search-map-container {
        grid-column: 1;
        grid-row: 1;
    }

    /* Liste en 2e */
    #property-search-wrapper .property-search-layout.is-view-map .property-results {
        grid-column: 1;
        grid-row: 2;
        max-height: none;
        /* enlève le scroll interne */
        overflow: visible;
    }

    /* Hauteur de carte adaptée mobile (ajuste si besoin) */
    #property-search-wrapper .property-search-layout.is-view-map .property-search-map {
        height: 55vh;
        max-height: none;
        min-height: 320px;
    }
}

/* Mobile : carte 80% viewport + fiche fixe en bas */
@media (max-width: 767px) {

    #property-search-wrapper .property-search-layout.is-view-map .property-search-map {
        height: 80vh;
        /* ✅ 80% hauteur d’affichage */
        min-height: 360px;
        /* garde une base correcte */
    }

    #property-search-wrapper .property-search-map-container {
        position: relative;
        /* tu l'as déjà, mais on sécurise */
    }

    #property-search-wrapper .property-map-preview {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        bottom: 12px;
        width: 90%;
        max-height: inherit;
        max-width: 520px;
        z-index: 500;
        display: none;
        /* caché par défaut */
        border-radius: 14px;
        overflow: hidden;
        box-shadow: 0 18px 45px rgba(0, 0, 0, .25);
        background: #fff;
    }

    #property-search-wrapper .property-map-preview.is-visible {
        display: block;
    }

    #property-search-wrapper .property-map-preview__inner {
        max-height: 50vh;
        overflow: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* important : laisse de la place dans la carte pour ne pas être recouverte */
    #property-search-wrapper .property-search-map {
        padding-bottom: 240px;
        /* ajuste selon hauteur moyenne de ta preview */
        box-sizing: border-box;
    }

    /* limite la hauteur visible du slider dans la preview */
    #property-search-wrapper .property-map-preview .js-property-card-slider,
    #property-search-wrapper .property-map-preview .property-card__slider {
        max-height: 160px;
        /* ajuste : 140 / 160 / 180 */
        overflow: hidden;
    }

    /* si tu utilises des background-image plutôt que img (au cas où) */
    #property-search-wrapper .property-map-preview .property-card__slide {
        height: 160px;
    }
}
