/* ---------- Thème ---------- */
:root {
  --bg: #fbf7ef;
  --bg-alt: #f2ebdd;
  --text: #1d2a33;
  --muted: #5f6b70;
  --line: #e3dac8;
  --accent: #1d6a8a;
  --accent-hover: #155470;
  --on-accent: #fff;
  --header-bg: rgba(251, 247, 239, 0.88);

  /* Photo d'accueil (`none` pour revenir au dégradé seul) */
  --hero-photo: url("../images/vue-mer.jpg");

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 14px;
  --header-h: 68px;

  /* Vagues */
  --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='40' viewBox='0 0 80 40'%3E%3Cpath d='M0 20c10 0 10-8 20-8s10 8 20 8 10-8 20-8 10 8 20 8' fill='none' stroke='%23fff' stroke-opacity='.14' stroke-width='2'/%3E%3C/svg%3E");
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #10181d;
    --bg-alt: #17232a;
    --text: #eef2f2;
    --muted: #9fb0b6;
    --line: #263840;
    --accent: #5fb3d3;
    --accent-hover: #7cc4df;
    --on-accent: #10181d;
    --header-bg: rgba(16, 24, 29, 0.88);
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.15; margin: 0 0 0.6em; }
h1 { font-size: clamp(3rem, 10vw, 6rem); letter-spacing: 0.01em; }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h3 { font-size: 1.25rem; margin-bottom: 0.3em; }
p { margin: 0 0 1em; }
a { color: var(--accent); }
img { display: block; max-width: 100%; }
ul { list-style: none; margin: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.container { width: min(1120px, 100% - 2.5rem); margin-inline: auto; }
.narrow { max-width: 640px; }
.center { text-align: center; }

.eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.9em;
}

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--accent); color: var(--on-accent);
  padding: 0.5rem 1rem; border-radius: 8px;
}
.skip-link:focus { top: 1rem; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-block;
  padding: 0.85rem 1.6rem;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-small { padding: 0.5rem 1.1rem; }
.btn-ghost { background: transparent; border-color: rgba(255, 255, 255, 0.7); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.15); border-color: #fff; }
.btn-light { background: #fff; border-color: #fff; color: #155470; }
.btn-light:hover { background: #e2f0f5; border-color: #e2f0f5; }

/* ---------- En-tête ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.brand { font-family: var(--serif); font-size: 1.5rem; color: var(--text); text-decoration: none; }

.nav { display: flex; align-items: center; gap: 1.75rem; }
.nav a:not(.btn) { color: var(--text); text-decoration: none; font-size: 0.95rem; }
.nav a:not(.btn):hover { color: var(--accent); }
.nav .lang { font-weight: 600; letter-spacing: 0.08em; }

.nav-toggle {
  display: none;
  width: 44px; height: 44px; padding: 10px;
  background: none; border: 0; cursor: pointer;
  flex-direction: column; justify-content: space-between;
}
.nav-toggle span { display: block; height: 2px; background: var(--text); border-radius: 2px; transition: transform 0.2s, opacity 0.2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(11px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-11px) rotate(-45deg); }

@media (max-width: 820px) {
  .js .nav-toggle { display: flex; }
  .js .nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 0.5rem 1.25rem 1.25rem;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    display: none;
  }
  .js .nav.open { display: flex; }
  .js .nav a:not(.btn) { padding: 0.8rem 0; border-bottom: 1px solid var(--line); }
  .js .nav .btn { margin-top: 1rem; text-align: center; }
  /* Sans JavaScript : le menu reste visible et défile horizontalement */
  html:not(.js) .nav { overflow-x: auto; gap: 1.1rem; margin-left: 1rem; white-space: nowrap; }
}

/* ---------- Accueil ---------- */
.hero {
  min-height: min(calc(100svh - var(--header-h)), 860px);
  display: flex; align-items: center; justify-content: center;
  padding: 4rem 0;
  color: #fff;
  text-align: center;
  background:
    linear-gradient(rgba(10, 22, 28, 0.35), rgba(10, 22, 28, 0.55)),
    var(--hero-photo) center / cover no-repeat,
    linear-gradient(160deg, #4fa3c7 0%, #1d6a8a 55%, #0f3d52 100%);
}
.hero-content { max-width: 760px; text-shadow: 0 1px 12px rgba(0, 0, 0, 0.45); }
.hero .btn { text-shadow: none; }
.hero .eyebrow { color: rgba(255, 255, 255, 0.85); }
.hero h1 { margin-bottom: 0.25em; }
.hero-lead { font-size: clamp(1.1rem, 2.4vw, 1.35rem); color: rgba(255, 255, 255, 0.92); margin-bottom: 2rem; }
.hero-actions, .cta-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; justify-content: center; }
.hero .btn:not(.btn-ghost) { background: #fff; border-color: #fff; color: #155470; }
.hero .btn:not(.btn-ghost):hover { background: #e2f0f5; border-color: #e2f0f5; }

/* ---------- Sections ---------- */
.section { padding: clamp(4rem, 9vw, 7rem) 0; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 640px; margin-bottom: 2.5rem; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }

.facts { display: flex; gap: 2.5rem; margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.facts strong { display: block; font-family: var(--serif); font-size: 2rem; font-weight: 500; line-height: 1.1; }
.facts span { font-size: 0.85rem; color: var(--muted); }

/* ---------- Photos ---------- */
.photo {
  margin: 0;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(135deg, var(--line), var(--bg-alt));
  border: 1px solid var(--line);
  display: grid; place-items: center;
}
.photo span { color: var(--muted); font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo-arch { aspect-ratio: 4 / 5; border-radius: 999px 999px var(--radius) var(--radius); max-width: 440px; width: 100%; justify-self: center; }

.gallery { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 340px; gap: 1rem; }
.gallery .photo { aspect-ratio: auto; }
.gallery .wide { grid-column: span 2; }
.gallery .tall { grid-row: span 2; }
@media (max-width: 820px) {
  .gallery { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .gallery .wide { grid-column: auto; }
  .gallery .tall { grid-row: auto; }
  .gallery .photo img { height: auto; }
}

/* Mosaïque : chaque photo garde ses proportions, sans recadrage */
.mosaic { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; align-items: start; }
.mosaic-col { display: flex; flex-direction: column; gap: 1rem; }
.mosaic .photo { display: block; aspect-ratio: auto; }
.mosaic .photo img { height: auto; }
@media (max-width: 820px) { .mosaic { grid-template-columns: 1fr; } }

.around { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: clamp(2rem, 5vw, 3.5rem); }
@media (max-width: 820px) { .around { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Vidéo ---------- */
.video { max-width: 960px; margin-top: clamp(3rem, 7vw, 5rem); text-align: center; }
.video-frame { aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #000; border: 1px solid var(--line); }
.video-frame iframe { display: block; width: 100%; height: 100%; border: 0; }

/* ---------- Carte ---------- */
.map { max-width: 760px; margin-top: clamp(2rem, 5vw, 3.5rem); text-align: center; }
.map-frame { aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); margin-bottom: 0.9rem; }
.map-side { margin-top: 0; }
.map-frame iframe { display: block; width: 100%; height: 100%; border: 0; }

/* ---------- Équipements ---------- */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.features li { padding: 1.5rem; border: 1px solid var(--line); border-radius: var(--radius); }
.features p { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* ---------- Bon à savoir ---------- */
.notes { max-width: 760px; margin-top: 2.5rem; padding: 1.5rem; border-left: 3px solid var(--accent); background: var(--bg-alt); border-radius: 0 var(--radius) var(--radius) 0; }
.notes p { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* ---------- Situation ---------- */
.distances { margin-top: 1.5rem; }
.distances li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.8rem 0; border-top: 1px solid var(--line); }
.distances li span:last-child { color: var(--muted); white-space: nowrap; }

/* ---------- Disponibilités ---------- */
.cal { max-width: 720px; margin: 2rem auto 0; }
.cal-nav { display: flex; justify-content: space-between; margin-bottom: -44px; position: relative; z-index: 1; }
.cal-nav button {
  width: 44px; height: 44px;
  border: 1px solid var(--line); border-radius: 50%;
  background: var(--bg); color: var(--text);
  font-size: 1.1rem; cursor: pointer;
}
.cal-nav button:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.cal-nav button:disabled { opacity: 0.35; cursor: default; }
.cal-months { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; }
.cal-month h3 { font-size: 1.15rem; text-transform: capitalize; margin-bottom: 1rem; line-height: 44px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; font-size: 0.9rem; }
.cal-weekday { color: var(--muted); font-size: 0.75rem; text-transform: uppercase; padding-bottom: 0.3rem; }
.cal-day { aspect-ratio: 1; display: grid; place-items: center; border-radius: 8px; }
.cal-day.free { background: var(--bg-alt); }
.cal-day.booked { color: var(--muted); text-decoration: line-through; opacity: 0.55; }
.cal-day.past { color: var(--muted); opacity: 0.35; }
.cal-legend { margin: 1.75rem 0 0.5rem; font-size: 0.9rem; color: var(--muted); }
.cal-key { display: inline-block; width: 0.9rem; height: 0.9rem; border-radius: 4px; vertical-align: -0.1rem; margin: 0 0.35rem 0 1rem; }
.cal-key.free { background: var(--bg-alt); border: 1px solid var(--line); margin-left: 0; }
.cal-key.booked { border: 1px dashed var(--muted); opacity: 0.6; }
.cal-note { font-size: 0.85rem; color: var(--muted); margin: 0; }
@media (max-width: 640px) {
  .cal-months { grid-template-columns: 1fr; }
  .cal-month + .cal-month { display: none; }
}

/* ---------- Appel à réserver ---------- */
.cta {
  padding: clamp(3.5rem, 8vw, 5.5rem) 0;
  text-align: center;
  color: #fff;
  background: var(--pattern), linear-gradient(160deg, #1d6a8a, #0f3d52);
}
.cta p { color: rgba(255, 255, 255, 0.9); margin-bottom: 1.75rem; }
.airbnb-embed-frame { width: min(450px, 100%); min-height: 300px; margin: 0 auto 1.75rem; }
.airbnb-embed-frame a { color: #fff; display: block; }
.airbnb-embed-frame iframe { border-radius: var(--radius); }

/* ---------- Contact et pied de page ---------- */
.contact-link { font-family: var(--serif); font-size: clamp(1.3rem, 4vw, 1.9rem); overflow-wrap: anywhere; }

.site-footer { border-top: 1px solid var(--line); padding: 1.75rem 0; font-size: 0.9rem; color: var(--muted); }
.footer-inner { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }

/* ---------- Apparition au défilement ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s ease; }
.js .reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}
