/* ==========================================================================
   Le Mas de Causse — Chambre d'hôtes à Albi
   ========================================================================== */

:root {
  --bg: #FBF7F1;
  --bg-alt: #F3EBDD;
  --text: #2A2520;
  --text-soft: #5C4F42;
  --accent: #8A6A3D;
  --accent-dark: #6B512C;
  --olive: #6B7F4E;
  --olive-dark: #55663E;
  --border: #E8DFD2;
  --white: #FFFFFF;
  --shadow: 0 4px 20px rgba(42, 37, 32, 0.08);
  --shadow-lg: 0 10px 40px rgba(42, 37, 32, 0.12);
  --radius: 6px;
  --radius-lg: 12px;
  --serif: "Playfair Display", "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --container: 1140px;
  --transition: 200ms ease;
}

/* Reset ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img, picture, video, iframe { max-width: 100%; display: block; }
img { height: auto; }
a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-dark); text-decoration: underline; }
button { font: inherit; cursor: pointer; }
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.2;
  color: var(--text);
  margin: 0 0 .6em;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1.2em; }
ul { padding-left: 1.25em; }

.sr-only {
  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 {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--accent); color: var(--white);
  padding: .6em 1em; border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }

/* Layout ------------------------------------------------------------------ */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.25rem;
}
main { min-height: 60vh; }
section { padding: 4rem 0; }
@media (max-width: 640px) { section { padding: 2.5rem 0; } }

/* Header ------------------------------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 247, 241, 0.96);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .9rem 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  text-decoration: none;
  color: var(--text);
}
.brand img { width: 44px; height: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--serif); font-size: 1.25rem; font-weight: 600; }
.brand-tag { font-size: .75rem; color: var(--text-soft); letter-spacing: .02em; }
.brand:hover { text-decoration: none; }

.nav-menu {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0; padding: 0;
}
.nav-menu a {
  color: var(--text);
  font-size: .95rem;
  padding: .4em 0;
  position: relative;
  text-decoration: none;
}
.nav-menu a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--transition);
}
.nav-menu a:hover::after,
.nav-menu a[aria-current="page"]::after {
  transform: scaleX(1);
  transform-origin: left;
}
.nav-menu a[aria-current="page"] { color: var(--accent); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .45rem .6rem;
  color: var(--text);
}
.nav-toggle svg { width: 22px; height: 22px; }

@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; align-items: center; }
  .nav-menu {
    position: absolute;
    left: 0; right: 0; top: 100%;
    flex-direction: column;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: .5rem 1.25rem 1rem;
    display: none;
  }
  .nav-menu.open { display: flex; }
  .nav-menu li { border-bottom: 1px solid var(--border); }
  .nav-menu li:last-child { border-bottom: none; }
  .nav-menu a { display: block; padding: .85rem 0; }
  .nav-menu a::after { display: none; }
}

/* Hero -------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: min(80vh, 640px);
  display: flex;
  align-items: center;
  overflow: hidden;
  color: var(--white);
  background: #2A2520;
}
.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(42, 37, 32, .35) 0%, rgba(42, 37, 32, .65) 100%);
  z-index: 1;
}
.hero .container {
  position: relative;
  z-index: 2;
  padding-top: 5rem;
  padding-bottom: 5rem;
}
.hero-eyebrow {
  display: inline-block;
  font-size: .85rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: #E8DFD2;
  border-bottom: 1px solid #E8DFD2;
  padding-bottom: .3em;
  margin-bottom: 1.2em;
}
.hero h1 {
  color: var(--white);
  max-width: 18ch;
  margin-bottom: .5em;
}
.hero-subtitle {
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  color: #F3EBDD;
  max-width: 50ch;
  margin-bottom: 2em;
}
.hero-cta {
  display: flex;
  gap: .9rem;
  flex-wrap: wrap;
}

/* Page header (non-home) -------------------------------------------------- */
.page-header {
  background: var(--bg-alt);
  padding: 4rem 0 3rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.page-header h1 { margin-bottom: .3em; }
.page-header p {
  color: var(--text-soft);
  max-width: 60ch;
  margin: 0 auto;
}

/* Buttons ----------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  padding: .85em 1.6em;
  font-size: .98rem;
  font-weight: 500;
  border-radius: 999px;
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}
.btn-primary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: var(--white);
  text-decoration: none;
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,.7);
}
.btn-ghost:hover {
  background: rgba(255,255,255,.12);
  color: var(--white);
  text-decoration: none;
}
.btn-outline {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}
.btn-outline:hover {
  background: var(--accent);
  color: var(--white);
  text-decoration: none;
}

/* Section intro ----------------------------------------------------------- */
.section-intro {
  text-align: center;
  max-width: 60ch;
  margin: 0 auto 3rem;
}
.section-intro .eyebrow {
  display: inline-block;
  font-size: .8rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--olive-dark);
  margin-bottom: 1em;
}
.section-intro p { color: var(--text-soft); }

/* Feature cards ----------------------------------------------------------- */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.feature {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.6rem;
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition);
}
.feature:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.feature .icon {
  width: 48px; height: 48px;
  margin: 0 auto 1rem;
  color: var(--accent);
}
.feature h3 {
  font-size: 1.2rem;
  margin-bottom: .5em;
}
.feature p {
  font-size: .95rem;
  color: var(--text-soft);
  margin: 0;
}

/* Two-column "about" ------------------------------------------------------ */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.split-image img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
@media (max-width: 820px) {
  .split { grid-template-columns: 1fr; gap: 2rem; }
}

.alt-section {
  background: var(--bg-alt);
}

/* Destinations list ------------------------------------------------------- */
.destinations {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
}
.destinations li {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  display: flex;
  align-items: center;
  gap: .7rem;
  font-size: .95rem;
}
.destinations li svg {
  width: 18px; height: 18px;
  color: var(--olive);
  flex-shrink: 0;
}
.destinations li strong { color: var(--text); font-weight: 600; }
.destinations li span { color: var(--text-soft); font-size: .88rem; }

/* Amenities grid ---------------------------------------------------------- */
.amenities {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
}
.amenities li {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .9rem 1rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: .95rem;
}
.amenities svg {
  width: 22px; height: 22px;
  color: var(--olive);
  flex-shrink: 0;
}

/* Gallery ----------------------------------------------------------------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 2rem 0 0;
}
.gallery a {
  display: block;
  overflow: hidden;
  border-radius: var(--radius-lg);
  aspect-ratio: 4 / 3;
  position: relative;
  box-shadow: var(--shadow);
}
.gallery img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 400ms ease;
}
.gallery a:hover img { transform: scale(1.05); }
@media (max-width: 820px) { .gallery { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .gallery { grid-template-columns: 1fr; } }

/* Lightbox (CSS-only via :target) ---------------------------------------- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(42, 37, 32, .92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
  z-index: 100;
}
.lightbox:target {
  opacity: 1;
  pointer-events: auto;
}
.lightbox img {
  max-width: 96vw;
  max-height: 90vh;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}
.lightbox-close {
  position: absolute;
  top: 1rem; right: 1.25rem;
  color: var(--white);
  font-size: 2.2rem;
  line-height: 1;
  text-decoration: none;
  padding: .3em .5em;
}
.lightbox-close:hover { color: var(--white); text-decoration: none; }

/* Tarifs table ------------------------------------------------------------ */
.pricing-wrap {
  max-width: 720px;
  margin: 0 auto;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.pricing-table {
  width: 100%;
  border-collapse: collapse;
}
.pricing-table caption {
  font-family: var(--serif);
  font-size: 1.5rem;
  padding: 1.6rem 1rem .5rem;
  color: var(--text);
  caption-side: top;
}
.pricing-table th,
.pricing-table td {
  padding: 1.1rem 1.5rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.pricing-table th {
  font-weight: 500;
  color: var(--text-soft);
  font-size: .95rem;
}
.pricing-table td.price {
  text-align: right;
  font-family: var(--serif);
  font-size: 1.3rem;
  color: var(--accent);
  font-weight: 600;
  white-space: nowrap;
}
.pricing-table tr:last-child th,
.pricing-table tr:last-child td { border-bottom: none; }
.pricing-note {
  text-align: center;
  color: var(--text-soft);
  font-size: .95rem;
  margin-top: 1.5rem;
}
.badges {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 2.5rem;
  color: var(--text-soft);
  font-size: .88rem;
}
.badges strong { color: var(--text); display: block; font-size: 1rem; }

/* Virtual tour ------------------------------------------------------------ */
.vr-wrap {
  max-width: 1100px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: #000;
}
.vr-wrap iframe {
  display: block;
  width: 100%;
  height: 650px;
  border: 0;
}
@media (max-width: 640px) {
  .vr-wrap iframe { height: 450px; }
}

/* Contact info ------------------------------------------------------------ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-info {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow);
}
.contact-info h2 { margin-top: 0; }
.contact-info ul {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
}
.contact-info li {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}
.contact-info li:last-child { border-bottom: none; }
.contact-info svg {
  width: 22px; height: 22px;
  color: var(--accent);
  flex-shrink: 0;
  margin-top: .15em;
}
.contact-info .label {
  display: block;
  font-size: .78rem;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: .15em;
}
.contact-info a { color: var(--text); font-weight: 500; word-break: break-word; }
.contact-info a:hover { color: var(--accent); }

.map-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--bg-alt);
}
.map-wrap iframe {
  width: 100%;
  height: 450px;
  border: 0;
  display: block;
}

/* CTA banner -------------------------------------------------------------- */
.cta-banner {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: var(--white);
  text-align: center;
  padding: 4rem 1.25rem;
  border-radius: var(--radius-lg);
  margin: 3rem auto;
  max-width: var(--container);
}
.cta-banner h2 {
  color: var(--white);
  margin-bottom: .4em;
}
.cta-banner p {
  color: #F3EBDD;
  max-width: 55ch;
  margin: 0 auto 2em;
}
.cta-banner .btn-ghost { border-color: var(--white); }

/* Footer ------------------------------------------------------------------ */
.site-footer {
  background: #1F1B17;
  color: #C9BEAE;
  padding: 3.5rem 0 1.5rem;
  font-size: .92rem;
  margin-top: 4rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 2.5rem;
}
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

.site-footer h4 {
  color: var(--white);
  font-family: var(--serif);
  font-size: 1.05rem;
  margin: 0 0 1rem;
}
.site-footer a {
  color: #C9BEAE;
  text-decoration: none;
}
.site-footer a:hover { color: var(--white); text-decoration: none; }
.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.site-footer li { padding: .3rem 0; }
.footer-brand p { margin: .8em 0 0; line-height: 1.6; }
.footer-bottom {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid #3A342C;
  text-align: center;
  font-size: .85rem;
  color: #8A8275;
}

/* Content typography for longer blocks ------------------------------------ */
.prose h2 { margin-top: 2.5rem; }
.prose h3 { margin-top: 2rem; }
.prose p, .prose li { color: var(--text); }
.prose { max-width: 68ch; margin: 0 auto; }
.prose-wide { max-width: 80ch; margin: 0 auto; }

/* Mobile sticky call/SMS bar --------------------------------------------- */
.mobile-bar {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 60;
  background: var(--white);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 20px rgba(42, 37, 32, .12);
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.mobile-bar-inner {
  display: flex;
}
.mobile-bar a {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  padding: 1rem .5rem;
  font-size: .98rem;
  font-weight: 600;
  color: var(--white);
  text-decoration: none;
  background: var(--accent);
  min-height: 56px;
  transition: background var(--transition);
}
.mobile-bar a:last-child {
  background: var(--olive);
  border-left: 1px solid rgba(255,255,255,.2);
}
.mobile-bar a:hover,
.mobile-bar a:focus {
  color: var(--white);
  text-decoration: none;
  background: var(--accent-dark);
}
.mobile-bar a:last-child:hover,
.mobile-bar a:last-child:focus {
  background: var(--olive-dark);
}
.mobile-bar svg {
  width: 20px; height: 20px;
  flex-shrink: 0;
}

@media (max-width: 720px) {
  .mobile-bar { display: block; }
  body { padding-bottom: 64px; }
  /* Prevent cta-banner being hidden under the bar */
  .site-footer { margin-bottom: 0; }
}

/* Utilities --------------------------------------------------------------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
