/* ============================================================
   THE CIRCLE SAMUI — Maquette D1 « Héritière Aman »
   Éditorial hôtelier : photo souveraine, serif light, blancs massifs.
   Palette « Sable & Lagon ».
   ============================================================ */

:root {
  --bg: #FAF7F2;
  --ink: #1F2421;
  --ink-60: rgba(31, 36, 33, 0.62);
  --ink-40: rgba(31, 36, 33, 0.42);
  --accent: #0E5E55;
  --terra: #C77B4F;
  --line: #E5DED2;
  --cream: #FAF7F2;
  --error: #B4452F;

  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Hanken Grotesk", -apple-system, "Segoe UI", sans-serif;

  --space-section: clamp(5.5rem, 12vw, 10.5rem);
  --container: min(1320px, 92vw);
  --header-h: 4.5rem;
}

/* ---------- Reset & base ---------- */

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

ul, ol { list-style: none; }
s { color: var(--ink-40); text-decoration-thickness: 1px; }

.container { width: var(--container); margin-inline: auto; }

/* Piles verticales en grid : la colonne implicite doit respecter la largeur
   du conteneur (sinon les max-width en ch créent des débordements rognés).
   Les templates multi-colonnes des media queries plus bas reprennent la main. */
.paths, .path__body, .villa-card__body, .cercle__inner, .split, .split__body,
.louer-band .container, .testimonials, .quote, .journal-grid, .article-card,
.footer-grid, .footer-brand, .story, .story__head, .demande, .demande__intro,
.form, .field, .duo, .panel, .similar-grid, .villa-head, .villa-head__main,
.price-block, .mobile-menu__foot {
  grid-template-columns: minmax(0, 1fr);
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--ink); color: var(--cream);
  padding: 0.6rem 1.2rem; font-size: 0.85rem;
  transition: top 0.25s ease;
}
.skip-link:focus { top: 1rem; }

/* ---------- Typographie ---------- */

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 300;
  line-height: 1.08;
  letter-spacing: -0.01em;
}

h2 { font-size: clamp(1.9rem, 4.2vw, 3.1rem); }
h3 { font-size: clamp(1.35rem, 2.6vw, 1.8rem); }

/* L'accent lagon est réservé aux CTA et liens : les kickers restent neutres. */
.kicker {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-40);
}
.kicker--muted { color: var(--ink-40); }

.lede {
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: var(--ink-60);
  max-width: 56ch;
}

.section-head { margin-bottom: clamp(2.5rem, 5vw, 4.5rem); }
.section-head .kicker { display: block; margin-bottom: 1.1rem; }
.section-head h2 { max-width: 22ch; }
.section-head .lede { margin-top: 1.25rem; }
.section-head--tight { margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head__cta { margin-top: 1.5rem; }

/* ---------- Boutons & liens ---------- */

.btn {
  display: inline-block;
  border: 1px solid var(--accent);
  color: var(--accent);
  background: transparent;
  padding: 1rem 1.9rem;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.45s ease, color 0.45s ease, border-color 0.45s ease;
}
.btn:hover { background: var(--accent); color: var(--cream); }

.btn--solid { background: var(--accent); color: var(--cream); }
.btn--solid:hover { background: #0B4B44; border-color: #0B4B44; }

.btn--cream { border-color: var(--cream); color: var(--cream); }
.btn--cream:hover { background: var(--cream); color: var(--ink); }

.link-arrow {
  display: inline-flex;
  align-items: baseline;
  gap: 0.55em;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.link-arrow::after {
  content: "\2192";
  font-size: 1.05em;
  transition: transform 0.4s ease;
}
.link-arrow:hover::after { transform: translateX(0.4em); }

.link-arrow--cream { color: var(--cream); }
.link-arrow--ink { color: var(--ink); }

/* ---------- Header ---------- */

/* Solide par défaut : lisible sans JS sur toute page et à tout scroll.
   JS pose .is-overlay (transparent, cream) uniquement en haut du hero. */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(250, 247, 242, 0.97);
  color: var(--ink);
  transition: background 0.45s ease, color 0.45s ease, border-color 0.45s ease;
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.site-header.is-overlay {
  background: transparent;
  color: var(--cream);
  border-bottom-color: transparent;
}
.menu-open .site-header {
  background: rgba(250, 247, 242, 0.97);
  color: var(--ink);
  border-bottom-color: var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  white-space: nowrap;
}
.brand__ring {
  width: 0.95rem; height: 0.95rem;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  flex: none;
}
.brand small {
  display: block;
  font-size: 0.55rem;
  font-weight: 500;
  letter-spacing: 0.34em;
  opacity: 0.7;
}

.site-nav { display: none; }

.header-aside {
  display: flex;
  align-items: center;
  gap: 1.4rem;
}

/* Switchers langue/devise : de vrais <button> (non câblés en maquette),
   pour ne pas mimer des contrôles actifs avec des spans inertes. */
.lang-switch button,
.switch-group button,
.currency-switch button {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: inherit;
  cursor: pointer;
}

.lang-switch {
  display: inline-flex;
  gap: 0.6rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
}
.lang-switch button { opacity: 0.45; }
.lang-switch .is-active { opacity: 1; border-bottom: 1px solid currentColor; padding-bottom: 1px; }

.header-cta { display: none; }

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  padding: 10px;
  background: none;
  border: 0;
  cursor: pointer;
  color: inherit;
}
.nav-toggle span {
  display: block;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.35s ease, opacity 0.35s ease;
}
.menu-open .nav-toggle span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.menu-open .nav-toggle span:nth-child(2) { opacity: 0; }
.menu-open .nav-toggle span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Menu mobile */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 45;
  background: var(--bg);
  padding: calc(var(--header-h) + 2rem) 6vw 3rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
.menu-open .mobile-menu { visibility: visible; opacity: 1; }
.menu-open body { overflow: hidden; }

.mobile-menu nav a {
  display: block;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1.9rem, 7vw, 2.6rem);
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--line);
}
.mobile-menu__foot {
  font-size: 0.85rem;
  color: var(--ink-60);
  display: grid;
  gap: 0.4rem;
  padding-top: 2rem;
}
.mobile-menu__foot a { color: var(--ink); }

@media (min-width: 1024px) {
  .nav-toggle, .mobile-menu { display: none; }
  .site-nav {
    display: flex;
    gap: 2.2rem;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
  }
  .site-nav a { opacity: 0.85; transition: opacity 0.3s ease; padding: 0.4rem 0; }
  .site-nav a:hover { opacity: 1; }
  .header-cta {
    display: inline-flex;
    align-items: baseline;
    gap: 0.5em;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    border-bottom: 1px solid currentColor;
    padding-bottom: 2px;
  }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  color: var(--cream);
  isolation: isolate;
}
.hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
  overflow: hidden;
}
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(31, 36, 33, 0.38) 0%, rgba(31, 36, 33, 0) 26%),
    linear-gradient(180deg, rgba(31, 36, 33, 0) 42%, rgba(31, 36, 33, 0.58) 100%);
}
.hero__content {
  width: var(--container);
  margin-inline: auto;
  padding-bottom: clamp(3.5rem, 8vw, 6.5rem);
}
.hero__kicker {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  opacity: 0.85;
  margin-bottom: 1.4rem;
}
.hero h1 {
  font-size: clamp(2.9rem, 8.5vw, 6rem);
  max-width: 12ch;
  margin-bottom: 2.2rem;
}
.hero h1 em { font-style: italic; }

/* ---------- Sections génériques ---------- */

.section { padding-block: var(--space-section); }
.section--hairline { border-top: 1px solid var(--line); }
.section--tight { padding-block: clamp(3.5rem, 7vw, 6rem); }
.section--tight-top { padding-top: clamp(3.5rem, 7vw, 6rem); }
.section--flush-top { padding-top: 0; }

/* ---------- Entrée catalogue ---------- */

.paths { display: grid; gap: clamp(2.5rem, 5vw, 3.5rem); }

.path {
  display: block;
}
.path .media {
  overflow: hidden;
  background: var(--line);
}
.path .media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.4s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.path:hover .media img { transform: scale(1.035); }

.path__body {
  padding-top: 1.3rem;
  display: grid;
  gap: 0.45rem;
}
.path__num {
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-40);
}
.path__title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
}
.path__desc { color: var(--ink-60); font-size: 0.95rem; max-width: 42ch; }
.path .link-arrow { margin-top: 0.5rem; }

@media (min-width: 900px) {
  .paths {
    grid-template-columns: 7fr 5fr;
    grid-template-rows: 1fr 1fr;
  }
  .path--lead { grid-row: 1 / 3; display: flex; flex-direction: column; }
  .path--lead .media { flex: 1; }
  .path--lead .media img { height: 100%; }
}

/* ---------- Cards villas ---------- */

.villas-grid {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 1rem;
  margin-inline: calc((100vw - var(--container)) / -2);
  padding-inline: calc((100vw - var(--container)) / 2);
  scrollbar-width: none;
}
.villas-grid::-webkit-scrollbar { display: none; }
.villas-grid > * {
  flex: 0 0 84vw;
  max-width: 420px;
  scroll-snap-align: center;
}

.villa-card { display: flex; flex-direction: column; }

.villa-card__media {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--line);
}
.villa-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 3;
  transition: transform 1.4s cubic-bezier(0.22, 0.61, 0.36, 1), filter 0.6s ease;
}
.villa-card:hover .villa-card__media img { transform: scale(1.035); }
.villa-card--muted .villa-card__media img { filter: saturate(0.55); }

.badges {
  position: absolute;
  top: 0.9rem;
  left: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  z-index: 2;
}
.badge {
  display: inline-block;
  padding: 0.38rem 0.7rem;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  background: rgba(250, 247, 242, 0.94);
  color: var(--ink);
}
.badge--terra { background: var(--terra); color: var(--cream); }
.badge--ink { background: rgba(31, 36, 33, 0.85); color: var(--cream); }

.villa-card__body { padding-top: 1.25rem; display: grid; gap: 0.4rem; }
.villa-card__loc {
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-40);
}
.villa-card__name {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1.45rem, 2.4vw, 1.8rem);
}
.villa-card__name a { transition: color 0.3s ease; }
.villa-card__name a:hover { color: var(--accent); }
.villa-card__specs { font-size: 0.9rem; color: var(--ink-60); }
.villa-card__price {
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-top: 0.35rem;
}
.villa-card__price s { font-weight: 400; margin-right: 0.6em; }
.villa-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem;
  margin-top: 0.9rem;
}

@media (min-width: 900px) {
  .villas-grid {
    display: grid;
    grid-template-columns: 1.45fr 1fr;
    gap: clamp(2rem, 4vw, 3.5rem);
    overflow: visible;
    margin-inline: 0;
    padding-inline: 0;
    padding-bottom: 0;
  }
  .villas-grid > * { flex: none; max-width: none; }
  .villa-card--lead { grid-row: 1 / 3; }
  .villa-card--lead .villa-card__media { flex: 1; }
  .villa-card--lead .villa-card__media img { aspect-ratio: auto; height: 100%; min-height: 540px; }
}

/* ---------- Entrer dans le Cercle ---------- */

.cercle {
  position: relative;
  padding-block: clamp(7rem, 16vw, 13rem);
  text-align: center;
  overflow: hidden;
}
.cercle::before {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: min(640px, 92vw);
  aspect-ratio: 1;
  border: 1px solid var(--terra);
  border-radius: 50%;
  opacity: 0.5;
  pointer-events: none;
}
.cercle::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: min(820px, 110vw);
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 50%;
  pointer-events: none;
}
.cercle__inner {
  position: relative;
  z-index: 1;
  width: min(560px, 88vw);
  margin-inline: auto;
  display: grid;
  gap: 1.5rem;
  justify-items: center;
}
.cercle h2 {
  font-size: clamp(2.3rem, 6vw, 3.6rem);
  font-style: italic;
}
.cercle p { color: var(--ink-60); max-width: 46ch; }

.cercle-form {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: end;
  gap: 0.9rem;
  width: 100%;
  margin-top: 0.5rem;
}
.cercle-form__field {
  flex: 1 1 240px;
  display: grid;
  gap: 0.5rem;
  text-align: left;
}
.cercle-form__field label {
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-60);
}
.cercle-form input[type="email"] {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--ink);
  padding: 0.85rem 0.2rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--ink);
}
.cercle__micro {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--ink-40);
}

.form-confirm {
  font-family: var(--font-display);
  font-weight: 300;
  font-style: italic;
  font-size: 1.3rem;
  color: var(--accent);
  padding-block: 1rem;
}

/* ---------- Conciergerie ---------- */

.split {
  display: grid;
  gap: clamp(2.5rem, 5vw, 4rem);
  align-items: center;
}
.split .media { overflow: hidden; background: var(--line); }
.split .media img { width: 100%; height: auto; }
.split__body { display: grid; gap: 1.3rem; justify-items: start; }
.split__body h2 { max-width: 16ch; }
.split__body p { color: var(--ink-60); max-width: 52ch; }
.split__secondary { font-size: 0.9rem; color: var(--ink-60); }
.split__secondary a { color: var(--accent); border-bottom: 1px solid currentColor; }

/* Variante pleine page : l'image file jusqu'au bord du viewport,
   le texte reste calé sur la grille du container. */
.split--bleed { gap: clamp(2rem, 5vw, 4rem); }
.split--bleed .split__body { width: var(--container); margin-inline: auto; }

@media (min-width: 900px) {
  .split { grid-template-columns: 5fr 6fr; }
  .split--bleed {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    align-items: center;
  }
  .split--bleed .split__body {
    width: auto;
    margin: 0;
    padding-left: calc((100vw - var(--container)) / 2);
  }
  .split--bleed .media { order: 2; height: 100%; }
  .split--bleed .media img { height: 100%; object-fit: cover; }
}

/* ---------- Bande Louer ---------- */

.louer-band {
  border-block: 1px solid var(--line);
  padding-block: clamp(2.5rem, 5vw, 3.5rem);
}
.louer-band .container {
  display: grid;
  gap: 1.2rem;
}
.louer-band h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
.louer-band p { color: var(--ink-60); max-width: 56ch; }
@media (min-width: 900px) {
  .louer-band .container {
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 3rem;
  }
  .louer-band p { margin: 0; }
}

/* ---------- KPI ---------- */

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.8rem 1.5rem;
}
.kpi {
  border-top: 1px solid var(--line);
  padding-top: 1.4rem;
}
.kpi__num {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.kpi__num sup {
  font-size: 0.45em;
  vertical-align: 0.85em;
}
.kpi__label {
  margin-top: 0.7rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-60);
}
@media (min-width: 900px) {
  .kpi-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- Témoignages ---------- */

.testimonials {
  display: grid;
  gap: clamp(3rem, 6vw, 4.5rem);
  margin-top: clamp(4rem, 8vw, 6.5rem);
}

.quote { display: grid; gap: 1.4rem; }
.quote blockquote {
  font-family: var(--font-display);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(1.3rem, 2.6vw, 1.85rem);
  line-height: 1.35;
  max-width: 30ch;
}
.quote--lead blockquote {
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  max-width: 34ch;
}
.quote figcaption {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.quote figcaption small {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--ink-40);
}

@media (min-width: 900px) {
  .testimonials { grid-template-columns: 1fr 1fr; }
  .quote--lead { grid-column: 1 / -1; }
}

/* ---------- Journal ---------- */

.journal-grid { display: grid; gap: clamp(2.5rem, 5vw, 4rem); }

.article-card { display: grid; gap: 1.1rem; align-content: start; }
.article-card .media { overflow: hidden; background: var(--line); }
.article-card .media img { width: 100%; height: auto; }
.article-card__meta {
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-40);
}
.article-card h3 { max-width: 26ch; }
.article-card p { color: var(--ink-60); font-size: 0.95rem; max-width: 52ch; }

@media (min-width: 900px) {
  .journal-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--ink);
  color: rgba(250, 247, 242, 0.85);
  padding: clamp(4rem, 8vw, 6.5rem) 0 2.5rem;
  font-size: 0.92rem;
}
.site-footer a { transition: color 0.3s ease; }
.site-footer a:hover { color: var(--cream); }

.footer-grid {
  display: grid;
  gap: 3rem;
  padding-bottom: 3.5rem;
}
.footer-brand { display: grid; gap: 1.2rem; justify-items: start; }
.footer-brand .brand { color: var(--cream); }
.footer-brand p {
  font-family: var(--font-display);
  font-weight: 300;
  font-style: italic;
  font-size: 1.25rem;
  color: rgba(250, 247, 242, 0.65);
  max-width: 24ch;
}

.footer-col h3 {
  font-family: var(--font-body);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(250, 247, 242, 0.5);
  margin-bottom: 1.2rem;
}
.footer-col ul { display: grid; gap: 0.65rem; }
.footer-col address { font-style: normal; }

.footer-switches {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2.5rem;
  padding-block: 1.6rem;
  border-block: 1px solid rgba(250, 247, 242, 0.16);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.switch-group { display: inline-flex; align-items: center; gap: 0.9rem; }
.switch-group .switch-label { color: rgba(250, 247, 242, 0.45); }
.switch-group button { opacity: 0.45; }
.switch-group .is-active {
  opacity: 1;
  border-bottom: 1px solid var(--cream);
  padding-bottom: 1px;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 2rem;
  padding-top: 1.8rem;
  font-size: 0.75rem;
  color: rgba(250, 247, 242, 0.45);
}
.footer-bottom .legal { border-bottom: 1px solid currentColor; padding-bottom: 1px; }

@media (min-width: 900px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem; }
}

/* ---------- Widget WhatsApp ---------- */

.wa-widget {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 40;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--cream);
  border-radius: 50%;
  box-shadow: 0 2px 14px rgba(31, 36, 33, 0.28);
  transition: transform 0.35s ease, background 0.35s ease;
}
.wa-widget:hover { transform: translateY(-3px); background: #0B4B44; }
.wa-widget svg { width: 26px; height: 26px; fill: currentColor; }

/* ============================================================
   PAGE VILLA
   ============================================================ */

.villa-top {
  padding-top: calc(var(--header-h) + clamp(2rem, 5vw, 3.5rem));
  padding-bottom: clamp(2rem, 4vw, 3rem);
}

.breadcrumb {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-40);
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: clamp(2rem, 5vw, 3.2rem);
}
.breadcrumb a { color: var(--ink-60); }
.breadcrumb a:hover { color: var(--accent); }

.villa-head {
  display: grid;
  gap: 2rem;
  align-items: end;
}
.villa-head__main { display: grid; gap: 1.1rem; justify-items: start; }
.villa-head h1 {
  font-size: clamp(2.6rem, 6vw, 4.4rem);
}
.villa-head .badges { position: static; }
.villa-head .badge { font-size: 0.66rem; padding: 0.5rem 0.85rem; }

.price-block { display: grid; gap: 0.7rem; justify-items: start; }
.price-block__price {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  line-height: 1;
}
.price-block__approx { font-size: 0.82rem; color: var(--ink-40); }

.currency-switch {
  display: inline-flex;
  gap: 0.2rem;
  border: 1px solid var(--line);
}
.currency-switch button {
  padding: 0.45rem 0.75rem;
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--ink-40);
}
.currency-switch .is-active {
  background: var(--ink);
  color: var(--cream);
}

@media (min-width: 1024px) {
  .villa-head { grid-template-columns: 1fr auto; }
  .price-block { justify-items: end; text-align: right; }
}

/* ---------- Galerie ---------- */

.gallery-wrap { position: relative; }

.gallery {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.gallery::-webkit-scrollbar { display: none; }
.gallery figure {
  flex: 0 0 86vw;
  scroll-snap-align: center;
}
.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 3;
}

.gallery-cta {
  margin-top: 1rem;
  width: 100%;
  text-align: center;
}
/* Mobile : compteur statique sous la galerie, jamais par-dessus le CTA. */
.gallery-count {
  margin-top: 0.85rem;
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-40);
}

@media (min-width: 900px) {
  .gallery {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: 290px 290px;
    gap: 0.75rem;
    overflow: visible;
  }
  .gallery figure { flex: none; }
  .gallery figure:nth-child(1) { grid-column: 1 / 7; grid-row: 1 / 3; }
  .gallery figure:nth-child(2) { grid-column: 7 / 10; grid-row: 1; }
  .gallery figure:nth-child(3) { grid-column: 10 / 13; grid-row: 1; }
  .gallery figure:nth-child(4) { grid-column: 7 / 10; grid-row: 2; }
  .gallery figure:nth-child(5) { grid-column: 10 / 13; grid-row: 2; }
  .gallery img { aspect-ratio: auto; }
  .gallery-count {
    position: absolute;
    left: 0.9rem;
    bottom: 0.9rem;
    z-index: 2;
    margin: 0;
    padding: 0.4rem 0.75rem;
    background: rgba(31, 36, 33, 0.72);
    color: var(--cream);
    pointer-events: none;
  }
  .gallery-cta {
    position: absolute;
    right: 1rem;
    bottom: 1rem;
    margin: 0;
    width: auto;
    background: rgba(250, 247, 242, 0.96);
    border-color: var(--ink);
    color: var(--ink);
  }
  .gallery-cta:hover { background: var(--ink); border-color: var(--ink); color: var(--cream); }
}

/* ---------- Story & specs ---------- */

.story { display: grid; gap: clamp(2rem, 5vw, 4rem); }
.story__head { display: grid; gap: 1.1rem; align-content: start; }
.story__body p { color: var(--ink-60); max-width: 62ch; }
.story__body p + p { margin-top: 1.3rem; }
.story__body strong { color: var(--ink); font-weight: 600; }

@media (min-width: 900px) {
  .story { grid-template-columns: 4fr 7fr; }
}

.specs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.2rem 1.5rem;
}
.spec {
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}
.spec__value { font-size: 1.05rem; font-weight: 600; }
.spec__label {
  margin-top: 0.3rem;
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-40);
}
@media (min-width: 900px) {
  .specs-grid { grid-template-columns: repeat(5, 1fr); }
}

/* ---------- Bloc demande ---------- */

.demande {
  border: 1px solid var(--line);
  padding: clamp(2rem, 5vw, 4rem);
  display: grid;
  gap: clamp(2.5rem, 5vw, 4rem);
}
.demande__intro { display: grid; gap: 1.2rem; justify-items: start; align-content: start; }
.demande__intro p { color: var(--ink-60); max-width: 44ch; }
.demande__intro .btn { margin-top: 0.5rem; }
.demande__hint { font-size: 0.78rem; color: var(--ink-40); }

@media (min-width: 900px) {
  .demande { grid-template-columns: 1fr 1fr; }
}

.form { display: grid; gap: 1.4rem; }
.field { display: grid; gap: 0.45rem; }
.field label {
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-60);
}
.field input,
.field textarea {
  background: transparent;
  border: 1px solid var(--line);
  padding: 0.9rem 1rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--ink);
  transition: border-color 0.3s ease;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field textarea:focus { border-color: var(--accent); outline: none; }

.field .error {
  display: none;
  font-size: 0.78rem;
  color: var(--error);
}
.field input:user-invalid,
.field textarea:user-invalid,
.field input.touched:invalid,
.field textarea.touched:invalid { border-color: var(--error); }
.field input:user-invalid ~ .error,
.field textarea:user-invalid ~ .error,
.field input.touched:invalid ~ .error,
.field textarea.touched:invalid ~ .error { display: block; }

.cercle-form input:user-invalid,
.cercle-form input.touched:invalid { border-bottom-color: var(--error); }

/* ---------- RDV & simulateur ---------- */

.duo { display: grid; gap: clamp(2.5rem, 5vw, 4rem); align-items: start; }
@media (min-width: 900px) { .duo { grid-template-columns: 1fr 1fr; } }

.panel {
  border: 1px solid var(--line);
  padding: clamp(1.8rem, 4vw, 2.8rem);
  display: grid;
  gap: 1.4rem;
  justify-items: start;
}
.panel h3 { max-width: 18ch; }
.panel > p { color: var(--ink-60); font-size: 0.92rem; }

.calendar { width: 100%; }
.calendar__title {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.calendar__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.3rem;
  text-align: center;
  font-size: 0.82rem;
}
.calendar__grid .dow {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-40);
  padding-block: 0.4rem;
}
.calendar__grid .day {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  font-variant-numeric: tabular-nums;
  color: var(--ink-60);
}
.calendar__grid .day--past { opacity: 0.32; }
.calendar__grid .day--open {
  border: 1px solid var(--accent);
  border-radius: 50%;
  color: var(--accent);
  font-weight: 600;
}
.calendar__legend {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.74rem;
  color: var(--ink-60);
  margin-top: 1rem;
}
.calendar__legend i {
  width: 0.85rem; height: 0.85rem;
  border: 1px solid var(--accent);
  border-radius: 50%;
  flex: none;
}

.yield__figure {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(3.2rem, 8vw, 4.6rem);
  line-height: 1;
}
.yield__figure sup { font-size: 0.4em; vertical-align: 1em; }
.yield-rows { width: 100%; display: grid; }
.yield-rows > div {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 0.85rem;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
}
.yield-rows dt { color: var(--ink-60); }
.yield-rows dd { font-weight: 600; white-space: nowrap; }
.panel__note { font-size: 0.76rem; color: var(--ink-40); }

/* ---------- Visite virtuelle ---------- */

.tour {
  position: relative;
  overflow: hidden;
  background: var(--line);
}
.tour img { width: 100%; height: auto; }
.tour__play {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.1rem;
  text-align: center;
  padding: 1.5rem;
  color: var(--cream);
  background: linear-gradient(180deg, rgba(31, 36, 33, 0.1), rgba(31, 36, 33, 0.45));
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: background 0.6s ease;
}
.tour__play:hover { background: linear-gradient(180deg, rgba(31, 36, 33, 0.2), rgba(31, 36, 33, 0.55)); }
.tour__icon {
  width: clamp(3.4rem, 7vw, 4.6rem);
  aspect-ratio: 1;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: transform 0.45s ease;
}
.tour__icon::after {
  content: "";
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0.5rem 0 0.5rem 0.85rem;
  border-color: transparent transparent transparent currentColor;
  margin-left: 0.15rem;
}
.tour__play:hover .tour__icon { transform: scale(1.06); }

/* ---------- Villas similaires ---------- */

.similar-grid { display: grid; gap: clamp(2.5rem, 5vw, 4rem); }
@media (min-width: 900px) { .similar-grid { grid-template-columns: 1fr 1fr; } }

/* ---------- Dialog photos ---------- */

dialog.capture {
  width: min(480px, calc(100vw - 2.5rem));
  border: none;
  background: var(--bg);
  color: var(--ink);
  padding: clamp(2rem, 5vw, 2.8rem);
  margin: auto;
}
dialog.capture::backdrop { background: rgba(31, 36, 33, 0.6); }

.dialog-close {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  width: 40px; height: 40px;
  background: none;
  border: 0;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--ink-60);
  cursor: pointer;
}
.dialog-close:hover { color: var(--ink); }

dialog.capture .kicker { display: block; margin-bottom: 0.8rem; }
dialog.capture h2 {
  font-size: 1.7rem;
  margin-bottom: 0.9rem;
}
dialog.capture > p { color: var(--ink-60); font-size: 0.92rem; margin-bottom: 1.5rem; }

.dialog-alt {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.88rem;
  color: var(--ink-60);
}

/* ---------- Page simple (mentions légales) ---------- */

.page-plain {
  padding-top: calc(var(--header-h) + clamp(2.5rem, 6vw, 4.5rem));
  padding-bottom: var(--space-section);
}
.page-plain h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  margin-bottom: clamp(2rem, 4vw, 3rem);
}
.prose { max-width: 62ch; }
.prose h2 {
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  margin-top: clamp(2rem, 4vw, 2.8rem);
  margin-bottom: 0.8rem;
}
.prose p { color: var(--ink-60); }
.prose p + p { margin-top: 0.9rem; }
.prose a { color: var(--accent); border-bottom: 1px solid currentColor; }

/* ---------- Divers ---------- */

@media (min-width: 1440px) {
  :root { --container: min(1400px, 88vw); }
  body { font-size: 1.0625rem; }
}
