/* ======= About page ======= */

.about-legacy {
    --legacy-progress: 0;
    position: relative;
    background-color: #f5f3f0;
    background-image:
        linear-gradient(to bottom, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.78) 30%, rgba(255, 255, 255, 0.72) 100%),
        linear-gradient(rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.42)),
        url('../img/import/paysagereel3.png');
    background-size: cover, cover, cover;
    background-position: center top, center top, center top;
    background-repeat: no-repeat;
    background-attachment: scroll, scroll, fixed;
    overflow: clip;
    margin-top: clamp(1.5rem, 4vw, 3rem);
    padding: clamp(2rem, 4vw, 3rem) 0 0;
}

.about-legacy__head {
    text-align: center;
    margin-bottom: clamp(1.25rem, 3vw, 2.5rem);
}

.about-legacy__head h5 {
    margin-bottom: 0.35rem;
}

.about-legacy__head h2 {
    font-family: 'Gilda Display', serif;
    font-size: clamp(1.65rem, 3.4vw, 2.6rem);
    margin: 0 0 0.65rem;
    color: #222;
}

.about-legacy__head p {
    margin: 0 auto;
    max-width: 58ch;
    color: #666;
    line-height: 1.65;
}

.about-legacy__scroll {
    position: relative;
    height: 270vh;
}

.about-legacy__sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(340px, 42vw) minmax(220px, 1fr);
    align-items: center;
    gap: clamp(1rem, 2vw, 1.8rem);
    padding: clamp(1rem, 2vw, 1.5rem) clamp(1rem, 4vw, 4rem);
    overflow: hidden;
}

.about-legacy__copy {
    font-family: 'Gilda Display', serif;
    color: #262626;
    z-index: 1;
    line-height: 1.35;
    max-width: 22ch;
    opacity: calc(1 - (var(--legacy-progress) * 1.75));
    transition: opacity 0.2s linear;
}

.about-legacy__copy h3 {
    font-size: clamp(1.35rem, 2.4vw, 2rem);
    line-height: 1;
    margin: 0 0 0.65rem;
}

.about-legacy__copy--left h1 {
    font-family: 'Gilda Display', serif;
    font-size: clamp(4.8rem, 10vw, 8.5rem);
    line-height: 0.9;
    letter-spacing: -0.15em;
    margin: 0 0 0.35rem;
    color: #000;
}

.about-legacy__copy p {
    font-family: 'Barlow', sans-serif;
    font-size: clamp(15px, 1.25vw, 19px);
    line-height: 1.65;
    margin: 0;
    color: #000;
}

.about-legacy__copy--left {
    justify-self: center;
    text-align: left;
    margin-right: clamp(0.35rem, 1.6vw, 1.2rem);
    transform: translateY(calc(-80px + (var(--legacy-progress) * 70px)));
    font-style: italic;
}

.about-legacy__copy--right {
    justify-self: center;
    text-align: right;
    margin-left: clamp(0.35rem, 1.6vw, 1.2rem);
    transform: translateY(calc(80px + (var(--legacy-progress) * -70px)));
}

.about-legacy__copy--right p {
    font-size: clamp(16px, 1.05vw, 16px);
    font-weight: 500;
    line-height: 1.55;
}

.about-legacy__media {
    margin: 0;
    width: calc(clamp(320px, 38vw, 560px) + (100vw - clamp(320px, 38vw, 560px)) * var(--legacy-progress));
    max-width: 100vw;
    height: 100vh;
    max-height: 100vh;
    border-radius: 32px;
    overflow: hidden;
    justify-self: center;
    z-index: 0;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.2);
    transition: border-radius 0.2s linear;
    border-radius: calc(32px * (1 - var(--legacy-progress)));
}

.about-legacy.about-legacy--cover .about-legacy__media {
    z-index: 3;
}

.about-stats {
    background: rgba(255, 255, 255, 0.84);
    backdrop-filter: blur(2px);
}

.about-stats__intro {
    margin-bottom: 2.5rem;
}

.about-stats__title {
    font-family: 'Gilda Display', serif;
    font-size: clamp(1.6rem, 2.8vw, 2.5rem);
    line-height: 1.08;
    margin: 0;
    color: #191919;
    max-width: 16ch;
}

.about-stats__lead {
    margin: 0;
    max-width: 62ch;
    font-size: clamp(14px, 1.18vw, 18px);
    line-height: 1.75;
    color: #2f2f2f;
}

.about-stats__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.about-stats__item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1.15rem 1.1rem;
}

.about-stats__item:nth-child(2) {
    border-left: 1px solid rgba(34, 34, 34, 0.14);
    border-right: 1px solid rgba(34, 34, 34, 0.14);
}

.about-stats__icon {
    width: 2.6rem;
    height: 2.6rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid rgba(170, 132, 83, 0.48);
    color: #aa8453;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.about-stats__content h3 {
    margin: 0 0 0.1rem;
    font-family: 'Gilda Display', serif;
    font-size: clamp(1.9rem, 3vw, 3.05rem);
    line-height: 1;
    color: #1c1c1c;
}

.about-stats__content p {
    margin: 0;
    font-size: clamp(12px, 0.95vw, 16px);
    line-height: 1.45;
    color: #3f3f3f;
}

.about-legacy__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (max-width: 991px) {
    .about-legacy {
        /* iOS/Safari gère mal fixed backgrounds */
        background-attachment: scroll, scroll, scroll;
    }

    .about-legacy__scroll {
        height: auto;
    }

    .about-legacy__sticky {
        position: relative;
        top: auto;
        height: auto;
        display: block;
        padding: 0 1rem 2rem;
    }

    .about-legacy__copy {
        max-width: none;
        opacity: 1;
        text-align: left;
        transform: none;
        margin: 1rem 0;
    }

    .about-legacy__media {
        width: min(100%, 480px);
        height: auto;
        max-height: none;
        margin: 1rem auto;
        border-radius: 20px;
    }

    .about-stats__intro {
        margin-bottom: 1.8rem;
    }

    .about-stats__title {
        max-width: none;
        margin-bottom: 0.75rem;
    }

    .about-stats__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .about-stats__item {
        border: 0;
    }

    .about-stats__item:last-child {
        grid-column: 1 / -1;
    }

    .about-stats__item:nth-child(2) {
        border-left: 1px solid rgba(34, 34, 34, 0.14);
        border-right: 1px solid rgba(34, 34, 34, 0.14);
    }
}

@media (prefers-reduced-motion: reduce) {
    .about-legacy__copy,
    .about-legacy__copy--left,
    .about-legacy__copy--right {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .about-legacy__media {
        transition: none;
    }
}

/* ======= CEO profile section ======= */
.about-ceo {
    --ceo-progress: 0;
    position: relative;
    overflow: visible;
    min-height: 185vh;
    padding: 0;
    background: #fff;
}

.about-ceo__pin {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
}

.about-ceo__pin::before {
    content: "";
    position: absolute;
    inset: -8%;
    background-image: url('../img/import/paysagereel1.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transform: scale(calc(1 + (var(--ceo-progress) * 0.18)));
    transform-origin: center;
    will-change: transform;
    z-index: 0;
}

.about-ceo__pin::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to bottom, #fff 0%, rgba(255, 255, 255, 0.75) 18%, rgba(255, 255, 255, 0.72) 82%, #fff 100%),
        linear-gradient(rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.25));
    z-index: 1;
}

.about-ceo .container {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-top: clamp(2rem, 6vw, 4rem);
    padding-bottom: 0;
}

.about-ceo__row {
    min-height: min(78vh, 760px);
    align-items: flex-end !important;
}

.about-ceo__quote-col {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    align-self: center;
    padding-right: clamp(0.5rem, 3vw, 3.2rem);
}

.about-ceo__quote {
    padding: 0;
    border: 0;
    background: transparent;
    margin: 0 0 1.2rem;
    font-weight: 500;
    font-family: 'Gilda Display', serif;
    font-size: clamp(1.35rem, 2.4vw, 2.05rem);
    line-height: 1.35;
    color: #5f492e;
    max-width: 24ch;
}

.about-ceo__signature {
    margin: 0;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: clamp(1rem, 1.4vw, 1.25rem);
    letter-spacing: 0.06em;
    color: #6c5537;
    text-transform: uppercase;
    text-align:right;
}

.about-ceo__media-col {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    height: 100%;
}

.about-ceo__portrait {
    margin: 0;
    width: clamp(320px, 36vw, 620px);
    aspect-ratio: 3 / 4;
    border-radius: 0;
    position: relative;
    overflow: hidden;
    border: 0;
    background: transparent;
    backdrop-filter: none;
}

.about-ceo__portrait::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: clamp(80px, 20%, 160px);
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, #fff 100%);
    pointer-events: none;
}

.about-ceo__portrait img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center bottom;
    display: block;
}

@media (max-width: 991px) {
    .about-ceo {
        min-height: auto;
        padding: 2.5rem 0 0;
    }

    .about-ceo__pin {
        position: relative;
        top: auto;
        height: auto;
        overflow: hidden;
    }

    .about-ceo__pin::before {
        inset: 0;
        transform: none;
    }

    .about-ceo .container {
        height: auto;
        display: block;
        padding-top: 0;
    }

    .about-ceo__row {
        min-height: auto;
    }

    .about-ceo__quote-col {
        padding-right: 0.75rem;
        margin-bottom: 1.5rem;
    }

    .about-ceo__quote {
        max-width: none;
    }

    .about-ceo__portrait {
        width: min(92vw, 360px);
        border-radius: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .about-ceo__pin::before {
        transform: none;
    }
}

/* ======= Journey timeline carousel ======= */
.about-journey {
    background: #fff;
    padding-top: clamp(2.5rem, 5vw, 4rem);
}

.about-journey__head {
    margin-bottom: 1.4rem;
}

.about-journey__eyebrow {
    margin: 0 0 0.2rem;
    font-family: 'Barlow Condensed', sans-serif;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #666;
    font-size: 12px;
}

.about-journey__title {
    margin: 0;
    font-family: 'Gilda Display', serif;
    font-size: clamp(1.7rem, 3.4vw, 3.2rem);
    line-height: 1.08;
    color: #151515;
}

.about-journey__carousel {
    position: relative;
    padding-bottom: 3.25rem;
    width: 100vw;
    margin-left: calc(50% - 50vw);
}

.about-journey__viewport {
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    padding: 0;
}

.about-journey__viewport::-webkit-scrollbar {
    display: none;
}

.about-journey__track {
    display: flex;
    gap: 0;
    min-height: 430px;
    width: 100%;
}

.about-journey__item {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    min-height: 430px;
    background: var(--journey-image, url('../img/import/paysage1.webp')) center / cover no-repeat;
    transition: flex 1.1s cubic-bezier(0.22, 1, 0.36, 1), filter 0.8s ease;
    filter: grayscale(1) brightness(1.08) contrast(0.86) saturate(0.6);
    overflow: hidden;
    cursor: pointer;
    border-right: 1px solid rgba(20, 20, 20, 0.14);
}

.about-journey__item.is-active {
    flex: 2.2 1 0;
    filter: grayscale(0) brightness(1) contrast(1) saturate(1);
}

.about-journey__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.42) 0%, rgba(255, 255, 255, 0.8) 100%);
    transition: opacity 0.6s ease;
    opacity: 1;
}

.about-journey__item.is-active .about-journey__overlay {
    opacity: 1;
    background: linear-gradient(to bottom, rgba(15, 15, 15, 0.56) 0%, rgba(15, 15, 15, 0.6) 100%);
}

.about-journey__content {
    position: absolute;
    inset: 0;
    color: #fff;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1rem;
}

.about-journey__year {
    margin: 0;
    font-family: 'Gilda Display', serif;
    font-size: clamp(2rem, 2.8vw, 2.6rem);
    line-height: 1;
    color: #111;
    font-weight: 500;
    opacity: 1;
    transform: translateY(0);
    transition: color 0.45s ease, transform 1.2s ease;
}

.about-journey__content h3 {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transform: translateY(26px);
    transition:
        opacity 1.2s cubic-bezier(0.22, 1, 0.36, 1),
        transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: 0s;
    margin: 0;
    color: #fff;
    visibility: hidden;
}

.about-journey__content > p:last-child {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transform: translateY(26px);
    transition:
        opacity 1.2s cubic-bezier(0.22, 1, 0.36, 1),
        transform 1.2s cubic-bezier(0.22, 1, 0.36, 1),
        max-height 1.2s cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: 0s;
    margin: 0;
    color: #fff;
    visibility: hidden;
}

.about-journey__item.is-active .about-journey__content h3,
.about-journey__item.is-active .about-journey__content > p:last-child {
    opacity: 1;
    max-height: 240px;
    transform: translateY(0);
    transition-delay: 0.8s;
    visibility: visible;
}

.about-journey__item.is-active .about-journey__content {
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    text-align: left;
    padding: 0 1.2rem;
}

.about-journey__item.is-active .about-journey__year {
    opacity: 0;
    color: #fff;
    transform: translateY(0);
}

.about-journey__content h3 {
    margin-top: 0.45rem;
    font-family: 'Gilda Display', serif;
    font-size: clamp(1.25rem, 2vw, 2rem);
}

.about-journey__content h3::before {
    content: "";
}

.about-journey__item.is-active .about-journey__content h3::before {
    content: attr(data-year-active) " - ";
    font-family: 'Gilda Display', serif;
    font-size: 1.18em;
    color: #fff;
}

.about-journey__item.is-active .about-journey__content h3 {
    line-height: 1.2;
    font-size: clamp(1.25rem, 2vw, 2rem);;
}

.about-journey__content > p:last-child {
    margin-top: 0.45rem;
    font-size: clamp(14px, 1.02vw, 17px);
    line-height: 1.55;
    max-width: 36ch;
}

.about-journey__arrow {
    position: absolute;
    bottom: 0;
    width: 2.6rem;
    height: 2.6rem;
    border: 1px solid rgba(30, 30, 30, 0.4);
    border-radius: 50%;
    background: #fff;
    color: #1f1f1f;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, color 0.2s ease;
    z-index: 2;
}

.about-journey__arrow:hover {
    background: #1f1f1f;
    color: #fff;
}

.about-journey__arrow--prev {
    left: calc(50% - 3rem);
}

.about-journey__arrow--next {
    left: calc(50% + 0.4rem);
}

@media (max-width: 991px) {
    .about-journey__track {
        min-height: 360px;
        width: max-content;
    }

    .about-journey__item {
        flex: 0 0 50vw;
        width: 50vw;
        min-width: 50vw;
        min-height: 360px;
    }

    .about-journey__item.is-active {
        flex: 0 0 50vw;
        width: 50vw;
        min-width: 50vw;
    }
}
