{% extends 'base.html.twig' %}
{% block title %}{% trans from 'meta' %}contact.title{% endtrans %}{% endblock %}
{% block meta %}
    <meta name="robots" content="index,follow">
    <meta name="description" lang="{{ app.request.locale }}"
          content="{% trans from 'meta' %}contact.description{% endtrans %}">
    <meta property="og:site_name" content="{% trans from 'meta' %}contact.title{% endtrans %}">
    <meta property="og:title" content="{% trans from 'meta' %}contact.title{% endtrans %}">
    <meta property="og:type" content="website">
    <meta property="og:url" content="{{ app.request.uri }}">
    <meta property="og:image" content="{{ absolute_url('bundles/cpcreationtheme1/images/logo.jpg') }}">
    <meta property="og:locale" content="{{ app.request.locale }}">
    <meta property="og:image:type" content="image/jpeg">
    <meta property="og:image:width" content="600">
    <meta property="og:image:height" content="450">
    <meta property="og:description"
          content="{% trans from 'meta' %}contact.description{% endtrans %}">
    <link rel="canonical" href="{{ absolute_url(path('contact')) }}"/>

{% endblock meta %}
{% block header_bottom %}
    <div class="grid-container title">
        <h1>{% trans %}contact.title{% endtrans %}</h1>
        <div class="container">
            <p class="text-center subtitle">{% trans %}contact.subtitle{% endtrans %}</p>
        </div>
    </div>
{% endblock %}
{% block content %}
    <section id="contact">
        <div id="map" data-company="{% trans %}company{% endtrans %}" data-lat="49.0684068" data-lng="3.96491694"></div>
        <div class="grid-container contact">
            <div class="grid-x grid-margin-x small-up-1 medium-up-2 align-middle ">
                <div class="cell">
                    <form id="contactForm" action="{{ path('contact') }}" method="post">
                        <div class="form-group">
                            {{ form_row(form.lastname) }}
                        </div>
                        <div class="form-group">
                            {{ form_row(form.email) }}
                        </div>
                        <div class="form-group">
                            {{ form_row(form.message) }}
                        </div>
                        <div class="form-group">
                            {{ form_rest(form) }}
                            {% if reCaptchaKeyPublic != false %}
                                <div class="g-recaptcha fullwidth" data-sitekey="{{ reCaptchaKeyPublic }}"></div>
                            {% endif %}
                            <button class="contact-submit"
                                    type="submit">{% trans %}contact.form.submit{% endtrans %}</button>
                        </div>
                    </form>
                </div>
                <div class="cell address text-center">
                    <img src="{{ asset('bundles/cpcreationtheme1/images/logo_n.svg') }}"
                         alt="Logo {% trans from 'meta' %}company_name{% endtrans %}">
                    <p>{{ contact.company }} <br/>
                        {{ contact.address }} - {{ contact.postal }} {{ contact.city }}<br/>
                        Tél. : <a href="tel:{{ contact.phone1 }}">{{ contact.phone1 }}</a> <br/>
                        {% if  contact.phone2 %}Tél. : <a href="tel:{{ contact.phone2 }}">{{ contact.phone2 }}</a>
                            <br/> {% endif %}
                        {% if  contact.phone3 %}Fax : {{ contact.phone3 }}  <br/> {% endif %}
                    </p>
                    <br/>
                    <p>{{ 'contact.text'|trans|nl2br }}</p>
                </div>
            </div>
        </div>
    </section>
{% endblock %}
{% block javascripts %}
    {% if recaptchaEnterprise is null and recaptchaEnterprise == false %}
        <script src='https://www.google.com/recaptcha/api.js' async defer></script>
    {% endif %}
{% endblock %}
