
/* Style amélioré pour la pagination */
.pagination {
    margin-top: 40px;
    padding: 20px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.pagination::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 1px;
    background: linear-gradient(90deg, transparent, #e5e7eb, transparent);
}

.pager {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
    justify-content: center;
}

.pager li {
    margin: 2px;
}

.pager li a,
.pager li span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

/* Liens normaux */
.pager li a {
    color: #4b5563;
    background: white;
    border: 1.5px solid #e5e7eb;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.pager li a:hover {
    transform: translateY(-2px);
    border-color: #3b82f6;
    color: #3b82f6;
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.15);
}

.pager li a:active {
    transform: translateY(0);
}

/* Page active */
.pager li.active.my-active span {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    position: relative;
    overflow: hidden;
}

.pager li.active.my-active span::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
    animation: shine 3s infinite linear;
}

@keyframes shine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Liens désactivés */
.pager li.disabled span {
    color: #9ca3af;
    background: #f9fafb;
    border: 1.5px solid #f3f4f6;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Boutons précédent/suivant */
.pager li:first-child a,
.pager li:first-child span,
.pager li:last-child a,
.pager li:last-child span {
    padding: 0 20px;
    min-width: 100px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pager li:first-child a::before,
.pager li:last-child a::after {
    font-size: 18px;
    line-height: 1;
}

/* Points de suspension */
.pager li.disabled:not(:first-child):not(:last-child) span {
    min-width: auto;
    padding: 0 8px;
    background: transparent;
    border: none;
    color: #6b7280;
    font-size: 16px;
}

/* Effet ripple sur les liens */
.pager li a {
    position: relative;
    overflow: hidden;
}

.pager li a::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.pager li a:active::after {
    width: 200px;
    height: 200px;
}

/* Statistiques de pagination */
.pagination-info {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 13px;
    color: #6b7280;
    display: none;
}

.pagination-stats {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 13px;
    color: #6b7280;
    display: none;
}

/* Mobile optimisé */
@media (min-width: 768px) {
    .pagination-info,
    .pagination-stats {
        display: block;
    }

    .pager li a,
    .pager li span {
        min-width: 44px;
        height: 44px;
    }
}

@media (max-width: 767px) {
    .pager {
        gap: 4px;
    }

    .pager li a,
    .pager li span {
        min-width: 36px;
        height: 36px;
        padding: 0 12px;
        font-size: 13px;
    }

    .pager li:first-child a,
    .pager li:first-child span,
    .pager li:last-child a,
    .pager li:last-child span {
        min-width: 80px;
        padding: 0 12px;
    }

    .pager li:first-child a span,
    .pager li:last-child a span {
        display: none;
    }

    .pager li:first-child a::before {
        content: '←';
        font-size: 16px;
    }

    .pager li:last-child a::after {
        content: '→';
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .pager li:not(:first-child):not(:last-child):not(.active) {
        display: none;
    }

    .pager li.active,
    .pager li:first-child,
    .pager li:last-child {
        display: block;
    }

    .pager li.disabled:not(:first-child):not(:last-child) {
        display: none;
    }
}

/* Animation d'entrée */
.pager li {
    animation: paginationItem 0.5s ease-out forwards;
    opacity: 0;
    transform: translateY(10px);
}

@keyframes paginationItem {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Délais d'animation pour chaque élément */
.pager li:nth-child(1) { animation-delay: 0.1s; }
.pager li:nth-child(2) { animation-delay: 0.2s; }
.pager li:nth-child(3) { animation-delay: 0.3s; }
.pager li:nth-child(4) { animation-delay: 0.4s; }
.pager li:nth-child(5) { animation-delay: 0.5s; }
.pager li:nth-child(6) { animation-delay: 0.6s; }
.pager li:nth-child(7) { animation-delay: 0.7s; }
.pager li:nth-child(8) { animation-delay: 0.8s; }
.pager li:nth-child(9) { animation-delay: 0.9s; }
.pager li:nth-child(10) { animation-delay: 1s; }
