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

{% block title %}{{ 'marketing.review.policy.page_title'|trans }}{% endblock %}

{% block main %}
    <article class="mx-auto max-w-3xl px-4 py-16 sm:px-6 lg:px-8">
        <header class="mb-10">
            <h1 class="text-3xl font-semibold">{{ 'marketing.review.policy.heading'|trans }}</h1>
            <p class="mt-4">{{ 'marketing.review.policy.intro'|trans }}</p>
        </header>

        <div class="space-y-8">
            <section>
                <h2 class="text-xl font-semibold">{{ 'marketing.review.policy.collection.title'|trans }}</h2>
                <p class="mt-3">{{ 'marketing.review.policy.collection.text'|trans }}</p>
            </section>

            <section>
                <h2 class="text-xl font-semibold">{{ 'marketing.review.policy.verified.title'|trans }}</h2>
                <p class="mt-3">{{ 'marketing.review.policy.verified.text'|trans }}</p>
            </section>

            <section>
                <h2 class="text-xl font-semibold">{{ 'marketing.review.policy.control.title'|trans }}</h2>
                <p class="mt-3">
                    {{ (moderation_enabled
                        ? 'marketing.review.policy.control.enabled'
                        : 'marketing.review.policy.control.disabled')|trans }}
                </p>
                <p class="mt-3">{{ 'marketing.review.policy.control.contact'|trans }}</p>
            </section>

            <section>
                <h2 class="text-xl font-semibold">{{ 'marketing.review.policy.neutrality.title'|trans }}</h2>
                <p class="mt-3">{{ 'marketing.review.policy.neutrality.text'|trans }}</p>
                <p class="mt-3">{{ 'marketing.review.policy.neutrality.example'|trans }}</p>
            </section>

            <section>
                <h2 class="text-xl font-semibold">{{ 'marketing.review.policy.refusal.title'|trans }}</h2>
                <p class="mt-3">{{ 'marketing.review.policy.refusal.intro'|trans }}</p>
                <ul class="mt-3 list-disc space-y-2 pl-6">
                    <li>{{ 'marketing.review.policy.refusal.illegal'|trans }}</li>
                    <li>{{ 'marketing.review.policy.refusal.personal_data'|trans }}</li>
                    <li>{{ 'marketing.review.policy.refusal.off_topic'|trans }}</li>
                    <li>{{ 'marketing.review.policy.refusal.spam'|trans }}</li>
                    <li>{{ 'marketing.review.policy.refusal.fraud'|trans }}</li>
                    <li>{{ 'marketing.review.policy.refusal.incomprehensible'|trans }}</li>
                </ul>
                <p class="mt-3">{{ 'marketing.review.policy.refusal.notice'|trans }}</p>
            </section>

            <section>
                <h2 class="text-xl font-semibold">{{ 'marketing.review.policy.publication.title'|trans }}</h2>
                <p class="mt-3">
                    {{ 'marketing.review.policy.publication.text'|trans({
                        '%publication_days%': constant('CpCreation\\VitiCore\\Marketing\\ReviewPublicationPolicy::MAX_PUBLICATION_DELAY_DAYS'),
                        '%retention_years%': constant('CpCreation\\VitiCore\\Marketing\\ReviewPublicationPolicy::PUBLIC_RETENTION_YEARS')
                    }) }}
                </p>
                <p class="mt-3">{{ 'marketing.review.policy.publication.sort'|trans }}</p>
                <p class="mt-3">
                    {{ 'marketing.review.policy.publication.purge'|trans({
                        '%grace_days%': constant('CpCreation\\VitiCore\\Marketing\\ReviewPublicationPolicy::UNUSED_INVITATION_GRACE_DAYS'),
                        '%retention_years%': constant('CpCreation\\VitiCore\\Marketing\\ReviewPublicationPolicy::REVIEW_DATA_RETENTION_YEARS')
                    }) }}
                </p>
            </section>

            <section>
                <h2 class="text-xl font-semibold">{{ 'marketing.review.policy.compensation.title'|trans }}</h2>
                <p class="mt-3">{{ 'marketing.review.policy.compensation.text'|trans }}</p>
            </section>

            <section>
                <h2 class="text-xl font-semibold">{{ 'marketing.review.policy.changes.title'|trans }}</h2>
                <p class="mt-3">{{ 'marketing.review.policy.changes.text'|trans }}</p>
            </section>

            <section>
                <h2 class="text-xl font-semibold">{{ 'marketing.review.policy.reply.title'|trans }}</h2>
                <p class="mt-3">{{ 'marketing.review.policy.reply.text'|trans }}</p>
            </section>

            {% if policy_additional_content|default('')|striptags|trim is not empty %}
                <section>
                    <h2 class="text-xl font-semibold">{{ 'marketing.review.policy.additional.title'|trans }}</h2>
                    <div class="prose mt-3 max-w-none">
                        {{ policy_additional_content|raw }}
                    </div>
                </section>
            {% endif %}

            <section>
                <h2 class="text-xl font-semibold">{{ 'marketing.review.policy.certification.title'|trans }}</h2>
                <p class="mt-3">{{ 'marketing.review.policy.certification.text'|trans }}</p>
            </section>
        </div>
    </article>
{% endblock %}
