#nav-carte {
    height: 100%;
}

#nav-recherche {
    background-color: rgba(255, 255, 255, 0.8);
    max-height: 91vh;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
}

#content {
    height: 91vh;
    padding-right: 0px !important;
    padding-left: 0px !important;
}

#mapid {
    height: 100%;
    width: 100%;
}

#part-table :hover {
    background-color: skyblue;
}

.leaflet-map-pane {
    z-index: 2 !important;
}

.leaflet-google-layer {
    z-index: 1 !important;
}

.custom-popup .leaflet-popup-content-wrapper {
    background-color: rgba(255, 255, 255, 0.82);
}

.custom-popup .leaflet-popup-tip-container {
    margin-bottom: 50px;
}

.mycluster {
    height: 45px;
    width: 45px;
    border-radius: 50%;
    background-color: rgba(5, 94, 161, 0.77);
    color: white;
    text-align: center;
    font-size: 20px;
    line-height: 40px;
    margin-top: -20px;
    margin-left: -20px;
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield;
}

#loader {
    display: none;
    width: 50px;
    height: 50px;
    position: absolute;
    top: 50%;
    left: 50%;
    background: #000 url("../../../Content/Images/ajax-loader.gif") no-repeat center center;
    margin: -23px 0px 0px -23px;
    z-index: 9999;
    -moz-border-radius: 10px;
    -webkit-border-radius: 10px;
    border-radius: 10px;
}

@-webkit-keyframes spin {
    0% {
        -webkit-transform: rotate(0deg);
    }

    100% {
        -webkit-transform: rotate(360deg);
    }
}

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

    100% {
        transform: rotate(360deg);
    }
}

.leaflet-top, .leaflet-bottom {
    z-index: 2;
}

/* ============================================
   STYLES LÉGENDE CARTE (Bouton + Tuile)
   ============================================ */

/* Bouton Légende (style bleu foncé avec icône carte) */
.legend-button {
    font-weight: 700;
    line-height: 100%;
    letter-spacing: 0%;
    font-family: HelveticaNeueBold;
    border-radius: 8px;
    font-size: 14px;
    padding: 12px 16px;
    transition: 0.3s;
    cursor: pointer;
    line-height: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    color: #FFF !important;
    background-color: #002843;
    border: 1px solid #002843;
}

    .legend-button:hover {
        color: #FFF !important;
        background-color: #335368;
        border: 1px solid #335368;
        text-decoration: none;
    }

    .legend-button:hover {
        background-color: #2a4d75;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }

    .legend-button:focus {
        outline: 2px solid #1877BD;
        outline-offset: 2px;
    }

    .legend-button svg {
        flex-shrink: 0;
    }

/* Container de la tuile Légende */
.legend-tile-container {
    z-index: 1000;
    background-color: transparent !important;
}

/* Tuile Légende (fond blanc avec ombre) */
.legend-tile {
    background-color: white !important;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0px 4px 6px -1px #0000001A;
    min-width: 180px;
    max-width: 250px;
    gap: 16px;
    display: flex;
    flex-direction: column;
}

/* En-tête de la tuile avec titre et croix */
.legend-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.legend-title {
    font-family: BricolageGrotesque;
    font-weight: 700;
    font-size: 20px;
    line-height: 110.00000000000001%;
    letter-spacing: -4%;
    color: #002843;
}

/* Bouton croix de fermeture */
.legend-close-btn {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #666;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

    .legend-close-btn:focus {
        outline: 2px solid #1877BD;
        outline-offset: 2px;
        border-radius: 4px;
    }

/* Liste des éléments de légende (Culture/Sport) */
.legend-list {
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 4px;
    display: flex;
    flex-direction: column;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: HelveticaNeueRoman;
    font-weight: 400;
    font-size: 14px;
    line-height: 120%;
    letter-spacing: 0%;
}

/* Pins (images markers) pour Culture et Sport - taille réduite pour la légende */
.legend-item img {
    width: 10px !important;
    height: 16px !important;
    flex-shrink: 0;
    object-fit: contain;
    max-width: 10px;
    max-height: 16px;
}

/* Responsive : adaptation pour petits écrans */
@media (max-width: 768px) {
    .legend-button {
        font-size: 13px;
        padding: 8px 12px;
    }

    .legend-tile {
        min-width: 160px;
        padding: 12px;
    }

    .legend-title {
        font-size: 16px;
    }

    .legend-item {
        gap: 8px;
        padding: 6px 0;
        font-size: 14px;
    }

    .legend-item img {
        width: 10px;
        height: 16px;
    }
}
