/* ====================================================================
   CHATBOT DZ - 3D EFFECTS ENGINE
   ui-ux-pro-max skill: glassmorphism + 3D style
   Styles: perspective transforms, tilt, parallax, depth layers
==================================================================== */

/* =================================================================
   1. HERO 3D BACKGROUND
================================================================= */
.hero {
    position: relative;
    overflow: hidden;
}

.hero-canvas-3d {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.hero-container {
    position: relative;
    z-index: 2;
}

/* Floating geometric 3D blobs */
.blob-3d {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

.blob-3d-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle at 30% 40%, rgba(0, 106, 255, 0.18), transparent 70%);
    top: -100px;
    right: -100px;
    animation: blob-drift-1 12s ease-in-out infinite;
    filter: blur(40px);
}

.blob-3d-2 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle at 60% 50%, rgba(139, 92, 246, 0.15), transparent 70%);
    bottom: -80px;
    left: -60px;
    animation: blob-drift-2 15s ease-in-out infinite;
    filter: blur(50px);
}

.blob-3d-3 {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(0, 106, 255, 0.12), transparent 70%);
    top: 40%;
    left: 40%;
    animation: blob-drift-3 10s ease-in-out infinite;
    filter: blur(30px);
}

@keyframes blob-drift-1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%       { transform: translate(-40px, 30px) scale(1.05); }
    66%       { transform: translate(20px, -20px) scale(0.95); }
}
@keyframes blob-drift-2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    40%       { transform: translate(50px, -40px) scale(1.08); }
    70%       { transform: translate(-30px, 20px) scale(0.92); }
}
@keyframes blob-drift-3 {
    0%, 100% { transform: translate(0, 0) scale(1) rotate(0deg); }
    50%       { transform: translate(30px, -30px) scale(1.2) rotate(180deg); }
}

/* =================================================================
   2. 3D GRID MESH BACKGROUND (HERO)
================================================================= */
.hero-grid-3d {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    opacity: 0.35;
}

.hero-grid-3d svg {
    width: 100%;
    height: 100%;
}

/* =================================================================
   3. FLOATING SHAPES (HERO DECORATION)
================================================================= */
.shape-float {
    position: absolute;
    pointer-events: none;
    z-index: 1;
    transform-style: preserve-3d;
}

.shape-cube {
    width: 40px;
    height: 40px;
    border: 2px solid rgba(0, 106, 255, 0.25);
    border-radius: 8px;
    background: rgba(0, 106, 255, 0.05);
    backdrop-filter: blur(4px);
    animation: float-cube 8s ease-in-out infinite;
}

.shape-cube-sm {
    width: 24px;
    height: 24px;
    border: 2px solid rgba(139, 92, 246, 0.3);
    border-radius: 6px;
    background: rgba(139, 92, 246, 0.05);
    animation: float-cube 10s ease-in-out infinite reverse;
}

.shape-ring {
    width: 60px;
    height: 60px;
    border: 3px solid rgba(0, 106, 255, 0.2);
    border-radius: 50%;
    animation: float-ring 12s ease-in-out infinite;
}

.shape-dot {
    width: 10px;
    height: 10px;
    background: rgba(0, 106, 255, 0.4);
    border-radius: 50%;
    animation: float-dot 6s ease-in-out infinite;
}

/* Positions des shapes dans le héro */
.sf-1 { top: 15%; left: 8%; animation-delay: 0s; }
.sf-2 { top: 60%; left: 5%; animation-delay: -2s; }
.sf-3 { top: 25%; right: 5%; animation-delay: -4s; }
.sf-4 { top: 70%; right: 8%; animation-delay: -1s; }
.sf-5 { top: 45%; left: 15%; animation-delay: -3s; }
.sf-6 { top: 10%; right: 15%; animation-delay: -5s; }

@keyframes float-cube {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25%       { transform: translateY(-18px) rotate(10deg); }
    75%       { transform: translateY(10px) rotate(-8deg); }
}
@keyframes float-ring {
    0%, 100% { transform: translateY(0) scale(1); opacity: 0.6; }
    50%       { transform: translateY(-22px) scale(1.1); opacity: 1; }
}
@keyframes float-dot {
    0%, 100% { transform: translateY(0); opacity: 0.4; }
    50%       { transform: translateY(-14px); opacity: 1; }
}

/* =================================================================
   4. 3D TILT CARDS (MAGNETIC TILT)
================================================================= */
.feature-card {
    transform-style: preserve-3d;
    will-change: transform;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

.feature-card .icon-box {
    transform: translateZ(20px);
    transition: transform 0.3s ease;
}

.feature-card:hover .icon-box {
    transform: translateZ(30px) scale(1.08) rotate(5deg) !important;
}

.feature-card h3,
.feature-card p {
    transform: translateZ(10px);
}

/* Card inner glow on tilt */
.feature-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
        rgba(0, 106, 255, 0.08) 0%,
        transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 0;
}

.feature-card:hover::after {
    opacity: 1;
}

/* =================================================================
   5. BROWSER MOCKUP 3D DEPTH
================================================================= */
.browser-mockup.large-theater {
    transform-style: preserve-3d;
    perspective: 1200px;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease;
    box-shadow:
        0 20px 60px -10px rgba(0, 106, 255, 0.15),
        0 40px 80px -20px rgba(0, 0, 0, 0.12);
}

.browser-mockup.large-theater:hover {
    transform: rotateX(-3deg) translateY(-8px);
    box-shadow:
        0 40px 100px -10px rgba(0, 106, 255, 0.25),
        0 60px 100px -30px rgba(0, 0, 0, 0.2);
}

/* =================================================================
   6. INTEGRATION CARDS 3D HOVER
================================================================= */
.integration-card {
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.35s ease !important;
    transform-style: preserve-3d;
}

.integration-card:hover {
    transform: translateY(-12px) rotateX(-5deg) rotateY(3deg) scale(1.03) !important;
    box-shadow:
        0 25px 50px -10px rgba(0, 106, 255, 0.2),
        0 15px 30px -10px rgba(0, 0, 0, 0.1) !important;
    z-index: 10;
}

.integration-card i {
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: inline-block;
}

.integration-card:hover i {
    transform: translateZ(15px) scale(1.15);
}

/* =================================================================
   7. PHONE MOCKUP 3D ENHANCED
================================================================= */
.hero-image-wrapper {
    perspective: 1500px;
}

.phone-mockup {
    transform-style: preserve-3d;
}

/* Réflection sous le téléphone */
.phone-reflection {
    position: absolute;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 280px;
    height: 60px;
    background: radial-gradient(ellipse, rgba(0, 106, 255, 0.2) 0%, transparent 70%);
    filter: blur(20px);
    pointer-events: none;
    animation: reflection-pulse 3s ease-in-out infinite;
}

@keyframes reflection-pulse {
    0%, 100% { opacity: 0.6; transform: translateX(-50%) scaleX(0.9); }
    50%       { opacity: 1; transform: translateX(-50%) scaleX(1.1); }
}

/* =================================================================
   8. ANALYTICS DASHBOARD 3D
================================================================= */
.analytics-dashboard.enhanced {
    transform-style: preserve-3d;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease;
}

.analytics-dashboard.enhanced:hover {
    transform: rotateY(-5deg) rotateX(3deg) translateZ(10px);
    box-shadow: 20px 20px 60px -10px rgba(0, 0, 0, 0.15),
                -5px -5px 30px -5px rgba(0, 106, 255, 0.1);
}

/* =================================================================
   9. TICKET STACK 3D
================================================================= */
.ticket-stack {
    transform-style: preserve-3d;
    transition: transform 0.5s ease;
}

.ticket-stack:hover {
    transform: rotateY(-8deg) rotateX(5deg);
}

.ticket-card.back {
    transform: rotate(-6deg) translateY(-4px) translateZ(-20px);
}

.ticket-card.mid {
    transform: rotate(-3deg) translateY(-2px) translateZ(-10px);
}

.ticket-card.front {
    transform: rotate(0deg) translateZ(0px);
    transition: transform 0.4s ease;
}

.ticket-stack:hover .ticket-card.front {
    transform: rotate(0deg) translateZ(20px);
}

/* =================================================================
   10. NEURAL SEQUENCER 3D
================================================================= */
.neural-sequencer.large-mode {
    perspective: 800px;
    transform-style: preserve-3d;
}

.ns-card,
.ns-module {
    transform-style: preserve-3d;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ns-card:hover,
.ns-module:hover {
    transform: translateZ(15px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 106, 255, 0.15);
}

.ns-brain {
    transform-style: preserve-3d;
    animation: brain-pulse-3d 3s ease-in-out infinite;
}

@keyframes brain-pulse-3d {
    0%, 100% { transform: scale(1) rotateY(0deg); }
    50%       { transform: scale(1.05) rotateY(10deg); }
}

/* =================================================================
   11. PRICING CARD HOLOGRAPHIC 3D
================================================================= */
.paygo-card {
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.paygo-card::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: calc(var(--radius-xl) + 2px);
    background: linear-gradient(
        135deg,
        rgba(0, 106, 255, 0.4),
        rgba(139, 92, 246, 0.3),
        rgba(0, 106, 255, 0.2),
        rgba(139, 92, 246, 0.4)
    );
    background-size: 400% 400%;
    animation: hologram-shift 6s ease infinite;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.paygo-card:hover::before {
    opacity: 1;
}

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

/* =================================================================
   12. CTA SECTION 3D BACKGROUND
================================================================= */
.cta-section {
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 50% 50%, rgba(0, 106, 255, 0.08), transparent);
    pointer-events: none;
    z-index: 0;
}

.cta-section .container {
    position: relative;
    z-index: 1;
}

/* Animated lines in CTA */
.cta-section::after {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background-image:
        repeating-linear-gradient(
            60deg,
            transparent,
            transparent 60px,
            rgba(0, 106, 255, 0.03) 60px,
            rgba(0, 106, 255, 0.03) 61px
        );
    animation: cta-lines-move 20s linear infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes cta-lines-move {
    from { transform: translateX(0) translateY(0); }
    to   { transform: translateX(61px) translateY(61px); }
}

/* =================================================================
   13. STUDIO CARDS 3D
================================================================= */
.studio-card {
    transform-style: preserve-3d;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.3s ease;
}

.studio-card:hover {
    transform: translateY(-6px) rotateX(-3deg);
    box-shadow: 0 20px 40px -10px rgba(0, 106, 255, 0.15);
}

.sc-icon {
    transform: translateZ(10px);
    transition: transform 0.3s ease;
}

.studio-card:hover .sc-icon {
    transform: translateZ(20px) scale(1.1);
}

/* =================================================================
   14. SCROLL REVEAL 3D ENTRANCE
================================================================= */
.reveal-3d {
    opacity: 0;
    transform: translateY(40px) rotateX(-10deg);
    transform-origin: bottom center;
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.reveal-3d.is-visible {
    opacity: 1;
    transform: translateY(0) rotateX(0deg);
}

.reveal-3d-delay-1 { transition-delay: 0.1s; }
.reveal-3d-delay-2 { transition-delay: 0.2s; }
.reveal-3d-delay-3 { transition-delay: 0.3s; }
.reveal-3d-delay-4 { transition-delay: 0.4s; }
.reveal-3d-delay-5 { transition-delay: 0.5s; }
.reveal-3d-delay-6 { transition-delay: 0.6s; }
.reveal-3d-delay-7 { transition-delay: 0.7s; }
.reveal-3d-delay-8 { transition-delay: 0.8s; }

/* =================================================================
   15. NAVBAR 3D DEPTH
================================================================= */

.logo-image-wrapper {
    transform-style: preserve-3d;
}

.logo:hover .logo-image-wrapper {
    transform: rotate(-5deg) scale(1.05) rotateY(15deg) !important;
}

/* =================================================================
   16. BADGE 3D FLOAT
================================================================= */
.badge-new,
.badge-feature {
    transform-style: preserve-3d;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.badge-new:hover,
.badge-feature:hover {
    transform: translateY(-3px) translateZ(5px);
    box-shadow: 0 8px 20px rgba(0, 106, 255, 0.15);
}

/* =================================================================
   17. HERO STATS 3D
================================================================= */
.hero-stat {
    transform-style: preserve-3d;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: default;
}

.hero-stat:hover {
    transform: translateY(-5px) scale(1.05);
}

.hero-stat strong {
    display: block;
    transition: transform 0.3s ease;
}

.hero-stat:hover strong {
    transform: translateZ(10px);
}

/* =================================================================
   18. PAYGO INCLUDE ITEMS 3D
================================================================= */
.paygo-include-item {
    transform-style: preserve-3d;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.3s ease;
}

.paygo-include-item:hover {
    transform: translateY(-5px) rotateX(-3deg);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
}

/* =================================================================
   19. LOGO SLIDER 3D
================================================================= */
.logo-item {
    transform-style: preserve-3d;
}

.logo-item:hover {
    transform: translateY(-3px) translateZ(10px) scale(1.05) !important;
}

/* =================================================================
   20. SECTION DEPTH SEPARATORS
================================================================= */
.section-padding {
    position: relative;
}

/* Subtle depth line between sections */
.section-padding.bg-light::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(0, 106, 255, 0.1) 30%,
        rgba(139, 92, 246, 0.1) 70%,
        transparent
    );
}

/* =================================================================
   21. PERFORMANCE & ACCESSIBILITY
================================================================= */
@media (prefers-reduced-motion: reduce) {
    .blob-3d-1, .blob-3d-2, .blob-3d-3,
    .shape-cube, .shape-cube-sm, .shape-ring, .shape-dot,
    .phone-reflection,
    .brain-pulse-3d,
    .reveal-3d {
        animation: none !important;
    }

    .reveal-3d {
        opacity: 1 !important;
        transform: none !important;
    }

    .feature-card,
    .integration-card,
    .studio-card,
    .browser-mockup.large-theater,
    .analytics-dashboard.enhanced,
    .ticket-stack {
        transition: none !important;
    }

    .cta-section::after { animation: none !important; }
}
