body {
    margin: 0;
    background: #020617;
    color: #e5e7eb;
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

#title {
    text-align: center;
    margin: 16px 0 4px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #e5e7eb;
}

#dashboard {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    grid-template-rows: 1fr;
    gap: 24px;
    padding: 20px;
    box-sizing: border-box;
    flex: 1;
}

#loading-chart {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 18px;
    background: rgba(15,23,42,0.96);
    border: 1px solid rgba(56,189,248,0.9);
    border-radius: 999px;
    color: #e0f2fe;
    font-size: 14px;
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    box-shadow: 0 12px 30px rgba(15,23,42,0.9);
    z-index: 50;
}

.hidden {
    display: none;
}
#map-container {
    grid-column: 1;
    grid-row: 1;

    background: linear-gradient(145deg, #0b1220, #020617);
    border-radius: 18px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.6);
    overflow: hidden;

    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

#map-container svg {
    width: 100%;
    height: 100%;
}
.land {
    fill: #1e293b;
    stroke: #334155;
    stroke-width: 0.8;
    transition: 0.25s;
}

.land:hover {
    fill: #38bdf8;
    cursor: pointer;
}

.land.actif {
    fill: #22c55e !important;
}

#charts {
    grid-column: 2;
    grid-row: 1;

    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 24px;
    height: 100%;
}
.chart-box {
    background: linear-gradient(180deg, rgba(15,23,42,.95), rgba(2,6,23,.98));
    border-radius: 18px;
    border: 1px solid rgba(148,163,184,.15);
    box-shadow: 0 20px 50px rgba(0,0,0,.7);

    padding: 16px;
    display: flex;
    flex-direction: column;
}

.chart-box svg {
    width: 100%;
    height: 100%;
    flex: 1;
}
.chart-box h3 {
    color: #93c5fd;
    text-align: center;
    margin-bottom: 12px;
    font-size: 13px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}


/*STYLE GLOBAL DES SVG*/

#pie-transport,
#radar-causes,
#bar-certitude,
#scatter-eco {
    width: 100%;
    height: 100%;
    overflow: visible;
    font-family: "Inter", "Segoe UI", system-ui, sans-serif;
}

/* Radar */
.radar-grid {
  fill: none;
  stroke: rgba(255,255,255,0.15);
  stroke-dasharray: 4 4;
}

.radar-axis {
  stroke: rgba(255,255,255,0.3);
}

.radar-label {
  fill: #e5e7eb;
  font-size: 11px;
  text-anchor: middle;
}

.radar-area {
    fill: rgba(56, 189, 248, 0.4);
    stroke: #38bdf8;
    stroke-width: 2;
}

/* Axes */
svg text {
  fill: #e5e7eb;
  font-size: 11px;
}
svg path,
svg line {
  stroke: rgba(255,255,255,0.25);
}


/*BAR CHART*/

#bar-certitude rect {
    rx: 6;
    ry: 6;
    fill: url(#barGradient);
    filter: drop-shadow(0 0 6px rgba(56,189,248,0.5));
    transition: 0.3s ease;
}

#bar-certitude rect:hover {
    filter: drop-shadow(0 0 12px rgba(56,189,248,0.9));
    transform: scaleY(1.05);
}

/*SCATTER PLOT */

#scatter-eco circle {
    stroke: rgba(255,255,255,0.4);
    stroke-width: 1;
    filter: drop-shadow(0 0 6px rgba(34,211,238,0.8));
    transition: 0.25s ease;
}

#scatter-eco circle:hover {
    transform: scale(1.6);
    filter: drop-shadow(0 0 14px rgba(34,211,238,1));
}

/*PIE CHART*/

#pie-transport path {
    stroke: rgba(255,255,255,0.15);
    stroke-width: 1;
    transition: all 0.3s ease;
}

#pie-transport path:hover {
    filter: brightness(1.25);
}

/*RADAR CHART*/

#radar-causes polygon {
    fill-opacity: 0.5;
    stroke: #38bdf8;
    stroke-width: 2;
    filter: drop-shadow(0 0 10px rgba(56,189,248,0.7));
}

#radar-causes circle {
    fill: #38bdf8;
    filter: drop-shadow(0 0 6px rgba(56,189,248,1));
}

/* Tooltip DÉPARTEMENT */
#tooltip {
    position: absolute;
    display: none;
        pointer-events: none;
    padding: 8px 14px;
    background: rgba(3, 10, 25, 0.95);
    border: 1px solid rgba(56,189,248,0.8);
    border-radius: 10px;
    color: #e0f2fe;
    font-size: 13px;
    font-weight: 500;
    pointer-events: none;
    backdrop-filter: blur(6px);
    box-shadow: 0 0 18px rgba(56,189,248,0.6);
    z-index: 20;
    white-space: nowrap;
}
#legal {
    margin: 24px 24px 32px;
    padding: 16px 24px 20px;
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 12px;
    line-height: 1.5;
    color: #94a3b8;
    text-align: center;
    border-top: 1px solid rgba(148,163,184,0.4);
    background: radial-gradient(circle at top, rgba(15,23,42,0.9), rgba(15,23,42,0.6));
    box-shadow: 0 -8px 30px rgba(15,23,42,0.6);
}

#legal .legal-title {
    display: inline-block;
    margin-bottom: 6px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #e2e8f0;
}

#legal p {
    margin: 2px auto;
    max-width: 960px;
}

