{% extends 'base.html.twig' %}
{% block title %}
	{{parent()}}
	Connectez-vous
{% endblock %}
{% block body %}
	<div class="container-fluid">
		<h1 class="text-center text-primary mt-4 pt-4 display-1 fw-bold">
			Connectez-vous</h1>
		<div class="row justify-content-center">
			<div class="col-12 col-md-6 bg-white p-4 m-0 text-primary">
				<form method="post">
					{% if error %}
						<div class="alert alert-danger">{{ error.messageKey|
trans(error.messageData, 'security') }}</div>
					{% endif %}
					{% if app.user %}
						<div class="mb-3">
							You are logged in as
							{{ app.user.userIdentifier }},
							<a href="{{ path('app_logout') }}">Logout</a>
						</div>
					{% endif %}
					<label for="inputEmail">Email</label>
					<input type="email" value="{{ last_username }}" name="email" id="inputEmail" class="form-control" autocomplete="email" required autofocus>
					<label for="inputPassword">Password</label>
					<input type="password" name="password" id="inputPassword" class="form-control" autocomplete="current-password" required>
					<input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}">
					<div class="text-center">
						<button class="btn btn-lg btn-primary mt-2" type="submit">
							Se connecter
						</button>
					</div>
				</form>
			</div>
		</div>
	</div>
{% endblock %}
