{% extends 'base.html.twig' %}

{% block body %}
    <div class="container mx-auto p-4">
        <div class="bg-white shadow-lg rounded-sm overflow-hidden">
            <div class="bg-gray-800 text-white p-4">
                <h1 class="text-2xl font-bold">
                    <i class="fas fa-exchange-alt mr-2"></i>Convertir CBR en CBZ
                </h1>
            </div>
            <div class="p-6">
                <form method="post" enctype="multipart/form-data" action="{{ path('app_convert') }}" data-turbo="false">
                    <div class="mb-4">
                        <label for="file-upload" class="block text-sm font-medium text-gray-700 mb-2">
                            Choisir un fichier CBR
                        </label>
                        <div class="mt-1 flex justify-center px-6 pt-5 pb-6 border-2 border-gray-300 border-dashed rounded-md">
                            <div class="space-y-1 text-center">
                                <i class="fas fa-file-archive text-4xl text-gray-400 mb-3"></i>
                                <div class="flex text-sm text-gray-600">
                                    <label for="file-upload" class="relative cursor-pointer bg-white rounded-md font-medium text-green-600 hover:text-green-500">
                                        <span>Sélectionner un fichier</span>
                                        <input id="file-upload" name="file" type="file" class="sr-only" accept=".cbr" required>
                                    </label>
                                    <p class="pl-1">ou glisser-déposer</p>
                                </div>
                                <p class="text-xs text-gray-500">
                                    CBR jusqu'à 100MB
                                </p>
                            </div>
                        </div>
                    </div>
                    <div class="mt-6">
                        <button type="submit" class="w-full flex items-center justify-center py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-green-600 hover:bg-green-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-green-500">
                            <span class="mr-2">Convertir en CBZ</span>
                            <i class="fas fa-arrow-right"></i>
                        </button>
                    </div>
                </form>
            </div>
        </div>
    </div>
{% endblock %}
