/* =============================================================================
   GreenForge — Page Notre histoire (Mission)
   Layout & contenu — tokens, cartes et reveals hérités de website_technologies.css
   ============================================================================= */

.gf-nh-page {
    background: var(--gf-tech-cream);
}

/* --- Hero (1024×422 layered — marches, coline, cercles, plante) --- */
.gf-nh-hero--layered {
    --gf-nh-ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --gf-nh-ease-pop: cubic-bezier(0.34, 1.45, 0.64, 1);
    --gf-nh-paper: #faf9f6;
    --gf-nh-gold: #c9a962;
    --font-display: "Cormorant Garamond", "EB Garamond", Garamond, Georgia, serif;
    --font-body: Inter, system-ui, -apple-system, sans-serif;
    width: 100%;
    aspect-ratio: 1024 / 422;
    position: relative;
    overflow: hidden;
    color: #fff;
    padding: 0;
    margin: 0;
    background: var(--gf-tech-green-deep);
    container-type: inline-size;
}

.gf-nh-hero--layered .o_we_shape {
    display: none;
}

.gf-nh-hero--layered .gf-nh-hero__stage {
    position: absolute;
    inset: 0;
    overflow: hidden;
    background:
        radial-gradient(circle at 82% 28%, rgba(91, 143, 90, 0.3) 0, transparent 30%),
        radial-gradient(circle at 16% 18%, rgba(218, 170, 81, 0.16) 0, transparent 24%),
        linear-gradient(145deg, #0f2e1e 0%, #143b27 46%, #0b281b 100%);
}

.gf-nh-hero--layered .gf-nh-hero__bg-photo {
    position: absolute;
    inset: -4%;
    z-index: 0;
    background-image: url("/greenforge_plants/static/src/img/notre-histoire/hero/nh-hero-bg.jpg");
    background-size: cover;
    background-position: center 58%;
    filter: blur(3px) saturate(0.95) brightness(0.74);
    transform: scale(1.035);
    opacity: 0.86;
    pointer-events: none;
    z-index: 2;
}

.gf-nh-hero--layered .gf-nh-hero__bg {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        linear-gradient(
            90deg,
            rgba(10, 36, 24, 0.88) 0%,
            rgba(13, 48, 31, 0.76) 36%,
            rgba(13, 48, 31, 0.36) 62%,
            rgba(10, 36, 24, 0.18) 100%
        ),
        radial-gradient(circle at 74% 32%, rgba(218, 170, 81, 0.14), transparent 28%),
        radial-gradient(circle at 50% 120%, rgba(250, 246, 234, 0.08), transparent 32%);
}

.gf-nh-hero--layered .gf-nh-hero__layers {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
}

.gf-nh-hero--layered .gf-nh-hero__layer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.gf-nh-hero--layered .gf-nh-hero__layer object,
.gf-nh-hero--layered .gf-nh-hero__layer img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: fill;
}

.gf-nh-hero--layered .gf-nh-hero__layer--flowers {
    inset: auto;
    inset: 0;
    opacity: 0.6;
    clip-path: inset(42% 0 23.7% 49%);
}

.gf-nh-hero--layered .gf-nh-hero__layer--flowers img {
    position: absolute;
    left: 49%;
    bottom: 22.2%;
    width: 51%;
    height: auto;
}

.gf-nh-hero--layered .gf-nh-hero__layer--plant {
    inset: auto;
    left: 57.7%;
    top: 19.5%;
    width: 21.3%;
    height: 74%;
}

.gf-nh-hero--layered .gf-nh-hero__layer--plant img {
    object-fit: contain;
    object-position: center bottom;
}

/* Copy — même layout que home hero (flex colonne + padding) */
.gf-nh-hero--layered .gf-nh-hero__copy {
    position: absolute;
    inset: 0 auto 0 0;
    z-index: 20;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: min(52%, 40rem);
    max-width: 40rem;
    padding: clamp(1.75rem, 5vw, 2.75rem) 1.25rem clamp(1.75rem, 5vw, 2.75rem) clamp(1rem, 3.8%, 3.75rem);
    color: var(--gf-nh-paper);
    pointer-events: none;
}

.gf-nh-hero--layered .gf-nh-hero__title {
    font-family: var(--font-display);
    font-size: clamp(2.05rem, 6.8vw, 3.35rem);
    font-weight: 500;
    line-height: 1.02;
    margin: 0 0 1.25rem;
    text-wrap: balance;
    opacity: 0;
    transform: translateY(1.25rem);
}

.gf-nh-hero--layered .gf-nh-hero__title-line {
    display: block;
}

.gf-nh-hero--layered .gf-nh-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    color: var(--gf-nh-gold);
    margin-bottom: 1rem;
    opacity: 0;
    transform: translateY(1.25rem);
}

.gf-nh-hero--layered .gf-nh-hero__eyebrow-line {
    display: inline-block;
    width: 1.75rem;
    height: 1px;
    background: currentColor;
}

.gf-nh-hero--layered .gf-nh-hero__eyebrow-text {
    font-family: var(--font-body);
    font-size: 0.6875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.gf-nh-hero--layered .gf-nh-hero__title-em {
    position: relative;
    font-style: italic;
    font-weight: 500;
    color: #fff;
    display: inline-block;
    text-shadow: 0 0 18px rgba(250, 246, 234, 0.2);
}

.gf-nh-hero--layered .gf-nh-hero__title-em::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -0.08em;
    height: 0.055em;
    border-radius: 2px;
    background: var(--gf-nh-gold);
    transform-origin: left;
    transform: scaleX(0);
}

.gf-nh-hero--layered .gf-nh-hero__subtitle {
    font-family: var(--font-body);
    font-size: clamp(0.9375rem, 1.5vw, 1.0625rem);
    font-weight: 400;
    line-height: 1.55;
    margin: 0 0 1.5rem;
    max-width: 32rem;
    color: rgba(250, 246, 234, 0.92);
    opacity: 0;
    transform: translateY(1.25rem);
}

.gf-nh-hero--layered .gf-nh-hero__subtitle b {
    color: var(--gf-nh-paper);
    font-weight: 500;
}

@media (min-width: 992px) {
    .gf-nh-hero--layered .gf-nh-hero__copy {
        padding: 3rem 2rem 3rem clamp(2rem, 5vw, 4.5rem);
    }
}

@media (max-width: 767px) {
    /* Hauteur pilotée par le contenu ; visuel épinglé en bande native en bas */
    .gf-nh-hero--layered {
        aspect-ratio: auto;
        height: auto;
        min-height: calc(100vw * 422 / 1024 + 12rem);
    }

    .gf-nh-hero--layered .gf-nh-hero__stage {
        position: relative;
        min-height: inherit;
    }

    .gf-nh-hero--layered .gf-nh-hero__layers {
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        height: calc(100vw * 422 / 1024);
    }

    .gf-nh-hero--layered .gf-nh-hero__copy {
        position: relative;
        inset: auto;
        width: 100%;
        max-width: none;
        padding: 2.35rem 1.1rem calc(100vw * 422 / 1024 + 1rem);
        justify-content: flex-start;
    }

    .gf-nh-hero--layered .gf-nh-hero__title {
        font-size: clamp(2.05rem, 12vw, 3.05rem);
        margin-bottom: 1.25rem;
    }

    .gf-nh-hero--layered .gf-nh-hero__subtitle {
        font-size: 0.95rem;
        margin-bottom: 1rem;
        max-width: 32rem;
    }
}

.gf-nh-hero--animate.gf-nh-hero--layered .gf-nh-hero__eyebrow,
.gf-nh-hero--animate.gf-nh-hero--layered .gf-nh-hero__title,
.gf-nh-hero--animate.gf-nh-hero--layered .gf-nh-hero__subtitle {
    opacity: 0;
    transform: translateY(1.25rem);
}

@keyframes gf-nh-text-rise {
    to { opacity: 1; transform: translateY(0); }
}

@keyframes gf-nh-underline-in {
    to { transform: scaleX(1); }
}

@keyframes gf-nh-muret-in {
    from { transform: translate3d(0, 10px, 0); opacity: 0; }
    to { transform: translate3d(0, 0, 0); opacity: 1; }
}

@keyframes gf-nh-landscape-in {
    from { transform: translate3d(0, 10px, 0); opacity: 0; }
    to { transform: translate3d(0, 0, 0); opacity: 1; }
}

@keyframes gf-nh-motifs-fade {
    from { opacity: 0; }
    to { opacity: 0.92; }
}

@keyframes gf-nh-rings-pulse {
    0%, 100% { transform: scale(1); opacity: 0.55; }
    50% { transform: scale(1.03); opacity: 0.85; }
}

@keyframes gf-nh-gold-drift {
    0%, 100% { transform: translate3d(0, 0, 0); opacity: 0.75; }
    50% { transform: translate3d(-4px, 2px, 0); opacity: 0.92; }
}

@keyframes gf-nh-plant-pop {
    0% { transform: scale(0.72) rotate(-4deg); opacity: 0; }
    65% { transform: scale(1.04) rotate(1deg); opacity: 1; }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

@keyframes gf-nh-plant-sway {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(calc(var(--sway-angle, 3deg) * -1)); }
    75% { transform: rotate(var(--sway-angle, 3deg)); }
}

@media (prefers-reduced-motion: no-preference) {
    .gf-nh-hero--animate.gf-nh-hero--layered .gf-layer--muret-in {
        animation: gf-nh-muret-in 0.85s var(--gf-nh-ease-out) both;
    }

    .gf-nh-hero--animate.gf-nh-hero--layered .gf-layer--landscape-in {
        animation: gf-nh-landscape-in 0.85s var(--gf-nh-ease-out) both;
    }

    .gf-nh-hero--animate.gf-nh-hero--layered .gf-layer--motifs-fade {
        animation: gf-nh-motifs-fade 1.1s var(--gf-nh-ease-out) both;
        animation-delay: 0.35s;
    }

    .gf-nh-hero--animate.gf-nh-hero--layered .gf-layer--rings-pulse {
        transform-origin: 68% 46%;
        animation: gf-nh-rings-pulse 5s ease-in-out infinite;
        animation-delay: 0.2s;
    }

    .gf-nh-hero--animate.gf-nh-hero--layered .gf-layer--plant-pop {
        transform-origin: var(--pivot-x, 50%) var(--pivot-y, 92%);
        animation:
            gf-nh-plant-pop 0.85s var(--gf-nh-ease-pop) both,
            gf-nh-plant-sway var(--sway-duration, 4.8s) ease-in-out infinite;
        animation-delay: var(--layer-delay, 0.15s), calc(var(--layer-delay, 0.15s) + 0.9s);
    }

    .gf-nh-hero--animate.gf-nh-hero--layered .gf-nh-hero__eyebrow {
        animation: gf-nh-text-rise 800ms var(--gf-nh-ease-out) both;
    }

    .gf-nh-hero--animate.gf-nh-hero--layered .gf-nh-hero__title {
        animation: gf-nh-text-rise 800ms var(--gf-nh-ease-out) both;
        animation-delay: 120ms;
    }

    .gf-nh-hero--animate.gf-nh-hero--layered .gf-nh-hero__subtitle {
        animation: gf-nh-text-rise 800ms var(--gf-nh-ease-out) both;
        animation-delay: 240ms;
    }

    .gf-nh-hero--animate.gf-nh-hero--layered .gf-nh-hero__title-em::after {
        animation: gf-nh-underline-in 0.85s var(--gf-nh-ease-out) 1.15s forwards;
    }
}

@media (prefers-reduced-motion: reduce) {
    .gf-nh-hero--layered .gf-nh-hero__eyebrow,
    .gf-nh-hero--layered .gf-nh-hero__title,
    .gf-nh-hero--layered .gf-nh-hero__subtitle {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
    }

    .gf-nh-hero--layered .gf-nh-hero__title-em::after {
        transform: scaleX(1);
    }
}

@media (max-width: 767px) {
    .gf-nh-hero--layered .gf-nh-hero__layer--plant {
        left: 48%;
        width: 38%;
        top: 8%;
    }

}

/* --- Cartes boxed (même pattern que page Qualité) --- */
.gf-nh-page .gf-tech-card--team,
.gf-nh-page .gf-tech-card--principles,
.gf-nh-page .gf-tech-card--newsletter {
    position: relative;
    overflow: visible;
    padding: 0;
    border: 1px solid rgba(34, 86, 39, 0.1);
    box-shadow: none;
    background: var(--gf-tech-cream);
}

.gf-nh-page .gf-tech-card--story {
    position: relative;
    overflow: hidden;
    padding: 0;
    border: 1px solid rgba(34, 86, 39, 0.1);
    box-shadow: none;
    background: var(--gf-tech-cream);
}

.gf-nh-page .gf-tech-card-body--story,
.gf-nh-page .gf-tech-card-body--team,
.gf-nh-page .gf-tech-card-body--principles,
.gf-nh-page .gf-tech-card-body--newsletter {
    position: relative;
    padding: 2rem 1.5rem 1.75rem;
}

@media (min-width: 992px) {
    .gf-nh-page .gf-tech-card-body--story,
    .gf-nh-page .gf-tech-card-body--team,
    .gf-nh-page .gf-tech-card-body--principles,
    .gf-nh-page .gf-tech-card-body--newsletter {
        padding: 2.5rem 2.5rem 2.25rem;
    }
}

@media (max-width: 767px) {
    .gf-nh-page .gf-tech-card--story,
    .gf-nh-page .gf-tech-card--team,
    .gf-nh-page .gf-tech-card--principles {
        overflow: hidden;
    }
}

.gf-nh-section--story {
    padding-top: 2rem;
    padding-bottom: 1.25rem;
}

.gf-nh-section--team {
    padding-top: 0.75rem;
    padding-bottom: 1.25rem;
}

.gf-nh-section--principles {
    padding-top: 0.75rem;
    padding-bottom: 1.25rem;
}

.gf-nh-section--newsletter {
    padding-top: 0.75rem;
    padding-bottom: 2.5rem;
}

.gf-nh-page .gf-tech-card--newsletter .gf-tech-badge {
    letter-spacing: 0.08em;
    font-size: 0.625rem;
    padding: 0.38rem 0.85rem;
}

.gf-nh-page .gf-tech-card--story .gf-tech-intro:last-of-type,
.gf-nh-page .gf-tech-card--team .gf-nh-team-header .gf-tech-intro:last-of-type {
    margin-bottom: 0;
}

/* Scale reveal — masonry & photo équipe (comme step-img Qualité) */
@media (prefers-reduced-motion: no-preference) {
    .gf-nh-page .gf-tech-reveal--scale .gf-nh-masonry__img {
        opacity: 0;
        transform: scale(0.92);
        transition:
            opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1),
            transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
        transition-delay: calc(var(--gf-reveal-delay, 0ms) + 120ms);
    }

    .gf-nh-page .gf-tech-reveal--scale.is-visible .gf-nh-masonry__img {
        opacity: 1;
        transform: scale(1);
    }
}

/* --- Section 1 — Story --- */
.gf-nh-story-grid {
    display: grid;
    gap: 2rem;
    position: relative;
    z-index: 1;
}

@media (min-width: 992px) {
    .gf-nh-story-grid {
        grid-template-columns: 1fr 1.05fr;
        align-items: start;
        gap: 2.5rem;
    }
}

.gf-nh-title-mobile {
    display: block;
}

.gf-nh-title-desktop {
    display: none;
}

@media (min-width: 992px) {
    .gf-nh-title-mobile {
        display: none;
    }

    .gf-nh-title-desktop {
        display: block;
    }
}

.gf-nh-masonry {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto auto auto;
    gap: 0.75rem;
}

.gf-nh-masonry__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0.75rem;
    display: block;
    border: 1px solid rgba(34, 86, 39, 0.08);
}

.gf-nh-masonry__img--serre {
    grid-column: 1;
    grid-row: 1 / span 2;
    min-height: 140px;
}

.gf-nh-masonry__img--equipe {
    grid-column: 2;
    grid-row: 1;
    min-height: 100px;
}

.gf-nh-masonry__img--pousses {
    grid-column: 1;
    grid-row: 3;
}

.gf-nh-masonry__img--marche {
    grid-column: 2;
    grid-row: 2;
}

.gf-nh-masonry__img--motte {
    grid-column: 2;
    grid-row: 3;
}

@media (min-width: 992px) {
    .gf-nh-masonry {
        grid-template-columns: 1fr 1.2fr 0.9fr;
        grid-template-rows: 1fr 1fr;
        min-height: 340px;
    }

    .gf-nh-masonry__img--serre {
        grid-column: 1;
        grid-row: 1 / span 2;
    }

    .gf-nh-masonry__img--equipe {
        grid-column: 2 / span 2;
        grid-row: 1;
    }

    .gf-nh-masonry__img--pousses {
        grid-column: 2;
        grid-row: 2;
    }

    .gf-nh-masonry__img--marche {
        grid-column: 3;
        grid-row: 2;
    }

    .gf-nh-masonry__img--motte {
        display: none;
    }
}

@media (max-width: 991.98px) {
    .gf-nh-masonry {
        grid-template-rows: auto auto;
    }

    .gf-nh-masonry__img--marche,
    .gf-nh-masonry__img--motte {
        display: none;
    }

    .gf-nh-masonry__img--pousses {
        grid-column: 2;
        grid-row: 2;
    }
}

/* --- Section 2 — Team --- */
.gf-nh-team-header {
    max-width: 42rem;
    margin: 0 auto 2rem;
    position: relative;
    z-index: 1;
}

.gf-nh-team-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

@media (min-width: 768px) {
    .gf-nh-team-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.25rem;
    }
}

.gf-nh-team-card {
    background: #fff;
    border-radius: 0.75rem;
    padding: 0.75rem;
    text-align: center;
    border: 1px solid rgba(34, 86, 39, 0.1);
    box-shadow: none;
}

.gf-nh-team-card__photo {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
}

.gf-nh-team-card__name {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--gf-tech-green);
    margin: 0 0 0.35rem;
}

.gf-nh-team-card__role {
    font-size: 0.8rem;
    color: var(--gf-tech-orange);
    margin: 0;
    line-height: 1.4;
}

/* --- Section 3 — Principles --- */
.gf-nh-principles-header {
    position: relative;
    z-index: 1;
    margin-bottom: 2rem;
}

.gf-nh-principles-grid {
    display: grid;
    gap: 1rem;
    position: relative;
    z-index: 1;
}

@media (min-width: 768px) {
    .gf-nh-principles-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }
}

.gf-nh-principle-card {
    position: relative;
    z-index: 1;
    background: #fff;
    border-radius: 0.75rem;
    padding: 1.25rem 1.15rem;
    border: 1px solid rgba(34, 86, 39, 0.1);
    box-shadow: none;
}

.gf-nh-principle-card__icon {
    display: block;
    width: 56px;
    height: 56px;
    margin-bottom: 1rem;
    border-radius: 0.5rem;
    object-fit: contain;
}

.gf-nh-principle-card__title {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gf-tech-green);
    margin: 0 0 0.75rem;
}

.gf-nh-principle-card__text {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--gf-tech-text-muted);
    margin: 0;
}

/* --- Section 4 — Newsletter --- */
.gf-nh-newsletter {
    display: grid;
    gap: 1.5rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

@media (min-width: 768px) {
    .gf-nh-newsletter {
        grid-template-columns: 1.05fr 0.95fr;
        gap: 2rem;
    }
}

.gf-nh-newsletter__lead {
    margin-bottom: 0;
    max-width: 34rem;
}

.gf-nh-newsletter__fields {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

@media (min-width: 520px) {
    .gf-nh-newsletter__fields {
        flex-direction: row;
        align-items: stretch;
    }
}

.gf-nh-newsletter__input {
    flex: 1;
    min-width: 0;
    border: 1px solid rgba(34, 86, 39, 0.16);
    border-radius: 0.5rem;
    padding: 0.85rem 1rem;
    font-size: 0.95rem;
    background: #fff;
    color: var(--gf-tech-text);
    box-shadow: none;
}

.gf-nh-newsletter__input::placeholder {
    color: #8a968a;
}

.gf-nh-newsletter__input:focus {
    border-color: rgba(34, 86, 39, 0.35);
    box-shadow: 0 0 0 0.15rem rgba(34, 86, 39, 0.12);
    background: #fff;
}

.gf-nh-newsletter__input.is-invalid {
    border-color: #c0392b;
}

.gf-nh-newsletter__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 0.5rem;
    padding: 0.85rem 1.25rem;
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none;
    background: var(--gf-tech-green);
    color: #fff;
    white-space: nowrap;
}

.gf-nh-newsletter__btn:hover,
.gf-nh-newsletter__btn:focus {
    background: #1a4520;
    color: #fff;
}

.gf-nh-newsletter__btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.gf-nh-newsletter__legal {
    margin: 0.65rem 0 0;
    font-size: 0.72rem;
    line-height: 1.45;
    color: var(--gf-tech-text-muted);
}

.gf-nh-newsletter__thanks {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--gf-tech-green);
    font-weight: 600;
}

.gf-nh-newsletter__form.o_has_error .gf-nh-newsletter__input {
    border-color: #c0392b;
}

@media (prefers-reduced-motion: reduce) {
    .gf-nh-hero--layered .gf-nh-hero__layer {
        animation: none !important;
        opacity: 1;
        transform: none;
    }
}
