/* ========================================================
   RÈGLE GLOBALE HIDDEN
   ======================================================== */

/*
 * Certaines classes du portail imposent un display.
 * Cette règle garantit que l'attribut HTML hidden
 * reste toujours prioritaire.
 */

[hidden] {
    display: none !important;
}


/* ========================================================
   ZONE UTILISATEUR DU HEADER
   ======================================================== */

.auth-area {
    position: relative;

    display: flex;
    align-items: center;

    min-height: 46px;
}


/* ========================================================
   BOUTON CONNEXION
   ======================================================== */

.auth-login-button {
    min-height: 42px;

    padding:
        10px
        17px;

    border: 0;

    border-radius: 11px;

    background: var(--plex);

    color: #111;

    font-size: .88rem;
    font-weight: 750;

    cursor: pointer;

    box-shadow:
        0 6px 22px
        rgba(229, 160, 13, .13);

    transition:
        transform .18s ease,
        background .18s ease,
        box-shadow .18s ease;
}


.auth-login-button:hover {
    background: #f4ae10;

    transform:
        translateY(-1px);

    box-shadow:
        0 9px 28px
        rgba(229, 160, 13, .18);
}


/* ========================================================
   UTILISATEUR CONNECTÉ
   ======================================================== */

.auth-user {
    position: relative;
}


.auth-user-trigger {
    display: flex;
    align-items: center;

    gap: 11px;

    min-height: 46px;

    padding:
        5px
        10px
        5px
        6px;

    border:
        1px solid
        rgba(255, 255, 255, .10);

    border-radius: 999px;

    background:
        rgba(255, 255, 255, .055);

    color: #fff;

    cursor: pointer;

    backdrop-filter:
        blur(12px);

    transition:
        background .18s ease,
        border-color .18s ease;
}


.auth-user-trigger:hover,
.auth-user.open
.auth-user-trigger {
    background:
        rgba(255, 255, 255, .09);

    border-color:
        rgba(255, 255, 255, .17);
}


/* ========================================================
   AVATAR
   ======================================================== */

.auth-avatar {
    width: 34px;
    height: 34px;

    flex-shrink: 0;

    overflow: hidden;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background:
        linear-gradient(
            135deg,
            rgba(229, 160, 13, .95),
            rgba(229, 160, 13, .55)
        );

    color: #111;

    font-size: .82rem;
    font-weight: 800;
}


.auth-avatar img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;
}


.auth-user-name {
    max-width: 170px;

    overflow: hidden;

    color:
        rgba(255, 255, 255, .93);

    font-size: .88rem;
    font-weight: 650;

    white-space: nowrap;
    text-overflow: ellipsis;
}


.auth-chevron {
    margin-left: 2px;

    color:
        rgba(255, 255, 255, .42);

    font-size: .68rem;

    transition:
        transform .18s ease;
}


.auth-user.open
.auth-chevron {
    transform:
        rotate(180deg);
}


/* ========================================================
   MENU UTILISATEUR
   ======================================================== */

.auth-menu {
    position: absolute;

    z-index: 100;

    top:
        calc(100% + 10px);

    right: 0;

    width: 225px;

    padding: 8px;

    border:
        1px solid
        rgba(255, 255, 255, .10);

    border-radius: 14px;

    background:
        rgba(22, 22, 22, .97);

    box-shadow:
        0 18px 50px
        rgba(0, 0, 0, .48);

    backdrop-filter:
        blur(18px);

    transform:
        translateY(-5px);

    opacity: 0;

    visibility: hidden;

    pointer-events: none;

    transition:
        opacity .16s ease,
        transform .16s ease,
        visibility .16s ease;
}


.auth-user.open
.auth-menu {
    opacity: 1;

    visibility: visible;

    pointer-events: auto;

    transform:
        translateY(0);
}


.auth-menu-profile {
    padding:
        10px
        11px
        12px;

    border-bottom:
        1px solid
        rgba(255, 255, 255, .08);
}


.auth-menu-name {
    color: #fff;

    font-size: .88rem;
    font-weight: 700;
}


.auth-menu-label {
    margin-top: 4px;

    color:
        rgba(255, 255, 255, .40);

    font-size: .72rem;
}


.auth-menu-button {
    width: 100%;

    margin-top: 6px;

    padding:
        10px
        11px;

    border: 0;

    border-radius: 9px;

    background: transparent;

    color:
        rgba(255, 255, 255, .75);

    text-align: left;

    font-size: .83rem;

    cursor: pointer;

    transition:
        background .15s ease,
        color .15s ease;
}


.auth-menu-button:hover {
    background:
        rgba(255, 255, 255, .07);

    color: #fff;
}


/* ========================================================
   MOBILE
   ======================================================== */

@media (max-width: 700px) {

    header {
        padding:
            20px
            5%;
    }


    .logo {
        font-size: 1.15rem;
    }


    .auth-login-button {
        padding:
            9px
            13px;

        font-size: .78rem;
    }


    .auth-user-name {
        display: none;
    }


    .auth-user-trigger {
        padding: 5px;
    }


    .auth-chevron {
        display: none;
    }


    .auth-menu {
        position: fixed;

        top: 72px;
        right: 16px;

        width:
            min(
                250px,
                calc(100vw - 32px)
            );
    }

}
