/* ===================================
   Animations personnalisées pour Tailwind
   =================================== */

/* Animation fade-in-up */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

/* Animation avec délais */
.animate-fade-in-up:nth-child(1) {
    animation-delay: 0.1s;
}

.animate-fade-in-up:nth-child(2) {
    animation-delay: 0.2s;
}

.animate-fade-in-up:nth-child(3) {
    animation-delay: 0.3s;
}

/* Classe pour les éléments qui apparaissent au scroll */
.fade-in-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Animation pulse subtile pour les boutons CTA */
@keyframes subtle-pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(87, 196, 216, 0.7);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(87, 196, 216, 0);
    }
}

.btn-pulse {
    animation: subtle-pulse 2s infinite;
}

/* Smooth scroll global */
html {
    scroll-behavior: smooth;
}

/* Style pour le menu mobile ouvert */
#mobileMenu.active {
    display: block !important;
}

/* Animation du burger menu */
.nav-toggle-active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle-active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle-active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Effet de survol amélioré pour les cartes */
.card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
    transform: translateY(-8px) scale(1.02);
}

/* Animation pour les icônes */
@keyframes icon-bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.icon-bounce:hover {
    animation: icon-bounce 0.6s ease-in-out;
}

/* Style pour les transitions de page */
.page-transition {
    animation: fadeIn 0.4s ease-in;
}

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

/* Effet de focus personnalisé pour les inputs */
input:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(87, 196, 216, 0.2);
}

/* Amélioration du carousel */
.testimonials-carousel {
    position: relative;
    min-height: 300px;
}

.testimonial-item {
    animation: fadeIn 0.5s ease-in;
}

/* Animation pour le scroll reveal */
.reveal {
    position: relative;
    opacity: 0;
}

.reveal.active {
    opacity: 1;
}

.active.fade-bottom {
    animation: fade-bottom 1s ease-in;
}

@keyframes fade-bottom {
    0% {
        transform: translateY(50px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Effet glassmorphism optionnel */
.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Gradient text */
.gradient-text {
    background: linear-gradient(135deg, #1a5f7a 0%, #57c4d8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Shadow glow effect */
.shadow-glow {
    box-shadow: 0 0 20px rgba(87, 196, 216, 0.3);
}

.shadow-glow:hover {
    box-shadow: 0 0 30px rgba(87, 196, 216, 0.5);
}

/* Loading animation (si besoin) */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading {
    animation: spin 1s linear infinite;
}

/* ===================================
   Animation fond binaire (hero)
   =================================== */
@keyframes binary-scroll {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-50%);
    }
}

.hero-binary {
    position: relative;
    overflow: hidden;
}

.hero-binary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 200%;
    background-image: url('/assets/images/about/binary-bg.png');
    background-size: 100% auto;
    background-repeat: repeat-y;
    animation: binary-scroll 25s linear infinite;
    opacity: 0.15;
    z-index: 1;
    pointer-events: none;
}

.hero-binary > * {
    position: relative;
    z-index: 2;
}
