{% extends 'base_landing.html.twig' %} {% block jsonld %} {% endblock %} {% block body %} {# ====== HERO ====== #}
{% if page.featuredMedia %}
{% endif %}

{{ page.title }}

{% if page.seoDescription %}

{{ page.seoDescription }}

{% endif %} {% if page.ctaUrl %} {% set _cta_href = page.ctaUrl %} {# Passe les UTM au lien RDV #} {% if app.request.query.get('utm_source') %} {% set _utm_params = { utm_source: app.request.query.get('utm_source', ''), utm_medium: app.request.query.get('utm_medium', ''), utm_campaign: app.request.query.get('utm_campaign', '') }|filter(v => v is not empty) %} {% if _utm_params is not empty %} {% set _sep = '?' in _cta_href ? '&' : '?' %} {% set _cta_href = _cta_href ~ _sep ~ _utm_params|url_encode %} {% endif %} {% endif %} {{ page.ctaText|default('Réserver un appel') }} {% elseif page.showForm is not same as(false) %} {{ page.ctaText|default('Nous contacter') }} {% endif %}
{# ====== CONTENU TIPTAP ====== #} {% if page.content is not empty %}
{{ page.content|raw }}
{% endif %} {# ====== FORMULAIRE INTÉGRÉ ====== #} {% if page.showForm is not same as(false) and landingForm is defined %}

{{ page.formTitle|default(page.ctaUrl ? 'Pas encore prêt ? Laissez vos coordonnées' : 'Laissez vos coordonnées') }}

{{ form_start(landingForm, {attr: {class: 'landing-form__body', novalidate: 'novalidate'}}) }}
{{ form_label(landingForm.name) }} {{ form_widget(landingForm.name) }} {{ form_errors(landingForm.name) }}
{{ form_label(landingForm.email) }} {{ form_widget(landingForm.email) }} {{ form_errors(landingForm.email) }}
{{ form_label(landingForm.activity) }} {{ form_widget(landingForm.activity) }} {{ form_errors(landingForm.activity) }}
{# Honeypot #} {{ form_widget(landingForm.website) }} {# UTM — préremplis via JS #} {{ form_widget(landingForm.utm_source) }} {{ form_widget(landingForm.utm_medium) }} {{ form_widget(landingForm.utm_campaign) }} {% if recaptcha_site_key %} {% endif %} {{ form_end(landingForm) }}
{% endif %} {# ====== CTA FINAL (répété si lien RDV) ====== #} {% if page.ctaUrl %}
{{ page.ctaText|default('Réserver un appel') }}
{% endif %} {# ====== UTM auto-fill + reCAPTCHA ====== #} {% if recaptcha_site_key %} {% endif %} {% endblock %}