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

{% block content %}
<table width="600" cellpadding="0" cellspacing="0" style="margin: 0 auto;">
    <tr>
        <td style="padding: 32px;">
            <h1 style="font-family: Arial, Helvetica, sans-serif; font-size: 22px; font-weight: 700; color: #111827; margin: 0 0 16px; line-height: 28px;">{{ customer.raisonSociale ? 'Chez ' ~ customer.raisonSociale : 'Bonjour ' ~ customer.firstName }},</h1>

            <p style="font-family: Arial, Helvetica, sans-serif; font-size: 14px; color: #374151; line-height: 22px; margin: 0 0 16px;">
                Votre devis <strong>{{ devis.orderNumber.numOrder }}</strong> est disponible et attend votre signature.
            </p>

            <table width="100%" cellpadding="0" cellspacing="0" style="margin: 24px 0; border-top: 1px solid #e5e7eb; border-bottom: 1px solid #e5e7eb;">
                <tr>
                    <td style="padding: 16px 0;">
                        <table width="100%" cellpadding="0" cellspacing="0">
                            <tr>
                                <td style="font-family: Arial, Helvetica, sans-serif; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: #9ca3af; padding-bottom: 4px;">Numero de devis</td>
                                <td style="font-family: Arial, Helvetica, sans-serif; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: #9ca3af; padding-bottom: 4px; text-align: right;">{% if tva_enabled %}Total TTC{% else %}Total{% endif %}</td>
                            </tr>
                            <tr>
                                <td style="font-family: monospace; font-size: 14px; font-weight: 700; color: #111827;">{{ devis.orderNumber.numOrder }}</td>
                                <td style="font-family: Arial, Helvetica, sans-serif; font-size: 16px; font-weight: 700; color: #111827; text-align: right;">{{ tva_enabled ? devis.totalTtc : devis.totalHt }} &euro;</td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>

            <p style="font-family: Arial, Helvetica, sans-serif; font-size: 14px; color: #374151; line-height: 22px; margin: 0 0 24px;">
                Cliquez sur le bouton ci-dessous pour consulter le detail de votre devis, le signer ou le refuser.
            </p>

            <table cellpadding="0" cellspacing="0" style="margin: 0 auto;">
                <tr>
                    <td style="background-color: #fabf04; padding: 14px 32px;">
                        <a href="{{ processUrl }}" style="font-family: Arial, Helvetica, sans-serif; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: #111827; text-decoration: none;">Consulter mon devis</a>
                    </td>
                </tr>
            </table>

            <p style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: #9ca3af; line-height: 18px; margin: 24px 0 0;">
                Si le bouton ne fonctionne pas, copiez ce lien dans votre navigateur :<br>
                <span style="font-family: monospace; font-size: 11px; color: #6366f1; word-break: break-all;">{{ processUrl }}</span>
            </p>
        </td>
    </tr>
</table>
{% endblock %}
