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

{% block title %}Nouveau Message{% endblock %}

{% block body %}
    <div class="container mx-auto p-6">
        <h1 class="text-3xl font-bold mb-6 text-center">Écrire un Nouveau Message</h1>

        <div class="max-w-lg mx-auto bg-white p-6 rounded-lg shadow">
            {{ form_start(form) }}
            <div class="mb-4">
                <label class="block text-gray-700 font-medium mb-2">Destinataire</label>
                {{ form_widget(form.receiver, {'attr': {'class': 'w-full p-3 border rounded'}}) }}
            </div>

            <div class="mb-4">
                <label class="block text-gray-700 font-medium mb-2">Message</label>
                {{ form_widget(form.content, {'attr': {'class': 'w-full p-3 border rounded', 'rows': 6}}) }}
            </div>

            <button type="submit" class="w-full bg-teal-500 text-white px-4 py-2 rounded hover:bg-teal-600">
                Envoyer
            </button>
            {{ form_end(form) }}
        </div>
    </div>
{% endblock %}