/* =====================================================
   MERIDIAN STAY — DESIGN SYSTEM
   Premium guest guide · Mobile-first · Luxury UX
   Références : Aman, Four Seasons, Apple, Airbnb Luxe
   ===================================================== */

/* ── Tokens ──────────────────────────────────────────── */
:root {
  /* Palette */
  --ink:     #111009;
  --ink-2:   #1B1814;
  --bone:    #EDE6D5;
  --stone:   #918B81;
  --brass:   #C4A55A;
  --gold:    #A8893A;
  --cream:   #F8F4EF;
  --cream-2: #EFE9DF;
  --muted:   #7A7268;
  --white:   #FFFFFF;
  --err:     #D4503C;

  /* Typography */
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans:  'DM Sans', system-ui, -apple-system, sans-serif;

  /* Sizing */
  --pad:    24px;
  --nav-h:  68px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --topbar-h: 56px;

  /* Radii */
  --r-sm: 8px;
  --r:    16px;
  --r-lg: 24px;

  /* Shadows */
  --shadow-sm: 0 2px 12px rgba(0,0,0,.10);
  --shadow:    0 8px 32px rgba(0,0,0,.16);
  --shadow-lg: 0 24px 64px rgba(0,0,0,.24);
}

/* ── Reset ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  font-weight: 300;
  background: var(--ink);
  color: var(--bone);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, video { display: block; max-width: 100%; }
button { font: inherit; border: none; background: none; cursor: pointer; }
a { color: inherit; text-decoration: none; }

/* ── Loading ─────────────────────────────────────────── */
[hidden] { display: none !important; }

.loading {
  position: fixed; inset: 0; z-index: 999;
  background: var(--ink);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 16px;
  transition: opacity .6s ease, visibility .6s ease;
}
.loading.out { opacity: 0; visibility: hidden; }
.loading-mark {
  font-family: var(--serif);
  font-size: 48px;
  font-weight: 300;
  letter-spacing: .12em;
  color: var(--brass);
  animation: pulse 2s ease infinite;
}
.loading-sub {
  font-size: 11px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--stone);
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: .4; }
}

/* ── Gate (accès refusé) ─────────────────────────────── */
.gate {
  position: fixed; inset: 0; z-index: 99;
  background: var(--ink);
  display: flex; align-items: center; justify-content: center;
  padding: var(--pad);
  text-align: center;
}
.gate-inner { max-width: 320px; }
.gate-brand {
  display: block;
  font-size: 11px; letter-spacing: .3em; text-transform: uppercase;
  color: var(--brass); margin-bottom: 32px;
}
.gate-title {
  font-family: var(--serif);
  font-weight: 400; font-size: 36px; line-height: 1.1;
  color: var(--bone); margin-bottom: 16px;
}
.gate-msg {
  font-size: 15px; color: var(--stone); line-height: 1.7;
  margin-bottom: 36px;
}
.gate-cta {
  display: inline-block;
  font-size: 11px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--bone); border: 1px solid rgba(237,230,213,.3);
  padding: 14px 28px; border-radius: var(--r-sm);
  transition: border-color .2s, background .2s;
}
.gate-cta:hover { border-color: var(--brass); background: rgba(196,165,90,.08); }

/* ── Topbar ──────────────────────────────────────────── */
.topbar {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 50;
  height: calc(var(--topbar-h) + var(--safe-t));
  padding-top: var(--safe-t);
  display: flex; align-items: center; justify-content: space-between;
  padding-left: var(--pad); padding-right: var(--pad);
  background: linear-gradient(to bottom, rgba(17,16,9,.8) 0%, rgba(17,16,9,0) 100%);
  transition: background .3s;
}
.topbar.solid {
  background: rgba(17,16,9,.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.topbar-brand {
  font-size: 11px; letter-spacing: .26em; text-transform: uppercase;
  color: rgba(237,230,213,.7);
}
.lang-btn {
  font-size: 11px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--stone);
  border: 1px solid rgba(145,139,129,.3);
  padding: 6px 12px; border-radius: 20px;
  transition: color .2s, border-color .2s;
}
.lang-btn:hover, .lang-btn:focus { color: var(--bone); border-color: var(--stone); }

/* ── Main scroll container ───────────────────────────── */
#main {
  padding-top: 0;
  padding-bottom: calc(var(--nav-h) + var(--safe-b) + 16px);
}

/* ── Module base ─────────────────────────────────────── */
.mod { position: relative; }

/* ── HERO ────────────────────────────────────────────── */
.mod-hero {
  height: 100svh; min-height: 560px;
  display: flex; flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  transform: scale(1.04);
  transition: transform 8s ease;
}
.mod-hero.loaded .hero-bg { transform: scale(1); }
.hero-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(to top, rgba(17,16,9,.92) 0%, rgba(17,16,9,.5) 40%, rgba(17,16,9,.15) 70%, rgba(17,16,9,0) 100%);
}
.hero-content {
  position: relative; z-index: 2;
  padding: 0 var(--pad) clamp(80px, 14vh, 120px);
}
.hero-eyebrow {
  font-size: 11px; letter-spacing: .28em; text-transform: uppercase;
  color: var(--brass); margin-bottom: 12px;
}
.hero-name {
  font-family: var(--serif);
  font-size: clamp(52px, 15vw, 88px);
  font-weight: 300; line-height: 1.0;
  color: var(--bone); margin-bottom: 12px;
  letter-spacing: -.01em;
}
.hero-welcome {
  font-size: 15px; color: rgba(237,230,213,.75);
  font-weight: 300; margin-bottom: 28px;
  max-width: 28ch;
}
.hero-dates {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--stone);
  border: 1px solid rgba(145,139,129,.3);
  padding: 10px 16px; border-radius: 24px;
}
.hero-dates-sep { color: var(--brass); }
.hero-scroll {
  position: absolute; bottom: 28px; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  z-index: 2;
}
.hero-scroll span {
  font-size: 10px; letter-spacing: .28em; text-transform: uppercase;
  color: var(--stone);
}
.hero-scroll-line {
  width: 1px; height: 40px;
  background: linear-gradient(var(--brass), transparent);
  animation: scrollLine 2s ease infinite;
}
@keyframes scrollLine {
  0%   { transform: scaleY(0); transform-origin: top; opacity: 1; }
  50%  { transform: scaleY(1); transform-origin: top; opacity: 1; }
  100% { transform: scaleY(1); transform-origin: top; opacity: 0; }
}

/* ── QUICK ACTIONS ───────────────────────────────────── */
.mod-quick {
  background: var(--ink-2);
  padding: 32px var(--pad) 40px;
}
.quick-title {
  font-size: 10px; letter-spacing: .28em; text-transform: uppercase;
  color: var(--stone); margin-bottom: 20px;
}
.quick-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.quick-card {
  display: flex; flex-direction: column;
  align-items: flex-start;
  padding: 18px 16px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: var(--r);
  gap: 10px;
  cursor: pointer;
  transition: background .2s, border-color .2s, transform .15s;
  -webkit-tap-highlight-color: transparent;
  text-align: left;
}
.quick-card:active { transform: scale(.97); }
.quick-card:hover  { background: rgba(255,255,255,.07); border-color: rgba(196,165,90,.3); }
.quick-icon {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(196,165,90,.12);
  border-radius: 10px;
  color: var(--brass);
  flex-shrink: 0;
}
.quick-icon svg { width: 18px; height: 18px; }
.quick-label {
  font-size: 10px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--stone);
}
.quick-value {
  font-family: var(--serif);
  font-size: 22px; font-weight: 400;
  color: var(--bone); line-height: 1.1;
  letter-spacing: -.01em;
}
.quick-hint {
  font-size: 11px; color: var(--muted);
}

/* ── SECTION HEADER (light sections) ────────────────── */
.section-header {
  padding: clamp(48px, 8vh, 72px) var(--pad) 0;
}
.section-eyebrow {
  font-size: 10px; letter-spacing: .28em; text-transform: uppercase;
  color: var(--brass); margin-bottom: 10px;
}
.section-title {
  font-family: var(--serif);
  font-size: clamp(34px, 10vw, 52px);
  font-weight: 400; line-height: 1.05;
  color: var(--ink); letter-spacing: -.01em;
}
.section-lede {
  font-size: 15px; color: var(--muted);
  line-height: 1.7; margin-top: 12px;
  max-width: 36ch;
}

/* ── HOUSE MODULE (fond crème) ───────────────────────── */
.mod-house { background: var(--cream); }
.mod-house .section-header { padding-bottom: 32px; }

.house-stats {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 1px; background: rgba(26,21,18,.1);
  margin: 0 var(--pad);
  border-radius: var(--r); overflow: hidden;
  border: 1px solid rgba(26,21,18,.1);
}
.house-stat {
  background: var(--cream);
  padding: 20px 16px;
  display: flex; flex-direction: column; gap: 4px;
}
.house-stat-icon { font-size: 22px; margin-bottom: 4px; }
.house-stat-value {
  font-family: var(--serif);
  font-size: 26px; font-weight: 400;
  color: var(--ink); line-height: 1;
}
.house-stat-label {
  font-size: 11px; color: var(--muted);
  letter-spacing: .08em;
}

.house-desc {
  padding: 32px var(--pad) 0;
  font-size: 15px; color: var(--muted);
  line-height: 1.8; max-width: 38ch;
}

.house-rules {
  margin: 36px var(--pad) 0;
  padding: 24px;
  background: rgba(26,21,18,.04);
  border-radius: var(--r);
  border: 1px solid rgba(26,21,18,.08);
}
.house-rules-title {
  font-size: 10px; letter-spacing: .24em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 16px;
}
.house-rule {
  display: flex; align-items: center; gap: 12px;
  font-size: 14px; color: var(--ink);
  padding: 10px 0;
  border-bottom: 1px solid rgba(26,21,18,.06);
}
.house-rule:last-child { border-bottom: none; padding-bottom: 0; }
.house-rule::before {
  content: '';
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--gold); flex-shrink: 0;
}
.mod-house-end { padding-bottom: clamp(48px, 8vh, 72px); }

/* ── POOL MODULE (fond sombre) ───────────────────────── */
.mod-pool {
  background: var(--ink);
  padding: clamp(48px, 8vh, 72px) var(--pad);
}
.mod-pool .section-eyebrow { color: var(--brass); }
.mod-pool .section-title { color: var(--bone); margin-bottom: 16px; }
.pool-desc {
  font-size: 15px; color: var(--stone); line-height: 1.8;
  margin-bottom: 32px; max-width: 36ch;
}
.pool-image {
  width: 100%; aspect-ratio: 4/3;
  border-radius: var(--r-lg); overflow: hidden;
  margin-bottom: 28px;
}
.pool-image img {
  width: 100%; height: 100%; object-fit: cover;
}
.pool-details {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.pool-detail {
  padding: 16px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: var(--r);
}
.pool-detail-label {
  font-size: 10px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--stone); margin-bottom: 6px;
}
.pool-detail-value {
  font-family: var(--serif); font-size: 20px; font-weight: 400;
  color: var(--bone);
}

/* ── MAP MODULE (fond crème) ─────────────────────────── */
.mod-map { background: var(--cream); }
.mod-map .section-header { padding-bottom: 28px; }
.map-container {
  height: 260px;
  margin: 0 var(--pad);
  border-radius: var(--r-lg); overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--cream-2);
}
.mod-map-end { padding-bottom: clamp(48px, 8vh, 72px); }

/* ── RECOMMENDATIONS (fond crème) ────────────────────── */
.mod-reco { background: var(--cream); }
.reco-list {
  display: flex; flex-direction: column;
  gap: 16px;
  padding: 24px var(--pad) clamp(48px, 8vh, 72px);
}
.reco-card {
  background: var(--white);
  border-radius: var(--r-lg); overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .25s, transform .2s;
  -webkit-tap-highlight-color: transparent;
}
.reco-card:active { transform: scale(.99); }
.reco-photo {
  width: 100%; aspect-ratio: 16/9;
  position: relative; overflow: hidden; background: var(--cream-2);
}
.reco-photo img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .4s ease;
}
.reco-card:hover .reco-photo img { transform: scale(1.03); }
.reco-tag {
  position: absolute; top: 14px; left: 14px;
  font-size: 10px; letter-spacing: .2em; text-transform: uppercase;
  background: var(--ink); color: var(--brass);
  padding: 5px 10px; border-radius: 20px;
}
.reco-body { padding: 20px; }
.reco-title {
  font-family: var(--serif); font-size: 22px; font-weight: 400;
  color: var(--ink); line-height: 1.2; margin-bottom: 8px;
}
.reco-desc {
  font-size: 14px; color: var(--muted); line-height: 1.7;
  margin-bottom: 16px;
}
.reco-meta {
  display: flex; align-items: center; justify-content: space-between;
}
.reco-distance {
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--stone); display: flex; align-items: center; gap: 6px;
}
.reco-distance::before {
  content: '';
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--gold); flex-shrink: 0;
}
.reco-actions { display: flex; gap: 8px; }
.reco-btn {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink);
  border: 1px solid rgba(26,21,18,.15);
  padding: 7px 12px; border-radius: 20px;
  transition: background .2s, border-color .2s;
}
.reco-btn:hover { background: var(--ink); color: var(--bone); border-color: var(--ink); }
.reco-btn svg { width: 13px; height: 13px; }

/* ── CHECKOUT MODULE ─────────────────────────────────── */
.mod-checkout {
  background: var(--ink-2);
  padding: clamp(48px, 8vh, 72px) var(--pad);
}
.mod-checkout .section-title { color: var(--bone); margin-bottom: 24px; }
.checkout-items { display: flex; flex-direction: column; gap: 0; }
.checkout-item {
  display: flex; align-items: flex-start; gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255,255,255,.06);
  font-size: 15px; color: var(--stone); line-height: 1.6;
}
.checkout-item:last-child { border-bottom: none; }
.checkout-num {
  font-family: var(--serif); font-size: 20px; font-weight: 300;
  color: var(--brass); flex-shrink: 0; width: 24px;
  line-height: 1.4;
}

/* ── FAQ ─────────────────────────────────────────────── */
.mod-faq { background: var(--cream); }
.mod-faq .section-header { padding-bottom: 28px; }
.faq-list {
  padding: 0 var(--pad) clamp(48px, 8vh, 72px);
  display: flex; flex-direction: column; gap: 0;
}
.faq-item {
  border-bottom: 1px solid rgba(26,21,18,.09);
}
.faq-question {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 20px 0;
  font-size: 16px; font-weight: 400; color: var(--ink);
  text-align: left; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.faq-chevron {
  flex-shrink: 0; width: 20px; height: 20px;
  color: var(--gold);
  transition: transform .3s ease;
}
.faq-item.open .faq-chevron { transform: rotate(180deg); }
.faq-answer {
  display: none;
  padding-bottom: 20px;
  font-size: 14px; color: var(--muted); line-height: 1.8;
}
.faq-item.open .faq-answer { display: block; }

/* ── CONTACT MODULE ──────────────────────────────────── */
.mod-contact {
  background: var(--ink);
  padding: clamp(48px, 8vh, 72px) var(--pad) calc(clamp(48px, 8vh, 72px) + 8px);
}
.mod-contact .section-eyebrow { color: var(--brass); }
.mod-contact .section-title { color: var(--bone); margin-bottom: 8px; }
.contact-intro {
  font-size: 14px; color: var(--stone); line-height: 1.7;
  margin-bottom: 32px; max-width: 32ch;
}
.contact-actions { display: flex; flex-direction: column; gap: 12px; }
.contact-btn {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 20px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: var(--r);
  color: var(--bone);
  transition: background .2s, border-color .2s;
  -webkit-tap-highlight-color: transparent;
}
.contact-btn:hover, .contact-btn:active {
  background: rgba(255,255,255,.08);
  border-color: rgba(196,165,90,.35);
}
.contact-btn-icon {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(196,165,90,.12);
  border-radius: 12px; flex-shrink: 0;
  color: var(--brass);
}
.contact-btn-icon svg { width: 20px; height: 20px; }
.contact-btn-text { flex: 1; }
.contact-btn-label {
  font-size: 10px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--stone); margin-bottom: 2px;
}
.contact-btn-value {
  font-family: var(--serif); font-size: 18px; color: var(--bone);
}
.contact-emergency {
  margin-top: 32px;
  padding: 20px;
  border: 1px solid rgba(212,80,60,.3);
  border-radius: var(--r);
  background: rgba(212,80,60,.05);
}
.contact-emergency-title {
  font-size: 10px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--err); margin-bottom: 12px;
}
.contact-emergency-item {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 14px; color: var(--stone);
  padding: 6px 0;
}
.contact-emergency-num {
  font-family: var(--serif); font-size: 20px; color: var(--bone);
}

/* ── BOTTOM NAVIGATION ───────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 60;
  height: calc(var(--nav-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  background: rgba(17,16,9,.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255,255,255,.06);
  display: flex;
}
.nav-tab {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 5px;
  padding: 10px 4px;
  color: var(--stone);
  transition: color .2s;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}
.nav-tab svg { width: 22px; height: 22px; transition: transform .2s; }
.nav-tab span {
  font-size: 10px; letter-spacing: .08em;
  transition: color .2s;
}
.nav-tab.active {
  color: var(--brass);
}
.nav-tab.active svg { transform: translateY(-1px); }

/* ── WIFI MODAL ──────────────────────────────────────── */
.modal {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: flex-end;
}
.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.modal-sheet {
  position: relative; z-index: 1;
  width: 100%;
  background: var(--ink-2);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  padding: 16px var(--pad) calc(var(--pad) + var(--safe-b));
  animation: sheetUp .3s cubic-bezier(.32,0,.67,0) reverse,
             sheetUp .3s cubic-bezier(.33,1,.68,1) forwards;
}
@keyframes sheetUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}
.modal-handle {
  width: 40px; height: 4px; border-radius: 2px;
  background: rgba(255,255,255,.15);
  margin: 0 auto 28px;
}
.modal-eyebrow {
  font-size: 10px; letter-spacing: .26em; text-transform: uppercase;
  color: var(--stone); margin-bottom: 8px;
}
.modal-title {
  font-family: var(--serif); font-size: 28px; font-weight: 400;
  color: var(--bone); margin-bottom: 24px; line-height: 1.1;
}
.wifi-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.wifi-label {
  font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--stone);
}
.wifi-value {
  font-family: var(--serif); font-size: 18px; color: var(--bone);
}
.modal-copy-btn {
  display: flex; align-items: center; justify-content: center;
  width: 100%; padding: 16px;
  margin-top: 24px;
  background: var(--brass); color: var(--ink);
  font-size: 12px; letter-spacing: .18em; text-transform: uppercase;
  font-weight: 500; border-radius: var(--r);
  transition: background .2s;
}
.modal-copy-btn:hover { background: var(--gold); }
.modal-copy-btn.copied { background: #4CAF77; color: #fff; }
.modal-close-btn {
  display: flex; align-items: center; justify-content: center;
  width: 100%; padding: 16px;
  margin-top: 10px;
  color: var(--stone);
  font-size: 12px; letter-spacing: .18em; text-transform: uppercase;
  border-radius: var(--r);
  transition: color .2s;
}
.modal-close-btn:hover { color: var(--bone); }

/* ── Leaflet overrides ───────────────────────────────── */
.leaflet-container { font-family: var(--sans); }
.leaflet-control-attribution { font-size: 9px !important; }
.leaflet-popup-content-wrapper {
  border-radius: var(--r) !important;
  box-shadow: var(--shadow) !important;
}
.leaflet-popup-content { margin: 14px 16px !important; }
.map-popup-title {
  font-family: var(--serif); font-size: 16px;
  color: var(--ink); margin-bottom: 4px;
}
.map-popup-dist {
  font-size: 11px; color: var(--muted);
  letter-spacing: .12em; text-transform: uppercase;
}

/* ── Animations entrée ───────────────────────────────── */
.mod { opacity: 0; transform: translateY(20px); }
.mod.visible { opacity: 1; transform: none; transition: opacity .7s ease, transform .7s ease; }
.mod-hero { opacity: 1; transform: none; } /* hero toujours visible */

/* ── Scrollbar ───────────────────────────────────────── */
::-webkit-scrollbar { display: none; }
* { scrollbar-width: none; }
