/* Design Noir & Grain inspiré de la page Projets V3 */
body {
    background-color: #F1F1F1;
    color: #ffffff;
    margin: 0;
    overflow-x: hidden;
    font-family: 'RMMono', monospace;
}

/* Sections Background Noir */
.intro-hero-section,
.highlight-section,
.services-section {
    background-color: #1e1e1e;
}

/* --- NOISE OVERLAY ---
   z-index: 100 → au-dessus du contenu des sections (z 0-50) pour que le
   mix-blend-mode applique bien le grain, MAIS sous le header (z 1000) pour
   ne pas couvrir le burger / logo / liens (sinon le grain rend le burger
   à peine visible sur mobile). */
.noise-overlay {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    z-index: 100;
    pointer-events: none;
    opacity: 0.11;
    mix-blend-mode: overlay;
    animation: grain 8s steps(10) infinite;
}

.noise-overlay::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        repeating-conic-gradient(#000 0%, transparent 0.00002%, transparent 0.00004%, #000 0.00007%),
        repeating-conic-gradient(#000 0%, transparent 0.00001%, transparent 0.0002%, #000 0.00008%);
    background-size: 100px 100px, 150px 150px;
}

@keyframes grain {
    0%, 100% { transform: translate(0, 0); }
    10% { transform: translate(-5%, -10%); }
    20% { transform: translate(-15%, 5%); }
    30% { transform: translate(7%, -25%); }
    40% { transform: translate(-5%, 25%); }
    50% { transform: translate(-15%, 10%); }
    60% { transform: translate(15%, 0%); }
    70% { transform: translate(0%, 15%); }
    80% { transform: translate(3%, 25%); }
    90% { transform: translate(-10%, 10%); }
}

/* --- MENU HEADER OVERRIDES --- */
.projets-page .g-header {
    background-color: rgba(0, 0, 0, 0.05) !important;
    backdrop-filter: none !important;
}

.projets-page .brand-text,
.projets-page .g-header__nav,
.projets-page .g-header__link,
.projets-page .g-header__link__label {
    color: #ffffff !important;
}

.projets-page .g-header__logo__img {
    filter: invert(1) brightness(100) !important;
}

/* --- IMAGE MONDE --- */
.projets-background-image {
    position: absolute;
    top: 150px;
    right: 125px;
    width: 500px;
    height: auto;
    z-index: -1;
    opacity: 0.1;
    pointer-events: none;
}

/* --- TITRE --- */
.intro-hero-section {
    padding: 9.6em 9.6em 0;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    position: relative;
    z-index: 1;
}

.intro-hero-section .new-hero-title {
    font-family: 'Arc_Typ', sans-serif !important;
    font-size: clamp(3.5rem, 9vw, 10rem) !important;
    line-height: 0.96 !important;
    margin: 0;
    font-weight: normal !important;
    font-style: normal !important;
    text-transform: uppercase !important;
    letter-spacing: -0.045em !important;
    color: #ffffff !important;
    mix-blend-mode: normal !important;
    max-width: 100%;
    z-index: 2;
    visibility: hidden; /* Caché pour animation JS */
    padding-bottom: 0;
    text-align: left;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-synthesis: none;
}

.intro-hero-section .new-hero-title .line {
    display: block;
    white-space: nowrap;
}

/* --- TEXTE HIGHLIGHT --- */
.highlight-section {
    padding: 0 9.6em 1.4em 9.6em;
    box-sizing: border-box;
    width: 100%;
    position: relative;
    z-index: 1;
}

.about-paragraph {
    font-family: 'RMNeue-Regular', sans-serif;
    font-size: clamp(1.2rem, 2vw, 2.2rem);
    line-height: 1.4;
    color: #ffffff;
    max-width: 1000px;
    word-wrap: normal;
    word-break: keep-all;
}

.about-paragraph span {
    opacity: 0.2;
    transition: opacity 0.1s;
}

.about-paragraph[data-highlight-text] span.active,
.about-paragraph span.active {
    opacity: 1 !important;
    color: #ffffff !important;
}


/* Specific styling for the Services Title in this page */
.new-hero-title.custom-services-title {
    text-align: left !important;
    padding-left: 0 !important; /* Reset padding here, handled by wrapper */
    color: #ffffff !important; /* White text */
    font-size: clamp(2.6rem, 8.5vw, 11rem) !important;
    margin-bottom: 4rem;
}

/* Wrapper alignment for Services Title */
.services-section .new-title-section {
    padding-left: 9.6em !important;
    text-align: left !important;
    box-sizing: border-box;
}

/* Ensure sections are above the background */
.sticky-animation-section,
.services-section {
    position: relative;
    z-index: 1;
}

.sticky-animation-section {
    background-color: #F1F1F1 !important;
}

.services-body {
    background: #1e1e1e !important;
}

/* Remove default background and force white text on .services-body too */
.services-section {
    background: transparent !important; /* Retour à la transparence */
    position: relative;
    z-index: 20; 
}

.services-body {
    background: transparent !important;
}

.services-section .service-title,
.services-section .service-description,
.services-section .services-label-container span,
.services-body {
    color: #ffffff !important;
}

.services-paragraph {
    color: #ffffff !important;
}

/* Override borders color to white/transparent white */
.services-grid,
.service-item {
    border-color: rgba(255, 255, 255, 0.2) !important;
}

/* Filtre sombre sur l'image du trou noir */
.animation-overlay-dark {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(20, 20, 20, 0.2);
    pointer-events: none;
    z-index: 1;
}

p.about-paragraph {
    margin: 0px;
}

.services-body {
    margin-top: -6rem;
    padding-top: 9.6rem;
    background-color: #1e1e1e !important;
}

.services-section {
    margin-top: -90vh;
}

/* Manifeste — section "NOS VALEURS" : layout 50/50 sur desktop, full-width
   stacking sur mobile (comme la section "nos services" de la home). */
.manifeste-values-row {
    display: flex;
    gap: 0;
    align-items: flex-start;
    margin-top: -1.5rem;
}

.manifeste-values-intro {
    width: 50%;
    padding-right: 4rem;
    padding-top: 2rem;
}

.manifeste-values-grid {
    margin-left: 0;
    width: 50%;
}

/* Responsive */
@media (max-width: 1024px) {
    .intro-hero-section, .highlight-section {
        padding: 4em 2em;
    }

    .intro-hero-section {
        padding-bottom: 0;
    }
    .projets-background-image {
        width: 300px;
        right: -50px;
        top: 0;
    }
    .intro-hero-section .hero-title {
        font-size: clamp(2.5rem, 10vw, 6rem) !important;
    }
    
    .services-section .new-title-section {
        padding-left: 2em !important;
    }
}

/* --- ANIMATION BACKGROUND SECTION --- */
.sticky-animation-section {
    position: relative;
    z-index: 1;
    background-color: #F1F1F1; /* Fond gris clair de base */
    /* Gradient avec ligne orange qui monte, mais avec fondu sur les bords */
    background: linear-gradient(to top, 
        var(--orange-primary) 0%, 
        var(--orange-primary) 40%, 
        transparent 48%,
        transparent 100%
    );
    background-size: 100% 200%;
    background-position: 0% 67%; /* Moins visible de base */
    will-change: background-position;
}

/* État noir activé à 90% de l'animation de zoom (toggled via JS).
   Surcharge totale du gradient orange : tout devient noir. */
.sticky-animation-section.is-bg-black {
    background: #1D1D1C !important;
    background-image: none !important;
    background-color: #1D1D1C !important;
}

/* Le texte doit être au-dessus */
.sticky-animation__content {
    position: absolute; 
    z-index: 10;
}

.sticky-animation__content p {
    color: #1e1e1e; /* Noir de base */
}

/* L'image doit être derrière */
.animation-box {
    position: relative;
    z-index: 1;
}

/* =============================================
   RESPONSIVE — MOBILE (≤768px)
   ============================================= */
@media (max-width: 768px) {
    /* Anti-débordement horizontal (ex: .projets-background-image en right:-40px).
       On utilise overflow-x: clip (et NON hidden) : clip coupe le débordement
       latéral sans créer de conteneur de scroll, donc ScrollTrigger (pin de
       sticky-features) et Lenis continuent de fonctionner. `hidden` sur la
       racine cassait le pinType de ScrollTrigger → scroll vertical bloqué.
       (a-propos-new.css ne charge que sur manifeste → scope OK.) */
    html,
    body {
        overflow-x: clip;
    }

    .intro-hero-section {
        padding: 7em 1.25em 0;
        min-height: 40vh;
    }

    .intro-hero-section .new-hero-title {
        font-size: clamp(2.6rem, 10vw, 11rem) !important;
        text-align: left;
    }

    /* Sur mobile, les lignes peuvent wrap (plus de nowrap forcé sinon overflow) */
    .intro-hero-section .new-hero-title .line {
        white-space: normal;
        text-align: left;
    }

    .highlight-section {
        padding: 0 1.25em 2em 1.25em;
    }

    .about-paragraph {
        font-size: clamp(1rem, 4.5vw, 1.4rem);
        max-width: 100%;
    }

    .projets-background-image {
        width: 220px;
        right: -40px;
        top: 60px;
    }

    /* Le services-section sur la page Manifeste a un margin-top: -90vh (overlap)
       — sur mobile on réduit pour pas tout casser */
    .services-section {
        margin-top: -30vh;
        background: #1e1e1e !important;
        padding-top: 6.5em;
    }

    .services-body {
        margin-top: -3rem;
        padding-top: 5rem;
    }

    .new-hero-title.custom-services-title {
        font-size: clamp(2.6rem, 10vw, 11rem) !important;
        text-align: left;
        margin-bottom: 2rem;
    }

    .services-section .new-title-section {
        padding-left: 1.25em !important;
    }

    /* Section "Nos Valeurs" : passe en colonne unique full-width (comme la
       section "nos services" sur la home). */
    .manifeste-values-row {
        flex-direction: column;
        gap: 1.5em;
        margin-top: 0;
    }

    .manifeste-values-intro,
    .manifeste-values-grid {
        width: 100%;
        padding-right: 0;
        padding-top: 0;
    }

    .manifeste-values-grid {
        grid-template-columns: 1fr;
        gap: 1.5em;
    }
}