/* =========================
   GSAP INIT - REALISATIONS
========================= */

.realisations-hero__eyebrow,
.realisations-hero h1,
.realisations-hero p,
.realisations-intro__heading,
.realisations-categories__card {
    opacity: 0;
}

/* =========================
   REALISATIONS HERO
========================= */

.realisations-hero {
    position: relative;
    width: 100%;
    min-height: calc(
            100svh - var(--top-bar-height) - var(--main-header-height) - var(--hero-bottom-white-band)
    );
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.realisations-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
            linear-gradient(
                    rgba(0, 0, 0, 0.50),
                    rgba(0, 0, 0, 0.34)
            );
    z-index: 1;
}

.realisations-hero::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(-1 * var(--hero-bottom-white-band));
    height: var(--hero-bottom-white-band);
    background: var(--color-white);
}

.realisations-hero__media {
    position: absolute;
    inset: 0;
}

.realisations-hero__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.realisations-hero__content {
    position: relative;
    max-width: 980px;
    padding: 0 clamp(24px, 6vw, 80px);
    text-align: center;
    color: var(--color-white);
    z-index: 2;
}

.realisations-hero__eyebrow,
.realisations-intro__eyebrow,
.realisations-categories__eyebrow,
.nos-realisations-grid__eyebrow,
.nos-realisations-grid__intro-eyebrow {
    display: block;
    margin-bottom: 14px;
    font-size: var(--font-size-section-eyebrow);
    font-weight: var(--font-weight-eyebrow);
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.realisations-hero__eyebrow {
    margin-bottom: 18px;
}

.realisations-intro__eyebrow,
.realisations-categories__eyebrow,
.nos-realisations-grid__eyebrow,
.nos-realisations-grid__intro-eyebrow {
    color: var(--color-eyebrow);
}

.realisations-hero h1 {
    margin: 0 0 clamp(24px, 3vw, 38px);
    font-size: var(--font-size-hero-title);
    font-weight: var(--font-weight-heading);
    letter-spacing: 0.02em;
    text-shadow: 0 3px 14px rgba(0, 0, 0, 0.55);
}

.realisations-hero p {
    max-width: 760px;
    margin: 0 auto;
    font-size: var(--font-size-hero-text);
    line-height: 1.75;
    text-shadow: 0 3px 14px rgba(0, 0, 0, 0.55);
}

/* =========================
   REALISATIONS INTRO
========================= */

.realisations-intro {
    position: relative;
    padding: clamp(90px, 9vw, 150px) 0;
    background: var(--color-white);
    overflow: hidden;
}

.realisations-intro__inner {
    width: 100%;
    margin: 0 auto;
}

.realisations-intro__heading {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 clamp(24px, 6vw, 80px);
    text-align: center;
}

.realisations-intro h2,
.realisations-categories h2,
.nos-realisations-grid h1,
.nos-realisations-grid__intro-content h2 {
    margin: 0 0 clamp(24px, 2.5vw, 36px);
    font-size: var(--font-size-section-title);
    font-weight: var(--font-weight-title);
    letter-spacing: 0.02em;
    color: var(--color-title);
}

.realisations-categories h2 {
    margin-bottom: clamp(22px, 2vw, 30px);
}

.nos-realisations-grid h1 {
    margin-bottom: 0;
}

.realisations-intro__heading p {
    margin: 0 auto;
    max-width: 760px;
    font-size: var(--font-size-section-text);
    font-weight: var(--font-weight-text);
    line-height: 1.85;
    color: var(--color-text);
}

.realisations-intro__marquee {
    width: 100%;
    margin-top: clamp(50px, 6vw, 90px);
    overflow: hidden;
}

.realisations-intro__track {
    display: flex;
    align-items: center;
    gap: clamp(28px, 4vw, 70px);
    width: max-content;
    animation: realisationsIntroMarquee 34s linear infinite;
    will-change: transform;
}

.realisations-intro__marquee:hover .realisations-intro__track {
    animation-play-state: paused;
}

.realisations-intro__track img {
    display: block;
    width: clamp(360px, 33vw, 680px);
    height: clamp(190px, 18vw, 340px);
    object-fit: cover;
}

@keyframes realisationsIntroMarquee {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

/* =========================
   REALISATIONS CATEGORIES
========================= */

.realisations-categories {
    position: relative;
    padding: clamp(90px, 9vw, 150px) clamp(24px, 6vw, 80px);
    background: var(--color-beige-brand);
}

.realisations-categories__inner,
.nos-realisations-grid__inner {
    width: min(1180px, 100%);
    margin: 0 auto;
}

.realisations-categories__heading,
.nos-realisations-grid__heading {
    max-width: 760px;
    margin: 0 auto clamp(52px, 5vw, 78px);
    text-align: center;
}

.nos-realisations-grid__heading {
    margin-bottom: clamp(50px, 5vw, 80px);
}

.realisations-categories__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(24px, 2.8vw, 42px);
    align-items: start;
}

.realisations-categories__card {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 520px;
    background: var(--color-white);
    overflow: hidden;
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.10);
}

.realisations-categories__card a {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.realisations-categories__image-wrap {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
}

.realisations-categories__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
    will-change: transform;
}

.realisations-categories__card:has(.site-cta:hover) .realisations-categories__image {
    transform: scale(1.06);
}

.realisations-categories__content {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    padding: clamp(26px, 2.4vw, 34px);
    text-align: center;
}

.realisations-categories__content h3 {
    margin: 0 0 16px;
    font-size: var(--font-size-card-title);
    font-weight: var(--font-weight-title);
    color: var(--color-title);
}

.realisations-categories__content p {
    margin: 0 0 24px;
    font-size: var(--font-size-section-text);
    font-weight: var(--font-weight-text);
    line-height: 1.65;
    color: var(--color-text);
}

.realisations-categories__content .site-cta {
    margin-top: auto;
}

/* =========================
   NOS REALISATIONS GRID PAGE
========================= */

.nos-realisations-grid {
    padding: clamp(100px, 10vw, 150px) clamp(24px, 6vw, 80px);
    background: var(--color-background-soft);
}

/* =========================
   NOS REALISATIONS GRID - BRAND INTRO
========================= */

.nos-realisations-grid__intro {
    display: grid;
    grid-template-columns: 0.34fr 0.66fr;
    gap: clamp(40px, 5vw, 76px);
    align-items: center;
    margin-bottom: clamp(70px, 7vw, 110px);
    padding: clamp(36px, 4vw, 56px);
    background: var(--color-white);
    border: 1px solid rgba(78, 80, 86, 0.12);
    box-shadow:
            0 20px 50px rgba(0, 0, 0, 0.07),
            0 6px 18px rgba(0, 0, 0, 0.04);
}

.nos-realisations-grid__intro-content {
    max-width: 720px;
}

.nos-realisations-grid__intro-content h3 {
    margin: clamp(28px, 3vw, 40px) 0 16px;
    font-size: var(--font-size-card-title-sm);
    font-weight: var(--font-weight-title);
    color: var(--color-title);
}

.nos-realisations-grid__intro-content p,
.nos-realisations-grid__intro-content li {
    font-size: var(--font-size-section-text);
    font-weight: var(--font-weight-text);
    line-height: 1.75;
    color: var(--color-text);
}

.nos-realisations-grid__intro-content p {
    margin: 0 0 16px;
}

.nos-realisations-grid__intro-content a {
    color: var(--color-title);
    font-weight: var(--font-weight-title);
    text-decoration: underline;
}

.nos-realisations-grid__intro-content ul {
    margin: 0;
    padding-left: 1.2em;
}

.nos-realisations-grid__intro--text-only {
    grid-template-columns: 1fr;
}

.nos-realisations-grid__intro--text-only .nos-realisations-grid__intro-content {
    max-width: 860px;
    margin: 0 auto;
}

/* =========================
   NOS REALISATIONS GRID - PROJECT GROUPS
========================= */

.nos-realisations-grid__group {
    margin-bottom: clamp(60px, 6vw, 100px);
    scroll-margin-top: clamp(96px, 10vw, 140px);
}

.nos-realisations-grid__project-title {
    margin: 0 0 24px;
    font-size: var(--font-size-card-title);
    font-weight: var(--font-weight-title);
    color: var(--color-title);
}

.nos-realisations-grid__project-note {
    margin: -14px 0 24px;
    color: var(--color-text-muted);
    font-size: var(--font-size-body-small);
    font-weight: var(--font-weight-medium);
}

.nos-realisations-grid__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(16px, 2vw, 24px);
}

.nos-realisations-grid__item {
    cursor: pointer;
    overflow: hidden;
}

.nos-realisations-grid__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.nos-realisations-grid__item:hover img {
    transform: scale(1.05);
}

/* =========================
   NOS REALISATIONS LIGHTBOX
========================= */

.nos-realisations-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.92);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.nos-realisations-lightbox.is-open {
    opacity: 1;
    pointer-events: auto;
}

.nos-realisations-lightbox__content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.nos-realisations-lightbox__image {
    width: 100%;
    height: auto;
}

.nos-realisations-lightbox__close {
    position: absolute;
    top: -40px;
    right: 0;
    font-size: 32px;
    color: var(--color-white);
    background: none;
    border: none;
    cursor: pointer;
}

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

/*
   Tablette / mobile
   - LANDING : adapte le bandeau défilant
   - CATEGORIES : passe les 3 cartes en une seule colonne
   - GRID PAGE : intro en colonne et grille en 2 colonnes
*/
@media (max-width: 900px) {

    .realisations-intro__track {
        gap: clamp(22px, 4vw, 42px);
        animation-duration: 30s;
    }

    .realisations-intro__track img {
        width: clamp(320px, 58vw, 520px);
        height: clamp(180px, 32vw, 280px);
    }

    .realisations-categories__grid {
        grid-template-columns: 1fr;
        max-width: 520px;
        margin: 0 auto;
    }

    .nos-realisations-grid__intro {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .nos-realisations-grid__intro-content {
        max-width: 100%;
    }

    .nos-realisations-grid__intro-content ul {
        display: inline-block;
        text-align: left;
    }

    .nos-realisations-grid__grid {
        grid-template-columns: 1fr 1fr;
    }
}

/*
   Mobile
   - HERO : compense la hauteur du header mobile
   - LANDING : réduit les marges internes et adapte le bandeau défilant
   - CATEGORIES : réduit les marges internes et les cartes
   - GRID PAGE : réduit les paddings et passe la grille en 1 colonne
*/
@media (max-width: 640px) {

    .realisations-hero {
        min-height: calc(100svh - 76px - var(--hero-bottom-white-band));
        background-size: cover;
        background-position: center;
    }

    .realisations-intro {
        padding: clamp(70px, 14vw, 95px) 0;
    }

    .realisations-intro__heading {
        padding: 0 clamp(20px, 6vw, 28px);
    }

    .realisations-intro__marquee {
        margin-top: clamp(44px, 10vw, 64px);
    }

    .realisations-intro__track {
        gap: 18px;
        animation-duration: 26s;
    }

    .realisations-intro__track img {
        width: clamp(260px, 78vw, 360px);
        height: clamp(160px, 48vw, 220px);
    }

    .realisations-categories,
    .nos-realisations-grid {
        padding: clamp(70px, 14vw, 95px) clamp(20px, 6vw, 28px);
    }

    .realisations-categories__heading {
        margin-bottom: clamp(36px, 9vw, 52px);
    }

    .realisations-categories__grid {
        gap: 18px;
    }

    .realisations-categories__card {
        min-height: auto;
    }

    .realisations-categories__image-wrap {
        height: clamp(190px, 56vw, 240px);
    }

    .nos-realisations-grid__intro {
        padding: clamp(28px, 8vw, 36px);
        margin-bottom: clamp(54px, 12vw, 76px);
    }

    .nos-realisations-grid__grid {
        grid-template-columns: 1fr;
    }
}

/*
   Mobile paysage / écrans bas
   - HERO : utilise presque toute la hauteur disponible
   - HERO : réduit la bande blanche basse
   - INTRO : compacte légèrement le bandeau défilant
*/
@media (max-height: 500px) and (orientation: landscape) {

    .realisations-hero {
        min-height: calc(100svh - var(--main-header-height));
    }

    .realisations-intro__track img {
        height: clamp(150px, 32vw, 210px);
    }
}
