{# templates/login/login.html.twig #}
{# ... you will probably extend your base template, like base.html.twig #}

{% extends 'base.html.twig' %}
{% block entete %}
    {{ include('entete.html.twig') }}

{% endblock %}
{% block corps %}
    

    
    <section class='inscription'>
        <form action="{{ path('login_check') }}" method="post">
            <h2>Se connecter</h2>
             <div class="msgerreur">
                {% if error is defined  %}
                    {{ error.messageKey is defined ? error.messageKey | trans(error.messageData, 'security'): "" }}
                {% endif %}
            </div>
            <div class="text-field-container"> 
                <div class="mdc-text-field">
                    <input type="text" id= "username" name="_username" class="mdc-text-field__input" required="required" value="{{ last_username | default("")}}" >
                    <label class="mdc-floating-label" for="username">Courriel</label>
                    <div class="mdc-line-ripple"></div>
                </div>
                <p class="mdc-text-field-helper-text mdc-text-field-helper-text--validation-msg msg-username">Champs requis</p>
            </div>
            <div class="text-field-container">
                <div class="mdc-text-field">
                    <input type="password"  id= "password" name="_password" class="mdc-text-field__input" required="required">
                    <label class="mdc-floating-label" for="password">Mot de passe</label>
                    <div class="mdc-line-ripple"></div>
                </div>
                <p class="mdc-text-field-helper-text mdc-text-field-helper-text--validation-msg msg-password">Champs requis</p>
            </div>

            

            {#
                If you want to control the URL the user
                is redirected to on success (more details below)
                <input type="hidden" name="_target_path" value="/account" />
            #}
            <input type="hidden" name="_target_path" value="/circonscription" />
            
            <div class="text-field-container">
                <button type="button" class="mdc-button mdc-button--raised mdc-ripple-upgraded btn_send">Se connecter</button>
            </div>
            <div class="text-field-container lien-compte">
                <a href="{{path('inscription')}}">Pas encore de compte ?</a>
                <a href="{{path('motpasse')}}">Mot de passe oublié ?</a>
            </div>
            

        </form>


    
{%  endblock %}

{% block javascripts %}

<script src="{{ asset("build/js/app.js") }}"></script>
<script src="{{ asset("build/js/login.js") }}"></script>

{% endblock %}