#map-legend {
  position: fixed;
  bottom: 30px;
  left: 150px;
  display: flex;
  gap: 0;
  padding: 6px;
  z-index: 9999;
}

.legend-item {
  padding: 10px  18px;
  color: white;
  font-weight: bold;
  text-align: center;
  min-width: 60px;
}



#marker-details {
    position: absolute;
    left: 150px;
    top: 100px;
    width: 300px;
    background: white;
    padding: 15px;
    border-radius: 25px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);

    border: 1px solid #14430F;  /* ✅ bordure ajoutée */

    display: none;
    z-index: 1000;
}

#marker-details h3 {
    margin-top: 0;
    color: #14430F;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}

#marker-details p {
    margin: 5px 0;
    color: #14430F;
}

#marker-details button {
    background: #E88A26;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    display: block;
    margin: 15px auto 0 auto; /* centre horizontalement */
}

#marker-details button:hover {
    background: #fad10d;
}


/* Conteneur des images */
#images-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 8px;
    margin-top: 10px;
}

/* Style des images */
#images-container img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    object-fit: cover;
    aspect-ratio: 1/1; /* Pour des tuiles carrées */
    transition: transform 0.2s;
}

#images-container img:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}





@media (max-width: 740px) {

#map-legend {
   display: none;}




    #marker-details {
        position: fixed; /* Fixed pour rester en bas même au scroll */
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%); /* Centre horizontalement */
        top: auto; /* Annule le top */
        width: calc(100% - 40px); /* Largeur responsive avec marges */
        max-width: 350px;
    }
    
        #marker-details p {
        display: none;
        margin: 5px 0;
        color: #14430F;
    }

    /* Conteneur des images */
    #images-container {
        display: none;
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 8px;
        margin-top: 10px;
    }


    #marker-details h3 {
        display: block; /* Retour en block sur mobile pour meilleur affichage */
        margin-bottom: 10px;
    }

    #marker-details button {
        float: none; /* Annule le float sur mobile */
        display: block;
        margin: 15px auto 0 auto; /* Centre le bouton sur mobile */
    }


}

