/* ===== Design tokens — Identité Barjols : armoiries (azur & or) + pierre ===== */
/* Blason : « D'azur à la colonne d'or, sommée d'une fleur de lis, accostée de deux B » */
:root {
  --radius: 0.25rem;
  --radius-sm: calc(var(--radius) - 0.25rem);
  --header-h: 5.25rem;                 /* sticky header height (only px exception: 1px hairline borders) */

  --font-display: "Libre Baskerville", Georgia, serif;
  --font-sans: "IBM Plex Sans", system-ui, sans-serif;

  /* --- Couleurs de marque (source de vérité) --- */
  --azure:       oklch(0.52 0.11 248);    /* azur héraldique — accent principal */
  --azure-deep:  oklch(0.42 0.11 250);    /* azur profond — liens, boutons */
  --gold:        oklch(0.76 0.105 80);    /* or — accent secondaire */
  --gold-deep:   oklch(0.63 0.10 80);
  --ink:         oklch(0.27 0.055 258);   /* bleu nuit — sections sombres & titres */
  --stone-cream: oklch(0.965 0.012 85);   /* pierre claire — fond */

  /* --- Alias rétro-compatibles (l'ancien thème olive renvoie vers la marque) --- */
  --stone-sand:  var(--gold);
  --olive:       var(--azure);
  --olive-deep:  var(--azure-deep);
  --earth:       var(--ink);

  --background: var(--stone-cream);
  --foreground: oklch(0.25 0.05 258);
  --muted-foreground: oklch(0.47 0.03 258);
  --border: oklch(0.84 0.018 250);
}

* { box-sizing: border-box; margin: 0; padding: 0; border-color: var(--border); }

html { scroll-behavior: smooth; }

body {
  background-color: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-feature-settings: "ss01", "cv11";
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* offset anchors so the sticky header doesn't cover them */
[id] { scroll-margin-top: calc(var(--header-h) + 1rem); }

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: var(--background);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  margin-inline: auto;
  max-width: 80rem;                    /* max-w-7xl */
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: var(--header-h);
  padding-inline: 1.25rem;
}
.brand { display: inline-flex; align-items: center; gap: 0.8rem; }
.brand-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 3.4rem;
}
.brand-badge img { height: 100%; width: auto; display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.4rem; color: var(--earth); }
.brand-sub {
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.62rem;
  font-weight: 500;
  color: var(--muted-foreground);
  margin-top: 0.15rem;
}
/* Burger toggle — visible on mobile only */
.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: transparent;
  color: var(--earth);
  cursor: pointer;
}
.nav-toggle svg { width: 1.5rem; height: 1.5rem; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: inline-block; }

/* Mobile-first: nav is a dropdown panel under the header */
.site-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  background: var(--background);
  border-bottom: 1px solid var(--border);
  padding: 0.25rem 1.25rem 1rem;
  box-shadow: 0 0.5rem 1rem color-mix(in oklch, var(--earth) 12%, transparent);
}
.site-nav.is-open { display: flex; }
.nav-link {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--muted-foreground);
  transition: color 0.2s ease;
  padding: 0.85rem 0;
  border-top: 1px solid var(--border);
}
.nav-link:first-child { border-top: none; }
.nav-link:hover { color: var(--earth); }
.nav-link.is-active { color: var(--earth); font-weight: 600; }

/* Desktop: inline nav, no burger */
@media (min-width: 1024px) {
  .nav-toggle { display: none; }
  .site-nav {
    display: flex;
    position: static;
    flex-direction: row;
    align-items: center;
    gap: 1.85rem;
    background: transparent;
    border-bottom: none;
    padding: 0;
    box-shadow: none;
  }
  .nav-link { padding: 0; border-top: none; }
}

.eyebrow {
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--olive);
}

/* ===== Icons ===== */
.icon { display: inline-block; flex-shrink: 0; }
.icon-xs { width: 0.75rem; height: 0.75rem; }
.icon-sm { width: 1rem;    height: 1rem; }
.icon-lg { width: 1.5rem;  height: 1.5rem; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;            /* py-3.5 px-6 */
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.btn-cream {
  background-color: var(--stone-cream);
  color: var(--earth);
}
.btn-cream:hover { background-color: var(--stone-sand); }
.btn-outline {
  border: 1px solid color-mix(in oklch, var(--stone-cream) 40%, transparent);
  color: var(--stone-cream);
}
.btn-outline:hover { background-color: color-mix(in oklch, var(--stone-cream) 10%, transparent); }

/* ===== Hero ===== */
.hero { position: relative; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; }
.hero-img { height: 100%; width: 100%; object-fit: cover; }
.hero-gradient {
  position: absolute; inset: 0;
  background: linear-gradient(
    to bottom,
    color-mix(in oklch, var(--earth) 30%, transparent),
    color-mix(in oklch, var(--earth) 45%, transparent),
    color-mix(in oklch, var(--earth) 85%, transparent)
  );
}
.hero-inner {
  position: relative;
  margin-inline: auto;
  display: flex;
  min-height: calc(100vh - var(--header-h));   /* fallback */
  min-height: calc(100svh - var(--header-h));  /* fills exactly the screen below the header */
  max-width: 80rem;                    /* max-w-7xl */
  flex-direction: column;
  justify-content: flex-end;
  padding: 5rem 1.25rem 5rem;          /* px-5, balanced top/bottom */
}
.hero-content { max-width: 48rem; color: var(--stone-cream); }   /* max-w-3xl */
.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: var(--stone-sand);
}
.hero-eyebrow-line { display: inline-block; height: 1px; width: 2.5rem; background: var(--stone-sand); }
.hero-title {
  margin-top: 1.5rem;
  font-family: var(--font-display);
  font-size: 3rem;                     /* text-5xl */
  line-height: 1.05;
}
.hero-title em { font-style: italic; font-weight: 400; color: var(--stone-sand); }
.hero-text {
  margin-top: 1.75rem;
  max-width: 36rem;                    /* max-w-xl */
  font-size: 1rem;
  line-height: 1.625;
  color: color-mix(in oklch, var(--stone-cream) 90%, transparent);
}
.hero-actions { margin-top: 2.5rem; display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* ===== Quick access ===== */
.quick { border-bottom: 1px solid var(--border); background-color: var(--background); }
.quick-grid {
  margin-inline: auto;
  max-width: 80rem;
  display: grid;
  gap: 1px;
  overflow: hidden;
  background-color: var(--border);
}
.quick-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background-color: var(--background);
  padding: 1.75rem;                    /* p-7 */
  transition: background-color 0.2s ease;
}
.quick-item:hover { background-color: var(--stone-cream); }
.quick-icon { margin-top: 0.25rem; color: var(--olive); }
.quick-body { min-width: 0; }
.quick-label { font-family: var(--font-display); font-weight: 700; font-size: 1.125rem; color: var(--earth); }
.quick-desc { margin-top: 0.25rem; font-size: 0.875rem; color: var(--muted-foreground); }
.quick-cta {
  margin-top: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--olive-deep);
}
.quick-arrow { transition: transform 0.2s ease; }
.quick-item:hover .quick-arrow { transform: translateX(0.125rem); }

/* ===== Village en bref ===== */
.village {
  margin-inline: auto;
  max-width: 80rem;
  padding: 6rem 1.25rem;               /* py-24 px-5 */
}
.village-grid { display: grid; gap: 3.5rem; }
.village-media { position: relative; }
.village-img { height: 100%; width: 100%; object-fit: cover; }
.village-badge {
  position: absolute;
  bottom: -1.5rem;
  right: -1rem;
  display: none;
  background-color: var(--stone-cream);
  padding: 1.25rem;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.village-badge-num { font-family: var(--font-display); font-weight: 700; font-size: 2.25rem; color: var(--olive-deep); }
.village-badge-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.18em; color: var(--muted-foreground); }
.village-title {
  margin-top: 1rem;
  font-family: var(--font-display);
  font-size: 2.25rem;                  /* text-4xl */
  color: var(--earth);
}
.village-title em { font-style: italic; font-weight: 400; }
.village-para {
  margin-top: 1.5rem;
  font-size: 1rem;
  line-height: 1.625;
  color: color-mix(in oklch, var(--foreground) 80%, transparent);
}
.village-stats {
  margin-top: 2.5rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 1.75rem 0;
}
.village-stats dt { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.16em; color: var(--muted-foreground); }
.village-stats dd { margin-top: 0.5rem; font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; color: var(--earth); }
.link-olive {
  margin-top: 2rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--olive-deep);
}
.link-olive:hover { text-decoration: underline; }

/* ===== Featured event ===== */
.event { background-color: var(--earth); color: var(--stone-cream); }
.event-grid {
  margin-inline: auto;
  max-width: 80rem;
  display: grid;
  gap: 3rem;
  padding: 5rem 1.25rem;               /* py-20 px-5 */
}
.event-eyebrow { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.28em; color: var(--stone-sand); }
.event-title { margin-top: 1rem; font-family: var(--font-display); font-size: 2.25rem; }
.event-title em { display: block; font-style: italic; font-weight: 400; color: var(--stone-sand); }
.event-para {
  margin-top: 1.5rem;
  max-width: 36rem;
  color: color-mix(in oklch, var(--stone-cream) 85%, transparent);
}
.event .btn-outline { margin-top: 2rem; padding-block: 0.75rem; }
.event-media { position: relative; aspect-ratio: 4 / 5; overflow: hidden; }
.event-img { height: 100%; width: 100%; object-fit: cover; }

/* ===== Responsive (md: ≥768px) ===== */
@media (min-width: 640px) {
  .hero-title { font-size: 3.75rem; }   /* sm:text-6xl */
  .hero-text { font-size: 1.125rem; }   /* sm:text-lg */
  .village-badge { display: block; }
}
@media (min-width: 768px) {
  .hero-inner { padding: 7rem 2rem 7rem; }   /* md: px-8, balanced top/bottom */
  .hero-title { font-size: 4.5rem; }          /* md:text-7xl */
  .quick-grid { grid-template-columns: repeat(3, 1fr); }
  .quick-item { padding: 2.25rem; }           /* md:p-9 */
  .village { padding: 8rem 2rem; }            /* md:py-32 px-8 */
  .village-grid { grid-template-columns: repeat(2, 1fr); gap: 5rem; }
  .village-media .village-badge { right: -2rem; padding: 1.75rem; }
  .village-text { padding-top: 2rem; }
  .village-title { font-size: 3rem; }         /* md:text-5xl */
  .event-grid { grid-template-columns: 1.2fr 1fr; align-items: center; gap: 4rem; padding: 7rem 2rem; }
  .event-title { font-size: 3rem; }
}

/* ============================================================= */
/* ===== Footer (shared) ===== */
/* ============================================================= */
.site-footer { background-color: var(--earth); color: color-mix(in oklch, var(--stone-cream) 80%, transparent); }
.footer-inner {
  margin-inline: auto;
  max-width: 80rem;
  display: grid;
  gap: 2.5rem;
  padding: 4rem 1.25rem 3rem;
  border-bottom: 1px solid color-mix(in oklch, var(--stone-cream) 15%, transparent);
}
.footer-name { font-family: var(--font-display); font-weight: 700; font-size: 1.4rem; color: var(--stone-cream); margin-bottom: 0.9rem; }
.footer-col h4 { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; color: var(--stone-cream); margin-bottom: 0.9rem; }
.footer-col p { font-size: 0.9rem; line-height: 1.7; }
.footer-links { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-links a, .footer-legal a { font-size: 0.9rem; color: color-mix(in oklch, var(--stone-cream) 80%, transparent); transition: color 0.2s ease; }
.footer-links a:hover, .footer-legal a:hover { color: var(--stone-sand); }
.footer-bottom {
  margin-inline: auto;
  max-width: 80rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.5rem 1.25rem;
}
.footer-bottom p { font-size: 0.8rem; color: color-mix(in oklch, var(--stone-cream) 60%, transparent); }
.footer-legal { display: flex; flex-wrap: wrap; gap: 1.25rem; }

/* ============================================================= */
/* ===== Sub-page hero ===== */
/* ============================================================= */
.page-hero {
  border-bottom: 1px solid var(--border);
  background-color: var(--stone-cream);
}
.page-hero-inner {
  margin-inline: auto;
  max-width: 80rem;
  display: grid;
  gap: 3rem;
  align-items: center;
  padding: 4.5rem 1.25rem;
}
.page-hero-eyebrow { margin-bottom: 1rem; }
.page-hero-title { font-family: var(--font-display); font-size: 2.5rem; color: var(--earth); line-height: 1.1; }
.page-hero-title em { font-style: italic; font-weight: 400; color: var(--olive-deep); }
.page-hero-text { margin-top: 1.5rem; font-size: 1.05rem; line-height: 1.7; color: color-mix(in oklch, var(--foreground) 80%, transparent); max-width: 38rem; }
.page-hero-media { aspect-ratio: 16 / 11; overflow: hidden; }
.page-hero-media img { width: 100%; height: 100%; object-fit: cover; }

/* ===== Section wrapper ===== */
.section { margin-inline: auto; max-width: 80rem; padding: 5rem 1.25rem; }
.section-head { max-width: 40rem; margin-bottom: 3rem; }
.section-title { font-family: var(--font-display); font-size: 2rem; color: var(--earth); margin-top: 0.6rem; }

/* ============================================================= */
/* ===== Patrimoine — feature rows ===== */
/* ============================================================= */
.feature-row { display: grid; gap: 2.5rem; align-items: center; margin-bottom: 4.5rem; }
.feature-row:last-child { margin-bottom: 0; }
.feature-media { aspect-ratio: 4 / 3; overflow: hidden; }
.feature-media img { width: 100%; height: 100%; object-fit: cover; }
.feature-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.18em; font-weight: 500; color: var(--olive); }
.feature-title { font-family: var(--font-display); font-size: 1.75rem; color: var(--earth); margin-top: 0.6rem; }
.feature-text { margin-top: 1rem; line-height: 1.75; color: color-mix(in oklch, var(--foreground) 80%, transparent); }

/* ===== Gallery ===== */
.gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background-color: var(--border); }
.gallery-item { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background-color: var(--background); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 0.75rem 1rem;
  font-size: 0.8rem;
  color: var(--stone-cream);
  background: linear-gradient(to top, color-mix(in oklch, var(--earth) 85%, transparent), transparent);
}

/* ============================================================= */
/* ===== Agenda ===== */
/* ============================================================= */
.featured-event {
  margin-inline: auto;
  max-width: 80rem;
  margin-top: 0;
}
.featured-event-card {
  display: grid;
  background-color: var(--earth);
  color: var(--stone-cream);
  overflow: hidden;
}
.featured-event-media { aspect-ratio: 16 / 10; overflow: hidden; }
.featured-event-media img { width: 100%; height: 100%; object-fit: cover; }
.featured-event-body { padding: 2.5rem 1.5rem; }
.featured-event-tag { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.28em; color: var(--stone-sand); }
.featured-event-title { font-family: var(--font-display); font-size: 1.9rem; margin-top: 0.8rem; }
.featured-event-desc { margin-top: 1rem; color: color-mix(in oklch, var(--stone-cream) 85%, transparent); line-height: 1.7; }
.featured-event-meta { margin-top: 1.5rem; display: flex; flex-wrap: wrap; gap: 1.5rem; }
.featured-event-meta div { display: flex; align-items: center; gap: 0.5rem; font-size: 0.85rem; color: var(--stone-sand); }

/* Event list */
.event-list { display: flex; flex-direction: column; }
.event-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.35rem 1.5rem;
  align-items: start;
  padding: 1.75rem 0;
  border-top: 1px solid var(--border);
}
.event-row:last-child { border-bottom: 1px solid var(--border); }
.event-date-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 4.5rem;
  height: 4.5rem;
  border: 1px solid var(--border);
  background-color: var(--stone-cream);
  text-align: center;
}
.event-date-day { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; color: var(--earth); line-height: 1; }
.event-date-month { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.16em; color: var(--muted-foreground); margin-top: 0.2rem; }
.event-info-title { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; color: var(--earth); }
.event-info-meta { margin-top: 0.35rem; font-size: 0.85rem; color: var(--muted-foreground); display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; }
.event-cat {
  grid-column: 2;
  justify-self: start;
  margin-top: 0.85rem;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 500;
  color: var(--olive-deep);
  border: 1px solid var(--border);
  padding: 0.2rem 0.6rem;
}

/* ============================================================= */
/* ===== Démarches ===== */
/* ============================================================= */
.demarches-grid { display: grid; gap: 2.5rem; }
.contact-card {
  background-color: var(--stone-cream);
  border: 1px solid var(--border);
  padding: 2rem;
}
.contact-card h3 { font-family: var(--font-display); font-size: 1.3rem; color: var(--earth); margin-bottom: 1.25rem; }
.contact-block { margin-bottom: 1.5rem; }
.contact-block:last-child { margin-bottom: 0; }
.contact-block .label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.16em; color: var(--olive); margin-bottom: 0.4rem; }
.contact-block p { font-size: 0.95rem; line-height: 1.7; color: var(--foreground); }
.contact-block a { color: var(--olive-deep); }
.contact-block a:hover { text-decoration: underline; }

.services-grid { display: grid; gap: 1px; background-color: var(--border); }
.service-cat { background-color: var(--background); padding: 1.75rem; }
.service-cat h3 { display: flex; align-items: center; gap: 0.6rem; font-family: var(--font-display); font-size: 1.2rem; color: var(--earth); margin-bottom: 1rem; }
.service-cat h3 svg { width: 1.25rem; height: 1.25rem; color: var(--olive); }
.service-cat ul { list-style: none; }
.service-cat li { padding: 0.5rem 0; font-size: 0.92rem; color: color-mix(in oklch, var(--foreground) 85%, transparent); border-top: 1px solid var(--border); }
.service-cat li:first-child { border-top: none; }

.gov-links { display: grid; gap: 1px; background-color: var(--border); }
.gov-link {
  display: flex; align-items: center; justify-content: space-between;
  background-color: var(--background);
  padding: 1.25rem 1.5rem;
  font-size: 0.95rem;
  color: var(--earth);
  transition: background-color 0.2s ease;
}
.gov-link:hover { background-color: var(--stone-cream); }
.gov-link svg { width: 1rem; height: 1rem; color: var(--olive); }

/* Contact form */
.contact-form { display: grid; gap: 1.25rem; }
.form-row { display: grid; gap: 1.25rem; }
.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field label { font-size: 0.8rem; font-weight: 500; color: var(--earth); }
.field input, .field textarea {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border);
  background-color: var(--background);
  color: var(--foreground);
  border-radius: var(--radius-sm);
}
.field input:focus, .field textarea:focus { outline: 2px solid var(--olive); outline-offset: -1px; }

/* ===== Accessibilité : lien d'évitement + focus clavier ===== */
.skip-link {
  position: absolute;
  left: 1rem;
  top: 1rem;
  z-index: 1000;
  transform: translateY(-200%);
  background-color: var(--earth);
  color: var(--stone-cream);
  padding: 0.65rem 1.1rem;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: transform 0.18s ease;
}
.skip-link:focus { transform: translateY(0); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--olive);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ===== Bandeau cookies (démo) ===== */
.cookie-banner {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 1100;
  width: min(23rem, calc(100vw - 2.5rem));
  background-color: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 1rem 2.75rem color-mix(in oklch, var(--earth) 20%, transparent);
  padding: 1.35rem 1.4rem 1.25rem;
  animation: cookie-in 0.45s ease both;
}
.cookie-banner[hidden] { display: none; }
@keyframes cookie-in {
  from { opacity: 0; transform: translateY(1.25rem); }
  to { opacity: 1; transform: translateY(0); }
}
.cookie-title {
  display: flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-display); font-weight: 700; font-size: 1.02rem; color: var(--earth);
}
.cookie-title svg { width: 1.15rem; height: 1.15rem; color: var(--olive); }
.cookie-text { margin-top: 0.5rem; font-size: 0.83rem; line-height: 1.55; color: var(--muted-foreground); }
.cookie-text a { color: var(--olive-deep); text-decoration: underline; text-underline-offset: 0.15em; }
.cookie-actions { margin-top: 1.1rem; display: flex; gap: 0.6rem; }
.cookie-btn {
  flex: 1;
  font-family: var(--font-sans); font-weight: 500; font-size: 0.85rem;
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.cookie-accept { background-color: var(--olive); color: var(--stone-cream); border: 1px solid var(--olive); }
.cookie-accept:hover { background-color: var(--olive-deep); border-color: var(--olive-deep); }
.cookie-refuse { background-color: transparent; color: var(--earth); border: 1px solid var(--border); }
.cookie-refuse:hover { background-color: var(--stone-cream); }

/* Onglet réduit (réouverture des préférences cookies) */
.cookie-reopen {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 1090;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background-color: var(--earth);
  color: var(--stone-cream);
  border: none;
  border-radius: 999px;
  padding: 0.55rem 0.95rem;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 0.5rem 1.4rem color-mix(in oklch, var(--earth) 28%, transparent);
  transition: transform 0.2s ease, background-color 0.2s ease;
}
.cookie-reopen:hover { background-color: var(--olive-deep); transform: translateY(-2px); }
.cookie-reopen[hidden] { display: none; }
.cookie-reopen svg { width: 1.05rem; height: 1.05rem; }
.field textarea { resize: vertical; min-height: 9rem; }
.btn-olive {
  justify-self: start;
  background-color: var(--olive-deep);
  color: var(--stone-cream);
  border: none;
  cursor: pointer;
}
.btn-olive:hover { background-color: var(--olive); }

/* ============================================================= */
/* ===== Responsive for sub-pages (md ≥768px) ===== */
/* ============================================================= */
@media (min-width: 768px) {
  .footer-inner { grid-template-columns: 1.4fr 1fr 1.2fr 1fr; padding-inline: 2rem; }
  .footer-bottom { flex-direction: row; align-items: center; justify-content: space-between; padding-inline: 2rem; }

  .page-hero-inner { grid-template-columns: 1.1fr 1fr; padding: 6rem 2rem; gap: 4rem; }
  .page-hero-title { font-size: 3.25rem; }
  .section { padding: 6rem 2rem; }
  .section-title { font-size: 2.5rem; }

  .feature-row { grid-template-columns: 1fr 1fr; gap: 3.5rem; }
  .feature-row.reverse .feature-media { order: 2; }
  .feature-title { font-size: 2rem; }

  .gallery-grid { grid-template-columns: repeat(3, 1fr); }

  .featured-event-card { grid-template-columns: 1.1fr 1fr; }
  .featured-event-body { padding: 3rem; }
  .featured-event-title { font-size: 2.4rem; }

  .demarches-grid { grid-template-columns: 1fr 2fr; align-items: start; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .gov-links { grid-template-columns: repeat(2, 1fr); }
  .form-row { grid-template-columns: repeat(3, 1fr); }
}

/* ============================================================= */
/* ===== Accueil — Démarches les plus demandées ===== */
/* ============================================================= */
.popular { background-color: var(--stone-cream); border-bottom: 1px solid var(--border); }
.popular-inner { margin-inline: auto; max-width: 80rem; padding: 5rem 1.25rem; }
.popular-grid {
  margin-top: 2.5rem;
  display: grid;
  gap: 1px;
  background-color: var(--border);
  border: 1px solid var(--border);
}
.popular-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background-color: var(--stone-cream);
  padding: 1.25rem 1.5rem;
  font-size: 0.95rem;
  color: var(--earth);
  transition: background-color 0.2s ease;
}
.popular-link:hover { background-color: var(--background); }
.popular-link .lead { width: 1.25rem; height: 1.25rem; color: var(--olive); flex-shrink: 0; }
.popular-link .arrow { margin-left: auto; width: 1rem; height: 1rem; color: var(--muted-foreground); transition: transform 0.2s ease; }
.popular-link:hover .arrow { transform: translateX(0.2rem); color: var(--olive-deep); }

/* ============================================================= */
/* ===== Accueil — Actualités ===== */
/* ============================================================= */
.news { margin-inline: auto; max-width: 80rem; padding: 6rem 1.25rem; }
.news-grid { margin-top: 3rem; display: grid; gap: 2rem; }
.news-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  background-color: var(--background);
  overflow: hidden;
}
.news-media { aspect-ratio: 16 / 10; overflow: hidden; }
.news-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.news-card:hover .news-media img { transform: scale(1.04); }
.news-body { display: flex; flex-direction: column; flex: 1; padding: 1.5rem; }
.news-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }
.news-date { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted-foreground); }
.news-cat {
  font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.14em; font-weight: 500;
  color: var(--olive-deep); border: 1px solid var(--border); padding: 0.18rem 0.55rem;
}
.news-title { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; color: var(--earth); margin-top: 0.85rem; line-height: 1.25; }
.news-excerpt { margin-top: 0.6rem; flex: 1; font-size: 0.92rem; line-height: 1.65; color: color-mix(in oklch, var(--foreground) 80%, transparent); }
.news-more {
  margin-top: 1.1rem; display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--olive-deep);
}
.news-more svg { width: 0.85rem; height: 0.85rem; transition: transform 0.2s ease; }
.news-card:hover .news-more svg { transform: translateX(0.2rem); }
.news-foot { margin-top: 3rem; text-align: center; }

/* ============================================================= */
/* ===== Accueil — Le mot du maire ===== */
/* ============================================================= */
.mayor { background-color: var(--stone-cream); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.mayor-inner { margin-inline: auto; max-width: 80rem; display: grid; gap: 3rem; align-items: center; padding: 6rem 1.25rem; }
.mayor-media { position: relative; aspect-ratio: 4 / 5; overflow: hidden; max-width: 22rem; margin-inline: auto; }
.mayor-media img { width: 100%; height: 100%; object-fit: cover; }
.mayor-quote {
  font-family: var(--font-display); font-style: italic; font-weight: 400;
  font-size: 1.6rem; line-height: 1.45; color: var(--earth);
}
.mayor-text p { margin-top: 1.5rem; font-size: 1rem; line-height: 1.7; color: color-mix(in oklch, var(--foreground) 82%, transparent); }
.mayor-sign { margin-top: 1.75rem; }
.mayor-sign .name { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: var(--earth); }
.mayor-sign .role { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.16em; color: var(--muted-foreground); margin-top: 0.25rem; }
.adjoints { border-top: 1px solid var(--border); }
.adjoints-inner { margin-inline: auto; max-width: 80rem; padding: 2.5rem 1.25rem 4rem; }
.adjoints-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: 1.5rem 2.5rem; }
.adjoint-name { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; color: var(--earth); }
.adjoint-role { font-size: 0.85rem; line-height: 1.5; color: var(--muted-foreground); margin-top: 0.3rem; }
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); gap: 1.25rem; }
.info-card { border: 1px solid var(--border); background-color: var(--background); padding: 1.5rem; }
.info-card h3 { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: var(--earth); }
.info-card p { margin-top: 0.5rem; font-size: 0.9rem; line-height: 1.6; color: color-mix(in oklch, var(--foreground) 82%, transparent); }
.info-card .meta { display: inline-block; margin-top: 0.85rem; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.12em; font-weight: 500; color: var(--olive-deep); }

/* ============================================================= */
/* ===== Patrimoine — Le circuit des 42 fontaines ===== */
/* ============================================================= */
.circuit-meta { margin-top: 1.5rem; display: flex; flex-wrap: wrap; gap: 0.75rem; }
.circuit-badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.78rem; color: var(--olive-deep);
  border: 1px solid var(--border); background-color: var(--stone-cream);
  padding: 0.35rem 0.75rem;
}
.circuit-badge svg { width: 0.95rem; height: 0.95rem; color: var(--olive); }
.circuit-list { margin-top: 2.5rem; }
.circuit-step { display: grid; grid-template-columns: auto 1fr; gap: 1.25rem; padding: 1.5rem 0; border-top: 1px solid var(--border); }
.circuit-step:last-child { border-bottom: 1px solid var(--border); }
.circuit-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.75rem; height: 2.75rem;
  border: 1px solid var(--olive);
  font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; color: var(--olive-deep);
}
.circuit-step h3 { font-family: var(--font-display); font-size: 1.15rem; color: var(--earth); }
.circuit-step p { margin-top: 0.35rem; font-size: 0.92rem; line-height: 1.6; color: color-mix(in oklch, var(--foreground) 80%, transparent); }

/* ============================================================= */
/* ===== Patrimoine — Chronologie ===== */
/* ============================================================= */
.timeline { margin-top: 2.5rem; border-left: 1px solid var(--border); margin-left: 0.4rem; }
.timeline-item { position: relative; padding: 0 0 2.25rem 2rem; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: ""; position: absolute; left: -0.42rem; top: 0.35rem;
  width: 0.75rem; height: 0.75rem; background-color: var(--olive); border-radius: 50%;
}
.timeline-year { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: var(--olive-deep); }
.timeline-title { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: var(--earth); margin-top: 0.15rem; }
.timeline-text { margin-top: 0.4rem; font-size: 0.92rem; line-height: 1.65; color: color-mix(in oklch, var(--foreground) 80%, transparent); }

/* ============================================================= */
/* ===== Patrimoine — Préparer votre visite ===== */
/* ============================================================= */
.visit { background-color: var(--earth); color: var(--stone-cream); }
.visit-inner { margin-inline: auto; max-width: 80rem; padding: 5rem 1.25rem; }
.visit-inner .section-title { color: var(--stone-cream); }
.visit-inner .eyebrow { color: var(--stone-sand); }
.visit-grid { margin-top: 3rem; display: grid; gap: 2.5rem; }
.visit-item svg { width: 1.6rem; height: 1.6rem; color: var(--stone-sand); }
.visit-item h3 { font-family: var(--font-display); font-size: 1.2rem; color: var(--stone-cream); margin-top: 0.9rem; }
.visit-item p { margin-top: 0.5rem; font-size: 0.9rem; line-height: 1.65; color: color-mix(in oklch, var(--stone-cream) 78%, transparent); }
.visit-item a { color: var(--stone-sand); text-decoration: underline; text-underline-offset: 0.2em; }

/* ============================================================= */
/* ===== Responsive — added sections (md ≥768px) ===== */
/* ============================================================= */
@media (min-width: 640px) {
  .popular-grid { grid-template-columns: repeat(2, 1fr); }
  .visit-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 768px) {
  .popular-inner { padding: 6rem 2rem; }
  .popular-grid { grid-template-columns: repeat(3, 1fr); }

  .news { padding: 7rem 2rem; }
  .news-grid { grid-template-columns: repeat(3, 1fr); }

  .mayor-inner { grid-template-columns: 20rem 1fr; gap: 4.5rem; padding: 7rem 2rem; align-items: stretch; }
  .mayor-media { aspect-ratio: auto; max-width: none; height: 100%; min-height: 26rem; }
  .mayor-text { display: flex; flex-direction: column; justify-content: center; }
  .mayor-quote { font-size: 1.9rem; }
  .adjoints-inner { padding: 3rem 2rem 5.5rem; }

  .circuit-step h3 { font-size: 1.25rem; }

  .visit-inner { padding: 7rem 2rem; }
  .visit-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ============================================================= */
/* ===== Pages légales (titre + prose) ===== */
/* ============================================================= */
.page-title { border-bottom: 1px solid var(--border); background-color: var(--stone-cream); }
.page-title-inner { margin-inline: auto; max-width: 80rem; padding: 3.5rem 1.25rem; }
.page-title .eyebrow { margin-bottom: 0.75rem; }
.page-title h1 { font-family: var(--font-display); font-weight: 700; font-size: 2.25rem; color: var(--earth); line-height: 1.1; }

.legal { margin-inline: auto; max-width: 52rem; padding: 4rem 1.25rem 5rem; }
.legal h2 { font-family: var(--font-display); font-weight: 700; font-size: 1.4rem; color: var(--earth); margin-top: 2.75rem; margin-bottom: 0.5rem; }
.legal h2:first-child { margin-top: 0; }
.legal p { margin-top: 0.85rem; font-size: 0.98rem; line-height: 1.75; color: color-mix(in oklch, var(--foreground) 85%, transparent); }
.legal ul { margin-top: 0.85rem; padding-left: 1.25rem; }
.legal li { margin-top: 0.4rem; font-size: 0.98rem; line-height: 1.7; color: color-mix(in oklch, var(--foreground) 85%, transparent); }
.legal a { color: var(--olive-deep); text-decoration: underline; text-underline-offset: 0.15em; }
.legal a:hover { color: var(--olive); }
.legal .note {
  margin-top: 2.5rem; padding: 1.25rem 1.5rem;
  border-left: 3px solid var(--olive);
  background-color: var(--stone-cream);
  font-size: 0.92rem; line-height: 1.7;
}

@media (min-width: 768px) {
  .page-title-inner { padding: 5rem 2rem; }
  .page-title h1 { font-size: 2.75rem; }
  .legal { padding: 5rem 2rem 6rem; }
}

.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ============================================================= */
/* ===== Actualités — liste d'articles ===== */
/* ============================================================= */
.article-list { margin-inline: auto; max-width: 56rem; }
.article { padding-bottom: 3rem; margin-bottom: 3rem; border-bottom: 1px solid var(--border); }
.article:last-child { padding-bottom: 0; margin-bottom: 0; border-bottom: none; }
.article-media { aspect-ratio: 16 / 9; overflow: hidden; margin-bottom: 1.5rem; }
.article-media img { width: 100%; height: 100%; object-fit: cover; }
.article-title { font-family: var(--font-display); font-weight: 700; font-size: 1.6rem; color: var(--earth); margin-top: 0.85rem; line-height: 1.25; }
.article p { margin-top: 1rem; font-size: 1rem; line-height: 1.75; color: color-mix(in oklch, var(--foreground) 85%, transparent); }

/* ===== Formulaire — message de confirmation ===== */
.form-success {
  display: none;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1.25rem 1.5rem;
  border-left: 3px solid var(--azure);
  background-color: color-mix(in oklch, var(--azure) 8%, var(--stone-cream));
  color: var(--earth);
  font-size: 0.95rem;
  line-height: 1.6;
}
.form-success.is-visible { display: flex; }
.form-success svg { width: 1.3rem; height: 1.3rem; color: var(--azure-deep); flex-shrink: 0; margin-top: 0.1rem; }

@media (min-width: 768px) {
  .article-title { font-size: 1.95rem; }
}

