/* ==============================================
   PAGES D'AUTHENTIFICATION
   ============================================== */

:root {
    --primary: #0284c7;
    --primary-dark: #0369a1;
    --primary-light: #38bdf8;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.auth-page {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-100) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-container {
    display: flex;
    width: 100%;
    max-width: 1200px;
    min-height: 700px;
    background: white;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    margin: 2rem;
}

/* ==============================================
   BANNIÈRE GAUCHE
   ============================================== */

.auth-banner {
    flex: 1;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 3rem;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.auth-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><path d="M30 0 L60 30 L30 60 L0 30 Z" fill="rgba(255,255,255,0.03)"/></svg>');
    opacity: 0.1;
}

.banner-content {
    position: relative;
    z-index: 1;
    color: white;
    width: 100%;
}

.banner-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 3rem;
}

.banner-logo i {
    font-size: 2rem;
}

.banner-content h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.banner-content p {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.banner-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 3rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.feature-item i {
    color: var(--success);
    font-size: 1rem;
}

.banner-testimonial {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.testimonial-avatars {
    display: flex;
    align-items: center;
}

.testimonial-avatars img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    margin-left: -8px;
}

.testimonial-avatars img:first-child {
    margin-left: 0;
}

.testimonial-avatars + p {
    font-size: 0.85rem;
    opacity: 0.9;
}

/* ==============================================
   FORMULAIRE DROIT
   ============================================== */

.auth-form-container {
    flex: 1;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
}

.auth-form-wrapper {
    width: 100%;
    max-width: 400px;
}

.mobile-logo {
    display: none;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 2rem;
}

.mobile-logo i {
    font-size: 2rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-500);
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: 2rem;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: var(--primary);
}

.auth-header {
    margin-bottom: 2rem;
}

.auth-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: var(--gray-500);
    font-size: 0.95rem;
}

/* Alertes */
.alert {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

/* Formulaire */
.auth-form {
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: var(--gray-700);
    font-weight: 500;
    font-size: 0.95rem;
}

.form-group label i {
    color: var(--primary);
    font-size: 1rem;
}

.form-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--gray-50);
}

.form-group input:hover {
    border-color: var(--gray-300);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.1);
    background: white;
}

.form-group input::placeholder {
    color: var(--gray-400);
}

/* Champ mot de passe */
.password-input-wrapper {
    position: relative;
}

.password-input-wrapper input {
    padding-right: 3rem;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: var(--primary);
}

/* Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-600);
    font-size: 0.95rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    cursor: pointer;
}

.forgot-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.forgot-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Bouton de connexion */
.btn-login {
    width: 100%;
    padding: 0.875rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-login:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(2, 132, 199, 0.3);
}

.btn-login:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-text {
    display: inline-block;
}

.btn-loader {
    position: absolute;
}

/* Informations de démo */
.demo-info {
    background: var(--gray-50);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.demo-info p {
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 1rem;
}

.demo-accounts {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.demo-account {
    background: white;
    border-radius: 6px;
    padding: 0.75rem;
    border: 1px solid var(--gray-200);
}

.demo-account strong {
    display: block;
    color: var(--primary);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.demo-account span {
    font-size: 0.85rem;
    color: var(--gray-500);
    font-family: monospace;
}

/* Footer */
.auth-footer {
    text-align: center;
    color: var(--gray-400);
    font-size: 0.85rem;
}

/* ==============================================
   PAGE MOT DE PASSE OUBLIÉ - TIPS
   ============================================== */

.banner-tips {
    margin-top: 3rem;
}

.tip-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.tip-item i {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.tip-item strong {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 1rem;
}

.tip-item p {
    font-size: 0.85rem;
    opacity: 0.8;
    margin: 0;
}

/* ==============================================
   PAGE RÉINITIALISATION - EXIGENCES
   ============================================== */

.password-requirements {
    margin-top: 3rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.password-requirements h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.password-requirements ul {
    list-style: none;
}

.password-requirements li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    opacity: 0.8;
}

.password-requirements li i {
    color: var(--success);
    font-size: 0.9rem;
}

/* Indicateur de force */
.password-strength {
    margin-top: 0.5rem;
    margin-bottom: 1rem;
}

.strength-meter {
    height: 4px;
    background: var(--gray-200);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.strength-bar {
    height: 100%;
    width: 0;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.strength-text {
    font-size: 0.85rem;
    color: var(--gray-500);
}

/* Indicateur de correspondance */
.password-match {
    margin-top: 0.5rem;
    font-size: 0.85rem;
}

.password-match.valid {
    color: var(--success);
}

.password-match.invalid {
    color: var(--danger);
}

/* ==============================================
   RESPONSIVE
   ============================================== */

@media (max-width: 1024px) {
    .banner-content h1 {
        font-size: 1.8rem;
    }
    
    .banner-features {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .auth-container {
        flex-direction: column;
        margin: 1rem;
        min-height: auto;
    }
    
    .auth-banner {
        display: none;
    }
    
    .auth-form-container {
        padding: 2rem;
    }
    
    .mobile-logo {
        display: flex;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .demo-accounts {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .auth-form-container {
        padding: 1.5rem;
    }
    
    .auth-header h2 {
        font-size: 1.5rem;
    }
    
    .btn-login {
        padding: 0.75rem;
    }
}


/* Notifications toast */
.toast-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 9999;
    transform: translateX(120%);
    transition: transform 0.3s ease;
    max-width: 350px;
}

.toast-notification.show {
    transform: translateX(0);
}

.toast-notification.toast-success {
    border-left: 4px solid #10b981;
}

.toast-notification.toast-success i {
    color: #10b981;
}

.toast-notification.toast-error {
    border-left: 4px solid #ef4444;
}

.toast-notification.toast-error i {
    color: #ef4444;
}

.toast-notification.toast-info {
    border-left: 4px solid #3b82f6;
}

.toast-notification.toast-info i {
    color: #3b82f6;
}

.toast-notification i {
    font-size: 20px;
}

.toast-notification span {
    font-size: 14px;
    color: #1e293b;
}