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

{% block title %}FAQ{% endblock %}

{% block body %}
    <div class="container mx-auto p-6">
        <h1 class="text-3xl font-bold mb-4">FAQ</h1>

        <div class="flex flex-col gap-4">
            {% for faq in faqs %}
                <div>
                    <h2 class="font-bold text-4xl">Question : {{ faq.question }}</h2>
                    <p class="italic text-gray-700">Dernière modification : {{ faq.updateDate|date("d-m-y") }}</p>
                    <p class="text-2xl ml-10">Réponse : {{ faq.answer }}</p>
                </div>
                <hr class="border-black"/>
            {% endfor %}
        </div>

        <div class="mt-4">
            <a href="{{ path('app_faq_new') }}" class="bg-teal-500 hover:bg-teal-600 text-white py-2 px-4 rounded-full">
                <i class="fas fa-plus-circle"></i> Ajouter une FAQ / Poser une question
            </a>
        </div>

    </div>
{% endblock %}
