/* css/login.css */

/* Réinitialisation et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.login-page {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #2e1a1a 100%); /* Dégradé sombre avec touche rouge */
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

/* Fond de particules */
#particles-js {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Boîte de login */
.login-box {
    background: rgba(10, 10, 20, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 2.5rem;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 8px 32px rgba(244, 68, 68, 0.3);
    z-index: 2;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(244, 68, 68, 0.2);
}

/* Titre et sous-titre */
.login-title {
    font-family: 'Orbitron', sans-serif;
    color: #F44444;
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 10px rgba(244, 68, 68, 0.5);
}

.login-subtitle {
    color: #b0b0cc;
    font-size: 1rem;
    text-align: center;
    margin-bottom: 1.5rem;
}

/* Message d'erreur */
.error-message {
    background: #D32F2F;
    color: #fff;
    padding: 0.75rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 0.9rem;
    animation: slideIn 0.5s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Formulaire */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.input-group {
    position: relative;
}

input[type="email"],
input[type="password"] {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input:focus {
    outline: none;
    border-color: #F44444;
    box-shadow: 0 0 8px rgba(244, 68, 68, 0.5);
}

.input-label {
    position: absolute;
    top: 50%;
    left: 1rem;
    transform: translateY(-50%);
    color: #b0b0cc;
    font-size: 0.9rem;
    pointer-events: none;
    transition: all 0.3s ease;
}

input:focus + .input-label,
input:not(:placeholder-shown) + .input-label {
    top: -0.5rem;
    left: 0.75rem;
    font-size: 0.75rem;
    color: #F44444;
    background: rgba(10, 10, 20, 0.9);
    padding: 0 0.25rem;
}

/* Bouton */
.login-button {
    background: linear-gradient(90deg, #F44444, #FF6666);
    border: none;
    border-radius: 8px;
    padding: 0.75rem;
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.login-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(244, 68, 68, 0.7);
}

.login-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transition: 0.5s;
}

.login-button:hover::before {
    left: 100%;
}

/* Lien mot de passe oublié */
.forgot-password {
    text-align: center;
    margin-top: 1rem;
}

.forgot-link {
    color: #F44444;
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.3s ease;
}

.forgot-link:hover {
    color: #FF6666;
    text-decoration: underline;
}

/* Version en bas à droite */
.version-info {
    position: fixed;
    bottom: 10px;
    right: 10px;
    font-size: 12px;
    color: white;
    opacity: 0.5;
    font-family: 'Roboto', sans-serif;
}

/* Responsive */
@media (max-width: 768px) {
    .login-box {
        max-width: 90%;
        padding: 2rem;
    }

    .login-title {
        font-size: 2rem;
    }

    .login-subtitle {
        font-size: 0.9rem;
    }

    input[type="email"],
    input[type="password"] {
        font-size: 0.9rem;
    }

    .login-button {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .login-box {
        padding: 1.5rem;
    }

    .login-title {
        font-size: 1.8rem;
    }

    .error-message {
        font-size: 0.8rem;
    }

    /* Réduire le nombre de particules pour performances sur mobile */
    #particles-js canvas {
        transform: scale(0.8);
    }
}

