/* Fond derriere le header transparent : cette page n'a pas de photo de fond
   comme l'accueil, donc sans ce bandeau colore, le menu (texte blanc tant
   qu'on n'a pas scrolle) serait invisible sur la page blanche. La hauteur
   couvre la zone du header (85px) + le logo qui deborde legerement. */
.header-backdrop {
    /* height: 100px; */
    background-color: var(--color-turquoise);
}

/* Aligne la galerie photo sur le meme padding gauche/droite que les autres sections */
.flat-gallery-single {
    /* padding: 24px 0px 24px 40px; */
    margin-top: 20px;
}

.flat-gallery-single .container {
    display: grid;
    grid-template-areas: "item1 item1 item2 item3" "item1 item1 item4 item5";
    gap: 20px;
}

@media (max-width: 991px) {
    .flat-gallery-single .container {
        grid-template-areas: "item1 item1" "item1 item1" "item2 item3" "item4 item5";
        gap: 15px;
    }
}

/* ===== Fiche bien - en-tete (inspire de la page d'accueil) ===== */
.property-hero {
    padding: 60px 0 0;
}

.property-hero-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

.property-hero-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    flex-wrap: wrap;
}

.property-hero-badges {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

.property-hero-badges span {
    display: inline-block;
    background-color: #8b3033;
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    padding: 5px 14px;
    border-radius: 20px;
}

.property-hero-badges span.badge-outline {
    background-color: #e2f2f0;
    color: #2f8f88;
}

.property-hero-title {
    font-size: 30px;
    font-weight: 700;
    color: #161e2d;
    margin-bottom: 8px;
}

.property-hero-location {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #6b7280;
    font-size: 15px;
    margin: 0;
}

.property-hero-location .icon {
    color: #8b3033;
}

.property-hero-price {
    text-align: right;
}

.property-hero-price .amount {
    font-size: 28px;
    font-weight: 800;
    color: #8b3033;
}

.property-hero-price .period {
    display: block;
    font-size: 13px;
    color: #8a939b;
    margin-top: 2px;
}

.property-hero-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    justify-content: flex-end;
}

.property-hero-actions a {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid #e4e4e4;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #161e2d;
}

.property-hero-actions a:hover {
    background-color: #8b3033;
    border-color: #8b3033;
    color: #ffffff;
}

.property-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 32px;
    margin: 24px 0 0;
    padding: 24px 0 0;
    border-top: 1px solid #e4e4e4;
    list-style: none;
}

.property-hero-meta li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    color: #161e2d;
}

.property-hero-meta li .icon {
    font-size: 20px;
    color: #5fc5be;
}

@media (max-width: 767px) {
    .property-hero-card {
        padding: 22px;
    }

    .property-hero-top {
        flex-direction: column;
    }

    .property-hero-price {
        text-align: left;
    }

    .property-hero-actions {
        justify-content: flex-start;
    }
}

/* ===== "Apercu" : tuiles stats rapides ===== */
.overview-card {
    background: #ffffff;
    border: 1px solid #eef0f1;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.05);
}
.overview-card.single-property-element:not(:last-child) {
    border-bottom: none;
}
.overview-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 24px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.overview-tiles .item {
    display: flex;
    align-items: center;
    gap: 14px;
}
.overview-tiles .item .box-icon {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    border-radius: 12px;
    border: none;
    background-color: rgba(95, 197, 190, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.25s ease;
}
.overview-tiles .item .box-icon .icon {
    font-size: 22px;
    color: var(--color-turquoise-dark);
    transition: color 0.25s ease;
}
.overview-tiles .item:hover .box-icon {
    background-color: var(--color-bordeaux);
}
.overview-tiles .item:hover .box-icon .icon {
    color: #ffffff;
}
.overview-tiles .item .content {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.overview-tiles .item .value {
    font-size: 16px;
    font-weight: 700;
    color: #161e2d;
}
.overview-tiles .item .label {
    font-size: 12.5px;
    color: #8a939b;
    opacity: 1;
}

/* ===== "Details du bien" : fiche technique ===== */
.details-card {
    background: #ffffff;
    border: 1px solid #eef0f1;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.05);
}
.details-card.single-property-element:not(:last-child) {
    border-bottom: none;
}
.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 18px;
}
.details-grid .spec {
    padding: 16px 18px;
    background-color: #f8f9fa;
    border-radius: 10px;
}
.details-grid .spec .label {
    display: block;
    font-size: 12.5px;
    color: #8a939b;
    margin-bottom: 6px;
}
.details-grid .spec .value {
    font-size: 15px;
    font-weight: 700;
    color: #161e2d;
}

/* ===== Widget "Contactez l'agent" ===== */
.contact-agent-quick {
    display: flex;
    gap: 10px;
    margin: 18px 0 22px;
}

.contact-agent-quick a {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 6px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    background-color: #f1f2f2;
    color: #161e2d;
    transition: all 0.3s ease;
}

.contact-agent-quick a.whatsapp {
    background-color: #e2f2f0;
    color: #2f8f88;
}

.contact-agent-quick a:hover {
    background-color: #8b3033;
    color: #ffffff;
}

/* ===== Widget "Resume de l'offre" (remplace l'ancien filtre For Rent / For Sale) ===== */
.offer-widget {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
}

.offer-widget-tabs {
    display: flex;
    background-color: #f1f2f2;
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 22px;
    list-style: none;
}

.offer-widget-tabs li {
    flex: 1;
    text-align: center;
    padding: 10px 8px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #8a939b;
}

.offer-widget-tabs li.active {
    background-color: #8b3033;
    color: #ffffff;
}

.offer-widget-price {
    text-align: center;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid #e4e4e4;
}

.offer-widget-price .amount {
    font-size: 26px;
    font-weight: 800;
    color: #161e2d;
}

.offer-widget-price .status {
    display: inline-block;
    margin-top: 10px;
    font-size: 13px;
    font-weight: 600;
    color: #2f8f88;
    background-color: #e2f2f0;
    padding: 4px 14px;
    border-radius: 20px;
}

.offer-widget-facts {
    display: flex;
    justify-content: space-between;
    margin: 0 0 22px;
    padding: 0;
    list-style: none;
}

.offer-widget-facts li {
    text-align: center;
    flex: 1;
}

.offer-widget-facts li .icon {
    display: block;
    font-size: 20px;
    color: #5fc5be;
    margin-bottom: 6px;
}

.offer-widget-facts li b {
    display: block;
    font-size: 16px;
    color: #161e2d;
}

.offer-widget-facts li span {
    font-size: 12px;
    color: #8a939b;
}

/* ===== Simulateur de mensualité (fiche projet) ===== */
.single-property-simulator .simulator-panel {
    max-width: 720px;
    margin-top: 20px;
    background: var(--color-bordeaux);
    border-radius: 24px;
    padding: 28px;
    box-shadow: 0 20px 45px rgba(139, 48, 51, 0.25);
}

.single-property-simulator .simulator-note {
    max-width: 720px;
    margin-top: 16px;
    font-size: 13px;
    color: #8a939b;
}

.single-property-simulator .credit-form {
    font-family: var(--font-brand);
    color: #fff;
}

.single-property-simulator .grid-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

@media (max-width: 575px) {
    .single-property-simulator .simulator-panel {
        padding: 20px 16px;
    }
    .single-property-simulator .grid-form {
        grid-template-columns: 1fr;
    }
}

.single-property-simulator .field label {
    display: block;
    margin-bottom: 6px;
}

.single-property-simulator .field input {
    width: 100%;
    color: #fff;
    background-color: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 20px;
    height: 55px;
    font-size: 22px;
    padding: 0 15px;
    font-family: var(--font-brand);
    box-sizing: border-box;
}

.single-property-simulator .field input:focus {
    outline: none;
    border-color: var(--color-turquoise);
}

.single-property-simulator .field input[readonly] {
    background-color: rgba(255, 255, 255, 0.15);
    cursor: not-allowed;
}

.single-property-simulator .mensualite-disclaimer {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.75);
    margin: 15px 0 10px 0;
    text-align: center;
}

.single-property-simulator .calc-btn {
    text-transform: unset;
    background-color: var(--color-turquoise);
    width: 100%;
    font-size: 20px;
    border: none;
    border-radius: 20px;
    height: 55px;
    color: #16332f;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--font-brand);
    transition: background-color 0.2s ease;
}

.single-property-simulator .calc-btn:hover {
    background-color: var(--color-turquoise-dark);
}

.single-property-simulator .cta-btn {
    display: block;
    width: 100%;
    margin-top: 20px;
    background-color: var(--color-turquoise);
    color: #16332f;
    font-family: var(--font-brand);
    font-size: 18px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    border-radius: 20px;
    height: 55px;
    line-height: 55px;
    cursor: pointer;
    transition: background-color 0.2s;
    box-sizing: border-box;
}

.single-property-simulator .cta-btn:hover {
    background-color: var(--color-turquoise-dark);
}

.offer-widget .tf-btn.primary {
    width: 100%;
    justify-content: center;
}
/* ===== "Biens du projet" : un bien = une visite / pre-reservation ===== */
.biens-card-intro {
    color: #8a939b;
    font-size: 14px;
    margin: -6px 0 18px;
}
.biens-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.bien-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    background-color: #f8f9fa;
    border: 1px solid transparent;
    border-radius: 12px;
    transition: border-color 0.2s ease;
}
.bien-row:hover { border-color: #5fc5be; }
.bien-row.is-unavailable { opacity: 0.6; }
.bien-row.is-unavailable:hover { border-color: transparent; }
.bien-row-main { min-width: 0; }
.bien-row-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 15px;
    font-weight: 700;
    color: #161e2d;
}
.bien-row-status {
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 600;
    background-color: #e2f2f0;
    color: #2f8f88;
}
.bien-row-status.status-reserved { background-color: #fff4e0; color: #b7791f; }
.bien-row-status.status-sold,
.bien-row-status.status-unavailable { background-color: #eceeef; color: #5c6368; }
.bien-row-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    margin-top: 6px;
    font-size: 13px;
    color: #5c6368;
}
.bien-row-side {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}
.bien-row-price {
    font-weight: 700;
    color: #161e2d;
    white-space: nowrap;
}
.bien-row-side .tf-btn { padding: 10px 18px; font-size: 14px; white-space: nowrap; }
.offer-widget .tf-btn.primary.disabled { opacity: 0.55; pointer-events: none; cursor: not-allowed; }

@media (max-width: 767px) {
    .bien-row { flex-direction: column; align-items: stretch; }
    .bien-row-side { justify-content: space-between; }
}

/* ===== "Equipements et prestations" : grille de tuiles avec icones ===== */
.amenities-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.amenities-head .title { margin: 0; }
.amenities-count {
    padding: 4px 12px;
    border-radius: 999px;
    background-color: #e2f2f0;
    color: #2f8f88;
    font-size: 12.5px;
    font-weight: 600;
}
.amenities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.amenity-tile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background-color: #f8f9fa;
    border: 1px solid transparent;
    border-radius: 12px;
    transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}
.amenity-tile:hover {
    border-color: #5fc5be;
    background-color: #ffffff;
    transform: translateY(-2px);
}
.amenity-icon {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(95, 197, 190, 0.14);
    color: #2f8f88;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.amenity-tile:hover .amenity-icon {
    background-color: #5fc5be;
    color: #ffffff;
}
.amenity-name {
    font-size: 14.5px;
    font-weight: 600;
    color: #161e2d;
    line-height: 1.3;
}
@media (max-width: 575px) {
    .amenities-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .amenity-tile { padding: 12px; gap: 10px; }
    .amenity-icon { width: 36px; height: 36px; }
    .amenity-name { font-size: 13.5px; }
}

/* Bien en offre "Auction" dans la liste des biens du projet */
.bien-row-price { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.bien-auction-tag { padding: 2px 8px; border-radius: 6px; background: #d32f2f; color: #fff !important; font-size: 11.5px; font-weight: 800; }
.bien-price-old { color: #8a939b; font-weight: 500; font-size: 13px; }

/* ---------- Avis clients ---------- */
.single-wrapper-review .reviews-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.single-wrapper-review .reviews-head .title { margin: 0; }
.reviews-summary { display: flex; align-items: center; gap: 10px; }
.reviews-score { font-size: 22px; font-weight: 800; color: #161e2d; line-height: 1; }
.reviews-count { color: #8a939b; font-size: 14px; }
.reviews-stars { display: inline-flex; gap: 2px; color: #dfe3e6; font-size: 18px; line-height: 1; }
.reviews-stars .on { color: #ffa800; }
.reviews-stars.small { font-size: 14px; }

.review-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.review-item { display: flex; gap: 14px; padding: 18px; border: 1px solid #e9ecef; border-radius: 14px; background: #fff; }
.review-item.is-hidden { display: none; }
.review-avatar {
    flex: 0 0 46px; width: 46px; height: 46px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: #e2f2f0; color: #1f7a73; font-weight: 800; font-size: 18px;
}
.review-body { flex: 1; min-width: 0; }
.review-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.review-top h6 { margin: 0; }
.review-date { margin: 2px 0 8px; font-size: 13px; color: #8a939b; }
.review-text { margin: 0; color: #37414a; white-space: pre-line; overflow-wrap: anywhere; }
.review-more { margin-top: 16px; }
.review-empty { margin: 0; padding: 18px; border: 1px dashed #d8dde1; border-radius: 14px; color: #5c6368; text-align: center; }

.review-form-box { margin-top: 30px; padding-top: 26px; border-top: 1px solid #e4e4e4; }
.review-form .form-wg { margin-top: 18px; }
.review-form .sub-ip { display: block; font-weight: 600; margin-bottom: 8px; }
.review-form textarea { width: 100%; }
.review-guest-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.review-notice { margin: 12px 0; padding: 12px 16px; border-radius: 10px; font-size: 14px; }
.review-notice.success { background: #e2f2f0; color: #1f7a73; }
.review-notice.pending { background: #fff4e0; color: #9a5b00; }
.review-notice.warning { background: #fdecea; color: #b52424; }
.review-error { margin: 6px 0 0; color: #e02b1d; font-size: 13.5px; }

/* Choix de la note : etoiles cliquables (ordre inverse pour colorer les precedentes au survol) */
.rating-input { display: inline-flex; flex-direction: row-reverse; gap: 4px; }
.rating-input input { position: absolute; opacity: 0; width: 0; height: 0; }
.rating-input label { font-size: 30px; line-height: 1; color: #dfe3e6; cursor: pointer; transition: color .15s; }
.rating-input label:hover,
.rating-input label:hover ~ label,
.rating-input input:checked ~ label { color: #ffa800; }
.rating-input input:focus-visible + label { outline: 2px solid #5fc5be; outline-offset: 2px; border-radius: 4px; }

/* ---------- Localisation & video de presentation ---------- */
.single-property-map .map-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.single-property-map .map-head .title { margin: 0; }
.single-property-map .map-head .tf-btn { display: inline-flex; align-items: center; gap: 6px; }
.youtube-embed { cursor: pointer; aspect-ratio: 16 / 9; background: #161e2d; }
.youtube-embed img { width: 100%; height: 100%; object-fit: cover; }
.youtube-embed .btn-video { border: 0; }
.youtube-embed.is-playing { cursor: default; }
.youtube-embed.is-playing::before { display: none; }
.youtube-embed iframe { display: block; width: 100%; height: 100%; border: 0; }

.project-location-map { z-index: 0; }
@media (max-width: 767px) { .project-location-map { height: 340px; } }

/* ===== Bouton "Comparer" (en-tete de la fiche) ===== */
.property-hero-actions .btn-compare-detail {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 38px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid #e4e4e4;
    background: #ffffff;
    color: #161e2d;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}
.property-hero-actions .btn-compare-detail .icon {
    font-size: 12px;
}
.property-hero-actions .btn-compare-detail:hover,
.property-hero-actions .btn-compare-detail.is-active {
    background-color: #5fc5be;
    border-color: #5fc5be;
    color: #ffffff;
}

/* ===== Colonne de droite fixe pendant le scroll =====
   (le "top" est ajuste en JS si la colonne est plus haute que l'ecran) */
@media (min-width: 992px) {
    .js-sticky-sidebar {
        position: sticky;
        top: 120px;
    }
}
.flat-property-detail .single-sidebar .widget-box:not(:last-child) {
    margin-bottom: 24px;
}
.flat-property-detail .single-sidebar .single-property-whychoose {
    padding: 24px;
}

/* ===== Simulateur dans la colonne de droite : version compacte ===== */
.sidebar-simulator .simulator-panel {
    max-width: none;
    margin-top: 0;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 12px 30px rgba(139, 48, 51, 0.2);
}
.sidebar-simulator .simulator-title {
    color: #ffffff;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 6px;
}
.sidebar-simulator .simulator-intro {
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 18px;
}
.sidebar-simulator .grid-form {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}
.sidebar-simulator .grid-form .field {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}
.sidebar-simulator .grid-form .field-full {
    grid-column: 1 / -1;
}
.sidebar-simulator .field label {
    font-size: 13px;
    line-height: 1.3;
    color: rgba(255, 255, 255, 0.9);
}
.sidebar-simulator .field input {
    height: 44px;
    font-size: 16px;
    border-radius: 12px;
}
.sidebar-simulator .calc-btn {
    height: 46px;
    font-size: 16px;
    border-radius: 12px;
}
.sidebar-simulator .cta-btn {
    margin-top: 12px;
    height: 46px;
    line-height: 46px;
    font-size: 15px;
    border-radius: 12px;
}
.sidebar-simulator .simulator-note {
    max-width: none;
    margin-top: 10px;
    font-size: 12px;
    line-height: 1.5;
}

/* ===== Biens similaires (bas de page) ===== */
.similar-projects-section {
    padding-top: 60px;
    padding-bottom: 80px;
}
/* Toute la largeur de l'ecran (pas de .container plafonne a 1320 px),
   avec les memes marges laterales que le header */
.similar-projects-container {
    width: 100%;
    padding-left: clamp(16px, 2.5vw, 48px);
    padding-right: clamp(16px, 2.5vw, 48px);
}
