<div class="grid  items-center content-center justify-items-center justify-center text-neutral-800 m-auto ">

    <div class=" space-y-1">

        <div class="text-2xl font-medium text-center">
            4.5 sur 5
        </div>

        <div class="flex justify-center gap-1 text-neutral-800">

            <div class="relative">

                <svg class=" shrink-0" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
                    <path fill-rule="evenodd" clip-rule="evenodd" d="M12.679 2.68133C12.5554 2.41809 12.2908 2.25 12 2.25C11.7092 2.25 11.4446 2.41809 11.3211 2.68133L8.70998 8.24428L2.88674 9.13399C2.60886 9.17645 2.37805 9.37073 2.28881 9.6373C2.19958 9.90386 2.26689 10.1979 2.4632 10.3992L6.69886 14.7404L5.6975 20.8793C5.65126 21.1627 5.77096 21.4477 6.00576 21.6131C6.24055 21.7785 6.54919 21.7953 6.80056 21.6564L12 18.7822L17.1995 21.6564C17.4508 21.7953 17.7595 21.7785 17.9943 21.6131C18.2291 21.4477 18.3488 21.1627 18.3025 20.8793L17.3012 14.7404L21.5368 10.3992C21.7331 10.1979 21.8005 9.90386 21.7112 9.6373C21.622 9.37073 21.3912 9.17645 21.1133 9.13399L15.2901 8.24428L12.679 2.68133ZM9.8978 9.24391L12 4.76513L14.1022 9.24391C14.2085 9.47032 14.4207 9.62885 14.6679 9.66663L19.4439 10.3963L15.9632 13.9638C15.797 14.1342 15.7215 14.3733 15.7598 14.6083L16.5735 19.5964L12.3629 17.2688C12.1371 17.144 11.863 17.144 11.6372 17.2688L7.42658 19.5964L8.24024 14.6083C8.27856 14.3733 8.20307 14.1342 8.03684 13.9638L4.55614 10.3963L9.33214 9.66663C9.57938 9.62885 9.79153 9.47032 9.8978 9.24391Z" fill="currentColor" />
                </svg>

                <div class="absolute inset-0 overflow-hidden" style="clip-path: inset(0 0% 0 0)">
                    <svg class=" shrink-0" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
                        <path fill-rule="evenodd" clip-rule="evenodd" d="M7.5 14.4875L6.43769 21L12 17.9252L17.5623 21L16.5 14.4875L21 9.87539L14.7812 8.92523L12 3L9.21885 8.92523L3 9.87539L7.5 14.4875Z" fill="currentColor" />
                    </svg>
                </div>
            </div>

            <div class="relative">

                <svg class=" shrink-0" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
                    <path fill-rule="evenodd" clip-rule="evenodd" d="M12.679 2.68133C12.5554 2.41809 12.2908 2.25 12 2.25C11.7092 2.25 11.4446 2.41809 11.3211 2.68133L8.70998 8.24428L2.88674 9.13399C2.60886 9.17645 2.37805 9.37073 2.28881 9.6373C2.19958 9.90386 2.26689 10.1979 2.4632 10.3992L6.69886 14.7404L5.6975 20.8793C5.65126 21.1627 5.77096 21.4477 6.00576 21.6131C6.24055 21.7785 6.54919 21.7953 6.80056 21.6564L12 18.7822L17.1995 21.6564C17.4508 21.7953 17.7595 21.7785 17.9943 21.6131C18.2291 21.4477 18.3488 21.1627 18.3025 20.8793L17.3012 14.7404L21.5368 10.3992C21.7331 10.1979 21.8005 9.90386 21.7112 9.6373C21.622 9.37073 21.3912 9.17645 21.1133 9.13399L15.2901 8.24428L12.679 2.68133ZM9.8978 9.24391L12 4.76513L14.1022 9.24391C14.2085 9.47032 14.4207 9.62885 14.6679 9.66663L19.4439 10.3963L15.9632 13.9638C15.797 14.1342 15.7215 14.3733 15.7598 14.6083L16.5735 19.5964L12.3629 17.2688C12.1371 17.144 11.863 17.144 11.6372 17.2688L7.42658 19.5964L8.24024 14.6083C8.27856 14.3733 8.20307 14.1342 8.03684 13.9638L4.55614 10.3963L9.33214 9.66663C9.57938 9.62885 9.79153 9.47032 9.8978 9.24391Z" fill="currentColor" />
                </svg>

                <div class="absolute inset-0 overflow-hidden" style="clip-path: inset(0 0% 0 0)">
                    <svg class=" shrink-0" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
                        <path fill-rule="evenodd" clip-rule="evenodd" d="M7.5 14.4875L6.43769 21L12 17.9252L17.5623 21L16.5 14.4875L21 9.87539L14.7812 8.92523L12 3L9.21885 8.92523L3 9.87539L7.5 14.4875Z" fill="currentColor" />
                    </svg>
                </div>
            </div>

            <div class="relative">

                <svg class=" shrink-0" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
                    <path fill-rule="evenodd" clip-rule="evenodd" d="M12.679 2.68133C12.5554 2.41809 12.2908 2.25 12 2.25C11.7092 2.25 11.4446 2.41809 11.3211 2.68133L8.70998 8.24428L2.88674 9.13399C2.60886 9.17645 2.37805 9.37073 2.28881 9.6373C2.19958 9.90386 2.26689 10.1979 2.4632 10.3992L6.69886 14.7404L5.6975 20.8793C5.65126 21.1627 5.77096 21.4477 6.00576 21.6131C6.24055 21.7785 6.54919 21.7953 6.80056 21.6564L12 18.7822L17.1995 21.6564C17.4508 21.7953 17.7595 21.7785 17.9943 21.6131C18.2291 21.4477 18.3488 21.1627 18.3025 20.8793L17.3012 14.7404L21.5368 10.3992C21.7331 10.1979 21.8005 9.90386 21.7112 9.6373C21.622 9.37073 21.3912 9.17645 21.1133 9.13399L15.2901 8.24428L12.679 2.68133ZM9.8978 9.24391L12 4.76513L14.1022 9.24391C14.2085 9.47032 14.4207 9.62885 14.6679 9.66663L19.4439 10.3963L15.9632 13.9638C15.797 14.1342 15.7215 14.3733 15.7598 14.6083L16.5735 19.5964L12.3629 17.2688C12.1371 17.144 11.863 17.144 11.6372 17.2688L7.42658 19.5964L8.24024 14.6083C8.27856 14.3733 8.20307 14.1342 8.03684 13.9638L4.55614 10.3963L9.33214 9.66663C9.57938 9.62885 9.79153 9.47032 9.8978 9.24391Z" fill="currentColor" />
                </svg>

                <div class="absolute inset-0 overflow-hidden" style="clip-path: inset(0 0% 0 0)">
                    <svg class=" shrink-0" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
                        <path fill-rule="evenodd" clip-rule="evenodd" d="M7.5 14.4875L6.43769 21L12 17.9252L17.5623 21L16.5 14.4875L21 9.87539L14.7812 8.92523L12 3L9.21885 8.92523L3 9.87539L7.5 14.4875Z" fill="currentColor" />
                    </svg>
                </div>
            </div>

            <div class="relative">

                <svg class=" shrink-0" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
                    <path fill-rule="evenodd" clip-rule="evenodd" d="M12.679 2.68133C12.5554 2.41809 12.2908 2.25 12 2.25C11.7092 2.25 11.4446 2.41809 11.3211 2.68133L8.70998 8.24428L2.88674 9.13399C2.60886 9.17645 2.37805 9.37073 2.28881 9.6373C2.19958 9.90386 2.26689 10.1979 2.4632 10.3992L6.69886 14.7404L5.6975 20.8793C5.65126 21.1627 5.77096 21.4477 6.00576 21.6131C6.24055 21.7785 6.54919 21.7953 6.80056 21.6564L12 18.7822L17.1995 21.6564C17.4508 21.7953 17.7595 21.7785 17.9943 21.6131C18.2291 21.4477 18.3488 21.1627 18.3025 20.8793L17.3012 14.7404L21.5368 10.3992C21.7331 10.1979 21.8005 9.90386 21.7112 9.6373C21.622 9.37073 21.3912 9.17645 21.1133 9.13399L15.2901 8.24428L12.679 2.68133ZM9.8978 9.24391L12 4.76513L14.1022 9.24391C14.2085 9.47032 14.4207 9.62885 14.6679 9.66663L19.4439 10.3963L15.9632 13.9638C15.797 14.1342 15.7215 14.3733 15.7598 14.6083L16.5735 19.5964L12.3629 17.2688C12.1371 17.144 11.863 17.144 11.6372 17.2688L7.42658 19.5964L8.24024 14.6083C8.27856 14.3733 8.20307 14.1342 8.03684 13.9638L4.55614 10.3963L9.33214 9.66663C9.57938 9.62885 9.79153 9.47032 9.8978 9.24391Z" fill="currentColor" />
                </svg>

                <div class="absolute inset-0 overflow-hidden" style="clip-path: inset(0 0% 0 0)">
                    <svg class=" shrink-0" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
                        <path fill-rule="evenodd" clip-rule="evenodd" d="M7.5 14.4875L6.43769 21L12 17.9252L17.5623 21L16.5 14.4875L21 9.87539L14.7812 8.92523L12 3L9.21885 8.92523L3 9.87539L7.5 14.4875Z" fill="currentColor" />
                    </svg>
                </div>
            </div>

            <div class="relative">

                <svg class=" shrink-0" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
                    <path fill-rule="evenodd" clip-rule="evenodd" d="M12.679 2.68133C12.5554 2.41809 12.2908 2.25 12 2.25C11.7092 2.25 11.4446 2.41809 11.3211 2.68133L8.70998 8.24428L2.88674 9.13399C2.60886 9.17645 2.37805 9.37073 2.28881 9.6373C2.19958 9.90386 2.26689 10.1979 2.4632 10.3992L6.69886 14.7404L5.6975 20.8793C5.65126 21.1627 5.77096 21.4477 6.00576 21.6131C6.24055 21.7785 6.54919 21.7953 6.80056 21.6564L12 18.7822L17.1995 21.6564C17.4508 21.7953 17.7595 21.7785 17.9943 21.6131C18.2291 21.4477 18.3488 21.1627 18.3025 20.8793L17.3012 14.7404L21.5368 10.3992C21.7331 10.1979 21.8005 9.90386 21.7112 9.6373C21.622 9.37073 21.3912 9.17645 21.1133 9.13399L15.2901 8.24428L12.679 2.68133ZM9.8978 9.24391L12 4.76513L14.1022 9.24391C14.2085 9.47032 14.4207 9.62885 14.6679 9.66663L19.4439 10.3963L15.9632 13.9638C15.797 14.1342 15.7215 14.3733 15.7598 14.6083L16.5735 19.5964L12.3629 17.2688C12.1371 17.144 11.863 17.144 11.6372 17.2688L7.42658 19.5964L8.24024 14.6083C8.27856 14.3733 8.20307 14.1342 8.03684 13.9638L4.55614 10.3963L9.33214 9.66663C9.57938 9.62885 9.79153 9.47032 9.8978 9.24391Z" fill="currentColor" />
                </svg>

                <div class="absolute inset-0 overflow-hidden" style="clip-path: inset(0 50% 0 0)">
                    <svg class=" shrink-0" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
                        <path fill-rule="evenodd" clip-rule="evenodd" d="M7.5 14.4875L6.43769 21L12 17.9252L17.5623 21L16.5 14.4875L21 9.87539L14.7812 8.92523L12 3L9.21885 8.92523L3 9.87539L7.5 14.4875Z" fill="currentColor" />
                    </svg>
                </div>
            </div>
        </div>
    </div>

    <div class=" mt-4 ">
        <span class="text-base font-medium text-neutral-500">14 commentaires</span>
    </div>
</div>
<div class="grid {% if variant == "horizontal" %} grid-cols-2 divide-x divide-neutral-300 {% endif %} items-center content-center justify-items-center justify-center text-neutral-800 m-auto {{ blocClass }}">
    {# Left side - Rating #}
    <div class="{% if variant == "horizontal" %} pr-8 {% endif %} space-y-1">
        {# Rating Score #}
        <div class="text-2xl font-medium text-center">
            {{ averageRating }} sur 5
        </div>

        {# Stars #}
        <div class="flex justify-center gap-1 {{ classStarColor }}">
            {% for i in 1..5 %}
                {% set fillPercentage = (averageRating - i + 1) * 100 %}
                {% if fillPercentage > 100 %}
                    {% set fillPercentage = 100 %}
                {% elseif fillPercentage < 0 %}
                    {% set fillPercentage = 0 %}
                {% endif %}

                <div class="relative">
                    {# Empty star (background) #}
                    {% render "@icons-library--star-outline" with {
                        size: sizeStar
                    } %}

                    {# Filled star (overlay) #}
                    <div class="absolute inset-0 overflow-hidden"
                         style="clip-path: inset(0 {{ 100 - fillPercentage }}% 0 0)">
                        {% render "@icons-library--star-fill" with {
                            size: sizeStar
                        } %}
                    </div>
                </div>
            {% endfor %}
        </div>
    </div>

    {# Right side - Review Count #}
    <div class="{% if variant == "horizontal" %} flex flex-col items-center pl-8 w-full {% else %} mt-4 {% endif %}">
        {% if variant == "horizontal" %}
            <span class="text-2xl font-medium">{{ reviewCount }}</span>
            {% render "@template-link" with {
                label: "commentaires",
                href: commentaireLink,
                underlined: true
            } %}
        {% else %}
            <span class="text-base font-medium text-neutral-500">{{ reviewCount }} commentaires</span>
        {% endif %}
    </div>
</div>
{
  "averageRating": 4.5,
  "reviewCount": 14,
  "variant": "vertical",
  "classStarColor": "text-neutral-800",
  "commentaireLink": "#reviews",
  "sizeStar": 24,
  "inlineRank": false
}

No notes defined.