/* Styles de base pour la page de login */
body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f7fc;
    background-image: url('../images/backgroundlogin.png');  /* Chemin relatif vers l'image dans le dossier 'images' */
    background-size: cover;  /* Couvre tout l'écran */
    background-position: center;  /* Centre l'image de fond */
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

/* ===============================
   TABLETS ONLY (iPad / Surface)
   =============================== */
@media (min-width: 600px) and (max-width: 1025px) {
    body {
        background-image: url('../images/backgroundloginipad.png');
        background-size: 200%;              /* 👈 makes it smaller */
        background-repeat: no-repeat;
        background-position: center;
    }
}


/* Suggested styles for the login logo */
.logo {
  display: block;
  max-width: 280px;   /* tweak as needed */
  width: 100%;
  height: auto;
  margin: 0 auto 15px; /* centers and adds space below */
}


/* Conteneur principal du formulaire */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

/* Formulaire de login */
.login-form {
    background-color: white;
    padding: 40px 50px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 500px;
}

/* Titre du formulaire */
.login-form h2 {
    text-align: center;
    font-size: 28px;
    color: #333;
    margin-bottom: 30px;
}

/* Styles des groupes d'inputs */
.input-group {
    margin-bottom: 25px;
}

/* Label des champs de saisie */
.input-group label {
    display: block;
    font-size: 16px;
    color: #555;
    margin-bottom: 10px;
    text-align: center;
}

/* Champs de saisie */
.input-group input {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    border-radius: 25px;
    border: 1px solid #ccc;
    outline: none;
    box-sizing: border-box;
}

/* Focus sur les champs de saisie */
.input-group input:focus {
    border-color: #36A9E1;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
}

/* Bouton de soumission */
.submit-btn {
    width: 100%;
    padding: 14px;
    font-size: 18px;
    background-color: #36A9E1;
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: background-color 0.3s;
}

/* Hover sur le bouton */
.submit-btn:hover {
    background-color: #0056b3;
}

/* Focus sur le bouton */
.submit-btn:focus {
    outline: none;
}

/* Flash message styles */
.flash-message {
    position: absolute;
    top: 90%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #f8d7da;
    color: #721c24;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    font-size: 18px;
    z-index: 9999;
    max-width: 500px;
    text-align: center;
    font-weight: bold;
    opacity: 1; /* Fully visible */
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
}

/* Hidden state */
.flash-message.hidden {
    opacity: 0; /* Fully transparent */
    transform: translate(-50%, -60%); /* Slightly move up */
}

.flash-message ul {
    list-style-type: none;  /* Retirer les puces de la liste */
    margin: 0;
    padding: 0;
}

.flash-message li {
    margin: 0;
}

/* Media query pour les tablettes (ex : iPad) */
@media (max-width: 768px) {
    /* Taille du body */
    body {
        background-size: cover;  /* La taille de l'image de fond reste en couverture */
        background-position: center;
    }

    /* Conteneur du formulaire */
    .login-container {
        padding: 0 20px;  /* Ajouter un peu de marge pour éviter que le contenu touche les bords */
    }

    /* Formulaire */
    .login-form {
        padding: 30px 20px;  /* Ajuster le padding pour avoir un peu plus d'espace */
        max-width: 100%;  /* La largeur du formulaire prend toute la largeur de l'écran */
    }

    /* Titre */
    .login-form h2 {
        font-size: 24px;  /* Réduire légèrement la taille du titre */
        margin-bottom: 20px;  /* Moins d'espace sous le titre */
    }

    /* Champs de saisie */
    .input-group input {
        font-size: 14px;  /* Réduire légèrement la taille des champs de saisie */
        padding: 10px;  /* Réduire le padding pour plus de place */
    }

    /* Bouton de soumission */
    .submit-btn {
        font-size: 16px;  /* Réduire la taille du texte sur le bouton */
        padding: 12px;  /* Réduire la taille du bouton */
    }

       /* Flash message adjustments for tablets */
       .flash-message {
        top: 85%; /* Lower the position slightly */
        left: 50%;
        transform: translate(-50%, -50%);
        max-width: 400px; /* Slightly smaller max width */
        padding: 18px; /* Slightly smaller padding */
        font-size: 16px; /* Slightly smaller font size */
    }
}

/* Media query pour les smartphones en mode portrait */
@media (max-width: 480px) {
    /* Formulaire */
    .login-form {
        padding: 20px 15px;  /* Réduire encore plus le padding */
    }

    /* Champs de saisie */
    .input-group input {
        font-size: 13px;  /* Réduire encore la taille du texte */
        padding: 8px;  /* Réduire le padding des champs */
    }

    /* Bouton de soumission */
    .submit-btn {
        font-size: 14px;  /* Réduire encore la taille du texte du bouton */
        padding: 10px;  /* Réduire encore la taille du bouton */
    }

    /* Flash message adjustments for small screens */
    .flash-message {
        top: 75%; /* Position the flash message lower */
        left: 50%;
        transform: translate(-50%, -50%);
        max-width: 250px; /* Reduce the width further */
        padding: 15px; /* Reduce padding for smaller screens */
        font-size: 14px; /* Reduce font size for better readability */
    }
}