{% extends "base.html" %}
{% block title %}Connexion — GMAO Collège{% endblock %}

{% block content %}
<div class="row justify-content-center mt-3 mt-md-5">
    <div class="col-11 col-sm-8 col-md-5 col-lg-4">
        <div class="card shadow">
            <div class="card-body p-3 p-md-4">
                <h2 class="text-center mb-3 h4"><i class="bi bi-tools"></i> GMAO Collège</h2>
                <form method="POST">
                    {{ form.hidden_tag() }}
                    <div class="mb-3">
                        {{ form.username.label(class="form-label") }}
                        {{ form.username(class="form-control", placeholder="Nom d'utilisateur", autocomplete="username") }}
                        {% for error in form.username.errors %}
                        <div class="text-danger small">{{ error }}</div>
                        {% endfor %}
                    </div>
                    <div class="mb-3">
                        {{ form.password.label(class="form-label") }}
                        {{ form.password(class="form-control", placeholder="Mot de passe", autocomplete="current-password") }}
                        {% for error in form.password.errors %}
                        <div class="text-danger small">{{ error }}</div>
                        {% endfor %}
                    </div>
                    <button type="submit" class="btn btn-primary w-100">
                        <i class="bi bi-box-arrow-in-right"></i> Se connecter
                    </button>
                </form>
            </div>
        </div>
    </div>
</div>
{% endblock %}
