/* Les Terrasses de Cayrac — shared styles */

:root {
  --background: 38 35% 96%;
  --foreground: 140 25% 15%;
  --card: 0 0% 100%;
  --card-foreground: 140 25% 15%;
  --primary: 140 35% 35%;
  --primary-foreground: 38 45% 98%;
  --secondary: 28 45% 65%;
  --secondary-foreground: 140 25% 15%;
  --muted: 38 25% 88%;
  --muted-foreground: 140 15% 45%;
  --accent: 42 85% 60%;
  --accent-foreground: 140 25% 15%;
  --border: 38 20% 85%;
  --input: 38 20% 85%;
  --ring: 140 35% 35%;
  --radius: 0.75rem;

  --shadow-soft: 0 4px 20px hsl(140 35% 35% / 0.08);
  --shadow-elevated: 0 10px 40px hsl(140 35% 35% / 0.12);
}

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

html { -webkit-text-size-adjust: 100%; overflow-x: hidden; }

body {
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', Georgia, Cambria, 'Times New Roman', Times, serif;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* Layout */
.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}
.container-narrow { max-width: 896px; margin: 0 auto; }
.container-med { max-width: 1152px; margin: 0 auto; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  width: 100%;
  background: hsl(var(--background) / 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid hsl(var(--border) / 0.4);
}
.site-header nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.brand {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: hsl(var(--primary));
  letter-spacing: -0.01em;
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-links { display: flex; gap: 0.25rem; align-items: center; }
.nav-link {
  display: inline-flex; align-items: center;
  padding: 0 0.6rem; height: 36px;
  border-radius: 0.5rem;
  font-size: 0.8125rem; font-weight: 500;
  color: hsl(var(--foreground));
  transition: background-color 0.2s, color 0.2s;
  white-space: nowrap;
}
.nav-link:hover { background: hsl(var(--muted)); }
.nav-link.is-active {
  background: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
}
.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  border-radius: 0.5rem;
  align-items: center; justify-content: center;
}
.nav-toggle:hover { background: hsl(var(--muted)); }

.mobile-menu { display: none; border-top: 1px solid hsl(var(--border) / 0.4); background: hsl(var(--background)); }
.mobile-menu.is-open { display: block; }
.mobile-menu .container { padding: 1rem 2rem; display: flex; flex-direction: column; gap: 0.5rem; }
.mobile-menu .nav-link { justify-content: flex-start; height: 40px; padding: 0 0.75rem; }

@media (max-width: 1080px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.5rem; white-space: nowrap;
  border-radius: 0.5rem;
  font-weight: 500; font-size: 0.875rem;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.3s, transform 0.2s;
  text-align: center;
}
.btn-sm { height: 36px; padding: 0 0.75rem; }
.btn-md { height: 40px; padding: 0 1rem; }
.btn-lg { height: 44px; padding: 0 2rem; border-radius: 0.5rem; font-size: 1rem; }

.btn-primary {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}
.btn-primary:hover { background: hsl(var(--primary) / 0.9); }

.btn-hero {
  background: hsl(var(--primary) / 0.9);
  color: hsl(var(--primary-foreground));
  border: 1px solid hsl(var(--primary-foreground) / 0.2);
  backdrop-filter: blur(4px);
  box-shadow: 0 10px 30px hsl(0 0% 0% / 0.25);
}
.btn-hero:hover { background: hsl(var(--primary)); }

.btn-outline {
  border: 1px solid hsl(var(--input));
  background: hsl(var(--background) / 0.8);
  backdrop-filter: blur(4px);
  color: hsl(var(--foreground));
}
.btn-outline:hover { background: hsl(var(--muted)); }

/* Hero */
.hero {
  position: relative;
  height: 70vh;
  min-height: 520px;
  overflow: hidden;
}
.hero-img {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
}
.hero-img::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to bottom,
    hsl(var(--background) / 0.2),
    hsl(var(--background) / 0.4),
    hsl(var(--background)));
}
.hero-content {
  position: relative;
  height: 100%;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
}
.hero-content h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  color: hsl(var(--primary-foreground));
  text-shadow: 0 4px 16px hsl(0 0% 0% / 0.35);
}
.hero-content p.lead {
  margin-top: 1.5rem;
  font-size: clamp(1.125rem, 2vw, 1.5rem);
  color: hsl(var(--primary-foreground) / 0.92);
  text-shadow: 0 2px 8px hsl(0 0% 0% / 0.3);
  max-width: 44rem; margin-left: auto; margin-right: auto;
}
.hero-cta { display: flex; gap: 1rem; justify-content: center; margin-top: 2rem; flex-wrap: wrap; }

/* Page headers (secondary pages with shorter hero) */
.page-hero {
  position: relative;
  height: 384px;
  overflow: hidden;
}
.page-hero .hero-img::after {
  background: linear-gradient(to bottom,
    hsl(var(--foreground) / 0.4),
    hsl(var(--background)));
}
.page-hero-content {
  position: relative;
  height: 100%;
  display: flex; align-items: center;
}
.page-hero-content h1 {
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  color: hsl(var(--primary-foreground));
  text-shadow: 0 4px 16px hsl(0 0% 0% / 0.35);
}
.page-hero.center .page-hero-content { justify-content: center; text-align: center; }

/* Sections */
.section { padding: 5rem 0; }
.section-sm { padding: 4rem 0; }
.section-muted { background: hsl(var(--muted) / 0.3); }
.section-gradient {
  background: linear-gradient(180deg, hsl(var(--muted) / 0.3), hsl(var(--background)));
}

.section h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  color: hsl(var(--primary));
  text-align: center;
  margin-bottom: 1.5rem;
}

.section-intro {
  text-align: center;
  margin-bottom: 3rem;
}
.section-intro h1 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  color: hsl(var(--primary));
  margin-bottom: 1.5rem;
}
.section-intro p {
  font-size: 1.125rem;
  color: hsl(var(--muted-foreground));
  max-width: 48rem;
  margin: 0 auto;
}

/* Prose */
.prose { max-width: none; }
.prose p { font-size: 1.125rem; line-height: 1.75; margin-bottom: 1.5rem; color: hsl(var(--foreground)); }
.prose h3 {
  font-size: 1.5rem;
  color: hsl(var(--primary));
  margin-top: 3rem; margin-bottom: 1.5rem;
}
.prose p.accent { color: hsl(var(--primary)); font-weight: 500; margin-top: 2rem; }

.intro-block { text-align: center; }
.intro-block p { font-size: 1.125rem; line-height: 1.75; margin-bottom: 1.5rem; }

/* Feature cards */
.card {
  background: hsl(var(--card));
  color: hsl(var(--card-foreground));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: box-shadow 0.3s;
}
.card:hover { box-shadow: var(--shadow-elevated); }
.card h3 {
  font-size: 1.5rem;
  color: hsl(var(--primary));
  margin-bottom: 1rem;
}
.card p { line-height: 1.7; }

.card-accent {
  background: hsl(var(--primary) / 0.05);
  border-color: hsl(var(--primary) / 0.2);
  padding: 2rem;
}

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.grid-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }

@media (max-width: 900px) {
  .grid-2, .grid-3, .grid-gallery { grid-template-columns: 1fr; }
  .grid-gallery { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .grid-gallery { grid-template-columns: 1fr; }
}

/* Featured image cards on home */
.feature-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  transition: box-shadow 0.3s;
}
.feature-card:hover { box-shadow: var(--shadow-elevated); }
.feature-card img {
  width: 100%; height: 320px;
  object-fit: cover;
  transition: transform 0.4s;
}
.feature-card:hover img { transform: scale(1.05); }
.feature-card .overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top,
    hsl(var(--foreground) / 0.85),
    hsl(var(--foreground) / 0.2) 50%,
    transparent);
  display: flex; align-items: flex-end; padding: 1.5rem;
  color: hsl(var(--background));
}
.feature-card .overlay h3 { color: inherit; font-size: 1.5rem; margin-bottom: 0.5rem; }
.feature-card .overlay p { color: hsl(var(--background) / 0.9); font-size: 0.95rem; }

/* Gallery tiles */
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  aspect-ratio: 1;
  transition: box-shadow 0.3s;
}
.gallery-item:hover { box-shadow: var(--shadow-elevated); }
.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}
.gallery-item:hover img { transform: scale(1.1); }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0;
  background: hsl(0 0% 0% / 0.85);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center; justify-content: center;
  z-index: 100;
  padding: 1rem;
}
.lightbox.is-open { display: flex; }
.lightbox img {
  max-width: 98vw; max-height: 92vh;
  object-fit: contain;
  border-radius: 0.25rem;
}
.lightbox-btn {
  position: absolute;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: hsl(var(--background) / 0.15);
  color: hsl(var(--primary-foreground));
  display: inline-flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.lightbox-btn:hover { background: hsl(var(--background) / 0.3); }
.lightbox-close { top: 1rem; right: 1rem; }
.lightbox-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox-counter {
  position: absolute;
  bottom: 1rem; left: 50%; transform: translateX(-50%);
  background: hsl(var(--muted) / 0.9);
  color: hsl(var(--foreground));
  padding: 0.5rem 1rem; border-radius: 999px;
  font-size: 0.875rem;
}

/* Forms */
.form { display: flex; flex-direction: column; gap: 1.5rem; }
.form-group { display: flex; flex-direction: column; gap: 0.5rem; }
.form-group label { font-size: 0.875rem; font-weight: 500; }
.form-group input, .form-group textarea {
  width: 100%;
  border: 1px solid hsl(var(--input));
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  border-radius: 0.5rem;
  padding: 0.625rem 0.875rem;
  font: inherit;
  font-size: 0.875rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group textarea { resize: vertical; min-height: 120px; }
.form-group input:focus, .form-group textarea:focus {
  outline: none;
  border-color: hsl(var(--ring));
  box-shadow: 0 0 0 2px hsl(var(--ring) / 0.2);
}
.btn-block { width: 100%; }

.note-box {
  margin-top: 1.5rem;
  background: hsl(var(--muted) / 0.5);
  padding: 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
}

/* Attractions (Proximité) */
.attraction-card h3 { font-size: 1.5rem; }
.attraction-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 1rem; margin-bottom: 0.75rem;
}
.distance-pill {
  font-size: 0.75rem;
  background: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}

.info-block {
  background: hsl(var(--muted) / 0.3);
  padding: 2rem;
  border-radius: var(--radius);
  margin-bottom: 3rem;
}
.info-block p { font-size: 1.125rem; line-height: 1.7; margin-bottom: 1rem; }
.info-block p:last-child { margin-bottom: 0; }

.cta-section { padding: 5rem 0; text-align: center; }
.cta-section h2 { color: hsl(var(--primary)); }
.cta-section p { font-size: 1.125rem; margin: 2rem auto; max-width: 40rem; }

/* Card page variations */
.card-title {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: hsl(var(--foreground));
  font-family: 'Playfair Display', serif;
}
.card-section h3 {
  font-size: 1.125rem; font-weight: 600;
  color: hsl(var(--primary));
  margin-bottom: 0.5rem;
  font-family: 'Playfair Display', serif;
}
.card-section { margin-bottom: 1.5rem; }
.card-section:last-child { margin-bottom: 0; }
.card-section p { line-height: 1.6; }

/* Footer */
.site-footer {
  border-top: 1px solid hsl(var(--border) / 0.4);
  background: hsl(var(--muted) / 0.3);
  padding: 3rem 0;
  margin-top: auto;
}
.site-footer .footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.site-footer h3 { font-family: 'Inter', sans-serif; font-size: 1.125rem; font-weight: 600; margin-bottom: 1rem; }
.site-footer h4 { font-family: 'Inter', sans-serif; font-size: 1rem; font-weight: 600; margin-bottom: 1rem; }
.site-footer p { font-size: 0.875rem; color: hsl(var(--muted-foreground)); }
.footer-copy {
  margin-top: 2rem; padding-top: 2rem;
  border-top: 1px solid hsl(var(--border) / 0.4);
  text-align: center; font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
}
@media (max-width: 700px) {
  .site-footer .footer-grid { grid-template-columns: 1fr; }
}

/* Page structure */
.page { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }

/* Animation */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeIn 0.6s ease-out; }

/* Toast (simple) */
.toast {
  position: fixed;
  bottom: 1.5rem; right: 1.5rem;
  background: hsl(var(--card));
  color: hsl(var(--card-foreground));
  border: 1px solid hsl(var(--border));
  border-radius: 0.5rem;
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow-elevated);
  max-width: 360px;
  opacity: 0; transform: translateY(1rem);
  transition: opacity 0.3s, transform 0.3s;
  z-index: 60;
  pointer-events: none;
}
.toast.is-show { opacity: 1; transform: translateY(0); pointer-events: auto; }
.toast strong { display: block; margin-bottom: 0.25rem; }
.toast span { font-size: 0.875rem; color: hsl(var(--muted-foreground)); }

/* Map image */
.map-img {
  width: 100%;
  border-radius: 0.5rem;
  border: 1px solid hsl(var(--border));
}

/* Utility */
.text-center { text-align: center; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mb-12 { margin-bottom: 3rem; }
