<div class="bg_color_1 pt-0 mt-5 container container-custom margin_80_0">
<div class="">
<h2 class="mb-2">{{ 'home.bonCoinsDivertissant'|trans([],'home_page') }}</h2>
<p>
{{ 'home.sloganData'|trans([],'home_page') }}
</p>
</div>
{% for category in categories %}
{% if category.attractions |length != 0 %}
<div class="row d-flex flex-row mb-md-5" id="#{{ category.name }}">
<div class="col-12 col-md-3 d-flex mr-2 mb-3">
<div class="d-flex text-dark justify-content-center align-items-center"
style="width: 100%; border-radius: 7px; margin-right: 10px; background-color: initial; box-shadow: 0 0px 1px rgba(0, 0, 0, 0.0);">
<h3 class="card-title text-center" style="color: #bd2879 !important; "><a
href="{{ path('app_coin_by_category', {'category': category.id, 'name': category.slug }) }}"><i
class="{{ category.icone is not defined ? '' : category.icone }}"
style="color: #1e90a0;"></i> {{ category.name }}</a></h3>
</div>
</div>
<div class="carousel-container col-12 col-md-9 d-flex flex-row">
<div class="mon-carousel">
{% for attraction in category.attractions %}
<div class="ma-card" style="width: 100%; position: relative;">
<span class="text-center"
style="position: absolute; top: 5px; right: 5px; font-size: 30px; z-index: 10; color: #ff0000; background-color: white; height: 45px; width: 45px; border-radius: 5px 10px; border: 1px solid black;">
{% set isFavorite = false %}
{% set favorite_id = 0 %}
{% if isAuthenticated %}
{% for favorite in attraction.favorites %}
{% if favorite.user is defined and favorite.user.id is defined and user is defined and user.id is defined %}
{% if favorite.user.id == user.id %}
{% set isFavorite = true %}
{% set favorite_id = favorite.id %}
{% endif %}
{% endif %}
{% endfor %}
{% endif %}
{% set favoritePath = isFavorite ? path('services_delete_favory', {'id': favorite_id }) : path('app_add_favorite', {'id': attraction.id }) %}
<a href="{{ favoritePath }}">
{% if isFavorite %}
<i class="fas fa-heart"></i>
{% else %}
<i class="far fa-heart"></i>
{% endif %}
</a>
</span>
<figure style="position: relative">
<a href="{{ path('app_services_attraction', {'id': attraction.id}) }}">
<div class="height-img-carousel" style="width: 100%">
<img src="{{ attraction.url | length > 0 ? attraction.url : asset('build/images/autres/1-600.c14c1b04.jpg') }}"
class="" alt="{{ attraction.name | title }}"
style="width: 100%; border-radius: 8px; vertical-align: middle; min-height: 200px;">
</div>
</a>
</figure>
<div class="mt-2">
<h6 style="font-weight: 700; padding-bottom: 0px !important; margin-bottom: 0px; display: flex; justify-content: space-between; align-items: center;">
<a class="text-dark"
href="{{ path('app_services_attraction', {'id': attraction.id}) }}">{{ attraction.name | title }}</a>
{% if attraction.isCertify == true %}
<span style="font-size: 25px; color: #3982f8;"><i
class="fas fa-badge-check"></i></span>
{% endif %}
</h6>
{% if attraction.address | length > 0 %}
<span style="font-weight: 600"><i class="far fa-map-marker-alt"
style="font-size: 15px; color: #e6007e;"></i> {{ attraction.address.neighborhood | title }} {{ attraction.address.neighborhood | length > 0 ? ',': '' }} {{ attraction.address.city | title }}, {{ attraction.address.country | country_name('fr') }}</span>
{% endif %}
<p style="font-size: 13px;">
<span class="badge bg-dark">{{ attraction.rate is defined ? attraction.rate : 0 }}</span>
{% if attraction.price is defined and attraction.price != 0 %}
{{ 'home.fourchettePrix'|trans({'price':attraction.price | number_format(0, '.'), 'device': attraction.currency },'home_page') | raw }}
{% else %}
Prix non disponible
{% endif %}
</p>
</div>
</div>
{% endfor %}
<div class="ma-card d-flex justify-content-center align-items-center"
style="width: 100%; position: relative; border: 2px solid #c5c5c5; border-radius: 20px; box-shadow: rgba(0, 0, 0, 0.16) 0px 3px 6px, rgba(0, 0, 0, 0.23) 0px 3px 6px;">
<h3 class="card-title text-center"
style="color: #bd2879 !important; border-radius: 20px; ">
<a href="{{ path('app_coin_by_category', {'category': category.id, 'name': category.slug }) }}"
style="font-size: 30px;">
Voir plus <i class="fas fa-chevron-circle-right"></i>
</a>
</h3>
</div>
</div>
<button class="prev-button hide"><</button>
<button class="next-button">></button>
</div>
</div>
{% endif %}
{% endfor %}
</div>