/* =========================
   GSAP INIT - HOME
========================= */

.home-hero h1,
.home-hero p,
.home-hero__audiences,
.home-hero__audience-separator,
.home-about__content,
.home-about__image,
.home-metiers__card,
.home-realisations__item,
.home-realisations__actions .site-cta {
    opacity: 0;
}

/* =========================
   HOME HERO
========================= */

.home-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;
}

.home-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);
}

.home-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;
}

.home-hero__content {
    position: relative;
    text-align: center;
    color: var(--color-text-hero);
    max-width: 1000px;
    padding: 0 clamp(20px, 5vw, 40px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(34px, 4vw, 56px);
    z-index: 2;
}

.home-hero h1 {
    font-size: var(--font-size-hero-title);
    font-weight: var(--font-weight-title);
    letter-spacing: 0.02em;
    margin: 0;
}

.home-hero p {
    font-size: var(--font-size-hero-text);
    font-weight: var(--font-weight-cta);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin: 0;
}

.home-hero h1,
.home-hero p {
    text-shadow: 0 3px 14px rgba(0, 0, 0, 0.55);
}

.home-hero__media {
    position: absolute;
    inset: 0;
    z-index: 0;
}

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

/* =========================
   HOME HERO SVG AUDIENCES
========================= */

.home-hero__audiences {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: clamp(16px, 2vw, 30px);
    flex-wrap: nowrap;
    width: min(100%, 1100px);
}

.home-hero__audience {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
}

.home-hero__word {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(2px, 0.22vw, 4px);
}

.home-hero__letter {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.home-hero__letter svg {
    display: block;
    width: auto;
    height: clamp(16px, 1.7vw, 26px);
    overflow: visible;
}

.home-hero__letter path {
    fill: transparent;
    stroke: var(--color-text-hero);
    stroke-width: 1.15;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill-rule: evenodd;
    clip-rule: evenodd;
}

.home-hero__audience-separator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    font-size: clamp(18px, 2.1vw, 34px);
    line-height: 1;
    color: var(--color-text-hero);
    transform-origin: center center;
    will-change: transform, opacity;
}

/* =========================
   HOME ABOUT
========================= */

.home-about {
    position: relative;
    padding: clamp(90px, 9vw, 150px) clamp(24px, 6vw, 80px);
    overflow-x: clip;
}

.home-about__inner {
    width: min(1400px, 100%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    align-items: center;
    gap: clamp(60px, 7vw, 110px);
}

.home-about__content {
    text-align: center;
}

.home-about__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;
    color: var(--color-eyebrow);
}

.home-about 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);
}

.home-about__text {
    max-width: 620px;
    margin: 0 auto;
}

.home-about__text p {
    margin: 0 0 18px;
    font-size: var(--font-size-section-text);
    line-height: 1.85;
    color: var(--color-text);
}

.home-about__visuals {
    position: relative;
    min-height: clamp(360px, 33vw, 520px);
    perspective: 1200px;
}

.home-about__image {
    position: absolute;
    display: block;
    object-fit: cover;
    filter: contrast(1.04) saturate(1.04);
    will-change: transform, opacity;
    backface-visibility: hidden;
    transform: translateZ(0);
    transition: none;
}

.home-about__visuals.is-animated .home-about__image {
    box-shadow:
            0 30px 80px rgba(0, 0, 0, 0.16),
            0 10px 24px rgba(0, 0, 0, 0.08),
            0 0 0 1px rgba(255, 255, 255, 0.55) inset;

    transition:
            transform 0.55s cubic-bezier(0.16, 1, 0.3, 1),
            box-shadow 0.55s cubic-bezier(0.16, 1, 0.3, 1),
            filter 0.55s ease;
}

.home-about__visuals.is-animated:hover .home-about__image--main {
    transform: translate3d(-6px, -8px, 0) scale(1.025);
    box-shadow:
            0 40px 100px rgba(0, 0, 0, 0.20),
            0 16px 34px rgba(0, 0, 0, 0.10),
            0 0 0 1px rgba(255, 255, 255, 0.65) inset;
}

.home-about__visuals.is-animated:hover .home-about__image--secondary {
    transform: translate3d(8px, 8px, 0) scale(1.025);
    box-shadow:
            0 40px 100px rgba(0, 0, 0, 0.20),
            0 16px 34px rgba(0, 0, 0, 0.10),
            0 0 0 1px rgba(255, 255, 255, 0.65) inset;
}

.home-about__image--main {
    top: 0;
    left: 0;
    width: 60%;
    aspect-ratio: 4 / 3;
}

.home-about__image--secondary {
    right: 0;
    bottom: 0;
    width: 60%;
    aspect-ratio: 4 / 3;
}

/* =========================
   HOME MÉTIERS
========================= */

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

.home-metiers__inner {
    width: min(1180px, 100%);
    margin: 0 auto;
}

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

.home-metiers__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;
    color: var(--color-eyebrow);
}

.home-metiers h2 {
    margin: 0 0 clamp(22px, 2vw, 30px);
    font-size: var(--font-size-section-title);
    font-weight: var(--font-weight-title);
    letter-spacing: 0.02em;
    color: var(--color-title);
}

.home-metiers__heading p {
    margin: 0;
    font-size: var(--font-size-section-text);
    line-height: 1.85;
    color: var(--color-text);
    font-weight: var(--font-weight-text);
}

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

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


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

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

.home-metiers__card:has(.site-cta:hover) .home-metiers__image {
    transform: scale(1.06);
}

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

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

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

/* =========================
   HOME RÉALISATIONS
========================= */

.home-realisations {
    position: relative;
    padding: clamp(90px, 9vw, 150px) clamp(24px, 6vw, 80px);
}

.home-realisations__inner {
    width: min(1180px, 100%);
    margin: 0 auto;
}

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

.home-realisations__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;
    color: var(--color-eyebrow);
}

.home-realisations h2 {
    margin: 0 0 clamp(22px, 2vw, 30px);
    font-size: var(--font-size-section-title);
    font-weight: var(--font-weight-title);
    letter-spacing: 0.02em;
    color: var(--color-title);
}

.home-realisations__heading p {
    margin: 0;
    font-size: var(--font-size-section-text);
    line-height: 1.85;
    color: var(--color-text);
    font-weight: var(--font-weight-text);
}

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

.home-realisations__item {
    position: relative;
    overflow: hidden;
    height: clamp(360px, 32vw, 520px);
    transition: transform 0.35s ease;
}

.home-realisations__item:nth-child(2) {
    height: clamp(300px, 27vw, 440px);
}

.home-realisations__item:hover {
    transform: translateY(-6px);
}

.home-realisations__link {
    display: block;
    position: relative;
    height: 100%;
}

.home-realisations__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.home-realisations__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 20px;
    text-align: center;
    color: var(--color-white);
    background: rgba(0, 0, 0, 0.35);
    transition: background 0.3s ease;
}

.home-realisations__overlay h3 {
    margin: 0;
    font-size: var(--font-size-overlay-title);
    font-weight: var(--font-weight-title);
}

.home-realisations__overlay span {
    font-size: var(--font-size-cta);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.home-realisations.is-animated .home-realisations__link:hover .home-realisations__image {
    transform: scale(1.08);
}

.home-realisations__link:hover .home-realisations__overlay {
    background: rgba(0, 0, 0, 0.55);
}

.home-realisations__actions {
    margin-top: clamp(40px, 4vw, 60px);
    text-align: center;
}

.site-cta--block {
    margin-top: auto;
}

/* =========================
   HOME RESPONSIVE
========================= */
/*
   Tablette / mobile
   - HOME ABOUT : passe la section en une seule colonne
   - HOME ABOUT : garde le texte avant les images
   - HOME MÉTIERS : passe les 3 cartes en une seule colonne
   - HOME RÉALISATIONS : passe les 3 réalisations en une seule colonne
*/
@media (max-width: 900px) {

    .home-hero__audiences {
        gap: 18px;
    }

    .home-hero__word {
        gap: 2.5px;
    }

    .home-hero__letter svg {
        height: 18px;
    }

    .home-about__inner {
        grid-template-columns: 1fr;
        gap: clamp(44px, 7vw, 70px);
        max-width: 720px;
    }

    .home-about__content {
        order: 1;
    }

    .home-about__visuals {
        order: 2;
        min-height: clamp(300px, 58vw, 460px);
    }

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

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

    .home-realisations__item,
    .home-realisations__item:nth-child(2) {
        height: clamp(300px, 62vw, 440px);
    }
}

/*
   Mobile
   - HOME HERO : compense la hauteur du header mobile
   - HOME HERO : réduit l’espacement et l’interlettrage
   - HOME ABOUT : réduit les marges internes
   - HOME ABOUT : empile les deux images au lieu de les superposer
   - HOME RÉALISATIONS : ajuste les espacements et le format des images
*/
@media (max-width: 640px) {

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

    .home-hero__content {
        gap: 24px;
    }

    .home-hero p {
        letter-spacing: 0.08em;
        line-height: 1.35;
    }

    .home-hero__audiences {
        flex-direction: column;
        gap: 12px;
    }

    .home-hero__word {
        gap: 3px;
    }

    .home-hero__letter svg {
        height: 16px;
    }

    .home-hero__audience-separator {
        font-size: 18px;
    }

    .home-about {
        padding: clamp(70px, 14vw, 95px) clamp(20px, 6vw, 28px);
    }

    .home-about__inner {
        gap: 40px;
    }

    .home-about__visuals {
        display: grid;
        gap: 18px;
        min-height: auto;
    }

    .home-about__image {
        position: relative;
        width: 100%;
        aspect-ratio: 4 / 3;
    }

    .home-about__image--main,
    .home-about__image--secondary {
        inset: auto;
        width: 100%;
    }

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

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

    .home-realisations__grid {
        gap: 18px;
    }

    .home-realisations__item,
    .home-realisations__item:nth-child(2) {
        height: auto;
        aspect-ratio: 4 / 5;
    }

    .home-realisations__item:hover {
        transform: none;
    }
}

/*
   Mobile paysage / écrans bas
   - HOME HERO : utilise presque toute la hauteur disponible
   - HOME HERO : évite de voir trop tôt la section suivante
   - HOME HERO : réduit la bande blanche basse
*/
@media (max-height: 500px) and (orientation: landscape) {

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

    .home-hero__content {
        gap: 18px;
    }
}