/* =====================================================
   LE QG ACADEMY - Improvements & Layout Enhancements
   Additional styles for visual balance and optimization
   ===================================================== */

/* =====================================================
   1. ENHANCED VISUAL HIERARCHY
   ===================================================== */

/* Better section transitions */
.section {
    position: relative;
}

.section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 3px;
    background: var(--gradient-cream);
    border-radius: 2px;
    opacity: 0.6;
}

.section:last-of-type::after,
.footer::after {
    display: none;
}

/* =====================================================
   2. ENHANCED HERO SECTION
   ===================================================== */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    background: 
        radial-gradient(ellipse at 20% 80%, rgba(243, 234, 184, 0.25) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(241, 255, 175, 0.25) 0%, transparent 50%);
    pointer-events: none;
}

.hero-subtitle {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* =====================================================
   3. ENHANCED CARD INTERACTIONS
   ===================================================== */
.glass-card {
    will-change: transform, box-shadow;
}

.problem-card,
.solution-card,
.impact-card,
.testimonial-card {
    position: relative;
    overflow: hidden;
}

.problem-card::before,
.solution-card::before,
.impact-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-cream);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-normal);
}

.problem-card:hover::before,
.solution-card:hover::before,
.impact-card:hover::before {
    transform: scaleX(1);
}

/* =====================================================
   4. ENHANCED TYPOGRAPHY
   ===================================================== */

/* Better quote styling */
.testimonial-quote p {
    position: relative;
    padding-left: 30px;
}

.testimonial-quote p::before {
    content: '"';
    position: absolute;
    left: 0;
    top: 0;
    font-family: var(--font-title);
    font-size: 3rem;
    color: var(--color-cream);
    opacity: 0.6;
    line-height: 1;
}

/* Enhanced list styling */
.module-list li,
.forwho-list li,
.pricing-features li {
    transition: var(--transition-fast);
}

.module-list li:hover,
.forwho-list li:hover,
.pricing-features li:hover {
    transform: translateX(5px);
}

/* =====================================================
   5. ENHANCED TIMELINE
   ===================================================== */
.timeline-item {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.timeline-item.animated {
    opacity: 1;
    transform: translateX(0);
}

.timeline-item:nth-child(1).animated { transition-delay: 0s; }
.timeline-item:nth-child(2).animated { transition-delay: 0.15s; }
.timeline-item:nth-child(3).animated { transition-delay: 0.3s; }
.timeline-item:nth-child(4).animated { transition-delay: 0.45s; }
.timeline-item:nth-child(5).animated { transition-delay: 0.6s; }

.timeline-marker {
    transition: var(--transition-normal);
}

.timeline-item:hover .timeline-marker {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(255, 189, 217, 0.5);
}

/* =====================================================
   6. ENHANCED PRICING CARD
   ===================================================== */
.pricing-card {
    position: relative;
    overflow: hidden;
}

.pricing-card::before {
    content: 'BEST VALUE';
    position: absolute;
    top: 30px;
    right: -35px;
    background: var(--gradient-brown);
    color: white;
    padding: 8px 40px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1px;
    transform: rotate(45deg);
    box-shadow: var(--shadow-sm);
}

.pricing-price {
    position: relative;
    display: inline-block;
}

.pricing-price::after {
    content: '';
    position: absolute;
    bottom: 10px;
    left: -10px;
    right: -10px;
    height: 15px;
    background: var(--gradient-yellow);
    opacity: 0.4;
    z-index: -1;
    border-radius: 3px;
}

/* =====================================================
   7. ENHANCED FAQ ACCORDION
   ===================================================== */
.faq-item {
    transition: var(--transition-normal);
}

.faq-item:hover {
    transform: none;
}

.faq-item.active {
    background: transparent;
}

.faq-question span {
    flex: 1;
    padding-right: 20px;
}

/* =====================================================
   8. ENHANCED COMPARISON TABLE
   ===================================================== */
.comparison-row {
    transition: var(--transition-fast);
}

.comparison-row:hover {
    background: rgba(255, 189, 217, 0.05);
}

.comparison-row:hover .comparison-cell.after {
    background: linear-gradient(135deg, #ffbdd9 0%, #ffcce0 100%);
}

/* =====================================================
   9. CHOICE SECTION ENHANCEMENTS
   ===================================================== */
.choice-no {
    position: relative;
}

.choice-no::before {
    content: '😔';
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 2rem;
    opacity: 0.3;
}

.choice-yes::before {
    content: '🎉';
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 2rem;
    opacity: 0.3;
}

/* =====================================================
   10. ENHANCED SCROLL TO TOP
   ===================================================== */
.scroll-to-top {
    animation: bounce 2s infinite;
    animation-play-state: paused;
}

.scroll-to-top:hover {
    animation-play-state: running;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* =====================================================
   11. BETTER SPACING & ALIGNMENT
   ===================================================== */

/* Consistent section spacing */
.section-title {
    position: relative;
    display: inline-block;
    width: 100%;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--gradient-pink);
    margin: 20px auto 0;
    border-radius: 2px;
}

/* Better module spacing */
.module:last-child {
    margin-bottom: 0;
}

/* =====================================================
   12. LOADING STATES & MICRO-INTERACTIONS
   ===================================================== */

/* Button loading state */
.btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn.loading::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* =====================================================
   13. ACCESSIBILITY IMPROVEMENTS
   ===================================================== */

/* Focus states */
.btn:focus,
.faq-question:focus {
    outline: 3px solid var(--color-pink);
    outline-offset: 3px;
}

/* Better contrast for text */
.result-secondary,
.value-note,
.value-comparison {
    color: #7a7764;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .floating-circle,
    .hero-blob {
        animation: none !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* =====================================================
   14. DARK MODE SUPPORT (Optional)
   ===================================================== */
@media (prefers-color-scheme: dark) {
    /* Can be enabled if needed */
    /*
    :root {
        --color-bg: #1a1a1a;
        --color-text: #e0ddd0;
        --glass-bg: rgba(30, 30, 30, 0.7);
        --glass-border: rgba(50, 50, 50, 0.8);
    }
    */
}

/* =====================================================
   15. SPECIAL EFFECTS
   ===================================================== */

/* Gradient text for special elements */
.accent-cursive {
    background: linear-gradient(135deg, #8a8573 0%, #605c47 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Shine effect on hover for CTA buttons */
.btn-cta {
    position: relative;
    overflow: hidden;
}

.btn-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: left 0.5s ease;
}

.btn-cta:hover::before {
    left: 100%;
}

/* =====================================================
   16. CALC CARDS ANIMATION ENHANCEMENT
   ===================================================== */
.calc-card {
    perspective: 1000px;
}

.calc-card .calc-result {
    transition: var(--transition-normal);
}

.calc-card:hover .calc-result {
    transform: scale(1.1);
    color: var(--color-brown);
}

/* =====================================================
   17. MOBILE ENHANCEMENTS
   ===================================================== */
@media (max-width: 768px) {
    /* Better touch targets */
    .btn {
        min-height: 48px;
    }
    
    .faq-question {
        min-height: 56px;
    }
    
    /* Remove decorations on mobile */
    .section::after {
        display: none;
    }
    
    .section-title::after {
        width: 60px;
        height: 3px;
        margin-top: 15px;
    }
    
    /* Hide pricing badge on small screens */
    .pricing-card::before {
        display: none;
    }
    
    /* Better readability */
    .vision-paragraphs p {
        font-size: 1rem;
        line-height: 1.7;
    }
    
    /* Stack choice cards properly */
    .choice-grid {
        grid-template-columns: 1fr;
    }
    
    .choice-no {
        order: 2;
    }
    
    .choice-yes {
        order: 1;
    }
    
    /* Disable hover animations on touch */
    .btn-cta::before {
        display: none;
    }
    
    /* Better spacing for lists */
    .module-list,
    .forwho-list,
    .pricing-features,
    .impact-list {
        padding-left: 0;
    }
    
    /* Smooth scrolling fix for iOS */
    html {
        -webkit-overflow-scrolling: touch;
        overflow-x: hidden;
    }
    
    /* Prévenir le scroll horizontal sur mobile */
    body {
        overflow-x: hidden;
        position: relative;
        width: 100%;
        max-width: 100vw;
    }
    
    /* Contenir tous les éléments */
    .section,
    .hero,
    .navbar,
    .footer {
        max-width: 100vw;
        overflow-x: hidden;
    }
    
    /* Fix for iOS input zoom */
    input, select, textarea {
        font-size: 16px;
    }
    
    /* Disable tap highlighting */
    a, button {
        -webkit-tap-highlight-color: transparent;
    }
    
    /* Improve text rendering on mobile */
    body {
        text-rendering: optimizeSpeed;
    }
    
    /* Remove complex effects that slow mobile */
    .glass-card {
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
    
    /* Simplify shadows for performance */
    .glass-card,
    .btn,
    .pricing-card {
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    }
}

@media (max-width: 480px) {
    /* Even simpler for very small screens */
    .glass-card {
        backdrop-filter: blur(5px);
        -webkit-backdrop-filter: blur(5px);
    }
    
    /* Remove all decorative animations */
    .problem-card::before,
    .solution-card::before,
    .impact-card::before {
        display: none;
    }
    
    /* Simpler shadows */
    .glass-card,
    .btn,
    .pricing-card {
        box-shadow: 0 1px 5px rgba(0, 0, 0, 0.06);
    }
    
    /* Fix overflow issues */
    .container {
        overflow-x: hidden;
    }
    
    /* Disable hero decorations on small mobile */
    .hero::before {
        display: none;
    }
}

/* =====================================================
   18. PERFORMANCE OPTIMIZATIONS
   ===================================================== */

/* Use GPU acceleration wisely */
.glass-card,
.btn,
.timeline-marker,
.scroll-to-top {
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Optimize animations */
.floating-circle {
    will-change: transform;
}

/* =====================================================
   19. PRINT IMPROVEMENTS
   ===================================================== */
@media print {
    .section::after {
        display: none;
    }
    
    .glass-card::before {
        display: none;
    }
    
    .pricing-card::before {
        display: none;
    }
    
    .accent-cursive {
        -webkit-text-fill-color: var(--color-pink);
    }
}

/* =====================================================
   20. CUSTOM SCROLLBAR
   ===================================================== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--color-pink);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #e89fbf;
}

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--color-pink) #f1f1f1;
}

/* =====================================================
   21. SELECTION STYLING
   ===================================================== */
::selection {
    background: var(--color-pink);
    color: var(--color-brown);
}

::-moz-selection {
    background: var(--color-pink);
    color: var(--color-brown);
}