body,html{
    font-family: Ubuntu, Arial, Monospace ;
    padding:0;
    margin:0;
    font-size:.8em;
}
#map {
    height: 100vh;
}
.leaflet-popup-content{
    width:840px !important;
}
.chart-container {
    width: 400px;
}
.chart-container legend{
    font-size:1em;
    color:#aaa;
}
.variation-positive {
    color: green;
}
.variation-negative {
    color: red;
}
table {
    width: 100%;
    margin-bottom: 1em;
}
h2, h3 {
    margin-bottom: 0 !important;
}
.icon {
    margin-right: 5px;
}

.form-container {
    position: absolute;
    top: 10px;
    right: 10px;
    background: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    
}
.form-container h3 {
    margin-bottom: 10px;
}
.form-container input {
    margin-right: 10px;
}
.form-container label {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}
.form-container label i {
    margin-right: 5px;
}


/*********************************** Echelle ***********************************/

#colorScaleContainer {
    position: fixed;
    bottom: 5px;    /* Place l'échelle en bas de l'écran */
    left: 1%;       /* Alignée à gauche */
    width: 98%;     /* Largeur de l'écran (ajustable selon les besoins) */
    z-index: 1000;  /* Au-dessus des autres éléments */
    background-color: rgba(255, 255, 255, 0.6); /* Fond transparent pour visibilité */
    padding: 2px;  /* Plus de padding pour lisibilité */
    padding-left:20px;
    padding-right:20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

#colorScale {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    position: relative; /* Pour que les ticks soient positionnés correctement */
}

.color-step {
    flex: 1; /* Ajustement automatique de la largeur des blocs */
    height: 20px; /* Augmenter la hauteur pour améliorer la visibilité */
    border: 1px solid transparent;
    position: relative; /* Pour positionner les ticks à l'intérieur */
}

#colorScaleValues div {
    text-align: center;
    font-size: 12px; /* Taille des valeurs pour s'adapter à la largeur */
    position: absolute;
    bottom: -30px; /* Place les valeurs en dessous de l'échelle */
    white-space: nowrap;
    transform: translateX(-50%); /* Centrer les valeurs par rapport aux ticks */
}

/* Style pour les ticks noirs */
.color-tick {
    position: absolute;
    height: 25px; /* Plus grand pour plus de visibilité */
    width: 2px;
    background-color: rgba(0,0,0,.7);
    bottom: -5px; /* Ajusté pour que les ticks soient plus proches de l'échelle */
    transform: translateX(-50%); /* Centrer les ticks par rapport aux valeurs */
}

/* Centrer les valeurs */
.color-value {
    position: absolute;
    font-size: 12px;
    bottom: -25px; /* Ajuste pour placer la valeur un peu au-dessus de l'échelle */
    white-space: nowrap;
    transform: translateX(-50%); /* Centrer la valeur par rapport au tick */
    text-align: center;
}#colorScale {
    position: relative;
    height: 20px;
    width: 100%;
    margin-bottom: 20px;
}

.color-tick {
    position: absolute;
    top: 0;
    width: 1px;
    height: 20px;
    background-color: black;
}

.color-value {
    position: absolute;
    top: 25px; /* Juste en dessous de l'échelle */
    transform: translateX(-50%);
    font-size: 12px;
}

/* Styles pour le bouton de déclenchement du menu offcanvas */
.offcanvas-trigger {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 1100;
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.offcanvas-trigger:hover {
    background-color: rgba(255, 255, 255, 1);
}

.offcanvas-trigger i {
    font-size: 24px;
    color: #333;
}

/* Styles pour le menu offcanvas */
.offcanvas.offcanvas-end {
    width: 300px;
    background-color: #f8f9fa;
}

.offcanvas-header {
    background-color: #007bff;
    color: #fff;
}

.offcanvas-title {
    font-size: 1.25rem;
}

.offcanvas-title i {
    margin-right: 10px;
}

.btn-close {
    color: #fff;
}

.offcanvas-body {
    padding: 1rem;
}

.form-check-label {
    font-size: 1rem;
    margin-left: 10px;
    color: #333;
}

.form-check-input {
    margin-top: 0.3rem;
}

.form-check {
    margin-bottom: 1rem;
}

.form-check-label i {
    margin-right: 5px;
    color: #007bff;
}

.section-title {
    font-size: 1rem;
    font-weight: bold;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    color: #007bff;
}

.section-title i {
    margin-right: 5px;
}

hr {
    margin: 1.5rem 0;
}

.form-switch .form-check-input {
    width: 2.5em;
    height: 1.2em;
    background-color: #ddd;
    border-radius: 1em;
    position: relative;
}

.form-switch .form-check-input:checked {
    background-color: #007bff;
}

.form-switch .form-check-input::after {
    content: '';
    position: absolute;
    top: 0.1em;
    left: 0.1em;
    width: 1em;
    height: 1em;
    background-color: #fff;
    border-radius: 50%;
    transition: transform 0.3s;
}

.form-switch .form-check-input:checked::after {
    transform: translateX(1.3em);
}

/* Responsive styles for the popup content */
@media (max-width: 767px) {
    .leaflet-popup-content {
        width: auto !important;
    }

    .popup-content .row {
        flex-direction: column;
    }

    .popup-content .col {
        width: 100%;
        margin-bottom: 20px;
    }

    /* Optionally hide certain sections on mobile */
    /* For example, hide the charts */
    .popup-content .chart-container {
        display: none;
    }
}


/* Style pour les labels des villes et EPCI */
.polygon-label {
    font-size: 12px;
    font-weight: bold;
    color: black;
    text-shadow: none;
    border:none;
}

/* Style pour les labels des départements */
.departement-label {
    font-size: 14px;
    font-weight: bold;
    color: #009900;
    text-shadow: none;
    border:none;
}

/* Style pour les labels des régions */
.region-label {
    font-size: 16px;
    font-weight: bold;
    color: #333333;
    text-shadow:0px 0px 2px #fff;
    background:none;
    border:none;

}
.leaflet-tooltip{
    box-shadow:none;
}

#criteriaForm h6{
    color:#009900;
}

/* Styles pour les marqueurs résultants (optionnel) */
.result-marker {
    background-color: red;
    border-radius: 50%;
    width: 10px;
    height: 10px;
    display: block;
}

/* Styles pour les icônes personnalisées des marqueurs */
.custom-div-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}