/* Animations CSS supplémentaires pour index.php */

/* Curseur typewriter clignotant */
.typewriter-cursor {
    color: #00eaff;
    animation: typewriter-blink 1s infinite;
    font-weight: normal;
}

@keyframes typewriter-blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Animations pour les astéroïdes obsolètes (fallback) */
.asteroid {
    position: absolute;
    background: radial-gradient(circle, #666, #333);
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
}

.asteroid-background {
    z-index: 1;
}

.asteroid-normal {
    z-index: 10;
}

.asteroid-foreground {
    z-index: 100;
}

/* Animation pour les astéroïdes flottants */
@keyframes asteroidFloat {
    from {
        transform: translateY(-50px) rotate(0deg);
    }
    to {
        transform: translateY(calc(100vh + 50px)) rotate(360deg);
    }
}

/* Responsive pour le badge de refactoring */
@media (max-width: 768px) {
    .refactor-badge {
        top: 10px;
        right: 10px;
        padding: 8px 15px;
        font-size: 10px;
    }
}

/* --- Overrides & animations spécifiques aux liens sociaux de la home --- */
/* 1) Désactiver les animations séquentielles CSS existantes (neonFlicker1..6),
      tout en laissant les animations pilotées par JS passer */
body.homepage .social-link:not(.flicker):not(.bounce-once) {
    animation: none !important;
}

/* 2) Apparition séquentielle contrôlée par JS (classes utilitaires) */
body.homepage .social-link.pre-hide {
    opacity: 0 !important;
    transform: translateY(20px) !important;
}
body.homepage .social-link.is-visible {
    transition: opacity .45s ease, transform .45s ease;
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* 3) Clignotement court (aléatoire, appliqué par JS) */
@keyframes uiFlickerQuick {
    0%   { opacity: 1 }
    /* Blink #1 */
    12%  { opacity: .2 }
    20%  { opacity: 1 }
    /* Blink #2 */
    40%  { opacity: .15 }
    48%  { opacity: 1 }
    /* Blink #3 */
    68%  { opacity: .3 }
    76%  { opacity: 1 }
    100% { opacity: 1 }
}
body.homepage .social-link.flicker {
    animation: uiFlickerQuick .75s ease-in-out !important;
}

/* 4) Bounce léger et ponctuel pour UNE icône (appliqué par JS) */
@keyframes subtleBounceOnce {
    0% { transform: translateY(0) }
    35% { transform: translateY(-4px) }
    70% { transform: translateY(0) }
    100% { transform: translateY(0) }
}
body.homepage .social-link.bounce-once {
    animation: subtleBounceOnce .5s ease !important;
}
