{#
# ============================================================================
# ORGANISM: LANDING SOCIAL PROOF
# ============================================================================
#
# 4-column stat bar displaying key metrics with gradient numbers.
# Fully parameterized: all stats passed via Twig parameters.
#
# ============================================================================
# PARAMETRES
# ============================================================================
#
# | Parametre | Type | Defaut | Description |
# |-----------|--------|----------------------------|--------------------------------|
# | stats | array | (default 4 Bubul stats) | [{value, label, sublabel, gradient}] |
# | class | string | '' | Additional CSS classes |
#
# ============================================================================
# STRUCTURE D'UNE STAT (stats[])
# ============================================================================
#
# | Cle | Type | Description |
# |-----------|--------|------------------------------------------------------|
# | value | string | Display value (e.g. '80+', '20min') |
# | label | string | Primary label |
# | sublabel | string | Secondary label below |
# | gradient | string | CSS gradient for the value (e.g. 'linear-gradient(...)') |
#
# ============================================================================
# USAGE EXAMPLES
# ============================================================================
#
# Default:
# {% include '_organisms/landing/social-proof.html.twig' only %}
#
# Custom stats:
# {% include '_organisms/landing/social-proof.html.twig' with {
# stats: [{ value: '14', label: 'Voix disponibles', sublabel: 'françaises', gradient: '...' }]
# } only %}
#
# ============================================================================
#}
{% set class = class ?? '' %}
{# Couleurs dynamiques depuis la DB #}
{% set _sereniaSecondary = tool_color_details['serenia'].secondary ?? '#7C3AED' %}
{% set _sereniaPrimary = tool_color_details['serenia'].primary ?? '#A78BFA' %}
{% set _monalisiaSecondary = tool_color_details['monalisia'].secondary ?? '#ED8600' %}
{% set _monalisiaPrimary = tool_color_details['monalisia'].primary ?? '#F59E0B' %}
{% set defaultStats = [
{
value: '80+',
label: 'Formateurs',
sublabel: 'déjà en bêta',
gradient: 'linear-gradient(135deg, var(--color-primary-dark), var(--color-primary))'
},
{
value: '20min',
label: 'Pour 7h de',
sublabel: 'contenu',
gradient: 'linear-gradient(135deg, ' ~ _sereniaSecondary ~ ', ' ~ _sereniaPrimary ~ ')'
},
{
value: '100%',
label: 'RGPD',
sublabel: 'Conforme',
gradient: 'linear-gradient(135deg, var(--color-success-dark), var(--color-success))'
},
{
value: '6',
label: 'Outils',
sublabel: 'intégrés',
gradient: 'linear-gradient(135deg, ' ~ _monalisiaSecondary ~ ', ' ~ _monalisiaPrimary ~ ')'
}
] %}
{% set stats = stats ?? defaultStats %}
{% for stat in stats %}
{{ stat.label }}
{{ stat.sublabel }}
{% endfor %}