/**
 * ============================================================================
 * LANDING PAGE STYLES — SLIM VERSION
 * ============================================================================
 *
 * This file contains ONLY what cannot be expressed as Tailwind utility classes:
 *
 * 1. Font import
 * 2. Global / Shared (scroll-behavior, .section, .font-display, .font-mono)
 * 3. Reveal animations (JS-toggled via IntersectionObserver)
 * 4. Hero keyframes + animation utility classes
 * 5. FAQ accordion JS-toggled open states
 * 6. LMS Partnership: keyframes + pseudo-elements (::after)
 * 7. CTA Section: pseudo-elements (::before, ::placeholder) + interactive states
 * 8. Tools mockup: classes that use CSS custom properties (var(--col-*), color-mix())
 * 9. Demo Showcase: JS-toggled states + CSS custom property usage
 *
 * All basic layout/typography/spacing CSS has been moved to Tailwind utilities
 * directly in the templates (trust.html.twig, tools.html.twig, demo-showcase.html.twig).
 *
 * ============================================================================
 */

@import url('https://fonts.googleapis.com/css2?family=Sora:wght@600;700;800&display=swap');

/* ===================================================================
   1. GLOBAL / SHARED
   =================================================================== */

html {
    scroll-behavior: smooth;
}

.section {
    position: relative;
}

/* Display font (Sora) — used for landing headings */
.font-display {
    font-family: 'Sora', 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Monospace font for mockup chrome — JetBrains Mono */
.font-mono {
    font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}


/* ===================================================================
   2. REVEAL SCROLL ANIMATIONS
   JS (IntersectionObserver) toggles .visible — cannot use Tailwind.
   =================================================================== */

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition:
        opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }


/* ===================================================================
   3. HERO ANIMATIONS
   Keyframes + animation utility classes used in hero.html.twig.
   =================================================================== */

@keyframes heroFadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes heroFloat {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-12px); }
}
@keyframes orbitPulse {
    0%, 100% { box-shadow: 0 20px 60px rgba(12,129,228,0.3), inset 0 0 0 1px rgba(255,255,255,0.2); }
    50%       { box-shadow: 0 20px 80px rgba(12,129,228,0.4), inset 0 0 0 1px rgba(255,255,255,0.3); }
}
@keyframes orbitParticle1 {
    from { transform: rotate(0deg)    translateX(120px) rotate(0deg); }
    to   { transform: rotate(360deg)  translateX(120px) rotate(-360deg); }
}
@keyframes orbitParticle2 {
    from { transform: rotate(0deg)    translateX(190px) rotate(0deg); }
    to   { transform: rotate(360deg)  translateX(190px) rotate(-360deg); }
}
@keyframes orbitParticle3 {
    from { transform: rotate(120deg)  translateX(155px) rotate(-120deg); }
    to   { transform: rotate(480deg)  translateX(155px) rotate(-480deg); }
}

.animate-fade-in-up    { animation: heroFadeUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards; opacity: 0; }
.animation-delay-200   { animation-delay: 0.2s; }
.animation-delay-400   { animation-delay: 0.4s; }
.animation-delay-600   { animation-delay: 0.6s; }
.orbit-center-pulse    { animation: orbitPulse 4s ease-in-out infinite; }
.hero-orbital-wrapper  { opacity: 0; animation: heroFadeUp 0.7s 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards, heroFloat 6s 1.1s ease-in-out infinite; }
.orbit-anim-1          { animation: orbitParticle1 12s linear infinite; }
.orbit-anim-2          { animation: orbitParticle2 18s linear infinite reverse; }
.orbit-anim-3          { animation: orbitParticle3 15s linear infinite; }


/* ===================================================================
   4. FAQ ACCORDION  (faq.html.twig — JS toggles .open)
   =================================================================== */

.faq-answer                     { grid-template-rows: 0fr; }
.faq-item.open                  { border-color: rgba(12,129,228,0.3); box-shadow: 0 4px 16px rgba(12,129,228,0.06); }
.faq-item.open .faq-chevron     { transform: rotate(180deg); background: rgba(12,129,228,0.1); color: var(--color-primary); }
.faq-item.open .faq-answer      { grid-template-rows: 1fr; }
.faq-item.open .faq-answer-text { opacity: 1; }


/* ===================================================================
   5. LMS PARTNERSHIP ANIMATIONS  (lms-partnership.html.twig)
   ::after pseudo-elements cannot be expressed in Tailwind.
   =================================================================== */

@keyframes lmsLivePulse { 0%, 100% { opacity: 1; }  50% { opacity: 0.4; } }
@keyframes lmsPing { 0% { transform: scale(1); opacity: 0.4; } 100% { transform: scale(2.2); opacity: 0; } }

.lms-live-dot { animation: lmsLivePulse 1.5s ease-in-out infinite; }

.lms-pulse-dot::after {
    content: ''; position: absolute; inset: -3px; border-radius: 50%;
    background: var(--color-success);
    animation: lmsPing 1.8s cubic-bezier(0,0,0.2,1) infinite; opacity: 0;
}
.lms-status-badge-dot::after {
    content: ''; position: absolute; inset: -2px; border-radius: 50%;
    background: var(--color-success);
    animation: lmsPing 2s cubic-bezier(0,0,0.2,1) infinite; opacity: 0;
}


/* ===================================================================
   6. CTA SECTION  (cta.html.twig)
   ::before and ::placeholder cannot be expressed in Tailwind.
   Interactive states (:hover, :disabled) kept here for consistency.
   =================================================================== */

.cta-card-bg::before {
    content: ''; position: absolute; inset: 0;
    background:
        radial-gradient(circle at 15% 85%, rgba(255,255,255,0.07) 0%, transparent 50%),
        radial-gradient(circle at 85% 15%, rgba(255,255,255,0.05) 0%, transparent 40%);
}

.cta-input {
    flex: 1; background: transparent; border: none; outline: none;
    padding: 10px 16px; font-size: 0.88rem; color: white;
    font-family: 'Roboto', sans-serif; min-width: 0;
}
.cta-input::placeholder { color: rgba(255,255,255,0.4); }

.cta-submit {
    padding: 10px 20px; background: white; color: var(--color-primary);
    font-family: 'Poppins', sans-serif; font-size: 0.82rem; font-weight: 700;
    border: none; border-radius: 9px; cursor: pointer; white-space: nowrap;
    transition: all 0.2s; flex-shrink: 0;
}
.cta-submit:hover    { background: #EFF6FF; transform: translateY(-1px); box-shadow: 0 3px 10px rgba(0,0,0,0.12); }
.cta-submit:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }

@media (max-width: 480px) {
    .cta-submit { width: 100%; }
}


/* ===================================================================
   7. TOOLS MOCKUP  (tools.html.twig)
   ONLY classes that use CSS custom properties (var(--col-*), color-mix()).
   All other tool classes have been moved to Tailwind in the template.
   =================================================================== */

/* Serenia chat bubble — uses var(--col-serenia) set on <section> */
.v-chat-user {
    align-self: flex-end;
    background: var(--col-serenia);
    color: white;
    font-size: 11px;
    padding: 6px 12px;
    border-radius: 12px 12px 4px 12px;
    max-width: 80%;
}

/* Monalisia infographic pill — uses var(--col-monalisia) */
.v-infog-pill {
    font-size: 7px; font-weight: 800; letter-spacing: 1px;
    background: var(--col-monalisia); color: white;
    padding: 2px 6px; border-radius: 20px;
}

/* Castia track cover — uses linear-gradient with var(--col-castia) + color-mix() */
.v-castia-track-cover {
    width: 36px; height: 36px; border-radius: 8px; flex-shrink: 0;
    background: linear-gradient(135deg, var(--col-castia), color-mix(in srgb, var(--col-castia) 60%, transparent));
    display: flex; align-items: center; justify-content: center;
}

/* Castia playhead — uses var(--col-castia) + color-mix() for glow */
.v-castia-playhead {
    position: absolute; top: 0; bottom: 0; width: 2px;
    background: var(--col-castia); border-radius: 1px;
    box-shadow: 0 0 6px color-mix(in srgb, var(--col-castia) 40%, transparent);
}
.v-castia-playhead::after {
    content: ''; position: absolute; top: -3px; left: -4px;
    width: 10px; height: 10px; border-radius: 50%;
    background: var(--col-castia);
}

/* Castia play button — uses var(--col-castia) + color-mix() for shadow */
.v-castia-play {
    width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
    background: var(--col-castia); border-radius: 50%;
    box-shadow: 0 4px 12px color-mix(in srgb, var(--col-castia) 35%, transparent);
}

/* SAM sidebar — uses color-mix() for background AND border */
.v-sam-sidebar {
    background: color-mix(in srgb, var(--col-sam) 4%, transparent);
    border-right: 1px solid color-mix(in srgb, var(--col-sam) 13%, transparent);
    padding: 10px 8px;
    display: flex;
    flex-direction: column;
}

/* SAM active nav item — uses var(--col-sam) for bg + white text */
.v-sam-nav-item--active { background: var(--col-sam); color: white; }

@media (max-width: 768px) {
    .v-sam-sidebar {
        flex-direction: row;
        border-right: none;
        border-bottom: 1px solid color-mix(in srgb, var(--col-sam) 13%, transparent);
        padding: 6px 8px;
        overflow-x: auto;
    }
}


/* ===================================================================
   8. HEADER MEGA MENU  (header.html.twig)
   Hover-child selectors, CSS grid, color-mix(), background-clip text
   — none of these can be expressed as Tailwind utility classes.
   =================================================================== */

.mega-menu {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    transform: translateY(8px);
    background: white;
    border: 1px solid #E4EBF5;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(12, 129, 228, 0.1), 0 4px 16px rgba(0,0,0,0.06);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 100;
    display: grid;
    grid-template-columns: 200px 1fr;
    grid-template-rows: 1fr auto;
    overflow: hidden;
}
.nav-item--dropdown::after {
    content: '';
    position: absolute;
    bottom: -14px;
    left: -20px;
    right: -20px;
    height: 14px;
}
.nav-item--dropdown:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}
.nav-item--dropdown:hover .mega-chevron {
    transform: rotate(180deg);
}
.mega-menu-left {
    background: #F9FAFB;
    border-right: 1px solid #E4EBF5;
    grid-row: 1 / 3;
}
.mega-menu-tool:hover {
    background: color-mix(in srgb, var(--tool-color) 8%, white);
}
.mega-menu-footer {
    grid-column: 2;
    border-top: 1px solid #E4EBF5;
    background: #FAFCFF;
}
.mega-menu-footer-link {
    background: linear-gradient(135deg, #0C81E4, #7C3AED);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.mega-menu-footer-link svg {
    color: #7C3AED;
    -webkit-text-fill-color: initial;
}


/* ===================================================================
   9. DEMO SHOWCASE  (demo-showcase.html.twig)
   Only JS-toggled states and CSS custom property usage.
   =================================================================== */

/* Progress bar fill — JS animates width via demo controller */
.demo-progress-fill {
    height: 100%; width: 0%; border-radius: 2px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-gradient-end));
    transition: width 5s linear;
}

/* Sidebar active tool item — JS toggles .active, uses color-mix with --tool-color */
.demo-sidebar-item.active {
    background: color-mix(in srgb, var(--tool-color) 8%, white);
    color: var(--tool-color);
    font-weight: 600;
}

/* Content area — JS toggles .fading for opacity transition between tools */
.demo-content              { transition: opacity 0.3s; }
.demo-content.fading       { opacity: 0; }

/* ── Pages légales — typographie du contenu de l'accordéon ──────────────── */
.legal-content p + p { margin-top: 0.75rem; }
.legal-content h4    { font-weight: 600; color: var(--color-gray-800); margin-top: 1rem; margin-bottom: 0.25rem; }
.legal-content h4:first-child { margin-top: 0; }
.legal-content ul    { list-style: disc; padding-left: 1.25rem; }
.legal-content li    { margin-top: 0.25rem; }
.legal-content a     { color: var(--color-primary); }
.legal-content a:hover { text-decoration: underline; }
