/* =====================================================
   TOPBAR UTILISATEUR
   ===================================================== */

.topbar-inner {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 30px;
}


.user-menu {
    display: flex;

    align-items: center;

    gap: 16px;
}


.user-identity {
    display: flex;

    align-items: center;

    gap: 9px;
}


.user-avatar {
    display: flex;

    align-items: center;

    justify-content: center;

    width: 32px;

    height: 32px;

    border-radius: 50%;

    background: #2563eb;

    color: white;

    font-size: 13px;

    font-weight: 850;
}


.user-name {
    font-size: 14px;

    font-weight: 700;
}


.topbar-link {
    color: #cbd5e1;

    text-decoration: none;

    font-size: 13px;

    font-weight: 650;
}


.topbar-link:hover {
    color: white;
}


.logout-link {
    padding-left: 15px;

    border-left:
        1px solid #374151;
}


/* =====================================================
   LOGIN
   ===================================================== */

.login-page {
    min-height: 100vh;

    display: flex;

    align-items: center;

    justify-content: center;

    padding: 25px;

    background:
        radial-gradient(
            circle at top left,
            #1d4ed8 0,
            #111827 42%,
            #070b14 100%
        );
}


.login-shell {
    width: 100%;

    max-width: 430px;
}



.login-card {
    padding: 38px;

    background: white;

    border-radius: 22px;

    box-shadow:
        0 25px 70px
        rgba(0, 0, 0, 0.28);
}


.login-icon {
    margin-bottom: 10px;

    font-size: 38px;

    text-align: center;
}


.login-card h1 {
    margin:
        0 0 28px;

    text-align: center;

    font-size: 29px;

    letter-spacing: -0.5px;
}



.login-form {
    display: flex;

    flex-direction: column;

    gap: 9px;
}


.login-form label {
    color: #374151;

    font-size: 13px;

    font-weight: 750;
}


.login-form input {
    width: 100%;

    height: 50px;

    padding:
        0 14px;

    border:
        1px solid #cbd5e1;

    border-radius: 11px;

    background: #f8fafc;

    color: #111827;

    font-family: inherit;

    font-size: 15px;

    outline: 0;
}


.login-form input:focus {
    border-color: #2563eb;

    background: white;

    box-shadow:
        0 0 0 4px
        rgba(37, 99, 235, 0.1);
}


.login-form button {
    height: 50px;

    margin-top: 8px;

    border: 0;

    border-radius: 11px;

    background: #2563eb;

    color: white;

    font-family: inherit;

    font-size: 15px;

    font-weight: 800;

    cursor: pointer;
}


.login-form button:hover {
    background: #1d4ed8;
}


.login-error {
    margin-bottom: 18px;

    padding:
        11px 13px;

    border:
        1px solid #fecaca;

    border-radius: 9px;

    background: #fef2f2;

    color: #b91c1c;

    text-align: center;

    font-size: 13px;

    font-weight: 650;
}


/* =====================================================
   ADMIN
   ===================================================== */

.admin-page {
    max-width: 1000px;

    margin: auto;
}


.admin-layout {
    display: flex;

    flex-direction: column;

    gap: 22px;
}


.admin-card {
    padding: 24px;

    background: white;

    border:
        1px solid #e2e8f0;

    border-radius: 16px;
}


.admin-card h2 {
    margin:
        0 0 20px;

    font-size: 19px;
}


.admin-card-header {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 20px;

    margin-bottom: 17px;
}


.admin-card-header h2 {
    margin: 0;
}


.admin-card-header span {
    color: #64748b;

    font-size: 13px;
}


/* =====================================================
   FORM USER
   ===================================================== */

.create-user-form {
    display: grid;

    grid-template-columns:
        1fr
        1fr
        auto;

    align-items: end;

    gap: 14px;
}


.form-field {
    display: flex;

    flex-direction: column;

    gap: 6px;
}


.form-field label {
    color: #475569;

    font-size: 12px;

    font-weight: 750;
}


.form-field input {
    height: 43px;

    padding:
        0 12px;

    border:
        1px solid #cbd5e1;

    border-radius: 9px;

    background: #f8fafc;

    font-family: inherit;

    outline: 0;
}


.form-field input:focus {
    border-color: #2563eb;

    background: white;
}


.create-user-button {
    height: 43px;

    padding:
        0 18px;

    border: 0;

    border-radius: 9px;

    background: #2563eb;

    color: white;

    font-family: inherit;

    font-weight: 800;

    cursor: pointer;
}


.create-user-button:hover {
    background: #1d4ed8;
}


/* =====================================================
   USER LIST
   ===================================================== */

.users-list {
    border:
        1px solid #e5e7eb;

    border-radius: 12px;

    overflow: hidden;
}


.admin-user-row {
    display: grid;

    grid-template-columns:
        44px
        1fr
        1fr
        auto;

    align-items: center;

    gap: 13px;

    padding:
        15px 17px;

    border-bottom:
        1px solid #edf0f2;
}


.admin-user-row:last-child {
    border-bottom: 0;
}


.admin-user-avatar {
    display: flex;

    align-items: center;

    justify-content: center;

    width: 38px;

    height: 38px;

    border-radius: 50%;

    background: #e0e7ff;

    color: #3730a3;

    font-size: 14px;

    font-weight: 850;
}


.admin-user-info {
    display: flex;

    flex-direction: column;

    gap: 2px;
}


.admin-user-info strong {
    font-size: 14px;
}


.admin-user-info span {
    color: #64748b;

    font-size: 12px;
}


.admin-user-meta {
    display: flex;

    align-items: center;

    gap: 10px;

    color: #64748b;

    font-size: 12px;
}


.admin-badge {
    padding:
        4px 7px;

    border-radius: 6px;

    background: #ede9fe;

    color: #6d28d9;

    font-weight: 800;
}


.user-toggle-button {
    min-width: 88px;

    height: 34px;

    padding:
        0 10px;

    border-radius: 7px;

    font-family: inherit;

    font-size: 12px;

    font-weight: 750;

    cursor: pointer;
}


.user-toggle-button.disable {
    border:
        1px solid #fecaca;

    background: #fff;

    color: #b91c1c;
}


.user-toggle-button.enable {
    border:
        1px solid #86efac;

    background: #f0fdf4;

    color: #166534;
}


.user-disabled {
    opacity: 0.5;
}


/* =====================================================
   RESPONSIVE
   ===================================================== */

@media (
    max-width: 700px
) {

    .user-name {
        display: none;
    }


    .topbar-link {
        font-size: 12px;
    }


    .login-card {
        padding:
            30px 22px;
    }


    .create-user-form {
        grid-template-columns:
            1fr;
    }


    .admin-user-row {
        grid-template-columns:
            40px
            1fr
            auto;
    }


    .admin-user-meta {
        grid-column:
            2 / -1;
    }

}
/* =====================================================
   THÈME MICROSOFT 365
   ===================================================== */

.login-page {
    background:
        radial-gradient(circle at 10% 8%, rgba(41, 171, 226, 0.92), transparent 34%),
        radial-gradient(circle at 84% 12%, rgba(163, 73, 216, 0.82), transparent 34%),
        radial-gradient(circle at 80% 88%, rgba(255, 112, 76, 0.72), transparent 38%),
        linear-gradient(135deg, #075985 0%, #4c1d95 52%, #111827 100%);
}

.login-card {
    border: 1px solid rgba(255, 255, 255, 0.65);
    box-shadow: 0 28px 80px rgba(36, 28, 94, 0.30);
}

.login-form input:focus {
    border-color: #5b5fc7;
    box-shadow: 0 0 0 4px rgba(91, 95, 199, 0.12);
}

.login-form button,
.create-user-button {
    background: linear-gradient(100deg, #0f6cbd, #5b5fc7);
}

.login-form button:hover,
.create-user-button:hover {
    background: linear-gradient(100deg, #115ea3, #4a4fb5);
}

.user-avatar {
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.topbar-link {
    color: rgba(255, 255, 255, 0.82);
}

.topbar-link:hover {
    color: #ffffff;
}

.logout-link {
    border-left-color: rgba(255, 255, 255, 0.24);
}
