/* =====================================================
   De Pierre en Pierre — Dashboard Shell V60
   Remplace le shell Houzez dashboard sur Mes annonces.
   ===================================================== */

body.dpep-dashboard-shell-v60-body,
body.dpep-dashboard-shell-v60-body.houzez-dashboard-body {
    margin: 0 !important;
    padding: 0 !important;
    background: #FAF7F1 !important;
    color: #071D33 !important;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif !important;
}

/* Masquer les restes éventuels du dashboard Houzez */
body.dpep-dashboard-shell-v60-body .dashboard-header-wrap,
body.dpep-dashboard-shell-v60-body .dashboard-header-main-wrap,
body.dpep-dashboard-shell-v60-body .dashboard-side-wrap,
body.dpep-dashboard-shell-v60-body .dashboard-sidebar,
body.dpep-dashboard-shell-v60-body .dashboard-topbar,
body.dpep-dashboard-shell-v60-body .dashboard-mobile-header,
body.dpep-dashboard-shell-v60-body .dashboard-menu,
body.dpep-dashboard-shell-v60-body .board-panel-menu,
body.dpep-dashboard-shell-v60-body .user-dashboard-left {
    display: none !important;
}

.dpep-dashboard-shell-v60 {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(201,163,106,.10), transparent 34%),
        #FAF7F1;
}

.dpep-dashboard-header-v60 {
    position: sticky;
    top: 0;
    z-index: 9999;
    display: grid;
    grid-template-columns: minmax(240px, 340px) 1fr;
    align-items: stretch;
    background: #041C34;
    color: #fff;
    box-shadow: 0 14px 42px rgba(4,28,52,.14);
}

.dpep-dashboard-brand-v60 {
    display: flex;
    align-items: center;
    padding: 20px 28px;
    border-right: 1px solid rgba(255,255,255,.10);
}

.dpep-dashboard-brand-v60 a {
    color: #fff !important;
    text-decoration: none !important;
}

.dpep-dashboard-brand-v60 span {
    display: block;
    font-family: "Playfair Display", Georgia, "Times New Roman", serif;
    font-size: 30px;
    line-height: 1;
    font-weight: 600;
    letter-spacing: -.04em;
}

.dpep-dashboard-brand-v60 small {
    display: block;
    margin-top: 4px;
    color: rgba(255,255,255,.76);
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.dpep-dashboard-nav-v60 {
    display: flex;
    justify-content: flex-end;
    align-items: stretch;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.dpep-dashboard-nav-v60::-webkit-scrollbar {
    display: none;
}

.dpep-dashboard-nav-v60 a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 78px;
    padding: 0 18px;
    color: rgba(255,255,255,.78) !important;
    text-decoration: none !important;
    white-space: nowrap;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .10em;
    text-transform: uppercase;
    border-left: 1px solid rgba(255,255,255,.08);
}

.dpep-dashboard-nav-v60 a:hover {
    color: #fff !important;
    background: rgba(255,255,255,.06);
}

.dpep-dashboard-nav-v60 a.is-gold {
    background: linear-gradient(135deg, #C9A36A, #B58A43);
    color: #fff !important;
    border-left: 0;
}

.dpep-dashboard-page-v60 {
    min-height: calc(100vh - 78px);
}

body.dpep-dashboard-shell-v60-body .dashboard-right,
body.dpep-dashboard-shell-v60-body .dashboard-content,
body.dpep-dashboard-shell-v60-body .dashboard-right.dpep-dashboard-properties-v59,
body.dpep-dashboard-shell-v60-body .dpep-dashboard-properties-v60,
body.dpep-dashboard-shell-v60-body .dpep-v59-content {
    margin: 0 !important;
    margin-left: 0 !important;
    width: 100% !important;
    max-width: none !important;
    min-height: 0 !important;
}

/* On supprime l’espace prévu par l’ancien sidebar dashboard. */
body.dpep-dashboard-shell-v60-body .dashboard-right {
    padding-left: 0 !important;
    left: auto !important;
    right: auto !important;
    position: relative !important;
}

/* Ajustement du template V59 dans le nouveau shell */
body.dpep-dashboard-shell-v60-body .dpep-v59-content {
    padding: clamp(18px, 4vw, 46px) !important;
}

body.dpep-dashboard-shell-v60-body .dpep-v59-hero {
    margin-top: 0 !important;
}

/* Mobile */
@media (max-width: 900px) {
    .dpep-dashboard-header-v60 {
        grid-template-columns: 1fr;
    }

    .dpep-dashboard-brand-v60 {
        justify-content: center;
        text-align: center;
        padding: 18px 14px 14px;
        border-right: 0;
        border-bottom: 1px solid rgba(255,255,255,.10);
    }

    .dpep-dashboard-brand-v60 span {
        font-size: 26px;
    }

    .dpep-dashboard-brand-v60 small {
        font-size: 8px;
    }

    .dpep-dashboard-nav-v60 {
        justify-content: flex-start;
    }

    .dpep-dashboard-nav-v60 a {
        min-height: 48px;
        padding: 0 14px;
        font-size: 10px;
        letter-spacing: .08em;
    }
}

@media (max-width: 767px) {
    body.dpep-dashboard-shell-v60-body .dpep-v59-content {
        padding: 14px !important;
    }

    .dpep-dashboard-page-v60 {
        min-height: auto;
    }

    .dpep-dashboard-nav-v60 {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        overflow: visible;
    }

    .dpep-dashboard-nav-v60 a {
        padding: 0 4px;
        font-size: 9px;
        letter-spacing: .05em;
        text-align: center;
    }

    .dpep-dashboard-nav-v60 a:nth-child(n+4) {
        display: none;
    }
}


/* =====================================================
   DPEP V61 — Dashboard utilise le même header que le site public
   ===================================================== */

body.dpep-dashboard-shell-v61-body,
body.dpep-dashboard-shell-v61-body.dpep-public-luxe-v45 {
    padding-top: 0 !important;
    background: #FAF7F1 !important;
}

/* Le nouveau header dashboard dédié V60 est neutralisé si présent. */
body.dpep-dashboard-shell-v61-body .dpep-dashboard-header-v60,
body.dpep-dashboard-shell-v61-body .dpep-dashboard-nav-v60,
body.dpep-dashboard-shell-v61-body .dpep-dashboard-brand-v60 {
    display: none !important;
}

/* Le header public est volontairement réutilisé dans le dashboard. */
body.dpep-dashboard-shell-v61-body .dpep-dashboard-public-header-v61,
body.dpep-dashboard-shell-v61-body .dpep-public-header-v45 {
    position: sticky !important;
    top: 0 !important;
    z-index: 99999 !important;
    margin: 0 !important;
    width: 100% !important;
    display: block !important;
}

/* Pas de décalage ancien dashboard */
body.dpep-dashboard-shell-v61-body .dpep-dashboard-page-v61,
body.dpep-dashboard-shell-v61-body .dpep-dashboard-page-v60,
body.dpep-dashboard-shell-v61-body .dashboard-right,
body.dpep-dashboard-shell-v61-body .dashboard-content {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Même panneau mobile que le public, mais dans le dashboard */
body.dpep-dashboard-shell-v61-body .dpep-mobile-panel-v55 {
    display: block !important;
}

/* Desktop dashboard : garder le header public propre */
@media (min-width: 768px) {
    body.dpep-dashboard-shell-v61-body .dpep-mobile-state-v55,
    body.dpep-dashboard-shell-v61-body .dpep-mobile-toggle-v54,
    body.dpep-dashboard-shell-v61-body .dpep-mobile-spacer-v53,
    body.dpep-dashboard-shell-v61-body .dpep-mobile-panel-v55 {
        display: none !important;
    }

    body.dpep-dashboard-shell-v61-body .dpep-public-header-top-v45 {
        min-height: 84px !important;
    }

    body.dpep-dashboard-shell-v61-body .dpep-public-nav-v45 {
        min-height: 54px !important;
    }
}

/* Mobile : forcer exactement le même comportement que la page principale */
@media (max-width: 767px) {
    body.dpep-dashboard-shell-v61-body,
    body.dpep-dashboard-shell-v61-body.admin-bar,
    html,
    html.wp-toolbar,
    html[style],
    body.admin-bar {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

    body.dpep-dashboard-shell-v61-body #wpadminbar {
        display: none !important;
    }

    body.dpep-dashboard-shell-v61-body .dpep-public-header-top-v45 {
        width: 100% !important;
        min-height: 66px !important;
        height: 66px !important;
        padding: 0 12px !important;
        display: grid !important;
        grid-template-columns: 44px minmax(0, 1fr) 44px !important;
        gap: 8px !important;
        align-items: center !important;
    }

    body.dpep-dashboard-shell-v61-body .dpep-public-social-v45,
    body.dpep-dashboard-shell-v61-body .dpep-public-actions-v45 {
        display: none !important;
    }

    body.dpep-dashboard-shell-v61-body .dpep-mobile-toggle-v54 {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 40px !important;
        height: 38px !important;
        border: 1px solid rgba(255,255,255,.30) !important;
        color: #fff !important;
        background: transparent !important;
        font-size: 20px !important;
        cursor: pointer !important;
        z-index: 100002 !important;
    }

    body.dpep-dashboard-shell-v61-body .dpep-public-logo-v45 {
        text-align: center !important;
        min-width: 0 !important;
    }

    body.dpep-dashboard-shell-v61-body .dpep-public-logo-v45 span {
        font-size: 22px !important;
        line-height: 1 !important;
    }

    body.dpep-dashboard-shell-v61-body .dpep-public-logo-v45 small {
        font-size: 7px !important;
        letter-spacing: .13em !important;
    }

    body.dpep-dashboard-shell-v61-body .dpep-mobile-spacer-v53 {
        display: block !important;
        width: 44px !important;
    }

    body.dpep-dashboard-shell-v61-body .dpep-public-nav-v45 {
        min-height: 50px !important;
        height: 50px !important;
        display: grid !important;
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
    }

    body.dpep-dashboard-shell-v61-body .dpep-public-nav-v45 a {
        height: 50px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0 2px !important;
        font-size: 10px !important;
        letter-spacing: .07em !important;
        color: #fff !important;
        white-space: nowrap !important;
    }
}
