/* =====================================================
   De Pierre en Pierre — Mobile Menu V53
   ===================================================== */

/* Mobile public : on masque la barre admin WordPress blanche qui crée le décalage. */
@media (max-width: 767px) {
    html.wp-toolbar,
    html.wp-toolbar body,
    html[style*="margin-top"] {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

    body.dpep-public-luxe-v45.admin-bar {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

    body.dpep-public-luxe-v45.admin-bar #wpadminbar {
        display: none !important;
    }

    body.dpep-public-luxe-v45 .dpep-public-header-v45,
    body.dpep-public-luxe-v45.admin-bar .dpep-public-header-v45 {
        position: sticky !important;
        top: 0 !important;
        z-index: 99999 !important;
        margin: 0 !important;
    }

    body.dpep-public-luxe-v45 .dpep-public-header-top-v45 {
        width: 100% !important;
        min-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-public-luxe-v45 .dpep-public-social-v45,
    body.dpep-public-luxe-v45 .dpep-public-actions-v45,
    body.dpep-public-luxe-v45 .dpep-public-mobile-menu-v49,
    body.dpep-public-luxe-v45 .dpep-public-mobile-account-v49 {
        display: none !important;
    }

    body.dpep-public-luxe-v45 .dpep-mobile-toggle-v53 {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 40px !important;
        height: 38px !important;
        padding: 0 !important;
        margin: 0 !important;
        border: 1px solid rgba(255,255,255,.28) !important;
        border-radius: 0 !important;
        background: transparent !important;
        color: #fff !important;
        font-size: 20px !important;
        line-height: 1 !important;
        cursor: pointer !important;
        position: relative !important;
        z-index: 100002 !important;
        pointer-events: auto !important;
        -webkit-tap-highlight-color: transparent;
    }

    body.dpep-public-luxe-v45 .dpep-public-logo-v45 {
        min-width: 0 !important;
        text-align: center !important;
        overflow: hidden !important;
    }

    body.dpep-public-luxe-v45 .dpep-public-logo-v45 span {
        font-size: 22px !important;
        line-height: 1 !important;
        white-space: nowrap !important;
    }

    body.dpep-public-luxe-v45 .dpep-public-logo-v45 small {
        margin-top: 3px !important;
        font-size: 7px !important;
        letter-spacing: .13em !important;
        white-space: nowrap !important;
    }

    body.dpep-public-luxe-v45 .dpep-mobile-spacer-v53 {
        display: block !important;
        width: 44px !important;
        height: 1px !important;
    }

    body.dpep-public-luxe-v45 .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;
        border-top: 1px solid rgba(255,255,255,.10) !important;
    }

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

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

/* Desktop : le nouveau bouton/panneau mobile n'existe pas visuellement. */
@media (min-width: 768px) {
    .dpep-mobile-toggle-v53,
    .dpep-mobile-spacer-v53,
    .dpep-mobile-panel-v53 {
        display: none !important;
    }
}

/* Panneau mobile robuste */
.dpep-mobile-panel-v53 {
    display: none;
}

@media (max-width: 767px) {
    .dpep-mobile-panel-v53 {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 100000;
        visibility: hidden;
        pointer-events: none;
    }

    body.dpep-mobile-panel-open-v53 .dpep-mobile-panel-v53 {
        visibility: visible;
        pointer-events: auto;
    }

    .dpep-mobile-panel-backdrop-v53 {
        position: absolute;
        inset: 0;
        background: rgba(4, 28, 52, .55);
        opacity: 0;
        transition: opacity .18s ease;
    }

    body.dpep-mobile-panel-open-v53 .dpep-mobile-panel-backdrop-v53 {
        opacity: 1;
    }

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

    body.dpep-mobile-panel-open-v53 .dpep-mobile-panel-inner-v53 {
        transform: translateX(0);
    }

    .dpep-mobile-panel-head-v53 {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        padding-bottom: 18px;
        border-bottom: 1px solid rgba(255,255,255,.16);
    }

    .dpep-mobile-panel-head-v53 strong {
        font-family: "Playfair Display", Georgia, serif;
        font-size: 26px;
        font-weight: 500;
        line-height: 1;
    }

    .dpep-mobile-panel-close-v53 {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 38px;
        height: 38px;
        padding: 0;
        color: #fff;
        border: 1px solid rgba(255,255,255,.28);
        background: transparent;
        border-radius: 0;
        text-decoration: none;
        font-size: 28px;
        line-height: 1;
        cursor: pointer;
    }

    .dpep-mobile-panel-links-v53 {
        padding-top: 16px;
    }

    .dpep-mobile-panel-links-v53 a {
        display: flex;
        align-items: center;
        min-height: 48px;
        color: rgba(255,255,255,.88);
        border-bottom: 1px solid rgba(255,255,255,.10);
        text-decoration: none;
        font: 700 13px/1.2 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
        letter-spacing: .06em;
        text-transform: uppercase;
    }

    .dpep-mobile-panel-links-v53 a:first-child {
        color: #fff;
    }

    .dpep-mobile-panel-cta-v53 {
        margin-top: 14px;
        justify-content: center;
        min-height: 46px !important;
        background: linear-gradient(135deg, #C9A36A, #B58A43);
        border-bottom: 0 !important;
        color: #fff !important;
    }
}
