{% set contact = this.contact %}

<div {{ attributes.defaults({ class: 'theme-footer' }) }}>
    {% block footer_media %}
        <div class="theme-footer__media">
            <twig:Image
                mapping="public"
                class="theme-background-image"
                alt="{{ 'background-header.footer'|trans({}, 'img') }}"
                lazy="{{ false }}"
                picture:style="width: 100%; height: 100%;"
                path="{{ viti_theme_asset('images/bg-footer.jpg') }}"
                pathLandscape="{{ viti_theme_asset('images/bg-footer.jpg') }}"
                ratio="3/1"
                imageWidth="2500"
                imageHeight="800"
            />
        </div>
    {% endblock %}

    <div class="theme-container theme-footer__content">
        {% block footer_navigation %}
            <nav class="theme-footer__menu" aria-label="{{ 'balise.menu'|trans({}, 'meta') }}">
                <a href="{{ path('home') }}" data-scroll-ignore title="{{ 'home.balise'|trans({}, 'meta') }}">{{ 'home'|trans({}, 'menu') }}</a>
                <a href="{{ path('cuvees') }}" title="{{ 'cuvee.balise'|trans({}, 'meta') }}">{{ 'cuvees'|trans({}, 'menu') }}</a>
                <a href="{{ path('shop') }}" title="{{ 'shop.balise'|trans({}, 'meta') }}">{{ 'shop'|trans({}, 'menu') }}</a>
                <a href="{{ path('contact') }}" data-scroll-ignore title="{{ 'contact.balise'|trans({}, 'meta') }}">{{ 'contact'|trans({}, 'menu') }}</a>
            </nav>
        {% endblock %}

        {% block footer_actions %}
            <div class="theme-footer__contact">
                {% include 'partials/_social_links.html.twig' with { contact: contact, tone: 'light' } only %}
                <a class="theme-button-stroke theme-hover-link-effect" href="{{ path('contact') }}" title="{{ 'contact.balise'|trans({}, 'meta') }}">{{ 'homepage.presentation-contact-button_2'|trans }}</a>
            </div>
        {% endblock %}

        {% block footer_address %}
            <address class="theme-footer__address">
                {% block footer_brand %}
                    <twig:theme:BrandMark variant="pictogram_light" alt="{{ 'content.picto'|trans({}, 'img') }}" />
                {% endblock %}
                {% if contact %}
                    <p>
                        {{ contact.address }}<br>
                        {{ contact.postal }} {{ contact.city }}<br>
                        {% if contact.phone1 %}
                            <a title="{{ 'balise.contact.tel'|trans({}, 'meta') }}" href="tel:{{ contact.phone1 }}">{{ contact.phone1 }}</a><br>
                        {% endif %}
                        {% if contact.phone2 %}
                            <a title="{{ 'balise.contact.tel'|trans({}, 'meta') }}" href="tel:{{ contact.phone2 }}">{{ contact.phone2 }}</a><br>
                        {% endif %}
                        {% if contact.phone3 %}
                            {{ contact.phone3 }}
                        {% endif %}
                    </p>
                {% endif %}
            </address>
        {% endblock %}

        {% block footer_legal %}
            <div class="theme-footer__legals">
                <a href="{{ path('legals') }}" title="{{ 'legals.balise'|trans({}, 'meta') }}">{{ 'legals'|trans({}, 'menu') }}</a>
                <span aria-hidden="true"> · </span>
                <a href="{{ path('shop_withdrawal') }}">{{ 'withdrawal.access_link'|trans }}</a>
            </div>
        {% endblock %}
    </div>

    {% block footer_responsibility %}
        <div class="theme-footer__drinking">
            <p>{{ 'alcool_announcement'|trans }}</p>
        </div>
    {% endblock %}
</div>
