/**
 * Système de thèmes sombre/clair
 */

/* Thème Sombre (par défaut) */
:root[data-theme="dark"] {
    --dark: #0f172a;
    --dark-light: #1e293b;
    --dark-lighter: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-tertiary: #94a3b8;
    --border-color: rgba(255, 255, 255, 0.1);
    --card-bg: rgba(255, 255, 255, 0.05);
    --hover-bg: rgba(255, 255, 255, 0.08);
}

/* Thème Clair */
:root[data-theme="light"] {
    --dark: #ffffff;
    --dark-light: #f8fafc;
    --dark-lighter: #f1f5f9;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-tertiary: #64748b;
    --border-color: rgba(15, 23, 42, 0.1);
    --card-bg: rgba(15, 23, 42, 0.03);
    --hover-bg: rgba(15, 23, 42, 0.05);
}

/* Bouton de toggle */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 30px;
    z-index: 1001;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.theme-toggle:hover {
    transform: scale(1.1);
    background: var(--hover-bg);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.theme-toggle svg {
    width: 24px;
    height: 24px;
    transition: all 0.3s;
}

/* Afficher/cacher les icônes selon le thème */
[data-theme="dark"] .sun-icon {
    display: block;
}

[data-theme="dark"] .moon-icon {
    display: none;
}

[data-theme="light"] .sun-icon {
    display: none;
}

[data-theme="light"] .moon-icon {
    display: block;
}

/* Animation de rotation */
.theme-toggle:active svg {
    transform: rotate(360deg);
}

/* Ajustements pour le thème clair */
[data-theme="light"] body {
    background: var(--dark);
    color: var(--text-primary);
}

[data-theme="light"] .header {
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid var(--border-color);
}

[data-theme="light"] .nav-link {
    color: var(--text-secondary);
}

[data-theme="light"] .nav-link:hover {
    color: var(--text-primary);
}

[data-theme="light"] .hero {
    background: var(--dark);
}

[data-theme="light"] .section-title,
[data-theme="light"] .hero-title,
[data-theme="light"] h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
}

[data-theme="light"] .section-subtitle,
[data-theme="light"] .hero-subtitle,
[data-theme="light"] p {
    color: var(--text-secondary);
}

[data-theme="light"] .card,
[data-theme="light"] .service-card,
[data-theme="light"] .stat-card,
[data-theme="light"] .vehicle-card,
[data-theme="light"] .testimonial-card,
[data-theme="light"] .faq-item {
    background: var(--card-bg);
    border-color: var(--border-color);
}

[data-theme="light"] .form-input,
[data-theme="light"] .search-input {
    background: var(--card-bg);
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="light"] .footer {
    background: var(--dark-light);
    border-top: 1px solid var(--border-color);
}

[data-theme="light"] .about-section,
[data-theme="light"] .services-section,
[data-theme="light"] .gallery-section,
[data-theme="light"] .testimonials-section,
[data-theme="light"] .faq-section {
    background: var(--dark-light);
}

[data-theme="light"] .request-section {
    background: var(--dark);
}

/* Ajustements pour les badges et statuts */
[data-theme="light"] .badge,
[data-theme="light"] .status-badge {
    border-width: 1px;
}

/* Ajustements pour les ombres */
[data-theme="light"] .card:hover,
[data-theme="light"] .service-card:hover,
[data-theme="light"] .vehicle-card:hover,
[data-theme="light"] .testimonial-card:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

/* Responsive */
@media (max-width: 768px) {
    .theme-toggle {
        top: 80px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
    
    .theme-toggle svg {
        width: 20px;
        height: 20px;
    }
}
