/**
 * Rush Engine - Dark Mode Styles
 * Variables CSS pour thème clair et sombre
 */

/* ============================================
   DARK THEME (Default)
   ============================================ */

:root,
[data-theme="dark"] {
    /* Colors */
    --bg-primary: #0a0e1a;
    --bg-secondary: #0f1218;
    --bg-tertiary: #1a1f35;
    --bg-card: #0f1218;
    
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-tertiary: rgba(255, 255, 255, 0.5);
    --text-muted: rgba(255, 255, 255, 0.4);
    
    --accent-primary: #fbbf24;
    --accent-secondary: #f59e0b;
    --accent-tertiary: #d97706;
    
    --success: #00d9a0;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #3b82f6;
    
    --border-color: rgba(255, 255, 255, 0.05);
    --border-color-hover: rgba(255, 255, 255, 0.1);
    
    --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 24px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 12px 40px rgba(0, 0, 0, 0.6);
    
    --overlay: rgba(0, 0, 0, 0.7);
}

/* ============================================
   LIGHT THEME
   ============================================ */

[data-theme="light"] {
    /* Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    --bg-card: #ffffff;
    
    --text-primary: #111827;
    --text-secondary: #374151;
    --text-tertiary: #6b7280;
    --text-muted: #9ca3af;
    
    --accent-primary: #f59e0b;
    --accent-secondary: #d97706;
    --accent-tertiary: #b45309;
    
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #3b82f6;
    
    --border-color: rgba(0, 0, 0, 0.08);
    --border-color-hover: rgba(0, 0, 0, 0.15);
    
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);
    
    --overlay: rgba(0, 0, 0, 0.5);
}

/* ============================================
   GLOBAL APPLICATION
   ============================================ */

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* ============================================
   THEME TOGGLE BUTTON
   ============================================ */

.theme-toggle-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    color: var(--accent-primary);
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    z-index: 9999;
    transition: all 0.3s ease;
}

.theme-toggle-btn:hover {
    transform: scale(1.1) rotate(180deg);
    box-shadow: var(--shadow-xl);
    border-color: var(--accent-primary);
}

.theme-toggle-btn:active {
    transform: scale(0.95);
}

.theme-icon {
    display: inline-block;
    transition: transform 0.3s ease;
}

.theme-toggle-btn:hover .theme-icon {
    animation: bounce 0.6s ease;
}

/* Mobile */
@media (max-width: 768px) {
    .theme-toggle-btn {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }
}

/* ============================================
   COMPONENT OVERRIDES FOR LIGHT THEME
   ============================================ */

[data-theme="light"] .top-list-card {
    background: var(--bg-card);
    border-color: var(--border-color);
}

[data-theme="light"] .top-list-card:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-lg);
}

[data-theme="light"] .list-image-section::after {
    background: linear-gradient(to right, 
        rgba(255, 255, 255, 0.1) 0%, 
        rgba(255, 255, 255, 0.4) 40%,
        rgba(249, 250, 251, 0.95) 90%,
        rgba(249, 250, 251, 1) 100%);
}

[data-theme="light"] .list-info-wrapper {
    background: var(--bg-card);
}

[data-theme="light"] .list-casino-name {
    color: var(--text-primary);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .list-info-label {
    color: var(--text-tertiary);
}

[data-theme="light"] .list-info-subtitle {
    color: var(--text-muted);
}

[data-theme="light"] .btn-list-info-icon {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.03));
    border-color: var(--border-color);
}

[data-theme="light"] .btn-list-info-icon:hover {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(245, 158, 11, 0.08));
    border-color: var(--accent-primary);
}

/* ============================================
   SMOOTH TRANSITIONS
   ============================================ */

* {
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

/* Exclude elements that have their own transitions */
a,
button,
.top-list-card,
.btn-list-activate,
.btn-list-info-icon {
    transition: all 0.3s ease;
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    * {
        transition-duration: 0.01ms !important;
    }
    
    .theme-toggle-btn:hover {
        transform: scale(1.05);
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    :root {
        --border-color: rgba(255, 255, 255, 0.2);
    }
    
    [data-theme="light"] {
        --border-color: rgba(0, 0, 0, 0.2);
    }
}
