/* Section Engagement */
.engagement-section-v2 {
    background-color: var(--light-background);
    color: var(--black);
    padding: 6em 9.6em 1em 9.6em;
    position: relative;
}

.engagement-section-v2 .new-title-section {
    margin-bottom: 4rem;
}

.engagement-body {
    display: grid;
    grid-template-columns: 50% 1fr;
    gap: 4em;
    align-items: center;
}

.engagement-image-column {
    width: 100%;
}

.engagement-text-column {
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    gap: 0em;
}

.engagement-intro-top {
    font-family: 'RMMono', monospace;
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--grey-text);
}

.engagement-label-container {
    display: flex;
    flex-direction: column;
    font-family: 'RMMono', monospace;
    font-size: 0.8rem;
    color: var(--grey-text);
    text-transform: uppercase;
    transform: translateY(1em);
}

.engagement-intro-main {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: -2.5rem;
}

.highlight-quote {
    font-family: "Times New Roman", serif;
    font-size: 4em;
    color: var(--orange-primary);
    line-height: 1;
    /* Opacity is controlled by GSAP */
}

.highlight-quote.start {
    display: block;
    width: 100%;
}

.highlight-quote.end {
    display: block;
    width: 100%;
    text-align: right;
    margin-top: 0.2em;
}

.engagement-paragraph {
    font-size: clamp(1.2rem, 2.5vw, 2rem);
    line-height: 1.4;
    font-weight: 400;
    color: var(--black);
    margin: 0;
    position: relative;
}

.engagement-paragraph .quote-text {
    display: block;
}

/* Ensure quote marks from HTML are visible before JS processes them */
.quote-mark-start, .quote-mark-end {
    font-family: "Georgia", "Times New Roman", serif; /* Georgia pour de beaux guillemets courbes */
    font-size: 1.5em;
    color: var(--orange-primary);
    line-height: 1;
    display: block;
    position: relative;
    width: 100%;
}

.quote-mark-start {
    text-align: left;
    transform: translateY(1.5em);
}

.quote-mark-end {
    text-align: right;
    transform: translateY(-0.25em);
}

.quote-mark-start::before {
    content: none;
}

span.quote-mark-start {
    margin-bottom: -15px;
    margin-left: -5px;
}

span.quote-mark-end {
    margin-top: -30px;
    margin-left: 6px;
}

.engagement-paragraph .author {
    display: block;
    margin-top: -8.5rem;
    font-weight: 400;
    font-size: clamp(1.2rem, 2.5vw, 2rem);
}

.engagement-image-container {
    width: 100%;
    position: relative;
    overflow: hidden;
    padding: 35px;
    box-sizing: border-box;
}

.engagement-image-container img {
    width: 100%;
    height: 600px;
    object-fit: cover;
    display: block;
}

/* Overlays pour l'image */
.engagement-color-overlay {
    position: absolute;
    top: 35px;
    left: 35px;
    width: calc(100% - 70px);
    height: calc(100% - 70px);
    background-color: var(--orange-primary);
    mix-blend-mode: multiply;
    opacity: 0.45;
    z-index: 2;
    pointer-events: none;
}

.engagement-noise-overlay {
    position: absolute;
    top: 35px;
    left: 35px;
    width: calc(100% - 70px);
    height: calc(100% - 70px);
    z-index: 3;
    opacity: 0.15;
    mix-blend-mode: overlay;
    pointer-events: none;
    overflow: hidden;
}

.engagement-noise-overlay::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    animation: grain 8s steps(10) infinite;
    background-image:
        repeating-conic-gradient(var(--black) 0%, transparent 0.00002%, transparent 0.00004%, var(--black) 0.00007%),
        repeating-conic-gradient(var(--black) 0%, transparent 0.00001%, transparent 0.0002%, var(--black) 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%); }
}

/* SVG Corners pour engagement-image-container */
.engagement-image-container .corner {
    position: absolute;
    width: 31px;
    height: 31px;
    color: var(--black);
    z-index: 15;
    opacity: 1;
}

.engagement-image-container .corner.first {
    top: 10px;
    left: 10px;
}

.engagement-image-container .corner.second {
    top: 10px;
    right: 10px;
}

.engagement-image-container .corner.third {
    bottom: 10px;
    left: 10px;
}

.engagement-image-container .corner.forth {
    bottom: 10px;
    right: 10px;
}

/* Interactive Grid Override for Engagement Section */
.engagement-image-container .interactive-grid-overlay {
    z-index: 25; /* Higher than logo (20) */
    top: 35px;
    left: 35px;
    width: calc(100% - 70px);
    height: calc(100% - 70px);
    box-sizing: border-box;
    border-radius: 0px;
}

/* Responsive */
@media (max-width: 768px) {
    .engagement-section-v2 {
        padding: 4em 1.25em 4em;
    }

    .engagement-section-v2 .new-title-section {
        margin-bottom: 2.5rem;
    }

    /* La section utilise display: grid → on passe en 1 colonne */
    .engagement-body {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .engagement-image-column,
    .engagement-text-column {
        width: 100%;
    }

    .engagement-text-column {
        max-width: 100%;
    }

    .engagement-image-container {
        padding: 18px;
    }

    .engagement-image-container img {
        height: 380px;
    }

    .engagement-color-overlay,
    .engagement-noise-overlay {
        top: 18px;
        left: 18px;
        width: calc(100% - 36px);
        height: calc(100% - 36px);
    }

    .engagement-image-container .interactive-grid-overlay {
        top: 18px;
        left: 18px;
        width: calc(100% - 36px);
        height: calc(100% - 36px);
    }

    .engagement-image-container .corner {
        width: 22px;
        height: 22px;
    }

    .highlight-quote {
        font-size: 2.75em;
    }

    /* Le author qui est en margin-top négatif géant casse en mobile */
    .engagement-paragraph .author {
        margin-top: -3rem;
    }

    /* Quote-marks ajustés en mobile uniquement (override des règles desktop
       lignes 114-122 qui visent les span génériques) */
    span.quote-mark-start {
        margin-bottom: 5px;
        margin-left: -1px;
        margin-top: 30px;
    }

    span.quote-mark-end {
        margin-top: -20px;
    }
}

/* =============================================
   PAGES PILIERS SEO UNIQUEMENT (page-stand-seo)
   Pas la home, pas les pages villes.
   ============================================= */
@media (min-width: 769px) {
    .page-stand-seo .engagement-section-v2 {
        padding-bottom: 9.6em;
    }
}
