/* --- Fix pour l'iframe --- */
html, body {
    /* Rend la page interne de l'iframe 100% de la hauteur */
    height: 100%; 
    margin: 0;
    padding: 0; 
}

/* Dans test.css */
#legend {
    background: white;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 0 15px rgba(0,0,0,0.2);
    position: absolute;
    bottom: 20px; /* Ajustez la position selon vos préférences */
    left: 20px;  /* Ajustez la position selon vos préférences */
    z-index: 1000; /* Assure que la légende est au-dessus de la carte */
}

#legend h4 {
    margin-top: 0;
    margin-bottom: 8px;
    text-align: left;
  padding-left: 8px;
}

#legend div {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

#legend span {
    width: 100%;
  height: 10px;
    display: inline-block;
    margin-right: 8px;
}

main {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.controls {
    /* Prend la hauteur restante */
    height: 100%; 
}

/* --- Styles Généraux et Filtres --- */

* {
    box-sizing: content-box;
    -ms-box-sizing: content-box;
    -moz-box-sizing: content-box;
    -webkit-box-sizing: content-box;
}

html, body, .leaflet-container{
    font-family: Gabarito, sans-serif;
}

h1{
    color: #6a040f;
  	font-weight: 400;
  font-size: 25px;
    text-align: left;
}

.flexbox {
    padding-top: 10px;
    display: flex;
    flex-direction: row;
    width: 100%;
    gap: 15px;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.25);
    transition: all 0.3s ease;
}

.search{
    width: 95%;
    margin-top: 0 !important;
}

input, select {
    width: 95%;
    font-family: Gabarito !important;
    padding-left: 5px;
    height: 50px;
    border: none;
    border-bottom: 1px solid black;
    background-color: transparent;
}

#reset-filters,#toggle-legend{
    margin-bottom: 0.5rem; 
    margin-top: 1rem; 
    padding: 0.5rem 1rem; 
    cursor: pointer; 
    width: 10%;
    font-size: 12px;
    border-radius: 30px;
} 

/* --- Styles Autocomplétion --- */
#autocomplete-results, #autocomplete-project-results {
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
}
#autocomplete-results div, #autocomplete-project-results div {
    padding: 8px;
    cursor: pointer;
}
#autocomplete-results div:hover, #autocomplete-project-results div:hover {
    background-color: #f0f0f0;
}


/* --- Styles Carte et Marqueurs --- */
#map {
    transition: height 0.3s ease;
    background-color: #ffffff;
}

.triangle-icon {
    pointer-events: none;
}

/* Positionnement des contrôles Leaflet (Zoom) */
.leaflet-control{
    float: right !important;
}

/* --- Styles Popups --- */
.leaflet-popup-content{
    font-size: 16px;
    color: #333647;
}

.titrepopup {
    font-weight: bold;
}

.companies{
    border-collapse: collapse;
    width: 100%;
    margin-top: 15px;
}
.companies, .companies tr, .companies td{
    border: 1px solid black;
    padding: 10px;
}
.companies th{
    border: 1px solid black;
    padding: 10px;
    background-color: #333647;
    color: #e5e3e3;
}

/* --- Styles Statuts (Couleurs) --- */
.status-option-Proposed {
    color: #cc0022;
}
.status-option-Commissioning {
    color: #f9b9a6;
}
.status-option-Under-construction {
    color: #8f7c0b;
}
.status-option-Operating {
    color: #8c8a8b;
}