/* Styles spécifiques pour la page de connexion */

/* Styles du body et de la page principale */
body {
    background: linear-gradient(135deg, var(--beige-clair) 0%, var(--gris-light) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Lato', sans-serif;
}

.login-container {
    background: var(--blanc);
    padding: 40px 32px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    min-width: 400px;
    max-width: 90vw;
    position: relative;
}

.login-card {
    background: var(--blanc);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    padding: 40px;
    width: 100%;
    max-width: 400px;
    animation: fadeIn 0.5s ease;
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
}

.logo-icon {
    width: 48px;
    height: 48px;
    background: var(--beige-sable);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--blanc);
    font-size: 20px;
}

.logo-text {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 24px;
    color: var(--bleu-new-agency);
}

.login-subtitle {
    color: var(--beige-sable);
    font-size: 14px;
    margin-top: 8px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: var(--gris-texte);
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e1e1;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: var(--blanc);
}

.form-group input:focus {
    outline: none;
    border-color: var(--bleu-new-agency);
    box-shadow: 0 0 0 3px rgba(18, 62, 107, 0.1);
}

.password-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-container input {
    padding-right: 45px; /* Espace pour l'icône */
    flex: 1;
}

.logo h1 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 24px;
    color: var(--bleu-nuit);
    margin: 0;
}

.logo p {
    font-family: 'Lato', sans-serif;
    color: var(--gris-texte);
    margin: 4px 0 0 0;
    font-size: 14px;
}

.login-form {
    margin-bottom: 24px;
}

.password-input {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gris-text);
    font-size: 16px;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    z-index: 10;
}

.password-toggle:hover {
    color: var(--bleu-new-agency);
    background-color: rgba(18, 62, 107, 0.05);
}

.password-toggle:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(18, 62, 107, 0.2);
}

/* .password-strength supprimé - non pertinent pour la page de connexion */

/* Styles pour les erreurs de validation des champs */
.field-error {
    color: #dc3545;
    font-size: 12px;
    margin-top: 4px;
    display: block;
    font-weight: 400;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-group input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--bleu-new-agency);
}

.checkbox-group label {
    font-size: 14px;
    color: var(--gris-texte);
    margin: 0;
}

.btn-login {
    width: 100%;
    background: var(--bleu-new-agency);
    color: var(--blanc);
    border: none;
    border-radius: 6px;
    padding: 14px 28px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 16px;
}

.btn-login:hover:not(:disabled) {
    background: var(--bleu-nuit);
    transform: translateY(-1px);
}

.btn-login:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 12px 16px;
    border-radius: 6px;
    border: 1px solid #f5c6cb;
    margin-bottom: 16px;
    font-size: 14px;
    display: none;
}

.loading-message {
    background: var(--beige-clair);
    color: var(--bleu-new-agency);
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
    text-align: center;
    display: none;
}

.btn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.login-footer {
    text-align: center;
    font-size: 12px;
    color: var(--gris-texte);
    margin-top: 20px;
}

/* 2FA Modal */
.mfa-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.mfa-modal {
    background: var(--blanc);
    padding: 40px 32px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    min-width: 350px;
    text-align: center;
}

.mfa-modal h3 {
    color: var(--bleu-new-agency);
    margin-bottom: 16px;
    font-family: 'Montserrat', sans-serif;
}

.mfa-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e1e1;
    border-radius: 6px;
    font-size: 18px;
    text-align: center;
    letter-spacing: 4px;
    margin: 16px 0;
}

/* Responsive */
@media (max-width: 480px) {
    .login-container {
        margin: 20px;
        padding: 32px 24px;
        min-width: auto;
    }
    
    .logo-text {
        font-size: 20px;
    }
    
    .logo-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .mfa-modal {
        margin: 20px;
        min-width: auto;
    }
}