/* ============================================================
   La Ferme Morin — v4 (multi-pages, style lodge sombre)
   Direction : photographique, sombre, aérée
   Menu transparent flottant, cross-fade entre pages
   ============================================================ */

:root {
  --ink:          #0e0d0a;      /* noir profond chaud */
  --ink-2:        #15130e;
  --forest:       #1d2621;
  --forest-2:     #141b18;
  --cream:        #f5eedd;
  --cream-soft:   rgba(245,238,221,0.72);
  --cream-dim:    rgba(245,238,221,0.55);
  --cream-trace:  rgba(245,238,221,0.18);
  --gold:         #b88c3e;
  --gold-soft:    #d4aa5a;
  --burgundy:     #5a201a;

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'Cormorant Garamond', Georgia, serif;
  --font-sans:    'Instrument Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  --maxw: 1440px;
  --gutter: clamp(20px, 4vw, 80px);

  --t-ease:   cubic-bezier(.4,0,.2,1);
  --t-slow:   1.2s var(--t-ease);
  --t-med:    .6s var(--t-ease);
  --t-quick:  .3s var(--t-ease);
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; }

body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.55;
  color: var(--cream);
  background: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

/* ---------- Utility type ---------- */
.eyebrow {
  font-family: var(--font-sans);
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--gold);
}
.eyebrow--dim { color: var(--cream-dim); }
.display-xl {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(3.2rem, 9vw, 8rem);
  line-height: 0.98;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.display-xl em { font-style: italic; font-weight: 300; }
.display-lg {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2.4rem, 5.5vw, 4.8rem);
  line-height: 1.02;
  letter-spacing: -0.005em;
  text-wrap: balance;
}
.display-lg em { font-style: italic; }
.display-md {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1.7rem, 3.2vw, 2.6rem);
  line-height: 1.1;
}
.display-md em { font-style: italic; }
.lede {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.1rem, 1.5vw, 1.3rem);
  line-height: 1.45;
  color: var(--cream-soft);
  text-wrap: pretty;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
  position: relative;
}

/* ============================================================
   NAV — transparent flottant, liens autour du logo centré
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 40;
  padding: 22px var(--gutter);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 2rem;
  background: transparent;
  transition: background .5s var(--t-ease), padding .4s var(--t-ease),
              backdrop-filter .5s var(--t-ease),
              border-color .5s var(--t-ease);
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  padding: 12px var(--gutter);
  background: rgba(14,13,10,0.78);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  border-bottom-color: rgba(245,238,221,0.1);
}

/* Pages avec background clair/photo dominante sans hero transparent :
   donner un fond subtil dès le départ via classe sur body */
body.light-nav .nav {
  background: rgba(14,13,10,0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
body.light-nav .nav.scrolled { background: rgba(14,13,10,0.85); }

.nav__left, .nav__right {
  display: flex;
  gap: clamp(18px, 2.2vw, 40px);
  font-family: var(--font-sans);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.74rem;
  align-items: center;
  color: var(--cream);
}
.nav__right { justify-content: flex-end; }

.nav__left a, .nav__right a {
  position: relative;
  padding: 6px 2px;
  color: var(--cream);
  opacity: 0.85;
  transition: opacity .3s, color .3s;
}
.nav__left a::after, .nav__right a::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px; background: var(--gold);
  transform: scaleX(0); transform-origin: center;
  transition: transform .5s var(--t-ease);
}
.nav__left a:hover, .nav__right a:hover { opacity: 1; color: var(--gold-soft); }
.nav__left a:hover::after, .nav__right a:hover::after { transform: scaleX(1); }
.nav__left a.active, .nav__right a.active { color: var(--gold-soft); opacity: 1; }
.nav__left a.active::after, .nav__right a.active::after { transform: scaleX(0.6); }

.nav__brand {
  display: flex; align-items: center; justify-content: center;
  transition: transform .4s var(--t-ease);
}
.nav__brand:hover { transform: scale(0.96); }
.nav__logo {
  height: 72px; width: auto;
  transition: height .4s var(--t-ease);
  filter: drop-shadow(0 2px 18px rgba(0,0,0,0.45));
}
.nav.scrolled .nav__logo { height: 48px; }

/* Burger */
.nav__burger {
  display: none;
  width: 36px; height: 22px; position: relative;
  color: var(--cream);
  justify-self: start;
}
.nav__burger span {
  position: absolute; left: 0; right: 0; height: 1px; background: currentColor;
  transition: transform .3s var(--t-ease), top .3s var(--t-ease), opacity .2s;
}
.nav__burger span:nth-child(1) { top: 4px; }
.nav__burger span:nth-child(2) { top: 11px; }
.nav__burger span:nth-child(3) { top: 18px; }
body.menu-open .nav__burger span:nth-child(1) { top: 11px; transform: rotate(45deg); }
body.menu-open .nav__burger span:nth-child(2) { opacity: 0; }
body.menu-open .nav__burger span:nth-child(3) { top: 11px; transform: rotate(-45deg); }

.nav__reserve {
  display: none;
  justify-self: end;
  padding: 10px 16px;
  border: 1px solid var(--cream);
  font-family: var(--font-sans);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.7rem;
}

/* Mobile menu overlay */
.mobile-menu {
  position: fixed; inset: 0; z-index: 50;
  background: var(--ink);
  padding: 140px var(--gutter) 40px;
  display: flex; flex-direction: column; gap: 1.25rem;
  transform: translateY(-100%);
  transition: transform .6s var(--t-ease);
  overflow-y: auto;
}
body.menu-open .mobile-menu { transform: translateY(0); }
.mobile-menu a {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 8vw, 3.2rem);
  font-weight: 300;
  line-height: 1.05;
  color: var(--cream);
}
.mobile-menu a em { font-style: italic; color: var(--gold-soft); }
.mobile-menu a.active { color: var(--gold-soft); }
.mobile-menu__meta {
  margin-top: auto;
  padding-top: 2rem;
  border-top: 1px solid var(--cream-trace);
  font-family: var(--font-sans);
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 0.74rem;
  color: var(--cream-dim);
}
.mobile-menu__meta a {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  color: var(--cream);
  text-transform: none;
  font-weight: 500;
  display: inline-block;
  margin-top: 4px;
}

/* ============================================================
   PAGE TRANSITION — cross-fade au chargement et au click
   ============================================================ */
.page {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .8s var(--t-ease), transform .8s var(--t-ease);
}
.page.page--ready {
  opacity: 1;
  transform: none;
}
body.page-leaving .page {
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity .35s var(--t-ease), transform .35s var(--t-ease);
}
/* Le rideau qui couvre l'écran un court instant */
.page-curtain {
  position: fixed; inset: 0; z-index: 200;
  background: var(--ink);
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s var(--t-ease);
}
body.page-leaving .page-curtain {
  opacity: 1;
}

/* ============================================================
   HERO — plein écran, slider, titre monumental
   ============================================================ */
.hero {
  position: relative;
  height: 100vh;
  min-height: 640px;
  width: 100%;
  overflow: hidden;
  background: var(--ink);
  color: var(--cream);
}
.hero__slides { position: absolute; inset: 0; }
.hero__slide {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 2s var(--t-ease);
}
.hero__slide.active { opacity: 1; }
.hero__slide.active::before {
  content: '';
  position: absolute; inset: 0;
  animation: slowZoom 14s ease-out forwards;
  background: inherit;
}
@keyframes slowZoom { from { transform: scale(1.08); } to { transform: scale(1); } }

.hero::after {
  content: '';
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(14,13,10,0.55) 0%, rgba(14,13,10,0) 22%, rgba(14,13,10,0) 55%, rgba(14,13,10,0.85) 100%);
  pointer-events: none;
}

.hero__inner {
  position: relative; z-index: 2;
  height: 100%;
  padding: calc(var(--gutter) + 80px) var(--gutter) calc(var(--gutter) + 20px);
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 2rem;
}
.hero__est {
  font-family: var(--font-sans);
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--cream-soft);
  display: flex; justify-content: space-between; gap: 2rem;
}
.hero__est .right { text-align: right; }

.hero__center {
  align-self: end;
  padding-bottom: clamp(20px, 5vh, 60px);
  max-width: min(620px, 70vw);
}
.hero__kicker {
  font-family: var(--font-sans);
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--gold-soft);
  margin-bottom: 1.5rem;
}
.hero__title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2.6rem, 7vw, 6.2rem);
  line-height: 1.02;
  letter-spacing: -0.01em;
  text-wrap: balance;
  margin: 0;
}
.hero__title em { font-style: italic; font-weight: 300; }

.hero__sub {
  margin-top: 1.75rem;
  max-width: 52ch;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.1rem, 1.4vw, 1.35rem);
  line-height: 1.45;
  color: var(--cream-soft);
}

.hero__bottom {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: end;
  gap: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--cream-trace);
  font-family: var(--font-sans);
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--cream-soft);
}
.hero__counter strong {
  display: inline-block;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: 2rem;
  color: var(--gold-soft);
  letter-spacing: 0;
  margin-right: 0.4rem;
  vertical-align: -0.1em;
  min-width: 2ch;
  text-align: left;
}
.hero__controls {
  justify-self: center;
  display: flex; gap: 10px;
}
.hero__controls button {
  width: 44px; height: 44px;
  border: 1px solid var(--cream-trace);
  color: var(--cream);
  font-size: 1rem;
  transition: background .3s, border-color .3s, color .3s;
}
.hero__controls button:hover {
  background: var(--cream); color: var(--ink); border-color: var(--cream);
}
.hero__cta { justify-self: end; display: flex; gap: 12px; }

/* ============================================================
   BOUTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.74rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  border: 1px solid currentColor;
  transition: all .4s var(--t-ease);
}
.btn--gold { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.btn--gold:hover { background: var(--gold-soft); border-color: var(--gold-soft); }
.btn--cream { background: var(--cream); color: var(--ink); border-color: var(--cream); }
.btn--cream:hover { background: transparent; color: var(--cream); }
.btn--outline { color: var(--cream); }
.btn--outline:hover { background: var(--cream); color: var(--ink); }
.btn--outline-ink { color: var(--ink); }
.btn--outline-ink:hover { background: var(--ink); color: var(--cream); }
.btn--ghost { color: var(--cream); border-color: var(--cream-trace); }
.btn--ghost:hover { background: var(--cream); color: var(--ink); border-color: var(--cream); }

.link-arrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-sans);
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  font-size: 0.74rem;
  color: var(--gold-soft);
  padding-bottom: 4px;
  border-bottom: 1px solid currentColor;
  transition: color .3s, gap .3s;
}
.link-arrow:hover { color: var(--cream); gap: 16px; }

/* ============================================================
   SECTION BASE
   ============================================================ */
.section {
  padding: clamp(80px, 11vw, 160px) 0;
  position: relative;
}
.section--cream { background: var(--cream); color: var(--ink); }
.section--cream .eyebrow { color: var(--burgundy); }
.section--cream .link-arrow { color: var(--burgundy); }
.section--cream .link-arrow:hover { color: var(--ink); }
.section--forest { background: var(--forest); }
.section--ink2 { background: var(--ink-2); }

.section-head {
  margin-bottom: clamp(60px, 8vw, 100px);
  display: grid;
  gap: 1.25rem;
}
.section-head.center { text-align: center; justify-items: center; }
.section-head .eyebrow { display: inline-flex; }

/* ============================================================
   FOOTER partagé
   ============================================================ */
.footer {
  background: var(--ink-2);
  color: var(--cream-soft);
  padding: 80px 0 40px;
  border-top: 1px solid var(--cream-trace);
}
.footer__top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.1fr 1.2fr;
  gap: 2.5rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--cream-trace);
}
.footer__brand img { height: 96px; width: auto; margin-bottom: 1rem; }
.footer__brand p {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1rem;
  color: var(--cream-soft);
  max-width: 30ch;
}
.footer h4 {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin-bottom: 1.25rem;
}
.footer ul li { margin-bottom: 0.6rem; }
.footer ul a {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--cream);
  transition: color .3s;
}
.footer ul a:hover { color: var(--gold-soft); }
.footer__contact p {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--cream);
  margin-bottom: 0.4rem;
  line-height: 1.4;
}
.footer__contact a { color: var(--cream); }
.footer__contact a:hover { color: var(--gold-soft); }
.footer__meta {
  padding-top: 2rem;
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between;
  font-family: var(--font-sans);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.68rem;
  color: var(--cream-dim);
}

/* ============================================================
   REVEAL
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 1s var(--t-ease), transform 1s var(--t-ease);
}
.reveal.visible { opacity: 1; transform: none; }

/* ============================================================
   PAGE HEADER (pour pages intérieures — hero compact)
   ============================================================ */
.page-header {
  position: relative;
  min-height: 80vh;
  color: var(--cream);
  overflow: hidden;
  background: var(--ink);
}
.page-header__bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  animation: slowZoom 14s ease-out forwards;
}
.page-header::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(14,13,10,0.4) 0%, rgba(14,13,10,0) 30%, rgba(14,13,10,0) 60%, rgba(14,13,10,0.9) 100%);
}
.page-header__inner {
  position: relative; z-index: 2;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: calc(var(--gutter) + 120px) var(--gutter) calc(var(--gutter) + 40px);
  min-height: 80vh;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 2rem;
}
.page-header__title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(3rem, 9vw, 7.5rem);
  line-height: 0.96;
  letter-spacing: -0.01em;
  max-width: 18ch;
  text-wrap: balance;
  align-self: end;
  padding-bottom: clamp(10px, 3vh, 40px);
}
.page-header__title em { font-style: italic; font-weight: 300; }
.page-header__sub {
  margin-top: 1.5rem;
  max-width: 50ch;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.1rem, 1.5vw, 1.35rem);
  line-height: 1.45;
  color: var(--cream-soft);
}
.page-header__meta {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--cream-trace);
  font-family: var(--font-sans);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--cream-soft);
}
.page-header__breadcrumb em {
  font-family: var(--font-display);
  font-style: italic;
  letter-spacing: 0;
  text-transform: none;
  font-size: 1rem;
  color: var(--gold-soft);
  margin: 0 8px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 960px) {
  .nav { grid-template-columns: 1fr auto 1fr; }
  .nav__left, .nav__right { display: none; }
  .nav__burger { display: block; }
  .nav__reserve { display: inline-flex; }
  .hero__inner { padding-top: calc(var(--gutter) + 100px); }
  .hero__est { flex-direction: column; gap: 0.5rem; }
  .hero__est .right { text-align: left; }
  .hero__bottom { grid-template-columns: 1fr; gap: 1.25rem; }
  .hero__cta { justify-self: start; flex-wrap: wrap; }
  .footer__top { grid-template-columns: 1fr 1fr; gap: 2rem 2rem; }
  .footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .footer__top { grid-template-columns: 1fr; }
  .hero__cta { width: 100%; }
  .hero__cta .btn { flex: 1; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .hero__slide.active::before { animation: none; }
  .page-header__bg { animation: none; }
}
