/* ================= RESET LOCAL ================= */

* {
    box-sizing: border-box;
}

body {
    background: #05050a;
    color: #ffffff;
    font-family: 'Poppins', sans-serif;
    overflow-x: hidden;
}

/* ================= HEADER ANIMATION ================= */

.animation-hero {
    position: relative;
    min-height: 100vh;
    padding-bottom: 80px;
    overflow: hidden;
    background: #05050a;
}

/* 
    ICI TU METS TON GIF BACKGROUND DU HEADER.
    Remplace : images/animation/header-animation.gif
*/
.animation-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(5, 5, 10, 0.95) 0%, rgba(5, 5, 10, 0.76) 48%, rgba(5, 5, 10, 0.55) 100%),
        url("AnimationGif/Allmight_4.gif") center/cover no-repeat;
        
    z-index: 0;
    
}

.animation-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(255, 77, 109, 0.26), transparent 30%),
        radial-gradient(circle at 80% 15%, rgba(255, 176, 0, 0.18), transparent 32%),
        radial-gradient(circle at 70% 80%, rgba(93, 95, 239, 0.22), transparent 34%);
    z-index: 1;
    pointer-events: none;
}

.animation-hero-content {
    position: relative;
    z-index: 3;
}

.animation-hero .sticky-nav {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 99999 !important;
}

/* ================= HERO CONTENT ================= */

.animation-hero-content {
    width: min(1180px, 90%);
    margin: 0 auto;
    padding-top: 130px;
}

.page-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    color: #ffd36a;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(14px);
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.animation-hero-content h1 {
    max-width: 850px;
    margin-top: 28px;
    margin-bottom: 22px;
    font-size: clamp(2.4rem, 6vw, 5.5rem);
    line-height: 0.96;
    font-weight: 800;
    letter-spacing: -0.06em;
}

.animation-hero-content p {
    max-width: 720px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 1.05rem;
    line-height: 1.85;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 34px;
}

.primary-btn,
.ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 0 24px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    transition: 0.35s ease;
}

.primary-btn {
    color: #12070a;
    background: linear-gradient(135deg, #ffd36a, #ff4d6d);
    box-shadow: 0 18px 42px rgba(255, 77, 109, 0.28);
}

.primary-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 60px rgba(255, 77, 109, 0.42);
}

.ghost-btn {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(12px);
}

.ghost-btn:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 211, 106, 0.6);
    background: rgba(255, 255, 255, 0.12);
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    max-width: 780px;
    margin-top: 60px;
}

.hero-stats div {
    padding: 22px;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.075);
    border: 1px solid rgba(255, 255, 255, 0.13);
    backdrop-filter: blur(16px);
}

.hero-stats strong {
    display: block;
    color: #ffd36a;
    font-size: 1.45rem;
    margin-bottom: 5px;
}

.hero-stats span {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.88rem;
}

/* ================= SECTIONS ================= */

.animation-section {
    width: min(1180px, 90%);
    margin: 0 auto;
    padding: 100px 0;
}

.section-heading {
    max-width: 760px;
    margin-bottom: 48px;
}

.section-heading span,
.showreel-text span,
.animation-cta span {
    display: inline-block;
    color: #ffb000;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.section-heading h2,
.showreel-text h2,
.animation-cta h2 {
    font-size: clamp(2rem, 4vw, 3.6rem);
    line-height: 1.08;
    margin-bottom: 18px;
    letter-spacing: -0.045em;
}

.section-heading p,
.showreel-text p,
.animation-cta p {
    color: rgba(255, 255, 255, 0.68);
    line-height: 1.8;
}

/* ================= SERVICE CARDS ================= */

.service-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}

.service-card {
    position: relative;
    min-height: 290px;
    padding: 28px;
    border-radius: 30px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.035));
    border: 1px solid rgba(255, 255, 255, 0.12);
    overflow: hidden;
    transition: 0.35s ease;
}

.service-card::before {
    content: "";
    position: absolute;
    inset: auto -20% -45% -20%;
    height: 160px;
    background: radial-gradient(circle, rgba(255, 77, 109, 0.28), transparent 65%);
    opacity: 0;
    transition: 0.35s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: rgba(255, 211, 106, 0.35);
}

.service-card:hover::before {
    opacity: 1;
}

.service-card-icon {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 20px;
    background: rgba(255, 211, 106, 0.12);
    font-size: 1.65rem;
    margin-bottom: 24px;
}

.service-card h3 {
    font-size: 1.25rem;
    margin-bottom: 14px;
}

.service-card p {
    color: rgba(255, 255, 255, 0.66);
    line-height: 1.75;
    font-size: 0.95rem;
}

/* ================= SHOWREEL ================= */

.showreel-section {
    width: 100%;
    padding: 110px 0;
    background:
        radial-gradient(circle at 10% 20%, rgba(255, 77, 109, 0.14), transparent 35%),
        radial-gradient(circle at 90% 60%, rgba(255, 176, 0, 0.10), transparent 35%),
        #090910;
}

.showreel-layout {
    width: min(1180px, 90%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 42px;
    align-items: center;
}

.showreel-text {
    max-width: 520px;
}

.check-list {
    list-style: none;
    margin: 28px 0 34px;
    padding: 0;
}

.check-list li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 13px;
    color: rgba(255, 255, 255, 0.76);
}

.check-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    color: #ffd36a;
    font-weight: 800;
}

.showreel-video {
    border-radius: 36px;
    padding: 14px;
    background: linear-gradient(145deg, rgba(255,255,255,0.14), rgba(255,255,255,0.04));
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.35);
}

.showreel-video video {
    width: 100%;
    aspect-ratio: 16 / 9;
    display: block;
    border-radius: 28px;
    object-fit: cover;
    background: #000;
}

.video-caption {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 18px 10px 8px;
}

.video-caption strong {
    color: #ffffff;
}

.video-caption span {
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.9rem;
}

/* ================= MEDIA GALLERY ================= */

.media-gallery-section {
    padding-top: 110px;
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.media-card {
    border-radius: 30px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.065);
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: 0.35s ease;
}

.media-card:hover {
    transform: translateY(-10px);
    border-color: rgba(255, 211, 106, 0.36);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
}

.media-preview {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: #111;
}

.media-preview img,
.media-preview video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: 0.45s ease;
}

.media-card:hover .media-preview img,
.media-card:hover .media-preview video {
    transform: scale(1.08);
}

.media-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    padding: 7px 12px;
    border-radius: 999px;
    color: #14080a;
    background: #ffd36a;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.play-icon {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #ffffff;
    background: rgba(255, 77, 109, 0.82);
    box-shadow: 0 18px 45px rgba(255, 77, 109, 0.42);
}

.media-content {
    padding: 24px;
}

.media-content h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.media-content p {
    color: rgba(255, 255, 255, 0.64);
    line-height: 1.7;
    font-size: 0.92rem;
    margin-bottom: 18px;
}

.small-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    outline: none;
    cursor: pointer;
    padding: 10px 16px;
    border-radius: 999px;
    color: #ffffff;
    text-decoration: none;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.1);
    transition: 0.3s ease;
}

.small-link:hover {
    background: linear-gradient(135deg, #ffd36a, #ff4d6d);
    color: #12070a;
}

/* ================= PROCESS ================= */

.process-section {
    padding-top: 90px;
}

.process-timeline {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}

.process-step {
    position: relative;
    padding: 28px;
    border-radius: 30px;
    background: #0d0d16;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.process-step span {
    display: inline-flex;
    width: 48px;
    height: 48px;
    align-items: center;
    justify-content: center;
    margin-bottom: 22px;
    border-radius: 16px;
    color: #ffd36a;
    background: rgba(255, 211, 106, 0.11);
    font-weight: 800;
}

.process-step h3 {
    margin-bottom: 12px;
}

.process-step p {
    color: rgba(255, 255, 255, 0.62);
    line-height: 1.7;
    font-size: 0.93rem;
}

/* ================= PACKAGES ================= */

.packages-section {
    padding-top: 70px;
}

.packages-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.package-card {
    padding: 32px;
    border-radius: 34px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.095), rgba(255, 255, 255, 0.035));
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: 0.35s ease;
}

.package-card:hover {
    transform: translateY(-10px);
}

.featured-package {
    border-color: rgba(255, 211, 106, 0.55);
    box-shadow: 0 28px 80px rgba(255, 77, 109, 0.15);
}

.package-tag {
    display: inline-flex;
    padding: 8px 13px;
    border-radius: 999px;
    color: #12070a;
    background: #ffd36a;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.package-card h3 {
    font-size: 1.35rem;
    margin-bottom: 8px;
}

.price {
    color: #ffb000;
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 22px;
}

.package-card ul {
    list-style: none;
    padding: 0;
    margin: 0 0 26px;
}

.package-card li {
    color: rgba(255, 255, 255, 0.68);
    margin-bottom: 12px;
}

.package-card li::before {
    content: "•";
    color: #ff4d6d;
    margin-right: 8px;
}

.package-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 999px;
    color: #ffffff;
    text-decoration: none;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.1);
    transition: 0.3s ease;
}

.package-btn:hover {
    color: #12070a;
    background: linear-gradient(135deg, #ffd36a, #ff4d6d);
}

/* ================= CTA ================= */

.animation-cta {
    width: min(1180px, 90%);
    margin: 40px auto 100px;
    padding: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    border-radius: 40px;
    background:
        radial-gradient(circle at 20% 20%, rgba(255, 211, 106, 0.28), transparent 30%),
        linear-gradient(135deg, rgba(255, 77, 109, 0.28), rgba(255, 255, 255, 0.06));
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.animation-cta div {
    max-width: 720px;
}

/* ================= VIDEO MODAL ================= */

.video-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 99999;
}

.video-modal.active {
    display: flex;
}

.video-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(10px);
}

.video-modal-box {
    position: relative;
    z-index: 2;
    width: min(980px, 96vw);
    padding: 22px;
    border-radius: 30px;
    background: #0c0c13;
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.7);
}

.video-modal-close {
    position: absolute;
    top: -18px;
    right: -18px;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: #12070a;
    background: linear-gradient(135deg, #ffd36a, #ff4d6d);
}

.video-modal-box h3 {
    margin-bottom: 16px;
    padding-right: 40px;
}

.video-modal-player iframe,
.video-modal-player video {
    width: 100%;
    aspect-ratio: 16 / 9;
    display: block;
    border: none;
    border-radius: 22px;
    background: #000000;
}

/* ================= ANIMATION SCROLL ================= */

.animate-fade {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.animate-fade.active {
    opacity: 1;
    transform: translateY(0);
}

/* ================= RESPONSIVE ================= */

@media (max-width: 1050px) {
    .service-grid,
    .media-grid,
    .process-timeline {
        grid-template-columns: repeat(2, 1fr);
    }

    .showreel-layout,
    .packages-grid {
        grid-template-columns: 1fr;
    }

    .showreel-text {
        max-width: 100%;
    }

    .animation-cta {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 720px) {
    .animation-hero {
        min-height: auto;
    }

    .animation-hero-content {
        padding-top: 95px;
    }

    .animation-hero-content h1 {
        font-size: 2.7rem;
    }

    .hero-stats,
    .service-grid,
    .media-grid,
    .process-timeline {
        grid-template-columns: 1fr;
    }

    .animation-section {
        padding: 70px 0;
    }

    .showreel-section {
        padding: 80px 0;
    }

    .media-preview {
        height: 260px;
    }

    .animation-cta {
        padding: 34px 24px;
        border-radius: 28px;
    }

    .video-modal-close {
        right: 8px;
        top: 8px;
    }

    .video-modal-box {
        padding-top: 56px;
    }
}

@media (max-width: 480px) {
    .hero-actions {
        flex-direction: column;
    }

    .primary-btn,
    .ghost-btn {
        width: 100%;
    }

    .animation-hero-content h1 {
        font-size: 2.25rem;
    }

    .section-heading h2,
    .showreel-text h2,
    .animation-cta h2 {
        font-size: 2rem;
    }
}

/*****************************************************************************************************/

/* ==========================================================================
   CORRECTIONS EXCLUSIVES — SERVICE ANIMATION (ser_animation.html)
   Ces règles ne modifient ni Portfolio.css, ni style.css, ni les autres pages.
   ========================================================================== */

:root {
    --animation-nav-height: 86px;
}

/* Une seule barre verticale : le document porte le scroll, jamais le body. */
html {
    overflow-x: clip;
    overflow-y: scroll;
    scrollbar-gutter: stable;
    scroll-padding-top: calc(var(--animation-nav-height) + 18px);
}

body {
    width: 100%;
    min-width: 0;
    min-height: 100vh;
    height: auto !important;
    overflow-x: clip !important;
    overflow-y: visible !important;
}

html.site-menu-locked,
html.video-modal-is-open {
    overflow-y: hidden !important;
}

body.menu-is-open,
body.video-modal-is-open {
    overflow: hidden !important;
}

/* Empêche toute largeur parasite d'ouvrir un second flux horizontal/vertical. */
.animation-hero,
.animation-section,
.showreel-section,
.animation-cta,
.main-footer {
    max-width: 100%;
}

.animation-hero {
    isolation: isolate;
    overflow: hidden;
    overflow: clip;
}

@supports not (overflow: clip) {
    .animation-hero {
        overflow: hidden;
    }
}

/* La nav reste dans la zone de contenu : elle ne recouvre plus la scrollbar. */
.animation-hero .sticky-nav {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: var(--site-scrollbar-width, 0px) !important;
    width: calc(100% - var(--site-scrollbar-width, 0px)) !important;
    min-height: var(--animation-nav-height);
    z-index: 9000 !important;
    isolation: isolate;
}

/* Le contenu et les sections ne peuvent jamais passer devant la navbar. */
.animation-hero::before {
    z-index: 0;
}

.animation-hero::after {
    z-index: 1;
}

.animation-hero-content {
    z-index: 2;
    padding-top: calc(var(--animation-nav-height) + 44px);
}

.animation-section,
.showreel-section,
.animation-cta,
.main-footer {
    position: relative;
    z-index: 0;
}

/* Correctif du margin-left générique de Portfolio.css. */
.animation-hero p,
.animation-section p,
.showreel-section p,
.animation-cta p,
.main-footer p {
    margin-left: 0 !important;
}

/* Réduit la charge GPU pendant le défilement sans dégrader le style de la page. */
.page-kicker,
.ghost-btn,
.hero-stats div {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background-color: rgba(12, 13, 22, 0.78);
}

.media-preview video {
    contain: layout paint;
}

/* Le backdrop transparent global est volontairement désactivé pour cette page. */
#navBackdrop,
.site-menu-backdrop {
    display: none !important;
    pointer-events: none !important;
}

/* Boutons burger/fermeture : accessibles, visibles et indépendants du CSS partagé. */
.nav-toggle,
.nav-close {
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    cursor: pointer;
    font: inherit;
}

.nav-toggle {
    display: none;
    width: 48px;
    height: 48px;
    place-content: center;
    gap: 5px;
    padding: 0;
    border: 1px solid rgba(255, 211, 106, 0.52);
    border-radius: 16px;
    background:
        linear-gradient(145deg, rgba(255, 211, 106, 0.24), rgba(255, 77, 109, 0.18)),
        #111320;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.30);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.nav-toggle:hover,
.nav-toggle:focus-visible {
    transform: translateY(-2px);
    border-color: #ffd36a;
    box-shadow: 0 15px 34px rgba(255, 77, 109, 0.26);
    outline: none;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    margin: 0 auto;
    border-radius: 99px;
    background: #ffffff;
}

.nav-close {
    display: none;
}

/* Evite les débordements de colonnes sur les écrans intermédiaires. */
.service-grid,
.media-grid,
.process-timeline,
.packages-grid,
.showreel-layout {
    min-width: 0;
}

.service-grid > *,
.media-grid > *,
.process-timeline > *,
.packages-grid > *,
.showreel-layout > * {
    min-width: 0;
}

.service-card,
.media-card,
.process-step,
.package-card {
    overflow-wrap: anywhere;
}

/* 13–16 pouces : la nav reste lisible sans écraser les liens. */
@media (min-width: 1281px) and (max-width: 1480px) {
    .animation-hero .sticky-nav {
        padding-left: clamp(18px, 2.5vw, 38px);
        padding-right: clamp(18px, 2.5vw, 38px);
    }

    .animation-hero .sticky-nav .nav-links > ul {
        gap: 2px;
    }

    .animation-hero .sticky-nav .nav-links > ul > li > a {
        padding-left: 8px;
        padding-right: 8px;
        font-size: 0.73rem;
        white-space: nowrap;
    }

    .animation-hero-content,
    .animation-section,
    .showreel-layout,
    .animation-cta {
        width: min(1180px, 92%);
    }

    .service-grid,
    .media-grid,
    .process-timeline {
        gap: 18px;
    }

    .service-card,
    .process-step {
        padding: 24px;
    }
}

/* Le burger prend le relais avant que la navigation ne se chevauche. */
@media (max-width: 1280px) {
    :root {
        --animation-nav-height: 76px;
    }

    .animation-hero .sticky-nav {
        min-height: var(--animation-nav-height);
        padding-left: 18px;
        padding-right: 18px;
    }

    .animation-hero .sticky-nav #logoNav {
        width: min(154px, 45vw);
        height: auto;
    }

    .animation-hero .sticky-nav .nav-toggle {
        display: grid !important;
        flex: 0 0 auto;
        margin-left: auto;
    }

    /* Le même sélecteur couvre le panneau avant et après son déplacement dans body. */
    .animation-hero .sticky-nav > #navLinks,
    body > #navLinks {
        position: fixed !important;
        inset: 0 0 0 auto !important;
        right: 0 !important;
        display: block !important;
        width: min(400px, 92vw) !important;
        min-width: 0 !important;
        min-height: 100dvh;
        max-height: 100dvh;
        margin: 0 !important;
        padding: 88px 18px 30px !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        overscroll-behavior: contain;
        background: #080a13 !important;
        background-image:
            radial-gradient(circle at 100% 0%, rgba(255, 77, 109, 0.24), transparent 32%),
            radial-gradient(circle at 0% 100%, rgba(255, 211, 106, 0.16), transparent 34%) !important;
        border-left: 1px solid rgba(255, 255, 255, 0.14);
        box-shadow: -22px 0 68px rgba(0, 0, 0, 0.55);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translate3d(110%, 0, 0) !important;
        transition: none;
        z-index: 9100 !important;
    }

    .animation-hero .sticky-nav > #navLinks.menu-motion-ready,
    body > #navLinks.menu-motion-ready {
        transition: transform 0.32s ease, opacity 0.22s ease, visibility 0s linear 0.32s !important;
    }

    .animation-hero .sticky-nav > #navLinks.menu-open,
    body > #navLinks.menu-open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translate3d(0, 0, 0) !important;
        transition: transform 0.32s ease, opacity 0.22s ease !important;
    }

    .animation-hero .sticky-nav > #navLinks.menu-transition-disabled,
    body > #navLinks.menu-transition-disabled {
        transition: none !important;
    }

    .animation-hero .sticky-nav > #navLinks > ul,
    body > #navLinks > ul {
        display: flex !important;
        flex-direction: column;
        align-items: stretch;
        gap: 7px;
        width: 100%;
        margin: 0 !important;
        padding: 0 !important;
        list-style: none;
    }

    .animation-hero .sticky-nav > #navLinks li,
    body > #navLinks li {
        float: none !important;
        width: 100%;
        margin: 0 !important;
        padding: 0 !important;
    }

    .animation-hero .sticky-nav > #navLinks > ul > li > a,
    body > #navLinks > ul > li > a {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        min-height: 48px;
        padding: 13px 15px !important;
        color: #ffffff !important;
        border: 1px solid rgba(255, 255, 255, 0.10);
        border-radius: 14px;
        background: rgba(255, 255, 255, 0.055);
        font-size: 0.88rem !important;
        line-height: 1.3;
        letter-spacing: 0.02em;
        text-decoration: none;
    }

    .animation-hero .sticky-nav > #navLinks > ul > li > a:hover,
    .animation-hero .sticky-nav > #navLinks > ul > li > a:focus-visible,
    body > #navLinks > ul > li > a:hover,
    body > #navLinks > ul > li > a:focus-visible {
        border-color: rgba(255, 211, 106, 0.68);
        background: rgba(255, 211, 106, 0.10);
        outline: none;
    }

    .animation-hero .sticky-nav > #navLinks .nav-close,
    body > #navLinks .nav-close {
        position: absolute;
        top: 17px;
        right: 17px;
        z-index: 2;
        display: grid !important;
        width: 48px;
        height: 48px;
        place-items: center;
        padding: 0;
        border: 1px solid rgba(255, 211, 106, 0.58);
        border-radius: 16px;
        color: #ffffff;
        background: linear-gradient(135deg, #ff4d6d, #b72949);
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.30);
        font-size: 1.15rem;
    }

    .animation-hero .sticky-nav > #navLinks .dropdown-arrow,
    body > #navLinks .dropdown-arrow {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 24px;
        height: 24px;
        margin-left: 10px;
        border-radius: 8px;
        color: #ffd36a;
        background: rgba(255, 211, 106, 0.12);
        transition: transform 0.24s ease;
    }

    .animation-hero .sticky-nav > #navLinks .dropdown.open > .dropdown-link .dropdown-arrow,
    body > #navLinks .dropdown.open > .dropdown-link .dropdown-arrow {
        transform: rotate(180deg);
    }

    .animation-hero .sticky-nav > #navLinks .dropdown-content,
    body > #navLinks .dropdown-content {
        position: static !important;
        display: grid !important;
        grid-template-rows: 0fr;
        width: 100% !important;
        max-height: 0;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        opacity: 0;
        pointer-events: none;
        visibility: visible !important;
        transform: none !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
        transition: grid-template-rows 0.28s ease, max-height 0.28s ease, opacity 0.2s ease !important;
    }

    .animation-hero .sticky-nav > #navLinks .dropdown-content > li,
    body > #navLinks .dropdown-content > li {
        min-height: 0;
        overflow: hidden;
    }

    .animation-hero .sticky-nav > #navLinks .dropdown.open > .dropdown-content,
    body > #navLinks .dropdown.open > .dropdown-content {
        grid-template-rows: 1fr;
        max-height: 780px;
        margin-top: 7px !important;
        padding: 8px !important;
        opacity: 1;
        pointer-events: auto;
        border: 1px solid rgba(255, 255, 255, 0.08) !important;
        border-radius: 14px !important;
        background: rgba(255, 255, 255, 0.04) !important;
    }

    .animation-hero .sticky-nav > #navLinks .dropdown-content a,
    body > #navLinks .dropdown-content a {
        display: flex !important;
        align-items: flex-start;
        gap: 10px;
        width: 100%;
        padding: 11px 9px !important;
        color: rgba(255, 255, 255, 0.88) !important;
        border-radius: 10px;
        text-decoration: none;
    }

    .animation-hero .sticky-nav > #navLinks .dropdown-content a:hover,
    body > #navLinks .dropdown-content a:hover {
        background: rgba(255, 211, 106, 0.10);
    }

    .animation-hero .sticky-nav > #navLinks .service-text,
    .animation-hero .sticky-nav > #navLinks .portfolio-text,
    body > #navLinks .service-text,
    body > #navLinks .portfolio-text {
        min-width: 0;
    }

    .animation-hero .sticky-nav > #navLinks .service-text small,
    .animation-hero .sticky-nav > #navLinks .portfolio-text small,
    body > #navLinks .service-text small,
    body > #navLinks .portfolio-text small {
        display: block;
        margin-top: 3px;
        color: rgba(255, 255, 255, 0.56);
        font-size: 0.72rem;
        line-height: 1.45;
        white-space: normal;
    }

    .service-grid,
    .media-grid,
    .process-timeline {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .service-card,
    .media-card,
    .process-step {
        min-height: 0;
    }
}

@media (max-width: 900px) {
    .animation-hero-content,
    .animation-section,
    .showreel-layout,
    .animation-cta {
        width: min(1180px, 92%);
    }

    .showreel-layout,
    .packages-grid {
        grid-template-columns: 1fr;
    }

    .animation-cta {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 720px) {
    :root {
        --animation-nav-height: 70px;
    }

    .animation-hero .sticky-nav {
        min-height: var(--animation-nav-height);
        padding-left: 14px;
        padding-right: 14px;
    }

    .animation-hero-content {
        padding-top: calc(var(--animation-nav-height) + 32px);
    }

    .animation-hero-content h1 {
        letter-spacing: -0.045em;
    }

    .hero-stats,
    .service-grid,
    .media-grid,
    .process-timeline,
    .packages-grid {
        grid-template-columns: 1fr;
    }

    .animation-section {
        padding-top: 68px;
        padding-bottom: 68px;
    }

    .showreel-section {
        padding-top: 72px;
        padding-bottom: 72px;
    }

    .media-preview {
        height: clamp(210px, 62vw, 280px);
    }

    .animation-cta {
        margin-bottom: 72px;
    }
}

@media (max-width: 480px) {
    .animation-hero-content,
    .animation-section,
    .showreel-layout,
    .animation-cta {
        width: min(1180px, 90%);
    }

    .animation-hero-content {
        padding-top: calc(var(--animation-nav-height) + 26px);
    }

    .hero-stats {
        gap: 12px;
    }

    .hero-stats div {
        padding: 18px;
        border-radius: 20px;
    }

    .animation-hero .sticky-nav > #navLinks,
    body > #navLinks {
        width: min(400px, 100vw) !important;
        padding-left: 14px !important;
        padding-right: 14px !important;
    }
}

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


/* ============================================================================
   CORRECTIF V2 — SER_ANIMATION UNIQUEMENT
   - réserve la hauteur exacte de la navbar fixe ;
   - aucune section ne passe visuellement au-dessus de la navbar ;
   - les cartes 2D / GIF / VIDEO ne sont plus coupées sur les laptops ;
   - typographie stabilisée entre 13 et 16 pouces.
   ============================================================================ */

/* Le hero ne doit jamais couper son propre contenu vertical. */
.animation-hero {
    height: auto !important;
    min-height: 100svh;
    overflow: visible !important;
    padding-bottom: clamp(34px, 5vh, 72px);
}

/* Barre fixe opaque : les contenus défilent systématiquement sous elle. */
.animation-hero .sticky-nav {
    background: #11121a !important;
    box-shadow: 0 8px 26px rgba(0, 0, 0, 0.30);
    z-index: 9500 !important;
}

/* Cet espace est synchronisé par ser_animation.js avec la hauteur réelle du menu. */
.animation-hero-content {
    padding-top: calc(var(--animation-nav-height) + 34px) !important;
    padding-bottom: 0;
}

.animation-section,
.showreel-section,
.animation-cta,
.main-footer {
    scroll-margin-top: calc(var(--animation-nav-height) + 18px);
}

/* Evite les titres ou paragraphes masqués par une largeur intermédiaire. */
.animation-hero-content h1 {
    max-width: 1060px;
    text-wrap: balance;
}

.animation-hero-content p {
    max-width: 780px;
}

/* Les cartes du hero restent dans le flux normal et sont donc toujours visibles. */
.hero-stats {
    width: min(940px, 100%);
    max-width: none;
}

/* Laptops 13–16 pouces ou fenêtres de hauteur réduite. */
@media (min-width: 901px) and (max-height: 930px) {
    .animation-hero-content {
        width: min(1180px, 92%);
        padding-top: calc(var(--animation-nav-height) + 24px) !important;
    }

    .page-kicker {
        padding: 8px 15px;
        font-size: 0.77rem;
    }

    .animation-hero-content h1 {
        max-width: 1020px;
        margin-top: 18px;
        margin-bottom: 16px;
        font-size: clamp(3.05rem, 3.85vw, 4.35rem);
        line-height: 0.98;
        letter-spacing: -0.055em;
    }

    .animation-hero-content p {
        max-width: 760px;
        font-size: 0.98rem;
        line-height: 1.65;
    }

    .hero-actions {
        gap: 12px;
        margin-top: 22px;
    }

    .primary-btn,
    .ghost-btn {
        min-height: 48px;
        padding-right: 21px;
        padding-left: 21px;
    }

    .hero-stats {
        gap: 14px;
        margin-top: 30px;
    }

    .hero-stats div {
        min-height: 94px;
        padding: 16px 20px;
        border-radius: 22px;
    }

    .hero-stats strong {
        font-size: 1.3rem;
    }

    .hero-stats span {
        font-size: 0.84rem;
        line-height: 1.45;
    }
}

/* 13–14 pouces : évite que les trois cartes se compressent ou disparaissent. */
@media (min-width: 901px) and (max-width: 1480px) {
    .animation-hero-content {
        width: min(1180px, 92%);
    }

    .animation-hero-content h1 {
        max-width: 980px;
    }

    .hero-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .hero-stats div {
        min-width: 0;
    }
}

/* Tablette : les textes conservent une lecture propre avant le passage en colonne. */
@media (min-width: 721px) and (max-width: 900px) {
    .animation-hero-content {
        padding-top: calc(var(--animation-nav-height) + 28px) !important;
    }

    .animation-hero-content h1 {
        max-width: 820px;
        font-size: clamp(2.75rem, 7.5vw, 4.2rem);
        line-height: 1.01;
    }

    .hero-stats {
        margin-top: 36px;
    }
}

/* Mobile : aucun texte n'est couvert par la barre fixe. */
@media (max-width: 720px) {
    .animation-hero-content {
        padding-top: calc(var(--animation-nav-height) + 26px) !important;
    }

    .animation-hero-content h1 {
        text-wrap: pretty;
    }
}

/* ============================================================================
   CORRECTIF V3 — NAVBAR AU-DESSUS DE TOUTES LES SECTIONS
   Exclusivement pour ser_animation.html. La navbar est déplacée par le JS
   au niveau de body afin de sortir des contextes z-index du hero.
   ============================================================================ */

/* Toutes les sections restent dans le plan normal de la page. */
body.animation-service-page .animation-hero,
body.animation-service-page .animation-section,
body.animation-service-page .showreel-section,
body.animation-service-page .animation-cta,
body.animation-service-page .main-footer {
    position: relative !important;
    z-index: 0 !important;
}

/* Navbar racine : aucune section ne peut visuellement la traverser. */
body.animation-service-page > .sticky-nav.animation-page-nav {
    position: fixed !important;
    inset: 0 var(--site-scrollbar-width, 0px) auto 0 !important;
    width: calc(100% - var(--site-scrollbar-width, 0px)) !important;
    min-height: var(--animation-nav-height) !important;
    z-index: 2147483000 !important;
    isolation: isolate;
    background: #11121a !important;
    box-shadow: 0 9px 28px rgba(0, 0, 0, 0.34);
}

/* Le contenu du menu conserve sa hiérarchie, mais reste dans la navbar. */
body.animation-service-page > .sticky-nav.animation-page-nav > a,
body.animation-service-page > .sticky-nav.animation-page-nav > .nav-links,
body.animation-service-page > .sticky-nav.animation-page-nav > .nav-toggle {
    position: relative;
    z-index: 1;
}

/* La section ciblée par une ancre s'arrête sous la barre fixe. */
body.animation-service-page .animation-section,
body.animation-service-page .showreel-section,
body.animation-service-page .animation-cta,
body.animation-service-page .main-footer {
    scroll-margin-top: calc(var(--animation-nav-height) + 20px) !important;
}

/* Le popup vidéo reste volontairement au-dessus de la navigation lorsqu'il est ouvert. */
body.animation-service-page .video-modal {
    z-index: 2147483500 !important;
}

/* Le panneau burger, déplacé dans body par SmallResolution.js, reste au-dessus de la barre. */
@media (max-width: 1280px) {
    body.animation-service-page > #navLinks {
        z-index: 2147483600 !important;
    }

    /* Réplique les règles desktop ciblées avant le déplacement de la navbar. */
    body.animation-service-page > .sticky-nav.animation-page-nav .nav-links > ul {
        min-width: 0;
    }
}

/* 13 à 16 pouces : aucune règle de navbar ne dépend plus du hero. */
@media (min-width: 1281px) and (max-width: 1480px) {
    body.animation-service-page > .sticky-nav.animation-page-nav {
        padding-left: clamp(18px, 2.5vw, 38px);
        padding-right: clamp(18px, 2.5vw, 38px);
    }

    body.animation-service-page > .sticky-nav.animation-page-nav .nav-links > ul {
        gap: 2px;
    }

    body.animation-service-page > .sticky-nav.animation-page-nav .nav-links > ul > li > a {
        padding-left: 8px;
        padding-right: 8px;
        font-size: 0.73rem;
        white-space: nowrap;
    }
}

/* ============================================================================
   CORRECTIF V4 — BOUTON BURGER APRÈS PROMOTION DE LA NAVBAR
   La V3 déplace volontairement .sticky-nav au niveau de <body> afin que les
   sections passent sous elle. Les sélecteurs du burger, auparavant liés au
   hero, ne correspondaient donc plus. Ce bloc cible uniquement ser_animation.
   ============================================================================ */

@media (max-width: 1280px) {
    /* La navbar V3 est désormais enfant direct de body : le bouton doit
       conserver son affichage et rester au-dessus du contenu de la barre. */
    body.animation-service-page > .sticky-nav.animation-page-nav {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
    }

    body.animation-service-page > .sticky-nav.animation-page-nav .nav-toggle {
        display: grid !important;
        place-content: center !important;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        position: relative !important;
        z-index: 2147483002 !important;
        flex: 0 0 auto !important;
        margin-left: auto !important;
    }

    body.animation-service-page > .sticky-nav.animation-page-nav .nav-toggle span {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
}

@media (max-width: 720px) {
    body.animation-service-page > .sticky-nav.animation-page-nav {
        min-height: var(--animation-nav-height) !important;
        padding-left: 14px !important;
        padding-right: 14px !important;
    }
}
