<!DOCTYPE html>
<html lang="fr">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
	<link rel="stylesheet" href="styles/style.css">
    <title>Connexion</title>
</head>
<body>

<div class="form-container">
    <?php if (isset($_SESSION["login"])) { ?>
        <div class="welcome-message">Bonjour <?php echo $_SESSION["login"]; ?></div>
    <?php } ?>
    
    <form action="index.php?action=traite_login" method='POST'>
        <p>Saisissez votre login :</p>
        <input type="text" name="login">
        <?php if (isset($_GET["err"]) && $_GET["err"] == "login") { ?>
            <div class="error-message">ATTENTION MAUVAIS LOGIN</div>
        <?php } ?>
        
        <p>Et votre mot de passe :</p>
        <input type="password" name="mdp">
        <?php if (isset($_GET["err"]) && $_GET["err"] == "password") { ?>
            <div class="error-message">ATTENTION MAUVAIS MOT DE PASSE</div>
        <?php } ?>
        
        <br>
        <input type="submit" value="OK">
    </form><br>
    <button><a href="index.php?action=inscription-view" class="link">inscrivez-vous !</a></button>

</div>


<style>
	    body {
        font-family: Arial, sans-serif;
        background-color: #f4f4f9;
        margin: 0;
        padding: 20px;
        display: flex;
        justify-content: center;
        align-items: center;
        height: 100vh;
    }
</style>

</body>
</html>
