/* ============ VILLA ORA — cinématique encre & or ============ */
:root {
  --ink: #0b0a08;
  --ink-2: #12100d;
  --cream: #ece5d8;
  --cream-dim: rgba(236, 229, 216, .55);
  --gold: #cfae76;
  --gold-dim: rgba(207, 174, 118, .35);
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Jost", "Segoe UI", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--ink);
  color: var(--cream);
  font-family: var(--sans);
  font-weight: 300;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--gold); color: var(--ink); }

/* ---- grain + vignette ---- */
.grain {
  position: fixed; inset: -50%;
  pointer-events: none; z-index: 90;
  opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain-shift 1.2s steps(4) infinite;
}
@keyframes grain-shift {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-2%, 1%); }
  50% { transform: translate(1%, -2%); }
  75% { transform: translate(-1%, 2%); }
  100% { transform: translate(2%, -1%); }
}
.vignette {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 89;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,.45) 100%);
}

/* ---- topbar ---- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.6rem 2.4rem;
  mix-blend-mode: difference;
}
.topbar-brand {
  font-family: var(--sans); font-weight: 300;
  letter-spacing: .55em; font-size: .8rem;
}
.topbar-cta {
  color: var(--cream); text-decoration: none;
  font-size: .68rem; letter-spacing: .3em; text-transform: uppercase;
  border-bottom: 1px solid var(--gold-dim);
  padding-bottom: .25rem;
  transition: border-color .4s, opacity .4s;
}
.topbar-cta:hover { border-color: var(--gold); opacity: .8; }

/* ---- rail de progression ---- */
.rail {
  position: fixed; right: 2rem; top: 50%; transform: translateY(-50%);
  z-index: 100; display: flex; flex-direction: column; gap: 1.1rem;
}
.rail a {
  display: flex; align-items: center; gap: .7rem;
  justify-content: flex-end;
  text-decoration: none; color: var(--cream-dim);
}
.rail-label {
  font-size: .58rem; letter-spacing: .28em; text-transform: uppercase;
  opacity: 0; transform: translateX(6px);
  transition: opacity .4s, transform .4s;
}
.rail a:hover .rail-label, .rail a.active .rail-label { opacity: 1; transform: none; }
.rail-dot {
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--cream-dim);
  transition: background .4s, box-shadow .4s, transform .4s;
  flex-shrink: 0;
}
.rail a.active .rail-dot {
  background: var(--gold);
  box-shadow: 0 0 10px var(--gold);
  transform: scale(1.5);
}

/* ---- média + placeholder ---- */
.media { position: relative; overflow: hidden; background: var(--ink-2); }
.media video, .media img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
/* iOS : jamais de bouton play natif sur les vidéos d'ambiance */
video::-webkit-media-controls,
video::-webkit-media-controls-start-playback-button,
video::-webkit-media-controls-overlay-play-button {
  display: none !important;
  -webkit-appearance: none;
  opacity: 0;
}
.media.missing video, .media.missing img { display: none; }
.media.missing::before {
  content: "";
  position: absolute; inset: -40%;
  background:
    radial-gradient(ellipse 60% 45% at 30% 65%, rgba(207,174,118,.20), transparent 60%),
    radial-gradient(ellipse 55% 40% at 72% 30%, rgba(96, 84, 66, .35), transparent 65%),
    linear-gradient(160deg, #171410 0%, #0b0a08 55%, #131008 100%);
  animation: drift 22s ease-in-out infinite alternate;
}
@keyframes drift {
  from { transform: translate(-2%, -1%) scale(1); }
  to   { transform: translate(2%, 1.5%) scale(1.06); }
}
.media.missing::after {
  content: attr(data-prompt) "  ·  " attr(data-asset);
  position: absolute; left: 50%; bottom: 2rem; transform: translateX(-50%);
  font-family: var(--sans); font-size: .62rem;
  letter-spacing: .32em; text-transform: uppercase;
  color: rgba(236,229,216,.4);
  border: 1px solid rgba(236,229,216,.14);
  padding: .55rem 1.1rem; border-radius: 2rem;
  white-space: nowrap;
  backdrop-filter: blur(4px);
}

/* ---- hero ---- */
.hero-pin { height: 320vh; position: relative; }
.hero-sticky {
  position: sticky; top: 0; height: 100vh; overflow: hidden;
}
.media-hero { position: absolute; inset: 0; }
.media-hero::after { bottom: 7rem; }
.hero-overlay {
  position: absolute; inset: 0; z-index: 5;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; pointer-events: none;
  background: linear-gradient(to bottom, rgba(11,10,8,.25), transparent 30%, transparent 60%, rgba(11,10,8,.65));
}
.hero-kicker {
  font-size: .7rem; letter-spacing: .5em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 1.6rem;
}
.hero-title {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(3.2rem, 12vw, 10.5rem);
  letter-spacing: .12em;
  line-height: .95;
}
.hero-title .ch {
  display: inline-block;
  opacity: 0; transform: translateY(.4em) rotate(2deg);
  transition: opacity 1.1s cubic-bezier(.2,.7,.2,1), transform 1.1s cubic-bezier(.2,.7,.2,1);
}
.hero-title.in .ch { opacity: 1; transform: none; }
.hero-sub {
  margin-top: 1.8rem;
  font-family: var(--serif); font-style: italic; font-weight: 300;
  font-size: clamp(1rem, 2.2vw, 1.5rem);
  color: var(--cream-dim);
  opacity: 0; transition: opacity 1.4s ease 1.2s;
}
.hero-title.in + .hero-sub { opacity: 1; }
.hero-scroll-hint {
  position: absolute; bottom: 2.2rem; left: 50%; transform: translateX(-50%);
  z-index: 6; display: flex; flex-direction: column; align-items: center; gap: .8rem;
  font-size: .6rem; letter-spacing: .35em; text-transform: uppercase;
  color: var(--cream-dim);
}
.hero-scroll-hint span {
  width: 1px; height: 3.2rem;
  background: linear-gradient(to bottom, transparent, var(--gold));
  animation: hint 2.4s ease-in-out infinite;
  transform-origin: top;
}
@keyframes hint {
  0%, 100% { transform: scaleY(.3); opacity: .3; }
  50% { transform: scaleY(1); opacity: 1; }
}

/* ---- sections communes ---- */
section { position: relative; }
.section-kicker {
  font-size: .66rem; letter-spacing: .45em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 1.6rem;
}
.section-title {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(2rem, 4.6vw, 3.8rem);
  line-height: 1.12;
}
.section-title em, .bleed-title em {
  font-style: italic; color: var(--gold);
}

/* ---- reveals ---- */
.reveal {
  opacity: 0; transform: translateY(2.4rem);
  transition: opacity 1.1s cubic-bezier(.2,.7,.2,1), transform 1.1s cubic-bezier(.2,.7,.2,1);
}
.reveal.in { opacity: 1; transform: none; }

/* ---- facts ---- */
.facts {
  padding: 11rem 8vw 9rem;
  text-align: center;
}
.facts-grid {
  margin-top: 5.5rem;
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 2rem; max-width: 1100px; margin-inline: auto;
}
.fact { display: flex; flex-direction: column; gap: .8rem; }
.fact:nth-child(2) { transition-delay: .12s; }
.fact:nth-child(3) { transition-delay: .24s; }
.fact:nth-child(4) { transition-delay: .36s; }
.fact-num {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  color: var(--cream);
}
.fact-label {
  font-size: .64rem; letter-spacing: .35em; text-transform: uppercase;
  color: var(--cream-dim);
}

/* ---- full-bleed ---- */
.bleed { height: 130vh; }
.bleed-media {
  position: sticky; top: 0; height: 100vh; width: 100%;
}
.bleed-media video { will-change: transform; }
.bleed-caption {
  position: sticky; top: 0; height: 100vh;
  margin-top: -100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: flex-end;
  text-align: center; padding-bottom: 9rem;
  z-index: 5; pointer-events: none;
  background: linear-gradient(to bottom, transparent 55%, rgba(11,10,8,.7));
}
.bleed-title {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(1.9rem, 4.4vw, 3.6rem);
  line-height: 1.15;
}

/* ---- split intérieurs ---- */
.split {
  display: grid; grid-template-columns: 1fr 1.15fr;
  gap: 6vw; align-items: center;
  padding: 11rem 8vw;
  max-width: 1500px; margin-inline: auto;
}
.body-copy {
  margin-top: 2.2rem; max-width: 34rem;
  font-size: .98rem; line-height: 1.9;
  color: var(--cream-dim);
}
.detail-list { margin-top: 2.6rem; list-style: none; }
.detail-list li {
  padding: 1.1rem 0;
  border-top: 1px solid rgba(236,229,216,.1);
  font-size: .8rem; letter-spacing: .12em;
  color: var(--cream-dim);
}
.detail-list li:nth-child(2) { transition-delay: .1s; }
.detail-list li:nth-child(3) { transition-delay: .2s; }
.detail-list li:nth-child(4) { transition-delay: .3s; }
.split-media .media {
  aspect-ratio: 4 / 5; border-radius: 2px;
}
.split-media .media video { will-change: transform; }

/* ---- galerie ---- */
.gallery {
  padding: 6rem 8vw 11rem;
  max-width: 1500px; margin-inline: auto;
}
.gallery-grid {
  margin-top: 4rem;
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 4vw 3vw;
}
.gallery-item:nth-child(even) { transform: translateY(4.5rem); }
.gallery-item:nth-child(even).in { transform: translateY(2rem); }
.gallery-item .media {
  aspect-ratio: 4 / 5; cursor: pointer;
}
.gallery-item .media img {
  transition: transform 1.4s cubic-bezier(.2,.7,.2,1);
}
.gallery-item:hover .media img { transform: scale(1.05); }
.gallery-item figcaption {
  margin-top: 1.1rem;
  font-family: var(--serif); font-style: italic;
  font-size: .95rem; color: var(--cream-dim);
}

/* ---- prix ---- */
.price {
  padding: 13rem 8vw; text-align: center;
}
.price-amount {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(2.8rem, 8vw, 7rem);
  letter-spacing: .04em;
  color: var(--cream);
}
.price-note {
  margin-top: 1.8rem;
  font-size: .7rem; letter-spacing: .3em; text-transform: uppercase;
  color: var(--cream-dim);
}

/* ---- contact ---- */
.contact {
  padding: 9rem 8vw 10rem;
  background: linear-gradient(to bottom, var(--ink), #0e0c09);
}
.contact-inner {
  max-width: 1300px; margin-inline: auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 7vw;
  align-items: start;
}
.agent { margin-top: 3.4rem; }
.agent-name { font-family: var(--serif); font-size: 1.5rem; }
.agent-role {
  margin-top: .4rem;
  font-size: .66rem; letter-spacing: .32em; text-transform: uppercase;
  color: var(--gold);
}
.agent-line { margin-top: 1rem; font-size: .82rem; color: var(--cream-dim); }

.contact-form { display: flex; flex-direction: column; gap: 1.6rem; }
.contact-form label {
  display: flex; flex-direction: column; gap: .6rem;
  font-size: .62rem; letter-spacing: .3em; text-transform: uppercase;
  color: var(--cream-dim);
}
.contact-form input, .contact-form textarea {
  background: transparent;
  border: none; border-bottom: 1px solid rgba(236,229,216,.18);
  padding: .7rem 0;
  color: var(--cream);
  font-family: var(--serif); font-size: 1.15rem;
  outline: none; resize: none;
  transition: border-color .4s;
}
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--gold); }
.btn-gold {
  margin-top: 1.4rem; align-self: flex-start;
  background: transparent; color: var(--gold);
  border: 1px solid var(--gold-dim);
  padding: 1.1rem 2.6rem; border-radius: 3rem;
  font-family: var(--sans); font-size: .68rem;
  letter-spacing: .32em; text-transform: uppercase;
  cursor: pointer;
  transition: background .5s, color .5s, border-color .5s;
}
.btn-gold:hover { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.form-confirm {
  display: none;
  font-family: var(--serif); font-style: italic;
  font-size: 1.05rem; color: var(--gold);
}
.contact-form.sent .form-confirm { display: block; }
.contact-form.sent .btn-gold { display: none; }

/* ---- footer ---- */
.footer {
  padding: 5rem 8vw 4rem; text-align: center;
  border-top: 1px solid rgba(236,229,216,.08);
}
.footer-brand { letter-spacing: .55em; font-size: .8rem; }
.footer-line {
  margin-top: 1.2rem;
  font-size: .68rem; letter-spacing: .25em; text-transform: uppercase;
  color: var(--cream-dim);
}
.footer-legal {
  margin-top: 2.2rem; font-size: .6rem; letter-spacing: .15em;
  color: rgba(236,229,216,.28);
}

/* ---- responsive ---- */
@media (max-width: 900px) {
  .rail { display: none; }
  .facts-grid { grid-template-columns: repeat(2, 1fr); gap: 3rem 1.4rem; }
  .split { grid-template-columns: 1fr; padding: 7rem 7vw; }
  .gallery-grid { grid-template-columns: 1fr; gap: 3.5rem; }
  .gallery-item:nth-child(even), .gallery-item:nth-child(even).in { transform: none; }
  .contact-inner { grid-template-columns: 1fr; gap: 4rem; }
  .bleed { height: 110vh; }
  .media.missing::after {
    font-size: .52rem; padding: .45rem .8rem;
    letter-spacing: .2em;
  }
}

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

/* ---- hauteurs mobiles : éviter les sauts dus à la barre d'adresse ---- */
@supports (height: 100svh) {
  .hero-sticky, .bleed-media, .bleed-caption { height: 100svh; }
  .bleed-caption { margin-top: -100svh; }
}
