

body, html { 
    margin: 0;
    padding: 0;
    height: 100vh;
    font-family: Arial, sans-serif;
}

h1{ 
    color: brown;
    text-align: center;
    font-size: 25px;
    background-color: #E9967A;
    padding: 20px;
}

#infobulle { 
    position: absolute;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
    pointer-events: none;
    opacity: 0;
    z-index: 1000;
    transition: opacity 0.2s;
}

.global-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}


.main-container {
    display: flex;
    flex: 1;                    
    overflow: hidden;          
}


.map-container {
    flex: 1;
    background: #f0f4f8;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center; 
    padding: 20px;
}

.carte_image { 
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carte_image svg { 
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
}


.land {
    fill: #cccccc;
    stroke: black;
    stroke-width: 0.5;
    cursor: pointer;
    transition: fill 0.2s;
}

/* --- COMMENTAIRE : EFFET VISUEL DE SURVOL --- */
.land:hover {
    fill: #007bff;
}

.land.actif {
    fill: #0056b3;
    stroke: #003d80;
    stroke-width: 2;
}


#panneau-graphiques {
    width: 420px; 
    background: #ffffff;
    padding: 20px;
    border-left: 3px solid #e0e0e0;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    overflow-y: auto;
    display: none; 
}


.conteneur-charts {
    display: flex;
    flex-direction: column; 
    gap: 20px; 
    align-items: center;
    justify-content: flex-start;
}

.chart-box {
    text-align: center;
    width: 100%; 
}

.chart-box h3 { 
    font-size: 14px;
    margin: 10px 0;
    color: #444;
}


#chart-age-opinion {
    width: 100%;
    max-width: 340px;
    height: 340px;
    margin: 0 auto;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}


.legende { /*code généré par IA*/
    display: flex;
    flex-direction: column; 
    margin-top: 30px;
    text-align: left;
    font-size: 14px;
    line-height: 1.8;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 5px;
}

.legende div { 
    margin: 4px 0;
    display: flex;
    align-items: center;
}

.legende span { 
    font-size: 18px;
    margin-right: 10px;
    font-weight: bold;
}


footer {
    text-align: center;
    padding: 5px;
    background-color: #E9967A; 
    color: white;
    flex-shrink: 0;
}

a.lien{
    color:white;
    text-decoration: underline;
}

/* --- ÉCRAN DE CHARGEMENT --- */
#chargement-page {
    position: fixed;
    top: 0; 
    left: 0;
    width: 100%; 
    height: 100%;
    background-color: white;
    display: flex;           
    justify-content: center; 
    align-items: center;     
    z-index: 9999;           
}

.chargement-contenu {
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid brown; 
    border-radius: 50%;
    width: 30px; 
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 10px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.axis-label {
    font-size: 10px;
    fill: #666;
}




.axis-label {
    font-size: 10px;
    fill: #666;
}

/* --- RESPONSIVE MOBILE --- */
@media screen and (max-width: 768px) {
    h1 {
        font-size: 18px;
        padding: 15px 10px;
    }

    .main-container {
        flex-direction: column;
    }

    .map-container {
        min-height: 50vh;
        padding: 10px;
    }

    #panneau-graphiques {
        width: 100%;
        max-height: 50vh;
        border-left: none;
        border-top: 3px solid #e0e0e0;
        box-shadow: 0 -5px 15px rgba(0,0,0,0.1);
    }

    #chart-age-opinion {
        max-width: 100%;
        height: 280px;
    }

    .chart-box h3 {
        font-size: 12px;
    }

    .legende {
        font-size: 12px;
        padding: 8px;
    }

    .legende span {
        font-size: 16px;
    }

    footer {
        font-size: 12px;
        padding: 8px;
    }
}

@media screen and (max-width: 480px) {
    h1 {
        font-size: 16px;
        padding: 12px 8px;
    }

    .map-container {
        min-height: 40vh;
        padding: 5px;
    }

    #panneau-graphiques {
        padding: 15px;
    }

    #chart-age-opinion {
        height: 240px;
    }

    #infobulle {
        font-size: 12px;
        padding: 6px 10px;
    }

    .legende {
        font-size: 11px;
        margin-top: 15px;
    }
}