{% for item in module.header.list %}
  {# img thumb #}
  {% set image_parts = pathinfo(item.img_thumb) %}
  {% set image_basename_thumb = image_parts.basename %}
  {% set image_page_thumb = image_parts.dirname == '.' ? module : module.find(image_parts.dirname) %}

  {% set titleHyp = item.title|lower|hyphenize %}

  {% if titleHyp == "bien-tre" %}
    {% set color = "__blue" %}
  {% elseif titleHyp == "nature" %}
    {% set color = "__green" %}
  {% elseif titleHyp == "gastronomie" %}
    {% set color = "__red" %}
  {% else %}
    {% set color = "__grey" %}
  {% endif %}

  <div id="{{titleHyp}}" class="{{section}} __thumbnails">
    <div class="__title">
      <div class="__d-inline">
        <span>{{item.title}}</span>
      </div>
    </div>

    <div class="__thumb __hover">

      {% if section == 'pack' %}
        <a href="#">
          <div class="__images">
            {% include 'components/thumbnails/img_tbn.html.twig' with { list: 'true'}  %}
          </div>
          {% include 'components/buttons/btn.html.twig' with { btn: 'more'} %}
        </a>

      {% else %}

        <a target="_blank" href=" {{item.btn_url}} ">
          <div class="__images">
            {% include 'components/thumbnails/img_tbn.html.twig' with { list: 'true'}  %}
          </div>
          {% include 'components/buttons/btn.html.twig' with { btn: 'link_ext'} %}
        </a>

      {% endif %}

    </div>
    {% if section == 'pack' %}
      {% include 'components/learn_more/more.html.twig' %}
    {% endif %}

  </div>

{% endfor %}

{% if section == 'pack' %}
  <div id="envie" class="{{section}} __thumbnails">

    <div class="__title">
      <div class="__d-inline">
        <span>{{module.header.title_envie}}</span>
      </div>
    </div>

    <div class="__thumb">
      <a target="_blank" href="{{module.header.btn_url_envie}}">
        <div class="__images ">
          {% include 'components/thumbnails/img_tbn.html.twig'  with { list: 'false'} %}
        </div>
        {% include 'components/buttons/btn.html.twig' with { btn: 'envie'} %}
      </a>
    </div>

  </div>
{% endif %}

{% for item in module.header.list_offres %}

  {% set titleHyp = item.title|lower|hyphenize %}

  {% if titleHyp == "bien-tre" %}
    {% set color = "__blue" %}
  {% elseif titleHyp == "nature" %}
    {% set color = "__green" %}
  {% elseif titleHyp == "gastronomie" %}
    {% set color = "__red" %}
  {% else %}
    {% set color = "__grey" %}
  {% endif %}

  <div id="{{titleHyp}}" class="{{section}} __thumbnails">
    {% set image_parts = pathinfo(item.a_file) %}
    {% set image_basename_thumb = image_parts.basename %}
    {% set image_page_thumb = image_parts.dirname == '.' ? module : module.find(image_parts.dirname) %}

    <div class="__title">
      <div class="__d-inline">
        <span>{{item.title}}</span>
      </div>
    </div>

    <div class="__thumb">
      <div class="__images ">
        {{ image_page_thumb.media[image_basename_thumb].html() }}
      </div>
    </div>

  </div>

{% endfor %}
