{% set breadcrumbTheme = 'reg' %}
{% set isPicto = false %}
{% set mainClass = '' %}
{% if page.type == 'study' %}
{% set contentType = 'Étude' %}
{% elseif page.type == 'activity-report' %}
{% set contentType = 'Rapport d\'activité' %}
{% elseif page.type == 'thematic-brochure' %}
{% set contentType = 'Plaquette thématique' %}
{% set breadcrumbTheme = 'orange-dark' %}
{% set bgColor = true %}
{% set isPicto = true %}
{% set roundColor = 'bg-orange-hover' %}
{% set mainClass = 'hero-edito--picto hero-edito--bg bg-orange' %}
{% elseif page.type == 'practical-guide' or page.type == 'faq' %}
{% set contentType = 'Note adhérent' %}
{% set breadcrumbTheme = 'white' %}
{% set bgColor = true %}
{% set isPicto = true %}
{% set roundColor = 'bg-violet-darker' %}
{% set mainClass = 'hero-edito--picto hero-edito--bg bg-violet-dark' %}
{% elseif page.type == 'btob-news' %}
{% set contentType = 'BtoB news' %}
{% elseif page.type == 'barometer-activity' %}
{% set contentType = 'Baromètre d\'activité' %}
{% elseif page.type == 'article' %}
{% set contentType = 'Actualité' %}
{% set mainClass = 'hero-edito--news' %}
{% elseif page.type == 'event' %}
{% set breadcrumbTheme = 'white' %}
{% set bgColor = true %}
{% set mainClass = 'hero-edito--bg bg-violet hero-edito--event' %}
{% set contentType = 'événement' %}
{% elseif page.type == 'agenda' %}
{% set breadcrumbTheme = 'white' %}
{% set bgColor = true %}
{% set mainClass = 'hero-edito--bg bg-violet hero-edito--event' %}
{% set contentType = 'Agenda CGF' %}
{% endif %}
{% set isPublication = page.template == 'publication' %}
{% set isNewsEvent = page.template == 'news' %}
<div class="hero-edito {{ mainClass }}">
<div class="fluid-grid relative">
<div class="row">
<div class="col-12 lg-col-6 lg:py-13 {{ isPublication or isNewsEvent ? 'hero-edito__side-left' ~ page.type == 'event' or page.type == 'agenda' ? ' hero-edito__side-left--bg' : '' : '' }}">
{% include 'front/partials/breadcrumb.html.twig' with {theme: breadcrumbTheme } %}
<div class="{{ isPublication or isNewsEvent ? 'mt-8 md:mt-16' : 'mt-6 md:mt-12 lg:mt-20' }}">
{# tags #}
{% if contentType is defined %}
<ul class="hero-edito__tags">
<li><span class="tag">{{ contentType }}</span></li>
{% if page.type == 'faq' %}
<li><span class="tag tag--orange">Communication</span></li>
{% endif %}
{% for tag in page.tags %}
<li><span class="tag tag--orange">{{ tag }}</span></li>
{% endfor %}
{% if properties.isMemberOnly %}
<li>
<span class="tag tag--adherent">
<svg width="10" height="13" class="mr-1 icon--violet">
<use href="#icon-lock" xlink:href="#icon-lock"></use>
</svg>
Adhérent
</span>
</li>
{% endif %}
</ul>
{% endif %}
{% if page.title is defined and page.title is not null %}
<h1 class="title {{ page.type in ['agenda', 'event'] ? 'title--M-bis' : 'title--XL' }} font-weight-semibold {{ bgColor is defined ? 'text-white' : 'text-violet' }}">
{{ page.title | remove_brackets | trim }}
</h1>
{% endif %}
{% if page.description is defined and page.description is not null %}
<div class="paragraph wysiwyg paragraph--L mt-6 hero-edito__chapo">
{{ page.description|raw }}
</div>
{% endif %}
{% if properties.publicationDate is defined and properties.publicationDate is not null and page.type not in ['agenda', 'event'] %}
<p class="text-13 flex items-center font-medium mt-5">
<svg width="12" height="12"
class="mr-2 {{ page.type == 'practical-guide' ? 'icon--white' : 'icon--violet' }}">
<use href="#icon-hour" xlink:href="#icon-hour"></use>
</svg>
<span>Publié le <span class="font-bold {{ bgColor is defined ? 'text-white' : 'text-violet' }}">{{ properties.publicationDate.date|date('d.m.Y') }}</span></span>
</p>
{% endif %}
{% if properties.place is defined and properties.place is not null %}
<div class="flex mt-5 hero-edito__location">
<svg width="14" height="20" class="mr-2 icon--orange flex-shrink-0">
<use href="#icon-pin" xlink:href="#icon-pin"></use>
</svg>
<span class="font-medium text-15">À <span class="font-bold">{{ properties.place }}</span></span>
</div>
{% endif %}
</div>
</div>
<div class="col-12 lg-col-6 relative {{ page.type in ['agenda', 'event'] ? 'self-start' : '' }} {{ page.type not in ['article', 'agenda', 'event' ] ? 'hero__right' : '' }} order-first lg:order-last">
{% if page.type not in ['article', 'agenda', 'event' ] %}
<div class="hero__pic-wrap {{ isPicto ? roundColor : '' }}">
{% if properties.image.singleMedia is defined and properties.image.singleMedia.publicId is not null %}
<picture>
<source media="(max-width: 420px)"
srcset="{{ cloudinary_media(properties.image.singleMedia, 'fl_progressive,f_auto,c_fill,q_auto,w_390,h_282') }} 1x, {{ cloudinary_media(properties.image.singleMedia, 'fl_progressive,f_auto,c_fill,q_auto,w_390,h_282,dpr_2') }} 2x">
<source media="(max-width: 767px)"
srcset="{{ cloudinary_media(properties.image.singleMedia, 'fl_progressive,f_auto,c_fill,q_auto,w_740,h_558') }} 1x, {{ cloudinary_media(properties.image.singleMedia, 'fl_progressive,f_auto,c_fill,q_auto,w_740,h_558,dpr_2') }} 2x">
<source media="(max-width: 1023px)"
srcset="{{ cloudinary_media(properties.image.singleMedia, 'fl_progressive,f_auto,c_fill,q_auto,w_990,h_758') }} 1x, {{ cloudinary_media(properties.image.singleMedia, 'fl_progressive,f_auto,c_fill,q_auto,w_990,h_758,dpr_2') }} 2x">
<source media="(max-width: 1279px)"
srcset="{{ cloudinary_media(properties.image.singleMedia, 'fl_progressive,f_auto,c_fill,q_auto,w_858,h_858') }} 1x, {{ cloudinary_media(properties.image.singleMedia, 'fl_progressive,f_auto,c_fill,q_auto,w_858,h_858,dpr_2') }} 2x">
<source media="(min-width: 1280px)"
srcset="{{ cloudinary_media(properties.image.singleMedia, 'fl_progressive,f_auto,c_fill,q_auto,w_962,h_962') }} 1x, {{ cloudinary_media(properties.image.singleMedia, 'fl_progressive,f_auto,c_fill,q_auto,w_962,h_962,dpr_2') }} 2x">
<img class="object-fit-image absolute" height="962" width="962"
src="{{ cloudinary_media(properties.image.singleMedia, 'fl_progressive,f_auto,q_auto,c_fill,w_962,h_962') }}"
alt="{{ properties.image.singleMedia.alt }}">
</picture>
{% endif %}
{% if isPublication and page.type == 'thematic-brochure' or page.type == 'practical-guide' or page.type == 'faq' %}
{% if page.type == 'thematic-brochure' %}
<svg width="125" height="172">
<use href="#icon-publication-brochure" xlink:href="#icon-publication-brochure"></use>
</svg>
{% else %}
<svg width="185" height="130">
<use href="#icon-publication-guide" xlink:href="#icon-publication-guide"></use>
</svg>
{% endif %}
{% endif %}
</div>
{% elseif page.type in ['agenda', 'event'] %}
<div class="hero-edito__event-wrap">
<picture>
<source media="(max-width: 420px)"
srcset="{{ cloudinary_media(properties.image.singleMedia, 'fl_progressive,f_auto,c_fill,q_auto,w_388,h_274') }} 1x, {{ cloudinary_media(properties.image.singleMedia, 'fl_progressive,f_auto,c_fill,q_auto,w_388,h_274,dpr_2') }} 2x">
<source media="(max-width: 767px)"
srcset="{{ cloudinary_media(properties.image.singleMedia, 'fl_progressive,f_auto,c_fill,q_auto,w_735,h_560') }} 1x, {{ cloudinary_media(properties.image.singleMedia, 'fl_progressive,f_auto,c_fill,q_auto,w_735,h_560,dpr_2') }} 2x">
<source media="(max-width: 1023px)"
srcset="{{ cloudinary_media(properties.image.singleMedia, 'fl_progressive,f_auto,c_fill,q_auto,w_991,h_755') }} 1x, {{ cloudinary_media(properties.image.singleMedia, 'fl_progressive,f_auto,c_fill,q_auto,w_991,h_755,dpr_2') }} 2x">
<source media="(max-width: 1279px)"
srcset="{{ cloudinary_media(properties.image.singleMedia, 'fl_progressive,f_auto,c_fill,q_auto,w_640,h_488') }} 1x, {{ cloudinary_media(properties.image.singleMedia, 'fl_progressive,f_auto,c_fill,q_auto,w_640,h_488,dpr_2') }} 2x">
<source media="(min-width: 1280px)"
srcset="{{ cloudinary_media(properties.image.singleMedia, 'fl_progressive,f_auto,c_fill,q_auto,w_708,h_540') }} 1x, {{ cloudinary_media(properties.image.singleMedia, 'fl_progressive,f_auto,c_fill,q_auto,w_708,h_540,dpr_2') }} 2x">
<img class="w-full" height="708" width="540"
src="{{ cloudinary_media(properties.image.singleMedia, 'fl_progressive,f_auto,q_auto,c_fill,w_708,h_540') }}"
alt="{{ properties.image.singleMedia.alt }}">
</picture>
</div>
<div class="hero-edito__date">
<span>{{ properties.startEventDate.date|date("d.m") }}</span>
{% if properties.endEventDate is defined and properties.endEventDate is not empty %}
<span>{{ properties.endEventDate.date|date("d.m") }}</span>
<span class="year">{{ properties.endEventDate.date|date("Y") }}</span>
{% else %}
<span class="year">{{ properties.startEventDate.date|date("Y") }}</span>
{% endif %}
</div>
{% if properties.registerLink is defined and properties.registerLink is not null %}
<a href="{{ properties.registerLink }}" target="_blank" rel="nofollow" class="hero-edito__register">
<svg width="32" height="29" class="icon--white">
<use href="#icon-calendar" xlink:href="#icon-calendar"></use>
</svg>
<span class="sr-only">S'inscrire à l'évènement</span>
</a>
{% endif %}
{% else %}
<picture>
<source media="(max-width: 420px)"
srcset="{{ cloudinary_media(properties.image.singleMedia, 'fl_progressive,f_auto,c_fill,q_auto,w_356,h_356') }} 1x, {{ cloudinary_media(properties.image.singleMedia, 'fl_progressive,f_auto,c_fill,q_auto,w_356,h_356,dpr_2') }} 2x">
<source media="(max-width: 767px)"
srcset="{{ cloudinary_media(properties.image.singleMedia, 'fl_progressive,f_auto,c_fill,q_auto,w_703,h_703') }} 1x, {{ cloudinary_media(properties.image.singleMedia, 'fl_progressive,f_auto,c_fill,q_auto,w_703,h_703,dpr_2') }} 2x">
<source media="(max-width: 1023px)"
srcset="{{ cloudinary_media(properties.image.singleMedia, 'fl_progressive,f_auto,c_fill,q_auto,w_950,h_950') }} 1x, {{ cloudinary_media(properties.image.singleMedia, 'fl_progressive,f_auto,c_fill,q_auto,w_950,h_950,dpr_2') }} 2x">
<source media="(max-width: 1279px)"
srcset="{{ cloudinary_media(properties.image.singleMedia, 'fl_progressive,f_auto,c_fill,q_auto,w_592,h_592') }} 1x, {{ cloudinary_media(properties.image.singleMedia, 'fl_progressive,f_auto,c_fill,q_auto,w_592,h_592,dpr_2') }} 2x">
<source media="(min-width: 1280px)"
srcset="{{ cloudinary_media(properties.image.singleMedia, 'fl_progressive,f_auto,c_fill,q_auto,w_664,h_664') }} 1x, {{ cloudinary_media(properties.image.singleMedia, 'fl_progressive,f_auto,c_fill,q_auto,w_664,h_664,dpr_2') }} 2x">
<img class="w-full rounded-lg mt-20 md:mt-23" height="664" width="664"
src="{{ cloudinary_media(properties.image.singleMedia, 'fl_progressive,f_auto,q_auto,c_fill,w_664,h_664') }}"
alt="{{ properties.image.singleMedia.alt }}">
</picture>
{% endif %}
{% if properties.document.singleMedia.publicId is defined and properties.document.singleMedia.publicId is not null %}
{% set isHidden = properties.isMemberOnly and app.user == null %}
{% if not isHidden %}
<a onclick="gtag('event', 'telecharger-publication', {'button_text': 'telecharger-publication'});" target="_blank" href="{{ cloudinary_media(properties.document.singleMedia) }}" class="hero-edito__dl {{ isPicto ? 'hero-edito__dl--picto' : '' }}">
<span class="icon-center">
Télécharger <br/> le document
</span>
<span class="icon-center">
<svg width="30" height="30" class="icon--white">
<use href="#icon-download" xlink:href="#icon-download"></use>
</svg>
</span>
</a>
{% endif %}
{% endif %}
</div>
</div>
</div>
</div>