/* GuardSync Authentication Styles - Interface de connexion moderne */

/* === LOGIN PAGE LAYOUT === */
.login-page {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    overflow-x: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
}

.login-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    z-index: -2;
}

.security-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(16, 185, 129, 0.1) 0%, transparent 50%),
        linear-gradient(45deg, transparent 30%, rgba(59, 130, 246, 0.05) 50%, transparent 70%);
    animation: pattern-shift 20s ease-in-out infinite;
}

@keyframes pattern-shift {
    0%, 100% { transform: translateX(0) translateY(0); }
    33% { transform: translateX(-20px) translateY(10px); }
    66% { transform: translateX(10px) translateY(-15px); }
}

.login-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.3);
    backdrop-filter: blur(1px);
    z-index: -1;
}

/* === LOGIN CONTAINER === */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    position: relative;
    z-index: 1;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 1.5rem;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    overflow: hidden;
    width: 100%;
    max-width: 420px;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.login-card.animate-in {
    transform: translateY(0);
    opacity: 1;
}

/* === HEADER SECTION === */
.login-header {
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
    color: white;
    text-align: center;
    padding: 2rem 1.5rem 1.5rem;
    position: relative;
    overflow: hidden;
}

.login-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.2) 0%, transparent 70%);
    animation: header-pulse 4s ease-in-out infinite;
}

@keyframes header-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.login-logo {
    position: relative;
    z-index: 2;
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.login-logo:hover {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.15);
}

.login-logo i {
    font-size: 2rem;
    color: #60a5fa;
    filter: drop-shadow(0 0 10px rgba(96, 165, 250, 0.3));
}

.login-title {
    position: relative;
    z-index: 2;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    letter-spacing: -0.5px;
}

.login-subtitle {
    position: relative;
    z-index: 2;
    font-size: 0.95rem;
    opacity: 0.9;
    margin: 0;
    font-weight: 400;
}

/* === SECURITY INDICATORS === */
.security-indicators {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(248, 250, 252, 0.8);
    border-bottom: 1px solid rgba(226, 232, 240, 0.5);
}

.security-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(30, 64, 175, 0.1);
    border: 1px solid rgba(30, 64, 175, 0.2);
    border-radius: 2rem;
    font-size: 0.85rem;
    color: #1e40af;
    font-weight: 500;
    transition: all 0.3s ease;
}

.security-badge:hover {
    background: rgba(30, 64, 175, 0.15);
    transform: translateY(-1px);
}

.security-badge i {
    font-size: 0.9rem;
}

/* === FORM STYLES === */
.login-body {
    padding: 2rem 1.5rem;
}

.login-form {
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

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

.input-icon {
    position: absolute;
    left: 1rem;
    z-index: 3;
    color: #64748b;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.modern-input {
    width: 100%;
    height: 3.5rem;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid #e2e8f0;
    border-radius: 0.75rem;
    background: rgba(248, 250, 252, 0.8);
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #1e293b;
    backdrop-filter: blur(10px);
}

.modern-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 
        0 0 0 4px rgba(59, 130, 246, 0.1),
        0 4px 12px rgba(59, 130, 246, 0.15);
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-1px);
}

.floating-label {
    position: absolute;
    left: 3rem;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    padding: 0 0.5rem;
    font-size: 1rem;
    color: #64748b;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 0.25rem;
    backdrop-filter: blur(10px);
}

.input-wrapper.focused .floating-label {
    top: 0;
    font-size: 0.8rem;
    color: #3b82f6;
    font-weight: 600;
}

.input-wrapper.focused .input-icon {
    color: #3b82f6;
}

.input-wrapper.error .modern-input {
    border-color: #ef4444;
    background: rgba(254, 242, 242, 0.9);
}

.input-wrapper.error .input-icon {
    color: #ef4444;
}

.input-wrapper.success .modern-input {
    border-color: #10b981;
    background: rgba(240, 253, 248, 0.9);
}

.input-wrapper.success .input-icon {
    color: #10b981;
}

.field-error {
    position: absolute;
    bottom: -1.5rem;
    left: 0;
    font-size: 0.75rem;
    color: #ef4444;
    font-weight: 500;
    animation: error-shake 0.3s ease;
}

@keyframes error-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

.password-toggle {
    position: absolute;
    right: 1rem;
    z-index: 3;
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}

.password-toggle:hover {
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
}

/* === FORM OPTIONS === */
.form-options {
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.forgot-password-link {
    font-size: 0.9rem;
    color: #3b82f6;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.forgot-password-link:hover {
    color: #1e40af;
    text-decoration: underline;
}

.form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid #d1d5db;
    border-radius: 0.375rem;
    background: rgba(248, 250, 252, 0.8);
    transition: all 0.3s ease;
}

.form-check-input:checked {
    background: #3b82f6;
    border-color: #3b82f6;
}

.form-check-label {
    font-size: 0.9rem;
    color: #475569;
    font-weight: 500;
    cursor: pointer;
    user-select: none;
}

/* === LOGIN BUTTON === */
.login-btn {
    width: 100%;
    height: 3.5rem;
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    border: none;
    border-radius: 0.75rem;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    position: relative;
    overflow: hidden;
}

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

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

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
}

.login-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.login-btn:disabled {
    cursor: not-allowed;
    opacity: 0.7;
    transform: none;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

/* === TEST ACCOUNTS === */
.test-accounts {
    text-align: center;
    padding: 1rem 0;
    border-top: 1px solid rgba(226, 232, 240, 0.5);
    margin-top: 1rem;
}

.test-title {
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 1rem;
    font-weight: 500;
}

.test-buttons {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.test-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(248, 250, 252, 0.8);
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    color: #475569;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.test-btn:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: #3b82f6;
    color: #1e40af;
    transform: translateY(-1px);
}

/* === LOGIN FOOTER === */
.login-footer {
    background: rgba(248, 250, 252, 0.8);
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #64748b;
    border-top: 1px solid rgba(226, 232, 240, 0.5);
}

.security-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.security-info i {
    color: #10b981;
}

.version-info {
    font-weight: 500;
}

/* === MODERN ALERT === */
.modern-alert {
    border: none;
    border-radius: 0.75rem;
    padding: 1rem;
    background: rgba(254, 242, 242, 0.9);
    color: #dc2626;
    border-left: 4px solid #ef4444;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
    animation: alert-appear 0.3s ease;
}

@keyframes alert-appear {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === RESPONSIVE DESIGN === */
@media (max-width: 768px) {
    .login-container {
        padding: 0.75rem;
    }
    
    .login-card {
        max-width: 100%;
        margin: 0;
    }
    
    .login-header {
        padding: 1.5rem 1rem 1rem;
    }
    
    .login-body {
        padding: 1.5rem 1rem;
    }
    
    .login-logo {
        width: 60px;
        height: 60px;
    }
    
    .login-logo i {
        font-size: 1.5rem;
    }
    
    .login-title {
        font-size: 1.5rem;
    }
    
    .security-indicators {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.75rem;
    }
    
    .security-badge {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    .modern-input {
        height: 3rem;
        font-size: 0.95rem;
    }
    
    .login-btn {
        height: 3rem;
        font-size: 0.95rem;
    }
    
    .test-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .login-footer {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
}

/* === ACCESSIBILITY === */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media (prefers-contrast: high) {
    .login-card {
        border: 2px solid #000;
    }
    
    .modern-input {
        border-width: 3px;
    }
    
    .login-btn {
        border: 2px solid #000;
    }
}

