:root {
    --primary: #003e31;
    --accent: #DDDC01;
    --header-bg: #003e31;
    --main-bg: #f0f7f5;
    --text: #1a1a1a;
    --text-light: #666;
    --card-bg: #ffffff;
    --radius: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.apimo-page-wrapper,
.apimo-elementor-container {
    font-family: 'Outfit', sans-serif !important;
    background: var(--main-bg) !important;
    color: var(--text);
    line-height: 1.6;
    overflow-x: clip;
    width: 100%;
    display: block;
    clear: both;
    min-height: 100vh;
}

/* HEADER AREA */
.apimo-header-area {
    background: var(--header-bg) !important;
    padding: clamp(20px, 3vw, 30px) 20px clamp(60px, 8vw, 90px) 20px !important;
    text-align: left;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.apimo-header-content,
.apimo-header-area .elementor-container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.apimo-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 25px;
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: 0.3s;
}

.apimo-back-btn:hover {
    opacity: 0.7;
    color: var(--accent);
}

.apimo-title {
    font-size: 42px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 8px;
    letter-spacing: -1px;
    word-wrap: break-word;
}

.apimo-address {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-light);
    font-size: 18px;
    flex-wrap: wrap;
}

.apimo-address i {
    color: var(--accent);
}

/* MAIN CONTAINER */
.apimo-single-container {
    max-width: 1200px !important;
    margin: clamp(-50px, -8vw, -80px) auto 60px !important;
    padding: 0 20px !important;
    position: relative;
    z-index: 10;
    width: 100%;
    box-sizing: border-box;
}

/* Surcharge de la Flexbox Elementor → CSS Grid 66/33 */
.apimo-layout-grid>.elementor-container,
.apimo-layout-grid.e-con {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) clamp(300px, 30vw, 380px) !important;
    gap: clamp(20px, 4vw, 40px) !important;
    max-width: none !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    align-items: start !important;
}

.apimo-layout-grid>.elementor-container>.elementor-column,
.apimo-layout-grid.e-con>.e-con-inner {
    width: auto !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* CARD STYLE (single page) */
.apimo-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    padding: 40px;
    margin-bottom: 40px;
    border: none;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* ═══════════════════════════════════════════════════════════════
   ELEMENTOR CARD OVERRIDES
   Neutralise TOUS les espacements par défaut d'Elementor
   pour que la carte Elementor soit 100% identique au PHP
   ═══════════════════════════════════════════════════════════════ */
/* Supprimer TOUT padding Elementor interne (valable pour carte ET single) */
.apimo-card-elementor .elementor-section,
.apimo-card-elementor .elementor-container,
.apimo-card-elementor .elementor-column,
.apimo-card-elementor .elementor-column-wrap,
.apimo-card-elementor .elementor-widget-wrap,
.apimo-card-elementor .e-con,
.apimo-card-elementor .e-con-inner,
.apimo-single-container .elementor-widget-wrap {
    padding: 0 !important;
    margin: 0 !important;
}

.apimo-card-elementor {
    font-family: 'Outfit', sans-serif !important;
    background: #fff !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08) !important;
    overflow: hidden !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    border: 1px solid #f0f0f0 !important;
    padding: 0 !important;
    /* Écrase le padding: 40px de .apimo-card */
    margin-bottom: 0 !important;
    /* Écrase le margin-bottom: 40px de .apimo-card */
}

.apimo-card-elementor:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12) !important;
}

/* Ces règles ont été fusionnées plus haut */

/* Supprimer le margin-bottom: 20px par défaut d'Elementor sur chaque widget */
.apimo-card-elementor .elementor-widget {
    margin-bottom: 0 !important;
}

/* L'image doit prendre 100% sans aucun espace */
.apimo-card-elementor .apimo-card-img-wrapper {
    width: 100% !important;
    aspect-ratio: 4/3;
}

.apimo-card-elementor .apimo-card-img-wrapper img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

/* Prix & Badges positionnement */
.apimo-card-elementor .apimo-card-price {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background-color: #003e31;
    color: #DDDC01;
}

.apimo-card-elementor .apimo-card-badge,
.apimo-card-elementor .apimo-badge-sold,
.apimo-card-elementor .apimo-badge-rent {
    background-color: #DDDC01;
    color: #003e31;
}

/* GALLERY */
.apimo-gallery-card {
    padding: 0;
    overflow: hidden;
}

.apimo-main-image {
    position: relative;
    width: 100%;
    aspect-ratio: 16/10;
    background: #eee;
    overflow: hidden;
    border-radius: var(--radius) var(--radius) 0 0;
}

.apimo-main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s;
}

.apimo-nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.3);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    z-index: 10;
    font-size: 20px;
    transition: 0.3s;
}

.apimo-nav-arrow:hover {
    background: rgba(0, 0, 0, 0.6);
}

.apimo-nav-prev {
    left: 20px;
}

.apimo-nav-next {
    right: 20px;
}

.apimo-photo-counter {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 10px 15px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
}

.apimo-thumbnails {
    display: flex;
    gap: 12px;
    padding: 20px;
    overflow-x: auto;
    background: #fff;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.apimo-thumbnails::-webkit-scrollbar {
    display: none;
}

.apimo-thumb {
    flex: 0 0 120px;
    aspect-ratio: 3/2;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.4;
    transition: 0.3s;
    border: 2px solid transparent;
}

.apimo-thumb.active {
    opacity: 1;
    border-color: var(--accent);
}

/* SECTIONS */
.apimo-card-title {
    font-size: 24px !important;
    font-weight: 800 !important;
    color: #013f31 !important;
    margin-bottom: 25px !important;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 0;
}

.apimo-card-title a {
    text-decoration: none;
    color: inherit;
}

.apimo-card-location {
    color: #5c6c80;
    font-size: 14px;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.apimo-card-suffix {
    font-size: 13px;
    font-weight: 500;
    color: #666;
    margin-top: 8px;
    display: block;
}

.apimo-card-location i {
    color: #8c9caf;
    font-size: 14px;
}

.apimo-features-list {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #5c6c80;
    padding-top: 15px;
    border-top: 1px solid #eef1f5;
    font-weight: 500;
}

.apimo-features-list span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.apimo-features-list i {
    color: #8c9caf;
    font-size: 16px;
}

/* DETAILS GRID */
.apimo-details-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 20px !important;
    border-top: 1px solid #f4f1ea;
    padding-top: 20px;
    margin-top: 20px;
}

.apimo-detail-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f4f1ea;
}

.apimo-detail-icon {
    width: 40px;
    height: 40px;
    background: #013f31;
    color: #DDDC01;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.apimo-detail-content {
    display: flex;
    flex-direction: column;
}

.apimo-detail-label {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin-bottom: 2px;
}

.apimo-detail-value {
    font-size: 14px;
    color: #1a1a1a;
    font-weight: 700;
}

/* SIDEBAR */
/* SIDEBAR STICKY FIX (Affecte toute la colonne si un widget a l'option active) */
.apimo-sidebar,
.elementor-column:has(.apimo-is-sticky-yes) {
    position: sticky !important;
    top: 100px !important;
    z-index: 100;
    align-self: flex-start !important;
}

.elementor-column:has(.apimo-is-sticky-yes)>.elementor-widget-wrap,
.elementor-column:has(.apimo-is-sticky-yes)>.elementor-column-wrap {
    position: relative !important;
    height: auto !important;
}

.apimo-layout-grid>.elementor-container {
    /* Suppression du stretch forcé pour permettre au sticky de fonctionner */
}

.apimo-price-card {
    text-align: left;
    padding: 35px;
}

.apimo-price-label {
    font-size: 14px;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
}

.apimo-price-val {
    font-size: 42px;
    font-weight: 800;
    color: var(--text);
    line-height: 1;
}

.apimo-price-currency {
    font-size: 0.8em;
    font-weight: 600;
}

.apimo-price-suffix {
    font-size: 14px;
    margin-top: 8px;
    font-weight: 500;
    color: #666;
    display: block;
}

.apimo-contact-card {
    padding: 35px;
}

.apimo-agent-info {
    margin-bottom: 30px;
    text-align: left;
}

.apimo-agent-name {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 5px;
}

.apimo-contact-list {
    margin-bottom: 30px;
}

.apimo-contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    text-decoration: none;
    color: var(--text);
    transition: 0.2s;
    word-break: break-all;
}

.apimo-contact-item:hover {
    color: var(--accent);
}

.apimo-icon-circle {
    width: 40px;
    height: 40px;
    background: #DDDC01;
    color: #013f31;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.apimo-icon-circle i {
    margin: 0;
}

.apimo-btn-whatsapp {
    background: #25d366;
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 18px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 16px;
    margin-top: 20px;
    transition: 0.3s;
}

.apimo-btn-whatsapp:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.3);
}

/* MAP */
.apimo-map-card {
    padding: 25px !important;
    background: #fff !important;
    border: 1px solid #eee !important;
    height: auto !important;
}

.apimo-map-card iframe {
    width: 100%;
    height: 100%;
    border: 0;
    filter: grayscale(0.2);
}

/* CONTACT WIDGET */
.apimo-contact-icon {
    width: 40px;
    height: 40px;
    background: #DDDC01;
    color: #003e31;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.apimo-contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

.apimo-agent-role {
    font-size: 15px;
    font-weight: 500;
    color: #666;
}

/* MAP WIDGET */
.apimo-map-iframe-wrapper {
    width: 100%;
    height: 400px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #ddd;
}

.apimo-map-iframe-wrapper iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

@media (max-width: 991px) {
    .apimo-layout-grid>.elementor-container {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
    }

    .apimo-sidebar {
        position: static !important;
    }

    .apimo-title {
        font-size: 36px;
    }

    .apimo-header-area {
        padding: 40px 20px;
    }

    .apimo-single-container {
        margin-top: -20px;
    }

    .apimo-card {
        padding: 30px;
    }
}

@media (max-width: 767px) {
    .apimo-title {
        font-size: 28px;
    }

    .apimo-price-val {
        font-size: 32px;
    }

    .apimo-details-grid {
        grid-template-columns: 1fr;
    }

    .apimo-nav-arrow {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .apimo-card {
        padding: 20px;
    }
}

.apimo-card-price {
    background-color: #003e31;
    color: #DDDC01;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 18px;
    font-weight: 800;
}

.apimo-card-badge {
    font-size: 11px;
    font-weight: 700;
}