/* ==================== FILTRES DE ZONES (COMMUN) ==================== */
.zone-filter-container {
    width: 220px;
    background: #ffffff;
    border-radius: 8px;
    padding: 16px;
    border: 1px solid #e0e0e0;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
}

.zone-filter-title {
    margin: 0 0 12px 0;
    padding: 0 0 10px 0;
    font-size: 14px;
    font-weight: 600;
    color: #5994B8;
    border-bottom: 2px solid #5994B8;
}

.zone-filter-item {
    padding: 8px 12px;
    margin: 0 0 4px 0;
    cursor: pointer;
    font-size: 13px;
    color: #555;
    transition: all 0.15s ease;
    border-left: 3px solid transparent;
}

.zone-filter-item:hover {
    background: #f5f5f5;
}

.zone-filter-item.active {
    background: transparent;
    color: #5994B8;
    font-weight: 500;
    border-left: 3px solid #5994B8;
}

/* ==================== TABLEAUX DE DONNÉES (COMMUN) ==================== */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    border: 1px solid #e0e0e0;
    background: #ffffff;
}

.data-table thead th {
    background: #f8f9fa;
    color: #333;
    padding: 8px 8px;
    text-align: center;
    border-bottom: 1px solid #e0e0e0;
    font-weight: 600;
    font-size: 13px;
}

.data-table tbody td {
    padding: 6px 8px;
    border-top: 1px solid #f1f1f1;
    text-align: center;
    font-size: 13px;
}

.data-table tbody td:first-child {
    text-align: left;
    font-weight: 600;
}

.data-table tbody tr:hover {
    background: #f8f9ff;
}

.data-table tfoot td {
    padding: 6px 8px;
    font-weight: 600;
    background: #f5f5f5;
    border-top: 1px solid #e0e0e0;
    text-align: center;
    font-size: 13px;
}

.data-table tfoot td:first-child {
    text-align: left;
}

/* ==================== LAYOUT AVEC FILTRE + CONTENU ==================== */
.filter-content-layout {
    display: flex;
    gap: 20px;
}

.filter-content-main {
    flex: 1;
    background: white;
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}

.filter-content-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid #eee;
}

.filter-content-body {
    padding: 24px;
}

/* ==================== GRAPHIQUES (COMMUN) ==================== */

/* Container pour graphiques côte à côte */
.charts-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    align-items: stretch;
}

/* Graphique à barres empilées */
.chart-bars {
    background: #fafafa;
    border-radius: 8px;
    padding: 16px;
    border: 1px solid #e0e0e0;
}

.chart-bars-title {
    font-weight: 600;
    margin-bottom: 12px;
    color: #555;
    font-size: 14px;
}

.chart-bars-inner {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    height: 220px;
}

.chart-bar {
    flex: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.chart-bar-stack {
    width: 100%;
    border-radius: 4px 4px 0 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}

.chart-bar-segment {
    width: 100%;
    position: relative;
    cursor: pointer;
    transition: opacity 0.2s;
}

.chart-bar-segment:hover {
    opacity: 0.8;
}

.chart-bar-segment::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    z-index: 1000;
    margin-bottom: 4px;
}

.chart-bar-segment:hover::after {
    opacity: 1;
}

.chart-bar-label {
    text-align: center;
    font-size: 10px;
    margin-top: 4px;
    color: #666;
}

/* Graphique circulaire (camembert) */
.chart-pie {
    background: #fafafa;
    border-radius: 8px;
    padding: 16px;
    border: 1px solid #e0e0e0;
}

.chart-pie-title {
    font-weight: 600;
    margin-bottom: 12px;
    color: #555;
    font-size: 14px;
}

.chart-pie-graph {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    margin: 0 auto 12px auto;
    position: relative;
    overflow: hidden;
    background: #eee;
}

.chart-pie-slice {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50%;
    height: 50%;
    transform-origin: 0% 0%;
}

/* Légende de graphique */
.chart-legend {
    font-size: 12px;
    color: #555;
}

.chart-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.chart-legend-color {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
