* {
    box-sizing: border-box;
}

#resetMap {
    background: #FFFFFF url(/site/image/franceM1.png) center center no-repeat;
    border-radius: 8px;
    border: 1px solid #ddd;

}

.leaflet-control-container .leaflet-top.leaflet-right {
    top: 180px;
}

#controles{
    position: absolute;
    top: 20px;
    left: 20px;
    max-width: 540px;
    width: 80%;
    z-index: 1000;
}

#autocomplete-wrapper {
    display: flex;
    align-items: center;
    background-color: white;
    border-radius: 8px;
    border: 1px solid #ddd;
    padding: 5px;
    width: 100%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

#autocompleteField {
    flex: 1;
    font-size: 16px;
    color: #666;
    padding: 0 13px;
    min-height: 35px;
    background: white;
    border: none;
    outline: none;
    box-sizing: border-box;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: text;
    user-select: text;
    height: 35px;
    line-height: 35px;
}

#autocompleteField[contenteditable="true"]:empty:before {
    content: attr(placeholder);
    color: #666;
    display: block;
    font-size: 16px;
    pointer-events: none;
}

#autocompleteField:focus {
    outline: 1px solid #ccc;
}

#legendToggle {
    position: absolute;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

#legendButton {
    width: 40px;
    height: 40px;
    cursor: pointer;
}

#legendBox {
    display: none;
    position: absolute;
    bottom: 50px;
    right: 0;
    background: white;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 4px 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    min-width: 100px;
}

#legendToggle:hover #legendBox {
    display: block;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 6px;
    font-size: 13px;
    color: #333;
}

.legend-color {
    width: 25px;
    height: 14px;
    margin-right: 8px;
    border-radius: 2px;
    border: 1px solid #999;
}

.legend-45 { background-color: rgb(0,0,0); }
.legend-63 { background-color: rgb(191,0,84); }
.legend-90 { background-color: rgb(255,128,0); }
.legend-150 { background-color: rgb(0,61,176); }
.legend-225 { background-color: rgb(0, 148, 20); }
.legend-400 { background-color: rgb(255,0,0); }

#map-container {
    height: 100vh;
    position: relative;
    width: 100vw;
}

#map-container.lmen-open {
    left: 40vw;
    width: 60vw;
}

#map-container.lmen-opened {
    width: 60vw;
}

#map {

    width: 100%;
    height: 100%;
    z-index: 0;
    position: relative;
    background-color: #D4DADC;
}

.leaflet-popup-content small {
    color: red;
}

.page-wrapper {
    display: flex;
    flex-direction: row;
    position: relative;
}

#content {
    margin-top: 0;
    padding: 0;
}

#lMen {
    height: 100vh;
    width: 40vw;
    position: absolute;
    z-index: 4;
    margin-left: -40vw;
    transition: margin-left 0.5s;
    background-color: white;
}

#lMen.open {
    margin-left: 0;
}

#lMen > #actionMenuL {
    rotate: 180deg;
}

#lMen.open > #actionMenuL {
    rotate: none;
}

#LMenu {
    overflow: hidden;
    height: 100%;
}

#lMen > #actionMenuL {
    position: absolute;
    top: 200px;
    right: -20px;
}

#controles{
    z-index: 5;
}

#LMenu .title_container {
    width: calc(100% - 40px);
    margin: 80px 20px 15px;
    text-align: center;
    font-family: Calibri;
}

#LMenu #details_container {
    height: 100%;
    display: flex;
    flex-direction: column;
}

#LMenu .details__title {
    font-size: 3.5em;
}

#LMenu .details__details_container {
    flex-grow: 1;
    display: block;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0 20px;
}

#LMenu .details__details_container .details__details__default_text {
    text-align: center;
}

.details__footer_menu {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}
.details__footer {
    padding: 20px;
}

.details__legals {
    margin: 15px;
    text-align: center;
    font-size: 0.75em
}

hr {
    width: 100%;
    margin-block-start: 0.5em;
    margin-block-end: 0.5em;
}

.details__poste_message {
    background-color: #fff8dc;
    border: 1px solid #ccc;
    border-radius: 10px;
    padding: 15px 20px;
    margin: 20px 0;
    font-size: 15px;
    line-height: 1.6;
    font-family: Arial, sans-serif;
    color: #003366;
    font-style: italic;
    font-weight: 600;
}

.details__poste_message .poste_text {
    display: block;
    text-align: left;
}

.details__poste_message .poste_coords {
    display: block;
    text-align: center;
}

.suivi_enr_only {
    position:relative;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.1);

}

.suivi_enr_title {
    font-size: 16px;
    margin-bottom: 15px;
    margin-top: 20px;
    padding-left: 10px;
}

.enr_table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    color: grey;
}

.enr_table td {
    padding: 6px 8px;
    border-top: 1px solid #ddd;
}

.enr_table td:first-child {
    background-color: #f7f7f7;
    font-weight: 500;
    width: 70%;
    font-size: 12px;
}

.enr_table td:last-child {
    text-align: right;
    color: #333;
    font-size: 12px;
}

.maj_date {
    font-size: 11px;
    color: #666;
    text-align: right;
    margin-top: 10px;
    font-style: italic;
}

.enr_value {
    color: grey;
    text-align: right;
    font-weight: 500;
}

.bloc {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    margin-top: 20px;
    overflow: hidden;
    font-size: 14px;
    font-family: Arial, sans-serif;
}

.inner {
    padding: 20px;
}

.head {
    display: grid;
    grid-template-areas: "title    logo"
                         "subtitle subtitle";
    grid-template-columns: 1fr min-content;
    gap: 10px;
    align-items: center;
}

.head h3 {
    font-size: 16px;
    font-weight: bold;
    margin: 0;
    grid-area: title;
}

.head > div {
    grid-area: logo;
}

.head > p.subtitle {
    grid-area: subtitle;
}

.content {
    margin-top: 10px;
}

.subtitle {
    font-style: italic;
    font-size: 12.5px;
    color: #555;
    margin: 0;
}

.data_title {
    color: #2e3d96;
    font-size: 14px;
    margin: 15px 0 5px;
}

.row_data {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
}

.label {
    color: #000;
    font-size: 13.5px;
    max-width: 75%;
    line-height: 1.4;
}

.value {
    color: #555;
    font-weight: 500;
    font-size: 13.5px;
}

.maj_date {
    font-size: 12px;
    color: #777;
    text-align: right;
    margin-top: 12px;
}

.toggle_bar {
    border-top: 1px solid #e3c89f;
    cursor: pointer;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    display: block;
    height: 23px;
    background: #f4e5c8 url(/site/image/bloc_toggle.png) bottom center no-repeat;
    transition-property: background-color, background-position;
    transition-duration: .8s;
}

.details__details > div.open > .details__content > .inner > .content {
    display: block;
}

.details__details > .first-bloc:not(.open) > .details__content > .inner > .content {
    max-height: 120px;
    overflow: hidden;
    position: relative;
}

.details__details > .first-bloc:not(.open) > .details__content > .inner > .content::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    height: 40px;
    width: 100%;
    background: linear-gradient(to bottom, transparent, #ffffffee);
}

.details__details > div:not(.open):not(.first-bloc) > .details__content > .inner > .content {
    display: none;
}

.details__details > div > .details__content > .inner > .content {
    transition: max-height 0.3s ease;
}

.details__details > div:not(.open) .toggle_bar {
    background-position: top center;
}

.toggle_bar img {
    width: 20px;
    height: auto;
    filter: drop-shadow(0 1px 1px rgba(0,0,0,0.2));
}

.suivi_enr_content {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
}

.suivi_enr_table {
    flex: 1;
    max-width: 500px;
    padding-right: 15px;
    margin-top: 0;
    background-color: transparent;
}

.lgo_rte {
    background: white;
    color: #555;
    position: relative;
    z-index: 2;
    margin: 0 0 4px;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.subtitle {
    text-align: center;

}

.data_title {
    text-align: center;
}

.autocomplete-result {
    border-bottom: 1px solid #e1e1e1;
    padding: 4px 13px 3px;
}

/* Overlay styling */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000; /* Ensure it stays above other content */
}

/* Loader styling */
.loader {
    border: 8px solid #f3f3f3; /* Light grey */
    border-top: 8px solid #3498db; /* Blue */
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
}

/* Keyframes for spinning animation */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Modal container */
.custom-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    width: 400px;
    text-align: center;
    z-index: 1000;
    display: none; /* Hidden by default */
}

/* Modal text */
.custom-modal p {
    margin-bottom: 20px;
    line-height: 1.5;
    font: 12px Arial, Helvetica, sans-serif;
    line-height: 16px;
    color: #555;
    text-align: justify;
}

/* Button styles */
.custom-modal button {
    background-color: #00A6D9; /* Blue color */
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}

.custom-modal button:hover {
    background-color: #0056b3; /* Darker blue on hover */
}

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #00A6D9; /* Bleu */
    color: white;
    padding: 40px;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.2);
}

.cookie-banner p {
    margin: 0;
    line-height: 1.5;
}

/* Bouton croix */
.cookie-banner .close-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 0;
    font-size: 35px;
}

.cookie-banner .close-btn:hover {
    color: #FFD700; /* Jaune survol */
}
.details__poste_message {
    position: relative;
    z-index: 10;
    margin: 20px 0;
}

.enr_table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    background-color: transparent;
}

.enr_table tr {
    background-color: #ededed;
    border-bottom: 2px solid #fff;
}

.enr_table td {
    padding: 8px 10px;
    font-size: 12px;
    vertical-align: middle;
    color: #111;
}

.enr_table td:first-child {
    background-color: #ededed;
    color: #111;
}

.enr_table td:last-child {
    text-align: right;
    padding-right: 10px;
    color: #111;
}

.suivi_enr_only .details__content {
    margin-top: -10px;
}

.suivi_enr_pie {
    flex: 0 0 45%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

#enrPieChart {
    width: 110px !important;
    height: 110px !important;
}

.suivi_enr_pie_table {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
    max-width: 300px;
    margin-left: 0;
}

.piechart-legend {
    margin-top: 10px;
    margin-left: 15px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    font-size: 11px;
    max-width: 190px;
}

.legend-row {
    display: flex;
    align-items: center;
    margin-bottom: 6px;
    font-size: 13px;
    color: #333;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 6px;
}

.legend-row {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
    font-size: 12px;
    line-height: 1.3;
}

.legend-row {
    transition: color 0.2s ease;
    color: #003366;
}

.legend-row.dimmed {
    color: #aaa;
}

.legend-row.highlight {
    color: #003366;
    font-weight: 600;
}
.world-mask {
    fill: #e2eff6;
    fill-opacity: 1;
}

.region-label {
    font-family: Arial, Verdana, Helvetica, Lucida,	sans-serif;
    background: transparent;
    border: none;
    box-shadow: none;
    font-size: 14px;
    color: #6A6D6E !important;
    text-align:center;
    padding: 5px;
    pointer-events: none;
}

.details__details__default_text {
    margin: auto;
    text-align: center;
    font-style: italic;
    color: #aaa;
    font-size: 12px;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

#autocompleteDownload {
    display: block;
    position: absolute;
    top: 5px;
    right: 40px;
    width: 30px;
    height: 40px;
    background: url(/site/image/icons/autocomplete_sprite.png) 0 top;
    z-index: 99999;
}

#autocompleteDownload:hover {
    background-position: 0 bottom;
}

.contact-form-description {
    font-size: 18px;
    background-color: #bdbdbd6d;
    border: 2px solid black;
    padding: 10px 15px;
    margin-bottom: 20px;
    border-radius: 5px;
}

.first-bloc.open #enrPieChart {
    width: 110px !important;
    height: 110px !important;
}

.first-bloc:not(.open) #enrPieChart {
    width: 60px !important;
    height: 60px !important;
}

.first-bloc.open .suivi_enr_pie {
    padding-top: 20px;
}

.first-bloc:not(.open) .suivi_enr_pie {
    padding-top: 0;
    margin-top: -10px;
}

@media (max-width: 768px) {
    .details__footer_menu {
        flex-direction: column;
    }
}
