<?php require dirname(__DIR__) . '/layouts/header.php'; ?>

<main class="auth-page">
    <section class="login-panel">
        <div>
            <p class="eyebrow">Connexion</p>
            <h1>Locative</h1>
            <p class="lead">Connectez-vous pour gerer les biens, reservations, clients et paiements.</p>
        </div>

        <?php if (!empty($error)): ?>
            <div class="alert alert-error"><?= e($error) ?></div>
        <?php endif; ?>

        <form method="post" action="<?= url('/login') ?>" class="form-card">
            <input type="hidden" name="_token" value="<?= csrf_token() ?>">

            <label>
                Email
                <input type="email" name="email" value="" required autofocus autocomplete="username">
            </label>

            <label>
                Mot de passe
                <input type="password" name="password" value="" required autocomplete="current-password">
            </label>

            <button type="submit">Se connecter</button>
        </form>
    </section>
</main>

<?php require dirname(__DIR__) . '/layouts/footer.php'; ?>
