<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:h="http://xmlns.jcp.org/jsf/html"
                xmlns:f="http://xmlns.jcp.org/jsf/core"
                xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
                xmlns:p="http://primefaces.org/ui">

    <!--
        Composant barre de filtres et recherche réutilisable - DRY/WOU
        Usage :
        <ui:decorate template="/templates/components/cards/filter-bar.xhtml">
            <ui:param name="title" value="Filtres" />
            <ui:param name="styleClass" value="mb-3" />
            <ui:define name="filters">
                Champs de filtres ici (recherche, dropdowns, etc.)
            </ui:define>
            <ui:define name="actions">
                Boutons d'action (réinitialiser, rafraîchir, etc.)
            </ui:define>
        </ui:decorate>
    -->

    <div class="card #{styleClass}">
        <ui:fragment rendered="#{not empty title}">
            <h5 class="mb-3">
                <h:outputText value="#{title}" />
            </h5>
        </ui:fragment>
        <div class="grid">
            <ui:insert name="filters">
                <!-- Filter fields go here -->
            </ui:insert>
            <ui:insert name="actions">
                <!-- Action buttons go here -->
            </ui:insert>
        </div>
    </div>
</ui:composition>

