/* --- RESET & GLOBAL --- */
* { box-sizing: border-box; }

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-app);
    color: var(--text-main);
    margin: 0;
    padding: 24px;
    transition: background-color 0.3s, color 0.3s;
}

/* --- CONTENEURS --- */
.dashboard {
    max-width: 1600px;
    margin: 0 auto;
}

.toolbar {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    gap: 15px;
}

/* * Zone regroupant Dimension + Filtres (Gauche)
 * MODIFICATION : Passage d'ID (#filter-container) à Classe (.filter-container)
 * pour supporter le multi-instanciation.
 */
.filter-container {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* Zone regroupant le Switcher (Droite) */
.view-controls {
    margin-left: auto;
    display: flex;
    align-items: center;
}

/* =====================================================================
   SYSTÈME DE MENUS DÉROULANTS (Design Unifié V10.1)
   ===================================================================== */

.ui-select {
    height: 47px;
    padding: 0 40px 0 20px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background-color: var(--bg-card);
    color: var(--text-main);
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer !important;
    box-shadow: var(--shadow);
    appearance: none;
    -webkit-appearance: none;
    transition: all 0.3s ease;
    outline: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2364748b' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
}

.ui-select:hover {
    border-color: var(--primary);
    background-color: var(--day-bg);
    transform: translateY(-1px);
    box-shadow: var(--shadow-heavy);
}

/* --- Agencement de la Grammaire --- */
.grammar-switcher {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* --- SCROLLBAR --- */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 10px;
}

/* --- LAYOUTS DE GRILLE --- */
.layout-grid-sidebar {
    display: block;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 25px;
    align-items: start;
}

.layout-full-width {
    width: 100%;
}

.main-widget {
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: var(--shadow);
    position: relative;
    min-height: 400px;
    transition: opacity 0.2s ease;
}

/* Effet visuel géré par .calculating-bar dans ui_loader.css */
.main-widget.calculating {}