{% comment %}
Fil d'Ariane (Breadcrumbs) avec Schema.org
Usage: {% include 'blog/breadcrumbs.html' with breadcrumbs=breadcrumbs_list %}
{% endcomment %}

{% if breadcrumbs %}
<nav aria-label="Fil d'Ariane">
    <ol class="breadcrumb" style="background-color: rgba(250,250,250,0.88); margin-bottom: 1.5rem;">
        {% for item in breadcrumbs %}
        <li class="breadcrumb-item{% if forloop.last %} active{% endif %}"{% if forloop.last %} aria-current="page"{% endif %}>
            {% if not forloop.last %}
            <a href="{{ item.url }}">{{ item.name }}</a>
            {% else %}
            {{ item.name }}
            {% endif %}
        </li>
        {% endfor %}
    </ol>
</nav>

<!-- Schema.org BreadcrumbList -->
<script type="application/ld+json">
{
    "@context": "https://schema.org",
    "@type": "BreadcrumbList",
    "itemListElement": [
        {% for item in breadcrumbs %}
        {
            "@type": "ListItem",
            "position": {{ forloop.counter }},
            "name": "{{ item.name }}",
            "item": "{{ item.url }}"
        }{% if not forloop.last %},{% endif %}
        {% endfor %}
    ]
}
</script>
{% endif %}
