/* =====================================================
   De Pierre en Pierre — Owner Space V67
   Correction régression V66 : pas de double menu, pas de bande beige,
   détection query string + panneau autonome.
   ===================================================== */

/* Revenir à un header propre sans double compensation */
body.dpep-owner-space-v67-body,
body.dpep-owner-space-v67-body.admin-bar {
    margin: 0 !important;
    padding-top: 0 !important;
    background: #FAF7F1 !important;
}

/* Masquer toute barre admin mobile/front */
body.dpep-owner-space-v67-body #wpadminbar {
    display: none !important;
}

/* Header autonome : sticky propre, pas fixed avec padding artificiel */
body.dpep-owner-space-v67-body .dpep-owner-header-v64,
body.dpep-owner-space-v67-body .dpep-public-header-v45 {
    position: sticky !important;
    top: 0 !important;
    left: auto !important;
    right: auto !important;
    z-index: 99990 !important;
    width: 100% !important;
    margin: 0 !important;
    transform: none !important;
    background: #041C34 !important;
    color: #fff !important;
    box-shadow: 0 14px 40px rgba(4,28,52,.16) !important;
}

/* Sécurité contre le shell public injecté en doublon */
body.dpep-owner-space-v67-body > .dpep-public-header-v45:not(.dpep-owner-header-v64) {
    display: none !important;
}

/* Header desktop autonome */
body.dpep-owner-space-v67-body .dpep-public-header-top-v45 {
    min-height: 84px !important;
    padding: 0 28px !important;
    display: grid !important;
    grid-template-columns: minmax(260px, 360px) 1fr auto !important;
    gap: 20px !important;
    align-items: center !important;
    background: #041C34 !important;
    border-bottom: 1px solid rgba(255,255,255,.10) !important;
}

body.dpep-owner-space-v67-body .dpep-public-logo-v45 {
    color: #fff !important;
    text-decoration: none !important;
    text-align: left !important;
}

body.dpep-owner-space-v67-body .dpep-public-logo-v45 span {
    display: block !important;
    color: #fff !important;
    font-family: "Playfair Display", Georgia, "Times New Roman", serif !important;
    font-size: 31px !important;
    line-height: 1 !important;
    font-weight: 600 !important;
    letter-spacing: -.04em !important;
}

body.dpep-owner-space-v67-body .dpep-public-logo-v45 small {
    display: block !important;
    margin-top: 5px !important;
    color: rgba(255,255,255,.72) !important;
    font: 800 9px/1 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif !important;
    letter-spacing: .16em !important;
    text-transform: uppercase !important;
}

body.dpep-owner-space-v67-body .dpep-public-social-v45 {
    display: flex !important;
    justify-content: center !important;
    color: rgba(255,255,255,.74) !important;
    font: 800 11px/1 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif !important;
    letter-spacing: .14em !important;
    text-transform: uppercase !important;
}

body.dpep-owner-space-v67-body .dpep-public-actions-v45 {
    display: flex !important;
    justify-content: flex-end !important;
    gap: 10px !important;
}

body.dpep-owner-space-v67-body .dpep-public-action-v45 {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 42px !important;
    padding: 0 16px !important;
    color: #fff !important;
    border: 1px solid rgba(255,255,255,.26) !important;
    text-decoration: none !important;
    font: 800 11px/1 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif !important;
    letter-spacing: .10em !important;
    text-transform: uppercase !important;
}

body.dpep-owner-space-v67-body .dpep-public-action-v45.is-primary {
    background: linear-gradient(135deg, #C9A36A, #B58A43) !important;
    border-color: #B58A43 !important;
}

body.dpep-owner-space-v67-body .dpep-public-nav-v45 {
    min-height: 54px !important;
    display: flex !important;
    justify-content: center !important;
    align-items: stretch !important;
    background: #041C34 !important;
    border-bottom: 1px solid rgba(255,255,255,.08) !important;
}

body.dpep-owner-space-v67-body .dpep-public-nav-v45 a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 32px !important;
    color: #fff !important;
    text-decoration: none !important;
    font: 800 12px/1 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif !important;
    letter-spacing: .12em !important;
    text-transform: uppercase !important;
}

/* Espace contenu */
body.dpep-owner-space-v67-body .dpep-owner-main-v64 {
    margin-top: 0 !important;
    padding-top: clamp(18px, 4vw, 50px) !important;
}

/* Panneau hamburger autonome : ne dépend plus du CSS public */
body.dpep-owner-space-v67-body .dpep-mobile-state-v55 {
    position: absolute !important;
    opacity: 0 !important;
    pointer-events: none !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

body.dpep-owner-space-v67-body .dpep-mobile-panel-v55 {
    display: block !important;
    position: fixed !important;
    inset: 0 !important;
    z-index: 100500 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

body.dpep-owner-space-v67-body .dpep-mobile-state-v55:checked ~ .dpep-mobile-panel-v55 {
    visibility: visible !important;
    pointer-events: auto !important;
}

body.dpep-owner-space-v67-body .dpep-mobile-panel-backdrop-v55 {
    position: absolute !important;
    inset: 0 !important;
    z-index: 100510 !important;
    background: rgba(4, 28, 52, .55) !important;
    opacity: 0 !important;
    transition: opacity .18s ease !important;
}

body.dpep-owner-space-v67-body .dpep-mobile-state-v55:checked ~ .dpep-mobile-panel-v55 .dpep-mobile-panel-backdrop-v55 {
    opacity: 1 !important;
}

body.dpep-owner-space-v67-body .dpep-mobile-panel-inner-v55 {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    z-index: 100520 !important;
    width: min(86vw, 330px) !important;
    height: 100% !important;
    background: #041C34 !important;
    color: #fff !important;
    box-shadow: 18px 0 54px rgba(0,0,0,.24) !important;
    transform: translateX(-100%) !important;
    transition: transform .22s ease !important;
    padding: 22px 20px 28px !important;
    overflow-y: auto !important;
}

body.dpep-owner-space-v67-body .dpep-mobile-state-v55:checked ~ .dpep-mobile-panel-v55 .dpep-mobile-panel-inner-v55 {
    transform: translateX(0) !important;
}

body.dpep-owner-space-v67-body .dpep-mobile-state-v55:checked ~ .dpep-public-header-top-v45 .dpep-mobile-toggle-v54 {
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Mobile */
@media (max-width: 767px) {
    html,
    html.wp-toolbar,
    html[style],
    body.dpep-owner-space-v67-body,
    body.dpep-owner-space-v67-body.admin-bar {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

    body.dpep-owner-space-v67-body .dpep-public-header-top-v45 {
        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-owner-space-v67-body .dpep-public-social-v45,
    body.dpep-owner-space-v67-body .dpep-public-actions-v45 {
        display: none !important;
    }

    body.dpep-owner-space-v67-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;
    }

    body.dpep-owner-space-v67-body .dpep-public-logo-v45 {
        text-align: center !important;
        grid-column: 2 !important;
        min-width: 0 !important;
    }

    body.dpep-owner-space-v67-body .dpep-public-logo-v45 span {
        font-size: 22px !important;
    }

    body.dpep-owner-space-v67-body .dpep-public-logo-v45 small {
        font-size: 7px !important;
        letter-spacing: .13em !important;
    }

    body.dpep-owner-space-v67-body .dpep-mobile-spacer-v53 {
        display: block !important;
        width: 44px !important;
    }

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

    body.dpep-owner-space-v67-body .dpep-public-nav-v45 a {
        height: 50px !important;
        padding: 0 2px !important;
        font-size: 10px !important;
        letter-spacing: .07em !important;
        white-space: nowrap !important;
    }

    body.dpep-owner-space-v67-body .dpep-owner-main-v64 {
        padding-top: 14px !important;
    }

    body.dpep-owner-space-v67-body .dpep-mobile-panel-head-v55 {
        padding-top: 8px !important;
    }

    body.dpep-owner-space-v67-body .dpep-mobile-panel-head-v55 strong {
        padding-left: 0 !important;
        margin-left: 0 !important;
    }
}
