<!DOCTYPE html>
{% trans_default_domain 'sign-in' %}

<html lang="{{ app.request.locale }}" dir="{{ app.request.locale == 'ar' ? 'rtl' : 'ltr' }}">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=yes">
        <title>Téléchargeur de vidéos YouTube</title>
        <!-- jQuery -->
        <script src="{{ asset('assets/vendor/jquery@4.0.0/jquery.min.js') }}"></script>
        <!-- Font Awesome pour les icônes -->
        <link rel="stylesheet" href="{{ asset('assets/css/frontend.css') }}">
        <link rel="stylesheet" href="{{ asset('assets/vendor/bootstrap@5.3.8/css/bootstrap.min.css') }}">
        <link rel="stylesheet" href="{{ asset('assets/vendor/bootstrap@5.3.8/css/bootstrap.rtl.min.css') }}">
    </head>
    <body>
        <div class="main-container">
            <div class="row mb-4">
                <div class="col-3"></div>
                <div class="col-2">
                    <a href="{{ path('change_language', {'lang':'fr'}) }}">🇫🇷 Français</a>
                </div>
                <div class="col-2">
                    <a href="{{ path('change_language', {'lang':'en'}) }}">🇬🇧 English (UK)</a>
                </div>
                <div class="col-2">
                    <a href="{{ path('change_language', {'lang':'ar'}) }}"> 🇸🇦 العربية</a>
                </div>
            </div>
            <div class="row">
                <div class="col-12">
                    <div class="mb-4">
                        <h3>{{ 'sign_in'|trans }}</h3>
                        <p class="mt-4">{{ 'account'|trans }}  <a href="{{ path('security_registration') }}">{{ 'sign_up'|trans }}</a></p>
                    </div>
                </div>
                <form action="{{ path('security_login') }}" method="post">
                     {% if error %}
                        <div class="alert alert-danger">{{ error.messageKey|trans(error.messageData, 'security') }}</div>
                    {% endif %}
                    <input type="hidden" name="_csrf_token" data-controller="csrf-protection" value="{{ csrf_token('authenticate') }}">   
                    <div class="row gy-3 overflow-hidden">
                        <div class="col-12">
                            <div class="form-floating mb-3">
                                <input type="email" class="form-control" name="email" id="email" placeholder="{{ 'placeholder_email'|trans }}" required>
                                <label for="email" class="form-label">{{ 'label_email'|trans }}</label>
                            </div>
                        </div>
                        <div class="col-12">
                            <div class="form-floating mb-3">
                                <input type="password" class="form-control" name="password" id="password" value="" placeholder="{{ 'password'|trans }}" required>
                                <label for="password" class="form-label">{{ 'password'|trans }}</label>
                            </div>
                        </div>
                        <div class="col-12">
                            <div class="form-group">
                                <input class="form-check-input" type="checkbox" value="" name="remember_me" id="remember_me">
                                <label class="form-check-label text-secondary" for="remember_me">
                                {{ 'remember'|trans }}
                                </label>
                            </div>
                        </div>
                        <div class="col-3 offset-4">
                            <div class="d-grid">
                                <button class="btn btn-success btn-lg" type="submit">{{ 'sign_in'|trans }}</button>
                            </div>
                        </div>
                    </div>
                </form>
            </div>
            <!-- /.row -->
        </div>
        <script src="{{ asset('assets/vendor/bootstrap@5.3.8/js/bootstrap.min.js') }}"></script>
    </body>
</html>