/*Eviter les débordements horizontaux*/
* {
  box-sizing: border-box;
}

/*Style du Body*/
html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
}

/*Style Map*/
#map {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
}


/*Style Bandeau et titres*/
#titre {
  position: absolute;
  background: #ffffffb7;
  padding-left: 20px;
  padding-top: 10px;
  top: 0;
  left: 0;
  width: 100%;
  height: 80px;
  box-shadow: 0px 3px 5px #ffffff85;
  z-index: 2;
}

#titre1 {
  color: #C06FA1;
  font-family: Calibri;
  font-size: 30px;
  font-weight: 800;
  width: 70%;
}

#titre2 {
  color: #C06FA1;
  font-family: Calibri;
  font-style: italic;
  font-size: 23px;
  font-weight: 500;
  width: 70%;
  padding-top: 15px;
}

/*Style bouton et liste des activités*/
.liste-activites {
  display: none;
  position: absolute;
  
  width: 350px;
  max-height: 60vh;

  overflow-y: auto;

  background: #C06FA1;
  border-radius: 5px;
  box-shadow: 0 2px 10px rgba(252, 252, 252, 0.747);
  
  color: white;
  font-family: Calibri;
  font-size: 14px;
  z-index: 2;
}

.liste-activites.active {
  display: block;
}


.activite {
  padding: 7px 10px 7px;
  border-bottom: 1px solid #ddd;
  cursor: pointer;

}

/*Changement de couleur lors du survol de la liste */
.activite:hover {
    background-color: #9e5a84;
}


#btn-activites{
  background: #C06FA1;
  font-family: Calibri;
  color: #FFFFFF;
  font-size: 16px;
  padding: 5px 10px;
  border-radius: 5px;

}




/* Style pour la fonction de recherche */
#search-container {
  position: absolute;
  top: 90px;
  z-index: 1;
  padding: 5px;
  z-index: 5;
}

/*Style pour la barre de recherche
#search-input {
  width: 200px;
  padding: 5px;
  border: 1px solid #ccc;
  border-radius: 3px;
  font-family:Helvetica;
  font-size: 12px;
}
*/
/*Style pour le bouton de recherche
#search-button {
  padding: 5px 10px;
  border: none;
  background-color: #e14815ff;
  color: white;
  font-family:Helvetica;
  font-size: 14px;
  cursor: pointer;
  border-radius: 3px;
}*/




/* liste pour choisir les communes 
.select {
  position: absolute;
  background-color: #e14815ff; 
  border-radius: 3px;
  color: white;
  font-family:Calibri;
  height: 30px;
  bottom: 15px;
  left: 10px;
  font-size: 14px;

}*/



/* Style de la légende */
.map-overlay {
  position: absolute;
  bottom: 50px;
  left: 0;
  background: rgba(255, 255, 255, 0.8);
  margin-left: 10px;
  font-family: Calibri;
  border-radius: 3px;
  color: #2c2c2c;
  font-size: 15px;
  padding: 10px;
  z-index: 2;
  width: 300px;
}


#contact {
    border-top: 1px solid #ccc;
    font-size: 13px;
}

#legend-items {
    margin-bottom: 10px;
}
.legend-key {
  display:inline-block;
  border-radius: 100%;
  width: 10px;
  height: 10px;
  margin-right: 5px;
  margin-top: 5px;
  z-index: 3;
}


/*Style pour les logos*/
.logos {
    position: absolute;
    right: 15px;
    display: flex;
    justify-content: space-around; /* Cela permet de placer les logos de manière égale autour de l'espace disponible */ 
    align-items: center; /* Cela permet de centrer les éléments verticalement */
    z-index: 3;
    top : 0px;
  }


#cls_logo {
  height: 75px;
}

#sism_logo {
  width: 100px;
}
  



/* Popup style */
.maplibregl-popup-content {
  width: 300px;
  font-family: Calibri;
  background: #FFFFFF;
  border-color: #C06FA1;
  border-style:solid;
  border-width: 2px;
  padding: 6px 10px;
}


h3 {
  font-size: 22px;
  color: #C06FA1;
  margin-top: 5px;
  margin-bottom: 5px;
  line-height: initial;
}

popup_nom {
  font-size: 18px;
  display: block;
  margin-top: 8px;
  margin-bottom: 5px;
}


popup_lieu {
  font-size: 12px;
  color: #4B6DB3;
  font-style: italic;
  display: block;
  margin-top: 8px;
}

popup_descri {
  display: block;
  text-align: justify;
  font-size: 12px;
}

popup_info {
  font-size: 12px;
  font-style: italic;
  display: block;
  margin-top: 8x;
}



/* =========================================================
   TABLETTE
   900 px
   ========================================================= */

@media screen and (max-width: 900px) {

    #titre {
        /*min-height: 75px;
        height: 65px;*/
        padding: 8px 15px;
    }

    #titre1 {
        /*width: 65%;*/
        font-size: 25px;
        line-height: 25px;

    }

    #titre2 {
        width: 65%;
        padding-top: 6px;
        font-size: 19px;
    }

    .logos {
        right: 10px;

        gap: 5px;
    }

    #sism_logo {
        width: 80px;
    }

    #cls_logo {
        height: 60px;
    }

    .liste-activites {
        width: 300px;
        max-height: 300px;
    }

    .map-overlay {
        max-width: 300px;

        font-size: 14px;
    }
}

@media screen and (max-width: 760px) {
    #titre2 {
        width: 65%;
        padding-top: 1px;
        font-size: 19px;
    }
}
/* =========================================================
   SMARTPHONE
   600 px
   ========================================================= */

@media screen and (max-width: 600px) {

    /* -------------------------
       TITRE
       ------------------------- */

    #titre {
        min-height: 0;

        padding: 8px 10px;

        /* On laisse de la place aux logos */
        padding-right: 100px;
    }

    #titre1 {
        width: 100%;

        font-size: 18px;

        line-height: 1.05;
    }

    #titre2 {
        width: 100%;

        padding-top: 5px;

        font-size: 14px;

        line-height: 1.1;
    }


    /* -------------------------
       LOGOS
       ------------------------- */

    .logos {
        top: 5px;
        right: 5px;

        gap: 3px;

        flex-direction: column;
    }

    #sism_logo {
        width: 55px;
    }

    #cls_logo {
        width: auto;
        height: 40px;
    }


    /* -------------------------
       BOUTON ACTIVITES
       ------------------------- */

    #search-container {
        top: 95px;
        left: 5px;

        padding: 5px;
    }

    #btn-activites {
        font-size: 14px;

        padding: 7px 10px;
    }


    /* -------------------------
       LISTE ACTIVITES
       ------------------------- */

    .liste-activites {
        width: calc(100vw - 20px);
        max-width: 350px;

        max-height: 40vh;
    }

    .activite {
        padding: 10px;

        font-size: 14px;
    }


    /* -------------------------
       LEGENDE
       ------------------------- */

    .map-overlay {
        left: 5px;
        bottom: 50px;

        max-width: calc(100vw - 20px);

        padding: 8px;

        font-size: 13px;
    }


    /* -------------------------
       POPUP
       ------------------------- */

    .maplibregl-popup-content {
        width: auto;
        max-width: calc(100vw - 30px);

        padding: 6px 8px;
    }

    h3 {
        font-size: 19px;
    }

    popup_nom {
        font-size: 16px;
    }

    popup_lieu,
    popup_descri,
    popup_info {
        font-size: 12px;
    }
}