/* ============================================
   BAT IA - Styles optimisés
   ============================================ */

:root {
    --electric: #8217fd;
    --electric-soft: rgba(130, 23, 253, 0.1);
}

/* ============================================
   Base & Typography
   ============================================ */
body {
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* ============================================
   Utility Classes
   ============================================ */
.bg-electric {
    background-color: var(--electric);
}

.text-electric {
    color: var(--electric);
}

.border-electric {
    border-color: var(--electric);
}

.scroll-mt-20 {
    scroll-margin-top: 5rem;
}

/* ============================================
   Backgrounds & Gradients
   ============================================ */
.speed-gradient {
    background: linear-gradient(135deg, #000025 0%, #1a1a3e 100%);
}

.speed-effect {
    background: linear-gradient(90deg, #8217fd, #c084fc, #ff6b9d, #8217fd);
    background-size: 300% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: speed-gradient 4s linear infinite;
}

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

/* ============================================
   Accessibility - Focus Styles
   ============================================ */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 3px solid var(--electric);
    outline-offset: 4px;
}

/* ============================================
   Avatar & Bubble
   ============================================ */
.avatar-bubble {
    position: relative;
    background: #ffffff;
    border-radius: 0.4em;
}

/* ============================================
   Float Animations
   ============================================ */
@keyframes float {
    0%,
    100% {
        transform: translateY(0px) rotate(2deg);
    }
    50% {
        transform: translateY(-12px) rotate(4deg);
    }
}

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

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

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

/* ============================================
   Glassmorphism Effects
   ============================================ */
.glass-header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.4s ease;
}

.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

/* ============================================
   Shine Effect
   ============================================ */
.shine-effect {
    position: relative;
    overflow: hidden;
}

.shine-effect::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -100%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transform: rotate(45deg);
    transition: 0.8s;
}

.shine-effect:hover::after {
    left: 100%;
}

/* ============================================
   Card Lift & Hover Effects
   ============================================ */
.card-lift {
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
}

.card-lift:hover {
    transform: translateY(-10px) scale(1.01);
    box-shadow: 0 25px 50px -12px rgba(130, 23, 253, 0.2);
}

/* ============================================
   Reveal Animations
   ============================================ */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   Pulse Glow Animation
   ============================================ */
@keyframes pulse-glow {
    0% {
        box-shadow: 0 0 0 0 rgba(130, 23, 253, 0.4);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(130, 23, 253, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(130, 23, 253, 0);
    }
}

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

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

/* ============================================
   Navigation Link Underline
   ============================================ */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--electric);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* ============================================
   Cookie Banner
   ============================================ */
#cookie-banner {
    transform: translateY(150%);
    transition: transform 0.5s ease-out;
}

#cookie-banner.show {
    transform: translateY(0);
}

/* ============================================
   Parallax Background
   ============================================ */
.parallax-bg {
    transition: transform 0.1s ease-out;
    will-change: transform;
}

/* ============================================
   Magnetic Button Effect
   ============================================ */
.magnetic-btn {
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* ============================================
   Hover Scale
   ============================================ */
.hover-scale {
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

/* ============================================
   3D Tilt Card Effect
   ============================================ */
.tilt-card {
    transform-style: preserve-3d;
    transition: transform 0.5s ease;
}

.tilt-card:hover {
    transform: perspective(1000px) rotateX(5deg) rotateY(-5deg);
}

/* ============================================
   Gradient Hover Text
   ============================================ */
.gradient-hover {
    background: linear-gradient(90deg, #8217fd, #c084fc);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% auto;
    transition: background-position 0.5s ease;
}

.gradient-hover:hover {
    background-position: 100% center;
}

/* ============================================
   Icon Bounce on Hover
   ============================================ */
.icon-bounce:hover i {
    animation: iconBounce 0.6s ease;
}

@keyframes iconBounce {
    0%,
    100% {
        transform: translateY(0);
    }
    25% {
        transform: translateY(-8px);
    }
    50% {
        transform: translateY(0);
    }
    75% {
        transform: translateY(-4px);
    }
}

/* ============================================
   Stagger Children Animation
   ============================================ */
.stagger-children>* {
    opacity: 0;
    transform: translateY(20px);
}

.stagger-children.active>*:nth-child(1) {
    animation: fadeSlideUp 0.6s 0.1s forwards;
}

.stagger-children.active>*:nth-child(2) {
    animation: fadeSlideUp 0.6s 0.2s forwards;
}

.stagger-children.active>*:nth-child(3) {
    animation: fadeSlideUp 0.6s 0.3s forwards;
}

.stagger-children.active>*:nth-child(4) {
    animation: fadeSlideUp 0.6s 0.4s forwards;
}

@keyframes fadeSlideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   Ripple Button Effect
   ============================================ */
.ripple-btn {
    position: relative;
    overflow: hidden;
}

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

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

/* ============================================
   Glow Border on Hover
   ============================================ */
.glow-border {
    transition: box-shadow 0.4s ease;
}

.glow-border:hover {
    box-shadow: 0 0 30px rgba(130, 23, 253, 0.4), 0 0 60px rgba(130, 23, 253, 0.2);
}

/* ============================================
   Text Reveal Animation
   ============================================ */
.text-reveal {
    overflow: hidden;
}

.text-reveal span {
    display: inline-block;
    transform: translateY(100%);
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.text-reveal.active span {
    transform: translateY(0);
}

/* ============================================
   Counter Animation
   ============================================ */
.counter {
    transition: all 0.3s ease;
}

/* ============================================
   Floating Particles
   ============================================ */
.particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: var(--electric);
    border-radius: 50%;
    opacity: 0.3;
    animation: particleFloat 8s infinite ease-in-out;
}

.particle:nth-child(2) {
    animation-delay: -2s;
    left: 20%;
}

.particle:nth-child(3) {
    animation-delay: -4s;
    left: 60%;
}

.particle:nth-child(4) {
    animation-delay: -6s;
    left: 80%;
}

@keyframes particleFloat {
    0%,
    100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.3;
    }
    50% {
        transform: translateY(-100px) rotate(180deg);
        opacity: 0.8;
    }
}

/* ============================================
   Morphing Blob Background
   ============================================ */
@keyframes morphBlob {
    0%,
    100% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }
    50% {
        border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
    }
}

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

/* ============================================
   Underline Grow Effect
   ============================================ */
.underline-grow {
    position: relative;
    display: inline-block;
}

.underline-grow::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 3px;
    background: var(--electric);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform: translateX(-50%);
}

.underline-grow:hover::after {
    width: 100%;
}

/* ============================================
   Image Zoom on Hover
   ============================================ */
.img-zoom {
    overflow: hidden;
}

.img-zoom img {
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.img-zoom:hover img {
    transform: scale(1.1);
}

/* ============================================
   Slide In From Sides
   ============================================ */
.slide-left {
    opacity: 0;
    transform: translateX(-60px);
    transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.slide-right {
    opacity: 0;
    transform: translateX(60px);
    transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.slide-left.active,
.slide-right.active {
    opacity: 1;
    transform: translateX(0);
}

/* ============================================
   Blur Reveal
   ============================================ */
.blur-reveal {
    opacity: 0;
    filter: blur(10px);
    transition: all 0.8s ease;
}

.blur-reveal.active {
    opacity: 1;
    filter: blur(0);
}

/* ============================================
   Rotating Border
   ============================================ */
@keyframes rotateBorder {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.rotating-border {
    position: relative;
}

.rotating-border::before {
    content: '';
    position: absolute;
    inset: -3px;
    background: conic-gradient(from 0deg, transparent, var(--electric), transparent);
    border-radius: inherit;
    z-index: -1;
    animation: rotateBorder 4s linear infinite;
    opacity: 0;
    transition: opacity 0.3s;
}

.rotating-border:hover::before {
    opacity: 1;
}

/* ============================================
   Cursor Glow
   ============================================ */
.cursor-glow {
    position: fixed;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(130, 23, 253, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s;
    opacity: 0;
}

/* ============================================
   Accessibility - Reduced Motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    .reveal,
    .animate-float,
    .animate-float-reverse,
    .speed-effect,
    .card-lift,
    .parallax-bg,
    .tilt-card,
    .hover-scale,
    .stagger-children>*,
    .morph-blob,
    .slide-left,
    .slide-right,
    .blur-reveal,
    .particle {
        animation: none !important;
        transition: none !important;
        transform: none !important;
        opacity: 1 !important;
        filter: none !important;
    }
}

/* ============================================
   Carousel — horizontal avec transitions
   ============================================ */

/* Contexte 3D sur le parent du wrapper */
.carousel-wrapper {
    border-radius: 1rem;
    overflow: hidden;
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.06),
        0 20px 60px rgba(0,0,0,0.5),
        0 40px 80px rgba(130,23,253,0.12);
    transform-style: preserve-3d;
    transition:
        transform 0.12s ease-out,
        box-shadow 0.4s ease;
    will-change: transform;
}

/* Ombre plus profonde au survol (réponse visuelle) */
.carousel-wrapper:hover {
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.10),
        0 30px 80px rgba(0,0,0,0.65),
        0 50px 100px rgba(130,23,253,0.22);
}

/* Retour doux à plat en quittant */
.carousel-wrapper.tilt-reset {
    transition:
        transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        box-shadow 0.5s ease;
}

/* Barre navigateur fine */
.carousel-topbar {
    background: rgba(15, 15, 30, 0.90);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* Conteneur clip — hauteur auto (images non rognées) */
.carousel-track-container {
    overflow: hidden;
    position: relative;
    background: #0a0a14;
}

/* Track horizontal */
.carousel-track {
    display: flex;
    flex-direction: row;
    will-change: transform;
    /* transition injectée inline par JS */
}

/* Chaque slide — largeur injectée par JS */
.carousel-slide {
    flex: 0 0 auto;
    position: relative;
    overflow: hidden;
}

/* Images : largeur pleine, hauteur auto — AUCUN zoom ni rognage */
.carousel-slide img {
    width: 100%;
    height: auto;
    display: block;
}

/* Barre de progression horizontale */
.carousel-progress {
    z-index: 10;
    transition: width 0.1s linear;
}

/* Flèches */
.carousel-prev,
.carousel-next {
    opacity: 0;
    transition: opacity 0.3s ease, background-color 0.3s ease;
}
.carousel-wrapper:hover .carousel-prev,
.carousel-wrapper:hover .carousel-next {
    opacity: 1;
}
@media (max-width: 768px) {
    .carousel-prev, .carousel-next { opacity: 1; }
}

/* Indicateurs (dots) */
.carousel-indicators button {
    width: 8px;
    height: 8px;
    border-radius: 9999px;
    background: rgba(255,255,255,0.2);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: width 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.3s ease;
}
.carousel-indicators button.active {
    background: var(--electric);
    width: 24px;
    border-radius: 4px;
}
.carousel-indicators button:hover:not(.active) {
    background: rgba(255,255,255,0.4);
}



@media (prefers-reduced-motion: reduce) {
    .carousel-track { transition: none !important; }
    .carousel-progress { transition: none !important; }
}
