{% 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;">Echeancier termine</div>
            <h1 style="font-family: Arial, Helvetica, sans-serif; font-size: 20px; font-weight: 700; color: #111827; margin: 0 0 12px;">{{ echeancier.reference }} - {{ customer.fullName }}</h1>
            <p style="font-family: Arial, Helvetica, sans-serif; font-size: 13px; color: #374151; line-height: 20px; margin: 0 0 16px;">
                Toutes les echeances ont ete payees. L'echeancier est termine.
                {% if echeancier.advert %}L'avis {{ echeancier.advert.orderNumber.numOrder }} a ete passe en accepte.{% endif %}
            </p>
            <table width="100%" cellpadding="0" cellspacing="0" style="margin: 20px 0; border: 1px solid #e5e7eb;">
                <tr>
                    <td style="padding: 12px 16px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: #9ca3af; background: #f9fafb; width: 40%;">Reference</td>
                    <td style="padding: 12px 16px; font-family: monospace; font-size: 13px; font-weight: 700;">{{ echeancier.reference }}</td>
                </tr>
                <tr>
                    <td style="padding: 12px 16px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: #9ca3af; background: #f9fafb;">Client</td>
                    <td style="padding: 12px 16px; font-size: 13px;">{{ customer.fullName }}</td>
                </tr>
                <tr>
                    <td style="padding: 12px 16px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: #9ca3af; background: #f9fafb;">Total paye</td>
                    <td style="padding: 12px 16px; font-family: monospace; font-size: 14px; font-weight: 700; color: #16a34a;">{{ echeancier.totalPaid|number_format(2, ',', ' ') }} &euro;</td>
                </tr>
                <tr>
                    <td style="padding: 12px 16px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: #9ca3af; background: #f9fafb;">Echeances</td>
                    <td style="padding: 12px 16px; font-size: 13px; font-weight: 700;">{{ echeancier.nbPaid }}/{{ echeancier.nbLines }}</td>
                </tr>
                {% if echeancier.advert %}
                <tr>
                    <td style="padding: 12px 16px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: #9ca3af; background: #f9fafb;">Avis lie</td>
                    <td style="padding: 12px 16px; font-size: 13px; font-weight: 700;">{{ echeancier.advert.orderNumber.numOrder }}</td>
                </tr>
                {% endif %}
            </table>
        </td>
    </tr>
</table>
{% endblock %}
