/* ========================================
   Styles de l'authentification
   ======================================== */

/* Écran de connexion */
.login-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0000FF;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.login-screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../assets/images/pattern.svg');
    background-size: cover;
    background-position: center;
    opacity: 1;
    z-index: 1;
}

.login-screen.visible {
    opacity: 1;
    visibility: visible;
}

.login-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

/* Container du formulaire */
.login-container {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    max-width: 450px;
    width: 90%;
    animation: slideUp 0.5s ease;
    position: relative;
    z-index: 2;
    backdrop-filter: blur(10px);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Logo/Header */
.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo {
    max-width: 200px;
    height: auto;
    margin: 0 auto 1rem auto;
    display: block;
}

.login-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.login-subtitle {
    font-size: 1rem;
    color: #718096;
    font-weight: 400;
}

/* Formulaire */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: #4a5568;
}

.form-input {
    padding: 0.875rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f7fafc;
}

.form-input:focus {
    outline: none;
    border-color: #0000FF;
    background: white;
    box-shadow: 0 0 0 3px rgba(0, 0, 255, 0.1);
}

.form-input::placeholder {
    color: #a0aec0;
}

/* Bouton de connexion */
.login-button {
    padding: 1rem;
    background: #0000FF;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
}

.login-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 255, 0.4);
    background: #0000DD;
}

.login-button:active:not(:disabled) {
    transform: translateY(0);
}

.login-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Message d'erreur/succès */
.login-error {
    padding: 1rem;
    background: #fed7d7;
    color: #c53030;
    border-radius: 10px;
    font-size: 0.95rem;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    margin-top: -0.5rem;
}

.login-error.visible {
    opacity: 1;
    visibility: visible;
}

.login-error.success {
    background: #c6f6d5;
    color: #22543d;
}

/* Footer */
.login-footer {
    margin-top: 2rem;
    text-align: center;
    font-size: 0.85rem;
    color: #a0aec0;
}

/* Classes utilitaires */
.hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    .login-container {
        padding: 2rem;
        width: 95%;
    }
    
    .login-title {
        font-size: 1.5rem;
    }
    
    .login-subtitle {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .login-container {
        padding: 1.5rem;
    }
    
    .login-title {
        font-size: 1.3rem;
    }
}

/* Animation de chargement pour le bouton */
.login-button:disabled::after {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-left: 8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
