/* ============================================
   ANIMATIONS 3D POUR PAGE D'ACCUEIL TICDONE
   Inspiré des meilleures marketplaces B2B
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700;800&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
    --animate-duration: 1s;
    --animate-delay: 0.5s;
}

/* ============================================
   ANIMATIONS KEYFRAMES
   ============================================ */

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

@keyframes float-reverse {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(20px) rotate(-5deg);
    }
}

@keyframes rotate-3d {
    0% {
        transform: rotateY(0deg) rotateX(0deg);
    }
    50% {
        transform: rotateY(180deg) rotateX(10deg);
    }
    100% {
        transform: rotateY(360deg) rotateX(0deg);
    }
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(255, 140, 31, 0.4);
    }
    50% {
        box-shadow: 0 0 40px rgba(255, 140, 31, 0.8);
    }
}

@keyframes slide-in-left {
    0% {
        opacity: 0;
        transform: translateX(-100px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slide-in-right {
    0% {
        opacity: 0;
        transform: translateX(100px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slide-in-up {
    0% {
        opacity: 0;
        transform: translateY(50px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scale-in {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes bounce-in {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

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

/* ============================================
   HERO SECTION AVEC ANIMATIONS 3D
   ============================================ */

.hero-3d {
    position: relative;
    background: linear-gradient(135deg, #1e3a8a 0%, #1e5ba8 50%, #2563eb 100%);
    background-size: 200% 200%;
    animation: gradient-shift 15s ease infinite;
    overflow: hidden;
}

.hero-3d::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.3;
    animation: float 20s ease-in-out infinite;
}

/* Particules flottantes 3D */
.floating-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.particle:nth-child(1) {
    width: 80px;
    height: 80px;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.particle:nth-child(2) {
    width: 60px;
    height: 60px;
    top: 60%;
    left: 80%;
    animation-delay: 2s;
    animation-name: float-reverse;
}

.particle:nth-child(3) {
    width: 100px;
    height: 100px;
    top: 80%;
    left: 20%;
    animation-delay: 4s;
}

.particle:nth-child(4) {
    width: 40px;
    height: 40px;
    top: 30%;
    left: 70%;
    animation-delay: 1s;
    animation-name: float-reverse;
}

/* ============================================
   ICÔNES 3D ANIMÉES
   ============================================ */

.icon-3d-container {
    perspective: 1000px;
    transform-style: preserve-3d;
}

.icon-3d {
    position: relative;
    width: 80px;
    height: 80px;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.icon-3d:hover {
    transform: rotateY(180deg) scale(1.1);
}

.icon-3d-front,
.icon-3d-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-3d-front {
    background: linear-gradient(135deg, #ff8c1f 0%, #ea580c 100%);
    box-shadow: 0 10px 30px rgba(255, 140, 31, 0.4);
}

.icon-3d-back {
    background: linear-gradient(135deg, #2563eb 0%, #1e5ba8 100%);
    transform: rotateY(180deg);
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.4);
}

/* ============================================
   CARTES PRODUITS AVEC EFFET 3D
   ============================================ */

.product-card-3d {
    position: relative;
    transform-style: preserve-3d;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.product-card-3d:hover {
    transform: translateY(-10px) rotateX(5deg) rotateY(5deg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.product-card-3d::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 140, 31, 0.1) 0%, rgba(37, 99, 235, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: inherit;
    pointer-events: none;
}

.product-card-3d:hover::before {
    opacity: 1;
}

/* ============================================
   BADGES ANIMÉS
   ============================================ */

.badge-animated {
    position: relative;
    overflow: hidden;
    animation: bounce-in 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.badge-animated::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

/* ============================================
   SECTIONS AVEC PARALLAX
   ============================================ */

.parallax-section {
    position: relative;
    overflow: hidden;
}

.parallax-bg {
    position: absolute;
    top: -50px;
    left: 0;
    right: 0;
    bottom: -50px;
    background-size: cover;
    background-position: center;
    transform: translateZ(-1px) scale(2);
}

/* ============================================
   BOUTONS AVEC EFFET RIPPLE
   ============================================ */

.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-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;
}

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

/* ============================================
   STATISTIQUES ANIMÉES
   ============================================ */

.stat-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    animation: slide-in-up 0.6s ease-out;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, #ff8c1f 0%, #ea580c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: scale-in 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* ============================================
   CATÉGORIES AVEC GLASSMORPHISM
   ============================================ */

.category-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);
    border-radius: 20px;
    transition: all 0.3s ease;
}

.category-glass:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-5px);
}

/* ============================================
   TEXTE AVEC GRADIENT ANIMÉ
   ============================================ */

.text-gradient-animated {
    background: linear-gradient(90deg, #ff8c1f, #ea580c, #2563eb, #1e5ba8);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 5s ease infinite;
}

/* ============================================
   LOADING SKELETON
   ============================================ */

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .icon-3d {
        width: 60px;
        height: 60px;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .product-card-3d:hover {
        transform: translateY(-5px);
    }
}

/* ============================================
   UTILITAIRES D'ANIMATION
   ============================================ */

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-float-reverse {
    animation: float-reverse 6s ease-in-out infinite;
}

.animate-rotate-3d {
    animation: rotate-3d 10s linear infinite;
}

.animate-pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

.animate-slide-in-left {
    animation: slide-in-left 0.6s ease-out;
}

.animate-slide-in-right {
    animation: slide-in-right 0.6s ease-out;
}

.animate-slide-in-up {
    animation: slide-in-up 0.6s ease-out;
}

.animate-scale-in {
    animation: scale-in 0.5s ease-out;
}

.animate-bounce-in {
    animation: bounce-in 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Délais d'animation */
.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; }
.delay-600 { animation-delay: 0.6s; }
.delay-700 { animation-delay: 0.7s; }
.delay-800 { animation-delay: 0.8s; }

/* ============================================
   SCROLL REVEAL ANIMATIONS
   ============================================ */

.scroll-reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   MARQUEE DÉFILANT
   ============================================ */

@keyframes marquee {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.marquee {
    display: flex;
    overflow: hidden;
    user-select: none;
    gap: 2rem;
}

.marquee-content {
    flex-shrink: 0;
    display: flex;
    justify-content: space-around;
    gap: 2rem;
    min-width: 100%;
    animation: marquee 30s linear infinite;
}

.marquee:hover .marquee-content {
    animation-play-state: paused;
}

/* ============================================
   COMPTEUR ANIMÉ
   ============================================ */

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

.counter {
    animation: countUp 1s ease-out;
}

/* ============================================
   EFFET NÉON
   ============================================ */

@keyframes neon-glow {
    0%, 100% {
        text-shadow: 
            0 0 10px rgba(255, 140, 31, 0.8),
            0 0 20px rgba(255, 140, 31, 0.6),
            0 0 30px rgba(255, 140, 31, 0.4);
    }
    50% {
        text-shadow: 
            0 0 20px rgba(255, 140, 31, 1),
            0 0 40px rgba(255, 140, 31, 0.8),
            0 0 60px rgba(255, 140, 31, 0.6);
    }
}

.neon-text {
    animation: neon-glow 2s ease-in-out infinite;
}

/* ============================================
   EFFET TYPING
   ============================================ */

@keyframes typing {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blink {
    50% {
        border-color: transparent;
    }
}

.typing-effect {
    overflow: hidden;
    border-right: 3px solid #ff8c1f;
    white-space: nowrap;
    animation: typing 3.5s steps(40, end), blink 0.75s step-end infinite;
}

/* ============================================
   EFFET MORPHING
   ============================================ */

@keyframes morph {
    0%, 100% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }
    50% {
        border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
    }
}

.morph-shape {
    animation: morph 8s ease-in-out infinite;
}

/* ============================================
   EFFET GLITCH
   ============================================ */

@keyframes glitch {
    0% {
        transform: translate(0);
    }
    20% {
        transform: translate(-2px, 2px);
    }
    40% {
        transform: translate(-2px, -2px);
    }
    60% {
        transform: translate(2px, 2px);
    }
    80% {
        transform: translate(2px, -2px);
    }
    100% {
        transform: translate(0);
    }
}

.glitch:hover {
    animation: glitch 0.3s infinite;
}

/* ============================================
   EFFET TILT 3D
   ============================================ */

.tilt-3d {
    transform-style: preserve-3d;
    transition: transform 0.3s ease;
}

.tilt-3d:hover {
    transform: perspective(1000px) rotateX(10deg) rotateY(10deg) scale(1.05);
}

/* ============================================
   EFFET SPOTLIGHT
   ============================================ */

@keyframes spotlight {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}

.spotlight {
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.3) 50%, 
        transparent 100%);
    background-size: 200% 100%;
    animation: spotlight 3s linear infinite;
}

/* ============================================
   EFFET WAVE
   ============================================ */

@keyframes wave {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-10px) rotate(5deg);
    }
    75% {
        transform: translateY(10px) rotate(-5deg);
    }
}

.wave {
    animation: wave 3s ease-in-out infinite;
}

/* ============================================
   EFFET FLIP CARD
   ============================================ */

.flip-card {
    perspective: 1000px;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
}

.flip-card-back {
    transform: rotateY(180deg);
}

/* ============================================
   EFFET ZOOM INFINI
   ============================================ */

@keyframes zoom-infinite {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.zoom-infinite {
    animation: zoom-infinite 3s ease-in-out infinite;
}

/* ============================================
   EFFET CONFETTI
   ============================================ */

@keyframes confetti-fall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #ff8c1f;
    animation: confetti-fall 3s linear infinite;
}

/* ============================================
   EFFET MAGNETIC HOVER
   ============================================ */

.magnetic {
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.magnetic:hover {
    transform: scale(1.05) translateZ(20px);
}

/* ============================================
   EFFET LIQUID
   ============================================ */

@keyframes liquid {
    0%, 100% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
        transform: rotate(0deg);
    }
    25% {
        border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
    }
    50% {
        border-radius: 50% 50% 50% 50% / 50% 50% 50% 50%;
        transform: rotate(180deg);
    }
    75% {
        border-radius: 40% 60% 60% 40% / 60% 40% 60% 40%;
    }
}

.liquid-shape {
    animation: liquid 10s ease-in-out infinite;
}

/* ============================================
   EFFET AURORA
   ============================================ */

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

.aurora-bg {
    background: linear-gradient(45deg, #ff8c1f, #ea580c, #2563eb, #1e5ba8, #ff8c1f);
    background-size: 400% 400%;
    animation: aurora 15s ease infinite;
}

/* ============================================
   RESPONSIVE ANIMATIONS
   ============================================ */

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

