/* =========================================================================
   La Table Khmère — stylesheet
   Mobile-first · pure CSS (Grid/Flexbox) · no framework
   Palette inspired by Khmer kitchens: brick, turmeric, palm green, rice.
   ========================================================================= */

/* ---------- Design tokens ---------- */
:root {
  --brick:        #8a2b1c;   /* lacquer red */
  --brick-dark:   #6a2014;
  --turmeric:     #dfa43a;   /* gold leaf */
  --turmeric-dk:  #b27d1c;
  --palm:         #3c6b46;   /* kitchen-wall green */
  --palm-dark:    #2c5236;
  --rice:         #f7f1e4;   /* warm sand */
  --rice-2:       #efe6d3;
  --ink:          #2a231d;
  --ink-soft:     #5c5347;
  --line:         #e2d6bf;
  --white:        #fffdf8;

  --font-head: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-body: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --wrap: 1140px;
  --radius: 10px;
  --shadow-sm: 0 1px 3px rgba(43, 36, 32, .12);
  --shadow-md: 0 8px 28px rgba(43, 36, 32, .16);
  --transition: .2s ease;
}

/* ---------- Reset-ish ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 92px; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--rice);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brick); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--turmeric-dk); }
h1, h2, h3, h4 {
  font-family: var(--font-head); font-weight: 500; line-height: 1.12;
  color: var(--ink); margin: 0 0 .5em; letter-spacing: -.01em;
  font-optical-sizing: auto; text-wrap: balance;
}
h1 { font-size: clamp(2.1rem, 5vw + 1rem, 3.6rem); font-weight: 400; }
h2 { font-size: clamp(1.6rem, 2.5vw + 1rem, 2.45rem); }
h3 { font-size: 1.3rem; font-weight: 600; letter-spacing: 0; }
p  { margin: 0 0 1rem; }
ul, ol { margin: 0 0 1rem; padding-left: 1.25rem; }
:focus-visible { outline: 3px solid var(--turmeric); outline-offset: 2px; border-radius: 4px; }

/* ---------- Utilities ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: clamp(1rem, 4vw, 2rem); }
.sr-only, .skip-link {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link:focus {
  position: fixed; top: .5rem; left: .5rem; width: auto; height: auto;
  clip: auto; margin: 0; padding: .6rem 1rem; background: var(--ink); color: #fff;
  border-radius: 6px; z-index: 1000;
}
.section { padding-block: clamp(3rem, 8vw, 5.5rem); }
.section--tint { background: var(--rice-2); }
.section-head { max-width: 52ch; margin-bottom: 2.5rem; }
.eyebrow {
  font-family: var(--font-body); font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; font-size: .78rem; color: var(--turmeric-dk);
  margin-bottom: .6rem; display: block;
}
.lede { font-size: 1.15rem; color: var(--ink-soft); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--font-body); font-weight: 600; font-size: 1rem;
  padding: .85rem 1.6rem; border-radius: 999px; border: 2px solid var(--brick);
  background: var(--brick); color: #fff; text-decoration: none;
  cursor: pointer; transition: transform var(--transition), background var(--transition), box-shadow var(--transition);
}
.btn:hover { background: var(--brick-dark); border-color: var(--brick-dark); color: #fff; transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn--ghost { background: transparent; color: var(--brick); }
.btn--ghost:hover { background: var(--brick); color: #fff; }
.btn--gold { background: var(--turmeric); border-color: var(--turmeric); color: var(--ink); }
.btn--gold:hover { background: var(--turmeric-dk); border-color: var(--turmeric-dk); color: #fff; }
.btn-sm { padding: .55rem 1.1rem; font-size: .92rem; }
.btn-block { display: flex; width: 100%; margin-top: 1rem; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250, 246, 239, .92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 72px; }
.brand-logo { width: 168px; height: auto; }
.primary-nav a { font-weight: 500; color: var(--ink); text-decoration: none; font-size: .98rem; }
.primary-nav a:hover { color: var(--brick); }
.nav-cta a { color: #fff; }

/* Hamburger button */
.nav-toggle {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer;
}
.nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after {
  content: ""; display: block; width: 26px; height: 2px; background: var(--ink);
  transition: transform var(--transition), opacity var(--transition);
}
.nav-toggle-bar { position: relative; }
.nav-toggle-bar::before { position: absolute; top: -8px; }
.nav-toggle-bar::after  { position: absolute; top: 8px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after  { top: 0; transform: rotate(-45deg); }

/* --- MOBILE FIRST: the top bar shows only the logo + hamburger. --------
   The whole nav (including the "Book a class" button) lives in the
   slide-down panel and is only on screen once .is-open is set. --------- */
.primary-nav {
  position: fixed; inset: 72px 0 auto 0; background: var(--rice);
  border-bottom: 1px solid var(--line); padding: 1rem clamp(1rem, 4vw, 2rem) 1.5rem;
  transform: translateY(-120%); transition: transform .28s ease; box-shadow: var(--shadow-md);
  visibility: hidden;
}
.primary-nav.is-open { transform: translateY(0); visibility: visible; }
.primary-nav ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; align-items: stretch; gap: .25rem;
}
.primary-nav li { border-bottom: 1px solid var(--line); }
.primary-nav li:last-child { border-bottom: 0; }
.primary-nav a { display: block; padding: .8rem .25rem; }
.nav-cta { margin-top: .75rem; }
.nav-cta a { display: flex; }

/* --- DESKTOP: inline nav, no hamburger. ------------------------------- */
@media (min-width: 861px) {
  .nav-toggle { display: none; }
  .primary-nav {
    position: static; transform: none; visibility: visible;
    background: none; border: 0; padding: 0; box-shadow: none;
  }
  .primary-nav ul { flex-direction: row; align-items: center; gap: 1.4rem; }
  .primary-nav li { border: 0; }
  .primary-nav a { padding: 0; }
  .nav-cta { margin-top: 0; }
  .nav-cta a { display: inline-flex; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; color: #fff; text-align: left;
  background: var(--ink-soft);
  min-height: min(78vh, 640px); display: flex; align-items: flex-end;
  overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(130% 90% at 12% 18%, transparent 42%, rgba(28,18,14,.55) 100%),
    linear-gradient(180deg, rgba(28,18,14,.32) 0%, rgba(28,18,14,.48) 45%, rgba(28,18,14,.85) 100%);
  z-index: 1;
}
/* object-position left/top keeps the useful part of the existing wide
   photos and crops the old "book now" watermark baked into their
   bottom-right corner. */
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 12% 22%; }
.hero-inner { position: relative; z-index: 2; padding-block: clamp(2.5rem, 8vw, 5rem); max-width: 46rem; }
.hero h1 { color: #fff; margin-bottom: .4rem; text-shadow: 0 2px 18px rgba(0,0,0,.35); }
.hero p { font-size: 1.2rem; color: rgba(255,255,255,.92); margin-bottom: 1.6rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 1.5rem; margin-top: 1.8rem; font-size: .95rem; color: rgba(255,255,255,.9); }
.hero-facts span { display: inline-flex; align-items: center; gap: .4rem; }

/* ---------- Feature strip ---------- */
.strip { background: var(--brick); color: #fff; }
.strip .wrap { display: grid; gap: 1rem; padding-block: 1.4rem; grid-template-columns: 1fr; }
.strip li { list-style: none; }
.strip ul { display: contents; }
.strip-item { display: flex; gap: .7rem; align-items: flex-start; font-size: .98rem; }
.strip-item strong { display: block; font-family: var(--font-head); font-size: 1.05rem; }
@media (min-width: 720px) { .strip .wrap { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Generic content grid ---------- */
.grid { display: grid; gap: 1.5rem; }
.grid--2 { grid-template-columns: 1fr; }
.grid--3 { grid-template-columns: 1fr; }
@media (min-width: 680px) { .grid--2 { grid-template-columns: 1fr 1fr; } .grid--3 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 980px) { .grid--3 { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem; box-shadow: var(--shadow-sm);
}
.card h3 { margin-bottom: .4rem; }
.card .icon { font-size: 1.6rem; color: var(--turmeric-dk); }

/* two-column intro with image */
.split { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1.05fr .95fr; gap: 3rem; } .split--rev > :first-child { order: 2; } }
.split img {
  border-radius: var(--radius); box-shadow: var(--shadow-md);
  width: 100%; aspect-ratio: 3 / 2; object-fit: cover; object-position: left top;
}

/* ---------- Pricing ---------- */
.price-grid { display: grid; gap: 1.5rem; grid-template-columns: 1fr; padding-top: .8rem; }
@media (min-width: 780px) { .price-grid { grid-template-columns: repeat(3, 1fr); } }
.price-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.8rem 1.6rem; display: flex; flex-direction: column; box-shadow: var(--shadow-sm);
  position: relative;
}
.price-card.is-featured { border-color: var(--turmeric); box-shadow: var(--shadow-md); }
.price-card.is-featured::after {
  content: "Most popular"; position: absolute; top: -.8rem; right: 1.2rem;
  background: var(--turmeric); color: var(--ink); font-size: .72rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; padding: .25rem .7rem; border-radius: 999px;
}
.price-card h3 { margin-bottom: .2rem; }
.price-tag { font-family: var(--font-head); font-size: 2.4rem; color: var(--brick); line-height: 1; margin: .5rem 0 .2rem; }
.price-tag small { font-size: .95rem; color: var(--ink-soft); font-family: var(--font-body); }
.price-meta { font-size: .95rem; color: var(--ink-soft); margin-bottom: 1rem; }
.price-card ul { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.price-card li { padding: .35rem 0 .35rem 1.6rem; position: relative; font-size: .96rem; border-bottom: 1px dashed var(--line); }
.price-card li::before { content: "✓"; position: absolute; left: 0; color: var(--palm); font-weight: 700; }
.price-card .btn { margin-top: auto; }
.price-note {
  margin-top: 1.5rem; padding: 1rem 1.2rem; background: var(--white);
  border-left: 4px solid var(--turmeric); border-radius: 6px; font-size: .96rem;
}

/* ---------- Gallery ---------- */
.gallery { display: grid; gap: .75rem; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 760px) { .gallery { grid-template-columns: repeat(4, 1fr); } }
.gallery figure { margin: 0; border-radius: 8px; overflow: hidden; background: var(--rice-2); }
.gallery img { width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: left top; transition: transform .35s ease; }
.gallery .wide img { aspect-ratio: 2 / 1; }
.gallery a:hover img { transform: scale(1.05); }
.gallery .wide { grid-column: span 2; }

/* ---------- Location ---------- */
.map-embed { border: 0; width: 100%; aspect-ratio: 16 / 10; border-radius: var(--radius); box-shadow: var(--shadow-md); }
.contact-lines { list-style: none; padding: 0; margin: 0; }
.contact-lines li { padding: .5rem 0; border-bottom: 1px solid var(--line); }
.contact-lines strong { font-family: var(--font-head); }

/* ---------- FAQ ---------- */
.faq details {
  background: var(--white); border: 1px solid var(--line); border-radius: 8px;
  padding: 0 1.2rem; margin-bottom: .75rem;
}
.faq summary {
  cursor: pointer; padding: 1rem 0; font-weight: 600; list-style: none;
  display: flex; justify-content: space-between; gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--turmeric-dk); font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details[open] summary { border-bottom: 1px solid var(--line); }
.faq details > p { padding: 1rem 0; margin: 0; color: var(--ink-soft); }
.faq-foot { margin-top: 1.6rem; color: var(--ink-soft); font-size: .98rem; }

/* ---------- CTA band ---------- */

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: rgba(255,255,255,.82); padding-block: 3rem 1.5rem; margin-top: 0; }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: 1fr; }
@media (min-width: 680px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 980px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1.1fr; } }
/* transparent-PNG logo sits on a soft cream chip so its dark wordmark
   stays legible on the dark footer */
.footer-logo { width: 190px; background: var(--rice); padding: .55rem .8rem; border-radius: 8px; margin-bottom: 1rem; }
.footer-h { color: #fff; font-size: 1.1rem; margin-bottom: .7rem; }
.footer-col address { font-style: normal; }
.footer-list { list-style: none; padding: 0; margin: 0; }
.footer-list li { padding: .3rem 0; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--turmeric); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.15); margin-top: 2rem; padding-top: 1.2rem; font-size: .88rem; color: rgba(255,255,255,.6); }

/* ---------- Reservation page ---------- */
.booking-layout { display: grid; gap: 2.5rem; grid-template-columns: 1fr; }
@media (min-width: 960px) { .booking-layout { grid-template-columns: 1.6fr 1fr; align-items: start; } }

.booking-form {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(1.4rem, 4vw, 2.4rem); box-shadow: var(--shadow-sm);
}
.form-section { margin-bottom: 2rem; }
.form-section > legend, .form-section > h2 {
  font-family: var(--font-head); font-size: 1.25rem; color: var(--brick);
  padding: 0; margin: 0 0 1rem; border-bottom: 2px solid var(--rice-2); width: 100%; padding-bottom: .4rem;
}
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: .35rem; }
.field .req { color: var(--brick); }
.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="date"],
.field input[type="number"],
.field select,
.field textarea {
  width: 100%; font: inherit; font-size: 1rem; line-height: 1.5; color: var(--ink);
  padding: .7rem .85rem; border: 1px solid var(--line); border-radius: 8px;
  background: var(--rice); transition: border-color var(--transition), box-shadow var(--transition);
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--turmeric); box-shadow: 0 0 0 3px rgba(217,146,43,.2); outline: none; background: #fff;
}
.field textarea { min-height: 120px; resize: vertical; }

/* Native date input — same box as the other fields; keep the browser calendar popup */
.field input[type="date"] { min-height: 47px; }
.field input[type="date"]::-webkit-calendar-picker-indicator { cursor: pointer; opacity: .55; }
.field input[type="date"]::-webkit-calendar-picker-indicator:hover { opacity: 1; }
.field-row { display: grid; gap: 1.1rem; }
@media (min-width: 560px) { .field-row { grid-template-columns: 1fr 1fr; } }

.form-check { display: flex; gap: .6rem; align-items: flex-start; font-size: .95rem; }
.form-check input { margin-top: .3rem; width: 18px; height: 18px; accent-color: var(--brick); }

.total-box {
  background: var(--rice-2); border-radius: 8px; padding: 1rem 1.2rem; margin: 1.2rem 0;
  display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: .5rem;
}
.total-box .amount { font-family: var(--font-head); font-size: 1.8rem; color: var(--brick); }

.availability {
  margin: 0 0 1.1rem; padding: .75rem 1rem; border-radius: 8px;
  background: var(--rice-2); border: 1px solid var(--line);
  border-left: 4px solid var(--turmeric);
  color: var(--ink-soft); font-size: .95rem; line-height: 1.5;
  white-space: pre-line;
}
.availability.is-loading { opacity: .7; }

.booking-aside .card + .card { margin-top: 1.5rem; }
.booking-aside h3 { color: var(--brick); }
.booking-aside ul { padding-left: 1.1rem; }
.booking-aside li { margin-bottom: .4rem; }

.callout {
  background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--palm);
  border-radius: 8px; padding: 1rem 1.2rem; font-size: .95rem; margin-bottom: 1.5rem;
}

/* Spry validation states (kept for compatibility with existing scripts) */
.formulaire-textFieldRequiredState,
.formulaire-textFieldInvalidFormatState,
.selectRequiredState,
.checkboxRequiredState { color: var(--brick); font-size: .85rem; }

/* page sub-hero */
.page-hero { position: relative; color: #fff; background: var(--brick-dark); overflow: hidden; }
.page-hero::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background:
    radial-gradient(120% 130% at 15% 15%, rgba(40,20,14,.35) 40%, rgba(40,20,14,.8) 100%),
    linear-gradient(180deg, rgba(40,20,14,.4) 0%, rgba(40,20,14,.72) 100%);
}
.page-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 15% 12%; }
.page-hero .wrap { position: relative; z-index: 2; padding-block: clamp(3rem, 8vw, 5rem); }
.page-hero h1 { color: #fff; margin-bottom: .3rem; }
.page-hero p { color: rgba(255,255,255,.9); margin: 0; max-width: 44ch; }
.breadcrumb { font-size: .85rem; color: rgba(255,255,255,.75); margin-bottom: .8rem; }
.breadcrumb a { color: rgba(255,255,255,.9); }

/* thank-you page */
.thanks { text-align: center; max-width: 40rem; margin-inline: auto; }
.thanks .tick {
  width: 68px; height: 68px; border-radius: 50%; background: var(--palm); color: #fff;
  display: grid; place-items: center; font-size: 2rem; margin: 0 auto 1.2rem;
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; background: rgba(20,14,10,.9); display: none;
  align-items: center; justify-content: center; z-index: 999; padding: 1.5rem;
}
.lightbox.is-open { display: flex; }
.lightbox img { max-width: 100%; max-height: 90vh; border-radius: 6px; box-shadow: var(--shadow-md); }
.lightbox-close {
  position: absolute; top: 1rem; right: 1.2rem; background: transparent; border: 0;
  color: #fff; font-size: 2.2rem; cursor: pointer; line-height: 1;
}

/* ---------- Motion / print ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
