/**
 * animations.css - Styles d'animations supplémentaires
 */

/* Keyframes globales */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-10px); }
    20%, 40%, 60%, 80% { transform: translateX(10px); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

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

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes rotateIn {
    from {
        transform: rotate(-180deg);
        opacity: 0;
    }
    to {
        transform: rotate(0);
        opacity: 1;
    }
}

/* Classes d'animation - DESACTIVE pour eviter flash */
.animate-in {
    animation: none;
    opacity: 1;
    transform: none;
}

.slide-in-left {
    animation: none;
    opacity: 1;
    transform: none;
}

.slide-in-right {
    animation: none;
    opacity: 1;
    transform: none;
}

.zoom-in {
    animation: none;
    opacity: 1;
    transform: none;
}

.rotate-in {
    animation: none;
    opacity: 1;
    transform: none;
}

.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.bounce {
    animation: bounce 1s infinite;
}

/* Hover effects */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.hover-grow {
    transition: transform 0.3s ease;
}

.hover-grow:hover {
    transform: scale(1.05);
}

.hover-glow {
    transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(29, 78, 216, 0.5);
}

/* Gradient animations */
.gradient-animate {
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Loading spinner */
.loader-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f4f6;
    border-top: 5px solid #1d4ed8;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Text animations */
.text-gradient {
    background: linear-gradient(90deg, #1d4ed8, #3b82f6, #1d4ed8);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 3s linear infinite;
}

/* Ripple effect */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.ripple:active::after {
    width: 300px;
    height: 300px;
}

/* Scroll reveal - DESACTIVE */
.reveal {
    opacity: 1;
    transform: none;
    transition: none;
}

.reveal.active {
    opacity: 1;
    transform: none;
}

/* Section visible animation - DESACTIVE */
.section-visible {
    animation: none;
}

/* Animate fade-in-up for canvas text overlay - DESACTIVE */
.animate-fade-in-up {
    animation: none;
}

/* Stagger animation for children - DESACTIVE */
.stagger-children > * {
    opacity: 1;
    transform: none;
    animation: none;
}

.stagger-children > *:nth-child(1) { animation: none; }
.stagger-children > *:nth-child(2) { animation: none; }
.stagger-children > *:nth-child(3) { animation: none; }
.stagger-children > *:nth-child(4) { animation: none; }
.stagger-children > *:nth-child(5) { animation: none; }

/* Glow effect */
.glow {
    box-shadow: 0 0 20px rgba(29, 78, 216, 0.3);
    animation: glowPulse 2s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(29, 78, 216, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(29, 78, 216, 0.6);
    }
}

/* Utilities */
.transition-all {
    transition: all 0.3s ease;
}

.transition-fast {
    transition: all 0.15s ease;
}

.transition-slow {
    transition: all 0.6s ease;
}

/* Mobile optimizations */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print styles */
@media print {
    .animate-in,
    .slide-in-left,
    .slide-in-right,
    .zoom-in,
    .rotate-in {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ============================================
   LIQUID GLASS EFFECT - Navigation Header
   ============================================ */

/* Container for liquid glass nav - Full width */
.liquid-glass-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 50;
    /* État initial : fond solide sans glassmorphisme */
    background: linear-gradient(135deg, #1e40af 0%, #1d4ed8 50%, #3b82f6 100%);
    border-bottom: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: none !important;
}

.liquid-glass-nav::before,
.liquid-glass-nav::after {
    display: none !important;
}

/* ============================================
   GLASSMORPHISME ACTIVÉ AU SCROLL
   ============================================ */

/* Scrolled state - GLASSMORPHISME COMPLET */
.liquid-glass-nav.scrolled {
    /* Effet verre dépoli avec transparence */
    background: rgba(29, 78, 216, 0.65);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.25),
        0 4px 16px rgba(29, 78, 216, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.25),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
}

/* Effet lumineux interne quand glassmorphisme actif */
.liquid-glass-nav.scrolled::before {
    display: block !important;
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.4) 20%, 
        rgba(255, 255, 255, 0.5) 50%, 
        rgba(255, 255, 255, 0.4) 80%, 
        transparent);
    pointer-events: none;
}

/* Reflet subtil en bas du header glass */
.liquid-glass-nav.scrolled::after {
    display: block !important;
    content: "";
    position: absolute;
    bottom: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.1), 
        transparent);
    pointer-events: none;
}

/* Navigation content wrapper - centered container */
.liquid-glass-content {
    position: relative;
    z-index: 1;
    max-width: 1280px;
    margin: 0 auto;
    padding: 16px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    animation: none !important;
}

/* Navigation links with glass hover effect */
.liquid-glass-link {
    position: relative;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 12px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.liquid-glass-link:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    transform: translateY(-2px);
}

.liquid-glass-link.active {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

/* CTA Button within glass nav */
.liquid-glass-cta {
    background: rgba(255, 255, 255, 0.9);
    color: #1d4ed8;
    padding: 10px 24px;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(29, 78, 216, 0.3);
}

.liquid-glass-cta:hover {
    background: #ffffff;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(29, 78, 216, 0.4);
}

/* Mobile glass navigation */
@media (max-width: 1024px) {
    .liquid-glass-nav {
        width: 100%;
    }

    .liquid-glass-content {
        padding: 10px 12px;
        gap: 12px;
    }

    .liquid-glass-link {
        padding: 6px 12px;
        font-size: 14px;
    }
}

@media (max-width: 640px) {
    .liquid-glass-content {
        padding: 8px 10px;
        gap: 8px;
    }
}

/* Mobile menu within glass context */
.liquid-glass-mobile-menu {
    background: rgba(29, 78, 216, 0.98);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

@media (max-width: 640px) {
    .liquid-glass-mobile-menu {
        max-height: calc(100vh - 60px);
        overflow-y: auto;
    }
}

/* SVG Filter for advanced glass distortion (optional enhancement) */
.glass-filter-svg {
    position: absolute;
    width: 0;
    height: 0;
}

/* Background animation for demo */
@keyframes moveBackground {
    from {
        background-position: 0% 0%;
    }
    to {
        background-position: 0% -1000%;
    }
}

.animate-bg {
    animation: moveBackground 60s linear infinite;
}

/* ============================================
   CORRECTION PADDING BODY MOBILE
   ============================================ */
@media (max-width: 1024px) {
    body {
        padding-top: 64px !important;
    }
}

@media (max-width: 640px) {
    body {
        padding-top: 60px !important;
    }
}
