</main>

<footer class="text-center py-3 small text-muted">
    &copy; <?= date('Y') ?> EagleSuite — Tous droits réservés
</footer>

<!-- JS : ordre CORRECT -->

 <script src="/eagle_client_istanbulcups/public/vendor/jquery/jquery.min.js"></script>

 <script src="/eagle_client_istanbulcups/public/vendor/bootstrap/js/bootstrap.bundle.min.js"></script>

<!-- DataTables -->

<!-- DataTables -->
<link rel="stylesheet" href="/eagle_client_istanbulcups/public/vendor/datatables/css/dataTables.bootstrap5.min.css">
<script src="/eagle_client_istanbulcups/public/vendor/datatables/js/jquery.dataTables.min.js"></script>
<script src="/eagle_client_istanbulcups/public/vendor/datatables/js/dataTables.bootstrap5.min.js"></script>

<!-- DataTables Buttons -->
<script src="/eagle_client_istanbulcups/public/vendor/datatables/js/dataTables.buttons.min.js"></script>
<script src="/eagle_client_istanbulcups/public/vendor/datatables/js/buttons.bootstrap5.min.js"></script>

<!-- JSZip / PDFMake -->
<script src="/eagle_client_istanbulcups/public/vendor/datatables/libs/jszip.min.js"></script>
<script src="/eagle_client_istanbulcups/public/vendor/datatables/libs/pdfmake.min.js"></script>
<script src="/eagle_client_istanbulcups/public/vendor/datatables/libs/vfs_fonts.js"></script>
<script src="/eagle_client_istanbulcups/public/vendor/datatables/js/buttons.html5.min.js"></script>

<script src="/eagle_client_istanbulcups/public/js/datatables.min.js"></script>

<script>
document.addEventListener("DOMContentLoaded", () => {
    const toggle = document.getElementById("sidebarToggle");
    const sidebar = document.getElementById("appSidebar");

    if(toggle){
        toggle.addEventListener("click", e => {
            e.preventDefault();
            sidebar.classList.toggle("sidebar-open");
        });
    }

    document.querySelectorAll('.sidebar-toggle').forEach(btn => {
        btn.addEventListener("click", e => {
            e.preventDefault();
            const target = document.querySelector(btn.dataset.target);
            if(!target) return;

            document.querySelectorAll('.sidebar-dropdown').forEach(dd => {
                if(dd !== target) dd.classList.remove("open");
            });

            target.classList.toggle("open");
        });
    });
});
</script>

</body>
</html>
