/* Prévenir le défilement horizontal */
body {
    font-family: 'Arial', sans-serif;
    background-color: #f9f9f9;
    margin: 0;
    padding: 0;
    color: #333;
    overflow-x: hidden;
    overflow-y: auto;
}

/* En-tête */
header {
    background: #008080;
    color: white;
    padding: 40px 20px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

header h1 {
    font-size: 2.5em;
    font-weight: 700;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 3px;
}

/* Conteneur principal */
.container {
    width: 100%;
    margin: 0 auto;
    padding: 20px;
    background: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    overflow-x: auto;
    box-sizing: border-box; /* Ensure padding doesn't cause overflow */
}

.container * {
    box-sizing: inherit; /* Inherit box-sizing from the parent */
}

/* Section d'accueil */
.home-page .about {
    text-align: center;
    margin: 0 auto 40px; /* Centrage horizontal et marge inférieure */
    width: 95%; /* Limite la largeur pour éviter que le texte ne s’étire trop */
    padding: 0 20px; /* Marges internes gauche et droite */
    justify-content: center;
}


.home-page h2 {
    font-size: 1.8em;
    color: #008080;
    margin-bottom: 20px;
}

/* Style des cartes de service */
.services {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    padding: 20px;
}

.service-card {
    width: 220px;
    background: #fb952f;
    padding: 0 15px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center;
    color: white;
}

.service-card a {
    text-decoration: none;
    color: white;
}

.service-card h3 {
    font-size: 1.4em;
    color: white;
    margin: 10px 0;
    text-align: center;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}



.service-banner {
    width: 790px;
    background: #fb952f;
    color: white;
    padding: 0 15px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    text-align: center;
    align-items: center;    
    justify-content: center;
    margin: 0 auto 20px;
    margin-top: 20px;
}

.service-banner h3 {
    font-size: 1.4em;
    color: rgb(255, 255, 255);
    text-align: center;
}

.service-banner, .service-card {
    height: 45px; /* Set a fixed height */
}

/* Style pour le groupe d'indicateurs */
.indicator-group h3 {
    font-size: 1.5em;
    color: #006666;
    margin-bottom: 10px;
    margin-top: 100px;
    width: 95%;
}

.indicator-group p {
    line-height: 1.7;
    color: #666;
    font-size: 1.1em;
    margin: 0 auto 40px; /* Centrage horizontal et marge inférieure */
    width: 95%, /* Limite la largeur pour éviter que le texte ne s’étire trop */
}

/* Carte de présentation */
.card {
    background: #f8f8f8;
    width: 90%;
    margin: 0 auto 20px;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

h2 {
    color: #008080;
    font-size: 1.8em;
    margin-bottom: 10px;
    text-align: center;
}

p {
    line-height: 1.7;
    color: #666;
    font-size: 1.1em;
}

/* Footer */
footer {
    background: #008080;
    color: white;
    text-align: center;
    padding: 20px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
    margin-top: 40px;
    position: relative;
    bottom: 0;
    width: 100%;
}

footer p {
    margin: 0;
    font-size: 1em;
    font-weight: 500;
    color: #f9f9f9;
}


/* Style for the container of the dropdown */
.toggle-banner {
    display: flex;               /* Use flexbox to arrange elements in a row */
    align-items: center;         /* Vertically align the items */
    justify-content: space-between; /* Space between label and toggle */
    margin: 20px 0;
    padding: 15px;
    background-color: #e0f7f7; /* Background color */
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Style for the label inside the dropdown */
.toggle-banner label {
    font-weight: bold;
    color: #008080; /* Label color */
    margin-right: 20px; /* Space between label and toggle */
}

/* Style for the select dropdown */
#country-select11 {
    width: 200px; /* Width of the dropdown */
    padding: 8px;
    border-radius: 8px;
    border: 2px solid #008080;
    font-size: 1em;
    color: #333;
    background-color: #fff;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: left;
}

/* Style for the select dropdown */
#country-select21 {
    width: 200px; /* Width of the dropdown */
    padding: 8px;
    border-radius: 8px;
    border: 2px solid #008080;
    font-size: 1em;
    color: #333;
    background-color: #fff;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: left;
}

#toggle-switch {
    display: flex;
    align-items: center;
    margin-left: auto
}

/* Style for the toggle button */
.toggle_box {
    width: 130px;
    height: 18px;
    margin-top: 10px;
    margin-left:2px;
    display: block;
    background-color: #008080;
    border-radius: 100px;
    cursor: pointer;
    position: relative;
    transition: 0.5s;
}

/* Hide the checkbox input */
input[type="checkbox"] {
    display: none;
}

/* Style for the circle inside the toggle button */
.circle {
    position: absolute;
    width: 12px;
    height: 12px;
    margin-top:3px;
    margin-left:3px;
    left: 0px;
    background-color: #fff;
    border-radius: 50%;
    transition: 0.5s;
}


/* Style for the map container */
#map1 {
    width: 100%;          /* Full width of the parent container */
    height: 800px;        /* Increased height for the map container */
    margin: 0 auto;       /* Centers the container horizontally */
    position: relative;   /* Ensures the iframe stays within the container */
}

/* Style for the iframe inside the container */
#map-frame {
    width: 100%;          /* Ensures the iframe takes full width of the container */
    height: 100%;         /* Ensures the iframe takes full height of the container */
    border: none;         /* Optional: Removes the border around the iframe */
}

#chart1 {
    width: 100%;          /* Full width of the parent container */
    height: 800px;        /* Increased height for the map container */
    margin: 0 auto;       /* Centers the container horizontally */
    position: relative;   /* Ensures the iframe stays within the container */
}

#chart2 {
    width: 100%;          /* Full width of the parent container */
    height: 800px;        /* Increased height for the map container */
    margin: 0 auto;       /* Centers the container horizontally */
    position: relative;   /* Ensures the iframe stays within the container */
}

#chart-frame1 {
    width: 100%;          /* Ensures the iframe takes full width of the container */
    height: 100%;         /* Ensures the iframe takes full height of the container */
    border: none;         /* Optional: Removes the border around the iframe */
}

#chart-frame2 {
    width: 100%;          /* Ensures the iframe takes full width of the container */
    height: 100%;         /* Ensures the iframe takes full height of the container */
    border: none;         /* Optional: Removes the border around the iframe */
}


/* Style for the loading spinner container */
.loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* Center the spinner */
    text-align: center;
    display: flex;
    flex-direction: column; /* Stack the spinner and the text vertically */
    align-items: center; /* Center horizontally within the flex container */
}

/* Spinner animation */
.spinner {
    border: 4px solid #f3f3f3; /* Light gray color for the background */
    border-top: 4px solid #008080; /* Turquoise color for the spinning part */
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 2s linear infinite;
}

/* Animation for the spinner */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Media Query for Small Screens (Smartphones) */
@media (max-width: 600px) {
    header h1 {
        font-size: 1.5em;
    }

    .service-banner {
        width: 100%;
        max-width: 100%; /* Full width for smaller screens */
    }

    .home-page h2 {
        font-size: 1.5em;
    }

    .indicator-group h3 {
        font-size: 1.3em;
    }

    .indicator-group p {
        font-size: 1em;
    }

    footer {
        font-size: 0.9em;
    }

    #map1, #chart1, #chart2 {
        height: 500px; /* Reduced height for the map container */
    }
}