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

{% block title %}Commande {{ action }} - {{ order.event.title }}{% endblock %}

{% block content %}
    <h2>Commande {{ action }}</h2>
    <p>Bonjour,</p>
    <p>La commande <strong>{{ order.orderNumber }}</strong> pour l'evenement <strong>{{ order.event.title }}</strong> a ete <strong>{{ action }}</strong>.</p>

    <table style="width: 100%; border-collapse: collapse; margin: 20px 0; border: 2px solid #111827;">
        <tr style="border-bottom: 1px solid #e5e7eb;">
            <td style="padding: 10px 12px; font-weight: 900; text-transform: uppercase; font-size: 11px; color: #6b7280; width: 140px;">Commande</td>
            <td style="padding: 10px 12px; font-weight: 700; font-size: 14px;">{{ order.orderNumber }}</td>
        </tr>
        <tr style="border-bottom: 1px solid #e5e7eb;">
            <td style="padding: 10px 12px; font-weight: 900; text-transform: uppercase; font-size: 11px; color: #6b7280;">Statut</td>
            <td style="padding: 10px 12px; font-weight: 700; color: #dc2626;">{{ action|upper }}</td>
        </tr>
        <tr style="border-bottom: 1px solid #e5e7eb;">
            <td style="padding: 10px 12px; font-weight: 900; text-transform: uppercase; font-size: 11px; color: #6b7280;">Acheteur</td>
            <td style="padding: 10px 12px; font-weight: 700;">{{ order.firstName }} {{ order.lastName }}</td>
        </tr>
        <tr style="border-bottom: 1px solid #e5e7eb;">
            <td style="padding: 10px 12px; font-weight: 900; text-transform: uppercase; font-size: 11px; color: #6b7280;">Email</td>
            <td style="padding: 10px 12px;">{{ order.email }}</td>
        </tr>
        <tr>
            <td style="padding: 10px 12px; font-weight: 900; text-transform: uppercase; font-size: 11px; color: #6b7280;">Montant HT</td>
            <td style="padding: 10px 12px; font-weight: 900; color: #4f46e5;">{{ order.totalHTDecimal|number_format(2, ',', ' ') }} &euro;</td>
        </tr>
    </table>

    {{ include('email/_order_items_table.html.twig', {order: order}) }}

    <p style="font-size: 12px; color: #9ca3af;">Les billets associes a cette commande ont ete invalides. Vous pouvez consulter le detail depuis votre espace organisateur.</p>
{% endblock %}
