h1{
    text-align: center;
    text-decoration: underline;
    padding-top: 20px;
}

section{
    width: 30%;
    margin: 20px auto;
    border-radius: 20px;
    background-color: rgba(168, 144, 144, 0.274);
}

button[type="submit"]:not(#terre_submit){
    display: block;
    margin: auto;
}

.list-container {
    width: 80%;
    margin: 20px auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.list {
    width: 100%;
    background-color: rgba(168, 144, 144, 0.342);
    border-radius: 20px;
    max-height: 400px;
    overflow-y: auto;
}

.list input{
    width: 95%;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    max-height: 200px;
    overflow-y: none;
}

.checkbox-grid div {
    margin-left: 20px;
}

.register {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    max-height: 100px;
    overflow-y: auto;
}

label{
    margin-left: 0px;
}

.input_connect {
    padding-left: 0;
    padding-right: 0;
}

/* Messages d'alerts */
.alert {
    padding: 20px;
    margin: 10px 0;
    color: #fff;
    border-radius: 5px;
    max-width: 30%;
    position: absolute;
    top: 130px;
    right: -100%; /* Démarrer depuis la droite de l'écran */
    animation: slideInRight 5s cubic-bezier(0.68, -0.55, 0.27, 1.55) both;
}

.alert.fade-out {
    opacity: 0;
}

.alert-success {
    background-color: #4CAF50;
}

.alert-danger {
    background-color: #f44336;
}

@keyframes slideInRight {
    0% {
        right: -100%;
    }
    15% {
        right: 10px;
    }
    100% {
        right: 10px;
    }
}



/* Média query pour les téléphones */
@media screen and (max-width: 767px) {
    section{
        width: 80%;
        margin: 20px auto;
        border-radius: 20px;
        background-color: rgba(168, 144, 144, 0.274);
    }

    .list-container {
        width: 80%;
        margin: 20px auto;
        display: grid;
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .list {
        width: 100%;
        background-color: rgba(168, 144, 144, 0.342);
        border-radius: 20px;
    }

    .checkbox-grid {
        display: grid;
        grid-template-columns: repeat(1, 1fr);
        max-height: 300px;
        overflow-y: auto;
    }

    .alert {
        max-width: 80%;
    }
}

/* Média query pour les tablettes (Utiles dans notre cas pour les échantillonneurs) */
@media screen and (min-width: 768px) and (max-width: 1023px) {
    section{
        width: 60%;
        margin: 20px auto;
        border-radius: 20px;
        background-color: rgba(168, 144, 144, 0.274);
    }  

    .alert {
        max-width: 40%;
    }

    .ajouter_fumure, .supprimer_fumure{
        margin: auto;
        display: block;
    }
}
