/* ======= Page Terrains (lands.html) ======= */

/* ------------------------------------------------------------------ */
/* Galerie masonry hero — fiche terrain (LandPhotoMasonry)             */
/* ------------------------------------------------------------------ */

/* lpm-wrapper : ancre pour le bouton absolu, sans être dans la grille */
.lpm-wrapper {
    position: relative;
    width: 100%;
    margin-top: 0;
}

/* Skeleton state */
.lpm-wrapper--skeleton {
    height: clamp(300px, 42vw, 520px);
    background: linear-gradient(90deg, #e8e3dc 25%, #d8d0c6 50%, #e8e3dc 75%);
    background-size: 200% 100%;
    animation: lpm-shimmer 1.4s infinite;
}
@keyframes lpm-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* lpm-lightbox-host : legacy — remplacé par LandPhotoLightbox (portal) */
.lpm-lightbox-host {
    display: none;
}

/* ---- Lightbox plein écran (LandPhotoLightbox) ---- */
body.lpm-lightbox-open {
    overflow: hidden;
}

.lpm-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000003;
    display: flex;
    align-items: stretch;
    justify-content: center;
}

.lpm-lightbox__backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    padding: 0;
    margin: 0;
    background: #eceae6;
    cursor: pointer;
}

.lpm-lightbox__inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.lpm-lightbox__close {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 3;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: rgba(20, 20, 20, 0.55);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    pointer-events: auto;
    transition: background 0.2s ease;
}
.lpm-lightbox__close:hover {
    background: rgba(20, 20, 20, 0.78);
}

.lpm-lightbox__stage {
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 56px clamp(56px, 8vw, 120px) 12px;
}

.lpm-lightbox__figure {
    position: relative;
    flex: 1;
    min-width: 0;
    height: 100%;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lpm-lightbox__img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.12);
    pointer-events: auto;
}

.lpm-lightbox__counter {
    position: absolute;
    right: 12px;
    bottom: 12px;
    margin: 0;
    padding: 6px 12px;
    border-radius: 6px;
    background: rgba(20, 20, 20, 0.72);
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.04em;
    pointer-events: none;
}

.lpm-lightbox__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 48px;
    height: 48px;
    border: 0;
    background: transparent;
    color: rgba(80, 80, 80, 0.75);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    pointer-events: auto;
    transition: color 0.2s ease, transform 0.2s ease;
}
.lpm-lightbox__nav:hover {
    color: rgba(30, 30, 30, 0.95);
}
.lpm-lightbox__nav--prev { left: clamp(8px, 2vw, 24px); }
.lpm-lightbox__nav--next { right: clamp(8px, 2vw, 24px); }

.lpm-lightbox__thumbs-wrap {
    flex-shrink: 0;
    position: relative;
    background: #eceae6;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    padding: 28px 16px 16px;
    pointer-events: auto;
    transition: padding 0.25s ease, max-height 0.25s ease;
}
.lpm-lightbox__thumbs-wrap.is-collapsed {
    padding-top: 28px;
    padding-bottom: 8px;
}
.lpm-lightbox__thumbs-wrap.is-collapsed .lpm-lightbox__thumbs {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    padding: 0;
}

.lpm-lightbox__thumbs-toggle {
    position: absolute;
    top: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 24px;
    border: 0;
    background: transparent;
    color: rgba(60, 60, 60, 0.7);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: color 0.2s ease;
}
.lpm-lightbox__thumbs-toggle:hover {
    color: rgba(30, 30, 30, 0.95);
}

.lpm-lightbox__thumbs {
    display: flex;
    gap: 8px;
    justify-content: center;
    width: fit-content;
    max-width: 100%;
    margin: 0 auto;
    overflow-x: auto;
    overflow-y: hidden;
    max-height: 88px;
    padding: 4px 0;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}
.lpm-lightbox__thumbs::-webkit-scrollbar {
    height: 6px;
}
.lpm-lightbox__thumbs::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.18);
    border-radius: 999px;
}

.lpm-lightbox__thumb {
    flex: 0 0 auto;
    width: 72px;
    height: 54px;
    padding: 0;
    border: 3px solid transparent;
    border-radius: 4px;
    background: #111;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.72;
    transition: opacity 0.2s ease, border-color 0.2s ease;
}
.lpm-lightbox__thumb:hover {
    opacity: 0.92;
}
.lpm-lightbox__thumb.is-active {
    border-color: #2d8a4e;
    opacity: 1;
}
.lpm-lightbox__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media screen and (max-width: 767px) {
    .lpm-lightbox__stage {
        padding: 48px 40px 8px;
    }
    .lpm-lightbox__nav {
        width: 40px;
        height: 40px;
    }
    .lpm-lightbox__nav--prev { left: 4px; }
    .lpm-lightbox__nav--next { right: 4px; }
    .lpm-lightbox__thumb {
        width: 60px;
        height: 45px;
    }
    .lpm-lightbox__close {
        top: 12px;
        right: 12px;
        width: 40px;
        height: 40px;
    }
}

/* lpm-grid : CSS grid pure — SEULS les .lpm-cell en enfants directs */
.lpm-grid {
    width: 100%;
    height: clamp(300px, 42vw, 520px);
    display: grid;
    gap: 4px;
    overflow: hidden;
    background: #ffffff;
}

/* ---- Cellule image ---- */
.lpm-cell {
    padding: 0;
    border: none;
    background: #111;
    overflow: hidden;
    cursor: pointer;
    display: block;
}
.lpm-cell img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease, filter 0.35s ease;
}
.lpm-cell:hover img {
    transform: scale(1.04);
    filter: brightness(0.88);
}

/* ---- Layout 1 photo : pleine largeur ---- */
.lpm-grid--count-1 {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
}

/* ---- Layout 2 photos : deux colonnes égales ---- */
.lpm-grid--count-2 {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr;
}

/* ---- Layout 3 photos : grande gauche + 2 empilées droite ---- */
.lpm-grid--count-3 {
    grid-template-columns: 60% 1fr;
    grid-template-rows: 1fr 1fr;
}
.lpm-grid--count-3 .lpm-cell:first-child {
    grid-row: 1 / 3;
}

/* ---- Layout 4 photos : grande gauche + 3 droite ---- */
/*
  Col 1 : grande (50 %, 2 lignes)
  Col 2-3 : 3 cellules — 2 en ligne 1, 1 en ligne 2 pleine largeur droite
*/
.lpm-grid--count-4 {
    grid-template-columns: 50% 1fr 1fr;
    grid-template-rows: 1fr 1fr;
}
.lpm-grid--count-4 .lpm-cell:nth-child(1) {
    grid-row: 1 / 3;   /* grande à gauche */
}
.lpm-grid--count-4 .lpm-cell:nth-child(4) {
    grid-column: 2 / 4; /* 4e image pleine largeur droite, ligne 2 */
}

/* ---- Layout 5 photos : Land.com style ---- */
/* Grande à gauche (50 % × 2 lignes), 2×2 à droite */
.lpm-grid--count-5 {
    grid-template-columns: 50% 1fr 1fr;
    grid-template-rows: 1fr 1fr;
}
.lpm-grid--count-5 .lpm-cell:nth-child(1) {
    grid-row: 1 / 3;
}

/* ---- Bouton compteur bas-droite (ancré sur lpm-wrapper) ---- */
.lpm-count-btn {
    position: absolute;
    bottom: 16px;
    right: 16px;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    border: none;
    border-radius: 6px;
    background: rgba(10, 10, 10, 0.82);
    color: #fff;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.04em;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: background 0.2s;
}
.lpm-count-btn:hover {
    background: rgba(10, 10, 10, 0.97);
}
.lpm-count-btn svg {
    flex-shrink: 0;
    opacity: 0.9;
}

/* ---- Mobile ---- */
@media screen and (max-width: 767px) {
    .lpm-wrapper {
        margin-top: 0;
    }
    .lpm-grid {
        height: clamp(220px, 56vw, 380px);
        gap: 3px;
    }
    /* Sur mobile : 2 colonnes max (1re image pleine largeur) */
    .lpm-grid--count-3,
    .lpm-grid--count-4,
    .lpm-grid--count-5 {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 1fr 1fr;
    }
    .lpm-grid--count-3 .lpm-cell:nth-child(1),
    .lpm-grid--count-4 .lpm-cell:nth-child(1),
    .lpm-grid--count-5 .lpm-cell:nth-child(1) {
        grid-row: auto;
        grid-column: 1 / 3;
    }
    .lpm-grid--count-4 .lpm-cell:nth-child(4) {
        grid-column: auto;
    }
    /* Masquer les photos 4 et 5 sur mobile */
    .lpm-grid--count-4 .lpm-cell:nth-child(n+4),
    .lpm-grid--count-5 .lpm-cell:nth-child(n+4) {
        display: none;
    }
    .lpm-count-btn {
        bottom: 10px;
        right: 10px;
        font-size: 12px;
        padding: 6px 11px;
    }
}

/* Fiche terrain : graisses plus douces (strong, petits titres) */
.page-land-detail .rooms-page strong {
    font-weight: 500;
}
.page-land-detail .rooms-page h6 {
    font-weight: 400;
}
/* Fiche terrain (land.html) : texte sur le slider plein écran */
.land-detail-hero {
    position: relative;
}
/* AOS (fade-up) : éviter que overflow du header coupe l’animation */
.page-land-detail .land-detail-hero.header {
    overflow: visible;
}
.land-detail-hero .land-detail-banner-overlay {
    pointer-events: none;
    z-index: 7;
    text-align: center;
}
.land-detail-hero .land-detail-banner-overlay .container {
    pointer-events: auto;
}
.land-detail-hero .land-detail-banner-title {
    text-transform: none;
    letter-spacing: 0.03em;
    font-size: clamp(1.35rem, 3.8vw, 2.15rem);
    line-height: 1.3;
    font-weight: 400;
    margin-bottom: 1rem;
    color: #fff;
}
.page-land-detail .land-detail-hero .land-detail-banner-title {
    font-weight: 300;
}
.land-detail-hero .land-detail-banner-lead {
    font-size: clamp(15px, 1.85vw, 17px);
    line-height: 1.7;
    max-width: 38rem;
    margin: 0 auto;
    color: rgba(255, 255, 255, 0.94);
}

.banner-header.banner-header--tall {
    height: 86vh;
    min-height: 420px;
}

/* Boutons sous le texte d’intro (bannière terrains) */
.banner-header--tall .lands-banner-ctas {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: clamp(12px, 2.5vw, 20px);
    margin-top: clamp(22px, 4vw, 34px);
}

.banner-header.banner-header--tall .banner-slogan {
    max-width: 46rem;
    margin-top: 14px;
    font-size: 15px;
    font-weight: 300;
    line-height: 1.65;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.92);
}
@media screen and (max-width: 767px) {
    .banner-header.banner-header--tall .banner-slogan {
        font-size: 14px;
        max-width: none;
    }
}

/* Formulaire de recherche qui remonte sous la bannière */
.lands-booking-overlap {
    position: relative;
    z-index: 2;
    margin-top: clamp(-2.5rem, -6vw, -4.5rem);
    margin-bottom: 0;
}
/* Pas d’icône calendrier sur le champ zone (texte) */
.lands-booking-overlap .input1_inner--no-icon:after,
.booking-box .input1_inner--no-icon:after {
    display: none;
}

.lands-booking-overlap .booking-inner {
    background-color: #f8f5f0;
    border: 1px solid rgba(170, 132, 83, 0.28);
    border-radius: 6px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.14);
    padding: 12px 8px;
}

/* Annule les margin-bottom globales (.form1 .c*, .select2, .booking-box …) */
.lands-booking-overlap .form1 .c1,
.lands-booking-overlap .form1 .c2,
.lands-booking-overlap .form1 .c3,
.lands-booking-overlap .form1 .c4,
.lands-booking-overlap .form1 .c5 {
    margin-bottom: 0;
}
.lands-booking-overlap .form1 .input1_wrapper,
.lands-booking-overlap .form1 .select1_wrapper {
    margin-bottom: 0;
}
.lands-booking-overlap .form1 .select2,
.lands-booking-overlap .form1 select.select2,
.lands-booking-overlap .select2-container {
    margin-bottom: 0;
}
.lands-booking-overlap .form1 .input1_inner input.form-control {
    margin-bottom: 0;
    font-weight: 400;
}

/* Colonnes étroites (14 %) : le texte des Select2 ne doit pas passer sur 2 lignes (sinon dépasse les 62px) */
.lands-booking-overlap .form1 .c1,
.lands-booking-overlap .form1 .c2,
.lands-booking-overlap .form1 .c3,
.lands-booking-overlap .form1 .c4,
.lands-booking-overlap .form1 .c5 {
    overflow: hidden;
}
.lands-booking-overlap .select2-container--default .select2-selection--single {
    height: 62px;
    display: flex;
    align-items: center;
}
.lands-booking-overlap .select2-container--default .select2-selection--single .select2-selection__rendered {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.25;
    padding-top: 0;
    padding-bottom: 0;
    font-weight: 400;
}

.lands-booking-overlap .select2-dropdown .select2-results__option,
.lands-booking-overlap .select2-container--default .select2-results__option[aria-selected="true"],
.lands-booking-overlap .select2-container--default .select2-results__option--highlighted[aria-selected] {
    font-weight: 400;
}

.booking-box .form1 .input1_wrapper,
.booking-box .form1 .select1_wrapper {
    margin-bottom: 0;
}
.booking-box .form1 .select2,
.booking-box .form1 select.select2,
.booking-box .select2-container {
    margin-bottom: 0;
}
.booking-box .form1 .input1_inner input.form-control {
    margin-bottom: 0;
    font-weight: 400;
}

.booking-box .select2-container--default .select2-selection--single .select2-selection__rendered {
    font-weight: 400;
}
.booking-box .select2-dropdown .select2-results__option,
.booking-box .select2-container--default .select2-results__option[aria-selected="true"],
.booking-box .select2-container--default .select2-results__option--highlighted[aria-selected] {
    font-weight: 400;
}

@media screen and (max-width: 767px) {
    .lands-booking-overlap {
        margin-top: -1.75rem;
    }
    .lands-booking-overlap .booking-inner {
        padding: 10px 6px;
    }
}

/* Liste terrains : carte blanche superposée sur l’image (rooms2 classique) */
#terrains-annonces .rooms2.rooms2--compact {
    position: relative;
    margin-bottom: 56px !important;
}

#terrains-annonces .rooms2.rooms2--compact figure {
    margin: 0;
    position: relative;
    width: 66.666667%;
    margin-left: auto;
    aspect-ratio: 16 / 10;
    max-height: 360px;
    z-index: 0;
}

#terrains-annonces .rooms2.rooms2--compact.left figure {
    margin-left: 0;
    margin-right: auto;
}

.section-padding .rooms2.rooms2--compact .caption .lands-card-description {
    white-space: normal;
    line-height: 1.5;
    min-height: 0;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Listings type rooms2 : cadre uniquement sur le bloc texte */
.section-padding .rooms2 .caption {
    border: 1px solid rgba(170, 132, 83, 0.28);
    border-radius: 6px;
    box-sizing: border-box;
    box-shadow: 0 10px 36px rgba(0, 0, 0, 0.06);
}
.section-padding .rooms2 .caption .info-wrapper {
    justify-content: flex-end;
}

.section-padding .rooms2.rooms2--compact .caption {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
    position: absolute;
    left: 0;
    top: 50%;
    width: 52%;
    max-width: 560px;
    transform: translateY(-50%);
    height: auto;
    min-height: 0;
    padding: 24px 26px;
    display: flex;
    flex-direction: column;
    background: #fff;
    z-index: 2;
}

#terrains-annonces .rooms2.rooms2--compact.left .caption {
    left: auto;
    right: 0;
}

.section-padding .rooms2.rooms2--compact .caption > div {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.section-padding .rooms2.rooms2--compact .caption h4,
.section-padding .rooms2.rooms2--compact .caption h4 a {
    font-size: 26px;
    line-height: 1.15;
    margin-bottom: 4px;
}

.section-padding .rooms2.rooms2--compact .caption .text-muted.small {
    margin-bottom: 2px !important;
}

.section-padding .rooms2.rooms2--compact .caption hr.border-2 {
    margin: 12px 0 10px;
}

.section-padding .rooms2.rooms2--compact .caption .info-wrapper {
    margin-top: auto;
    padding-top: 8px;
}

.section-padding .rooms2.rooms2--compact .lands-facilities-wrap {
    margin-bottom: 0.5rem;
}

/* AOS sur .caption : garder la photo derrière + bloc texte toujours opaque (pas de fondu AOS sur le fade) */
/* Ratio 16:10 = 1920×1200 : toutes les figures des annonces terrains */
.section-padding .rooms2 figure {
    z-index: 0;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.section-padding .rooms2.rooms2--compact figure,
.section-padding .rooms2.rooms2--compact.left figure {
    overflow: hidden;
}

#terrains-annonces .rooms2.rooms2--compact .lands-listing-media,
#terrains-annonces .rooms2.rooms2--compact .lands-listing-media__track,
#terrains-annonces .rooms2.rooms2--compact .lands-listing-media__panel {
    height: 100%;
}

/* Images directes dans figure (Ivato, Andravoahangy, lotissement…) : recadrage centré */
.section-padding .rooms2 figure > img.img-fluid {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}
.section-padding .rooms2 .caption[data-aos] {
    z-index: 2;
    opacity: 1;
}
.section-padding .rooms2[data-aos] {
    overflow: visible;
}

/* 6 critères : 3 à gauche, 3 à droite (deux listes) */
.section-padding .rooms2 .lands-facilities-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: clamp(16px, 4vw, 32px);
    row-gap: 0;
}
.section-padding .rooms2 .lands-facilities-wrap .lands-facilities-col {
    list-style: none;
    margin: 0;
    padding: 0;
}
.section-padding .rooms2 .lands-facilities-wrap .lands-facilities-col li {
    color: #666;
    font-size: 15px;
    padding-bottom: 6px;
    margin: 0;
}

.section-padding .rooms2.rooms2--compact .lands-facilities-wrap .lands-facilities-col li {
    font-size: 13px;
    padding-bottom: 3px;
    line-height: 1.35;
}

.section-padding .rooms2.rooms2--compact .lands-facilities-wrap .lands-facilities-col li i {
    font-size: 16px;
    margin-right: 8px;
}
.section-padding .rooms2 .lands-facilities-wrap .lands-facilities-col li i {
    margin-right: 10px;
    color: #aa8453;
    font-size: 20px;
}
.section-padding .rooms2 .lands-facilities-wrap .lands-facilities-col--tags,
.section-padding .rooms2 .lands-facilities-wrap .lands-facilities-col--tags li {
    list-style: none;
    padding-left: 0;
}
.section-padding .rooms2 .lands-facilities-wrap .lands-facilities-col--tags li i {
    margin-right: 6px;
    color: #aa8453;
    font-size: 13px;
}
@media (max-width: 575.98px) {
    .section-padding .rooms2 .lands-facilities-wrap {
        grid-template-columns: 1fr;
    }
}

/* Carte sous Caractéristiques (colonne latérale land.html) */
.rooms-page .land-sidebar-map {
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid rgba(170, 132, 83, 0.28);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
    margin-bottom: 0;
}
.rooms-page .land-sidebar-map iframe {
    display: block;
    width: 100%;
    vertical-align: top;
}
.rooms-page .land-map-heading {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

/* Fiche terrain (land.html) : mêmes critères que lands, une seule colonne */
.rooms-page .lands-facilities-wrap--stack {
    display: block;
}
.rooms-page .lands-facilities-wrap--stack .lands-facilities-col {
    list-style: none;
    margin: 0;
    padding: 0;
}
.rooms-page .lands-facilities-wrap--stack .lands-facilities-col li {
    color: #666;
    font-size: 15px;
    padding-bottom: 6px;
    margin: 0;
}
.rooms-page .lands-facilities-wrap--stack .lands-facilities-col li i {
    margin-right: 10px;
    color: #aa8453;
    font-size: 20px;
}
.rooms-page .lands-tag-item {
    list-style: none;
}
.rooms-page .lands-tag-item i {
    margin-right: 8px;
    color: #aa8453;
    font-size: 14px;
}
@media (max-width: 991.98px) {
    #terrains-annonces .rooms2.rooms2--compact {
        min-height: 0;
        margin-bottom: 36px !important;
    }

    #terrains-annonces .rooms2.rooms2--compact figure,
    #terrains-annonces .rooms2.rooms2--compact.left figure {
        width: auto;
        margin: 0;
    }

    .section-padding .rooms2.rooms2--compact .caption,
    #terrains-annonces .rooms2.rooms2--compact.left .caption {
        position: relative;
        left: 0;
        right: auto;
        top: 0;
        width: auto;
        max-width: none;
        margin-top: 16px;
        transform: none;
    }

    #terrains-annonces .rooms2.rooms2--compact figure {
        width: auto;
        max-height: none;
        margin: 0;
    }
}

/* Bouton « Voir la localisation » : même principe que .butn-light (bannière), lisible sur fond clair */
.section-padding .rooms2 .caption .butn-light {
    display: inline-block;
    line-height: 1.2em;
}
.section-padding .rooms2 .caption .butn-light button {
    font-weight: 400;
    font-family: 'Barlow Condensed', sans-serif;
    text-transform: uppercase;
    background: transparent;
    color: #222;
    padding: 12px 20px;
    margin: 0;
    position: relative;
    font-size: 15px;
    letter-spacing: 3px;
    border: 1px solid rgba(34, 34, 34, 0.35);
    cursor: pointer;
    overflow: hidden;
    -webkit-appearance: none;
    appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.section-padding .rooms2 .caption .butn-light button:after {
    content: '';
    width: 0;
    height: 100%;
    position: absolute;
    bottom: 0;
    left: 100%;
    z-index: 1;
    -webkit-transition: all 0.3s ease;
    transition: all 0.3s ease;
    background: #ab8a62;
}
.section-padding .rooms2 .caption .butn-light button i {
    position: relative;
    z-index: 2;
    font-size: 17px;
    color: #ab8a62;
    line-height: 1;
}
.section-padding .rooms2 .caption .butn-light button span {
    position: relative;
    z-index: 2;
}
.section-padding .rooms2 .caption .butn-light button:hover:after {
    width: 100%;
    left: 0;
    -webkit-transition: width 0.3s ease;
    transition: width 0.3s ease;
}
.section-padding .rooms2 .caption .butn-light button:hover span,
.section-padding .rooms2 .caption .butn-light button:hover i {
    color: #fff;
}

/* ======= Slide photo / carte (annonce Ambatobe) ======= */
/* Le ratio est désormais porté par le figure parent ; on laisse le composant remplir ce cadre */
.lands-listing-media {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 100%;
    min-height: 0;
}

/* Rail : les deux panneaux côte à côte, largeur totale = 2× le conteneur */
.lands-listing-media__track {
    display: flex;
    width: 200%;
    height: 100%;
    transform: translateX(0);
    transition: transform 0.55s cubic-bezier(0.77, 0, 0.175, 1);
}

/* Chaque panneau occupe 50 % du track = 100 % du conteneur visible */
.lands-listing-media__panel {
    flex: 0 0 50%;
    width: 50%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.lands-listing-media__photo,
.lands-listing-media__panel > img.img-fluid {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.lands-listing-media__panel--map iframe,
.lands-listing-media__panel--map .lands-listing-plan-preview {
    width: 100%;
    height: 100%;
    display: block;
    border: 0;
}

.lands-listing-plan-preview {
    background: #f3f0ea;
    overflow: hidden;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    box-sizing: border-box;
}

.lands-listing-plan-preview__host {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lands-listing-plan-preview__host.parcel-plan__svg-host svg {
    width: 100%;
    height: auto;
    max-height: 100%;
    display: block;
}

.lands-listing-plan-preview__host svg .interactive-lot {
    pointer-events: none;
    cursor: default;
}

.lands-listing-media__toggles {
    position: absolute;
    top: 50%;
    z-index: 4;
    display: inline-flex;
    flex-direction: column;
    gap: 4px;
    padding: 4px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.16);
    transform: translateY(-50%);
    opacity: 1;
    pointer-events: auto;
}

/* Image à droite (carte à gauche) : contrôles sur le bord droit */
#terrains-annonces .rooms2.rooms2--compact:not(.left) .lands-listing-media__toggles {
    right: 10px;
    left: auto;
}

/* Image à gauche (carte à droite) : contrôles sur le bord gauche */
#terrains-annonces .rooms2.rooms2--compact.left .lands-listing-media__toggles {
    left: 10px;
    right: auto;
}

.lands-listing-media__toggle {
    border: 0;
    background: transparent;
    color: #444;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    padding: 7px 10px;
    cursor: pointer;
    border-radius: 2px;
    transition: background 0.2s ease, color 0.2s ease;
    white-space: nowrap;
}

.lands-listing-media__toggle.is-active {
    background: #aa8453;
    color: #fff;
}

.lands-listing-media__status {
    display: none;
}

/* État actif → glisser le track d'un panneau vers la gauche */
.lands-listing-media.is-map-active .lands-listing-media__track {
    transform: translateX(-50%);
}

/* Accessibilité : désactiver l'animation pour les utilisateurs sensibles */
@media (prefers-reduced-motion: reduce) {
    .lands-listing-media__track {
        transition: none;
    }
}

/* Popup reservation visite */
body.lands-popup-open {
    overflow: hidden;
}
.lands-visit-popup {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.lands-visit-popup.is-opening {
    animation: landsPopupFadeIn 0.42s ease both;
}
.lands-visit-popup.is-hidden {
    display: none;
}
.lands-visit-popup__panel {
    position: relative;
    width: min(860px, 100%);
    background: #fff;
    border-radius: 26px;
    overflow: hidden;
    display: grid;
    grid-template-columns: 40% 60%;
}
.lands-visit-popup.is-opening .lands-visit-popup__panel {
    animation: landsPopupPanelIn 0.48s cubic-bezier(0.22, 0.8, 0.24, 1) both;
}
.lands-visit-popup__close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #111;
    font-size: 2rem;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
}
.lands-visit-popup__media {
    position: relative;
    min-height: 380px;
}
.lands-visit-popup__media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, rgba(42, 36, 25, 0.84) 0%, rgba(42, 36, 25, 0.62) 62%, rgba(170, 132, 83, 0.34) 100%);
    pointer-events: none;
}
.lands-visit-popup__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.lands-visit-popup__media-copy {
    position: absolute;
    left: 1.2rem;
    right: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
    color: #fff;
}
.lands-visit-popup__media-kicker {
    margin: 0 0 0.35rem;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 12px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.9);
}
.lands-visit-popup__media-text {
    margin: 0;
    font-family: 'Gilda Display', serif;
    font-size: 1.04rem;
    line-height: 1.38;
    color: #fff;
}
.lands-visit-popup__form-wrap {
    padding: 2.15rem 2rem 1.8rem;
}
.lands-visit-popup__title {
    margin: 0 0 1.2rem;
    text-align: center;
    font-family: 'Gilda Display', serif;
    font-size: 1.55rem;
    color: #1a1a1a;
}
.lands-visit-popup__form .register-field {
    margin-bottom: 0.9rem;
}
.lands-visit-popup__form .register-grid {
    gap: 0.9rem;
}
.lands-visit-popup__form .register-grid .register-field {
    margin-bottom: 0;
}
.lands-visit-popup__form .register-field label {
    margin-bottom: 0.3rem;
}
.lands-visit-popup__intro {
    margin: -0.45rem 0 1.1rem;
    text-align: center;
    font-family: 'Barlow', sans-serif;
    font-size: 0.92rem;
    line-height: 1.5;
    color: #666;
}
.lands-visit-popup__error {
    margin: 0 0 0.9rem;
    padding: 0.65rem 0.85rem;
    border-radius: 8px;
    background: #fdecea;
    color: #b42318;
    font-family: 'Barlow', sans-serif;
    font-size: 0.88rem;
    line-height: 1.45;
}
.lands-visit-popup__form .register-field input[type='text'],
.lands-visit-popup__form .register-field input[type='email'],
.lands-visit-popup__form .register-field input[type='tel'] {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #e0dcd4;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-family: 'Barlow', sans-serif;
    font-size: 16px;
    color: #222;
    background: #fafafa;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.lands-visit-popup__form .register-field input[type='text']:focus,
.lands-visit-popup__form .register-field input[type='email']:focus,
.lands-visit-popup__form .register-field input[type='tel']:focus {
    outline: none;
    border-color: #aa8453;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(170, 132, 83, 0.12);
}
.lands-visit-popup__form .register-butn-dark {
    width: 100%;
    margin-top: 0.4rem;
}
.lands-visit-popup__form .register-butn-dark button {
    width: 100%;
    display: block;
    box-sizing: border-box;
    text-align: center;
}
.lands-visit-popup__submit {
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    margin-top: 0.6rem !important;
}
@media (max-width: 767px) {
    .lands-visit-popup__panel {
        grid-template-columns: 1fr;
        border-radius: 18px;
    }
    .lands-visit-popup__media {
        min-height: 160px;
        border-right: 0;
        border-bottom: 2px solid #1d1d1d;
    }
    .lands-visit-popup__form-wrap {
        padding: 1.2rem 1rem 1rem;
    }
    .lands-visit-popup__title {
        font-size: 1.45rem;
    }
}

@keyframes landsPopupFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes landsPopupPanelIn {
    from {
        opacity: 0;
        transform: translateY(64px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
