/* ---------- Variables ---------- */
:root {
  --bg: #f3f8fc;          /* neige légèrement bleutée */
  --surface: #ffffff;     /* neige */
  --ink: #14283b;         /* bleu nuit */
  --ink-soft: #4a6076;    /* bleu ardoise */
  --brand: #12365a;       /* bleu profond des sommets */
  --brand-ink: #ffffff;
  --accent: #1f6fb5;      /* bleu ciel */
  --sky: #7cc0ee;         /* ciel clair */
  --line: #d9e6f1;
  --radius: 14px;
  --shadow: 0 1px 2px rgb(0 0 0 / .05), 0 8px 24px rgb(18 54 90 / .10);
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-title: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --max: 72rem;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c1622;
    --surface: #13212f;
    --ink: #eef5fb;
    --ink-soft: #9db2c5;
    --brand: #0a1a2c;
    --accent: #5aaaf0;
    --sky: #7cc0ee;
    --line: #223447;
    --shadow: 0 1px 2px rgb(0 0 0 / .4);
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; }
body {
  margin: 0;
  font: 1.0625rem/1.65 var(--font-body);
  color: var(--ink);
  background: var(--bg);
}
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.wrap { width: min(100% - 2.5rem, var(--max)); margin-inline: auto; }
.skip {
  position: absolute; left: -999px; top: .5rem; z-index: 100;
  background: var(--accent); color: #fff; padding: .6rem 1rem; border-radius: 8px;
}
.skip:focus { left: .5rem; }

/* ---------- En-tête et navigation ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--brand) 94%, transparent);
  backdrop-filter: blur(8px);
  color: var(--brand-ink);
}
.bar { display: flex; align-items: center; justify-content: space-between; min-height: 3.75rem; gap: 1rem; }
.logo { font: 700 1.35rem var(--font-title); text-decoration: none; letter-spacing: .01em; }
.logo small { font: 400 .8rem var(--font-body); opacity: .75; margin-left: .4rem; }

.menu-toggle {
  display: none; background: none; border: 1px solid rgb(255 255 255 / .4);
  color: inherit; border-radius: 8px; padding: .45rem .8rem; font: inherit; cursor: pointer;
}
.nav ul { list-style: none; margin: 0; padding: 0; }
.nav > ul { display: flex; align-items: center; gap: .25rem; }
.nav a, .nav button.sub-toggle {
  display: block; padding: .55rem .8rem; border-radius: 8px;
  color: inherit; text-decoration: none; font: inherit; font-size: .95rem;
  background: none; border: 0; cursor: pointer;
}
.nav a:hover, .nav button.sub-toggle:hover { background: rgb(255 255 255 / .12); }
.nav .cta { background: #b5502d; color: #fff; font-weight: 600; }
.nav .cta:hover { background: #9c431f; }
@media (prefers-color-scheme: dark) {
  .nav .cta { background: #e07a55; color: #14283b; }
  .nav .cta:hover { background: #eb8e6b; }
}
.has-sub { position: relative; }
.sub-toggle::after { content: " ▾"; font-size: .75em; }
.sub {
  display: none; position: absolute; top: 100%; left: 0; min-width: 15rem;
  background: var(--surface); color: var(--ink); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: .4rem; border: 1px solid var(--line);
}
.sub a:hover { background: var(--bg); }
.has-sub.open > .sub { display: block; }

@media (max-width: 62rem) {
  .menu-toggle { display: inline-block; }
  .nav { display: none; position: absolute; inset: 100% 0 auto 0; background: var(--brand); padding: .5rem 1.25rem 1rem; max-height: 80vh; overflow: auto; }
  .nav.open { display: block; }
  .nav > ul { flex-direction: column; align-items: stretch; }
  .sub { position: static; display: none; box-shadow: none; background: rgb(255 255 255 / .07); color: inherit; border: 0; margin-left: .75rem; }
  .sub a:hover { background: rgb(255 255 255 / .12); }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate; color: #fff;
  min-height: clamp(26rem, 70vh, 40rem);
  min-height: clamp(26rem, 70svh, 40rem);
  display: grid; align-items: end;
  background: #12365a;
  overflow: hidden;
}
/* Diaporama */
.slides { position: absolute; inset: 0; z-index: -2; }
.slide {
  position: absolute; inset: 0; margin: 0; overflow: hidden;
  opacity: 0; transition: opacity 1.2s ease;
}
.slide.active { opacity: 1; }
.slide img { position: absolute; inset: 0; width: 100%; height: 100%; }
/* fond : la même photo, agrandie et floutée, pour remplir les bandes libres */
.slide .bg { object-fit: cover; filter: blur(28px) brightness(.8); transform: scale(1.15); }
/* photo entière, jamais recadrée */
.slide .full { object-fit: contain; }
.slider-ui {
  position: absolute; right: 1.25rem; bottom: 1.25rem; z-index: 2;
  display: flex; align-items: center; gap: .5rem;
}
.slider-ui button {
  background: rgb(10 38 70 / .6); color: #fff; border: 1px solid rgb(255 255 255 / .5);
  border-radius: 999px; min-width: 2.5rem; height: 2.5rem; font: inherit; cursor: pointer;
}
.slider-ui button:hover { background: rgb(10 38 70 / .85); }
.dots { display: flex; gap: .4rem; }
.dots button { min-width: 0; width: .8rem; height: .8rem; padding: 0; }
.dots button[aria-current="true"] { background: #fff; }
/* sur téléphone : on garde le bouton pause, on masque flèches et points */
@media (max-width: 40rem) { .slider-ui .prev, .slider-ui .next, .slider-ui .dots { display: none; } }
.hero .wrap { padding-block: 3rem 3.5rem; position: relative; z-index: 1; }
.hero h1, .hero .lead, .hero .eyebrow { text-shadow: 0 1px 3px rgb(0 0 0 / .55), 0 2px 18px rgb(0 0 0 / .35); }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .8rem; opacity: .85; margin: 0 0 .6rem; }
.hero h1 { font: 700 clamp(2.4rem, 6vw, 4.2rem)/1.05 var(--font-title); margin: 0 0 .75rem; }
.hero p.lead { font-size: 1.2rem; max-width: 40rem; margin: 0 0 1.75rem; opacity: .95; }
.btns { display: flex; flex-wrap: wrap; gap: .75rem; }
.btn {
  display: inline-block; padding: .8rem 1.4rem; border-radius: 999px;
  font-weight: 600; text-decoration: none; border: 2px solid transparent;
  transition: transform .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: #b5502d; color: #fff; }   /* rouge toiture, comme le premier essai */
.btn-primary:hover { background: #9c431f; }
@media (prefers-color-scheme: dark) {
  .btn-primary { background: #e07a55; color: #14283b; }   /* texte sombre : contraste 5:1 */
  .btn-primary:hover { background: #eb8e6b; }
}
.btn-ghost { border-color: rgb(255 255 255 / .7); color: #fff; }
.btn-ghost:hover { background: rgb(255 255 255 / .15); }

/* ---------- Sections ---------- */
section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section-title { font: 700 clamp(1.7rem, 3.5vw, 2.4rem)/1.15 var(--font-title); margin: 0 0 .5rem; }
.section-intro { color: var(--ink-soft); max-width: 42rem; margin: 0 0 2.5rem; }

.intro { display: grid; gap: 2rem; align-items: start; }
@media (min-width: 62rem) { .intro { grid-template-columns: 34.5rem 1fr; gap: 2.5rem; } }
/* 34,5 rem × 13,8 rem : même proportion (5:2), 20 % plus petite que 43,1 × 17,25 rem */
.intro img { border-radius: var(--radius); box-shadow: var(--shadow); aspect-ratio: 5 / 2; object-fit: cover; width: 100%; max-height: 450px; }
.intro p { margin: 0 0 1rem; }
.link-more { color: var(--accent); font-weight: 600; text-decoration: none; }
.link-more::after { content: " →"; }
.link-more:hover { text-decoration: underline; }

/* ---------- Cartes ---------- */
.grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(17.5rem, 1fr)); }
.card {
  background: var(--surface); border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  transition: transform .2s ease;
}
.card:hover { transform: translateY(-4px); }
.card img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
.card-body { padding: 1.25rem 1.4rem 1.5rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.card h3 { font: 700 1.3rem var(--font-title); margin: 0; }
.card p { margin: 0; color: var(--ink-soft); font-size: .98rem; flex: 1; }

.band { background: var(--surface); border-block: 1px solid var(--line); }

/* ---------- Bandeau gîte ---------- */
.gite {
  display: grid; gap: 2rem; align-items: center;
  background: var(--brand); color: var(--brand-ink);
  border-radius: calc(var(--radius) * 1.5); overflow: hidden;
}
@media (min-width: 52rem) { .gite { grid-template-columns: 1fr 1fr; } }
.gite img { width: 100%; height: 100%; min-height: 16rem; object-fit: cover; }
.gite .txt { padding: 2rem; }
.gite h2 { font: 700 clamp(1.7rem, 3.5vw, 2.3rem)/1.15 var(--font-title); margin: 0 0 .75rem; }

/* ---------- Pied de page ---------- */
footer { background: var(--brand); color: #dfe6ea; padding-block: 2.5rem; font-size: .95rem; }
.foot { display: flex; flex-wrap: wrap; gap: 1.5rem; justify-content: space-between; align-items: center; }
.social { display: flex; gap: 1rem; list-style: none; margin: 0; padding: 0; }
footer a { text-decoration: none; }
footer a:hover { text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
