/* ==========================================================
   NexGen Legacy : charte
   Palette issue du logo : bleu marine + or
   ========================================================== */
:root {
    --navy: #1E2A44;
    --navy-dark: #141d30;
    --navy-light: #2d3e60;
    --gold: #C9A961;
    --gold-light: #d8bd7c;
    --gold-dark: #a88a45;
    --cream: #FAF8F3;
    --cream-2: #f2ede1;
    --text: #2a2f3a;
    --text-soft: #6a707d;
    --white: #ffffff;
    --border: #e4dccb;
    --shadow-sm: 0 2px 8px rgba(30,42,68,.08);
    --shadow-md: 0 10px 30px rgba(30,42,68,.12);
    --shadow-lg: 0 20px 60px rgba(30,42,68,.18);
    --font-serif: "Cormorant Garamond", Georgia, serif;
    --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --radius: 6px;
    --container: 1200px;
    --container-narrow: 760px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.65;
    color: var(--text);
    background: var(--cream);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--gold-dark); }

/* ===== Typography ===== */
h1, h2, h3, h4 {
    font-family: var(--font-serif);
    font-weight: 500;
    color: var(--navy);
    line-height: 1.2;
    margin: 0 0 .5em;
    letter-spacing: -.01em;
}
.eyebrow {
    font-family: var(--font-sans);
    font-size: .8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .18em;
    color: var(--gold-dark);
    margin: 0 0 1rem;
}
.lead {
    font-size: 1.15rem;
    line-height: 1.75;
    color: var(--text);
    margin: 0 0 1.2em;
}
.lead.center, .center { text-align: center; }
.muted { color: var(--text-soft); font-size: .9rem; }

/* ===== Layout helpers ===== */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 1.5rem;
}
.container--narrow { max-width: var(--container-narrow); }

.section {
    padding: 6rem 0;
    position: relative;
}
.section--about { background: var(--white); }
.section--apartment { background: var(--cream); }
.section--gallery { background: var(--white); }
.section--location { background: var(--navy); color: var(--cream); }
.section--location h2, .section--location h3 { color: var(--white); }
.section--location .eyebrow { color: var(--gold); }
.section--location .lead { color: var(--cream); }
.section--location p { color: #d4dbea; }
.section--contact { background: var(--cream-2); }

.section__title {
    font-size: clamp(2rem, 4.5vw, 3.25rem);
    text-align: center;
    margin: 0;
}
.container:not(.container--narrow) .section__title { text-align: center; }
.section__divider {
    width: 60px;
    height: 2px;
    background: var(--gold);
    margin: 1.5rem auto 2.5rem;
}
.section__subtitle {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 400;
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    text-align: center;
    color: var(--gold);
    margin: .5rem 0 0;
    letter-spacing: .02em;
}
.section--location .section__subtitle { color: var(--gold-light); }

/* ===== Nav ===== */
.nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    transition: background .3s ease, box-shadow .3s ease, padding .3s ease;
}
.nav.scrolled {
    background: rgba(255,255,255,.96);
    backdrop-filter: saturate(140%) blur(10px);
    box-shadow: var(--shadow-sm);
    padding: .5rem 1.5rem;
}
.nav__brand img { height: 60px; width: auto; transition: height .3s; }
.nav.scrolled .nav__brand img { height: 48px; }
.nav__menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}
.nav__menu a {
    font-size: .92rem;
    font-weight: 500;
    color: var(--white);
    text-shadow: 0 1px 4px rgba(0,0,0,.4);
    position: relative;
}
.nav.scrolled .nav__menu a {
    color: var(--navy);
    text-shadow: none;
}
.nav__menu a:not(.nav__cta)::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -6px;
    height: 1px;
    background: var(--gold);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform .2s;
}
.nav__menu a:hover::after { transform: scaleX(1); }
.nav__cta {
    padding: .55rem 1.2rem;
    border: 1px solid var(--gold);
    border-radius: var(--radius);
    background: rgba(201,169,97,.15);
}
.nav.scrolled .nav__cta { background: var(--gold); color: var(--white) !important; }
.nav__cta:hover { background: var(--gold); color: var(--white) !important; }
.nav__burger {
    display: none;
    background: none;
    border: none;
    width: 32px;
    height: 32px;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    padding: 0;
}
.nav__burger span {
    display: block;
    height: 2px;
    background: var(--white);
    transition: background .3s;
}
.nav.scrolled .nav__burger span { background: var(--navy); }

/* ===== Hero ===== */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
}
.hero__img, .hero__img img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}
.hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(20,29,48,.35) 0%, rgba(20,29,48,.65) 100%);
    z-index: 1;
}
.hero__content {
    position: relative;
    z-index: 2;
    max-width: 760px;
    padding: 0 1.5rem;
    animation: heroIn 1.1s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes heroIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: none; }
}
.hero__logo {
    display: block;
    width: 180px;
    height: 180px;
    margin: 0 auto 1.5rem;
    filter: drop-shadow(0 4px 20px rgba(0,0,0,.4));
    background: rgba(255,255,255,.95);
    border-radius: 50%;
    padding: 1.5rem;
    object-fit: contain;
}
@media (min-width: 768px) {
    .hero__logo { width: 240px; height: 240px; padding: 2rem; }
}
.hero__title {
    font-size: clamp(2.5rem, 7vw, 5rem);
    color: var(--white);
    margin: 0 0 .5rem;
    text-shadow: 0 2px 20px rgba(0,0,0,.4);
    font-weight: 500;
}
.hero__tagline {
    font-size: clamp(1rem, 2.2vw, 1.35rem);
    color: var(--gold-light);
    margin: 0 0 2.5rem;
    font-weight: 300;
    letter-spacing: .04em;
}
.hero__scroll {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    color: var(--white);
    opacity: .7;
    animation: bounce 2s infinite;
}
@keyframes bounce {
    0%, 100% { transform: translate(-50%, 0); }
    50% { transform: translate(-50%, -8px); }
}

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: .9rem 2rem;
    font-family: var(--font-sans);
    font-size: .95rem;
    font-weight: 500;
    letter-spacing: .05em;
    text-transform: uppercase;
    border-radius: var(--radius);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all .25s ease;
}
.btn--gold {
    background: var(--gold);
    color: var(--white);
    border-color: var(--gold);
}
.btn--gold:hover {
    background: var(--gold-dark);
    border-color: var(--gold-dark);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.btn--large { padding: 1.15rem 2.5rem; font-size: 1rem; }

/* ===== About : valeurs ===== */
.values {
    list-style: none;
    padding: 0;
    margin: 3rem 0 0;
    display: grid;
    gap: 1.5rem;
}
.values li {
    padding: 1.5rem;
    background: var(--cream);
    border-left: 3px solid var(--gold);
    border-radius: var(--radius);
}
.values strong {
    display: block;
    font-family: var(--font-serif);
    font-size: 1.35rem;
    color: var(--navy);
    margin-bottom: .35rem;
}
.values span { display: block; color: var(--text-soft); }
@media (min-width: 768px) {
    .values { grid-template-columns: repeat(3, 1fr); }
}

/* ===== Features ===== */
.features {
    display: grid;
    gap: 1.5rem;
    margin-top: 3rem;
    grid-template-columns: 1fr;
}
@media (min-width: 640px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .features { grid-template-columns: repeat(3, 1fr); } }
.feature {
    text-align: center;
    padding: 2rem 1.5rem;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: transform .3s, box-shadow .3s;
}
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.feature__icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1;
}
.feature h3 {
    font-size: 1.4rem;
    margin: 0 0 .5rem;
}
.feature p { margin: 0; color: var(--text-soft); font-size: .95rem; }

/* ===== Gallery ===== */
.gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: .75rem;
    margin-top: 3rem;
}
@media (min-width: 640px) { .gallery { grid-template-columns: repeat(3, 1fr); gap: 1rem; } }
@media (min-width: 960px) { .gallery { grid-template-columns: repeat(4, 1fr); } }
.gallery__item {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    border-radius: var(--radius);
    cursor: pointer;
    background: var(--cream-2);
}
.gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}
.gallery__item::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(30,42,68,.5) 100%);
    opacity: 0;
    transition: opacity .3s;
}
.gallery__item:hover img { transform: scale(1.05); }
.gallery__item:hover::after { opacity: 1; }

/* ===== Location grid ===== */
.location-grid {
    display: grid;
    gap: 2rem;
    margin-top: 2rem;
    grid-template-columns: 1fr;
}
@media (min-width: 640px) { .location-grid { grid-template-columns: repeat(2, 1fr); } }
.location-grid h3 {
    color: var(--gold);
    margin-bottom: .5rem;
    font-size: 1.35rem;
}
.location-grid p { color: #d4dbea; margin: 0; }

/* ===== Contact ===== */
.section--contact .btn--gold { margin: 1.5rem 0 1rem; }

/* ===== Footer ===== */
.footer {
    background: var(--navy-dark);
    color: #b8bfce;
    padding: 4rem 0 2rem;
}
.footer h4 {
    color: var(--gold);
    font-family: var(--font-sans);
    font-weight: 500;
    font-size: .9rem;
    text-transform: uppercase;
    letter-spacing: .12em;
    margin: 0 0 1rem;
}
.footer__logo {
    background: var(--white);
    padding: .5rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
}
.footer__grid {
    display: grid;
    gap: 2.5rem;
    grid-template-columns: 1fr;
    margin-bottom: 3rem;
}
@media (min-width: 768px) { .footer__grid { grid-template-columns: 2fr 1fr 1fr; } }
.footer a { color: #b8bfce; }
.footer a:hover { color: var(--gold); }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer ul li { margin-bottom: .5rem; }
.footer__bottom {
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,.08);
    text-align: center;
    font-size: .85rem;
}

/* ===== Lightbox ===== */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(10,14,24,.96);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    animation: fadeIn .25s ease;
}
.lightbox[aria-hidden="false"] { display: flex; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.lightbox__img {
    max-width: 100%;
    max-height: 90vh;
    width: auto;
    height: auto;
    border-radius: 4px;
    box-shadow: var(--shadow-lg);
}
.lightbox__close, .lightbox__prev, .lightbox__next {
    position: absolute;
    background: rgba(255,255,255,.1);
    border: none;
    color: var(--white);
    font-size: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
    line-height: 1;
}
.lightbox__close:hover, .lightbox__prev:hover, .lightbox__next:hover {
    background: rgba(255,255,255,.25);
}
.lightbox__close { top: 1.5rem; right: 1.5rem; }
.lightbox__prev { left: 1.5rem; top: 50%; transform: translateY(-50%); font-size: 2.5rem; }
.lightbox__next { right: 1.5rem; top: 50%; transform: translateY(-50%); font-size: 2.5rem; }
.lightbox__counter {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    color: var(--cream);
    font-size: .9rem;
    letter-spacing: .1em;
}

/* ===== Reveal animations ===== */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ===== Mobile nav ===== */
@media (max-width: 840px) {
    .nav__burger { display: flex; }
    .nav__menu {
        position: fixed;
        top: 70px;
        left: 0; right: 0;
        background: var(--white);
        flex-direction: column;
        gap: 0;
        padding: 1rem 0;
        transform: translateX(100%);
        transition: transform .3s ease;
        box-shadow: var(--shadow-md);
    }
    .nav__menu.open { transform: none; }
    .nav__menu a {
        color: var(--navy) !important;
        text-shadow: none !important;
        padding: 1rem 1.5rem;
        width: 100%;
        text-align: left;
    }
    .nav__menu a.nav__cta {
        margin: .5rem 1.5rem;
        text-align: center;
        width: calc(100% - 3rem);
    }
}

/* ===== Prefers reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}
