/* =================================================================
   DARK / LIGHT MODE - CSS VARIABLES
   Système de thèmes avec transitions smooth
================================================================= */

:root {
    /* Light Mode (Default) */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #e9ecef;
    
    --text-primary: #0a0a0a;
    --text-secondary: #666666;
    --text-tertiary: #999999;
    
    --border-color: rgba(0, 0, 0, 0.1);
    --shadow-color: rgba(0, 0, 0, 0.1);
    
    --card-bg: #ffffff;
    --card-border: rgba(0, 0, 0, 0.08);
    
    /* Couleurs fixes */
    --primary: #C3110D;
    --primary-dark: #a00d0a;
    --secondary: #666666;
}

[data-theme="dark"] {
    /* Dark Mode */
    --bg-primary: #0a0a0a;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #2a2a2a;
    
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-tertiary: rgba(255, 255, 255, 0.5);
    
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow-color: rgba(0, 0, 0, 0.5);
    
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-border: rgba(255, 255, 255, 0.08);
}

/* Transitions smooth sur changement thème */
* {
    transition: background-color 0.3s ease, 
                color 0.3s ease, 
                border-color 0.3s ease,
                box-shadow 0.3s ease;
}

/* Appliquer les variables */
body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

/* Headers */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
}

/* Paragraphes */
p {
    color: var(--text-secondary);
}

/* Links */
a {
    color: var(--primary);
}

a:hover {
    color: var(--primary-dark);
}

/* Cards */
.card,
.product-card,
.service-card {
    background: var(--card-bg);
    border-color: var(--card-border);
}

/* Inputs */
input,
textarea,
select {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--border-color);
}

/* Header */
.site-header {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
}

/* Footer reste dark dans les 2 modes */
.site-footer {
    /* Footer toujours dark pour cohérence */
}

/* Theme Toggle Button */
.theme-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 20px var(--shadow-color);
    z-index: 9999;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: 0 6px 30px rgba(195, 17, 13, 0.4);
}

.theme-toggle i {
    transition: transform 0.3s ease;
}

.theme-toggle:hover i {
    transform: rotate(360deg);
}

/* Responsive */
@media (max-width: 768px) {
    .theme-toggle {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
}

/* Dark mode pour sections spécifiques */
[data-theme="dark"] .hero-section {
    /* Hero reste inchangé (déjà dark) */
}

[data-theme="dark"] .stats-section {
    background: var(--bg-secondary);
}

[data-theme="dark"] .products-section {
    background: var(--bg-primary);
}

/* Services hero section reste dark dans les 2 modes */
.services-hero-section {
    /* Toujours dark pour cohérence design */
}

/* Améliorer contraste en dark mode */
[data-theme="dark"] .btn-primary {
    box-shadow: 0 4px 20px rgba(195, 17, 13, 0.5);
}

[data-theme="dark"] .service-item {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .service-item:hover {
    background: rgba(195, 17, 13, 0.1);
    border-color: rgba(195, 17, 13, 0.3);
}
