/* ===== Palette claire et sobre ===== */
:root {
  --bg: #fbfaf7;
  --bg-alt: #f3f1ec;
  --card: #ffffff;
  --text: #2f3437;
  --muted: #7a7f83;
  --line: #e6e2da;
  --accent: #6f8f87;      /* vert sauge */
  --accent-soft: #e4ece9;
  --sand: #d9c9ad;
  --booked: #efd9d3;
  --booked-text: #a2665a;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(47, 52, 55, .06);
  --font-title: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); }
h1, h2, h3 { font-family: var(--font-title); font-weight: 500; line-height: 1.15; margin: 0 0 .5em; }
h2 { font-size: clamp(1.9rem, 3.5vw, 2.6rem); }
.container { width: min(1120px, 92%); margin: 0 auto; }
section { padding: 88px 0; }
section.alt { background: var(--bg-alt); }
.eyebrow { text-transform: uppercase; letter-spacing: .18em; font-size: .75rem; color: var(--accent); margin: 0 0 .6rem; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.section-head p { color: var(--muted); }

/* ===== En-tête ===== */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  transition: background .3s, box-shadow .3s;
}
.site-header.scrolled { background: rgba(251, 250, 247, .94); backdrop-filter: blur(8px); box-shadow: 0 1px 0 var(--line); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { font-family: var(--font-title); font-size: 1.45rem; color: #fff; text-decoration: none; transition: color .3s; }
.site-header nav a { color: #fff; text-decoration: none; margin-left: 28px; font-size: .9rem; letter-spacing: .03em; transition: color .3s; }
.site-header.scrolled .brand, .site-header.scrolled nav a { color: var(--text); }
.site-header nav a:hover { color: var(--accent); }
.site-header .btn-small { border: 1px solid currentColor; padding: 6px 16px; border-radius: 999px; }

/* ===== Hero ===== */
.hero {
  position: relative; min-height: 92vh; display: flex; align-items: flex-end;
  padding: 0 0 80px; color: #fff; background: #b9b3a6 center / cover no-repeat; transition: background-color .6s;
}
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.28) 0%, rgba(0,0,0,0) 35%, rgba(0,0,0,.5) 100%); }
.hero .container { position: relative; }
.hero h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); margin-bottom: .2em; }
.hero .subtitle { font-size: 1.15rem; max-width: 560px; opacity: .95; margin: 0 0 1.6rem; }
.hero .season-badge {
  display: inline-flex; gap: 10px; align-items: center;
  background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.4);
  backdrop-filter: blur(6px); padding: 8px 18px; border-radius: 999px; font-size: .9rem;
}

/* ===== Boutons ===== */
.btn {
  display: inline-block; border: 0; cursor: pointer; font: inherit; text-decoration: none;
  background: var(--accent); color: #fff; padding: 12px 26px; border-radius: 999px;
  transition: transform .15s, background .2s;
}
.btn:hover { background: #5d7b73; transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn.ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ===== Présentation ===== */
.intro { display: grid; grid-template-columns: 1.4fr 1fr; gap: 64px; align-items: start; }
.intro .desc { white-space: pre-line; color: #4a5054; font-size: 1.05rem; }
.facts { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.facts ul { list-style: none; margin: 0 0 20px; padding: 0; }
.facts li { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); }
.facts li span:first-child { color: var(--muted); }
.facts .price { font-family: var(--font-title); font-size: 1.6rem; margin: 0 0 4px; }
.facts .small { color: var(--muted); font-size: .88rem; margin: 0 0 20px; }

/* ===== Galerie mise en avant ===== */
.featured-grid {
  display: grid; gap: 12px;
  grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 240px 240px;
}
.featured-grid figure { margin: 0; position: relative; overflow: hidden; border-radius: 10px; cursor: zoom-in; background: var(--bg-alt); }
.featured-grid figure:first-child { grid-row: span 2; }
.featured-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.featured-grid figure:hover img { transform: scale(1.04); }
.featured-grid.n1 { grid-template-columns: 1fr; grid-template-rows: 480px; }
.featured-grid.n2 { grid-template-columns: 1fr 1fr; grid-template-rows: 420px; }
.featured-grid.n2 figure:first-child, .featured-grid.n1 figure:first-child { grid-row: auto; }
.featured-grid.n3 { grid-template-columns: 2fr 1fr; }
.featured-grid.n4 { grid-template-columns: 2fr 1fr 1fr; }
.featured-grid.n4 figure:last-child { grid-column: span 2; }
.gallery-actions { text-align: center; margin-top: 28px; }
.empty { text-align: center; color: var(--muted); padding: 60px 20px; border: 1px dashed var(--line); border-radius: var(--radius); }

/* ===== Équipements ===== */
.amenities { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.amenity {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
}
.amenity .ico { flex: none; width: 42px; height: 42px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.amenity svg { width: 22px; height: 22px; }
.amenity span { font-size: .95rem; }

/* ===== Calendrier ===== */
.cal-toolbar { display: flex; justify-content: center; align-items: center; gap: 18px; margin-bottom: 28px; }
.cal-toolbar strong { font-family: var(--font-title); font-size: 1.5rem; font-weight: 500; min-width: 160px; text-align: center; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); cursor: pointer; font-size: 1.1rem; color: var(--text); }
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.calendar { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 22px; }
.cal-month { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.cal-month h4 { margin: 0 0 12px; font-weight: 500; text-align: center; font-size: .95rem; letter-spacing: .04em; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.cal-dow { font-size: .7rem; color: var(--muted); padding-bottom: 4px; }
.cal-day {
  font: inherit; font-size: .82rem; aspect-ratio: 1; display: grid; place-items: center;
  border-radius: 8px; border: 0; padding: 0;
}
.cal-day.free { background: var(--accent-soft); color: #3e5a53; }
.cal-day.booked { background: var(--booked); color: var(--booked-text); text-decoration: line-through; }
.cal-day.closed { color: #c4c4c4; }
.cal-day.past { opacity: .4; }
button.cal-day { cursor: pointer; }
button.cal-day:hover { outline: 2px solid var(--accent); }
.legend { display: flex; justify-content: center; gap: 24px; margin-top: 24px; font-size: .85rem; color: var(--muted); flex-wrap: wrap; }
.legend i { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: -2px; margin-right: 6px; }
.legend .l-free { background: var(--accent-soft); }
.legend .l-booked { background: var(--booked); }
.legend .l-closed { background: #fff; border: 1px solid var(--line); }

/* ===== Contact & pied ===== */
.contact-box { text-align: center; max-width: 560px; margin: 0 auto; }
.contact-box .lines { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; margin-top: 24px; }
footer { padding: 32px 0; text-align: center; color: var(--muted); font-size: .85rem; border-top: 1px solid var(--line); }

/* ===== Galerie complète (modale) ===== */
.modal { position: fixed; inset: 0; z-index: 100; display: none; }
.modal.open { display: block; }
.gallery-modal { background: var(--bg); overflow-y: auto; }
.gallery-modal header { position: sticky; top: 0; background: rgba(251,250,247,.95); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); z-index: 2; }
.gallery-modal header .container { display: flex; justify-content: space-between; align-items: center; height: 64px; }
.masonry { columns: 3 280px; column-gap: 14px; padding: 28px 0 60px; }
.masonry figure { margin: 0 0 14px; break-inside: avoid; cursor: zoom-in; border-radius: 10px; overflow: hidden; }
.masonry figcaption { font-size: .85rem; color: var(--muted); padding: 6px 2px 0; }

/* ===== Visionneuse ===== */
.lightbox { background: rgba(20, 22, 24, .94); color: #fff; display: none; align-items: center; justify-content: center; }
.lightbox.open { display: flex; }
.lightbox figure { margin: 0; max-width: 92vw; max-height: 88vh; text-align: center; }
.lightbox img { max-width: 92vw; max-height: 80vh; object-fit: contain; margin: 0 auto; border-radius: 6px; }
.lightbox figcaption { margin-top: 12px; font-size: .9rem; opacity: .85; }
.lightbox .lb-btn { position: absolute; background: rgba(255,255,255,.1); color: #fff; border: 0; width: 48px; height: 48px; border-radius: 50%; font-size: 1.4rem; cursor: pointer; }
.lightbox .lb-btn:hover { background: rgba(255,255,255,.25); }
.lb-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 20px; top: 50%; transform: translateY(-50%); }
.lb-close { top: 20px; right: 20px; }
.lb-count { position: absolute; top: 30px; left: 30px; font-size: .85rem; opacity: .7; }

/* ===== Responsive ===== */
@media (max-width: 860px) {
  section { padding: 64px 0; }
  .intro { grid-template-columns: 1fr; gap: 32px; }
  .site-header nav a:not(.btn-small) { display: none; }
  .featured-grid, .featured-grid.n3, .featured-grid.n4 { grid-template-columns: 1fr 1fr; grid-template-rows: 260px 160px 160px; }
  .featured-grid figure:first-child { grid-column: span 2; grid-row: auto; }
  .featured-grid.n4 figure:last-child { grid-column: auto; }
  .featured-grid.n2 { grid-template-rows: 260px; }
}


/* ===== Utilitaires (remplacent les styles en ligne, compatibles CSP) ===== */
.eyebrow-light { color: #fff; }
.btn-block { width: 100%; text-align: center; }
.muted { color: var(--muted); }
.gallery-title { font-family: var(--font-title); font-size: 1.4rem; font-weight: 500; }

/* ===== Page de connexion ===== */
body.login-page { background: var(--bg-alt); min-height: 100vh; display: grid; place-items: center; margin: 0; }
.login-form { width: min(380px, 92vw); display: grid; gap: 14px; text-align: center; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); }
.login-form h1 { font-size: 2rem; margin: 0; }
.login-form p { margin: 0; color: var(--muted); font-size: .9rem; }
.login-form input { font: inherit; width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; }
.login-form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.login-form .captcha { display: flex; align-items: center; justify-content: center; gap: 12px; font-size: .9rem; }
.login-form .captcha img { border: 1px solid var(--line); border-radius: 10px; max-width: 100%; height: auto; }
.login-form .error { color: var(--booked-text); min-height: 1.2em; }
