/* Animations pour les articles populaires - Zoom vers la droite */

/* Animation de zoom vers la droite pour les list-group-items */
.popular-articles .list-group-item {
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform: translateX(0) scale(1);
    border-radius: 12px;
    margin-bottom: 8px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.popular-articles .list-group-item:hover {
    transform: translateX(15px) scale(1.02);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 193, 7, 0.3);
    background: linear-gradient(135deg, #ffffff 0%, #fff9e6 100%);
    z-index: 10;
}

/* Animation du badge de rang */
.popular-articles .badge.bg-secondary {
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
    font-weight: 700;
    min-width: 25px;
    text-align: center;
}

.popular-articles .list-group-item:hover .badge.bg-secondary {
    transform: scale(1.2) rotate(-5deg);
    background: linear-gradient(135deg, #ffc107, #ff9800) !important;
    color: #fff;
    box-shadow: 0 4px 8px rgba(255, 193, 7, 0.4);
}

/* Animation du titre */
.popular-articles .list-group-item h6 {
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.popular-articles .list-group-item:hover h6 {
    color: #ff6b35;
    transform: translateX(5px);
    font-weight: 600;
}

/* Animation du texte de description */
.popular-articles .list-group-item .text-muted {
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
    opacity: 0.8;
}

.popular-articles .list-group-item:hover .text-muted {
    opacity: 1;
    color: #666;
    transform: translateX(3px);
}

/* Animation des badges de catégorie */
.popular-articles .list-group-item .badge:not(.bg-secondary) {
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
    font-weight: 600;
}

.popular-articles .list-group-item:hover .badge:not(.bg-secondary) {
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* Animation des métadonnées (vues, date) */
.popular-articles .list-group-item small {
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.popular-articles .list-group-item:hover small {
    transform: translateX(3px);
    color: #555;
}

/* Animation des icônes */
.popular-articles .list-group-item .fas {
    transition: all 0.3s ease;
}

.popular-articles .list-group-item:hover .fas.fa-eye {
    transform: scale(1.2) rotate(10deg);
    color: #ff6b35;
}

.popular-articles .list-group-item:hover .fas.fa-calendar {
    transform: scale(1.2) rotate(-10deg);
    color: #28a745;
}

/* Animation de l'image */
.popular-articles .list-group-item img {
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform: scale(1);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.popular-articles .list-group-item:hover img {
    transform: scale(1.1) rotate(2deg);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(255, 193, 7, 0.3);
}

/* Effet de brillance au survol */
.popular-articles .list-group-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 193, 7, 0.1), 
        rgba(255, 193, 7, 0.2),
        rgba(255, 193, 7, 0.1),
        transparent
    );
    transition: left 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 1;
}

.popular-articles .list-group-item:hover::before {
    left: 100%;
}

/* Animation d'entrée progressive */
@keyframes slideInRight {
    0% {
        opacity: 0;
        transform: translateX(50px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.popular-articles .list-group-item {
    animation: slideInRight 0.6s ease-out;
    animation-fill-mode: both;
}

/* Délai d'animation pour chaque article */
.popular-articles .list-group-item:nth-child(1) { animation-delay: 0.1s; }
.popular-articles .list-group-item:nth-child(2) { animation-delay: 0.2s; }
.popular-articles .list-group-item:nth-child(3) { animation-delay: 0.3s; }
.popular-articles .list-group-item:nth-child(4) { animation-delay: 0.4s; }
.popular-articles .list-group-item:nth-child(5) { animation-delay: 0.5s; }
.popular-articles .list-group-item:nth-child(6) { animation-delay: 0.6s; }
.popular-articles .list-group-item:nth-child(7) { animation-delay: 0.7s; }
.popular-articles .list-group-item:nth-child(8) { animation-delay: 0.8s; }

/* Animation de la carte newsletter */
.popular-articles .card {
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform: translateX(0);
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.popular-articles .card:hover {
    transform: translateX(10px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(40, 167, 69, 0.3);
    background: linear-gradient(135deg, #ffffff 0%, #e8f5e8 100%);
}

/* Animation du titre de la carte newsletter */
.popular-articles .card .card-title {
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.popular-articles .card:hover .card-title {
    color: #28a745;
    transform: translateX(5px);
}

/* Animation du texte de la carte newsletter */
.popular-articles .card .card-text {
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.popular-articles .card:hover .card-text {
    color: #555;
    transform: translateX(3px);
}

/* Animation du formulaire newsletter */
.popular-articles .card .form-control {
    transition: all 0.3s ease;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.popular-articles .card:hover .form-control {
    border-color: rgba(40, 167, 69, 0.3);
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.1);
}

.popular-articles .card .form-control:focus {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

/* Animation du bouton newsletter */
.popular-articles .card .btn-success {
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    font-weight: 600;
}

.popular-articles .card:hover .btn-success {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 20px rgba(40, 167, 69, 0.3);
    background: linear-gradient(135deg, #28a745, #20c997);
}

.popular-articles .card .btn-success::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.popular-articles .card .btn-success:hover::before {
    width: 300px;
    height: 300px;
}

/* Animation de l'icône newsletter */
.popular-articles .card .fas.fa-envelope {
    transition: all 0.3s ease;
}

.popular-articles .card:hover .fas.fa-envelope {
    transform: rotate(10deg) scale(1.2);
    color: #28a745;
}

/* Animation du titre de section */
.popular-articles .section-title {
    transition: all 0.3s ease;
    position: relative;
}

.popular-articles:hover .section-title {
    transform: translateX(5px);
}

.popular-articles:hover .section-title .fas.fa-fire {
    transform: rotate(15deg) scale(1.3);
    color: #ff6b35;
}

/* Effet de particules flottantes pour la carte newsletter */
.popular-articles .card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(40, 167, 69, 0.05) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
    z-index: 0;
}

.popular-articles .card:hover::after {
    opacity: 1;
    animation: float 4s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-5px) rotate(180deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .popular-articles .list-group-item:hover {
        transform: translateX(10px) scale(1.01);
    }
    
    .popular-articles .card:hover {
        transform: translateX(5px) scale(1.01);
    }
    
    .popular-articles .list-group-item img {
        width: 60px;
        height: 45px;
    }
}

@media (max-width: 576px) {
    .popular-articles .list-group-item:hover {
        transform: translateX(5px) scale(1);
    }
    
    .popular-articles .card:hover {
        transform: translateX(3px) scale(1);
    }
    
    .popular-articles .list-group-item img {
        width: 50px;
        height: 40px;
    }
}

/* Animation du nombre de vues */
.popular-articles .list-group-item:hover .fas.fa-eye {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1.2) rotate(10deg); }
    50% { transform: scale(1.4) rotate(15deg); }
    100% { transform: scale(1.2) rotate(10deg); }
}

/* Effet de surbrillance pour le rang */
.popular-articles .list-group-item:nth-child(1):hover .badge.bg-secondary {
    background: linear-gradient(135deg, #ffd700, #ffed4e) !important;
    color: #333;
}

.popular-articles .list-group-item:nth-child(2):hover .badge.bg-secondary {
    background: linear-gradient(135deg, #c0c0c0, #e8e8e8) !important;
    color: #333;
}

.popular-articles .list-group-item:nth-child(3):hover .badge.bg-secondary {
    background: linear-gradient(135deg, #cd7f32, #e4a853) !important;
    color: #fff;
}
