/* ========================================
   ANIMATIONS COMPLÉMENTAIRES
   ======================================== */

/* Animation pour le code window typing */
.window-content {
    position: relative;
    max-height: 400px;
    overflow-y: auto;
    scroll-behavior: smooth;
}

.window-content pre code {
    display: block;
    min-height: 200px;
}

/* Effet de glitch sur les cartes de projet */
.project-card.glitch-active {
    animation: glitch 0.3s cubic-bezier(.25,.46,.45,.94) both;
}

@keyframes glitch {
    0%, 100% {
        transform: translate(0);
    }
    20% {
        transform: translate(-2px, 2px);
    }
    40% {
        transform: translate(-2px, -2px);
    }
    60% {
        transform: translate(2px, 2px);
    }
    80% {
        transform: translate(2px, -2px);
    }
}

/* Effet de survol amélioré pour les cartes */
.project-card,
.skill-card,
.design-item {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 
        0 20px 40px rgba(139, 92, 246, 0.3),
        0 0 0 1px rgba(139, 92, 246, 0.1);
}

.skill-card:hover {
    transform: translateY(-8px) rotate(2deg);
    box-shadow: 0 15px 30px rgba(139, 92, 246, 0.25);
}

/* Animation de pulsation pour les boutons */
.btn-primary,
.btn-secondary {
    position: relative;
    overflow: hidden;
}

.btn-primary::before,
.btn-secondary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:hover::before,
.btn-secondary:hover::before {
    width: 300px;
    height: 300px;
}

/* Effet de gradient animé pour le hero */
#hero {
    --mouse-x: 50%;
    --mouse-y: 50%;
    background: 
        radial-gradient(circle at var(--mouse-x) var(--mouse-y), 
            rgba(139, 92, 246, 0.15) 0%, 
            transparent 50%),
        var(--color-bg-dark);
    transition: background 0.3s ease;
}

/* Animation pour les statistiques */
.stat-number {
    font-size: 3rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: transform 0.3s ease;
}

.stat-item:hover .stat-number {
    transform: scale(1.1);
}

/* Effet de brillance sur les cartes glass */
.glass-card {
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.05) 50%,
        transparent 70%
    );
    transform: rotate(45deg);
    animation: shine 8s infinite;
}

@keyframes shine {
    0%, 100% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    50% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

/* Effet de particules flottantes - styles de base */
.particles-container {
    opacity: 0.6;
}

/* Animation pour le logo */
.logo {
    transition: all 0.3s ease;
}

.logo:hover {
    transform: scale(1.1) rotate(-5deg);
}

.logo-text {
    display: inline-block;
    transition: all 0.3s ease;
}

.logo:hover .logo-text:first-child {
    transform: translateX(-3px);
}

.logo:hover .logo-text:last-child {
    transform: translateX(3px);
}

.logo-dot {
    display: inline-block;
    color: var(--color-primary);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.3);
        opacity: 0.8;
    }
}

/* Effet de typing pour le hero */
.typing-cursor::after {
    content: '|';
    animation: blink 1s infinite;
    color: var(--color-primary);
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Animation d'entrée pour les éléments */
.fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Effet de vague sur les boutons */
.btn {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    z-index: -1;
}

.btn:active::after {
    width: 300px;
    height: 300px;
}

/* Animation pour les icônes sociales */
.nav-social a,
.footer-social a {
    position: relative;
    transition: all 0.3s ease;
}

.nav-social a::before,
.footer-social a::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: var(--color-primary);
    opacity: 0.2;
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s;
    z-index: -1;
}

.nav-social a:hover::before,
.footer-social a:hover::before {
    width: 40px;
    height: 40px;
}

/* Effet de rotation 3D pour les cartes de compétences */
.skill-card {
    transform-style: preserve-3d;
    perspective: 1000px;
}

.skill-card:hover {
    transform: translateY(-8px) rotateX(5deg) rotateY(5deg);
}

/* Animation de chargement pour les images */
.project-image img,
.design-image img {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card:hover .project-image img,
.design-item:hover .design-image img {
    transform: scale(1.1);
}

/* Effet de lueur pour les éléments actifs */
.nav-link.active,
.filter-btn.active,
.tab-btn.active {
    position: relative;
}

.nav-link.active::after,
.filter-btn.active::after,
.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 10px;
    box-shadow: 0 0 10px var(--color-primary);
    animation: glow 2s infinite;
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px var(--color-primary);
    }
    50% {
        box-shadow: 0 0 20px var(--color-primary);
    }
}

/* Animation de rebond pour les éléments au scroll */
.bounce-in {
    animation: bounceIn 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3) translateY(50px);
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Effet de dégradé animé pour les titres */
.gradient-text {
    background: var(--gradient-primary);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% center;
    }
    50% {
        background-position: 100% center;
    }
}

/* Effet de flottaison pour le code window */
.code-window {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* Amélioration de la scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #a855f7 0%, #8b5cf6 100%);
}

/* Effet de néon pour les titres de section */
.section-title {
    text-shadow: 0 0 10px rgba(139, 92, 246, 0.3);
    transition: text-shadow 0.3s ease;
}

.section-header:hover .section-title {
    text-shadow: 
        0 0 10px rgba(139, 92, 246, 0.6),
        0 0 20px rgba(139, 92, 246, 0.4),
        0 0 30px rgba(139, 92, 246, 0.2);
}

/* Animation de rotation pour les icônes au survol */
.skill-icon,
.feature-icon {
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.skill-card:hover .skill-icon,
.feature-card:hover .feature-icon {
    transform: rotate(360deg) scale(1.1);
}

/* Responsive - Désactiver certaines animations sur mobile */
@media (max-width: 768px) {
    .code-window {
        animation: none;
    }
    
    .project-card:hover,
    .skill-card:hover {
        transform: translateY(-5px);
    }
    
    #hero {
        background-color: #0f0f23 !important;
        background-image: none !important;
    }
}

/* Effet de bordure animée */
.border-glow {
    position: relative;
}

.border-glow::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: var(--gradient-primary);
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
    filter: blur(10px);
}

.border-glow:hover::before {
    opacity: 0.7;
}