/* ==========================================================================
   Page Histoire
   ========================================================================== */

/* --- Hero --- */
.histoire-hero {
    position: relative;
    height: 60vh;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-primary);
    background-size: cover;
    background-position: center;
}
.histoire-hero .hero-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0,0,0,0.45);
}
.histoire-hero .hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: #fff;
    padding: 0 20px;
}
.histoire-hero .hero-label {
    font-family: var(--font-body);
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.75);
    margin-bottom: 12px;
}
.histoire-hero .hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 400;
    font-style: italic;
    margin-bottom: 12px;
}
.histoire-hero .hero-subtitle {
    font-family: var(--font-body);
    font-size: clamp(1rem, 2vw, 1.4rem);
    opacity: 0.85;
}

/* --- Section 1 : Histoire (texte gauche / 2 photos droite) --- */
.histoire-section1 {
    background-image: url('../images/background-texture.jpg');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    overflow: hidden;
    padding-top: 80px;
    padding-bottom: 80px;
}
.histoire-section1__container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
}
.histoire-section1__text-col {
    padding: 100px 0;
    margin-left: 320px;
    margin-right: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 460px;
}
.histoire-section1__label {
    font-family: var(--font-body);
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-gold);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.histoire-section1__label::before {
    content: '';
    display: inline-block;
    width: 40px;
    height: 1px;
    background: var(--color-gold);
}
.histoire-section1__title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 3vw, 3rem);
    font-weight: 300;
    font-style: italic;
    color: var(--color-primary);
    margin-bottom: 32px;
    line-height: 1.2;
}
.histoire-section1__text p {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.8;
    color: var(--color-gray);
    margin-bottom: 16px;
}
.histoire-section1__photos {
    display: flex;
    gap: 8px;
    align-items: stretch;
    overflow: hidden;
    margin-right: 90px;
}
.histoire-section1__photos img {
    flex: 1;
    width: 0;
    min-width: 0;
    height: 100%;
    object-fit: cover;
    display: block;
}
.histoire-section1__photos img:first-child {
    flex: 612;
}
.histoire-section1__photos img:last-child {
    flex: 481;
}

/* --- Section 2 : Citation (image BG + overlay + texte centré) --- */
.histoire-section2 {
    position: relative;
    min-height: 55vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-primary);
    background-size: cover;
    background-position: center;
    padding: 80px 40px;
}
.histoire-section2__overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0,0,0,0.5);
}
.histoire-section2__content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 900px;
    color: #fff;
}
.histoire-section2__title {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 3.5vw, 3.2rem);
    font-weight: 300;
    font-style: italic;
    color: #fff;
    margin-bottom: 32px;
    line-height: 1.25;
}
.histoire-section2__text p {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.8;
    color: rgba(255,255,255,0.85);
    margin-bottom: 12px;
}

/* --- Section 3 : Slider --- */
.histoire-section3 {
    background-color: #fff;
    padding: 80px 0;
    overflow: hidden;
}
.histoire-slider {
    position: relative;
}
.histoire-slider__track-wrapper {
    overflow: hidden;
    padding: 0 40px;
}
.histoire-slider__track {
    display: flex;
    gap: 16px;
    transition: transform 0.4s ease;
}
.histoire-slider__slide {
    flex: 0 0 324px;
    min-width: 0;
}
.histoire-slider__slide img {
    width: 324px;
    height: 393px;
    object-fit: cover;
    display: block;
}
.histoire-slider__btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #fff;
    border: 1.5px solid #E0D8CF;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    transition: background 0.2s;
}
.histoire-slider__btn:hover {
    background: var(--color-cream);
}
.histoire-slider__btn:focus-visible {
    outline: 3px solid rgba(156, 120, 79, 0.5);
    outline-offset: 2px;
}
.histoire-slider__btn--prev { left: 8px; }
.histoire-slider__btn--next { right: 8px; }
.histoire-slider__btn svg {
    width: 18px;
    height: 18px;
    stroke: var(--color-primary);
    fill: none;
    stroke-width: 2;
}

/* --- Section 4 : Nature (masonry 5 photos gauche / texte droite) --- */
.histoire-section4 {
    background-color: #fff;
    padding: 100px 90px;
}
.histoire-section4__container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}
.histoire-section4__grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
}
.histoire-section4__grid img {
    width: 100%;
    object-fit: cover;
    display: block;
}
.histoire-section4__grid img:nth-child(1),
.histoire-section4__grid img:nth-child(2),
.histoire-section4__grid img:nth-child(3) {
    grid-column: span 2;
    height: auto;
    aspect-ratio: 3 / 4;
}
.histoire-section4__grid img:nth-child(4),
.histoire-section4__grid img:nth-child(5) {
    grid-column: span 3;
    height: 300px;
}
.histoire-section4__label {
    font-family: var(--font-body);
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-gold);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.histoire-section4__label::before {
    content: '';
    display: inline-block;
    width: 40px;
    height: 1px;
    background: var(--color-gold);
}
.histoire-section4__title {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 2.5vw, 2.8rem);
    font-weight: 300;
    font-style: italic;
    color: var(--color-primary);
    margin-bottom: 28px;
    line-height: 1.2;
}
.histoire-section4__text p {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.8;
    color: var(--color-gray);
    margin-bottom: 16px;
}
.histoire-section4__subtitle {
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-primary);
    margin: 28px 0 12px;
}
.histoire-section4__subtext p {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.8;
    color: var(--color-gray);
    margin-bottom: 16px;
}

/* --- Section Espaces : Carousel cards --- */
.histoire-espaces {
    background-color: var(--color-cream, #F5F0EB);
    padding: 100px 0 80px;
}
.histoire-espaces__header {
    text-align: center;
    margin-bottom: 48px;
    padding: 0 20px;
}
.histoire-espaces__label {
    font-family: var(--font-body);
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-gold);
    margin-bottom: 16px;
}
.histoire-espaces__label::before {
    content: '';
    display: inline-block;
    width: 40px;
    height: 1px;
    background: var(--color-gold);
    margin-right: 12px;
    vertical-align: middle;
}
.histoire-espaces__label::after {
    content: '';
    display: inline-block;
    width: 40px;
    height: 1px;
    background: var(--color-gold);
    margin-left: 12px;
    vertical-align: middle;
}
.histoire-espaces__title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 3vw, 3rem);
    font-weight: 300;
    font-style: italic;
    color: var(--color-primary);
    line-height: 1.2;
}
.histoire-espaces__slider {
    position: relative;
}
.histoire-espaces__track-wrapper {
    overflow: hidden;
    padding: 0 40px;
}
.histoire-espaces__track {
    display: flex;
    gap: 16px;
    transition: transform 0.4s ease;
}
.histoire-espaces__card {
    flex: 0 0 260px;
    min-width: 0;
    border-radius: 8px 8px 0 0;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.histoire-espaces__card .space-card-image {
    height: 360px;
}
.histoire-espaces__card .space-card-overlay {
    border-radius: 0;
    padding: 16px;
}
.histoire-espaces__card .space-card-title {
    font-size: 20px;
    margin-bottom: 12px;
}
.histoire-espaces__btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #fff;
    border: 1.5px solid #E0D8CF;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    transition: background 0.2s;
}
.histoire-espaces__btn:hover {
    background: var(--color-cream, #F5F0EB);
}
.histoire-espaces__btn:focus-visible {
    outline: 3px solid rgba(156, 120, 79, 0.5);
    outline-offset: 2px;
}
.histoire-espaces__btn--prev { left: 8px; }
.histoire-espaces__btn--next { right: 8px; }
.histoire-espaces__btn svg {
    width: 18px;
    height: 18px;
    stroke: var(--color-primary);
    fill: none;
    stroke-width: 2;
}

@media (max-width: 768px) {
    .histoire-espaces__card {
        flex: 0 0 220px;
    }
    .histoire-espaces__card .space-card-image {
        height: 300px;
    }
    .histoire-espaces__track-wrapper {
        padding: 0 30px;
    }
}

/* --- Section 5 : BG Palmier --- */
.histoire-section5 {
    background-image: url('../images/BG-Palmtree.png');
    background-size: cover;
    background-position: center;
    background-color: #EDE3D8;
    padding: 100px 40px;
    text-align: center;
}
.histoire-section5__container {
    max-width: 860px;
    margin: 0 auto;
}
.histoire-section5__title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 3.5vw, 3.5rem);
    font-weight: 300;
    font-style: italic;
    color: var(--color-primary);
    margin-bottom: 32px;
    line-height: 1.2;
}
.histoire-section5__text p {
    font-family: var(--font-body);
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--color-primary);
    margin-bottom: 16px;
}
.histoire-section5__btn {
    margin-top: 40px;
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* --- Section 6 : Image full-width --- */
.histoire-section6 {
    height: 70vh;
    min-height: 450px;
    overflow: hidden;
}
.histoire-section6 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .histoire-section1__container,
    .histoire-section4__container {
        grid-template-columns: 1fr;
        gap: 48px;
    }
    .histoire-section1__photos img {
        height: 320px;
    }
    .histoire-section4__grid img {
        height: 180px;
    }
    .histoire-slider__slide {
        flex: 0 0 calc(50% - 8px);
    }
    .histoire-section2,
    .histoire-section5 {
        padding: 60px 20px;
    }
    .histoire-section1,
    .histoire-section4 {
        padding: 60px 20px;
    }
    .histoire-section1__text-col {
        margin-left: 20px;
        margin-right: 20px;
        max-width: 100%;
    }
    .histoire-espaces {
        padding: 60px 0 48px;
    }
}

@media (max-width: 768px) {
    .histoire-hero {
        height: 50vh;
        min-height: 300px;
    }

    .histoire-section1__photos {
        margin-right: 0;
    }

    .histoire-section1__photos img {
        height: 250px;
    }

    .histoire-section4__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .histoire-section4__grid img:nth-child(1),
    .histoire-section4__grid img:nth-child(2),
    .histoire-section4__grid img:nth-child(3) {
        grid-column: span 1;
        aspect-ratio: 3 / 4;
    }

    .histoire-section4__grid img:nth-child(4),
    .histoire-section4__grid img:nth-child(5) {
        grid-column: span 1;
        height: 200px;
    }

    .histoire-slider__slide {
        flex: 0 0 calc(80% - 8px);
    }

    .histoire-slider__slide img {
        width: 100%;
        height: auto;
        aspect-ratio: 324 / 393;
    }

    .histoire-slider__track-wrapper {
        padding: 0 20px;
    }

    .histoire-section6 {
        height: 50vh;
        min-height: 300px;
    }
}

@media (max-width: 480px) {
    .histoire-slider__slide {
        flex: 0 0 calc(100% - 0px);
    }

    .histoire-section1__photos img {
        height: 200px;
    }

    .histoire-section4__grid img:nth-child(4),
    .histoire-section4__grid img:nth-child(5) {
        height: 160px;
    }

    .histoire-section6 {
        height: 40vh;
        min-height: 250px;
    }
}
