/* =============================================
   Programme Neuf — Styles spécifiques
   Le reste est géré par les classes natives Houzez
   (.block-wrap, .block-title-wrap, .block-content-wrap, .widget-wrap)
   ============================================= */

/* ---------- Hero image ---------- */
.programme-hero {
    margin-bottom: 0;
}

.programme-hero-img {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    display: block;
}

/* Hero banner must not overlap header dropdown menus */
.stg-hero-banner {
    z-index: 0;
}

/* ---------- Gallery grid ---------- */
.programme-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
}

.programme-gallery-thumb img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 6px;
    transition: transform 0.2s;
}

.programme-gallery-thumb:hover img {
    transform: scale(1.03);
}

/* ---------- Lots table ---------- */
.programme-lots-table {
    width: 100%;
}

.programme-lots-table thead th {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6b7280;
    white-space: nowrap;
}

.programme-lots-table td {
    vertical-align: middle;
    font-size: 14px;
    white-space: nowrap;
}

/* Lots table responsive */
@media (max-width: 767px) {
    .programme-lots-table thead {
        display: none;
    }
    .programme-lots-table,
    .programme-lots-table tbody,
    .programme-lots-table tr,
    .programme-lots-table td {
        display: block;
        width: 100%;
    }
    .programme-lots-table tr {
        padding: 12px 0;
        border-bottom: 1px solid #e5e7eb;
    }
    .programme-lots-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 4px 0;
        border: none;
    }
    .programme-lots-table td::before {
        content: attr(data-label);
        font-weight: 600;
        font-size: 12px;
        color: #6b7280;
        text-transform: uppercase;
        margin-right: 10px;
    }
    .programme-lots-table td:last-child {
        justify-content: flex-end;
        padding-top: 8px;
    }
    .programme-lots-table td:last-child .btn {
        width: 100%;
        text-align: center;
    }
}

/* ---------- Card image slider (galerie programme) ---------- */
.programme-card-slider {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.programme-card-slides {
    display: block;
    position: relative;
    width: 100%;
    height: 100%;
}

.programme-card-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.programme-card-slide.is-active {
    opacity: 1;
    position: relative;
    pointer-events: auto;
}

/* Flèches toujours visibles, style chevron blanc sur fond blanc */
.programme-card-slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 0;
    background: rgba(255,255,255,0.95);
    color: #1a1a2e;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 3;
    padding: 0;
    line-height: 1;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    transition: background 0.2s, transform 0.15s;
    opacity: 1;
}

.programme-card-slider-nav svg {
    display: block;
}

.programme-card-slider-nav.prev { left: 8px; }
.programme-card-slider-nav.next { right: 8px; }

.programme-card-slider-nav:hover {
    background: #fff;
    transform: translateY(-50%) scale(1.08);
}

.programme-card-slider-nav:active {
    transform: translateY(-50%) scale(0.95);
}

/* Compteur discret bas-droite */
.programme-card-slider-counter {
    position: absolute;
    bottom: 10px;
    right: 10px;
    z-index: 3;
    background: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 10px;
    letter-spacing: 0.3px;
    pointer-events: none;
}

/* Card price position fix */
.programme-card-price {
    position: absolute;
    bottom: 0;
    right: 0;
    padding: 6px 14px;
    font-weight: 700;
    border-top-left-radius: 6px;
}

/* Card labels position */
.programme-card-labels {
    position: absolute;
    z-index: 2;
}

/* Card hover transition */
.item-wrap-programme {
    transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
    overflow: hidden !important;
    border-radius: 8px !important;
}

/* Footer : hérite du border-radius de la carte sur ses coins bas */
.item-wrap-programme .item-footer {
    border-bottom-left-radius: inherit !important;
    border-bottom-right-radius: inherit !important;
    overflow: hidden;
}

/* Zero-out tous les border/padding/margin des wrappers intermédiaires qui
   pourraient créer un liseret visible autour de l'image */
.item-wrap-programme .item-wrap,
.item-wrap-programme .item-wrap > .d-flex,
.item-wrap-programme .item-header,
.item-wrap-programme .listing-image-wrap,
.item-wrap-programme .listing-thumb,
.item-wrap-programme .listing-featured-thumb {
    border: 0 !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* L'image elle-même ne doit jamais avoir de bordure */
.item-wrap-programme .programme-card-img,
.item-wrap-programme .listing-featured-thumb img {
    border: 0 !important;
    outline: none;
}

.item-wrap-programme:hover {
    transform: translateY(-2px);
}

/* Card separator */
.programme-card-separator {
    border: 0;
    border-top: 1px solid #e5e7eb;
}

/* ---------- Lightbox galerie : bouton "Voir le programme" ---------- */
.stg-lightbox-btn,
#houzez-listing-lightbox .stg-lightbox-btn {
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

/* Hover : bordure marron, fond blanc, texte marron — style natif Houzez secondary-outlined */
.stg-lightbox-btn:hover,
#houzez-listing-lightbox .stg-lightbox-btn:hover {
    background-color: #fff !important;
    border-color: #6b3f2a !important;
    color: #6b3f2a !important;
}

/* ---------- DPE badges ---------- */
.programme-dpe {
    display: inline-block;
    width: 28px;
    height: 28px;
    line-height: 28px;
    text-align: center;
    border-radius: 4px;
    font-weight: 700;
    font-size: 13px;
    color: #fff;
}

.programme-dpe-a { background: #319834; }
.programme-dpe-b { background: #33cc31; }
.programme-dpe-c { background: #cbfc34; color: #333; }
.programme-dpe-d { background: #fbfe06; color: #333; }
.programme-dpe-e { background: #fbcc04; color: #333; }
.programme-dpe-f { background: #f66a02; }
.programme-dpe-g { background: #ee0100; }

/* ---------- Sidebar: first block no top margin ---------- */
.programme-neuf-single .bt-sidebar-wrap .block-wrap:first-child {
    margin-top: 0;
}

/* ---------- Sidebar contact name ---------- */
.programme-sidebar-contact-name {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 14px;
    color: #1a1a2e;
}

/* ---------- Programme Details widget : neutralise padding/margin natifs Houzez .block-wrap ---------- */
.stg-prog-details-block {
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
}

/* ---------- Responsive : widgets programmes neufs ---------- */
@media (max-width: 991.98px) {
    .item-wrap-programme .programme-card-img,
    .item-wrap-programme .listing-image-wrap {
        height: 200px !important;
    }
    .item-wrap-programme .item-title {
        font-size: 15px;
    }
    .stg-programme-lots-cards .item-amenities {
        gap: 4px 8px !important;
    }
}

@media (max-width: 767.98px) {
    /* Cards : 1 colonne pleine sur mobile */
    .listing-view.grid-view .col {
        margin-bottom: 16px;
    }
    .item-wrap-programme .programme-card-img,
    .item-wrap-programme .listing-image-wrap {
        height: 220px !important;
    }
    /* Listes info/details : réduire padding */
    .list-three-col li,
    .programme-sidebar-list li {
        padding: 8px 0;
        font-size: 13px;
    }
    /* Contact form : une colonne sur mobile */
    .stg-prog-contact-form .row.g-2 > [class*="col-"] {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

@media (max-width: 575.98px) {
    .item-wrap-programme .item-body {
        padding: 14px !important;
    }
    .item-wrap-programme .item-title {
        font-size: 14px;
        line-height: 1.3;
    }
    .item-wrap-programme .programme-card-price {
        font-size: 12px;
        padding: 4px 8px !important;
    }
    /* Hero : hauteur réduite */
    .programme-hero,
    .stg-hero-banner {
        min-height: 280px !important;
    }
}

/* ---------- Contact widget : neutralise marges Houzez natives ---------- */
/* .block-title-wrap hérite de margin-top:40px (via .block-content-wrap .block-title-wrap)
   + margin-bottom:30px (via .block-title-wrap) — on les réduit ici pour que le widget
   ne prenne de l'espace que via ses propres contrôles Elementor. */
.stg-prog-contact-block,
.stg-prog-contact-block .block-content-wrap,
.stg-prog-contact-block .block-content-wrap .block-title-wrap {
    margin-top: 0 !important;
}

.stg-prog-contact-block .block-title-wrap {
    margin-bottom: 16px !important;
    padding-bottom: 16px;
    border-bottom: 1px solid #dce0e0;
}

.stg-prog-contact-form .agent-details {
    margin-bottom: 16px;
}

.stg-prog-contact-form .agent-image img {
    object-fit: contain;
    background: #f3f4f6;
}

/* Réseaux sociaux : override des styles natifs .btn-* de Houzez
   pour un rendu monochrome uniforme aligné sur la couleur du thème */
.stg-prog-contact-form .agent-social-media {
    display: flex !important;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    padding: 0;
    margin: 0;
    list-style: none;
}

.stg-prog-contact-form .agent-social-media > span {
    display: inline-flex !important;
    margin: 0 !important;
    padding: 0 !important;
    background: none !important;
}

/* Reset complet des classes btn-* (facebook, instagram, youtube, linkedin, etc.) */
.stg-prog-contact-form .agent-social-media a,
.stg-prog-contact-form .agent-social-media a[class^="btn-"],
.stg-prog-contact-form .agent-social-media a[class*=" btn-"] {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: auto;
    height: auto;
    min-width: 0;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    line-height: 1;
    color: inherit !important;
}

.stg-prog-contact-form .agent-social-media a i,
.stg-prog-contact-form .agent-social-media a i.houzez-icon {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 18px;
    line-height: 1;
    color: inherit !important;
    background: transparent !important;
}

.stg-prog-contact-form .agent-social-media a:hover,
.stg-prog-contact-form .agent-social-media a:hover i {
    opacity: 0.7;
    color: inherit !important;
}

/* ---------- Sidebar details list ---------- */
.programme-sidebar-list {
    margin: 0;
    padding: 0;
}

.programme-sidebar-list li {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #dce0e0;
    font-size: 14px;
}

.programme-sidebar-list li:first-child {
    padding-top: 0;
}

.programme-sidebar-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

/* ============================
   Archive: Cards (Houzez-like)
   ============================ */

/* Card uses Houzez native classes: item-listing-wrap, item-wrap, item-header, etc.
   Only add programme-specific overrides below. */

.programme-card-noimg {
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    color: #d1d5db;
    font-size: 48px;
}

.programme-card-labels {
    z-index: 2;
    margin: 15px;
}

.programme-label-etat {
    font-weight: 600;
}

/* h-type row for "PROGRAMME NEUF" label */
.item-wrap-programme .h-type span {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
    color: #6b7280;
}

/* Card hover */
.item-wrap-programme {
    transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
}

.item-wrap-programme:hover {
    transform: translateY(-2px);
}

/* Card separator */
.programme-card-separator {
    border: 0;
    border-top: 1px solid #e5e7eb;
}

/* Card price position */
.programme-card-price {
    font-weight: 700;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .programme-hero-img {
        max-height: 300px;
    }
}

/* ===================================
   Card programme - Structure identique Houzez
   =================================== */

.item-wrap-programme {
    height: 100%;
    display: flex !important;
    flex-direction: column !important;
}

.item-wrap-programme .item-wrap {
    display: flex !important;
    flex-direction: column !important;
    height: 100%;
    width: 100%;
}

.item-wrap-programme .item-wrap > .d-flex {
    display: flex !important;
    flex-direction: column !important;
    height: 100%;
    width: 100%;
    align-items: stretch !important;
}

/* Header : image avec badge et prix en overlay */
.item-wrap-programme .item-header {
    position: relative;
    width: 100%;
    flex-shrink: 0;
}

/* Body prend l'espace disponible, bouton poussé en bas */
.item-wrap-programme .item-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1 1 auto;
    width: 100%;
}

.item-wrap-programme .item-body > * {
    min-width: 0;
}

/* Titre */
.item-wrap-programme .item-title {
    margin: 0;
    line-height: 1.3;
    font-size: 18px;
}

.item-wrap-programme .item-title a {
    text-decoration: none;
    color: #1a1a2e;
}

/* Adresse */
.item-wrap-programme .item-address {
    margin: 0;
    font-style: normal;
    display: flex;
    align-items: center;
    color: #6b7280;
    font-size: 14px;
}

/* Amenities (lots + livraison) */
.item-wrap-programme .item-amenities {
    display: flex !important;
    flex-wrap: wrap;
    gap: 6px 16px;
    margin: 0;
    padding: 0;
    list-style: none;
    color: #6b7280;
    font-size: 14px;
}

.item-wrap-programme .item-amenities li {
    display: flex;
    align-items: center;
    white-space: nowrap;
    margin: 0;
}

.item-wrap-programme .item-amenities li i {
    margin-right: 6px;
    color: #9ca3af;
}

/* Type "PROGRAMME NEUF" */
.item-wrap-programme .h-type {
    width: 100%;
    padding-top: 4px;
    margin: 0;
}

.item-wrap-programme .h-type span {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 1px;
    color: #6b7280;
}

/* Bouton : entre le body et le footer, aligné à droite comme Houzez */
.item-wrap-programme .btn-item,
.item-wrap-programme .programme-card-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    align-self: flex-end;          /* aligné à droite comme "VOIR L'ANNONCE" */
    gap: 6px;
    white-space: nowrap;
    line-height: 1.3;
    box-sizing: border-box;
    padding: 10px 20px;
    margin-top: auto;              /* pousse le bouton tout en bas du body */
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Footer (agent + date) séparé par un trait fin */
.item-wrap-programme .item-footer {
    width: 100%;
    border-top: 1px solid #f0f0f0;
    padding: 14px 16px;
    margin-top: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    flex-shrink: 0;
}

.item-wrap-programme .item-author {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex-shrink: 1;
}

.item-wrap-programme .item-author-image {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.item-wrap-programme .item-author-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.item-wrap-programme .item-author a {
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #1a1a2e;
    font-weight: 600;
}

.item-wrap-programme .item-date {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #9ca3af;
    font-size: 12px;
    flex-shrink: 0;
    white-space: nowrap;
}

/* Hide amenities list item separators */
.item-wrap-programme .item-amenities::after {
    display: none;
}

/* Card hover */
.item-wrap-programme {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.item-wrap-programme:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

/* Étiquette plus propre */
.programme-card-labels .programme-label-etat {
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 5px 12px;
}

/* Prix en overlay sur l'image */
.programme-card-price {
    font-weight: 700;
    font-size: 14px;
}

/* ===================================
   Responsive mobile
   =================================== */
@media (max-width: 576px) {
    .item-wrap-programme .item-body {
        padding: 14px;
    }

    .item-wrap-programme .item-title {
        font-size: 16px;
    }

    .item-wrap-programme .btn-item,
    .item-wrap-programme .programme-card-btn {
        padding: 12px 14px;
    }

    .programme-card-labels {
        margin: 10px;
    }

    .programme-card-img,
    .programme-card-noimg {
        height: 200px !important;
    }
}
