<div class="embed-0">
{% set link = null %}
{% set isInternal = true %}

{% if
    content.getFieldValue('lien_interne') is defined and
    content.getFieldValue('lien_interne').destinationContentId is not null and
    content.getFieldValue('lien_interne').destinationContentId is not empty
%}
    {% set link = path( 'ez_urlalias', {'locationId': location_id_by_content_id(content.getFieldValue('lien_interne').destinationContentId)} ) %}
    {% set isInternal = false %}
{% elseif
    content.getFieldValue('lien_externe') is defined and
    content.getFieldValue('lien_externe').link is not null
%}
    {% set link = content.getFieldValue('lien_externe').link %}
{% endif %}
{# Partie sans survol #}
<div>
    <div>
        {% if content.getFieldValue('texte_du_bloc') is defined %}
            <div class="text-bloc">{{ ez_render_field(content, 'texte_du_bloc') }}</div>
        {% endif %}
        {% if
            content.getFieldValue('image_fond_bloc') is defined and
            content.getFieldValue('image_fond_bloc').uri is not null
        %}
            {{ ez_render_field(content, 'image_fond_bloc', { parameters: { alias: "image_rubrique" } }) }}
            {% else %}
                <img alt="" src="{{ asset('bundles/ayalineotpc/images/no_image.jpg') }}" width="320" height="320" />
        {% endif %}
        {% if
        content.getFieldValue('titre') is defined and
        content.getFieldValue('titre').text is not null
        %}
            <h3 class="h3-title">{{ ez_render_field(content, 'titre') }}</h3>
        {% endif %}
    </div>
    {% if link|default %}
        <a href="{{ link }}"{% if isInternal %} target="_blank" {% endif %}>{{ content.contentInfo.name }}</a>
    {% endif %}
</div>
{# Partie de survol #}
<div class="mask">
    {% if
    content.getFieldValue('survol_titre') is defined and
    content.getFieldValue('survol_titre').text is not null
    %}
        <h2>{{ ez_render_field(content, 'survol_titre') }}</h2>
    {% endif %}
    {% if content.getFieldValue('survol_resume') is defined %}
        <p>{{ ez_render_field(content, 'survol_resume') }}</p>
    {% endif %}
    {% if link|default %}
        <a href="{{ link }}"{% if isInternal %} target="_blank" {% endif %}>{{ content.contentInfo.name }}</a>
    {% endif %}
</div>
    <span class="more-info"><span>+</span></span>
</div>