/**
 * Beriox-HUB — Animations et gadgets page d'accueil
 * Respecte prefers-reduced-motion
 */

@media (prefers-reduced-motion: reduce) {
    .welcome-page *,
    .welcome-page *::before,
    .welcome-page *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ========== HERO ========== */
.landing-hero-bg {
    transition: transform 0.1s linear;
    will-change: transform;
}
.landing-hero-badge {
    animation: landing-badge-pulse 2.5s ease-in-out infinite;
}
@keyframes landing-badge-pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(255,255,255,0.25); }
    50% { opacity: 0.95; box-shadow: 0 0 0 8px rgba(255,255,255,0); }
}

.landing-hero-buttons .btn-primary:hover {
    animation: landing-cta-vibrate 0.4s ease-in-out;
}
@keyframes landing-cta-vibrate {
    0%, 100% { transform: translateY(-2px) translateX(0); }
    25% { transform: translateY(-2px) translateX(-1px); }
    75% { transform: translateY(-2px) translateX(1px); }
}

/* Mini graphiques animés dans le mockup placeholder */
.landing-hero-mockup-placeholder {
    flex-direction: column;
    padding: 1rem;
}
.landing-hero-mockup-chart {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    height: 80px;
    margin: 1rem auto 0;
    padding: 0 1rem;
}
.landing-hero-mockup-bar {
    flex: 1;
    max-width: 24px;
    background: rgba(255,255,255,0.35);
    border-radius: 4px 4px 0 0;
    animation: landing-bar-grow 1.2s ease-out backwards;
}
.landing-hero-mockup-bar:nth-child(1) { animation-delay: 0.1s; }
.landing-hero-mockup-bar:nth-child(2) { animation-delay: 0.2s; }
.landing-hero-mockup-bar:nth-child(3) { animation-delay: 0.3s; }
.landing-hero-mockup-bar:nth-child(4) { animation-delay: 0.4s; }
.landing-hero-mockup-bar:nth-child(5) { animation-delay: 0.5s; }
.landing-hero-mockup-bar:nth-child(6) { animation-delay: 0.6s; }
.landing-hero-mockup-bar:nth-child(7) { animation-delay: 0.7s; }
@keyframes landing-bar-grow {
    from { transform: scaleY(0); transform-origin: bottom; }
    to { transform: scaleY(1); transform-origin: bottom; }
}

/* Tooltip sur le mockup */
.landing-hero-mockup-tooltip {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    padding: 0.4rem 0.75rem;
    background: rgba(0,0,0,0.75);
    color: #fff;
    font-size: 0.75rem;
    border-radius: 8px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    white-space: nowrap;
}
.landing-hero-mockup:hover .landing-hero-mockup-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ========== SCROLL REVEAL GLOBAL ========== */
.landing-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.landing-reveal.landing-reveal-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Sur mobile : afficher le contenu immédiatement (évite contenu blanc si JS retardé ou viewport) */
@media (max-width: 768px) {
    .landing-reveal {
        opacity: 1;
        transform: none;
    }
    .landing-reveal.landing-reveal-visible {
        opacity: 1;
        transform: none;
    }
    .landing-probleme-arrow {
        opacity: 1;
        transform: none;
    }
    .landing-block-list li {
        opacity: 1;
        transform: none;
    }
    .landing-list-check-style li {
        opacity: 1;
        transform: none;
    }
    .landing-list-check li {
        opacity: 1;
        transform: none;
    }
    .landing-reassurance span {
        opacity: 1;
        transform: none;
    }
}
.landing-reveal-delay-1 { transition-delay: 0.1s; }
.landing-reveal-delay-2 { transition-delay: 0.2s; }
.landing-reveal-delay-3 { transition-delay: 0.3s; }
.landing-reveal-delay-4 { transition-delay: 0.4s; }
.landing-reveal-delay-5 { transition-delay: 0.5s; }

/* ========== SECTION PROBLÈME ========== */
.landing-probleme-card .landing-icon-wrap {
    transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}
.landing-probleme-card:hover .landing-icon-wrap {
    color: #4f46e5 !important;
    background: rgba(90, 95, 202, 0.2) !important;
}
.landing-probleme-card:hover .landing-icon-wrap {
    animation: landing-icon-shake 0.5s ease-in-out;
}
@keyframes landing-icon-shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-3px); }
    40% { transform: translateX(3px); }
    60% { transform: translateX(-2px); }
    80% { transform: translateX(2px); }
}

.landing-keyphrase {
    position: relative;
}

/* Flèche problème → solution (apparition douce) */
.landing-probleme-arrow {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.6s ease 0.2s, transform 0.6s ease 0.2s;
}
.landing-reveal-visible .landing-probleme-arrow {
    opacity: 1;
    transform: translateY(0);
}

/* ========== SECTION SOLUTION ========== */
.landing-pillar {
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.landing-keyphrase-box {
    transition: box-shadow 0.4s ease;
}
.landing-keyphrase-box.landing-reveal-visible {
    animation: landing-glow-box 3s ease-in-out 0.5s;
}
@keyframes landing-glow-box {
    0%, 100% { box-shadow: 0 0 0 rgba(90, 95, 202, 0); }
    50% { box-shadow: 0 0 24px rgba(90, 95, 202, 0.2); }
}

/* ========== BLOCS (Analytics, SEO, Pub, B2B) ========== */
.landing-block-icon {
    transition: transform 0.25s ease, color 0.25s ease;
}
.landing-block:hover .landing-block-icon {
    transform: scale(1.08);
}
.landing-block-list li {
    opacity: 0;
    transform: translateX(-8px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.landing-block.landing-reveal-visible .landing-block-list li:nth-child(1) { opacity: 1; transform: translateX(0); transition-delay: 0.1s; }
.landing-block.landing-reveal-visible .landing-block-list li:nth-child(2) { opacity: 1; transform: translateX(0); transition-delay: 0.2s; }
.landing-block.landing-reveal-visible .landing-block-list li:nth-child(3) { opacity: 1; transform: translateX(0); transition-delay: 0.3s; }

/* Barre de progression simulée (optionnel, si on ajoute un élément .landing-block-progress) */
.landing-block-progress {
    height: 6px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
    margin-top: 0.75rem;
}
.landing-block-progress-fill {
    height: 100%;
    border-radius: 999px;
    width: 0;
    transition: width 1s ease-out;
}
.landing-block.landing-reveal-visible .landing-block-progress-fill { width: 72%; }

/* ========== POUR QUI (cartes flip au hover) ========== */
.landing-card-flip {
    perspective: 1000px;
}
.landing-card-flip .landing-card {
    transform-style: preserve-3d;
    transition: transform 0.6s ease;
}
.landing-card-flip .landing-card:hover {
    transform: translateY(-4px) rotateY(5deg);
    box-shadow: 0 16px 40px rgba(0,0,0,.1);
}
.landing-card-icon {
    transition: transform 0.35s ease;
}
.landing-card:hover .landing-card-icon {
    transform: scale(1.05);
}

/* ========== ACCÈS LIMITÉ (pills) ========== */
#acces-limite .pill--warning {
    animation: landing-badge-pulse 2.5s ease-in-out infinite;
}
#acces-limite .pill--current {
    position: relative;
    overflow: hidden;
}
#acces-limite .pill--current::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: rgba(90, 95, 202, 0.15);
    transition: width 1s ease 0.3s;
}
#acces-limite.landing-reveal-visible .pill--current::before {
    width: 100%;
}
.landing-list-check-style li {
    opacity: 0;
    transform: translateX(-10px);
    transition: opacity 0.35s ease, transform 0.35s ease;
}
#acces-limite.landing-reveal-visible .landing-list-check-style li:nth-child(1) { opacity: 1; transform: translateX(0); transition-delay: 0.2s; }
#acces-limite.landing-reveal-visible .landing-list-check-style li:nth-child(2) { opacity: 1; transform: translateX(0); transition-delay: 0.35s; }
#acces-limite.landing-reveal-visible .landing-list-check-style li:nth-child(3) { opacity: 1; transform: translateX(0); transition-delay: 0.5s; }
#acces-limite.landing-reveal-visible .landing-list-check-style li:nth-child(4) { opacity: 1; transform: translateX(0); transition-delay: 0.65s; }

/* ========== AVANTAGES ACCÈS ANTICIPÉ ========== */
.landing-list-check li {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.4s ease, transform 0.4s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
#avantages-acces.landing-reveal-visible .landing-list-check li:nth-child(1) { opacity: 1; transform: translateY(0); transition-delay: 0.1s; }
#avantages-acces.landing-reveal-visible .landing-list-check li:nth-child(2) { opacity: 1; transform: translateY(0); transition-delay: 0.25s; }
#avantages-acces.landing-reveal-visible .landing-list-check li:nth-child(3) { opacity: 1; transform: translateY(0); transition-delay: 0.4s; }
#avantages-acces.landing-reveal-visible .landing-list-check li:nth-child(4) { opacity: 1; transform: translateY(0); transition-delay: 0.55s; }
.landing-list-check li:hover {
    box-shadow: 0 6px 20px rgba(90, 95, 202, 0.12);
    border-color: rgba(90, 95, 202, 0.35);
}

/* ========== ÉCOSYSTÈME ========== */
.landing-eco-item {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.landing-eco-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(90, 95, 202, 0.12);
}
.landing-eco-mockup {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.landing-eco-item:hover .landing-eco-mockup {
    transform: scale(1.08);
    box-shadow: 0 0 0 4px rgba(90, 95, 202, 0.15);
}

/* ========== CTA FINAL ========== */
.landing-cta-primary {
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.3s ease;
}
.landing-cta-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(243, 126, 5, 0.45);
}
.landing-cta-primary:hover svg {
    animation: landing-arrow-wiggle 0.6s ease-in-out;
}
@keyframes landing-arrow-wiggle {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(4px); }
}
.landing-cta-primary .landing-ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    transform: scale(0);
    animation: landing-ripple 0.6s ease-out;
    pointer-events: none;
}
@keyframes landing-ripple {
    to { transform: scale(4); opacity: 0; }
}

/* ========== MICRO RASSURANCE ========== */
.landing-reassurance span {
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}
#cta-final.landing-reveal-visible .landing-reassurance span:nth-child(1) { opacity: 1; transform: translateY(0); transition-delay: 0.2s; }
#cta-final.landing-reveal-visible .landing-reassurance span:nth-child(2) { opacity: 1; transform: translateY(0); transition-delay: 0.35s; }
#cta-final.landing-reveal-visible .landing-reassurance span:nth-child(3) { opacity: 1; transform: translateY(0); transition-delay: 0.5s; }
.landing-reassurance .landing-icon-mini {
    animation: landing-shield-shimmer 4s ease-in-out infinite;
}
@keyframes landing-shield-shimmer {
    0%, 100% { opacity: 0.9; }
    50% { opacity: 1; filter: drop-shadow(0 0 4px rgba(255,255,255,0.5)); }
}
