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

{% block content %}
<table width="600" cellpadding="0" cellspacing="0" style="margin: 0 auto;">
    <tr>
        <td style="padding: 32px;">
            {% set badgeColor = severity == 'critical' ? '#991b1b' : (severity == 'danger' ? '#dc2626' : (severity == 'warning' ? '#f59e0b' : '#3b82f6')) %}
            <div style="background: {{ badgeColor }}; color: #fff; padding: 12px 20px; display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 16px;">{{ stepLabel }}</div>

            <h1 style="font-family: Arial, Helvetica, sans-serif; font-size: 20px; font-weight: 700; color: #111827; margin: 0 0 12px;">
                Relance {{ step }} - {{ customer ? customer.fullName : 'Inconnu' }}
            </h1>

            <table width="100%" cellpadding="0" cellspacing="0" style="margin: 20px 0; border: 1px solid #e5e7eb;">
                <tr>
                    <td style="padding: 10px 16px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: #9ca3af; background: #f9fafb; width: 40%;">Avis de paiement</td>
                    <td style="padding: 10px 16px; font-family: monospace; font-size: 13px; font-weight: 700;">{{ advert.orderNumber.numOrder }}</td>
                </tr>
                <tr>
                    <td style="padding: 10px 16px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: #9ca3af; background: #f9fafb;">Client</td>
                    <td style="padding: 10px 16px; font-size: 13px;">{{ customer ? customer.fullName : 'N/A' }}{% if customer and customer.email %}<br><span style="color: #9ca3af; font-size: 11px;">{{ customer.email }}</span>{% endif %}</td>
                </tr>
                <tr>
                    <td style="padding: 10px 16px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: #9ca3af; background: #f9fafb;">{% if tva_enabled %}Montant TTC{% else %}Montant{% endif %}</td>
                    <td style="padding: 10px 16px; font-family: monospace; font-size: 16px; font-weight: 700;">{{ tva_enabled ? advert.totalTtc : advert.totalHt }} &euro;</td>
                </tr>
                <tr>
                    <td style="padding: 10px 16px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: #9ca3af; background: #f9fafb;">Etape</td>
                    <td style="padding: 10px 16px; font-size: 13px; font-weight: 700; color: {{ badgeColor }};">{{ stepLabel }}</td>
                </tr>
                <tr>
                    <td style="padding: 10px 16px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: #9ca3af; background: #f9fafb;">Date</td>
                    <td style="padding: 10px 16px; font-size: 13px;">{{ "now"|date('d/m/Y H:i') }}</td>
                </tr>
            </table>
        </td>
    </tr>
</table>
{% endblock %}
