/* PRIVATE EVENTS V99.58
   Desktop Shell V1 — navigation latérale commune à toutes les pages membre.
   Mobile/tablette < 1200 px : aucun changement de composition.
*/

.v9958-desktop-sidebar {
    display: none;
}

@media (min-width: 1200px) {
    body.pe-v9958-desktop-shell {
        --pe-v9958-sidebar-width: 248px;
        min-width: 0;
        min-height: 100vh;
        padding-left: var(--pe-v9958-sidebar-width) !important;
        overflow-x: hidden;
        box-sizing: border-box;
    }

    body.pe-v9958-desktop-shell > .v73-member-topbar,
    body.pe-v9958-desktop-shell > .pe-v9930-theme-mobile-source,
    body.pe-v9958-desktop-shell > .v82-mobile-app-nav {
        display: none !important;
    }

    .v9958-desktop-sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 520;
        width: var(--pe-v9958-sidebar-width);
        height: 100vh;
        display: flex;
        flex-direction: column;
        gap: 14px;
        padding: 22px 14px 18px;
        overflow-x: hidden;
        overflow-y: auto;
        box-sizing: border-box;
        border-right: 1px solid rgba(226, 147, 184, .18);
        background:
            radial-gradient(circle at 18% 0%, rgba(157, 49, 101, .17), transparent 34%),
            linear-gradient(180deg, rgba(35, 17, 29, .985), rgba(17, 10, 16, .995));
        box-shadow: 18px 0 44px rgba(0, 0, 0, .16);
        color: #fff3f8;
    }

    .v9958-desktop-brand {
        display: grid;
        gap: 3px;
        padding: 2px 10px 8px;
        color: inherit;
        text-decoration: none;
    }

    .v9958-desktop-brand > span {
        color: #fff5fa;
        font-size: 1rem;
        font-weight: 900;
        letter-spacing: .20em;
        white-space: nowrap;
    }

    .v9958-desktop-brand > small {
        color: #c896ad;
        font-family: Georgia, "Times New Roman", serif;
        font-size: .78rem;
        font-style: italic;
    }

    .v9958-desktop-profile {
        display: grid;
        grid-template-columns: 46px minmax(0, 1fr);
        align-items: center;
        gap: 10px;
        padding: 10px;
        border: 1px solid rgba(225, 145, 183, .20);
        border-radius: 15px;
        background: rgba(255, 255, 255, .035);
        color: inherit;
        text-decoration: none;
        transition: border-color .18s ease, background-color .18s ease, transform .18s ease;
    }

    .v9958-desktop-profile:hover,
    .v9958-desktop-profile:focus-visible,
    .v9958-desktop-profile.active {
        border-color: rgba(238, 164, 199, .42);
        background: rgba(255, 255, 255, .055);
        outline: none;
    }

    .v9958-desktop-profile:hover,
    .v9958-desktop-profile:focus-visible {
        transform: translateY(-1px);
    }

    .v9958-desktop-profile.active {
        box-shadow: inset 3px 0 0 #d45d98;
    }

    .v9958-desktop-avatar {
        width: 46px;
        height: 46px;
        display: grid;
        place-items: center;
        border-radius: 50%;
        object-fit: cover;
        border: 1px solid rgba(242, 173, 207, .48);
        background: linear-gradient(145deg, #ac4777, #712b52);
        color: #fff;
        font-size: .95rem;
        font-weight: 900;
        box-shadow: 0 7px 18px rgba(0, 0, 0, .24);
    }

    .v9958-desktop-profile-copy {
        min-width: 0;
        display: grid;
        gap: 2px;
    }

    .v9958-desktop-profile-copy strong {
        overflow: hidden;
        color: #fff3f8;
        font-size: .92rem;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .v9958-desktop-profile-copy small {
        color: #b79aa8;
        font-size: .70rem;
    }

    .v9958-desktop-nav {
        display: grid;
        gap: 5px;
    }

    .v9958-desktop-nav-secondary {
        margin-top: 1px;
        padding-top: 13px;
        border-top: 1px solid rgba(220, 145, 181, .13);
    }

    .v9958-desktop-nav a,
    .v9958-desktop-context-back,
    .v9958-desktop-logout,
    .v9958-desktop-theme-toggle {
        position: relative;
        min-height: 42px;
        display: grid;
        grid-template-columns: 22px minmax(0, 1fr) auto;
        align-items: center;
        gap: 9px;
        padding: 8px 10px;
        border: 1px solid transparent;
        border-radius: 11px;
        background: transparent;
        color: rgba(233, 214, 224, .78);
        text-decoration: none;
        font: inherit;
        font-size: .82rem;
        font-weight: 720;
        line-height: 1.15;
        text-align: left;
        cursor: pointer;
        box-sizing: border-box;
        transition: background-color .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
    }

    .v9958-desktop-nav a svg,
    .v9958-desktop-context-back svg,
    .v9958-desktop-logout svg {
        width: 20px;
        height: 20px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.75;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .v9958-desktop-nav a:hover,
    .v9958-desktop-nav a:focus-visible,
    .v9958-desktop-context-back:hover,
    .v9958-desktop-context-back:focus-visible,
    .v9958-desktop-logout:hover,
    .v9958-desktop-logout:focus-visible,
    .v9958-desktop-theme-toggle:hover,
    .v9958-desktop-theme-toggle:focus-visible {
        transform: translateX(2px);
        border-color: rgba(226, 147, 184, .18);
        background: rgba(255, 255, 255, .045);
        color: #fff5fa;
        outline: none;
    }

    .v9958-desktop-nav a.active {
        border-color: rgba(231, 151, 190, .30);
        background: linear-gradient(90deg, rgba(166, 53, 105, .24), rgba(128, 41, 83, .08));
        color: #ffdcec;
        box-shadow: inset 3px 0 0 #d45d98;
    }

    .v9958-desktop-badge {
        min-width: 21px;
        height: 21px;
        display: inline-grid;
        place-items: center;
        padding: 0 6px;
        border-radius: 999px;
        background: #cc3f78;
        color: #fff;
        font-size: .66rem;
        line-height: 1;
        box-sizing: border-box;
    }

    .v9958-desktop-context-back {
        grid-template-columns: 22px minmax(0, 1fr);
        margin-top: 1px;
        border-color: rgba(226, 147, 184, .10);
        background: rgba(255, 255, 255, .018);
    }

    .v9958-desktop-sidebar-footer {
        margin-top: auto;
        display: grid;
        gap: 6px;
        padding-top: 13px;
        border-top: 1px solid rgba(220, 145, 181, .13);
    }

    .v9958-desktop-theme-toggle {
        width: 100%;
        height: auto;
    }

    .v9958-desktop-theme-toggle .pe-v9930-theme-icon {
        position: relative;
        inset: auto;
        width: 20px;
        height: 20px;
        grid-column: 1;
        grid-row: 1;
    }

    .v9958-desktop-theme-toggle > span:last-child {
        grid-column: 2;
    }

    .v9958-desktop-logout {
        grid-template-columns: 22px minmax(0, 1fr);
    }

    /* V99.57 avait sa propre sidebar Accueil. Le shell V99.58 devient l'unique source. */
    body.pe-v9958-desktop-shell .v9957-desktop-layout {
        display: block !important;
        min-height: 0 !important;
    }

    body.pe-v9958-desktop-shell .v9957-desktop-sidebar {
        display: none !important;
    }

    body.pe-v9958-desktop-shell .v980-home-shell {
        width: min(1380px, calc(100% - 72px));
        margin-inline: auto;
    }

    /* Le shell gère la navigation PC : la navigation mobile reste intacte sous 1200 px. */
    body.pe-v9958-desktop-shell .v82-mobile-app-nav {
        display: none !important;
    }

    html[data-theme="light"] .v9958-desktop-sidebar {
        border-right-color: rgba(108, 67, 84, .18);
        background:
            radial-gradient(circle at 20% 0%, rgba(196, 50, 116, .10), transparent 36%),
            linear-gradient(180deg, #fffaf7, #f4e7e7);
        box-shadow: 16px 0 38px rgba(77, 48, 60, .08);
        color: #2d2027;
    }

    html[data-theme="light"] .v9958-desktop-brand > span,
    html[data-theme="light"] .v9958-desktop-profile-copy strong {
        color: #2d2027;
    }

    html[data-theme="light"] .v9958-desktop-brand > small {
        color: #9b5875;
    }

    html[data-theme="light"] .v9958-desktop-profile {
        border-color: rgba(108, 67, 84, .18);
        background: rgba(255, 255, 255, .55);
    }

    html[data-theme="light"] .v9958-desktop-profile-copy small {
        color: #806d76;
    }

    html[data-theme="light"] .v9958-desktop-nav-secondary,
    html[data-theme="light"] .v9958-desktop-sidebar-footer {
        border-top-color: rgba(108, 67, 84, .13);
    }

    html[data-theme="light"] .v9958-desktop-nav a,
    html[data-theme="light"] .v9958-desktop-context-back,
    html[data-theme="light"] .v9958-desktop-logout,
    html[data-theme="light"] .v9958-desktop-theme-toggle {
        color: #65535c;
    }

    html[data-theme="light"] .v9958-desktop-nav a:hover,
    html[data-theme="light"] .v9958-desktop-nav a:focus-visible,
    html[data-theme="light"] .v9958-desktop-context-back:hover,
    html[data-theme="light"] .v9958-desktop-context-back:focus-visible,
    html[data-theme="light"] .v9958-desktop-logout:hover,
    html[data-theme="light"] .v9958-desktop-logout:focus-visible,
    html[data-theme="light"] .v9958-desktop-theme-toggle:hover,
    html[data-theme="light"] .v9958-desktop-theme-toggle:focus-visible {
        border-color: rgba(108, 67, 84, .18);
        background: rgba(255, 255, 255, .72);
        color: #2d2027;
    }

    html[data-theme="light"] .v9958-desktop-nav a.active,
    html[data-theme="light"] .v9958-desktop-profile.active {
        border-color: rgba(176, 49, 107, .24);
        background: linear-gradient(90deg, rgba(190, 42, 111, .13), rgba(190, 42, 111, .04));
        color: #7f1749;
        box-shadow: inset 3px 0 0 #c52b70;
    }

    html[data-theme="light"] .v9958-desktop-context-back {
        border-color: rgba(108, 67, 84, .10);
        background: rgba(255, 255, 255, .30);
    }
}

@media (min-width: 1400px) {
    body.pe-v9958-desktop-shell {
        --pe-v9958-sidebar-width: 272px;
    }

    .v9958-desktop-sidebar {
        padding: 26px 18px 20px;
        gap: 17px;
    }

    .v9958-desktop-nav a,
    .v9958-desktop-context-back,
    .v9958-desktop-logout,
    .v9958-desktop-theme-toggle {
        min-height: 44px;
        font-size: .86rem;
    }
}
