/* Animation d'apparition des projets */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Classes d'animation */
.project-item {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

/* Délai progressif pour chaque élément */
.project-item:nth-child(1) { animation-delay: 0.1s; }
.project-item:nth-child(2) { animation-delay: 0.2s; }
.project-item:nth-child(3) { animation-delay: 0.3s; }
.project-item:nth-child(4) { animation-delay: 0.4s; }
.project-item:nth-child(5) { animation-delay: 0.5s; }
.project-item:nth-child(6) { animation-delay: 0.6s; }
.project-item:nth-child(7) { animation-delay: 0.7s; }
.project-item:nth-child(8) { animation-delay: 0.8s; }
.project-item:nth-child(9) { animation-delay: 0.9s; }
.project-item:nth-child(n+10) { animation-delay: 1s; }

/* Animation du conteneur */
.projects-wrapper {
    position: relative;
}

.projects-wrapper.loading {
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Spinner de chargement amélioré */
.loading-spinner {
    display: inline-block;
    text-align: center;
    padding: 3rem 0;
}

.loading-spinner i {
    font-size: 3rem;
    color: #007bff;
    animation: spin 1s linear infinite;
}

.loading-spinner .loading-text {
    display: block;
    margin-top: 1rem;
    color: #6c757d;
    font-size: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Animation de pulsation pour le spinner */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading-spinner i.pulse {
    animation: spin 1s linear infinite, pulse 1.5s ease-in-out infinite;
}

/* Transition douce pour le conteneur */
#projects-body {
    transition: opacity 0.3s ease-in-out;
}

#projects-body.fade-out {
    opacity: 0.3;
}

/* Style pour l'alerte "Aucun projet" */
.alert.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* Effet hover sur les projets */
.project-item {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}


/* Responsive */
@media (max-width: 768px) {
    .project-item {
        animation: fadeIn 0.4s ease-out forwards;
    }
    
    .project-item:nth-child(n) {
        animation-delay: 0.1s;
    }
}
