:root {

    --bg-primary: #0b1120;
    --bg-secondary: #111827;
    --bg-card: #1e293b;

    --primary: #38bdf8;
    --secondary: #2563eb;

    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;

    --border-color: #334155;
    --danger: #f87171;
    --success: #22c55e;

}

* {

    margin: 0;
    padding: 0;
    box-sizing: border-box;

}

[hidden] {

    display: none !important;

}

body {

    font-family: "Segoe UI", Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);

}

button,
input {

    font: inherit;

}

/* Page principale */

.login-page {

    position: relative;

    min-height: 100vh;
    min-height: 100dvh;

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

    padding: 30px 20px;

    overflow: hidden;

}

/* Arrière-plan */

.background-grid {

    position: absolute;
    inset: 0;

    background-image:
        linear-gradient(
            rgba(56, 189, 248, 0.035) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(56, 189, 248, 0.035) 1px,
            transparent 1px
        );

    background-size: 45px 45px;

    pointer-events: none;

}

.glow {

    position: absolute;

    width: 400px;
    height: 400px;

    border-radius: 50%;

    filter: blur(130px);

    opacity: 0.12;

    pointer-events: none;

}

.glow-one {

    top: -150px;
    left: -100px;

    background: var(--primary);

}

.glow-two {

    bottom: -150px;
    right: -100px;

    background: var(--secondary);

}

/* Conteneur */

.login-container {

    position: relative;
    z-index: 1;

    width: 100%;
    max-width: 460px;

}

/* Logo */

.logo {

    font-size: 42px;
    font-weight: 800;

    text-align: center;

    margin-bottom: 30px;

    letter-spacing: -2px;

}

.logo span {

    color: var(--primary);

}

/* Carte */

.login-card {

    background: rgba(17, 24, 39, 0.96);

    border: 1px solid var(--border-color);
    border-radius: 20px;

    padding: 40px;

    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);

}

/* Badge */

.badge {

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

    gap: 8px;

    color: var(--primary);

    font-size: 11px;
    font-weight: 600;

    letter-spacing: 2px;

    margin-bottom: 25px;

}

.status-dot {

    display: inline-block;

    width: 7px;
    height: 7px;

    border-radius: 50%;

    background: var(--success);

    box-shadow: 0 0 10px rgba(34, 197, 94, 0.5);

}

/* Icône */

.lock-icon {

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

    width: 75px;
    height: 75px;

    margin: 0 auto 25px;

    border-radius: 20px;

    background: rgba(56, 189, 248, 0.08);

    border: 1px solid rgba(56, 189, 248, 0.2);

    color: var(--primary);

}

/* Titres */

h1 {

    font-size: 30px;

    text-align: center;

    margin-bottom: 12px;

}

.description {

    color: var(--text-secondary);

    font-size: 14px;

    line-height: 1.7;

    text-align: center;

    margin-bottom: 30px;

}

/* Formulaire */

.form-group {

    margin-bottom: 20px;

}

label {

    display: block;

    font-size: 14px;
    font-weight: 500;

    margin-bottom: 10px;

}

.password-container {

    position: relative;

}

input {

    width: 100%;

    padding: 15px 85px 15px 14px;

    border-radius: 10px;

    border: 1px solid var(--border-color);

    background: var(--bg-primary);

    color: var(--text-primary);

    outline: none;

    transition: border-color 0.3s,
                box-shadow 0.3s;

}

input::placeholder {

    color: #64748b;

    font-size: 13px;

}

input:focus {

    border-color: var(--primary);

    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.1);

}

/* Afficher le mot de passe */

.toggle-password {

    position: absolute;

    top: 50%;
    right: 12px;

    transform: translateY(-50%);

    background: transparent;

    border: none;

    color: var(--text-secondary);

    cursor: pointer;

    font-size: 12px;

}

.toggle-password:hover {

    color: var(--primary);

}

/* Bouton connexion */

.login-button {

    width: 100%;

    min-height: 50px;

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

    gap: 12px;

    padding: 14px;

    border: none;
    border-radius: 10px;

    background: linear-gradient(
        135deg,
        var(--secondary),
        #0369a1
    );

    color: white;

    font-weight: 600;

    cursor: pointer;

    transition: transform 0.3s,
                box-shadow 0.3s;

}

.login-button:hover:not(:disabled) {

    transform: translateY(-2px);

    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.3);

}

.login-button:disabled {

    opacity: 0.6;

    cursor: not-allowed;

}

button:focus-visible {

    outline: 2px solid var(--primary);
    outline-offset: 4px;

}

/* Erreurs */

.error-message {

    padding: 12px;

    margin-bottom: 18px;

    border: 1px solid rgba(248, 113, 113, 0.25);

    border-radius: 8px;

    background: rgba(248, 113, 113, 0.08);

    color: var(--danger);

    font-size: 13px;

}

/* Chargement */

.spinner {

    width: 18px;
    height: 18px;

    border: 2px solid rgba(255, 255, 255, 0.3);

    border-top-color: white;

    border-radius: 50%;

    animation: spin 0.8s linear infinite;

}

@keyframes spin {

    to {

        transform: rotate(360deg);

    }

}

/* Informations */

.security-info {

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

    gap: 8px;

    margin-top: 25px;
    padding-top: 20px;

    border-top: 1px solid var(--border-color);

    color: var(--text-secondary);

    font-size: 12px;

}

/* Footer */

footer {

    margin-top: 30px;

    text-align: center;

    color: var(--text-secondary);

    font-size: 13px;

    line-height: 1.8;

}

.footer-name {

    color: var(--text-primary);

    font-size: 15px;

    font-weight: 600;

}

.copyright {

    margin-top: 10px;

    font-size: 11px;

}

/* Responsive */

@media (max-width: 480px) {

    .login-card {

        padding: 28px 20px;

    }

    .logo {

        font-size: 36px;

    }

    h1 {

        font-size: 26px;

    }

    .security-info {

        font-size: 11px;

    }

}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {

        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;

    }

}