/* ============================================
   OhmVision Industrial - Auth CSS
   Charte graphique : Cyan/Bleu/Violet
   ============================================ */

:root {
    --color-bg: #f0f9ff;
    --color-surface: #ffffff;
    --color-text: #0f172a;
    --color-text-light: #475569;
    --color-text-muted: #94a3b8;
    --color-border: #e2e8f0;
    --color-primary: #06b6d4;
    --color-primary-dark: #0891b2;
    --color-primary-bg: #ecfeff;
    --color-secondary: #8b5cf6;
    --color-success: #10b981;
    --color-error: #ef4444;
    --gradient-primary: linear-gradient(135deg, #06b6d4 0%, #3b82f6 50%, #8b5cf6 100%);
    --gradient-dark: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #312e81 100%);
    --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body.auth-body { font-family: var(--font-family); background: var(--color-bg); color: var(--color-text); line-height: 1.5; min-height: 100vh; }

.auth-container { display: flex; min-height: 100vh; }

/* Left Panel */
.auth-left {
    flex: 1;
    background: var(--gradient-dark);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

.auth-left::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 80%;
    height: 150%;
    background: var(--gradient-primary);
    opacity: 0.15;
    border-radius: 50%;
    filter: blur(80px);
}

.auth-left::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -20%;
    width: 60%;
    height: 100%;
    background: linear-gradient(135deg, #8b5cf6 0%, #06b6d4 100%);
    opacity: 0.1;
    border-radius: 50%;
    filter: blur(60px);
}

.auth-branding { position: relative; max-width: 480px; z-index: 1; }

.brand-logo { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 2rem; }
.brand-logo .logo-icon {
    width: 3.5rem;
    height: 3.5rem;
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 20px rgba(6, 182, 212, 0.4);
}
.brand-logo .logo-text { font-size: 1.75rem; font-weight: 700; }
.brand-logo .logo-text .highlight { 
    background: var(--gradient-primary); 
    -webkit-background-clip: text; 
    -webkit-text-fill-color: transparent; 
}

.auth-branding h1 { font-size: 2.25rem; font-weight: 700; line-height: 1.2; margin-bottom: 1rem; }
.auth-branding > p { font-size: 1.125rem; color: rgba(255,255,255,0.7); margin-bottom: 3rem; }

.brand-features { display: flex; flex-direction: column; gap: 1.25rem; }
.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255,255,255,0.05);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
}
.feature-item .feature-icon { font-size: 1.5rem; }
.feature-item strong { display: block; margin-bottom: 0.25rem; }
.feature-item span { font-size: 0.875rem; color: rgba(255,255,255,0.6); }

/* Right Panel */
.auth-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    background: var(--color-bg);
}

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

.auth-card {
    background: var(--color-surface);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-border);
}

.auth-card-register { max-width: 460px; }
.auth-card-header { text-align: center; margin-bottom: 1.5rem; }
.auth-card-header h2 { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.5rem; color: var(--color-text); }
.auth-card-header p { color: var(--color-text-light); font-size: 0.9375rem; }

/* Alerts */
.alert { padding: 0.875rem 1rem; border-radius: var(--radius-md); margin-bottom: 1rem; font-size: 0.875rem; }
.alert-error { background: #fef2f2; color: var(--color-error); border: 1px solid #fecaca; }
.alert-success { background: #ecfdf5; color: var(--color-success); border: 1px solid #a7f3d0; }
.alert p { margin: 0.25rem 0; }

/* Form */
.auth-form { display: flex; flex-direction: column; gap: 1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { display: flex; flex-direction: column; gap: 0.375rem; }
.form-group label { font-size: 0.875rem; font-weight: 500; color: var(--color-text); }

.input-wrapper { position: relative; display: flex; align-items: center; }
.input-wrapper svg { position: absolute; left: 0.875rem; color: var(--color-text-muted); pointer-events: none; }
.input-wrapper input {
    width: 100%;
    padding: 0.75rem 0.875rem 0.75rem 2.75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-family: inherit;
    transition: all 0.2s;
    background: var(--color-surface);
}
.input-wrapper input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15);
}
.input-wrapper input::placeholder { color: var(--color-text-muted); }
.password-toggle { position: absolute; right: 0.75rem; background: none; border: none; cursor: pointer; color: var(--color-text-muted); padding: 0.25rem; }
.password-toggle:hover { color: var(--color-primary); }

/* Checkbox */
.checkbox-label { display: flex; align-items: flex-start; gap: 0.5rem; cursor: pointer; font-size: 0.875rem; color: var(--color-text-light); }
.checkbox-label input[type="checkbox"] { width: 1rem; height: 1rem; margin-top: 0.125rem; accent-color: var(--color-primary); }
.checkbox-label a { color: var(--color-primary); }
.checkbox-label a:hover { text-decoration: underline; }

/* Form Options */
.form-options { display: flex; justify-content: space-between; align-items: center; }
.forgot-link { font-size: 0.875rem; color: var(--color-primary); }
.forgot-link:hover { text-decoration: underline; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: inherit;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}
.btn-block { width: 100%; }
.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 14px -4px rgba(6, 182, 212, 0.5);
}
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px -4px rgba(6, 182, 212, 0.6);
}
.btn-outline { background: transparent; color: var(--color-text); border: 1px solid var(--color-border); }
.btn-outline:hover { background: var(--color-bg); border-color: var(--color-primary); color: var(--color-primary); }

/* Separator */
.auth-separator { display: flex; align-items: center; gap: 1rem; margin: 1.5rem 0; }
.auth-separator::before, .auth-separator::after { content: ''; flex: 1; height: 1px; background: var(--color-border); }
.auth-separator span { font-size: 0.8125rem; color: var(--color-text-muted); }

/* Alternate */
.auth-alternate { text-align: center; }
.auth-alternate p { font-size: 0.875rem; color: var(--color-text-light); margin-bottom: 0.75rem; }

/* Trial Info */
.trial-info { text-align: center; font-size: 0.8125rem; color: var(--color-success); margin-top: 0.75rem; }

/* Demo Access */
.demo-access {
    margin-top: 1.5rem;
    padding: 0.875rem;
    background: var(--color-primary-bg);
    border-radius: var(--radius-md);
    text-align: center;
    font-size: 0.8125rem;
    border: 1px solid rgba(6, 182, 212, 0.2);
}
.demo-access strong { color: var(--color-primary); }

/* Auth Footer */
.auth-footer { margin-top: 2rem; text-align: center; }
.auth-footer p { font-size: 0.8125rem; color: var(--color-text-muted); margin-bottom: 0.5rem; }
.auth-links { display: flex; justify-content: center; gap: 1.5rem; }
.auth-links a { font-size: 0.8125rem; color: var(--color-text-light); }
.auth-links a:hover { color: var(--color-primary); }

/* Responsive */
@media (max-width: 1024px) { .auth-left { display: none; } .auth-right { padding: 1.5rem; } }
@media (max-width: 480px) { .form-row { grid-template-columns: 1fr; } .auth-card { padding: 1.5rem; } .form-options { flex-direction: column; align-items: flex-start; gap: 0.75rem; } }
