@font-face {
    font-family: 'SourceSansPro';
    src: url('../fonts/ssp/sourcesanspro-regular-webfont.woff2') format('woff2'),
        url('../fonts/ssp/sourcesanspro-regular-webfont.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Nunito';
    src: url('../fonts/nunito/nunito-semibold-webfont.woff2') format('woff2'),
        url('../fonts/nunito/nunito-semibold-webfont.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}


body,
p,
ul,
ol {
    font-family: 'Nunito', sans-serif;
    margin: 0;
    padding: 0;
}

h1,
h2,
h3 {
    font-family: 'SourceSansPro', sans-serif;
}

a {
    text-decoration: none;
}
:root {
    --couleur-titre: #313b48; 
    --couleur-texte: #849732; 
    --couleur-divers:#30AFB8;
  }

  .alert{
    position: relative; 
    padding: 15px;
    margin: 20px auto;
    border: 1px solid transparent;
    border-radius: 4px;
    width: 35%;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    color: white;
}
.alert.error {
    color: #a94442;
    background-color: #f2dede;
    border-color: #ebccd1;
}

.alert.success {
    color: #3c763d;
    background-color: #dff0d8;
    border-color: #d6e9c6;
}

.alert > button {
    position: absolute;
    bottom: 19%;
    right: 2%;
    border: none;
    background: transparent;
    font-size: 30px;
    cursor: pointer;
    padding: 0;
    margin: 0;
    color: white;
}
  
.disabled {
    display: none;
}
.alert::after {
    position: absolute;
    top: 5px;
    right: 5px;
    cursor: pointer; 
}

/* Style map */
#map {
    position: relative;
    height: 92vh;
}

/* Style sidebar */
#sidebarContainer {
    position: absolute;
    /* Position absolue par rapport à #map */
    top: 0;
    right: 0;
    padding: 20px;
    background-color: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

#sidebarContainer
.sidebarContent {
    width: 350px;
    overflow-y: auto;
    padding: 20px;
    box-sizing: border-box;
    height: 92vh;
}

#toggleSidebarBtn {
    width: 30px;
    height: 30px;
    border: none;
    background: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}

#toggleSidebarBtn img {
    max-width: 100%;
    max-height: 100%;
}

#sidebarContainer.open .sidebarContent {
    display: block;
    /* Afficher le sidebar lorsque #sidebarContainer a la classe .open */
}

/* Style pour les paramètres de séléctions */
.form-label {
    text-align: center;
    display: block;
}

.input-container {
    width: 100%;
}

.form-input {
    padding: 7px;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 10px;
}

/* Conteneur flexbox pour le formulaire */
.search-form {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Style pour les boutons */
.button{
    padding: 10px 20px;
    margin: 5px;
    background-color: var(--couleur-divers);
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, filter 0.3s ease; 
}
.button:hover {
    background-color: var(--couleur-divers); 
    filter: brightness(90%); 
  }
  
  /* Styles au clic du bouton */
  .button:active {
    transform: translateY(1px);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  }


#courEau {
    margin-top: 30px;
}

#nameCity,
#raduisParam {
    width: 95%;
    margin-top: 10px;
}

/* Style pour les champs de saisie des dates */
.form-input[type="date"] {
    width: 100%;
    padding: 7px;
    box-sizing: border-box;
    margin-top: 10px;
}

.dateFields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 10px;
}

.dateField {
    width: 100%;
}

.dateField label {
    text-align: right;
}

.parametersSection {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
}

.parameterContainer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 300px;
    margin-bottom: 10px;
    margin-top: 20px;
}

.parameterContainer:first-child{
    margin-top: 10px;
}

.parameterBox {
    border: 2px solid #ccc;
    padding: 5px;
    margin-right: 10px;
    flex: 1;
    width: 60%;
}

#hydrobiologieSelect {
    border-color: #2A81CB;
}

#hydrometrieSelect {
    border-color: #2AAD27;
}

#qualiteSelect {
    border-color: #CB2B3E;
}

#qualityGroundWater{
    border-color: #267ECA;
}

#piezo {
    border-color: #CA273E;
}

#hydrobiologieSelect,
#hydrometrieSelect,
#qualiteSelect {
    background-color: #fff;
    font-size: 1rem;
}

.toggleBox {
    display: flex;
    align-items: center;
}

.switch {
    display: flex;
    align-items: center;
}

.switch .slider {
    width: 48px;
    height: 24px;
    background-color: #ccc;
    border-radius: 34px;
    cursor: pointer;
    transition: background-color 0.4s;
    position: relative;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider:before {
    content: "";
    height: 16px;
    width: 16px;
    border-radius: 50%;
    background-color: white;
    position: absolute;
    left: 4px;
    bottom: 4px;
    transition: transform 0.4s;
}

.switch input:checked+.slider {
    background-color: #2196F3;
}

.switch input:checked+.slider:before {
    transform: translateX(24px);
}

.mapContainer{
    margin: 0;
    padding-bottom: 60px; 
    box-sizing: border-box;
    height: 92vh;
}

.buttonContainer {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid rgb(23, 99, 103); 
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Styles pour la page de connexion */
.container {
    width: 80%; /* Réduire la largeur à 80% */
    display: flex;
    justify-content: center;
    min-height: 77vh;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Ajouter une ombre */
    margin: 0 auto; /* Centrer le container */
    margin-top: 10px;
}


.containerOne {
    height: 70vh;
    background-size: cover;
    background-position: center;
    padding: 30px;
    box-sizing: border-box;
    width: 50%;
    display: flex; /* Pour centrer l'image */
    justify-content: center; /* Centrer l'image horizontalement */
    align-items: center; /* Centrer l'image verticalement */
}

.containerOne img {
    max-width: 100%; /* L'image ne dépasse pas la largeur du container */
    min-height: 100%; /* L'image ne dépasse pas la hauteur du container */
}

.containerTwo {
    background-color: #ffffff;
    width: 40%; 
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
    max-height: 72vh;
}

.formContainer {
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    background-color: #ffffff;
    width: 100%; 
    max-width: 400px; 
    text-align: center;
    max-height: 50vh;
}

.centeredForm {
    width: 100%; 
    box-sizing: border-box;
    text-align: center; 
}

.centeredForm label {
    font-weight: bold;
}

.centeredForm input[type="email"],
.centeredForm input[type="password"] {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
}
.centeredForm .redirectLink {
    margin-top: 10px;
}

.centeredForm .redirectLink a {
    text-decoration: none;
    color: var(--couleur-titre);
}
.container h2 {
    font-size: 1.4rem;
    color: var(--couleur-divers);
}

.errorMessage {
    color: red;
    font-size: 14px;
    margin-bottom: 10px;
}
/* Style pour la page administration */
.adminContainer {
    max-width: 80%;
    margin: 0 auto;
    padding: 20px;
    margin-top: 10px;
    margin-bottom: calc(8vh + 30px); /* Ajouter la marge inférieure pour éviter le chevauchement avec le footer */
    background-color: #ffffff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); 
 
}

.adminContainer h1 {
    text-align: center;
    margin-bottom: 20px;
    color: var(--couleur-titre);
    font-size: 1.4rem;
}

.adminContainer .title {
    text-align: left;
    color: var(--couleur-divers);
    font-size: 1.2rem;
}

.adminContainer p {
    font-size: 1rem;
    color: var(--couleur-titre);
}

.sidebarAdmin {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 10px;
}

.newUserForm, .deleteUserForm, .settings {
    margin-bottom: 20px;
    width: 100%;
    max-width: 600px; 
    padding: 20px; 
    border-radius: 8px; 
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); 
    background-color: #fff; 
}

.userInfo h2, .newUserForm h2, .deleteUserForm h2, .settings h2 {
    margin-bottom: 10px;
    color: var(--couleur-divers);
    font-size: 1.2rem;
    text-align: center;
}

.userInfo {
    line-height: 30px;
}

.userInfo a {
    color: var(--couleur-titre);
    transition: background-color 0.3s ease, filter 0.3s ease; 
    text-decoration: underline;
}

.userInfo a:hover {
    color: var(--couleur-divers); 
    filter: brightness(90%); 
}

.adminContainer form {
    display: flex;
    flex-direction: column;
    align-items: center; 
}

.adminContainer form label {
    margin-bottom: 5px;
    width: 100%; 
    max-width: 400px; 
}

.adminContainer form input {
    margin-bottom: 10px;
    padding: 8px;
    border: 1px solid #cccccc;
    border-radius: 4px;
    width: 100%; 
    max-width: 400px; 
    box-sizing: border-box; 
}
.adminContainer  input[type="submit"]{
    width: 15%;
}
.checkboxContainer {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    width: 100%;
    max-width: 400px;
}

.checkboxContainer label {
    flex: 1;
    margin-bottom: 0;
}

.checkboxContainer input[type="checkbox"] {
    flex: 0;
    margin-bottom: 0;
    margin-left: 10px; 
    width: auto; 
    height: auto; 
    -webkit-appearance: checkbox; 
    -moz-appearance: checkbox;
    appearance: checkbox;
}

.adminContainer form button {
    padding: 10px 20px;
    border: none;
    background-color: var(--couleur-divers);
    color: #ffffff;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: fit-content; 
    align-self: center; 
}

.adminContainer form button:hover {
    background-color: var(--couleur-divers);
}

/* Style pour la page compte */
.updateUserInfoForm h2 {
    margin-bottom: 10px;
    color: var(--couleur-divers);
    font-size: 1.2rem;
    text-align: center;
}
/* Style pour le header */
.headerContainer{
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; 
}
.headerContainer img{
    width: 30%;
    height: auto;
}
.headerContainer a{
    color: var(--couleur-titre);
    margin-right: 10px;
    text-transform: uppercase;
    transition: background-color 0.3s ease, filter 0.3s ease; 
}
.headerContainer a:hover{
    color: var(--couleur-divers); 
    filter: brightness(90%); 
}
/************** Style footer *****************/
footer {
    background-color: white;
    padding: 10px;
    text-align: center;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    height: 8vh;
}

.footerContainer {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.leftSection {
    display: flex;
    align-items: center;
    flex: 1;
}

.middleSection {
    flex: 1;
}

.rightSection {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex: 1;
    margin-right: 20px;
}

.footerContainer img {
    width: 40%;
    height: auto;
}

/* Styling pour le texte du copyright */
.copyrightSection {
    margin-top: 20px;
}

.copyrightSection p {
    margin: 10px 0;
    font-size: 0.9rem;
}

.copyrightSection a {
    color: var(--couleur-divers);
}

/* Styles spécifiques pour les écrans supérieurs à 1600px */
@media (min-width: 1600px) {
    /* Style pour les page eaux-souterraine et superficielle */

    .sidebarContent {
        height: 930px; 
    }

    #sidebarContainer {
        padding: 20px; 
    }

    .button {
        padding: 15px 30px; 
    }

    /* Style page login */

    .containerOne {
        padding: 50px;
       
    }
 
    .containerTwo {
        width: 35%; 
    }
 
    .formContainer {
        max-width: 500px; 
       
    }

    .centeredForm input[type="email"],
    .centeredForm input[type="password"] {
        padding: 15px;
    }

    .container h2 {
        font-size: 1.6rem; 
    }
}