body {
    background-color: #d4a017;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    height: 100vh;
    margin: 0;

    color: #0a235c;
    /* Bleu foncé */
}

h1 {
    margin-top: 30px;
    /* Espacement du haut */
    text-align: center;
    /* Centrage horizontal */
    font-size: 3em;
    /* Exemple d'agrandissement du texte */
}

.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 90%;
    /* Augmentation de la largeur */
    max-width: 1000px;
    margin: auto;
    background-color: #d4a017;
    /* Même couleur que la page */
    padding: 20px;
    /* Ajout de padding */
    border-radius: 10px;
    /* Coins arrondis */
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.3);
    /* Réduction de l'ombre portée */
    position: relative;
    /* Position relative pour la position absolue des éléments enfants */
    text-align: center;
}

.logo {
    position: absolute;
    top: 20px;
    left: 20px;
    cursor: pointer;
}

.logo img {
    width: 600px;
    transition: filter 0.3s ease;
}

.logo img:hover {
    filter: grayscale(0%) sepia(100%) brightness(120%);
}

.form-group {
    margin: 40px 0;
    /* Ajout d'un margin pour espacer du logo et des boutons */
    width: 80%;
    /* Prendre toute la largeur de la box */
}

label {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
}

input[type="text"],
input[type="password"] {
    width: calc(100% - 20px);
    /* Presque toute la largeur de la box */
    padding: 8px;
    margin-bottom: 10px;
    box-sizing: border-box;
    border-radius: 5px;
    /* Coins arrondis */
    border: 1px solid #153889;
    /* Bordure bleue foncée */
}

.button-container {
    width: 100%;
    display: flex;
    justify-content: space-between;
    /* Espacement entre les boutons */
}

input[type="submit"] {
    background-color: #153889;
    color: #fff;
    border: none;
    padding: 10px 20px;
    margin-top: 10px;
    cursor: pointer;
    border-radius: 5px;
    flex: 1;
    /* Pour occuper l'espace disponible */
    max-width: 150px;
    /* Limite la largeur des boutons */
}

button.cancel {
    background-color: #9f9ce1;
    margin-right: auto;
    /* Aligne à gauche */
}

button.print {
    background-color: #153889;
    margin-left: auto;
    /* Aligne à droite */
}

.popup {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
}

.popup-contenu {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 25px;
    border: 1px solid #888;
    width: 40%;
    border-radius: 48px;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.erreur {
    color: red;
    font-weight: bold;
    margin: 10px 0;
    font-size: 20px;
}

@media screen and (max-width: 768px) {
    .logo {
        position: relative;
        top: 10px;
        left: 0;
        width: 100%;
        text-align: center;
    }

    .logo img {
        width: 90%;
        max-width: 300px;
    }

    .container {
        width: 95%;
        margin-top: 20px;
        padding: 15px;
        box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
    }

    h1 {
        font-size: 2em;
        margin-top: 15px;
    }

    input[type="login"],
    input[type="password"] {
        width: 90%;
        font-size: 16px;
        /* Meilleure lisibilité sur mobile */
        padding: 12px;
        /* Plus grand pour faciliter le tap */
    }

    input[type="submit"] {
        width: 80%;
        max-width: none;
        padding: 15px;
        margin: 10px auto;
        font-size: 16px;
    }

    .popup-contenu {
        width: 90%;
        margin: 30% auto;
        padding: 15px;
        border-radius: 24px;
    }

    label {
        font-size: 16px;
        margin: 10px 0;
    }

    .close {
        font-size: 24px;
        padding: 10px;
    }
}

/* Ajustements pour très petits écrans */
@media screen and (max-width: 320px) {
    h1 {
        font-size: 1.8em;
    }

    .logo img {
        max-width: 250px;
    }

    input[type="submit"] {
        width: 90%;
    }
}