{% if content_adresse is defined and content_adresse is not empty and content_adresse|length > 0 %}
{% set class = '' %}
{% if classCSS is defined and classCSS is not empty %}
{% set class = classCSS %}
{% endif %}
<div>
{% if title is defined and title is not empty and title|length > 0 %}
<div class="fw600{{class}}">{{title|raw}}</div>
{% endif %}
{{content_adresse[0]}}
</div>
{% endif %}
{% if content_phone is defined and content_phone is not empty and (content|length) > 0 %}
<div class="mb-1em">
{% if content_phone starts with '+33' %}
{% set formatted_content_phone = (content_phone|slice(0, 3)) ~ ' ' ~ (content_phone|slice(3, 1)) ~ ' ' ~ (content_phone|slice(4, 2)) ~ ' ' ~ (content_phone|slice(6, 2)) ~ ' ' ~ (content_phone|slice(8, 2)) %}
{% elseif content_phone starts with '0' %}
{% set formatted_content_phone = (content_phone|slice(0, 2)) ~ ' ' ~ (content_phone|slice(2, 2)) ~ ' ' ~ (content_phone|slice(4, 2)) ~ ' ' ~ (content_phone|slice(6, 2)) ~ ' ' ~ (content_phone|slice(8, 2)) %}
{% else %}
{% set formatted_content_phone = content_phone %}
{# Retourne tel quel si format non reconnu #}
{% endif %}
Tél.
{{ formatted_content_phone }}
</div>
{% endif %}
{% if content_email is defined and content_email is not empty %}
<div class="mb-1em">
<a href="mailto:{{content_email|raw}}">{{ content_email|raw}}</a>
</div>
{% endif %}
{% if content_link is defined and content_link is not empty and content_link|length > 0 %}
<div class="mb-1em">
<a class="CTA nodeco fw500 diblock" href="{{content_link}}" target="_blank">Site web</a>
</div>
{% endif %}
{% if content_other_link is defined and content_other_link is not empty and content_other_link|length > 0 %}
<div class="mb-1em">
<a class="CTA nodeco fw500 diblock" href="{{content_other_link}}" target="_blank">Autre lien</a>
</div>
{% endif %}
{% if content_other_file is defined and content_other_file is not empty and content_other_file|length > 0 %}
<div class="mb-1em">
<a class="CTA nodeco fw500 diflex aic" href="{{content_other_file.url}}">
<svg width="14" height="17" viewbox="0 0 14 17" fill="none" xmlns="http://www.w3.org/2000/svg" class="mr-0p5em">
<path fill-rule="evenodd" clip-rule="evenodd" d="M0 15.3164C-2.41411e-08 14.7641 0.447715 14.3164 1 14.3164H13C13.5523 14.3164 14 14.7641 14 15.3164C14 15.8687 13.5523 16.3164 13 16.3164H1C0.447715 16.3164 2.41411e-08 15.8687 0 15.3164ZM3.29289 7.6093C3.68342 7.21877 4.31658 7.21877 4.70711 7.6093L6 8.90219L6 1.31641C6 0.764122 6.44771 0.316406 7 0.316406C7.55228 0.316406 8 0.764121 8 1.31641L8 8.90219L9.29289 7.6093C9.68342 7.21877 10.3166 7.21877 10.7071 7.6093C11.0976 7.99982 11.0976 8.63299 10.7071 9.02351L7.70711 12.0235C7.51957 12.211 7.26522 12.3164 7 12.3164C6.73478 12.3164 6.48043 12.211 6.29289 12.0235L3.29289 9.02351C2.90237 8.63299 2.90237 7.99982 3.29289 7.6093Z" fill="white"></path>
</svg>
{{' '}}Téléchargez le fichier associé
</a>
</div>
{% endif %}