/* ============================================================
   LE CLOS BOTANIQUE — feuille de style principale
   Palette : crème / vert profond / cuivre
   Typographies : Fraunces (titres) + Outfit (texte)
   ============================================================ */

:root {
    --cream: #F7F3EC;
    --cream-2: #EFE8DB;
    --ink: #1E2F28;
    --pine: #2F4C40;
    --sage: #A8BFAE;
    --copper: #C1794C;
    --copper-dark: #A9633A;
    --white: #FFFFFF;

    --font-title: "Fraunces", Georgia, serif;
    --font-body: "Outfit", "Segoe UI", sans-serif;

    --radius: 14px;
    --shadow: 0 18px 45px rgba(30, 47, 40, .14);
    --container: 1240px;
    --header-h: 76px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
    margin: 0;
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 17px;
    line-height: 1.65;
    color: var(--ink);
    background: var(--cream);
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

h1, h2, h3 {
    font-family: var(--font-title);
    font-weight: 400;
    line-height: 1.12;
    margin: 0 0 .5em;
}

h1 em, h2 em, h3 em {
    font-style: italic;
    color: var(--copper);
}

a { color: var(--copper-dark); }

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 clamp(20px, 4vw, 48px);
}

.container.narrow { max-width: 860px; }

/* ---------- Boutons ---------- */
.button {
    display: inline-block;
    padding: 14px 30px;
    border: 1px solid var(--copper);
    border-radius: 999px;
    background: var(--copper);
    color: var(--white);
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 500;
    letter-spacing: .04em;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background .25s, border-color .25s, transform .25s;
}

.button:hover { background: var(--copper-dark); border-color: var(--copper-dark); transform: translateY(-2px); }
.button.ghost { background: transparent; color: var(--white); border-color: rgba(255,255,255,.7); }
.button.ghost:hover { background: rgba(255,255,255,.12); }
.button.small { padding: 10px 20px; font-size: 13px; }
.button.large { padding: 16px 42px; }

/* ============================================================
   HEADER
   ============================================================ */
#header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 100;
    color: var(--white);
    transition: background .3s, color .3s, box-shadow .3s;
}

#header.scrolled {
    background: rgba(247, 243, 236, .94);
    backdrop-filter: blur(8px);
    color: var(--ink);
    box-shadow: 0 4px 24px rgba(30, 47, 40, .10);
}

.header-inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 clamp(20px, 4vw, 48px);
    height: var(--header-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
}

.brand-mark { width: 38px; height: 38px; flex: none; }

.brand-name {
    font-family: var(--font-title);
    font-size: 21px;
    letter-spacing: .01em;
    white-space: nowrap;
}

.brand-name em { color: var(--copper); }

#main-nav ul {
    display: flex;
    gap: clamp(16px, 2.5vw, 36px);
    list-style: none;
    margin: 0;
    padding: 0;
}

#main-nav a {
    color: inherit;
    text-decoration: none;
    font-size: 15px;
    font-weight: 400;
    letter-spacing: .02em;
    padding: 6px 0;
    border-bottom: 1px solid transparent;
    transition: border-color .2s;
}

#main-nav a:hover { border-bottom-color: var(--copper); }

.header-actions { display: flex; align-items: center; gap: 18px; }

.header-actions .phone {
    color: inherit;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    letter-spacing: .03em;
    white-space: nowrap;
}

/* Burger (mobile) */
#burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    padding: 8px;
    background: none;
    border: 1px solid currentColor;
    border-radius: 8px;
    color: inherit;
    cursor: pointer;
}

#burger span {
    display: block;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: transform .25s, opacity .25s;
}

body.nav-open #burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.nav-open #burger span:nth-child(2) { opacity: 0; }
body.nav-open #burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */
#hero {
    position: relative;
    min-height: 100svh;
    display: flex;
    align-items: center;
    color: var(--white);
    overflow: hidden;
}

.hero-visual {
    position: absolute;
    inset: 0;
    background: url("../img/hero.svg") center / cover no-repeat, var(--pine);
}

.hero-visual::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, rgba(20, 34, 28, .82) 0%, rgba(20, 34, 28, .45) 45%, rgba(20, 34, 28, .05) 75%);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: var(--container);
    width: 100%;
    margin: 0 auto;
    padding: calc(var(--header-h) + 40px) clamp(20px, 4vw, 48px) 80px;
}

.hero-eyebrow {
    font-size: 14px;
    font-weight: 500;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--sage);
    margin: 0 0 18px;
}

#hero h1 {
    font-size: clamp(52px, 9vw, 118px);
    margin: 0 0 22px;
}

.hero-sub {
    max-width: 460px;
    font-size: 19px;
    line-height: 1.6;
    margin: 0 0 34px;
    color: rgba(255, 255, 255, .92);
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; }

.scroll-hint {
    position: absolute;
    left: 50%;
    bottom: 26px;
    transform: translateX(-50%);
    z-index: 1;
    width: 26px;
    height: 44px;
    border: 1.5px solid rgba(255, 255, 255, .8);
    border-radius: 999px;
}

.scroll-hint span {
    position: absolute;
    left: 50%;
    top: 8px;
    width: 4px;
    height: 8px;
    margin-left: -2px;
    border-radius: 2px;
    background: var(--white);
    animation: scrollhint 1.8s infinite ease-in-out;
}

@keyframes scrollhint {
    0%   { transform: translateY(0);    opacity: 1; }
    70%  { transform: translateY(16px); opacity: 0; }
    100% { transform: translateY(0);    opacity: 0; }
}

/* ---------- Bandeau défilant ---------- */
.marquee {
    background: var(--ink);
    color: var(--cream);
    overflow: hidden;
    padding: 14px 0;
}

.marquee-track {
    display: flex;
    align-items: center;
    gap: 34px;
    width: max-content;
    animation: marquee 28s linear infinite;
    font-family: var(--font-title);
    font-style: italic;
    font-size: 17px;
    letter-spacing: .03em;
    white-space: nowrap;
}

.marquee-track i { color: var(--copper); font-style: normal; }

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

/* ============================================================
   SECTIONS
   ============================================================ */
.section { padding: clamp(70px, 9vw, 120px) 0; }

.section.dark { background: var(--pine); color: var(--cream); }
.section.dark h2 em { color: var(--sage); }
.section.tinted { background: var(--cream-2); }

.section-head { margin-bottom: clamp(40px, 5vw, 64px); }
.section-head.centered { text-align: center; }

.section-label {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .28em;
    text-transform: uppercase;
    color: var(--copper);
    margin: 0 0 14px;
}

.section.dark .section-label { color: var(--sage); }

.section-head h2 { font-size: clamp(34px, 4.6vw, 58px); max-width: 18em; margin: 0; }
.section-head.centered h2 { margin: 0 auto; }

.section-sub { max-width: 560px; margin: 18px auto 0; opacity: .85; }

/* ---------- Apparition au scroll ---------- */
[data-reveal] {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .7s ease, transform .7s ease;
}

[data-reveal].revealed { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    [data-reveal] { opacity: 1; transform: none; transition: none; }
    .marquee-track { animation: none; }
    html { scroll-behavior: auto; }
}

/* ============================================================
   SECTION PROGRAMME
   ============================================================ */
.programme-grid {
    display: grid;
    grid-template-columns: minmax(300px, 5fr) 7fr;
    gap: clamp(32px, 4vw, 64px);
    align-items: start;
}

.programme-text p { margin: 0 0 1.2em; }
.programme-text .button { margin-top: 10px; }

/* ---------- Carrousel ---------- */
.carousel {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    background: var(--white);
}

.carousel-track { position: relative; aspect-ratio: 3 / 2; }

.carousel-slide {
    position: absolute;
    inset: 0;
    margin: 0;
    opacity: 0;
    transition: opacity .6s ease;
    pointer-events: none;
}

.carousel-slide.is-active { opacity: 1; pointer-events: auto; }

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: zoom-in;
}

.carousel-slide figcaption {
    position: absolute;
    left: 18px;
    bottom: 18px;
    padding: 7px 16px;
    border-radius: 999px;
    background: rgba(30, 47, 40, .78);
    color: var(--cream);
    font-size: 13.5px;
    letter-spacing: .04em;
}

.carousel-ui {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 16px;
    background: var(--white);
}

.carousel-prev, .carousel-next {
    width: 40px;
    height: 40px;
    border: 1px solid var(--pine);
    border-radius: 50%;
    background: none;
    color: var(--pine);
    font-size: 17px;
    cursor: pointer;
    transition: background .2s, color .2s;
}

.carousel-prev:hover, .carousel-next:hover { background: var(--pine); color: var(--cream); }

.carousel-dots { display: flex; gap: 10px; }

.carousel-dots button {
    width: 10px;
    height: 10px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: var(--sage);
    cursor: pointer;
    transition: transform .2s, background .2s;
}

.carousel-dots button.is-active { background: var(--copper); transform: scale(1.35); }

/* ---------- Points clés ---------- */
.keypoints {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(20px, 3vw, 36px);
    margin-top: clamp(48px, 6vw, 80px);
}

.keypoint {
    background: var(--white);
    border-radius: var(--radius);
    padding: 34px 30px;
    box-shadow: 0 8px 26px rgba(30, 47, 40, .08);
    border-top: 3px solid var(--copper);
}

.keypoint svg { width: 46px; height: 46px; color: var(--pine); margin-bottom: 16px; }
.keypoint h3 { font-size: 22px; }
.keypoint p { margin: 0; font-size: 15.5px; opacity: .85; }

/* ============================================================
   SECTION CHIFFRES
   ============================================================ */
.figures {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(28px, 4vw, 48px) clamp(24px, 4vw, 56px);
}

.figure { text-align: center; }

.figure-num {
    display: block;
    font-family: var(--font-title);
    font-size: clamp(44px, 5.5vw, 68px);
    line-height: 1;
    color: var(--sage);
    font-variant-numeric: tabular-nums;
}

.figure-cap {
    display: block;
    margin-top: 10px;
    font-size: 15px;
    letter-spacing: .02em;
    opacity: .85;
}

/* ============================================================
   SECTION RÉSIDENCES (onglets)
   ============================================================ */
.tab-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 36px;
}

.tab-btn {
    padding: 13px 26px;
    border: 1px solid var(--pine);
    border-radius: 999px;
    background: none;
    color: var(--pine);
    font-family: var(--font-title);
    font-size: 18px;
    cursor: pointer;
    transition: background .25s, color .25s;
}

.tab-btn.is-active { background: var(--pine); color: var(--cream); }

.tab-panel[hidden] { display: none; }

.residence {
    display: grid;
    grid-template-columns: 7fr 5fr;
    gap: clamp(28px, 4vw, 56px);
    align-items: center;
}

.residence > img {
    border-radius: var(--radius) var(--radius) 160px var(--radius);
    box-shadow: var(--shadow);
    cursor: zoom-in;
}

.residence-info h3 { font-size: clamp(28px, 3vw, 38px); }

.checklist {
    list-style: none;
    margin: 0 0 20px;
    padding: 0;
}

.checklist li {
    position: relative;
    padding: 6px 0 6px 30px;
    font-size: 16px;
}

.checklist li::before {
    content: "✦";
    position: absolute;
    left: 0;
    color: var(--copper);
}

.residence-info p { font-size: 16px; margin: 0 0 22px; opacity: .9; }

/* ============================================================
   SECTION QUARTIER
   ============================================================ */
.quartier-grid {
    display: grid;
    grid-template-columns: 5fr 6fr;
    gap: clamp(32px, 4vw, 64px);
    align-items: center;
}

.quartier-visual { margin: 0; }

.quartier-visual img {
    border-radius: 200px 200px var(--radius) var(--radius);
    box-shadow: var(--shadow);
    cursor: zoom-in;
}

.quartier-text p { margin: 0 0 1.2em; }

.quartier-points {
    list-style: none;
    margin: 26px 0 0;
    padding: 0;
    display: grid;
    gap: 12px;
}

.quartier-points li {
    background: var(--white);
    border-left: 3px solid var(--copper);
    border-radius: 0 10px 10px 0;
    padding: 12px 18px;
    font-size: 15.5px;
}

/* ============================================================
   SECTION LOCALISATION
   ============================================================ */
.map-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 460px;
}

#map {
    min-height: 460px;
    background: var(--cream-2);
    z-index: 1; /* sous le header fixe */
}

.map-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 30px;
    text-align: center;
    font-size: 15px;
    opacity: .7;
}

.plan {
    margin: 0;
    position: relative;
    background: var(--white);
}

.plan img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: zoom-in;
}

.plan figcaption {
    position: absolute;
    right: 16px;
    bottom: 16px;
    padding: 7px 16px;
    border-radius: 999px;
    background: rgba(30, 47, 40, .78);
    color: var(--cream);
    font-size: 13px;
}

/* Marqueur personnalisé Leaflet */
.poi-marker {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50% 50% 50% 4px;
    background: var(--copper);
    color: var(--white);
    font-size: 16px;
    box-shadow: 0 4px 12px rgba(30, 47, 40, .35);
    border: 2px solid var(--white);
}

.poi-marker.main { background: var(--pine); width: 42px; height: 42px; font-size: 20px; }

/* ============================================================
   CONTACT (formulaire)
   ============================================================ */
#contact-form { max-width: 760px; margin: 0 auto; }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.field { margin-bottom: 18px; }

.field label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: 7px;
    color: var(--sage);
}

.field input,
.field select,
.field textarea {
    width: 100%;
    padding: 13px 16px;
    border: 1px solid rgba(247, 243, 236, .35);
    border-radius: 10px;
    background: rgba(247, 243, 236, .07);
    color: var(--cream);
    font-family: var(--font-body);
    font-size: 16px;
    transition: border-color .2s, background .2s;
}

.field select option { color: var(--ink); }

.field input::placeholder, .field textarea::placeholder { color: rgba(247, 243, 236, .45); }

.field input:focus, .field select:focus, .field textarea:focus {
    outline: none;
    border-color: var(--copper);
    background: rgba(247, 243, 236, .12);
}

.field input.invalid, .field textarea.invalid { border-color: #E07B5F; }

.consent {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    font-size: 14px;
    margin: 6px 0 24px;
    opacity: .9;
    cursor: pointer;
}

.consent input { margin-top: 4px; accent-color: var(--copper); }

.form-error {
    color: #F0A48D;
    font-size: 15px;
    margin: 0 0 18px;
}

.form-note { font-size: 13px; opacity: .6; margin-top: 16px; }

/* ============================================================
   FOOTER
   ============================================================ */
#footer {
    background: var(--ink);
    color: var(--cream);
    padding: clamp(50px, 6vw, 80px) 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: clamp(32px, 4vw, 64px);
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(247, 243, 236, .15);
}

.footer-brand .brand-mark { width: 44px; height: 44px; color: var(--sage); }
.footer-brand .brand-name { font-size: 24px; margin: 14px 0 4px; }
.footer-tagline { font-family: var(--font-title); font-style: italic; opacity: .7; margin: 0; }

.footer-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }

.footer-nav a {
    color: var(--cream);
    text-decoration: none;
    font-size: 15px;
    opacity: .85;
}

.footer-nav a:hover { opacity: 1; text-decoration: underline; }

.footer-contact .phone {
    display: inline-block;
    font-family: var(--font-title);
    font-size: 24px;
    color: var(--cream);
    text-decoration: none;
    margin-bottom: 12px;
}

.footer-contact p { font-size: 14.5px; opacity: .75; margin: 0; }

.footer-legal {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding-top: 24px;
    font-size: 13.5px;
}

.footer-legal ul { list-style: none; display: flex; gap: 22px; margin: 0; padding: 0; }

.footer-legal button {
    background: none;
    border: none;
    padding: 0;
    color: var(--cream);
    font-family: var(--font-body);
    font-size: 13.5px;
    opacity: .75;
    cursor: pointer;
}

.footer-legal button:hover { opacity: 1; text-decoration: underline; }

.footer-credit { margin: 0; opacity: .6; }
.footer-credit a { color: var(--sage); }

/* ============================================================
   MODALES & LIGHTBOX
   ============================================================ */
.modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(20, 30, 26, .65);
    backdrop-filter: blur(4px);
}

.modal[hidden] { display: none; }

.modal-box {
    position: relative;
    max-width: 640px;
    max-height: 82vh;
    overflow-y: auto;
    background: var(--cream);
    color: var(--ink);
    border-radius: var(--radius);
    padding: 40px 44px;
    box-shadow: var(--shadow);
}

.modal-box.centered { text-align: center; }

.modal-box h2 { font-size: 30px; }
.modal-box p { font-size: 15.5px; }

.modal-close, .lightbox-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 50%;
    background: var(--pine);
    color: var(--cream);
    font-size: 15px;
    cursor: pointer;
}

.sent-icon { width: 60px; height: 60px; color: var(--copper); margin: 4px auto 10px; }

.demo-note { font-size: 13px !important; opacity: .55; }

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: grid;
    place-items: center;
    padding: 4vmin;
    background: rgba(20, 30, 26, .88);
}

.lightbox[hidden] { display: none; }

.lightbox img {
    max-width: 92vw;
    max-height: 90vh;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.lightbox-close { position: fixed; top: 22px; right: 22px; }

body.no-scroll { overflow: hidden; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1160px) {
    /* Le header devient trop étroit pour le bouton : le téléphone reste le CTA */
    .header-actions .button { display: none; }
}

@media (max-width: 1080px) {
    .programme-grid,
    .residence,
    .quartier-grid { grid-template-columns: 1fr; }

    .residence > img { order: -1; }

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

    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
    #main-nav {
        position: fixed;
        top: var(--header-h);
        left: 0;
        right: 0;
        background: var(--cream);
        color: var(--ink);
        box-shadow: 0 20px 40px rgba(30, 47, 40, .18);
        transform: translateY(-130%);
        transition: transform .3s ease;
    }

    body.nav-open #main-nav { transform: translateY(0); }

    #main-nav ul {
        flex-direction: column;
        gap: 0;
        padding: 12px 0;
    }

    #main-nav a {
        display: block;
        padding: 14px clamp(20px, 4vw, 48px);
        font-size: 17px;
    }

    #burger { display: flex; }
    .header-actions .phone,
    .header-actions .button { display: none; }

    /* Header lisible quand le menu mobile est ouvert sur le hero */
    body.nav-open #header { background: var(--cream); color: var(--ink); }

    .map-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; gap: 0; }
    .footer-grid { grid-template-columns: 1fr; }
    .modal-box { padding: 30px 24px; }
}
