{# ----------------------------- PARAMÈTRAGES ----------------------------- #}{# ------------------------------------------------------------------------ #}{# Appliquer uniquement les styles réellement renseignés #}{% set typeTitleSection = (content.typeTitleSection is defined and content.typeTitleSection is not empty) ? content.typeTitleSection : 'h2' %}{% set paddingUnitSection = content.paddingUnitSection|default('px') %}{% set bordersRadiusUnitSection = content.bordersRadiusUnitSection|default('px') %}{% set titleSizeUnitSection = content.titleSizeUnitSection|default('px') %}{% set pictogramBorderRadiusUnitSection = content.pictogramBorderRadiusUnitSection|default('px') %}{% set pictogramBorderSizeUnitSection = content.pictogramBorderSizeUnitSection|default('px') %}{% set sectionSettings = {'background-color': (content.backgroundColorSection is defined and content.backgroundColorSection is not empty) ? content.backgroundColorSection : null,'padding': (content.paddingTopBottomSection is defined and content.paddingLeftRightSection is defined) ? content.paddingTopBottomSection ~ paddingUnitSection ~ ' ' ~ content.paddingLeftRightSection ~ paddingUnitSection : null,'border-radius': (content.bordersRadiusSection is defined and content.bordersRadiusSection is not null) ? content.bordersRadiusSection ~ bordersRadiusUnitSection : null,}|filter((value) => value is not null) %}{% set titleSectionSettings = {'font-weight': (content.weightTitleSection is defined and content.weightTitleSection is not empty) ? content.weightTitleSection : null,'font-size': (content.titleSizeSection is defined and content.titleSizeSection is not null) ? content.titleSizeSection ~ titleSizeUnitSection : null,}|filter((value) => value is not null) %}{% set pictogramSectionSettings = {'color': (content.pictogramTitleColorSection is defined and content.pictogramTitleColorSection is not empty) ? content.pictogramTitleColorSection : null,'background-color': (content.pictogramTitleBackgroundColorSection is defined and content.pictogramTitleBackgroundColorSection is not empty) ? content.pictogramTitleBackgroundColorSection : null,'border-radius': (content.pictogramBorderRadiusSection is defined and content.pictogramBorderRadiusSection is not null) ? content.pictogramBorderRadiusSection ~ pictogramBorderRadiusUnitSection : null,'border': (content.pictogramBorderSizeSection is defined and content.pictogramBorderSizeSection is not null and content.pictogramBorderColorSection is defined and content.pictogramBorderColorSection is not empty) ? content.pictogramBorderSizeSection ~ pictogramBorderSizeUnitSection ~ ' solid ' ~ content.pictogramBorderColorSection : null,}|filter((value) => value is not null) %}{% set shouldRenderTitleStyles = titleSectionSettings is not empty or pictogramSectionSettings is not empty %}<style>{% if sectionSettings is not empty %}#{{ id }} {{{ sectionSettings|map((value, key) => key ~ ':' ~ value)|join('; ') }};}{% endif %}{% if shouldRenderTitleStyles %}#{{ id }} {{ typeTitleSection }} {display: inline-flex;justify-content: flex-start;align-items: center;gap: 0.75rem;{{ titleSectionSettings|map((value, key) => key ~ ':' ~ value)|join('; ') }};}{% endif %}#{{ id }} :is(h1, h2, h3, h4, h5, h6) > .icon {box-sizing: border-box;{% if pictogramSectionSettings is not empty %}{{ pictogramSectionSettings|map((value, key) => key ~ ':' ~ value)|join('; ') }};{% endif %}}#{{ id }} :is(h1, h2, h3, h4, h5, h6) > .icon svg {padding: 3px;}</style>