/* ================================================================================
   DEMO SECTION - BloomAI Video Demonstration & CTA
   
   Section presenting the Bloom AI demo video with call-to-action button.
   Features responsive design with mobile-first approach and desktop enhancements.
   Utilizes liquid glass visual effects consistent with the HeroSection design.
================================================================================ */

/* ====================================================================
   1. CONFIGURATION & LAYOUT VARIABLES
==================================================================== */

:root {
    --demo-section-padding: 4rem 0;
    --demo-card-radius: 2.5rem;
    --demo-card-max-width: 1200px;
    --demo-card-min-height: 700px;
    --demo-card-padding: 5rem 3rem;
    --demo-video-max-width: 500px;
    --demo-separator-distance: 10rem;
}

/* ====================================================================
   2. SECTION CONTAINER & BASE LAYOUT
==================================================================== */

#demo-section {
    position: relative;
    padding: var(--demo-section-padding);
    min-height: auto;
    color: white;
}

.demo-card-container {
    width: 100%;
    max-width: var(--demo-card-max-width);
    margin: 0 auto;
    position: relative;
}

/* ====================================================================
   3. LIQUID GLASS CARD SYSTEM
==================================================================== */

/* 3-A. Ambient Glow Behind Card */
.demo-card-container::before {
    content: '';
    position: absolute;
    inset: -20px;
    border-radius: 3rem;
    background: radial-gradient(
        ellipse at center, 
        rgba(147, 51, 234, 0.15) 0%, 
        rgba(147, 51, 234, 0.08) 40%, 
        transparent 70%
    );
    filter: blur(20px);
    z-index: -1;
    opacity: 0.6;
}

/* 3-B. Main Glass Card Structure */
.demo-card-inner {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    min-height: var(--demo-card-min-height);
    padding: var(--demo-card-padding);
    overflow: hidden;
    z-index: 2;
    
    /* Glass morphism effects */
    border-radius: var(--demo-card-radius);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.02), 
        inset 0 1px 2px rgba(100, 180, 255, 0.04), 
        inset 0 -1px 2px rgba(0, 0, 0, 0.01);
    
    /* Performance optimizations */
    will-change: border-color;
}

/* 3-C. Glass Surface Background Layer */
.demo-card-inner::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    z-index: 0;
    
    /* Subtle gradient background matching HeroSection */
    background: 
        radial-gradient(ellipse at center, rgba(100, 180, 255, 0.003) 0%, rgba(255, 255, 255, 0.00005) 70%),
        linear-gradient(135deg, rgba(100, 180, 255, 0.001) 0%, rgba(255, 255, 255, 0.00005) 50%, rgba(100, 180, 255, 0.001) 100%);
    
    /* Glass blur effects */
    backdrop-filter: blur(6px) saturate(110%) contrast(102%);
    -webkit-backdrop-filter: blur(6px) saturate(110%) contrast(102%);
}

/* 3-D. Light Refraction Layer */
.demo-card-inner::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    transform: translate3d(0,0,0);
    
    /* Sophisticated light reflection effects */
    background:
        /* Central cyan-tinted halo */
        radial-gradient(120% 120% at 50% 50%, rgba(0, 255, 255, 0.12) 0%, rgba(170, 240, 255, 0.10) 42%, rgba(255, 255, 255, 0.0) 70%),
        /* Top-left highlight */
        radial-gradient(80% 60% at 18% 22%, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0.0) 60%),
        /* Bottom-right cyan accent */
        radial-gradient(80% 60% at 82% 78%, rgba(170, 240, 255, 0.10) 0%, rgba(170, 240, 255, 0.0) 60%),
        /* Diagonal soft glow */
        linear-gradient(135deg, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0.04) 38%, rgba(255,255,255,0.0) 60%);
    
    will-change: opacity, transform;
}

/* 3-E. Content Layer Positioning */
.demo-card-inner > * {
    position: relative;
    z-index: 2;
}

/* ====================================================================
   4. DESKTOP LAYOUT & VERTICAL SEPARATOR
==================================================================== */

/* Desktop vertical separator line between content sections */
.demo-card-inner > div.hidden.md\:flex::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 1px;
    height: 60%;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(255, 255, 255, 0.1) 10%,
        rgba(255, 255, 255, 0.3) 50%,
        rgba(255, 255, 255, 0.1) 90%,
        transparent 100%
    );
    z-index: 1;
    opacity: 0.8;
}

/* ====================================================================
   5. TEXT CONTENT STYLES
==================================================================== */

.section-title {
    color: #ffffff;
    line-height: 1.2;
}

.section-subtitle {
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.82);
}

.demo-description p {
    font-size: 1rem;
    line-height: 1.7;
    text-align: justify;
    text-justify: inter-word;
}

/* Remonter légèrement le contenu de description */
.demo-description .space-y-6 {
    margin-bottom: 1.5rem !important; /* Réduction de mb-8 (2rem) à 1.5rem */
}

/* ====================================================================
   6. VIDEO CONTAINER & PLACEHOLDER STYLES
==================================================================== */

.demo-video-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.video-wrapper {
    width: 100%;
    max-width: var(--demo-video-max-width);
}

.video-placeholder {
    position: relative;
    width: 100%;
    aspect-ratio: 1.2/1;
    border-radius: 1.5rem;
    overflow: hidden;
    cursor: pointer;
    
    /* Visual styling */
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1) 0%, rgba(139, 92, 246, 0.15) 50%, rgba(217, 70, 239, 0.1) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 
        0 10px 25px rgba(0, 0, 0, 0.2),
        0 0 40px rgba(139, 92, 246, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    
    /* Performance optimizations */
    will-change: transform;
    transform: translateZ(0);
    transition: transform 0.2s ease-out;
}

.video-placeholder:hover {
    transform: scale(1.02) translateZ(0);
}

/* Note: Styles des boutons vidéo transférés vers button-animations.css pour réutilisabilité */

/* Video embed container (for future YouTube integration) */
.video-embed {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -2px rgba(0,0,0,.05);
}

/* ====================================================================
   7. SCROLL ANIMATIONS & TRANSITIONS
==================================================================== */

.animate-on-scroll.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-on-scroll.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Button-specific animation override to preserve button interactions */
.animate-on-scroll.fade-up.btn {
    transition: 
        opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.4s var(--ease-out-quint),
        box-shadow 0.4s var(--ease-out-quint),
        background-color 0.4s ease,
        border-color 0.4s ease,
        border-radius 0.4s var(--ease-out-quint);
}

/* ====================================================================
   8. RESPONSIVE DESIGN - MOBILE FIRST
==================================================================== */

/* Mobile base styles (≤767px) */
@media (max-width: 767px) {
    :root {
        --demo-section-padding: 2rem 0;
        --demo-card-padding: 2rem 1.5rem;
        --demo-video-max-width: 280px;
    }
    
    /* Dark mobile design with subtle violet effects */
    .demo-card-inner {
        min-height: auto !important;
        background: 
          radial-gradient(ellipse at center, hsla(250, 90%, 50%, 0.12) 0%, hsla(280, 85%, 45%, 0.08) 40%, rgb(9, 5, 24) 70%),
          rgb(9, 5, 24) !important;
        box-shadow: 
          inset 0 0 30px hsla(220, 95%, 55%, 0.10),
          inset 0 0 60px hsla(250, 90%, 50%, 0.05) !important;
    }
    
    /* Remove all glassmorphism effects on mobile */
    .demo-card-inner::before {
        display: none !important;
    }
    
    /* Remove ambient glow container on mobile */
    .demo-card-container::before {
        display: none !important;
    }
    
    .section-title {
        font-size: 1.875rem !important; /* 30px */
        margin-bottom: 1rem !important;
    }
    
    .section-subtitle {
        font-size: 1rem !important; /* 16px */
        margin-bottom: 1rem !important;
    }
    
    .video-placeholder {
        aspect-ratio: 16/9 !important;
    }
}

/* Tablet styles (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
    :root {
        --demo-card-min-height: 650px;
        --demo-card-padding: 4.5rem 3rem;
        --demo-video-max-width: 400px;
    }
}

/* Desktop styles (≥1025px) */
@media (min-width: 1025px) {
    :root {
        --demo-card-min-height: 700px;
        --demo-card-padding: 5rem 3rem;
        --demo-video-max-width: 500px;
    }
}

/* ====================================================================
   9. SECTION SEPARATOR INTEGRATION
==================================================================== */

#demo-section .separator1-placeholder {
    margin-top: var(--demo-separator-distance);
    margin-bottom: 2.5rem;
}

/* Ajustement mobile pour réduire l'espace au-dessus du séparateur */
@media (max-width: 767px) {
    #demo-section .separator1-placeholder {
        margin-top: 4rem; /* Réduction de 10rem à 4rem sur mobile */
        margin-bottom: 1rem; /* Réduction de 2.5rem à 1rem pour compenser le margin-top négatif de CTA */
    }
}

/* ====================================================================
   10. ACCESSIBILITY & REDUCED MOTION
==================================================================== */

/* Disable animations for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    .video-placeholder:hover,
    .video-placeholder:hover .w-16,
    .animate-on-scroll.fade-up {
        transform: none;
        transition: none;
    }
}

/* Focus styles for keyboard navigation */
.video-placeholder:focus-visible {
    outline: 2px solid rgba(99, 102, 241, 0.8);
    outline-offset: 2px;
}