/* Auth Page Styles - auth.xtr.digital */
/* Version: 2.0 - Extracted from inline */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-orange: #ffa91a;
    --primary-purple: #190544;
    --accent-blue: #00d4ff;
    --accent-pink: #ff6b9d;
    --accent-green: #00ff88;
    --neutral-100: #ffffff;
    --neutral-900: #0a0a0a;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--neutral-100);
    background: linear-gradient(135deg, #0a0a0a 0%, #190544 25%, #ffa91a 50%, #190544 75%, #0a0a0a 100%);
    background-size: 400% 400%;
    animation: gradientFlow 20s ease infinite;
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

@keyframes gradientFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Particules animées */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: var(--accent-blue);
    border-radius: 50%;
    animation: float 15s infinite linear;
    opacity: 0.4;
}

.particle:nth-child(2n) {
    background: var(--accent-pink);
    animation-duration: 20s;
}

.particle:nth-child(3n) {
    background: var(--accent-green);
    animation-duration: 12s;
}

@keyframes float {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.4;
    }
    90% {
        opacity: 0.4;
    }
    100% {
        transform: translateY(-10vh) rotate(360deg);
        opacity: 0;
    }
}

/* Container principal */
.main-container {
    padding-top: 85px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.main-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(255, 169, 26, 0.1) 0%, transparent 70%);
    z-index: -1;
}

/* Formulaire de connexion avec glassmorphism */
.login-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 24px;
    padding: 2rem;
    width: 100%;
    max-width: 450px;
    margin: 0 1rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    color: var(--primary-purple);
}

.login-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent, var(--primary-orange), transparent);
    animation: rotate 8s linear infinite;
    opacity: 0.1;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.login-content {
    position: relative;
    z-index: 2;
}

/* Logo et titre */
.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, var(--primary-orange) 0%, #ff8c00 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(255, 169, 26, 0.4);
}

.login-logo i {
    font-size: 2rem;
    color: var(--primary-purple);
}

.login-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-purple);
    margin-bottom: 0.5rem;
    text-shadow: 2px 4px 8px rgba(255, 169, 26, 0.3);
}

.login-subtitle {
    color: rgba(25, 5, 68, 0.7);
    font-size: 1rem;
}

/* Messages */
.message-container {
    margin-bottom: 1.5rem;
}

.message {
    padding: 0.75rem 1rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    font-weight: 500;
}

.message i {
    margin-right: 0.5rem;
}

.error-message {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.success-message {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

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

.form-label {
    display: block;
    font-weight: 600;
    color: var(--primary-purple);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-label i {
    margin-right: 0.5rem;
    color: var(--primary-orange);
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 169, 26, 0.3);
    border-radius: 12px;
    color: var(--primary-purple);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 3px rgba(255, 169, 26, 0.1);
    background: rgba(255, 255, 255, 0.9);
}

.form-input::placeholder {
    color: rgba(25, 5, 68, 0.5);
}

.password-container {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(25, 5, 68, 0.6);
    cursor: pointer;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: var(--primary-orange);
}

/* Options du formulaire */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.checkbox-container {
    display: flex;
    align-items: center;
}

.checkbox-container input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-right: 0.5rem;
    accent-color: var(--primary-orange);
}

.checkbox-label {
    font-size: 0.9rem;
    color: rgba(25, 5, 68, 0.7);
}

.forgot-link {
    color: var(--primary-orange);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.forgot-link:hover {
    color: #ff8c00;
}

/* Bouton de connexion */
.login-button {
    width: 100%;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-orange) 0%, #ff8c00 100%);
    color: var(--primary-purple);
    border: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(255, 169, 26, 0.4);
    position: relative;
    overflow: hidden;
}

.login-button::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-button:hover::before {
    left: 100%;
}

.login-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(255, 169, 26, 0.6);
}

.login-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Liens */
.login-links {
    text-align: center;
    margin-top: 1.5rem;
}

.login-links p {
    color: rgba(25, 5, 68, 0.7);
    font-size: 0.9rem;
}

.register-link {
    color: var(--primary-orange);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.register-link:hover {
    color: #ff8c00;
}

/* Status de connexion */
.connection-status {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.8rem;
    color: rgba(25, 5, 68, 0.6);
}

.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.status-online {
    background: #10b981;
    animation: pulse 2s infinite;
}

.status-offline {
    background: #ef4444;
}

.status-degraded {
    background: #f59e0b;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
}

.loading-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    color: var(--primary-purple);
}

.loading-content i {
    font-size: 2rem;
    color: var(--primary-orange);
    margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .main-container {
        padding-top: 75px;
    }
    
    .login-container {
        margin: 0 0.5rem;
        padding: 1.5rem;
    }
    
    .login-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .main-container {
        padding-top: 70px;
    }
    
    .login-container {
        padding: 1.25rem;
    }
    
    .form-options {
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start;
    }
}

/* Optimisations performance */
.particle,
.login-container::before,
.login-button::before {
    will-change: transform;
}

/* Classes utilitaires */
.hidden {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}