/* ================================================
   FULLPAGE SCROLL - EFFETS ULTRA DRAMATIQUES
   ================================================ */

/* Container principal */
.fullpage-container {
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    overflow-y: scroll;
    height: 100vh;
    overflow-x: hidden;
}

.fullpage-section {
    scroll-snap-align: start;
    scroll-snap-stop: always;
    min-height: 100vh;
    height: 100vh;
    position: relative;
    overflow: hidden;
}

/* Mobile - désactiver */
@media (max-width: 768px) {
    .fullpage-container {
        scroll-snap-type: none;
    }
    .fullpage-section {
        scroll-snap-align: none;
        scroll-snap-stop: normal;
        min-height: auto;
        height: auto;
        overflow: visible;
        opacity: 1 !important;
        transform: none !important;
    }
    .fullpage-section * {
        opacity: 1 !important;
        transform: none !important;
        filter: none !important;
        transition: none !important;
    }
}

/* ========================================
   ANIMATIONS ULTRA DRAMATIQUES - DESKTOP
   ======================================== */

@media (min-width: 769px) {
    /* Section - ZOOM EXTREME + ROTATION 3D */
    .fullpage-section {
        opacity: 0;
        visibility: hidden; /* CACHÉ COMPLÈTEMENT jusqu'à apparition */
        transform: scale(1.5) rotateX(15deg) translateZ(-200px);
        transform-style: preserve-3d;
        perspective: 2000px;
        transition: opacity 2s cubic-bezier(0.22, 1, 0.36, 1),
                    transform 2s cubic-bezier(0.22, 1, 0.36, 1),
                    visibility 0s linear 2s; /* Devient visible immédiatement quand is-visible */
        will-change: transform, opacity;
        filter: blur(20px);
    }

    .fullpage-section.is-visible {
        opacity: 1;
        visibility: visible; /* VISIBLE */
        transform: scale(1) rotateX(0deg) translateZ(0);
        filter: blur(0);
        transition: opacity 2s cubic-bezier(0.22, 1, 0.36, 1),
                    transform 2s cubic-bezier(0.22, 1, 0.36, 1),
                    visibility 0s linear 0s; /* Pas de délai pour devenir visible */
    }

    /* Première section visible INSTANTANÉMENT */
    .fullpage-section:first-child {
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        filter: none !important;
        transition: none !important;
    }

    .fullpage-section:first-child * {
        opacity: 1 !important;
        transform: none !important;
        filter: none !important;
        transition: none !important;
    }

    /* Section qui sort - effet push back */
    .fullpage-section.is-leaving {
        opacity: 0.3;
        transform: scale(0.8) rotateX(-10deg) translateZ(-100px);
        filter: blur(8px) brightness(0.7);
        transition: all 1.5s cubic-bezier(0.22, 1, 0.36, 1);
    }

    /* ===== TEXTES - APPARITIONS EXPLOSIVES ===== */

    /* Titres - Effet EXPLOSION (SAUF première section) */
    .fullpage-section:not(:first-child) h1,
    .fullpage-section:not(:first-child) h2 {
        opacity: 0;
        transform: translateY(150px) scale(0.7) rotateX(90deg);
        filter: blur(30px);
        transform-origin: center bottom;
        transform-style: preserve-3d;
        transition: opacity 1.5s ease-out 0.8s,
                    transform 1.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.8s,
                    filter 1.5s ease-out 0.8s;
    }

    .fullpage-section.is-visible h1,
    .fullpage-section.is-visible h2 {
        opacity: 1;
        transform: translateY(0) scale(1) rotateX(0deg);
        filter: blur(0);
    }

    /* Paragraphes - Wave effect (SAUF première section) */
    .fullpage-section:not(:first-child) p {
        opacity: 0;
        transform: translateY(80px) translateX(-50px);
        filter: blur(15px);
        transition: opacity 1.2s ease-out 1.3s,
                    transform 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) 1.3s,
                    filter 1.2s ease-out 1.3s;
    }

    .fullpage-section.is-visible p {
        opacity: 1;
        transform: translateY(0) translateX(0);
        filter: blur(0);
    }

    /* Badges - POP EXTREME avec bounce (SAUF première section) */
    .fullpage-section:not(:first-child) span[class*="badge"],
    .fullpage-section:not(:first-child) span[class*="inline-block"] {
        opacity: 0;
        transform: scale(0) rotate(-180deg);
        transition: opacity 0.8s ease-out 0.6s,
                    transform 1s cubic-bezier(0.68, -0.55, 0.265, 1.55) 0.6s;
    }

    .fullpage-section.is-visible span[class*="badge"],
    .fullpage-section.is-visible span[class*="inline-block"] {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }

    /* Boutons - Shake + Bounce (SAUF première section) */
    .fullpage-section:not(:first-child) a[class*="btn"],
    .fullpage-section:not(:first-child) a[href*="blog"],
    .fullpage-section:not(:first-child) a[href*="sortie"] {
        opacity: 0;
        transform: translateY(100px) scale(0.5) rotate(10deg);
        transition: opacity 1s ease-out 1.8s,
                    transform 1.2s cubic-bezier(0.68, -0.55, 0.265, 1.55) 1.8s;
    }

    .fullpage-section.is-visible a[class*="btn"],
    .fullpage-section.is-visible a[href*="blog"],
    .fullpage-section.is-visible a[href*="sortie"] {
        opacity: 1;
        transform: translateY(0) scale(1) rotate(0deg);
        animation: shake-bounce 0.8s ease-out 3s;
    }

    @keyframes shake-bounce {
        0%, 100% { transform: translateY(0) scale(1) rotate(0deg); }
        25% { transform: translateY(-10px) scale(1.05) rotate(-5deg); }
        50% { transform: translateY(-5px) scale(1.02) rotate(5deg); }
        75% { transform: translateY(-8px) scale(1.03) rotate(-3deg); }
    }

    /* Métadonnées - Cascade EXPLOSIVE (SAUF première section) */
    .fullpage-section:not(:first-child) div[class*="flex items-center gap"] > div {
        opacity: 0;
        transform: translateX(-100px) scale(0.5);
        transition: opacity 0.8s ease-out,
                    transform 1s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    .fullpage-section.is-visible div[class*="flex items-center gap"] > div:nth-child(1) {
        opacity: 1;
        transform: translateX(0) scale(1);
        transition-delay: 1.5s;
    }

    .fullpage-section.is-visible div[class*="flex items-center gap"] > div:nth-child(2) {
        opacity: 1;
        transform: translateX(0) scale(1);
        transition-delay: 1.7s;
    }

    .fullpage-section.is-visible div[class*="flex items-center gap"] > div:nth-child(3) {
        opacity: 1;
        transform: translateX(0) scale(1);
        transition-delay: 1.9s;
    }

    .fullpage-section.is-visible div[class*="flex items-center gap"] > div:nth-child(4) {
        opacity: 1;
        transform: translateX(0) scale(1);
        transition-delay: 2.1s;
    }

    /* SVG Icons - Rotation + Scale (SAUF première section) */
    .fullpage-section:not(:first-child) svg {
        opacity: 0;
        transform: scale(0) rotate(360deg);
        transition: opacity 0.6s ease-out,
                    transform 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    }

    .fullpage-section.is-visible svg {
        opacity: 1;
        transform: scale(1) rotate(0deg);
        transition-delay: 1.6s;
    }

    /* Overlay - Pulsation */
    .fullpage-section > div[class*="bg-gradient"],
    .fullpage-section > div[class*="bg-black"] {
        opacity: 0.3;
        animation: pulse-overlay 3s ease-in-out infinite;
    }

    .fullpage-section.is-visible > div[class*="bg-gradient"],
    .fullpage-section.is-visible > div[class*="bg-black"] {
        opacity: 1;
    }

    @keyframes pulse-overlay {
        0%, 100% { opacity: 1; }
        50% { opacity: 0.85; }
    }

    /* Particules - Float IN (SAUF première section) */
    .fullpage-section:not(:first-child) .animate-float,
    .fullpage-section:not(:first-child) .animate-float-delayed,
    .fullpage-section:not(:first-child) .animate-float-slow {
        opacity: 0;
        transform: translateY(-100px);
        transition: opacity 2s ease-out 2.5s,
                    transform 2s ease-out 2.5s;
    }

    .fullpage-section.is-visible .animate-float,
    .fullpage-section.is-visible .animate-float-delayed,
    .fullpage-section.is-visible .animate-float-slow {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navigation Dots - Plus gros et visible */
.fullpage-nav {
    position: fixed;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    display: none;
}

@media (min-width: 1024px) {
    .fullpage-nav {
        display: block;
    }
}

.fullpage-nav-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    margin: 20px 0;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border: 3px solid transparent;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.fullpage-nav-dot:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.5);
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.6);
}

.fullpage-nav-dot.active {
    background: white;
    transform: scale(2);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.9);
    border-color: white;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { transform: scale(2); }
    50% { transform: scale(2.2); }
}

/* Performances */
.fullpage-section {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    perspective: 2000px;
    -webkit-perspective: 2000px;
}

.fullpage-section * {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}
