/* =====================================================
   De Pierre en Pierre — Public Templates V46
   Templates publics réécrits + mobile optimisé.
   ===================================================== */

body.dpep-public-luxe-v45 {
    --dpep-v46-navy: #041C34;
    --dpep-v46-ink: #071D33;
    --dpep-v46-gold: #C9A36A;
    --dpep-v46-ivory: #FAF7F1;
    --dpep-v46-stone: #F3EFE7;
    --dpep-v46-line: rgba(7,29,51,.12);
    --dpep-v46-serif: "Playfair Display", Georgia, serif;
    --dpep-v46-sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

.dpep-v46-container {
    width: min(1180px, calc(100vw - 48px));
    margin: 0 auto;
}

.dpep-v46-hero {
    padding: 100px 0 72px;
    background:
        linear-gradient(135deg, rgba(4,28,52,.07), rgba(201,163,106,.08)),
        var(--dpep-v46-ivory);
}

.dpep-v46-kicker {
    margin: 0 0 16px;
    color: #A98243;
    font: 800 12px/1 var(--dpep-v46-sans);
    letter-spacing: .24em;
    text-transform: uppercase;
}

.dpep-v46-hero h1 {
    max-width: 920px;
    margin: 0;
    color: var(--dpep-v46-ink);
    font: 500 clamp(44px, 4.8vw, 72px)/1.02 var(--dpep-v46-serif);
    letter-spacing: -.04em;
}

.dpep-v46-hero p:not(.dpep-v46-kicker) {
    max-width: 720px;
    margin: 24px 0 0;
    color: rgba(7,29,51,.72);
    font-size: 17px;
    line-height: 1.72;
}

.dpep-v46-search {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr)) 170px;
    gap: 16px;
    align-items: end;
    padding: 28px;
    background: #051D35;
    border: 1px solid rgba(201,163,106,.22);
    box-shadow: 0 22px 54px rgba(4,28,52,.14);
}

.dpep-v46-search label {
    display: block;
    margin: 0 0 10px;
    color: rgba(255,255,255,.76);
    font: 800 11px/1 var(--dpep-v46-sans);
    letter-spacing: .16em;
    text-transform: uppercase;
}

.dpep-v46-search select,
.dpep-v46-search input {
    width: 100%;
    min-height: 46px;
    border: 0;
    border-radius: 0;
    padding: 0 14px;
    background: #fff;
    color: var(--dpep-v46-ink);
    font: 14px/1.2 var(--dpep-v46-sans);
}

.dpep-v46-search button {
    min-height: 46px;
    border: 0;
    border-radius: 0;
    background: linear-gradient(135deg, #C9A36A, #B58A43);
    color: #fff;
    font: 800 13px/1 var(--dpep-v46-sans);
    letter-spacing: .13em;
    text-transform: uppercase;
}

/* Acheter / résultats */
.dpep-v46-buy-main,
.dpep-v46-archive-main,
.dpep-v46-mag-main,
.dpep-v46-single-main {
    background: #fff;
}

.dpep-v46-buy-search-wrap {
    margin: -34px auto 70px;
    position: relative;
    z-index: 3;
}

.dpep-v46-results-head {
    display: flex;
    justify-content: space-between;
    gap: 32px;
    align-items: end;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--dpep-v46-line);
}

.dpep-v46-results-head h2 {
    margin: 0 0 -1px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--dpep-v46-gold);
    color: var(--dpep-v46-ink);
    font: 800 17px/1 var(--dpep-v46-sans);
    letter-spacing: .16em;
    text-transform: uppercase;
}

.dpep-v46-results-head p {
    margin: 0 0 16px;
    color: rgba(7,29,51,.56);
}

.dpep-v46-results-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
}

.dpep-v46-property-card {
    background: #fff;
    border: 1px solid rgba(7,29,51,.10);
    transition: box-shadow .25s ease, transform .25s ease;
}

.dpep-v46-property-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 48px rgba(7,29,51,.08);
}

.dpep-v46-card-image {
    position: relative;
    display: block;
    aspect-ratio: 1.33 / 1;
    overflow: hidden;
    background: var(--dpep-v46-stone);
}

.dpep-v46-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dpep-v46-card-placeholder {
    display: grid;
    place-items: center;
    height: 100%;
    color: rgba(7,29,51,.42);
}

.dpep-v46-card-heart {
    position: absolute;
    top: 12px;
    right: 15px;
    color: #fff;
    font-size: 26px;
    text-shadow: 0 2px 10px rgba(0,0,0,.35);
}

.dpep-v46-card-body {
    padding: 18px 18px 20px;
}

.dpep-v46-card-location {
    margin: 0 0 10px;
    color: rgba(7,29,51,.58);
    font: 800 11px/1.25 var(--dpep-v46-sans);
    letter-spacing: .09em;
    text-transform: uppercase;
}

.dpep-v46-card-price {
    margin: 0 0 8px;
    color: var(--dpep-v46-ink);
    font: 500 25px/1.05 var(--dpep-v46-serif);
}

.dpep-v46-card-body h2 {
    margin: 0 0 14px;
    font: 500 18px/1.25 var(--dpep-v46-serif);
    letter-spacing: -.02em;
}

.dpep-v46-card-body h2 a {
    color: var(--dpep-v46-ink);
    text-decoration: none;
}

.dpep-v46-card-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin: 0;
    padding: 0;
    list-style: none;
    color: rgba(7,29,51,.68);
    font-size: 12px;
}

.dpep-v46-card-specs li:not(:last-child):after {
    content: "•";
    margin-left: 14px;
    color: rgba(7,29,51,.34);
}

.dpep-v46-pagination {
    margin: 44px 0 70px;
    text-align: center;
}

.dpep-v46-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    margin: 0 4px;
    border: 1px solid rgba(7,29,51,.12);
    color: var(--dpep-v46-ink);
    text-decoration: none;
}

.dpep-v46-pagination .current {
    background: var(--dpep-v46-navy);
    color: #fff;
}

/* Magazine */
.dpep-v46-mag-feature {
    display: grid;
    grid-template-columns: .95fr 1.05fr;
    gap: 54px;
    align-items: center;
    margin: 70px 0;
    padding-bottom: 70px;
    border-bottom: 1px solid var(--dpep-v46-line);
}

.dpep-v46-mag-feature h2 {
    margin: 0 0 18px;
    font: 500 clamp(34px, 3.4vw, 54px)/1.04 var(--dpep-v46-serif);
    letter-spacing: -.04em;
}

.dpep-v46-mag-feature h2 a,
.dpep-v46-mag-card h2 a {
    color: var(--dpep-v46-ink);
    text-decoration: none;
}

.dpep-v46-mag-feature p {
    color: rgba(7,29,51,.70);
    line-height: 1.75;
}

.dpep-v46-mag-image {
    display: block;
    aspect-ratio: 1.35 / 1;
    overflow: hidden;
    background: var(--dpep-v46-stone);
}

.dpep-v46-mag-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dpep-v46-mag-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
    padding-bottom: 70px;
}

.dpep-v46-mag-card {
    border: 1px solid rgba(7,29,51,.10);
    background: #fff;
}

.dpep-v46-mag-card-body {
    padding: 20px;
}

.dpep-v46-mag-card h2 {
    margin: 0 0 12px;
    font: 500 24px/1.14 var(--dpep-v46-serif);
    letter-spacing: -.025em;
}

.dpep-v46-read {
    display: inline-flex;
    margin-top: 12px;
    color: #A98243;
    text-decoration: none;
    font-weight: 800;
}

/* Article */
.dpep-v46-article {
    max-width: 860px;
    margin: 0 auto;
    padding: 70px 0;
}

.dpep-v46-article h1 {
    margin: 0 0 22px;
    font: 500 clamp(42px, 4.4vw, 70px)/1.02 var(--dpep-v46-serif);
    letter-spacing: -.04em;
}

.dpep-v46-article-meta {
    margin-bottom: 34px;
    color: rgba(7,29,51,.56);
    font-size: 13px;
}

.dpep-v46-article-image {
    margin: 0 0 44px;
}

.dpep-v46-article-image img {
    width: 100%;
    height: auto;
}

.dpep-v46-article-content {
    color: rgba(7,29,51,.78);
    font-size: 18px;
    line-height: 1.82;
}

.dpep-v46-article-content h2,
.dpep-v46-article-content h3 {
    margin-top: 44px;
}

/* Single property */
.dpep-v46-property-single {
    background: #fff;
    padding-bottom: 70px;
}

.dpep-v46-property-hero {
    background: var(--dpep-v46-ivory);
    padding: 84px 0 46px;
}

.dpep-v46-property-top {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 54px;
    align-items: end;
}

.dpep-v46-property-top h1 {
    margin: 0 0 18px;
    font: 500 clamp(42px, 4.2vw, 68px)/1.02 var(--dpep-v46-serif);
    letter-spacing: -.04em;
}

.dpep-v46-property-top .dpep-v46-card-price {
    font-size: 34px;
}

.dpep-v46-property-gallery {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 16px;
    margin: 36px auto 52px;
}

.dpep-v46-property-gallery img {
    width: 100%;
    height: 100%;
    min-height: 320px;
    object-fit: cover;
}

.dpep-v46-property-body-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 58px;
}

.dpep-v46-panel {
    border: 1px solid rgba(7,29,51,.10);
    padding: 28px;
    background: #fff;
}

.dpep-v46-panel h2 {
    margin: 0 0 20px;
    font: 500 34px/1.1 var(--dpep-v46-serif);
}

/* Empty */
.dpep-v46-empty {
    padding: 54px;
    border: 1px solid rgba(7,29,51,.10);
    background: var(--dpep-v46-ivory);
    text-align: center;
}

/* Mobile ultra optimisé */
@media (max-width: 900px) {
    .dpep-v46-results-grid,
    .dpep-v46-mag-grid,
    .dpep-v46-mag-feature,
    .dpep-v46-property-top,
    .dpep-v46-property-gallery,
    .dpep-v46-property-body-grid {
        grid-template-columns: 1fr;
    }

    .dpep-v46-search {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 767px) {
    .dpep-v46-container {
        width: calc(100vw - 32px);
    }

    .dpep-v46-hero {
        padding: 54px 0 42px;
    }

    .dpep-v46-hero h1 {
        font-size: 39px;
        line-height: 1.04;
    }

    .dpep-v46-hero p:not(.dpep-v46-kicker) {
        font-size: 15px;
        line-height: 1.62;
    }

    .dpep-v46-buy-search-wrap {
        margin: 0 auto 34px;
    }

    .dpep-v46-search {
        grid-template-columns: 1fr;
        padding: 20px;
        gap: 14px;
        box-shadow: none;
    }

    .dpep-v46-search select,
    .dpep-v46-search button {
        min-height: 48px;
    }

    .dpep-v46-results-head {
        display: block;
        margin-bottom: 20px;
    }

    .dpep-v46-results-head h2 {
        font-size: 14px;
        line-height: 1.25;
    }

    .dpep-v46-results-grid {
        gap: 18px;
    }

    .dpep-v46-card-image {
        aspect-ratio: 1.45 / 1;
    }

    .dpep-v46-card-body {
        padding: 16px;
    }

    .dpep-v46-card-price {
        font-size: 22px;
    }

    .dpep-v46-card-body h2 {
        font-size: 19px;
    }

    .dpep-v46-card-specs {
        gap: 7px 10px;
        font-size: 12px;
    }

    .dpep-v46-card-specs li:not(:last-child):after {
        margin-left: 10px;
    }

    .dpep-v46-mag-feature {
        gap: 24px;
        margin: 36px 0;
        padding-bottom: 36px;
    }

    .dpep-v46-mag-feature h2 {
        font-size: 34px;
    }

    .dpep-v46-mag-grid {
        gap: 18px;
        padding-bottom: 42px;
    }

    .dpep-v46-article {
        padding: 42px 0;
    }

    .dpep-v46-article h1 {
        font-size: 38px;
    }

    .dpep-v46-article-content {
        font-size: 16px;
        line-height: 1.72;
    }

    .dpep-v46-property-hero {
        padding: 42px 0 30px;
    }

    .dpep-v46-property-top h1 {
        font-size: 38px;
    }

    .dpep-v46-property-gallery {
        gap: 10px;
        margin: 24px auto 34px;
    }

    .dpep-v46-property-gallery img {
        min-height: 220px;
    }

    .dpep-v46-panel {
        padding: 20px;
    }

    .dpep-v46-empty {
        padding: 32px 20px;
    }
}


/* =====================================================
   DPEP V47 — corrections après contrôle vidéo
   ===================================================== */

/* Accueil : le titre hero doit rester blanc malgré les règles globales V46. */
body.dpep-public-luxe-v45 .dpep-luxe-hero h1,
body.dpep-public-luxe-v45 .dpep-luxe-hero .dpep-luxe-kicker,
body.dpep-public-luxe-v45 .dpep-luxe-hero .dpep-luxe-lead {
    color: #fff !important;
}

/* Suppression du blanc parasite entre le menu fixe et le premier bloc public. */
body.dpep-public-luxe-v45 .dpep-v46-buy-main,
body.dpep-public-luxe-v45 .dpep-v46-archive-main,
body.dpep-public-luxe-v45 .dpep-v46-mag-main,
body.dpep-public-luxe-v45 .dpep-v46-single-main,
body.dpep-public-luxe-v45 .dpep-luxe-main,
body.dpep-public-luxe-v45 .dpep-luxe-home {
    margin-top: 0 !important;
}

body.dpep-public-luxe-v45 .main-wrap,
body.dpep-public-luxe-v45 #main-wrap,
body.dpep-public-luxe-v45 .page-wrap,
body.dpep-public-luxe-v45 .page-content-wrap {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* Accueil : respiration et lisibilité du moteur sur desktop et mobile. */
body.dpep-public-luxe-v45 .dpep-luxe-search {
    border-color: rgba(201, 163, 106, .28) !important;
}

body.dpep-public-luxe-v45 .dpep-luxe-search button {
    min-width: 150px;
}

/* Résultats Houzez : harmonisation sans supprimer les fonctionnalités natives. */
body.dpep-public-luxe-v45 .half-map-wrap,
body.dpep-public-luxe-v45 .listing-wrap,
body.dpep-public-luxe-v45 .property-listing,
body.dpep-public-luxe-v45 .search-results-wrap {
    background: #fff !important;
}

body.dpep-public-luxe-v45 .sort-by,
body.dpep-public-luxe-v45 .listing-tabs,
body.dpep-public-luxe-v45 .advanced-search-v1,
body.dpep-public-luxe-v45 .advanced-search-v2,
body.dpep-public-luxe-v45 .advanced-search-v3,
body.dpep-public-luxe-v45 .advanced-search-half-map {
    border-radius: 0 !important;
    box-shadow: none !important;
}

body.dpep-public-luxe-v45 .item-wrap,
body.dpep-public-luxe-v45 .item-wrap-v1,
body.dpep-public-luxe-v45 .item-wrap-v2,
body.dpep-public-luxe-v45 .property-card,
body.dpep-public-luxe-v45 .listing-view .item-wrap {
    border: 1px solid rgba(7,29,51,.10) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

body.dpep-public-luxe-v45 .item-wrap:hover,
body.dpep-public-luxe-v45 .property-card:hover {
    box-shadow: 0 18px 48px rgba(7,29,51,.08) !important;
}

body.dpep-public-luxe-v45 .item-title a,
body.dpep-public-luxe-v45 .property-title a {
    font-family: var(--dpep-v46-serif, "Playfair Display", Georgia, serif) !important;
    font-weight: 500 !important;
    color: #071D33 !important;
}

body.dpep-public-luxe-v45 .item-price-wrap,
body.dpep-public-luxe-v45 .item-price,
body.dpep-public-luxe-v45 .property-price {
    font-family: var(--dpep-v46-serif, "Playfair Display", Georgia, serif) !important;
    color: #071D33 !important;
    font-weight: 500 !important;
}

/* Fiche bien : on restaure le template Houzez parent, mais on le rend visuellement compatible. */
body.dpep-public-luxe-v45.single-property .property-wrap,
body.dpep-public-luxe-v45.single-property .property-detail-wrap,
body.dpep-public-luxe-v45.single-property .block-wrap {
    border-radius: 0 !important;
}

body.dpep-public-luxe-v45.single-property .property-detail-wrap,
body.dpep-public-luxe-v45.single-property .block-wrap {
    border: 1px solid rgba(7,29,51,.10) !important;
    box-shadow: none !important;
}

body.dpep-public-luxe-v45.single-property .property-banner .property-title,
body.dpep-public-luxe-v45.single-property h1 {
    color: #071D33 !important;
}

/* Mobile : éviter les débordements horizontaux vus dans la vidéo. */
@media (max-width: 767px) {
    body.dpep-public-luxe-v45 {
        overflow-x: hidden;
    }

    body.dpep-public-luxe-v45 .dpep-public-header-v45 {
        max-width: 100vw;
    }

    body.dpep-public-luxe-v45 .dpep-public-nav-v45 {
        scrollbar-width: none;
    }

    body.dpep-public-luxe-v45 .dpep-public-nav-v45::-webkit-scrollbar {
        display: none;
    }

    body.dpep-public-luxe-v45 .dpep-luxe-hero {
        min-height: auto !important;
    }

    body.dpep-public-luxe-v45 .dpep-luxe-hero h1 {
        font-size: 40px !important;
        line-height: 1.03 !important;
        color: #fff !important;
    }

    body.dpep-public-luxe-v45 .dpep-luxe-kicker,
    body.dpep-public-luxe-v45 .dpep-luxe-lead {
        color: rgba(255,255,255,.92) !important;
    }

    body.dpep-public-luxe-v45 .dpep-luxe-search {
        position: relative !important;
        left: auto !important;
        bottom: auto !important;
        transform: none !important;
        width: calc(100vw - 32px) !important;
        margin: -72px auto 30px !important;
        grid-template-columns: 1fr !important;
    }

    body.dpep-public-luxe-v45 .dpep-luxe-intro {
        padding-top: 36px !important;
    }

    body.dpep-public-luxe-v45 .half-map-left-wrap,
    body.dpep-public-luxe-v45 .half-map-right-wrap,
    body.dpep-public-luxe-v45 .half-map-wrap {
        width: 100% !important;
        max-width: 100% !important;
    }

    body.dpep-public-luxe-v45 .item-wrap,
    body.dpep-public-luxe-v45 .property-card {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

/* =====================================================
   DPEP V48 — CTA recherche gold + alignement mobile
   ===================================================== */

body.dpep-public-luxe-v45 .dpep-v46-search button,
body.dpep-public-luxe-v45 .dpep-v46-search input[type="submit"] {
    background: linear-gradient(135deg, #C9A36A, #B58A43) !important;
    border-color: #B58A43 !important;
    color: #fff !important;
}

body.dpep-public-luxe-v45 .dpep-v46-buy-search-wrap {
    margin-top: -34px;
}

@media (max-width: 767px) {
    body.dpep-public-luxe-v45 .dpep-v46-buy-search-wrap {
        margin-top: 0 !important;
    }
}

/* =====================================================
   DPEP V49 — recherche premium avec option avancée
   ===================================================== */

.dpep-v46-search > button {
    display: none !important;
}

.dpep-v46-search-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dpep-v46-search-actions button {
    width: 100%;
}

.dpep-v46-search-actions a {
    align-self: flex-end;
    color: rgba(255,255,255,.76);
    text-decoration: none;
    font-size: 12px;
}

.dpep-v46-search-actions a:after {
    content: "";
    display: inline-block;
    width: 34px;
    height: 1px;
    margin-left: 10px;
    vertical-align: middle;
    background: #C9A36A;
}

@media (max-width: 767px) {
    .dpep-v46-search-actions {
        gap: 10px;
    }

    .dpep-v46-search-actions a {
        align-self: flex-start;
    }
}
