/* Variables CSS pour un thème sombre professionnel */
:root {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --bg-card: #333333;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --accent-primary: #4a90e2;
    --accent-secondary: #f39c12;
    --border-color: #404040;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

/* Reset et styles de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Container principal */
.dashboard-container {
    min-height: 100vh;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* Header */
.dashboard-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem 0;
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-card));
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.dashboard-title {
    font-size: 2.5rem;
    font-weight: 300;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.dashboard-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 400;
}

/* Statistiques (Ajouté pour matcher le HTML) */
.stats-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    text-align: center;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

.stat-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Section des contrôles */
.controls-section {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

.controls-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    align-items: end;
}

/* Labels */
.control-label {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

/* Dropdown Styles Override pour Dash */
.dash-dropdown {
    width: 100%;
    color: #333; /* Reset color for internal text */
}

/* Cible les composants internes de React-Select (Dash Dropdown) */
.dash-dropdown .Select-control {
    background-color: var(--bg-secondary) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--border-radius) !important;
    height: 42px !important;
}

.dash-dropdown .Select-placeholder,
.dash-dropdown .Select-value-label,
.dash-dropdown .Select-input > input {
    color: var(--text-primary) !important;
    line-height: 42px !important;
}

.dash-dropdown .Select-menu-outer {
    background-color: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: var(--shadow) !important;
    margin-top: 5px !important;
}

.dash-dropdown .Select-option {
    background-color: var(--bg-card) !important;
    color: var(--text-primary) !important;
    padding: 10px !important;
}

.dash-dropdown .Select-option.is-focused {
    background-color: var(--bg-secondary) !important; 
    color: var(--accent-primary) !important;
}

.dash-dropdown .Select-option.is-selected {
    background-color: var(--accent-primary) !important;
    color: white !important;
}

/* Checklist */
.dash-checklist {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.dash-checklist label {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    cursor: pointer !important;
    padding: 0.75rem 1.25rem !important;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    font-size: 0.95rem;
    color: var(--text-primary);
}

.dash-checklist label:hover {
    border-color: var(--accent-primary);
    background: rgba(74, 144, 226, 0.1);
}

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

/* Graphique */
.graph-container {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    min-height: 500px;
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard-container {
        padding: 1rem;
    }
    
    .dashboard-title {
        font-size: 2rem;
        flex-direction: column;
    }
    
    .controls-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .dash-checklist {
        flex-direction: column;
        gap: 1rem;
    }
    
    .graph-container {
        padding: 1rem;
        min-height: 400px;
    }
}