/* === Page de connexion moderne === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.auth-page {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    min-height: 100vh;
    background: #f8f9fa;
    overflow-x: hidden;
}

/* Container principal */
.auth-container {
    display: flex;
    min-height: 100vh;
}

/* === Partie Branding (Gauche) === */
.auth-brand {
    flex: 1;
    background: linear-gradient(135deg, #111827 0%, #1f2937 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

.auth-brand::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    top: -250px;
    right: -250px;
    border-radius: 50%;
}

.brand-content {
    max-width: 500px;
    z-index: 1;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.logo-circle {
    width: 60px;
    height: 60px;
    background: #ffffff;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.logo-circle i {
    font-size: 1.75rem;
    color: #111827;
}

.brand-logo h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    letter-spacing: -0.02em;
}

.brand-tagline {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 3rem;
    line-height: 1.6;
}

.brand-features {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #ffffff;
}

.feature-item i {
    font-size: 1.25rem;
    color: #10b981;
}

.feature-item span {
    font-size: 1rem;
    font-weight: 500;
}

/* === Partie Formulaire (Droite) === */
.auth-form-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: #ffffff;
}

.auth-form-container {
    width: 100%;
    max-width: 440px;
}

.form-header {
    margin-bottom: 2.5rem;
}

.form-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.form-header p {
    font-size: 1rem;
    color: #6b7280;
}

/* Alertes personnalisées */
.alert-custom {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    font-size: 0.9375rem;
}

.alert-error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fee2e2;
}

.alert-error i {
    font-size: 1.125rem;
}

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

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #374151;
}

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

.input-wrapper i {
    position: absolute;
    left: 1rem;
    font-size: 1.125rem;
    color: #9ca3af;
    pointer-events: none;
}

.input-wrapper input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 3rem;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 0.9375rem;
    color: #111827;
    transition: all 0.2s ease;
    background: #ffffff;
}

.input-wrapper input:focus {
    outline: none;
    border-color: #111827;
    box-shadow: 0 0 0 4px rgba(17, 24, 39, 0.05);
}

.input-wrapper input::placeholder {
    color: #9ca3af;
}

/* Toggle password */
.toggle-password {
    position: absolute;
    right: 1rem;
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    transition: color 0.2s ease;
}

.toggle-password:hover {
    color: #111827;
}

.toggle-password i {
    position: static;
    font-size: 1.125rem;
}

/* Bouton submit */
.btn-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 1rem 1.5rem;
    background: #111827;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 0.5rem;
}

.btn-submit:hover {
    background: #1f2937;
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(17, 24, 39, 0.15);
}

.btn-submit:active {
    transform: translateY(0);
}

.btn-submit i {
    font-size: 1.125rem;
    transition: transform 0.2s ease;
}

.btn-submit:hover i {
    transform: translateX(3px);
}

/* Footer du formulaire */
.form-footer {
    margin-top: 2rem;
}

.test-credentials {
    display: flex;
    gap: 0.75rem;
    padding: 1rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
}

.test-credentials i {
    font-size: 1.25rem;
    color: #6b7280;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.test-credentials small {
    display: block;
    font-size: 0.8125rem;
    color: #6b7280;
    font-weight: 600;
    margin-bottom: 0.375rem;
}

.credentials {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    font-size: 0.875rem;
}

.credentials code {
    background: #ffffff;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    color: #111827;
    font-family: 'Courier New', monospace;
    border: 1px solid #e5e7eb;
    font-size: 0.8125rem;
}

/* === Responsive === */
@media (max-width: 992px) {
    .auth-brand {
        display: none;
    }
    
    .auth-form-wrapper {
        flex: 1;
        background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
    }
}

@media (max-width: 576px) {
    .auth-form-wrapper {
        padding: 1.5rem;
    }
    
    .auth-form-container {
        max-width: 100%;
    }
    
    .form-header h2 {
        font-size: 1.75rem;
    }
    
    .brand-logo h1 {
        font-size: 2rem;
    }
    
    .input-wrapper input {
        padding: 0.75rem 1rem 0.75rem 2.75rem;
        font-size: 0.875rem;
    }
    
    .btn-submit {
        padding: 0.875rem 1.25rem;
    }
    
    .credentials {
        flex-direction: column;
    }
}

/* Animation au chargement */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-form-container {
    animation: fadeInUp 0.5s ease;
}

.brand-content {
    animation: fadeInUp 0.6s ease;
}
