/* =============================================
   CARTHOGEN - Variables CSS (Enhanced)
   ============================================= */

:root {
    /* Couleurs de fond */
    --bg-primary: #060609;
    --bg-secondary: #0a0a0f;
    --bg-tertiary: #0d0d14;
    --bg-card: #12121a;
    --bg-card-hover: #16161f;
    --bg-elevated: #1a1a25;

    /* Couleurs d'accent */
    --accent-cyan: #00d4ff;
    --accent-cyan-bright: #00e5ff;
    --accent-cyan-dim: rgba(0, 212, 255, 0.25);
    --accent-cyan-glow: rgba(0, 212, 255, 0.5);
    --accent-teal: #14b8a6;
    --accent-green: #10b981;
    --accent-orange: #f59e0b;
    --accent-red: #ef4444;
    --accent-purple: #8b5cf6;

    /* Couleurs de texte */
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-dim: #475569;

    /* Bordures */
    --border-color: rgba(255, 255, 255, 0.08);
    --border-color-light: rgba(255, 255, 255, 0.12);
    --border-color-focus: rgba(0, 212, 255, 0.4);

    /* Gradients */
    --gradient-cyan: linear-gradient(135deg, #00d4ff 0%, #00a3cc 100%);
    --gradient-cyan-soft: linear-gradient(135deg, rgba(0, 212, 255, 0.2) 0%, rgba(0, 163, 204, 0.1) 100%);
    --gradient-purple: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    --gradient-orange: linear-gradient(135deg, #ff6b35 0%, #f59e0b 100%);
    --gradient-mesh:
        radial-gradient(ellipse at 20% 20%, rgba(0, 212, 255, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(20, 184, 166, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(139, 92, 246, 0.04) 0%, transparent 60%);
    --gradient-radial-glow: radial-gradient(circle at 50% 50%, rgba(0, 212, 255, 0.15) 0%, transparent 50%);

    /* Couleurs spécifiques aux équipements */
    --color-firewall: #ff6b35;
    --color-switch: #00d4ff;
    --color-server: #10b981;
    --color-router: #8b5cf6;
    --color-cloud: #06b6d4;
    --color-database: #f59e0b;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.6);
    --shadow-glow-cyan: 0 0 40px rgba(0, 212, 255, 0.3);
    --shadow-glow-cyan-strong: 0 0 60px rgba(0, 212, 255, 0.5);
    --shadow-glow-purple: 0 0 40px rgba(139, 92, 246, 0.3);
    --shadow-glow-orange: 0 0 40px rgba(255, 107, 53, 0.3);

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    --transition-bounce: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Border radius */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Spacing */
    --section-padding: clamp(4rem, 8vw, 8rem);
    --container-padding: clamp(1rem, 4vw, 2rem);
}

/* Dark mode specific (default) */
:root {
    color-scheme: dark;
}

/* =============================================
   LIGHT MODE THEME
   ============================================= */

/* Light theme variables - applied via data-theme attribute */
[data-theme="light"] {
    /* Couleurs de fond */
    --bg-primary: #f8fafc;
    --bg-secondary: #f1f5f9;
    --bg-tertiary: #e2e8f0;
    --bg-card: #ffffff;
    --bg-card-hover: #f8fafc;
    --bg-elevated: #ffffff;

    /* Couleurs d'accent - légèrement plus saturées pour le mode clair */
    --accent-cyan: #0891b2;
    --accent-cyan-bright: #06b6d4;
    --accent-cyan-dim: rgba(8, 145, 178, 0.15);
    --accent-cyan-glow: rgba(8, 145, 178, 0.25);
    --accent-teal: #0d9488;
    --accent-green: #059669;
    --accent-orange: #d97706;
    --accent-red: #dc2626;
    --accent-purple: #7c3aed;

    /* Couleurs de texte */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --text-dim: #94a3b8;

    /* Bordures */
    --border-color: rgba(0, 0, 0, 0.08);
    --border-color-light: rgba(0, 0, 0, 0.12);
    --border-color-focus: rgba(8, 145, 178, 0.4);

    /* Gradients - adaptés pour le mode clair */
    --gradient-cyan: linear-gradient(135deg, #0891b2 0%, #0e7490 100%);
    --gradient-cyan-soft: linear-gradient(135deg, rgba(8, 145, 178, 0.12) 0%, rgba(14, 116, 144, 0.06) 100%);
    --gradient-purple: linear-gradient(135deg, #7c3aed 0%, #6366f1 100%);
    --gradient-orange: linear-gradient(135deg, #ea580c 0%, #d97706 100%);
    --gradient-mesh:
        radial-gradient(ellipse at 20% 20%, rgba(8, 145, 178, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(13, 148, 136, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(124, 58, 237, 0.03) 0%, transparent 60%);
    --gradient-radial-glow: radial-gradient(circle at 50% 50%, rgba(8, 145, 178, 0.1) 0%, transparent 50%);

    /* Couleurs spécifiques aux équipements - ajustées pour contraste */
    --color-firewall: #ea580c;
    --color-switch: #0891b2;
    --color-server: #059669;
    --color-router: #7c3aed;
    --color-cloud: #0891b2;
    --color-database: #d97706;

    /* Shadows - plus subtiles pour le mode clair */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.15);
    --shadow-glow-cyan: 0 0 40px rgba(8, 145, 178, 0.2);
    --shadow-glow-cyan-strong: 0 0 60px rgba(8, 145, 178, 0.3);
    --shadow-glow-purple: 0 0 40px rgba(124, 58, 237, 0.2);
    --shadow-glow-orange: 0 0 40px rgba(234, 88, 12, 0.2);

    /* Color scheme */
    color-scheme: light;
}

/* Auto light mode - based on browser/OS preference */
@media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"]) {
        /* Couleurs de fond */
        --bg-primary: #f8fafc;
        --bg-secondary: #f1f5f9;
        --bg-tertiary: #e2e8f0;
        --bg-card: #ffffff;
        --bg-card-hover: #f8fafc;
        --bg-elevated: #ffffff;

        /* Couleurs d'accent */
        --accent-cyan: #0891b2;
        --accent-cyan-bright: #06b6d4;
        --accent-cyan-dim: rgba(8, 145, 178, 0.15);
        --accent-cyan-glow: rgba(8, 145, 178, 0.25);
        --accent-teal: #0d9488;
        --accent-green: #059669;
        --accent-orange: #d97706;
        --accent-red: #dc2626;
        --accent-purple: #7c3aed;

        /* Couleurs de texte */
        --text-primary: #0f172a;
        --text-secondary: #475569;
        --text-muted: #64748b;
        --text-dim: #94a3b8;

        /* Bordures */
        --border-color: rgba(0, 0, 0, 0.08);
        --border-color-light: rgba(0, 0, 0, 0.12);
        --border-color-focus: rgba(8, 145, 178, 0.4);

        /* Gradients */
        --gradient-cyan: linear-gradient(135deg, #0891b2 0%, #0e7490 100%);
        --gradient-cyan-soft: linear-gradient(135deg, rgba(8, 145, 178, 0.12) 0%, rgba(14, 116, 144, 0.06) 100%);
        --gradient-purple: linear-gradient(135deg, #7c3aed 0%, #6366f1 100%);
        --gradient-orange: linear-gradient(135deg, #ea580c 0%, #d97706 100%);
        --gradient-mesh:
            radial-gradient(ellipse at 20% 20%, rgba(8, 145, 178, 0.06) 0%, transparent 50%),
            radial-gradient(ellipse at 80% 80%, rgba(13, 148, 136, 0.05) 0%, transparent 50%),
            radial-gradient(ellipse at 50% 50%, rgba(124, 58, 237, 0.03) 0%, transparent 60%);
        --gradient-radial-glow: radial-gradient(circle at 50% 50%, rgba(8, 145, 178, 0.1) 0%, transparent 50%);

        /* Couleurs équipements */
        --color-firewall: #ea580c;
        --color-switch: #0891b2;
        --color-server: #059669;
        --color-router: #7c3aed;
        --color-cloud: #0891b2;
        --color-database: #d97706;

        /* Shadows */
        --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
        --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
        --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
        --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.15);
        --shadow-glow-cyan: 0 0 40px rgba(8, 145, 178, 0.2);
        --shadow-glow-cyan-strong: 0 0 60px rgba(8, 145, 178, 0.3);
        --shadow-glow-purple: 0 0 40px rgba(124, 58, 237, 0.2);
        --shadow-glow-orange: 0 0 40px rgba(234, 88, 12, 0.2);

        /* Color scheme */
        color-scheme: light;
    }
}

/* Force dark mode when explicitly set */
[data-theme="dark"] {
    /* Couleurs de fond */
    --bg-primary: #060609;
    --bg-secondary: #0a0a0f;
    --bg-tertiary: #0d0d14;
    --bg-card: #12121a;
    --bg-card-hover: #16161f;
    --bg-elevated: #1a1a25;

    /* Couleurs d'accent */
    --accent-cyan: #00d4ff;
    --accent-cyan-bright: #00e5ff;
    --accent-cyan-dim: rgba(0, 212, 255, 0.25);
    --accent-cyan-glow: rgba(0, 212, 255, 0.5);
    --accent-teal: #14b8a6;
    --accent-green: #10b981;
    --accent-orange: #f59e0b;
    --accent-red: #ef4444;
    --accent-purple: #8b5cf6;

    /* Couleurs de texte */
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-dim: #475569;

    /* Bordures */
    --border-color: rgba(255, 255, 255, 0.08);
    --border-color-light: rgba(255, 255, 255, 0.12);
    --border-color-focus: rgba(0, 212, 255, 0.4);

    /* Gradients */
    --gradient-cyan: linear-gradient(135deg, #00d4ff 0%, #00a3cc 100%);
    --gradient-cyan-soft: linear-gradient(135deg, rgba(0, 212, 255, 0.2) 0%, rgba(0, 163, 204, 0.1) 100%);
    --gradient-purple: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    --gradient-orange: linear-gradient(135deg, #ff6b35 0%, #f59e0b 100%);
    --gradient-mesh:
        radial-gradient(ellipse at 20% 20%, rgba(0, 212, 255, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(20, 184, 166, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(139, 92, 246, 0.04) 0%, transparent 60%);
    --gradient-radial-glow: radial-gradient(circle at 50% 50%, rgba(0, 212, 255, 0.15) 0%, transparent 50%);

    /* Couleurs équipements */
    --color-firewall: #ff6b35;
    --color-switch: #00d4ff;
    --color-server: #10b981;
    --color-router: #8b5cf6;
    --color-cloud: #06b6d4;
    --color-database: #f59e0b;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.6);
    --shadow-glow-cyan: 0 0 40px rgba(0, 212, 255, 0.3);
    --shadow-glow-cyan-strong: 0 0 60px rgba(0, 212, 255, 0.5);
    --shadow-glow-purple: 0 0 40px rgba(139, 92, 246, 0.3);
    --shadow-glow-orange: 0 0 40px rgba(255, 107, 53, 0.3);

    /* Color scheme */
    color-scheme: dark;
}
