/**
 * VIZEO - Charte Graphique
 * Typographie: DIN 2014 (fallback: system fonts)
 * Couleurs officielles Vizeo
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Couleurs Vizeo Officielles */
    --vizeo-dark: #10152b;
    --vizeo-primary: #19203b;
    --vizeo-light: #2a3454;
    --vizeo-accent: #3d4a6e;
    --vizeo-red: #f24c52;
    --vizeo-red-dark: #d93a40;
    
    /* Couleurs neutres */
    --white: #ffffff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    
    /* États */
    --success: #10b981;
    --success-light: #d1fae5;
    --error: #f24c52;
    --error-light: #fee2e2;
    --warning: #f59e0b;
    
    /* Ombres */
    --shadow-sm: 0 1px 2px rgba(16, 21, 43, 0.05);
    --shadow: 0 4px 6px -1px rgba(16, 21, 43, 0.1), 0 2px 4px -1px rgba(16, 21, 43, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(16, 21, 43, 0.15), 0 4px 6px -2px rgba(16, 21, 43, 0.08);
    --shadow-xl: 0 20px 25px -5px rgba(16, 21, 43, 0.2), 0 10px 10px -5px rgba(16, 21, 43, 0.1);
    
    /* Rayons */
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-200) 100%);
    color: var(--gray-800);
    min-height: 100vh;
    line-height: 1.6;
}

/* ===== AUTH PAGES (Login, Register, Account) ===== */

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, var(--vizeo-dark) 0%, var(--vizeo-primary) 50%, var(--vizeo-light) 100%);
    position: relative;
    overflow: hidden;
}

.auth-page::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 5L55 20V40L30 55L5 40V20L30 5Z' fill='none' stroke='rgba(255,255,255,0.03)' stroke-width='1'/%3E%3C/svg%3E");
    animation: float 60s linear infinite;
}

@keyframes float {
    from { transform: translate(0, 0) rotate(0deg); }
    to { transform: translate(-50px, -50px) rotate(5deg); }
}

.auth-container {
    background: var(--white);
    width: 100%;
    max-width: 440px;
    padding: 48px 40px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    position: relative;
    z-index: 1;
    animation: slideUp 0.6s ease;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-logo {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo .logo-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
}

.auth-logo h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--vizeo-dark);
    letter-spacing: -0.02em;
}

.auth-logo p {
    font-size: 0.9rem;
    color: var(--gray-500);
    margin-top: 4px;
}

.auth-form .form-group {
    margin-bottom: 20px;
}

.auth-form label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 8px;
}

.auth-form .form-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
    background: var(--gray-50);
}

.auth-form .form-input:focus {
    outline: none;
    border-color: var(--vizeo-red);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(242, 76, 82, 0.1);
}

.auth-form .form-input::placeholder {
    color: var(--gray-400);
}

.auth-form .form-hint {
    font-size: 0.8rem;
    color: var(--gray-500);
    margin-top: 6px;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--vizeo-red);
    cursor: pointer;
}

.checkbox-group label {
    font-size: 0.9rem;
    color: var(--gray-600);
    cursor: pointer;
    margin-bottom: 0;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    width: 100%;
    background: linear-gradient(135deg, var(--vizeo-red) 0%, var(--vizeo-red-dark) 100%);
    color: var(--white);
    box-shadow: 0 4px 14px rgba(242, 76, 82, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(242, 76, 82, 0.4);
}

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

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: var(--gray-100);
    color: var(--gray-700);
    border: 1px solid var(--gray-200);
}

.btn-secondary:hover {
    background: var(--gray-200);
}

.btn-danger {
    background: var(--error-light);
    color: var(--error);
    border: 1px solid var(--error);
}

.btn-danger:hover {
    background: var(--error);
    color: var(--white);
}

.auth-links {
    text-align: center;
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--gray-200);
}

.auth-links p {
    font-size: 0.9rem;
    color: var(--gray-500);
}

.auth-links a {
    color: var(--vizeo-red);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-fast);
}

.auth-links a:hover {
    color: var(--vizeo-red-dark);
    text-decoration: underline;
}

/* Alerts */
.alert {
    padding: 14px 16px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 0.9rem;
    display: none;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

.alert-error {
    background: var(--error-light);
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-success {
    background: var(--success-light);
    color: #065f46;
    border: 1px solid #a7f3d0;
    animation: none;
}

/* ===== ACCOUNT PAGE ===== */

.account-page {
    background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-50) 100%);
    min-height: 100vh;
    padding: 40px 20px;
}

.account-container {
    max-width: 800px;
    margin: 0 auto;
}

.account-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 16px;
}

.account-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--vizeo-dark);
    display: flex;
    align-items: center;
    gap: 12px;
}

.account-header h1::before {
    content: '';
    width: 6px;
    height: 32px;
    background: linear-gradient(180deg, var(--vizeo-red) 0%, var(--vizeo-red-dark) 100%);
    border-radius: 3px;
}

.account-actions {
    display: flex;
    gap: 12px;
}

.account-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
    animation: fadeInUp 0.5s ease both;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.account-card:nth-child(2) { animation-delay: 0.1s; }
.account-card:nth-child(3) { animation-delay: 0.2s; }

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--gray-200);
}

.card-header .icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--vizeo-red) 0%, var(--vizeo-red-dark) 100%);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-header .icon svg {
    width: 20px;
    height: 20px;
    stroke: var(--white);
}

.card-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gray-800);
}

.iuc-list {
    list-style: none;
}

.iuc-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    margin-bottom: 10px;
    transition: var(--transition);
}

.iuc-item:hover {
    background: var(--gray-100);
    border-color: var(--vizeo-red);
}

.iuc-code {
    font-family: 'SF Mono', 'Consolas', monospace;
    font-weight: 600;
    color: var(--vizeo-dark);
}

.iuc-item .btn-danger {
    padding: 8px 16px;
    font-size: 0.85rem;
}

.add-iuc-form {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px dashed var(--gray-300);
}

.add-iuc-form .form-input {
    flex: 1;
}

.add-iuc-form .btn {
    white-space: nowrap;
}

/* ===== RESPONSIVE ===== */

@media (max-width: 640px) {
    .auth-container {
        padding: 32px 24px;
    }
    
    .auth-logo h1 {
        font-size: 1.5rem;
    }
    
    .account-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .account-actions {
        width: 100%;
    }
    
    .account-actions .btn {
        flex: 1;
        justify-content: center;
    }
    
    .add-iuc-form {
        flex-direction: column;
    }
}

