/* ============================================================
   Maison Saint-Chamas — feuille de style
   Mobile-first. Palette chaleureuse pierre / bois / argile.
   ============================================================ */

:root {
  --bg:        #f6f1e9;   /* crème */
  --bg-alt:    #efe7da;   /* crème plus chaud */
  --ink:       #2c2a26;   /* presque noir chaud */
  --ink-soft:  #5e574c;   /* gris-brun */
  --line:      #e0d6c6;
  --clay:      #b06a4f;   /* terre cuite / argile */
  --clay-dk:   #8f513b;
  --olive:     #6f7257;   /* vert olive */
  --white:     #fffdf9;
  --shadow:    0 18px 40px -22px rgba(44,42,38,.45);

  --maxw: 1100px;
  --pad: clamp(1.15rem, 5vw, 3rem);
  --r: 14px;

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 17px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

::selection { background: var(--clay); color: #fff; }

/* ---------- EN-TÊTE ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem var(--pad);
  padding-top: calc(0.7rem + env(safe-area-inset-top));
  transition: background .35s ease, box-shadow .35s ease, padding .35s ease;
}
.site-header.scrolled {
  background: rgba(246,241,233,.92);
  backdrop-filter: saturate(140%) blur(10px);
  box-shadow: 0 1px 0 var(--line);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  text-decoration: none;
  font-family: var(--serif);
  font-size: 1.05rem;
  letter-spacing: .02em;
  color: #fff;
  text-shadow: 0 1px 14px rgba(0,0,0,.45);
  transition: color .35s ease, text-shadow .35s ease;
}
.scrolled .brand { color: var(--ink); text-shadow: none; }
.brand-mark { color: var(--clay); font-size: .9em; }

.nav { display: flex; align-items: center; gap: clamp(.6rem, 2.5vw, 1.6rem); }
.nav a {
  text-decoration: none;
  font-size: .82rem;
  font-weight: 500;
  letter-spacing: .03em;
  color: #fff;
  text-shadow: 0 1px 12px rgba(0,0,0,.5);
  transition: color .35s ease, text-shadow .35s ease, opacity .2s;
}
.scrolled .nav a { color: var(--ink-soft); text-shadow: none; }
.nav a:not(.nav-cta):hover { opacity: .7; }
/* Les liens texte (hors CTA) cachés sur petit écran pour rester épuré */
.nav a:not(.nav-cta) { display: none; }
.nav-cta {
  padding: .5rem .95rem;
  border-radius: 999px;
  background: var(--clay);
  color: #fff !important;
  text-shadow: none !important;
  font-weight: 600;
}
.nav-cta:hover { background: var(--clay-dk); }

@media (min-width: 760px) {
  .nav a:not(.nav-cta) { display: inline; }
}

/* ---------- HERO ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--pad);
  padding-bottom: clamp(2.5rem, 9vh, 5rem);
  color: #fff;
  isolation: isolate;
}
.hero__img, .hero__img img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: -2;
}
.hero__veil {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to top, rgba(20,17,13,.78) 0%, rgba(20,17,13,.20) 42%, rgba(20,17,13,.36) 100%);
}
.hero__content { max-width: 720px; }
.hero__eyebrow {
  font-size: .8rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #f3e4d3;
}
.hero__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.6rem, 11vw, 5.2rem);
  line-height: 1.02;
  letter-spacing: -.01em;
  text-shadow: 0 2px 30px rgba(0,0,0,.4);
}
.hero__sub {
  margin-top: 1.1rem;
  font-size: clamp(1rem, 4.2vw, 1.25rem);
  max-width: 34ch;
  color: #f1e9dd;
  text-shadow: 0 1px 16px rgba(0,0,0,.5);
}
.hero__stats {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin-top: 1.8rem;
}
.hero__stats li {
  background: rgba(255,255,255,.13);
  border: 1px solid rgba(255,255,255,.28);
  backdrop-filter: blur(6px);
  padding: .55rem .95rem;
  border-radius: 999px;
  font-size: .9rem;
  font-weight: 500;
  display: inline-flex;
  align-items: baseline;
  gap: .4rem;
  white-space: nowrap;
}
.hero__stats b { font-family: var(--serif); font-weight: 600; font-size: 1.05rem; }

.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 1.1rem;
  transform: translateX(-50%);
  width: 26px; height: 42px;
  border: 2px solid rgba(255,255,255,.6);
  border-radius: 999px;
  z-index: 2;
}
.hero__scroll span {
  position: absolute;
  left: 50%; top: 9px;
  width: 4px; height: 8px;
  margin-left: -2px;
  background: #fff;
  border-radius: 2px;
  animation: scrolldot 1.8s ease-in-out infinite;
}
@keyframes scrolldot { 0%{opacity:0;transform:translateY(0)} 40%{opacity:1} 80%{opacity:0;transform:translateY(12px)} 100%{opacity:0} }

/* ---------- SECTIONS ---------- */
.section { padding: clamp(3.5rem, 11vw, 7rem) var(--pad); }
.section--alt { background: var(--bg-alt); }
.intro { padding: clamp(3rem, 10vw, 6rem) var(--pad); }
.intro__lead {
  max-width: 30ch;
  margin: 0 auto;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.5rem, 6.2vw, 2.4rem);
  line-height: 1.3;
  text-align: center;
  text-wrap: balance;
}
@media (min-width:760px){ .intro__lead { max-width: 24ch; } }

.section__head { max-width: var(--maxw); margin: 0 auto clamp(2rem, 6vw, 3.2rem); }
.section__kicker {
  display: inline-block;
  font-size: .76rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--clay);
  margin-bottom: .8rem;
}
.section__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.9rem, 7.5vw, 3rem);
  line-height: 1.1;
  letter-spacing: -.01em;
  text-wrap: balance;
}
.section__intro {
  margin-top: .9rem;
  max-width: 52ch;
  color: var(--ink-soft);
  font-size: 1.02rem;
}

/* ---------- AVANT / APRÈS ---------- */
.ba { max-width: 900px; margin: 0 auto; }
.ba__frame {
  position: relative;
  width: 100%;
  aspect-ratio: 1844 / 853;
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: var(--shadow);
  touch-action: pan-y;          /* permet le scroll vertical, on gère l'horizontal */
  user-select: none;
  cursor: ew-resize;
  background: #d9cdbb;
}
.ba__after, .ba__before, .ba__after img, .ba__before img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.ba__before { clip-path: inset(0 50% 0 0); will-change: clip-path; }
.ba__tag {
  position: absolute; top: 12px;
  font-size: .72rem; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase;
  color: #fff;
  background: rgba(20,17,13,.6);
  backdrop-filter: blur(3px);
  padding: .35rem .7rem;
  border-radius: 999px;
  pointer-events: none;
}
.ba__tag--before { left: 12px; }
.ba__tag--after  { right: 12px; }

.ba__handle {
  position: absolute; top: 0; bottom: 0;
  left: 50%;
  width: 44px;
  margin-left: -22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: ew-resize;
  touch-action: none;
}
.ba__line {
  position: absolute; top: 0; bottom: 0; left: 50%;
  width: 3px; margin-left: -1.5px;
  background: #fff;
  box-shadow: 0 0 14px rgba(0,0,0,.4);
}
.ba__grip {
  position: relative;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 3px 14px rgba(0,0,0,.35);
  display: flex; align-items: center; justify-content: center;
  gap: 1px;
  color: var(--clay);
  font-style: normal;
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1;
}
.ba__grip i { font-style: normal; }
.ba__handle:focus-visible { outline: none; }
.ba__handle:focus-visible .ba__grip { box-shadow: 0 0 0 3px var(--clay), 0 3px 14px rgba(0,0,0,.35); }

/* ---------- GALERIE ---------- */
.gallery-group { max-width: var(--maxw); margin: 0 auto; }
.gallery-group + .gallery-group { margin-top: clamp(1.8rem, 4.5vw, 3rem); }
.gallery-group__title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.15rem, 4vw, 1.5rem);
  letter-spacing: -.01em;
  margin: 0 0 clamp(.75rem, 2vw, 1.05rem);
  display: flex;
  align-items: center;
  gap: .7rem;
}
.gallery-group__title::before {
  content: "";
  width: 26px; height: 3px;
  border-radius: 2px;
  background: var(--clay);
  flex: 0 0 auto;
}
.gallery {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(.5rem, 2vw, 1rem);
}
.gallery__item {
  position: relative;
  margin: 0;
  border-radius: var(--r);
  overflow: hidden;
  cursor: zoom-in;
  box-shadow: var(--shadow);
  background: #d9cdbb;
}
.gallery__item img {
  width: 100%; height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 3;
  transition: transform .6s cubic-bezier(.2,.7,.2,1);
}
.gallery__item--wide { grid-column: 1 / -1; }
.gallery__item--wide img { aspect-ratio: 16 / 9; }
.gallery__item:hover img { transform: scale(1.04); }
.gallery__item figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 1.4rem .9rem .7rem;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .02em;
  color: #fff;
  background: linear-gradient(to top, rgba(20,17,13,.7), transparent);
}

/* ---------- VISITE VIDÉO ---------- */
.video { max-width: 900px; margin: 0 auto; }
.video__player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 80vh;
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #14110d;
  object-fit: cover;
}

/* ---------- BANDEAU D'AMBIANCE (le lieu) ---------- */
.ambiance {
  max-width: var(--maxw);
  margin: 0 auto clamp(1rem, 3.5vw, 1.6rem);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(.5rem, 2vw, 1rem);
}
.ambiance__item {
  position: relative;
  margin: 0;
  border-radius: var(--r);
  overflow: hidden;
  cursor: zoom-in;
  box-shadow: var(--shadow);
  background: #d9cdbb;
}
.ambiance__item img {
  width: 100%; height: 100%;
  object-fit: cover;
  aspect-ratio: 3 / 2;
  transition: transform .6s cubic-bezier(.2,.7,.2,1);
}
.ambiance__item--wide { grid-column: 1 / -1; }
.ambiance__item--wide img { aspect-ratio: 16 / 9; }
.ambiance__item:hover img { transform: scale(1.04); }
.ambiance__item figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 1.4rem .9rem .7rem;
  font-size: .82rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(to top, rgba(20,17,13,.7), transparent);
}
@media (prefers-reduced-motion: reduce) { .ambiance__item img { transition: none; } }

/* ---------- CARACTÉRISTIQUES ---------- */
.specs {
  list-style: none;
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(.7rem, 2.5vw, 1.1rem);
}
.specs li {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 1.1rem 1.1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: .15rem;
}
.specs .spec__ico { font-size: 1.3rem; margin-bottom: .25rem; }
.specs .spec__val { font-family: var(--serif); font-weight: 600; font-size: 1.35rem; line-height: 1.1; }
.specs .spec__lbl { font-size: .82rem; color: var(--ink-soft); letter-spacing: .02em; }
.specs__note {
  max-width: var(--maxw);
  margin: 1.4rem auto 0;
  font-size: .85rem;
  color: var(--ink-soft);
  font-style: italic;
}
@media (min-width: 680px){ .specs { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 920px){ .specs { grid-template-columns: repeat(4, 1fr); } }

/* ---------- COMPOSITION / NIVEAUX ---------- */
.levels {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(.7rem, 2.5vw, 1.1rem);
}
@media (min-width: 680px) { .levels { grid-template-columns: repeat(3, 1fr); } }
.level {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 1.4rem 1.3rem;
}
.level__tag {
  display: inline-block;
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-weight: 600;
  color: #fff;
  background: var(--clay);
  padding: .35rem .75rem;
  border-radius: 999px;
  margin-bottom: .85rem;
}
.level p { color: var(--ink-soft); font-size: .97rem; }

.highlights {
  list-style: none;
  max-width: var(--maxw);
  margin: clamp(1rem, 3.5vw, 1.7rem) auto 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: .8rem;
}
@media (min-width: 760px) { .highlights { grid-template-columns: repeat(3, 1fr); } }
.highlights li {
  display: flex;
  gap: .9rem;
  align-items: flex-start;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 1.1rem 1.2rem;
}
.highlights li > span { font-size: 1.5rem; line-height: 1.1; flex: 0 0 auto; }
.highlights li strong { display: block; font-family: var(--serif); font-weight: 600; font-size: 1.08rem; margin-bottom: .25rem; }
.highlights li div { font-size: .9rem; color: var(--ink-soft); }

/* ---------- LOCALISATION ---------- */
.lieu-address {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-top: 1rem;
  padding: .5rem .9rem;
  border-radius: 999px;
  background: var(--white);
  border: 1px solid var(--line);
  font-weight: 600;
  font-size: .95rem;
}
.map { max-width: var(--maxw); margin: 0 auto; }
.map__embed {
  position: relative;
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 4 / 3;
  background: #e3dbcc;
}
@media (min-width: 680px){ .map__embed { aspect-ratio: 16 / 9; } }
.map__embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map__actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: .7rem;
  margin-top: 1rem;
}
@media (min-width: 560px){ .map__actions { grid-template-columns: repeat(3, 1fr); } }
.map__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  text-decoration: none;
  text-align: center;
  padding: .95rem 1rem;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--white);
  font-weight: 600;
  font-size: .92rem;
  transition: transform .15s ease, box-shadow .2s ease, background .2s;
}
.map__btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.map__btn--primary { background: var(--olive); color: #fff; border-color: var(--olive); }

/* ---------- CONTACT ---------- */
.section--contact { background: var(--ink); color: var(--bg); }
.section--contact .section__title { color: var(--white); }
.section--contact .section__kicker { color: #e0a487; }
.section--contact .section__intro { color: #c8c0b3; }
.contact {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: .8rem;
}
@media (min-width: 620px){ .contact { grid-template-columns: 1fr 1fr; } }
.contact__card {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  padding: 1.2rem 1.3rem;
  border-radius: var(--r);
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.14);
  transition: background .2s, transform .15s, border-color .2s;
}
.contact__card:hover { background: rgba(255,255,255,.12); transform: translateY(-2px); border-color: rgba(255,255,255,.3); }
.contact__ico {
  flex: 0 0 auto;
  width: 46px; height: 46px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--clay);
  font-size: 1.3rem;
}
.contact__meta { display: flex; flex-direction: column; min-width: 0; }
.contact__meta small { font-size: .76rem; letter-spacing: .08em; text-transform: uppercase; color: #b9b1a4; }
.contact__meta strong { font-family: var(--serif); font-weight: 600; font-size: 1.2rem; word-break: break-word; color: var(--white); }
.contact__agency {
  max-width: var(--maxw);
  margin: 1.4rem auto 0;
  font-size: .85rem;
  color: #b9b1a4;
  text-align: center;
}
.contact__lbc {
  max-width: var(--maxw);
  margin: .5rem auto 0;
  font-size: .9rem;
  color: #c8c0b3;
  text-align: center;
}
.contact__lbc a { color: #e0a487; }

/* ---------- PIED DE PAGE ---------- */
.footer {
  background: var(--ink);
  color: #9b9384;
  text-align: center;
  padding: 1.8rem var(--pad) calc(2.4rem + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(255,255,255,.08);
  font-size: .86rem;
}
.footer__fine { margin-top: .4rem; font-size: .76rem; max-width: 46ch; margin-inline: auto; opacity: .8; }

/* ---------- LIGHTBOX ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(20,17,13,.94);
  display: none;
  align-items: center;
  justify-content: center;
  padding: env(safe-area-inset-top) 1rem env(safe-area-inset-bottom);
}
.lightbox.open { display: flex; }
.lightbox__img {
  max-width: 100%;
  max-height: 86vh;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0,0,0,.6);
}
.lightbox__close, .lightbox__nav {
  position: absolute;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.25);
  color: #fff;
  width: 46px; height: 46px;
  border-radius: 50%;
  font-size: 1.4rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.lightbox__close:hover, .lightbox__nav:hover { background: rgba(255,255,255,.25); }
.lightbox__close { top: calc(1rem + env(safe-area-inset-top)); right: 1rem; }
.lightbox__nav--prev { left: .7rem; top: 50%; transform: translateY(-50%); }
.lightbox__nav--next { right: .7rem; top: 50%; transform: translateY(-50%); }

/* ---------- RÉVÉLATION AU SCROLL ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: none; }

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