/* 🚀 ANIMATIONS NIVEAU 2050 - MOOVE CITY */

/* ========================================
   DARK MODE AUTOMATIQUE
   ======================================== */

@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #0f172a;
        --bg-secondary: #1e293b;
        --text-primary: #f8fafc;
        --text-secondary: #cbd5e1;
        --border-color: #334155;
    }

    body {
        background: var(--bg-primary);
        color: var(--text-primary);
    }

    .article-card,
    .highlight-box,
    .faq-section {
        background: var(--bg-secondary);
        border-color: var(--border-color);
    }

    .article-card:hover {
        box-shadow: 0 8px 32px rgba(5, 150, 105, 0.3);
    }
}

/* ========================================
   ANIMATIONS SCROLL REVEAL
   ======================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Classes d'animation */
.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

.animate-fade-in-left {
    animation: fadeInLeft 0.6s ease-out forwards;
}

.animate-fade-in-right {
    animation: fadeInRight 0.6s ease-out forwards;
}

.animate-scale-in {
    animation: scaleIn 0.5s ease-out forwards;
}

/* Délais d'animation pour effet cascade */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }

/* ========================================
   HOVER EFFECTS AVANCÉS
   ======================================== */

.article-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.article-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

/* ========================================
   LOADING ANIMATIONS
   ======================================== */

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.skeleton {
    background: linear-gradient(
        90deg,
        #f0f0f0 25%,
        #e0e0e0 50%,
        #f0f0f0 75%
    );
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* ========================================
   PARALLAX SMOOTH
   ======================================== */

.parallax-section {
    transform: translateZ(0);
    will-change: transform;
}

/* ========================================
   MICRO-INTERACTIONS
   ======================================== */

@keyframes bounce-subtle {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.bounce-on-hover:hover {
    animation: bounce-subtle 0.6s ease-in-out;
}

/* Click effect */
.click-effect {
    position: relative;
    overflow: hidden;
}

.click-effect::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, opacity 0.6s;
    opacity: 0;
}

.click-effect:active::after {
    width: 200px;
    height: 200px;
    opacity: 1;
    transition: 0s;
}

/* ========================================
   GRADIENT ANIMATIONS
   ======================================== */

@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.gradient-animated {
    background-size: 200% 200%;
    animation: gradient-shift 6s ease infinite;
}

/* ========================================
   SCROLL PROGRESS BAR
   ======================================== */

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(90deg, #059669, #10b981);
    z-index: 9999;
    transition: width 0.1s ease-out;
}

/* ========================================
   SMOOTH SCROLLING
   ======================================== */

html {
    scroll-behavior: smooth;
}

/* Pour Safari */
@supports (-webkit-overflow-scrolling: touch) {
    html {
        scroll-behavior: auto;
    }
}

/* ========================================
   FOCUS VISIBLE (Accessibilité)
   ======================================== */

*:focus-visible {
    outline: 3px solid #059669;
    outline-offset: 3px;
    border-radius: 4px;
}

/* ========================================
   REDUCED MOTION (Accessibilité)
   ======================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}

/* ========================================
   GLASSMORPHISM EFFECT
   ======================================== */

.glass {
    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);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* ========================================
   NEON GLOW EFFECT
   ======================================== */

.neon-green {
    text-shadow: 
        0 0 10px rgba(5, 150, 105, 0.8),
        0 0 20px rgba(5, 150, 105, 0.6),
        0 0 30px rgba(5, 150, 105, 0.4);
}

/* ========================================
   FLOATING ANIMATION
   ======================================== */

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.floating {
    animation: float 3s ease-in-out infinite;
}

/* ========================================
   TYPING EFFECT
   ======================================== */

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink {
    50% { border-color: transparent; }
}

.typing-effect {
    overflow: hidden;
    border-right: 3px solid #059669;
    white-space: nowrap;
    animation: typing 3.5s steps(40) 1s normal both,
               blink 0.75s step-end infinite;
}

/* ========================================
   3D CARD FLIP
   ======================================== */

.card-3d {
    perspective: 1000px;
}

.card-3d-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.card-3d:hover .card-3d-inner {
    transform: rotateY(180deg);
}

.card-front,
.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
}

.card-back {
    transform: rotateY(180deg);
}

/* ========================================
   PERFORMANCE OPTIMIZATIONS
   ======================================== */

/* GPU Acceleration */
.gpu-accelerated {
    transform: translateZ(0);
    will-change: transform;
    backface-visibility: hidden;
}

/* Lazy Load Images */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* ========================================
   CURSOR CUSTOM (Niveau 2050)
   ======================================== */

.custom-cursor {
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10" fill="%23059669"/></svg>'), auto;
}

/* ========================================
   PRINT STYLES (Optimisation Impression)
   ======================================== */

@media print {
    header,
    footer,
    .btn,
    .cta-box,
    video {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    a {
        text-decoration: underline;
        color: black !important;
    }

    a[href^="http"]:after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
    }
}

/* ========================================
   RESPONSIVE TYPOGRAPHY
   ======================================== */

:root {
    --font-size-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
    --font-size-lg: clamp(1.125rem, 1rem + 0.625vw, 1.5rem);
    --font-size-xl: clamp(1.5rem, 1.25rem + 1.25vw, 2.5rem);
    --font-size-2xl: clamp(2rem, 1.5rem + 2.5vw, 4rem);
}

body {
    font-size: var(--font-size-base);
}

h1 {
    font-size: var(--font-size-2xl);
}

h2 {
    font-size: var(--font-size-xl);
}

h3 {
    font-size: var(--font-size-lg);
}
