/* =========================================================
   Annonce Villa Lonay — feuille de style
   Palette : ivoire, encre, bronze. Typo : Cormorant Garamond + Jost
   ========================================================= */

:root {
  --ivory: #f7f3ec;
  --ivory-2: #efe8dc;
  --ink: #1d1c1a;
  --ink-2: #2a2825;
  --muted: #6f685e;
  --line: #ddd3c3;
  --bronze: #9a7a4c;
  --bronze-light: #c9ad80;

  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --sans: "Jost", "Helvetica Neue", Arial, sans-serif;

  --container: 1240px;
  --gutter: clamp(20px, 5vw, 64px);
  --section: clamp(80px, 12vw, 160px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(46px, 6.4vw, 92px); }
h2 { font-size: clamp(34px, 4.4vw, 58px); }
h3 { font-size: 28px; }
em { font-style: italic; color: var(--bronze-light); }
p { margin: 0 0 1.2em; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--section) 0; }
.section--tint { background: var(--ivory-2); }
.section--dark { background: var(--ink); color: var(--ivory); }
.section__head { max-width: 720px; margin-bottom: clamp(40px, 6vw, 72px); }
.muted { color: var(--muted); }
.lead { font-family: var(--serif); font-size: clamp(22px, 2.2vw, 28px); line-height: 1.45; color: var(--ink); }

.eyebrow {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--bronze);
  margin-bottom: 20px;
}
.eyebrow--light { color: var(--bronze-light); }

/* ---------- Boutons & liens ---------- */
.btn {
  display: inline-block;
  font: 500 12px/1 var(--sans);
  letter-spacing: .22em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 18px 30px;
  border: 1px solid currentColor;
  background: transparent;
  cursor: pointer;
  transition: background .4s var(--ease), color .4s var(--ease), border-color .4s var(--ease);
}
.btn--light { background: var(--ivory); color: var(--ink); border-color: var(--ivory); }
.btn--light:hover { background: transparent; color: var(--ivory); }
.btn--dark { background: var(--ink); color: var(--ivory); border-color: var(--ink); }
.btn--dark:hover { background: var(--bronze); border-color: var(--bronze); }
.btn--ghost:hover { background: var(--ivory); color: var(--ink); border-color: var(--ivory); }

.link-arrow {
  font: 500 12px/1 var(--sans);
  letter-spacing: .22em;
  text-transform: uppercase;
  text-decoration: none;
  padding-bottom: 6px;
  border-bottom: 1px solid currentColor;
}
.link-arrow::after { content: " →"; }
.link-arrow--light { color: var(--ivory); }

/* ---------- Navigation ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 22px var(--gutter);
  color: var(--ivory);
  transition: background .5s var(--ease), color .5s var(--ease), padding .5s var(--ease);
}
.nav.is-scrolled {
  background: rgba(247, 243, 236, .94);
  backdrop-filter: blur(10px);
  color: var(--ink);
  padding-top: 14px; padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.nav__brand {
  font-family: var(--serif); font-size: 24px; letter-spacing: .04em; text-decoration: none;
}
.nav__brand span { color: var(--bronze-light); }
.nav__links { display: flex; gap: 36px; }
.nav__links a {
  font-size: 12px; font-weight: 400; letter-spacing: .2em; text-transform: uppercase; text-decoration: none;
  opacity: .85;
}
.nav__links a:hover { opacity: 1; }
.nav__cta { padding: 13px 22px; }
.nav.is-scrolled .btn--ghost:hover { background: var(--ink); color: var(--ivory); border-color: var(--ink); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  color: var(--ivory);
  overflow: hidden;
}
.hero__img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 45%;
  transform: scale(1.06);
  animation: heroZoom 14s var(--ease) forwards;
}
@keyframes heroZoom { to { transform: scale(1); } }
.hero__veil {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(20,19,17,.55) 0%, rgba(20,19,17,0) 22%),
    linear-gradient(90deg, rgba(20,19,17,.72) 0%, rgba(20,19,17,.25) 55%, rgba(20,19,17,0) 80%),
    linear-gradient(0deg, rgba(20,19,17,.75) 0%, rgba(20,19,17,0) 45%);
}
.hero__content {
  position: relative;
  max-width: var(--container); width: 100%;
  margin: 0 auto; padding: 0 var(--gutter);
}
.hero__content h1 { max-width: 12ch; }
.hero__lead { max-width: 520px; font-size: 18px; opacity: .92; margin-bottom: 36px; }
.hero__price { font-family: var(--serif); font-size: clamp(32px, 4vw, 52px); line-height: 1; color: var(--bronze-light); margin: -16px 0 36px; }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 32px; }
.hero__facts {
  position: relative;
  list-style: none; margin: 64px auto 0; padding: 28px var(--gutter) 36px;
  max-width: var(--container); width: 100%;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
  border-top: 1px solid rgba(247,243,236,.28);
}
.hero__facts strong { display: block; font-family: var(--serif); font-weight: 400; font-size: clamp(30px, 3.2vw, 44px); line-height: 1; }
.hero__facts span { font-size: 11px; letter-spacing: .22em; text-transform: uppercase; opacity: .8; }

/* ---------- Intro ---------- */
.intro__grid { display: grid; grid-template-columns: 5fr 6fr; gap: clamp(40px, 8vw, 120px); align-items: start; }
.intro__text p:not(.lead) { color: var(--muted); }
.stats {
  margin-top: clamp(64px, 9vw, 120px);
  display: grid; grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid var(--line);
}
.stat { padding: 36px 24px 0 0; }
.stat + .stat { padding-left: 28px; border-left: 1px solid var(--line); }
.stat__num { display: block; font-family: var(--serif); font-size: clamp(44px, 5vw, 68px); line-height: 1; margin-bottom: 12px; }
.stat__num small { font-size: .4em; margin-left: 4px; color: var(--bronze); }
.stat__label { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.stat--highlight .stat__num { color: var(--bronze); }

/* ---------- Feature (image + texte) ---------- */
.feature__grid { display: grid; grid-template-columns: 7fr 5fr; gap: clamp(40px, 7vw, 110px); align-items: center; }
.feature--reverse .feature__media { order: 2; }
.feature__media { margin: 0; overflow: hidden; aspect-ratio: 4 / 5; }
.feature__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.6s var(--ease); }
.feature__media:hover img { transform: scale(1.03); }
.feature__text p { color: var(--muted); }
.ticks { list-style: none; padding: 0; margin: 28px 0 0; }
.ticks li { padding: 14px 0; border-top: 1px solid var(--line); }
.ticks li::before { content: "—"; color: var(--bronze); margin-right: 14px; }

/* ---------- Galerie ---------- */
.gallery__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: clamp(180px, 22vw, 300px);
  grid-auto-flow: dense;
  gap: 12px;
}
.g {
  padding: 0; border: 0; margin: 0; cursor: zoom-in;
  overflow: hidden; background: var(--ivory-2);
  position: relative;
}
.g img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease), filter .6s var(--ease); }
.g:hover img { transform: scale(1.05); filter: brightness(.9); }
.g:focus-visible { outline: 2px solid var(--bronze); outline-offset: 3px; }
.g--wide { grid-column: span 2; }
.g--tall { grid-row: span 2; }

/* ---------- Espaces ---------- */
.spaces__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1px solid rgba(247,243,236,.18); }
.level { padding: 40px 28px 8px 0; }
.level + .level { padding-left: 28px; border-left: 1px solid rgba(247,243,236,.18); }
.level__num { font-family: var(--serif); font-style: italic; font-size: 20px; color: var(--bronze-light); }
.level h3 { margin: 10px 0 24px; }
.level ul { list-style: none; padding: 0; margin: 0; }
.level li { padding: 10px 0; font-size: 15px; color: rgba(247,243,236,.78); border-bottom: 1px solid rgba(247,243,236,.08); }

/* ---------- Fiche technique ---------- */
.specs__grid { display: grid; grid-template-columns: 4fr 7fr; gap: clamp(40px, 8vw, 120px); }
.specs__list { margin: 0; display: grid; grid-template-columns: 1fr 1fr; column-gap: 48px; }
.specs__list div { display: flex; justify-content: space-between; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.specs__list dt { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.specs__list dd { margin: 0; font-family: var(--serif); font-size: 21px; text-align: right; }

/* ---------- Contact ---------- */
.contact__grid { display: grid; grid-template-columns: 5fr 6fr; gap: clamp(40px, 8vw, 120px); align-items: start; }
.contact__intro p:not(.eyebrow) { color: var(--muted); }
.form { display: grid; gap: 28px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.form label { display: grid; gap: 8px; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.form input, .form textarea {
  font: 300 17px/1.5 var(--sans); color: var(--ink);
  background: transparent; border: 0; border-bottom: 1px solid var(--line);
  padding: 10px 0; border-radius: 0; resize: vertical;
  transition: border-color .3s var(--ease);
}
.form input:focus, .form textarea:focus { outline: none; border-color: var(--bronze); }
.form button { justify-self: start; }
.form__alt { margin: -8px 0 0; font-size: 14px; color: var(--muted); }
.form__alt a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--bronze-light); }
.form__alt a:hover { color: var(--bronze); }
.form__disclaimer { margin: -8px 0 0; font-size: 12px; color: var(--muted); }
.form__note { font-size: 14px; color: var(--bronze); min-height: 1.5em; margin: 0; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 36px 0; font-size: 14px; }
.footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }

/* ---------- Lightbox ---------- */
.lightbox {
  width: 100vw; height: 100vh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: rgba(18, 17, 15, .96); color: var(--ivory);
}
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox::backdrop { background: rgba(18, 17, 15, .9); }
.lightbox figure { margin: 0; display: grid; justify-items: center; gap: 16px; }
.lightbox img { max-width: 86vw; max-height: 82vh; object-fit: contain; }
.lightbox figcaption { font-family: var(--serif); font-style: italic; font-size: 20px; opacity: .85; }
.lightbox button {
  position: absolute; background: none; border: 0; color: var(--ivory); cursor: pointer;
  font: 300 48px/1 var(--serif); padding: 16px 22px; opacity: .7; transition: opacity .3s;
}
.lightbox button:hover { opacity: 1; }
.lightbox__close { top: 12px; right: 16px; }
.lightbox__nav--prev { left: 8px; top: 50%; transform: translateY(-50%); }
.lightbox__nav--next { right: 8px; top: 50%; transform: translateY(-50%); }

/* ---------- Apparition au défilement ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

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

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .nav__links { display: none; }
  .stats { grid-template-columns: repeat(3, 1fr); }
  .spaces__grid { grid-template-columns: 1fr 1fr; }
  .level:nth-child(3) { padding-left: 0; border-left: 0; }
  .level:nth-child(n+3) { border-top: 1px solid rgba(247,243,236,.18); margin-top: 24px; }
  .specs__list { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .nav { padding-top: 16px; padding-bottom: 16px; }
  .nav__brand { font-size: 20px; }
  .nav__cta { padding: 11px 14px; font-size: 10px; letter-spacing: .16em; }
  .hero__facts { grid-template-columns: 1fr 1fr; margin-top: 40px; row-gap: 20px; }
  .intro__grid, .feature__grid, .specs__grid, .contact__grid { grid-template-columns: 1fr; }
  .feature--reverse .feature__media { order: 0; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat, .stat + .stat { padding: 28px 12px 24px 0; border-left: 0; }
  .stat:nth-child(even) { padding-left: 20px; border-left: 1px solid var(--line); }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .stat:last-child { grid-column: 1 / -1; padding-left: 0; }
  .gallery__grid { grid-template-columns: 1fr 1fr; grid-auto-rows: 42vw; gap: 8px; }
  .spaces__grid { grid-template-columns: 1fr; }
  .level, .level + .level { padding: 32px 0 8px; border-left: 0; margin-top: 0; }
  .level + .level { border-top: 1px solid rgba(247,243,236,.18); }
  .form__row { grid-template-columns: 1fr; }
  .lightbox img { max-width: 100vw; }
  .lightbox__nav { top: auto !important; bottom: 16px; transform: none !important; }
}

/* ---------- Ajustements ---------- */
.specs__grid > div:first-child { position: sticky; top: 120px; align-self: start; }
@media (max-width: 760px) {
  .br-desk { display: none; }
  .hero__veil { background: linear-gradient(0deg, rgba(20,19,17,.85) 0%, rgba(20,19,17,.55) 55%, rgba(20,19,17,.45) 100%); }
  .specs__grid > div:first-child { position: static; }
}
