/*
 * JouteTrack — theme-shell-topbar.css
 * Barres de titre desktop (complément de .jt-shell-topbar-mobile dans theme-shell-sidebar.css).
 */

:root {
    --jt-shell-topbar-desktop-height: 3.75rem;
}

.jt-shell-topbar-desktop {
    display: none;
}

@media (min-width: 960px) {
    .jt-shell-topbar-desktop--equipe,
    .jt-shell-topbar-desktop--mission,
    .jt-shell-topbar-desktop--partenaire {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto;
        align-items: center;
        gap: 0.75rem;
        position: fixed;
        top: 0;
        left: var(--jt-shell-sidebar-width);
        right: 0;
        z-index: 50;
        min-height: var(--jt-shell-topbar-desktop-height);
        box-sizing: border-box;
        padding: 0.65rem var(--jt-shell-inline);
        background: var(--jt-bg-darker);
        border-bottom: 1px solid var(--jt-border-solid);
    }

    .jt-shell-topbar-desktop--equipe .jt-shell-topbar-desktop-back,
    .jt-shell-topbar-desktop--mission .jt-shell-topbar-desktop-back,
    .jt-shell-topbar-desktop--partenaire .jt-shell-topbar-desktop-back {
        grid-column: 1;
        justify-self: start;
        width: 2.5rem;
        min-width: 2.5rem;
        height: 2.5rem;
        text-decoration: none;
        color: inherit;
    }

    .jt-shell-topbar-desktop--equipe .jt-shell-topbar-desktop-back:focus-visible,
    .jt-shell-topbar-desktop--mission .jt-shell-topbar-desktop-back:focus-visible,
    .jt-shell-topbar-desktop--partenaire .jt-shell-topbar-desktop-back:focus-visible {
        outline: 2px solid var(--primary-color);
        outline-offset: 2px;
    }

    .jt-shell-topbar-desktop-title {
        grid-column: 2;
        justify-self: stretch;
        min-width: 0;
        margin: 0;
        max-width: 100%;
        font-size: 1.75rem;
        font-weight: 700;
        line-height: 1;
        text-align: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        background: var(--jt-mc-grad-title);
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
    }

    .jt-shell-topbar-desktop-end {
        grid-column: 3;
        justify-self: end;
        flex: 0 0 auto;
        width: 2.5rem;
        min-width: 2.5rem;
        height: 2.5rem;
    }

    .jt-shell-main .container:has(.jt-shell-topbar-desktop--equipe),
    .jt-shell-main .container:has(.jt-shell-topbar-desktop--mission),
    .jt-shell-main .container:has(.jt-shell-topbar-desktop--partenaire) {
        padding-top: var(--jt-shell-topbar-desktop-height);
    }

    .jt-shell-main .container:has(.jt-shell-topbar-desktop--equipe) #jt-equipe-detail-title {
        display: none;
    }

    .jt-shell-main .container:has(.jt-shell-topbar-desktop--partenaire) #jt-partenaire-detail-title {
        display: none;
    }
}

@media (max-width: 959px) {
    .jt-shell-topbar-desktop {
        display: none !important;
    }
}

.jt-impersonation-banner {
    position: sticky;
    top: 0;
    z-index: 80;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    box-sizing: border-box;
    padding: 0.65rem 1rem;
    background: #7c2d12;
    color: #fff;
    border-bottom: 1px solid #9a3412;
}

.jt-impersonation-banner-text {
    margin: 0;
    font-weight: 600;
}

.jt-impersonation-banner-form {
    margin: 0;
}

.jt-impersonation-banner .btn {
    color: #fff;
    border-color: #fff;
    background: transparent;
}
