<!DOCTYPE html>
<html lang="{{ locale|default('fr') }}">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="x-apple-disable-message-reformatting">
    <title>{{ (resubmission
        ? 'marketing.review.submission_mail.resubmitted_subject'
        : 'marketing.review.submission_mail.subject')|trans({'%product%': product_label}, 'messages', locale|default('fr')) }}</title>
    <style>
        body, table, td, a {
            -webkit-text-size-adjust: 100%;
            -ms-text-size-adjust: 100%;
        }

        table {
            border-collapse: collapse !important;
        }

        img {
            border: 0;
            height: auto;
            line-height: 100%;
            outline: none;
            text-decoration: none;
            -ms-interpolation-mode: bicubic;
        }

        @media only screen and (max-width: 640px) {
            .email-shell { padding: 20px 12px !important; }
            .email-card { width: 100% !important; }
            .email-header, .email-body { padding-right: 22px !important; padding-left: 22px !important; }
            .email-header { padding-top: 32px !important; padding-bottom: 24px !important; }
            .email-body { padding-top: 26px !important; padding-bottom: 32px !important; }
            .email-logo { max-width: 150px !important; margin-bottom: 20px !important; }
            .email-title { font-size: 28px !important; }
            .email-actions td { display: block !important; width: 100% !important; padding: 0 0 10px !important; }
            .email-actions a { display: block !important; text-align: center !important; }
            .detail-label, .detail-value { display: block !important; width: auto !important; padding-right: 18px !important; padding-left: 18px !important; }
            .detail-label { padding-bottom: 2px !important; }
            .detail-value { padding-top: 2px !important; }
        }
    </style>
</head>
<body style="margin:0; padding:0; background:#f7f2ea; color:#201917; font-family:Arial, Helvetica, sans-serif;">
<table role="presentation" width="100%" cellspacing="0" cellpadding="0" style="width:100%; margin:0; padding:0; background:#f7f2ea;">
    <tr>
        <td class="email-shell" align="center" style="padding:32px 16px;">
            <table role="presentation" width="640" cellspacing="0" cellpadding="0" class="email-card" style="width:100%; max-width:640px; background:#ffffff;">
                <tr>
                    <td class="email-header" style="padding:40px 40px 28px; text-align:center; background:#fcfaf7;">
                        {% if contact and contact.image and contact.image.path %}
                            <img
                                src="{{ absolute_url(asset(contact.image.path)|imagine_filter('logo_email_filter')) }}"
                                alt="{{ contact.image.title ?: company }}"
                                width="180"
                                class="email-logo"
                                style="display:block; width:100%; max-width:180px; margin:0 auto 24px;"
                            >
                        {% endif %}
                        <div style="font-size:12px; letter-spacing:0.22em; text-transform:uppercase; color:#9d7c47;">{{ company }}</div>
                        <h1 class="email-title" style="margin:16px 0 0; font-family:Georgia, 'Times New Roman', serif; font-size:34px; line-height:1.25; font-weight:400; color:#201917;">
                            {{ (resubmission
                                ? 'marketing.review.submission_mail.resubmitted_heading'
                                : 'marketing.review.submission_mail.heading')|trans({}, 'messages', locale|default('fr')) }}
                        </h1>
                    </td>
                </tr>
                <tr>
                    <td class="email-body" style="padding:32px 40px 40px; font-size:16px; line-height:1.7; color:#5d4b41;">
                        <p style="margin:0 0 26px;">{{ 'marketing.review.submission_mail.intro'|trans({
                            '%author%': review.authorDisplayName,
                            '%product%': product_label
                        }, 'messages', locale|default('fr')) }}</p>

                        <table role="presentation" width="100%" cellspacing="0" cellpadding="0" style="width:100%; margin:0 0 26px; background:#fcfaf7;">
                            <tr>
                                <td colspan="2" style="padding:20px 22px 12px; font-family:Georgia, 'Times New Roman', serif; font-size:22px; line-height:1.35; color:#201917;">
                                    {{ 'marketing.review.submission_mail.details_heading'|trans({}, 'messages', locale|default('fr')) }}
                                </td>
                            </tr>
                            <tr>
                                <td class="detail-label" width="34%" style="padding:9px 10px 9px 22px; font-size:13px; color:#806f65;">
                                    {{ 'marketing.review.field.author'|trans({}, 'messages', locale|default('fr')) }}
                                </td>
                                <td class="detail-value" style="padding:9px 22px 9px 10px; color:#201917;">{{ review.authorDisplayName }}</td>
                            </tr>
                            <tr>
                                <td class="detail-label" width="34%" style="padding:9px 10px 9px 22px; font-size:13px; color:#806f65;">
                                    {{ 'marketing.review.field.product'|trans({}, 'messages', locale|default('fr')) }}
                                </td>
                                <td class="detail-value" style="padding:9px 22px 9px 10px; color:#201917;">{{ product_label }}</td>
                            </tr>
                            <tr>
                                <td class="detail-label" width="34%" style="padding:9px 10px 9px 22px; font-size:13px; color:#806f65;">
                                    {{ 'marketing.review.field.rating'|trans({}, 'messages', locale|default('fr')) }}
                                </td>
                                <td class="detail-value" style="padding:9px 22px 9px 10px; color:#201917; font-size:18px; font-weight:700;">{{ review.rating }}/5</td>
                            </tr>
                            <tr>
                                <td class="detail-label" width="34%" style="padding:9px 10px 20px 22px; font-size:13px; color:#806f65;">
                                    {{ 'marketing.review.field.date'|trans({}, 'messages', locale|default('fr')) }}
                                </td>
                                <td class="detail-value" style="padding:9px 22px 20px 10px; color:#201917;">{{ review.submittedAt|date('d/m/Y H:i') }}</td>
                            </tr>
                        </table>

                        <table role="presentation" width="100%" cellspacing="0" cellpadding="0" style="width:100%; margin:0 0 24px; border:1px solid #e7ded4;">
                            {% if review.title %}
                                <tr>
                                    <td style="padding:20px 22px 0; font-weight:700; color:#201917;">{{ review.title }}</td>
                                </tr>
                            {% endif %}
                            <tr>
                                <td style="padding:{{ review.title ? '12px' : '20px' }} 22px 20px; color:#5d4b41;">
                                    <div style="margin:0 0 8px; font-size:13px; color:#806f65;">{{ 'marketing.review.field.comment'|trans({}, 'messages', locale|default('fr')) }}</div>
                                    <div style="color:#201917;">{{ review.comment|nl2br }}</div>
                                </td>
                            </tr>
                        </table>

                        <table role="presentation" width="100%" cellspacing="0" cellpadding="0" style="width:100%; margin:0 0 26px; background:#f7f2ea;">
                            <tr>
                                <td style="padding:18px 20px; font-size:14px; line-height:1.65; color:#5d4b41;">
                                    {{ 'marketing.review.submission_mail.neutrality_notice'|trans({}, 'messages', locale|default('fr')) }}
                                </td>
                            </tr>
                        </table>

                        {% if publish_url or reject_url %}
                            <p style="margin:0 0 18px; font-size:14px;">{{ 'marketing.review.submission_mail.action_help'|trans({}, 'messages', locale|default('fr')) }}</p>
                            <table role="presentation" cellspacing="0" cellpadding="0" class="email-actions" style="margin:0;">
                                <tr>
                                    {% if publish_url %}
                                        <td style="padding:0 10px 0 0;">
                                            <a href="{{ publish_url }}" style="display:inline-block; padding:14px 20px; background:#2f6b4f; color:#ffffff; text-decoration:none; font-weight:700;">
                                                {{ 'marketing.review.submission_mail.publish_button'|trans({}, 'messages', locale|default('fr')) }}
                                            </a>
                                        </td>
                                    {% endif %}
                                    {% if reject_url %}
                                        <td style="padding:0;">
                                            <a href="{{ reject_url }}" style="display:inline-block; padding:13px 20px; border:1px solid #9b3d36; color:#81322d; text-decoration:none; font-weight:700;">
                                                {{ 'marketing.review.submission_mail.reject_button'|trans({}, 'messages', locale|default('fr')) }}
                                            </a>
                                        </td>
                                    {% endif %}
                                </tr>
                            </table>
                        {% else %}
                            <p style="margin:0;">
                                <a href="{{ moderation_url }}" style="display:inline-block; padding:14px 20px; background:#201917; color:#ffffff; text-decoration:none; font-weight:700;">
                                    {{ 'marketing.review.submission_mail.view_button'|trans({}, 'messages', locale|default('fr')) }}
                                </a>
                            </p>
                        {% endif %}
                    </td>
                </tr>
            </table>
        </td>
    </tr>
</table>
</body>
</html>
