<!DOCTYPE html>
<html lang="fr">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title><?php echo $__env->yieldContent('title', 'Admin - RendezVous+'); ?></title>
    <meta name="csrf-token" content="<?php echo e(csrf_token()); ?>">

    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet" />
    <link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.5/font/bootstrap-icons.css" rel="stylesheet" />
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/css/all.min.css">
    <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/daterangepicker/daterangepicker.css" />
    <link href="https://cdn.jsdelivr.net/npm/select2@4.0.13/dist/css/select2.min.css" rel="stylesheet" />
    <link rel="stylesheet" href="https://cdn.datatables.net/1.13.6/css/dataTables.bootstrap5.min.css">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/sweetalert2@11/dist/sweetalert2.min.css">
    <link rel="stylesheet" href="https://cdn.datatables.net/responsive/2.5.0/css/responsive.bootstrap5.min.css">
    <link href="https://cdnjs.cloudflare.com/ajax/libs/summernote/0.8.20/summernote-lite.min.css" rel="stylesheet">

    <link
        href="https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600&display=swap"
        rel="stylesheet">

    <link rel="stylesheet" href="<?php echo e(asset('assets/css/admin/style-glass.css')); ?>">

    <?php echo $__env->yieldPushContent('styles'); ?>
</head>

<body class="bg-light">

    <nav class="navbar navbar-expand-lg navbar-2025 fixed-top">
        <div class="container-fluid main-container">
            <a class="navbar-brand navbar-brand-2025" href="<?php echo e(route('admin.appointments.index')); ?>">
                <svg width="28" height="28" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
                    <rect x="2" y="3" width="20" height="18" rx="4" fill="currentColor" opacity="0.2" />
                    <path d="M7 9h10M7 13h10" stroke="currentColor" stroke-width="1.4" stroke-linecap="round"
                        stroke-linejoin="round" />
                    <circle cx="12" cy="8" r="1" fill="currentColor" />
                    <circle cx="12" cy="12" r="1" fill="currentColor" />
                </svg>
                <span>Audience Rectorat</span>
                <span class="badge bg-primary-modern ms-2"
                    style="font-size: 0.65rem; padding: 0.2rem 0.5rem;">Admin</span>
            </a>

            <button class="navbar-toggler border-0 text-white" type="button" data-bs-toggle="collapse"
                data-bs-target="#adminNavbar" aria-label="Toggle navigation">
                <i class="bi bi-list" style="font-size: 1.5rem;"></i>
            </button>

            <div class="collapse navbar-collapse" id="adminNavbar">
                <ul class="navbar-nav ms-auto align-items-center gap-3">
                  
                    <?php if(auth()->check()): ?>
                     <li class="nav-item">
                            <a href="<?php echo e(route('admin.audience-files.index')); ?>"
                                class="nav-link text-white fw-semibold <?php echo e(request()->routeIs('admin.appointments.*') ? 'active' : ''); ?>">
                                <i class="bi bi-calendar-event me-1"></i>
                                Dossiers
                            </a>
                        </li>
                        <li class="nav-item">
                            <a href="<?php echo e(route('admin.appointments.index')); ?>"
                                class="nav-link text-white fw-semibold <?php echo e(request()->routeIs('admin.appointments.*') ? 'active' : ''); ?>">
                                <i class="bi bi-calendar-event me-1"></i>
                                Demandes d’audiences
                            </a>
                        </li>

                        <li class="nav-item">
                            <a href="<?php echo e(route('admin.reports.index')); ?>"
                                class="nav-link text-white fw-semibold <?php echo e(request()->routeIs('admin.reports.*') ? 'active' : ''); ?>">
                                <i class="bi bi-journal-text me-1"></i>
                                Compte-rendus
                            </a>
                        </li>

                        <?php if(auth()->user()->role === 'vr-aa'): ?>
                            <li class="nav-item">
                                <a href="<?php echo e(route('admin.users.user.index')); ?>"
                                    class="nav-link text-white fw-semibold <?php echo e(request()->routeIs('admin.users.*') ? 'active' : ''); ?>">
                                    <i class="bi bi-people me-1"></i>
                                    Utilisateurs
                                </a>
                            </li>
                        <?php endif; ?>
                    <?php endif; ?>

                    <li class="nav-item dropdown">
                        <a class="nav-link dropdown-toggle d-flex align-items-center gap-2" href="#" role="button"
                            data-bs-toggle="dropdown">
                            <div class="avatar-wrapper position-relative">
                                <img src="https://ui-avatars.com/api/?name=Admin&background=0ea5e9&color=fff&bold=true&size=128"
                                    alt="Admin" width="40" height="40"
                                    class="rounded-circle border border-2 border-primary">
                                <span
                                    class="position-absolute bottom-0 end-0 translate-middle p-1 bg-success border border-2 border-white rounded-circle">
                                    <span class="visually-hidden">En ligne</span>
                                </span>
                            </div>
                            <div class="d-none d-md-flex fauth(lex-column text-start text-white">
                                <span class="fw-semibold small">Administrateur</span>
                            </div>
                        </a>
                        <ul class="dropdown-menu dropdown-menu-end shadow-lg border-0" style="min-width: 200px;">
                            <li>
                                <a class="dropdown-item d-flex align-items-center gap-2 py-2" href="#">
                                    <i class="bi bi-person-circle"></i>
                                    <span>Mon Profil</span>
                                </a>
                            </li>
                            <li>
                                <hr class="dropdown-divider">
                            </li>
                            <li>
                                <form method="POST" action="<?php echo e(route('logout')); ?>" class="mb-0">
                                    <?php echo csrf_field(); ?>
                                    <button type="submit"
                                        class="dropdown-item d-flex align-items-center gap-2 py-2 text-danger">
                                        <i class="bi bi-box-arrow-right"></i>
                                        <span>Déconnexion</span>
                                    </button>
                                </form>
                            </li>
                        </ul>
                    </li>
                </ul>
            </div>
        </div>
    </nav>

    <main class="main-container" style="padding-top: 80px;">
        <?php echo $__env->yieldContent('content'); ?>
    </main>

    <script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
    <script type="text/javascript" src="https://cdn.jsdelivr.net/momentjs/latest/moment.min.js"></script>
    <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/daterangepicker/daterangepicker.min.js"></script>
    <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/select2@4.0.11/dist/js/select2.min.js"></script>
    <script src="https://cdn.datatables.net/1.13.6/js/jquery.dataTables.min.js"></script>
    <script src="https://cdn.datatables.net/1.13.6/js/dataTables.bootstrap5.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/sweetalert2@11/dist/sweetalert2.all.min.js"></script>
    <script src="https://cdn.datatables.net/responsive/2.5.0/js/dataTables.responsive.min.js"></script>
    <script src="https://cdn.datatables.net/responsive/2.5.0/js/responsive.bootstrap5.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/summernote/0.8.20/summernote-lite.min.js"></script>


    <script>
        $(document).ready(function () {
            if ($('.datatable').length) {
                $('.datatable').DataTable({
                    responsive: true,
                    // "language": {
                    //     "url": "//cdn.datatables.net/plug-ins/1.13.6/i18n/fr-FR.json"
                    // },
                    "pageLength": 10,
                    "lengthMenu": [5, 10, 25, 50],
                    "dom": '<"row"<"col-md-6"l><"col-md-6"f>>tip',
                    "order": [],
                    "drawCallback": function (settings) {
                        // Ajouter des animations aux nouvelles lignes
                        $('tbody tr').css('opacity', '0').animate({
                            'opacity': '1'
                        }, 300);
                    },
                });
            }
        });

        <?php if(session('success')): ?>
            Swal.fire({
                icon: 'success',
                title: 'Succès',
                text: '<?php echo e(session('success')); ?>',
                timer: 3000,
                showConfirmButton: false,
                background: 'var(--bg-surface)',
                color: 'var(--text-primary)',
                toast: true,
                position: 'top-end',
                showClass: {
                    popup: 'animate__animated animate__fadeInRight'
                },
                hideClass: {
                    popup: 'animate__animated animate__fadeOutRight'
                }
            });
        <?php endif; ?>

        <?php if(session('error')): ?>
            Swal.fire({
                icon: 'error',
                title: 'Erreur',
                text: '<?php echo e(session('error')); ?>',
                timer: 4000,
                showConfirmButton: false,
                background: 'var(--bg-surface)',
                color: 'var(--text-primary)',
                toast: true,
                position: 'top-end'
            });
        <?php endif; ?>

        document.querySelectorAll('.btn-modern').forEach(button => {
            button.addEventListener('click', function (e) {
                const ripple = document.createElement('span');
                const rect = this.getBoundingClientRect();
                const size = Math.max(rect.width, rect.height);
                const x = e.clientX - rect.left - size / 2;
                const y = e.clientY - rect.top - size / 2;

                ripple.style.cssText = `
          position: absolute;
          border-radius: 50%;
          background: rgba(255, 255, 255, 0.7);
          transform: scale(0);
          animation: ripple-animation 0.6s linear;
          width: ${size}px;
          height: ${size}px;
          top: ${y}px;
          left: ${x}px;
        `;

                this.appendChild(ripple);

                setTimeout(() => {
                    ripple.remove();
                }, 600);
            });
        });

        const observerOptions = {
            threshold: 0.1,
            rootMargin: '0px 0px -50px 0px'
        };

        const observer = new IntersectionObserver((entries) => {
            entries.forEach(entry => {
                if (entry.isIntersecting) {
                    entry.target.style.animationDelay = `${entry.target.dataset.delay || 0}ms`;
                    entry.target.classList.add('animate');
                    observer.unobserve(entry.target);
                }
            });
        }, observerOptions);

        document.querySelectorAll('.card-modern').forEach((card, index) => {
            card.dataset.delay = index * 100;
            observer.observe(card);
        });

        window.addEventListener('scroll', () => {
            const scrolled = window.pageYOffset;
            const parallaxElements = document.querySelectorAll('.parallax');

            parallaxElements.forEach(el => {
                const speed = el.dataset.speed || 0.5;
                el.style.transform = `translateY(${scrolled * speed}px)`;
            });
        });
    </script>

    <?php echo $__env->yieldPushContent('scripts'); ?>
    <?php echo $__env->yieldContent('script-select2'); ?>
    <?php echo $__env->yieldContent('scripts'); ?>

    <?php echo $__env->make('sweetalert::alert', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>
</body>

</html><?php /**PATH /home/ecamesuac/public_html/schedule-managment/resources/views/layouts/admin.blade.php ENDPATH**/ ?>