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

{% block content %}
<table width="600" cellpadding="0" cellspacing="0" style="margin: 0 auto;">
    <tr>
        <td style="padding: 32px;">
            <div style="background: #16a34a; color: #fff; padding: 12px 20px; display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 16px;">Devis signe</div>
            <h1 style="font-family: Arial, Helvetica, sans-serif; font-size: 20px; font-weight: 700; color: #111827; margin: 0 0 12px;">Le client {{ customer.fullName }} a signe le devis {{ devis.orderNumber.numOrder }}</h1>
            <p style="font-family: Arial, Helvetica, sans-serif; font-size: 13px; color: #374151; line-height: 20px; margin: 0 0 16px;">
                Le PDF signe et le certificat d'audit DocuSeal sont en piece jointe.
            </p>
            <table width="100%" cellpadding="0" cellspacing="0" style="margin: 20px 0; border: 1px solid #e5e7eb;">
                <tr>
                    <td style="padding: 12px 16px; font-family: Arial; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: #9ca3af; background: #f9fafb; width: 40%;">Numero</td>
                    <td style="padding: 12px 16px; font-family: monospace; font-size: 13px; font-weight: 700;">{{ devis.orderNumber.numOrder }}</td>
                </tr>
                <tr>
                    <td style="padding: 12px 16px; font-family: Arial; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: #9ca3af; background: #f9fafb;">Client</td>
                    <td style="padding: 12px 16px; font-family: Arial; font-size: 13px;">{{ customer.fullName }}{% if customer.email %}<br><span style="color: #9ca3af; font-size: 11px;">{{ customer.email }}</span>{% endif %}</td>
                </tr>
                <tr>
                    <td style="padding: 12px 16px; font-family: Arial; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: #9ca3af; background: #f9fafb;">Total HT</td>
                    <td style="padding: 12px 16px; font-family: monospace; font-size: 13px;">{{ devis.totalHt }} &euro;</td>
                </tr>
                <tr>
                    <td style="padding: 12px 16px; font-family: Arial; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: #9ca3af; background: #f9fafb;">{% if tva_enabled %}Total TTC{% else %}Total{% endif %}</td>
                    <td style="padding: 12px 16px; font-family: monospace; font-size: 14px; font-weight: 700;">{{ tva_enabled ? devis.totalTtc : devis.totalHt }} &euro;</td>
                </tr>
                <tr>
                    <td style="padding: 12px 16px; font-family: Arial; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: #9ca3af; background: #f9fafb;">Signe le</td>
                    <td style="padding: 12px 16px; font-family: Arial; font-size: 13px;">{{ "now"|date('d/m/Y H:i') }}</td>
                </tr>
            </table>
        </td>
    </tr>
</table>
{% endblock %}
