{# Style de la section #}
{% set sectionId = ('#'~section(content).id|raw) %}
{% set section = section(content) %}
{% set title = title(content) %}
{% set backgroundGradientDirection = section.backgroundGradientDirection|default('to right') %}
{% set backgroundGradientColor1 = section.backgroundGradientColor1|default('#000') %}
{% set backgroundGradientColor2 = section.backgroundGradientColor2|default('#fff') %}
{% set backgroundGradientColor1Position = section.backgroundGradientColor1Position|default(0) %}
{% set backgroundGradientColor2Position = section.backgroundGradientColor2Position|default(100) %}
{{ sectionId }}{
{{ paddings(section.padding.unit, section.padding.top, section.padding.right, section.padding.bottom, section.padding.left) }}
{% if section.gap.value is not none and section.gap.value != 0 %}grid-gap: {{ (section.gap.value~section.gap.unit)|raw }};{% endif %}
{% if section.minHeight is not none and section.minHeight != 0 %}min-height: {{ (section.minHeight~section.minHeightUnit)|raw }};{% endif %}
}
{% if section.noBackgroundCheckbox == false %}
{% if section.backgroundCheckbox == true %}
{# Je préfère une couleur plutôt qu'une image #}
{{ sectionId }}{
{% if section.backgroundGradientCheckbox == true %}
background: linear-gradient({{ section.backgroundGradientDirection }}, {{ section.backgroundGradientColor1 ~ ' ' ~ section.backgroundGradientColor1Position ~ '%' }}, {{ section.backgroundGradientColor2 ~ ' ' ~ section.backgroundGradientColor2Position ~ '%' }});
{% else %}
{% if section.backgroundColor is not none and section.backgroundColor != '' %}background-color: {{ (section.backgroundColor)|raw }};{% endif %}
{% endif %}
}
{% else %}
{# Je préfère une image plutôt qu'une couleur #}
{{ sectionId }}{
position: relative;
background-size: cover !important;
{% if section.backgroundImage is not none and section.backgroundImage.url != '' %}background: url('{{ (section.backgroundImage.url)|raw }}') no-repeat;{% endif %}
}
{{ sectionId }}::after{
content: "";
{% if section.backgroundFilter is not none and section.backgroundFilter != '' %}background-color: {{ (section.backgroundFilter)|raw }};{% endif %}
{% if section.backgroundFilterOpacity is not none %}opacity: {{ (section.backgroundFilterOpacity)|raw }};{% endif %}
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 1;
}
{{ sectionId }}>*{
z-index: 2;
position: relative;
}
{% endif %}
{% endif %}