/* ============================================
   Préseau – feuille de style
   Couleurs inspirées de la brique du Nord,
   des champs de blé et des prairies.
   ============================================ */

:root {
  --brique: #9c3d28;
  --brique-fonce: #6e2a1b;
  --ble: #e3c27a;
  --prairie: #4f6b3a;
  --creme: #faf6ef;
  --papier: #ffffff;
  --encre: #2b2420;
  --gris: #6b625b;
  --ombre: 0 6px 24px rgba(43, 36, 32, 0.12);
  --rayon: 12px;
  --largeur: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 70px; }

body {
  margin: 0;
  font-family: "Source Sans 3", system-ui, sans-serif;
  font-size: 1.075rem;
  line-height: 1.65;
  color: var(--encre);
  background: var(--creme);
}

h1, h2, h3 {
  font-family: "Fraunces", Georgia, serif;
  line-height: 1.15;
  margin: 0 0 0.5em;
}
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); color: var(--brique-fonce); }
h3 { font-size: 1.3rem; }

img { max-width: 100%; display: block; }

a { color: var(--brique); }

/* ---------- Barre de navigation ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 1.5rem;
  background: rgba(250, 246, 239, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: "Fraunces", serif;
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--brique-fonce);
  text-decoration: none;
}
.topbar nav { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.topbar nav a {
  color: var(--encre);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}
.topbar nav a:hover { color: var(--brique); }

/* ---------- Bannière ---------- */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  padding: 3rem 1.5rem;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(30, 20, 14, 0.72) 0%, rgba(30, 20, 14, 0.25) 60%, rgba(30, 20, 14, 0) 100%),
    url("images/chaussee.jpg") center 60% / cover no-repeat;
}
.hero-text { max-width: var(--largeur); width: 100%; margin: 0 auto; }
.hero h1 {
  font-size: clamp(3.5rem, 12vw, 7.5rem);
  margin: 0.1em 0;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.35);
}
.kicker {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.85rem;
  font-weight: 600;
  margin: 0;
  color: var(--ble);
}
.tagline { font-size: clamp(1.15rem, 2.4vw, 1.5rem); margin: 0 0 2rem; max-width: 32ch; }
.btn {
  display: inline-block;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  background: var(--ble);
  color: var(--encre);
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s, background 0.2s;
}
.btn:hover { transform: translateY(-2px); background: #f0d28f; }
.hero-credit {
  position: absolute;
  right: 1.5rem;
  bottom: 1rem;
  margin: 0;
  font-size: 0.8rem;
  opacity: 0.8;
}

/* ---------- Sections ---------- */
.section {
  max-width: var(--largeur);
  margin: 0 auto;
  padding: 5rem 1.5rem;
}
.lead { color: var(--gris); font-size: 1.2rem; margin-top: -0.3rem; margin-bottom: 2.5rem; }

/* En bref */
.intro {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 3rem;
  align-items: center;
}
.facts {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.facts li {
  background: var(--papier);
  border-radius: var(--rayon);
  padding: 1.3rem;
  box-shadow: var(--ombre);
  border-top: 4px solid var(--brique);
}
.fact-num {
  display: block;
  font-family: "Fraunces", serif;
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--brique);
}
.fact-label { color: var(--gris); font-size: 0.95rem; }

/* Cartes patrimoine */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.6rem;
}
.card {
  background: var(--papier);
  border-radius: var(--rayon);
  overflow: hidden;
  box-shadow: var(--ombre);
  transition: transform 0.25s;
}
.card:hover { transform: translateY(-4px); }
.card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  cursor: zoom-in;
}
.card-body { padding: 1.3rem 1.4rem 1.5rem; }
.card-body p { margin: 0 0 0.7em; color: #4a413b; }
.card-text { background: var(--prairie); }
.card-text h3, .card-text p, .card-text strong { color: #fff; }
.card-text .card-body { padding: 1.8rem; }

/* Galerie */
.gallery-title { margin-top: 4rem; color: var(--brique-fonce); }
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.gallery figure { margin: 0; }
.gallery img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: var(--rayon);
  cursor: zoom-in;
  transition: filter 0.2s;
}
.gallery img:hover { filter: brightness(1.08); }
.gallery figcaption { text-align: center; color: var(--gris); margin-top: 0.4rem; font-style: italic; }

/* Château (dans Patrimoine) */
.chateau-block { margin-top: 4.5rem; }
.chateau-text h3 { font-size: clamp(1.6rem, 3vw, 2.1rem); color: var(--brique-fonce); }
.gallery-chateau { grid-template-columns: repeat(5, 1fr); margin-top: 2.5rem; }
.gallery-chateau img { aspect-ratio: 3 / 2; }
.chateau-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.postcard { margin: 0; }
.postcard img {
  width: 100%;
  border: 12px solid #fffdf8;
  box-shadow: 0 10px 30px rgba(43, 36, 32, 0.25);
  transform: rotate(-1.5deg);
  cursor: zoom-in;
}
.postcard figcaption { margin-top: 1.2rem; font-size: 0.9rem; color: var(--gris); font-style: italic; }
.chateau-text .kicker { color: var(--brique); }
.chateau-text .note {
  font-size: 0.95rem;
  color: var(--gris);
  border-left: 3px solid var(--ble);
  padding-left: 0.8rem;
}

/* Histoire */
.history {
  max-width: none;
  background: var(--brique-fonce);
  color: #f3e9df;
}
.history h2 { color: var(--ble); }
.history-inner {
  max-width: var(--largeur);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 3.5rem;
  align-items: start;
}
.timeline { list-style: none; padding: 0; margin: 2rem 0 0; border-left: 2px solid rgba(227, 194, 122, 0.4); }
.timeline li { position: relative; padding: 0 0 1.6rem 1.8rem; }
.timeline li::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 0.45rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--ble);
}
.year { font-family: "Fraunces", serif; font-weight: 700; font-size: 1.25rem; color: var(--ble); }
.timeline p { margin: 0.2rem 0 0; }
.old-photo { margin: 0; position: sticky; top: 6rem; }
.old-photo img {
  width: 100%;
  border: 10px solid #f3e9df;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  transform: rotate(2deg);
  cursor: zoom-in;
}
.old-photo figcaption { margin-top: 1.2rem; font-size: 0.9rem; opacity: 0.8; font-style: italic; }

/* Saveurs */
.saveurs { padding-top: 5rem; padding-bottom: 5rem; }
.saveurs-card {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  background: var(--ble);
  border-radius: 24px;
  padding: 3rem 2.5rem;
}
.saveurs-card .kicker { color: var(--brique-fonce); }
.saveurs-card h2 { color: var(--encre); }

/* Vie du village */
.events {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.6rem;
}
.event {
  background: var(--papier);
  border-radius: var(--rayon);
  padding: 1.6rem;
  box-shadow: var(--ombre);
  border-left: 5px solid var(--prairie);
}
.event-when {
  margin: 0 0 0.3rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--prairie);
}
.event p:last-child { margin-bottom: 0; color: #4a413b; }
.assos { margin: 2.5rem 0 0; max-width: 70ch; color: #4a413b; }

.btn-small { padding: 0.6rem 1.2rem; font-size: 0.95rem; margin-top: 1rem; }

/* Infos pratiques */
.practical {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6rem;
}
.info {
  background: var(--papier);
  border-radius: var(--rayon);
  padding: 1.6rem;
  box-shadow: var(--ombre);
}
.info h3 { color: var(--prairie); }
.info ul { padding-left: 1.1rem; margin: 0; }
.info li { margin-bottom: 0.6rem; }
.map { grid-column: 1 / -1; }
.map iframe {
  width: 100%;
  height: 380px;
  border: 0;
  border-radius: var(--rayon);
  box-shadow: var(--ombre);
}

/* Pied de page */
footer {
  background: var(--encre);
  color: #d8cfc6;
  text-align: center;
  padding: 2.5rem 1.5rem;
}
footer p { margin: 0.3rem 0; }
footer a { color: var(--ble); }
.credits { font-size: 0.82rem; opacity: 0.8; max-width: 70ch; margin: 0.8rem auto 0 !important; }

/* Visionneuse */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: rgba(15, 10, 8, 0.9);
  cursor: zoom-out;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-height: 90vh; max-width: 100%; border-radius: 8px; }

/* ---------- Téléphones et tablettes ---------- */
@media (max-width: 820px) {
  .topbar { flex-direction: column; align-items: stretch; padding: 0.5rem 1rem; gap: 0.2rem; }
  .logo { font-size: 1.1rem; }
  .logo img { width: 22px; height: auto; }
  .topbar nav { flex-wrap: nowrap; overflow-x: auto; gap: 1rem; scrollbar-width: none; }
  .topbar nav a { font-size: 0.88rem; white-space: nowrap; }
  .section { padding: 3.5rem 1rem; }
  .hero { padding: 3rem 1rem; min-height: 75vh; }
  .intro, .history-inner, .practical, .chateau-grid { grid-template-columns: 1fr; }
  .chateau-grid { gap: 2rem; }
  .gallery-chateau { grid-template-columns: repeat(2, 1fr); }
  .old-photo { position: static; max-width: 320px; }
  .gallery { grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
  .saveurs-card { padding: 2.2rem 1.4rem; }
}
