/* ==========================================================================
   Regné — Village Heritage Website
   Belgian Ardennes
   Stylesheet v2.0 — Rewritten to match actual HTML/JS class names
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. GOOGLE FONTS
   -------------------------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400;1,500;1,600&family=Lato:ital,wght@0,300;0,400;0,700;0,900;1,300;1,400;1,700&display=swap');

/* --------------------------------------------------------------------------
   1. CUSTOM PROPERTIES (Design Tokens)
   -------------------------------------------------------------------------- */
:root {
  /* — Palette: Ardennes earthy/forest tones — */
  --clr-forest-900: #1a2e1a;
  --clr-forest-800: #1e3a1e;
  --clr-forest-700: #2a5a2a;
  --clr-forest-600: #3a6f3a;
  --clr-forest-500: #4a854a;
  --clr-forest-400: #6ba36b;
  --clr-forest-300: #8fbf8f;
  --clr-forest-100: #dceadc;
  --clr-forest-50:  #eef5ee;

  --clr-brown-900:  #3b2614;
  --clr-brown-800:  #4e3320;
  --clr-brown-700:  #6b4730;
  --clr-brown-600:  #8a5d3b;
  --clr-brown-500:  #a67b5b;
  --clr-brown-400:  #c49a6c;
  --clr-brown-300:  #d4b896;
  --clr-brown-200:  #e6d5c0;
  --clr-brown-100:  #f0e6d8;

  --clr-cream:      #faf6f0;
  --clr-cream-dark: #f2ece2;
  --clr-white:      #ffffff;
  --clr-offwhite:   #f8f5f0;

  --clr-text:       #2c2416;
  --clr-text-light: #5a5044;
  --clr-text-muted: #8a7e70;

  --clr-accent:     #8b6914;
  --clr-accent-light: #c4a24e;
  --clr-accent-dark:  #6b5010;

  --clr-border:     #ddd5c8;
  --clr-border-light: #ebe5da;

  --clr-error:      #b33a3a;
  --clr-success:    #3a7a3a;

  /* — Typography — */
  --ff-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --ff-body:    'Lato', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  --fs-xs:   0.75rem;
  --fs-sm:   0.875rem;
  --fs-base: 1rem;
  --fs-md:   1.125rem;
  --fs-lg:   1.25rem;
  --fs-xl:   1.5rem;
  --fs-2xl:  2rem;
  --fs-3xl:  2.5rem;
  --fs-4xl:  3rem;
  --fs-5xl:  3.5rem;

  --fw-light:    300;
  --fw-regular:  400;
  --fw-medium:   500;
  --fw-semibold: 600;
  --fw-bold:     700;
  --fw-black:    900;

  --lh-tight:    1.2;
  --lh-normal:   1.6;
  --lh-relaxed:  1.8;

  /* — Spacing — */
  --space-xs:  0.25rem;
  --space-sm:  0.5rem;
  --space-md:  1rem;
  --space-lg:  1.5rem;
  --space-xl:  2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;
  --space-5xl: 8rem;

  /* — Layout — */
  --container-sm:  640px;
  --container-md:  768px;
  --container-lg:  1024px;
  --container-xl:  1200px;
  --container-max: 1400px;

  --header-height: 72px;
  --sidebar-width: 280px;

  /* — Borders & Radius — */
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --radius-xl:   16px;
  --radius-full: 9999px;

  /* — Shadows — */
  --shadow-sm:   0 1px 3px rgba(44, 36, 22, 0.08);
  --shadow-md:   0 4px 12px rgba(44, 36, 22, 0.1);
  --shadow-lg:   0 8px 24px rgba(44, 36, 22, 0.12);
  --shadow-xl:   0 16px 48px rgba(44, 36, 22, 0.15);
  --shadow-inner: inset 0 2px 4px rgba(44, 36, 22, 0.06);

  /* — Transitions — */
  --ease-default: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-in:      cubic-bezier(0.4, 0, 1, 1);
  --ease-out:     cubic-bezier(0, 0, 0.2, 1);
  --ease-bounce:  cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 150ms;
  --duration-base: 250ms;
  --duration-slow: 400ms;
}

/* --------------------------------------------------------------------------
   2. RESET & BASE
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + var(--space-lg));
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--ff-body);
  font-size: var(--fs-base);
  font-weight: var(--fw-regular);
  line-height: var(--lh-normal);
  color: var(--clr-text);
  background-color: var(--clr-cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a {
  color: var(--clr-forest-700);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-default);
}

a:hover {
  color: var(--clr-forest-500);
  text-decoration: underline;
}

ul, ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--ff-heading);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-tight);
  color: var(--clr-forest-900);
}

h1 { font-size: var(--fs-3xl); }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-xl);  }
h4 { font-size: var(--fs-lg);  }

p {
  margin-bottom: var(--space-md);
}

p:last-child {
  margin-bottom: 0;
}

strong {
  font-weight: var(--fw-bold);
}

::selection {
  background-color: var(--clr-forest-300);
  color: var(--clr-forest-900);
}

/* --------------------------------------------------------------------------
   3. LAYOUT UTILITIES
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-xl);
  margin-inline: auto;
  padding-inline: var(--space-lg);
}

.text-center {
  text-align: center;
}

/* --------------------------------------------------------------------------
   4. NAVIGATION — #main-nav
   -------------------------------------------------------------------------- */
#main-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: rgba(42, 90, 42, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: var(--shadow-md);
  height: var(--header-height);
}

.nav-container {
  max-width: var(--container-xl);
  margin-inline: auto;
  padding-inline: var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

/* Logo */
.nav-logo {
  font-family: var(--ff-heading);
  font-size: var(--fs-base);
  font-weight: var(--fw-normal);
  font-style: italic;
  color: #ffffff !important;
  text-decoration: none !important;
  letter-spacing: 0.04em;
  white-space: nowrap;
  margin-right: var(--space-md);
}

.nav-logo:hover {
  color: var(--clr-accent-light) !important;
}

/* Language Switcher */
.lang-switcher {
  display: flex;
  gap: 3px;
  align-items: center;
  flex-shrink: 0;
  margin-left: var(--space-sm);
}

.lang-btn {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: #ffffff;
  padding: 4px 10px;
  font-size: var(--fs-sm);
  font-family: var(--ff-body);
  font-weight: var(--fw-bold);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.lang-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.7);
}

.lang-btn.active {
  background: var(--clr-accent);
  color: #ffffff;
  border-color: var(--clr-accent);
}

@media (max-width: 767px) {
  .nav-logo {
    font-size: var(--fs-sm);
    margin-right: var(--space-sm);
  }
  .lang-switcher {
    position: absolute;
    top: 50%;
    right: 60px;
    transform: translateY(-50%);
    margin: 0;
  }
}

/* Nav menu */
.nav-menu {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
}

/* Nav items */
.nav-item {
  position: relative;
}

/* Nav links */
.nav-link {
  display: block;
  padding: var(--space-sm) var(--space-sm);
  color: #ffffff !important;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  text-decoration: none !important;
  border-radius: var(--radius-sm);
  transition: background-color var(--duration-fast) var(--ease-default),
              color var(--duration-fast) var(--ease-default);
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.nav-link:hover {
  background-color: rgba(255, 255, 255, 0.15);
  color: #ffffff !important;
}

.nav-link.active {
  background-color: rgba(255, 255, 255, 0.15);
  color: var(--clr-accent-light) !important;
}

/* Dropdown toggle arrow */
.nav-link .arrow {
  font-size: 0.7em;
  margin-left: 0.2em;
  display: inline-block;
  transition: transform var(--duration-fast) var(--ease-default);
}

.dropdown.is-open > .nav-link .arrow {
  transform: rotate(180deg);
}

/* Dropdown menu */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 240px;
  background-color: var(--clr-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: var(--space-sm) 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity var(--duration-base) var(--ease-default),
              transform var(--duration-base) var(--ease-default),
              visibility var(--duration-base);
  z-index: 100;
  list-style: none;
}

.dropdown.is-open > .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-link {
  display: block;
  padding: var(--space-sm) var(--space-lg);
  color: var(--clr-text) !important;
  font-size: var(--fs-sm);
  text-decoration: none !important;
  transition: background-color var(--duration-fast) var(--ease-default),
              color var(--duration-fast) var(--ease-default);
}

.dropdown-link:hover {
  background-color: var(--clr-forest-50);
  color: var(--clr-forest-700) !important;
}

.dropdown-link.active {
  background-color: var(--clr-forest-50);
  color: var(--clr-forest-700) !important;
  font-weight: var(--fw-semibold);
}

.nav-wip {
  opacity: 0.4;
  font-style: italic;
  pointer-events: none;
}

.dropdown-separator {
  padding: var(--space-xs) var(--space-lg);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  color: var(--clr-forest-700);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-top: 1px solid var(--clr-forest-100);
  margin-top: var(--space-xs);
}

.dropdown-link-sub {
  padding-left: var(--space-xl);
}

/* Hamburger button */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 10;
}

.hamburger-line {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--clr-cream);
  border-radius: 2px;
  transition: transform var(--duration-base) var(--ease-default),
              opacity var(--duration-base) var(--ease-default);
}

.hamburger.is-active .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.is-active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.hamburger.is-active .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* --------------------------------------------------------------------------
   5. HERO SECTIONS
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-height: 60vh;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}

.hero-home {
  min-height: 80vh;
  /* Place your homepage hero image as app/img/hero-accueil.jpg */
  background-image: url('../img/hero-accueil.jpg');
}

.hero-sub {
  min-height: 40vh;
  /* Place a secondary hero image as app/img/hero-sub.jpg */
  background-image: url('../img/hero-sub.jpg');
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(26, 46, 26, 0.5) 0%,
    rgba(30, 58, 30, 0.35) 40%,
    rgba(59, 38, 20, 0.25) 100%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: var(--space-xl) var(--space-lg) var(--space-2xl);
  max-width: var(--container-lg);
}

.hero-content h1 {
  font-size: var(--fs-4xl);
  font-weight: var(--fw-bold);
  color: #ffffff !important;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6), 0 1px 3px rgba(0, 0, 0, 0.4);
  margin-bottom: var(--space-lg);
}

.hero-subtitle {
  font-size: var(--fs-xl);
  color: #ffffff !important;
  font-weight: var(--fw-regular);
  margin-bottom: var(--space-md) !important;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5), 0 1px 3px rgba(0, 0, 0, 0.3);
}

.hero-tagline {
  font-size: var(--fs-md);
  color: #ffffff !important;
  font-style: italic;
  font-family: var(--ff-heading);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}

/* --------------------------------------------------------------------------
   6. BREADCRUMB
   -------------------------------------------------------------------------- */
.breadcrumb {
  background-color: var(--clr-cream-dark);
  border-bottom: 1px solid var(--clr-border-light);
  padding: var(--space-sm) 0;
  font-size: var(--fs-sm);
  color: var(--clr-text-muted);
}

.breadcrumb .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3em;
}

.breadcrumb a {
  color: var(--clr-forest-600);
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
  color: var(--clr-forest-700);
}

/* --------------------------------------------------------------------------
   7. SECTIONS & LAYOUT
   -------------------------------------------------------------------------- */
.section {
  padding: var(--space-lg) 0 var(--space-4xl);
}

.section-alt {
  background-color: var(--clr-forest-800);
}

.section-alt .section-title {
  color: #ffffff;
}

.section-alt figcaption {
  color: #dceadc;
}

.section-cta {
  background-color: var(--clr-forest-700);
  color: #f0e6d8;
  text-align: center;
}

.section-cta h2,
.section-cta h3 {
  color: #ffffff !important;
}

.section-cta p {
  color: #dceadc;
}

.section-title {
  font-family: var(--ff-heading);
  font-size: var(--fs-2xl);
  font-weight: var(--fw-semibold);
  color: var(--clr-forest-900);
  text-align: center;
  margin-bottom: var(--space-3xl);
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--clr-forest-600), var(--clr-accent));
  margin: var(--space-md) auto 0;
  border-radius: var(--radius-full);
}

/* Content with sidebar */
.content-with-sidebar {
  display: flex;
  gap: var(--space-3xl);
  max-width: var(--container-xl);
  margin-inline: auto;
  padding: var(--space-sm) var(--space-lg) var(--space-3xl);
}

.sidebar {
  flex-shrink: 0;
  width: var(--sidebar-width);
}

.sidebar h3 {
  font-size: var(--fs-lg);
  color: var(--clr-forest-800);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--clr-forest-600);
}

.sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar ul li {
  margin-bottom: var(--space-xs);
}

.sidebar ul li a {
  display: block;
  padding: var(--space-sm) var(--space-md);
  color: var(--clr-text);
  font-size: var(--fs-sm);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background-color var(--duration-fast) var(--ease-default),
              color var(--duration-fast) var(--ease-default);
}

.sidebar ul li a:hover {
  background-color: var(--clr-forest-50);
  color: var(--clr-forest-700);
  text-decoration: none;
}

.sidebar ul li a.active {
  background-color: var(--clr-forest-700);
  color: var(--clr-white);
  font-weight: var(--fw-semibold);
}

.sidebar ul ul {
  list-style: none;
  padding: 0;
  margin: var(--space-xs) 0 var(--space-xs) 0;
}

.sidebar ul ul li {
  margin-bottom: 0;
}

.sidebar ul ul li a {
  padding: var(--space-xs) var(--space-md) var(--space-xs) var(--space-xl);
  font-size: var(--fs-xs);
  color: var(--clr-forest-600);
  border-left: 2px solid var(--clr-forest-200);
  border-radius: 0;
}

.sidebar ul ul li a:hover {
  background-color: var(--clr-forest-50);
  color: var(--clr-forest-800);
  border-left-color: var(--clr-forest-600);
}

.sidebar ul ul li a.active {
  background-color: var(--clr-forest-100);
  color: var(--clr-forest-800);
  border-left-color: var(--clr-forest-700);
  font-weight: var(--fw-normal);
}

.main-content {
  flex: 1;
  min-width: 0;
}

.main-content h1 {
  font-size: var(--fs-2xl);
  margin-bottom: var(--space-xl);
  color: var(--clr-forest-900);
}

.main-content h2 {
  font-size: var(--fs-xl);
  margin-top: var(--space-2xl);
  margin-bottom: var(--space-lg);
  color: var(--clr-forest-800);
}

.main-content h3 {
  font-size: var(--fs-lg);
  margin-top: var(--space-xl);
  margin-bottom: var(--space-md);
  color: var(--clr-forest-700);
}

.main-content p {
  margin-bottom: var(--space-md);
  line-height: var(--lh-relaxed);
}

.main-content ul,
.main-content ol {
  list-style: revert;
  margin-left: var(--space-xl);
  margin-bottom: var(--space-md);
}

.main-content ul li,
.main-content ol li {
  margin-bottom: var(--space-sm);
  line-height: var(--lh-normal);
}

.main-content img {
  border-radius: var(--radius-md);
  margin: var(--space-lg) 0;
  box-shadow: var(--shadow-md);
  cursor: pointer;
}

.gallery-grid {
  column-count: 3;
  column-gap: var(--space-md);
  margin: var(--space-xl) 0;
}

.gallery-grid figure {
  margin: 0 0 var(--space-md) 0;
  break-inside: avoid;
}

.gallery-grid img {
  width: 100%;
  margin: 0;
  display: block;
}

.gallery-grid figcaption {
  font-size: var(--fs-sm);
  text-align: center;
  margin-top: var(--space-xs);
}

.gallery-more {
  display: none;
}

.gallery-more.open {
  display: block;
  column-count: 3;
  column-gap: var(--space-md);
  margin-top: var(--space-md);
}

.gallery-more.open figure {
  margin: 0 0 var(--space-md) 0;
  break-inside: avoid;
}

.gallery-more.open img {
  width: 100%;
  margin: 0;
  display: block;
}

.gallery-more.open figcaption {
  font-size: var(--fs-sm);
  text-align: center;
  margin-top: var(--space-xs);
}

.btn-gallery-toggle {
  display: inline-block;
  margin-top: -8rem;
  padding: var(--space-sm) var(--space-xl);
  background: var(--clr-forest-700);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-size: var(--fs-base);
  cursor: pointer;
  transition: background var(--duration-fast);
}

.btn-gallery-toggle:hover {
  background: var(--clr-forest-600);
}

@media (max-width: 768px) {
  .gallery-grid {
    column-count: 2;
  }
  .gallery-more.open {
    column-count: 2;
  }
}

/* --------------------------------------------------------------------------
   SOBRIQUET SIDEBAR MAP
   -------------------------------------------------------------------------- */
.sobriquet-map-sticky {
  position: sticky;
  top: 1rem;
  margin-top: var(--space-lg);
}

.sobriquet-map-sticky figure {
  margin: 0;
}

.sobriquet-map-sticky img {
  width: 100%;
  border-radius: 6px;
  border: 1px solid var(--clr-border);
  cursor: zoom-in;
  display: block;
}

.sobriquet-map-sticky figcaption {
  font-size: 0.78rem;
  color: var(--clr-text-muted);
  margin-top: 0.4rem;
  line-height: 1.3;
  text-align: center;
}

@media (max-width: 768px) {
  .sobriquet-map-sticky {
    position: static;
    margin-bottom: var(--space-lg);
  }
}

/* --------------------------------------------------------------------------
   SOBRIQUETS LIST
   -------------------------------------------------------------------------- */
.sobriquet-entry {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--clr-border-light);
  align-items: flex-start;
}

.sobriquet-entry:last-child {
  border-bottom: none;
}

.sobriquet-num {
  flex-shrink: 0;
  min-width: 2.2rem;
  height: 2.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--clr-forest-700);
  color: #fff;
  border-radius: 50%;
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  margin-top: 0.15em;
}

.sobriquet-body {
  font-size: var(--fs-base);
  line-height: var(--lh-relaxed);
}

.sobriquet-body strong {
  color: var(--clr-forest-800);
}

@media (prefers-color-scheme: dark) {
  .sobriquet-num {
    background: var(--clr-forest-400);
    color: var(--clr-forest-900);
  }
  .sobriquet-body strong {
    color: var(--clr-forest-200);
  }
}

/* --------------------------------------------------------------------------
   8. CARDS
   -------------------------------------------------------------------------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-xl);
}

.card {
  display: block;
  background-color: var(--clr-white);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl) var(--space-xl);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--clr-border-light);
  text-decoration: none !important;
  color: var(--clr-text);
  transition: transform var(--duration-base) var(--ease-default),
              box-shadow var(--duration-base) var(--ease-default),
              border-color var(--duration-base) var(--ease-default);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--clr-forest-300);
  color: var(--clr-text);
}

.card-icon {
  font-size: var(--fs-3xl);
  margin-bottom: var(--space-md);
  display: block;
}

.card-thumb {
  display: block;
  width: 100%;
  height: 60px;
  object-fit: contain;
  object-position: center;
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
  background-color: var(--clr-cream);
}

.card-compact {
  padding: var(--space-lg) var(--space-xl);
  display: flex;
  flex-direction: column;
}

.card-compact h3 {
  margin-top: auto;
}

.gallery-centered {
  grid-template-columns: repeat(2, minmax(200px, 320px));
  justify-content: center;
}

/* --------------------------------------------------------------------------
   TOPONYMIE - Carte interactive
   -------------------------------------------------------------------------- */
.topo-tabs {
  display: flex;
  gap: var(--space-xs);
  margin-bottom: var(--space-md);
}

.topo-tab {
  padding: var(--space-sm) var(--space-lg);
  border: 2px solid var(--clr-forest-200);
  background: var(--clr-cream);
  color: var(--clr-forest-700);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-sm);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--duration-fast);
}

.topo-tab:hover {
  background: var(--clr-forest-50);
}

.topo-tab.active {
  background: var(--clr-forest-700);
  color: #fff;
  border-color: var(--clr-forest-700);
}

.topo-fullwidth-section {
  margin-left: calc(-1 * (var(--sidebar-width) + var(--space-3xl)));
  width: calc(100% + var(--sidebar-width) + var(--space-3xl));
  margin-top: var(--space-lg);
}

.topo-container {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.topo-map-wrap {
  position: relative;
  border: 2px solid var(--clr-forest-200);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #f5f5f5;
}

.topo-zoom-controls {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.topo-zoom-btn {
  width: 36px;
  height: 36px;
  border: 1px solid var(--clr-forest-200);
  background: rgba(255, 255, 255, 0.9);
  color: var(--clr-forest-700);
  font-size: 1.2rem;
  font-weight: bold;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.topo-zoom-btn:hover {
  background: var(--clr-forest-50);
}

.topo-map-scroll {
  overflow: auto;
  cursor: grab;
}

.topo-map-scroll:active {
  cursor: grabbing;
}

.topo-map {
  position: relative;
  display: inline-block;
  transform-origin: 0 0;
  transition: transform 0.2s ease;
  overflow: visible;
}

.topo-map img {
  display: block;
  width: 100%;
}

.topo-label {
  position: absolute;
  padding: 2px 6px;
  background: rgba(139, 105, 20, 0.85);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: 3px;
  white-space: nowrap;
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition: all 0.2s ease;
  z-index: 2;
  pointer-events: auto;
}

.topo-label:hover {
  background: var(--clr-forest-700);
  transform: translate(-50%, -50%) scale(1.15);
  z-index: 5;
}

.topo-label-ref {
  background: var(--clr-forest-700);
  font-size: 0.8rem;
  padding: 3px 10px;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  z-index: 3;
}

.topo-label.highlight {
  background: #c0392b;
  transform: translate(-50%, -50%) scale(1.3);
  z-index: 10;
  animation: topo-pulse 1.5s ease-in-out 3;
}

@keyframes topo-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(192, 57, 43, 0.5); }
  50% { box-shadow: 0 0 0 10px rgba(192, 57, 43, 0); }
}

.topo-list-wrap {
  border: 2px solid var(--clr-forest-200);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  background: var(--clr-cream);
  max-height: 590px;
  display: flex;
  flex-direction: column;
}

.topo-list-wrap h4 {
  margin: 0 0 var(--space-sm);
  color: var(--clr-forest-800);
}

.topo-search {
  width: 100%;
  padding: var(--space-xs) var(--space-sm);
  border: 1px solid var(--clr-forest-200);
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  margin-bottom: var(--space-sm);
  box-sizing: border-box;
}

.topo-list {
  list-style: none;
  padding: 0;
  margin: 0;
  overflow-y: auto;
  flex: 1;
}

.topo-list li {
  padding: var(--space-xs) var(--space-sm);
  font-size: var(--fs-sm);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}

.topo-list li:hover {
  background: var(--clr-forest-50);
}

.topo-list li.highlight {
  background: #c0392b;
  color: #fff;
  font-weight: var(--fw-semibold);
}

@media (max-width: 768px) {
  .topo-fullwidth-section {
    margin-left: 0;
    width: 100%;
  }
  .topo-container {
    grid-template-columns: 1fr;
  }
  .topo-list-wrap {
    max-height: 300px;
  }
  .topo-map-scroll {
    overflow: auto;
  }
}

.card-bg {
  position: relative;
  min-height: 280px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
  padding: 0;
  overflow: hidden;
}

.card-bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.1) 60%, transparent 100%);
}

.card-bg-text {
  position: relative;
  z-index: 1;
  padding: var(--space-lg);
  width: 100%;
}

.card-bg-title {
  display: block;
  font-family: var(--ff-heading);
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  color: #fff;
  margin-bottom: var(--space-xs);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.card-bg-desc {
  display: block;
  font-size: var(--fs-sm);
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.card-bg:hover .card-bg-overlay {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.2) 60%, transparent 100%);
}

.card h3 {
  font-size: var(--fs-lg);
  color: var(--clr-forest-800);
  margin-bottom: var(--space-sm);
}

.card p {
  font-size: var(--fs-sm);
  color: var(--clr-text-light);
  line-height: var(--lh-normal);
}

/* --------------------------------------------------------------------------
   9. BUTTONS
   -------------------------------------------------------------------------- */
.btn {
  display: inline-block;
  padding: var(--space-sm) var(--space-xl);
  font-family: var(--ff-body);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  text-align: center;
  text-decoration: none !important;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background-color var(--duration-fast) var(--ease-default),
              color var(--duration-fast) var(--ease-default),
              border-color var(--duration-fast) var(--ease-default),
              transform var(--duration-fast) var(--ease-default);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background-color: var(--clr-forest-700);
  color: var(--clr-white) !important;
  border-color: var(--clr-forest-700);
}

.btn-primary:hover {
  background-color: var(--clr-forest-600);
  border-color: var(--clr-forest-600);
  color: var(--clr-white) !important;
}

.btn-outline {
  background-color: transparent;
  color: var(--clr-forest-700) !important;
  border-color: var(--clr-forest-700);
}

.btn-outline:hover {
  background-color: var(--clr-forest-700);
  color: var(--clr-white) !important;
}

.section-cta .btn-primary {
  background-color: var(--clr-accent);
  border-color: var(--clr-accent);
}

.section-cta .btn-primary:hover {
  background-color: var(--clr-accent-light);
  border-color: var(--clr-accent-light);
}

.section-cta .btn-outline {
  color: var(--clr-cream) !important;
  border-color: var(--clr-cream);
}

.section-cta .btn-outline:hover {
  background-color: var(--clr-cream);
  color: var(--clr-forest-900) !important;
}

/* --------------------------------------------------------------------------
   10. INTRO BLOCK & FEATURED QUOTE
   -------------------------------------------------------------------------- */
.intro-block {
  font-size: var(--fs-lg);
  color: var(--clr-text-light);
  line-height: var(--lh-relaxed);
  max-width: var(--container-lg);
  margin-inline: auto;
  text-align: center;
  padding: var(--space-xl) var(--space-lg);
}

.featured-quote {
  position: relative;
  font-family: var(--ff-heading);
  font-size: var(--fs-xl);
  font-style: italic;
  color: var(--clr-forest-800);
  text-align: center;
  max-width: var(--container-lg);
  margin: var(--space-md) auto;
  padding: var(--space-lg) var(--space-xl);
  border-left: 4px solid var(--clr-accent);
  background-color: var(--clr-offwhite);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.featured-quote::before {
  content: '\201C';
  position: absolute;
  top: -0.2em;
  left: 0.2em;
  font-size: 4em;
  color: var(--clr-accent-light);
  opacity: 0.3;
  line-height: 1;
}

/* --------------------------------------------------------------------------
   11. FOOTER — #main-footer
   -------------------------------------------------------------------------- */
#main-footer {
  background-color: var(--clr-forest-800);
  color: var(--clr-forest-100);
  padding: var(--space-3xl) 0;
  margin-top: auto;
}

.footer-container {
  max-width: var(--container-xl);
  margin-inline: auto;
  padding-inline: var(--space-lg);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-xl);
}

.footer-section h3 {
  font-size: var(--fs-md);
  color: #ffffff !important;
  margin-bottom: var(--space-md);
  font-weight: var(--fw-semibold);
}

.footer-section p {
  font-size: var(--fs-sm);
  color: #dceadc;
  line-height: var(--lh-relaxed);
}

.footer-section a {
  color: #c4a24e !important;
  text-decoration: none;
}

.footer-section a:hover {
  text-decoration: underline;
  color: #ffffff !important;
}

/* --------------------------------------------------------------------------
   12. LIGHTBOX
   -------------------------------------------------------------------------- */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.9);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--duration-base) var(--ease-default),
              visibility var(--duration-base);
  padding: var(--space-xl);
}

.lightbox-overlay.is-visible {
  opacity: 1;
  visibility: visible;
}

.lightbox-close {
  position: absolute;
  top: var(--space-lg);
  right: var(--space-lg);
  background: none;
  border: none;
  color: var(--clr-white);
  font-size: var(--fs-3xl);
  cursor: pointer;
  line-height: 1;
  transition: opacity var(--duration-fast) var(--ease-default);
  z-index: 10;
}

.lightbox-close:hover {
  opacity: 0.7;
}

.lightbox-image {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  font-size: 2rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--duration-fast);
  z-index: 10;
}

.lightbox-prev { left: var(--space-lg); }
.lightbox-next { right: var(--space-lg); }

.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 255, 255, 0.3);
}

.lightbox-caption {
  color: var(--clr-cream);
  font-size: var(--fs-sm);
  margin-top: var(--space-md);
  text-align: center;
  max-width: 600px;
}

/* --------------------------------------------------------------------------
   13. BACK TO TOP BUTTON
   -------------------------------------------------------------------------- */
.back-to-top {
  position: fixed;
  bottom: var(--space-xl);
  right: var(--space-xl);
  z-index: 900;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--clr-forest-700);
  color: var(--clr-white);
  border: none;
  border-radius: var(--radius-full);
  font-size: var(--fs-md);
  cursor: pointer;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: opacity var(--duration-base) var(--ease-default),
              visibility var(--duration-base),
              transform var(--duration-base) var(--ease-default),
              background-color var(--duration-fast) var(--ease-default);
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background-color: var(--clr-forest-600);
  transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   14. CONTACT FORM
   -------------------------------------------------------------------------- */
#contact-form {
  max-width: 600px;
}

.form-group {
  margin-bottom: var(--space-lg);
}

.form-group label {
  display: block;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--clr-text);
  margin-bottom: var(--space-sm);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  font-family: var(--ff-body);
  font-size: var(--fs-base);
  color: var(--clr-text);
  background-color: var(--clr-white);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  transition: border-color var(--duration-fast) var(--ease-default),
              box-shadow var(--duration-fast) var(--ease-default);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--clr-forest-500);
  box-shadow: 0 0 0 3px rgba(74, 133, 74, 0.15);
}

.form-group textarea {
  min-height: 150px;
  resize: vertical;
}

.form-message {
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  font-size: var(--fs-sm);
  margin-top: var(--space-lg);
  animation: fadeIn var(--duration-base) var(--ease-default);
}

.form-message--info {
  background-color: var(--clr-forest-50);
  border: 1px solid var(--clr-forest-300);
  color: var(--clr-forest-800);
}

.form-message--error {
  background-color: #fef2f2;
  border: 1px solid #fca5a5;
  color: var(--clr-error);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* --------------------------------------------------------------------------
   15. NOTICES
   -------------------------------------------------------------------------- */
.notice {
  padding: var(--space-lg) var(--space-xl);
  border-radius: var(--radius-md);
  background-color: var(--clr-forest-50);
  border: 1px solid var(--clr-forest-300);
  color: var(--clr-forest-800);
  font-size: var(--fs-sm);
  margin-bottom: var(--space-xl);
}

.notice-warning {
  background-color: #fffbeb;
  border-color: var(--clr-accent-light);
  color: var(--clr-accent-dark);
}

.construction-notice {
  text-align: center;
  padding: var(--space-3xl) var(--space-xl);
  background-color: var(--clr-offwhite);
  border-radius: var(--radius-lg);
  border: 2px dashed var(--clr-border);
  color: var(--clr-text-muted);
  font-size: var(--fs-md);
  margin: var(--space-xl) 0;
}

.coming-soon {
  text-align: center;
  padding: var(--space-4xl) var(--space-xl);
  color: var(--clr-text-muted);
  font-size: var(--fs-lg);
  font-style: italic;
}

/* --------------------------------------------------------------------------
   16. TABLES (within .main-content)
   -------------------------------------------------------------------------- */
.main-content table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-xl) 0;
  font-size: var(--fs-sm);
  background-color: var(--clr-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.main-content thead {
  background-color: var(--clr-forest-800);
  color: var(--clr-white);
}

.main-content th {
  padding: var(--space-md) var(--space-lg);
  text-align: left;
  font-weight: var(--fw-semibold);
}

.main-content td {
  padding: var(--space-sm) var(--space-lg);
  border-bottom: 1px solid var(--clr-border-light);
}

.main-content tbody tr:hover {
  background-color: var(--clr-forest-50);
}

.main-content tbody tr:last-child td {
  border-bottom: none;
}

/* --------------------------------------------------------------------------
   17. LINKS PAGE
   -------------------------------------------------------------------------- */
.link-category {
  margin-bottom: var(--space-2xl);
}

.link-category h2,
.link-category h3 {
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--clr-forest-600);
}

.link-item {
  display: block;
  padding: var(--space-md) var(--space-lg);
  background-color: var(--clr-white);
  border: 1px solid var(--clr-border-light);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
  text-decoration: none !important;
  color: var(--clr-text);
  transition: box-shadow var(--duration-fast) var(--ease-default),
              border-color var(--duration-fast) var(--ease-default);
}

.link-item:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--clr-forest-300);
  color: var(--clr-text);
}

/* --------------------------------------------------------------------------
   18. CONTACT PAGE SPECIFIC
   -------------------------------------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  align-items: start;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.info-item {
  display: flex;
  gap: var(--space-md);
  align-items: flex-start;
  padding: var(--space-md);
  background-color: var(--clr-white);
  border-radius: var(--radius-md);
  border: 1px solid var(--clr-border-light);
}

.map-placeholder,
#map-placeholder {
  width: 100%;
  min-height: 300px;
  background-color: var(--clr-cream-dark);
  border: 2px dashed var(--clr-border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--clr-text-muted);
  font-size: var(--fs-sm);
}

/* --------------------------------------------------------------------------
   VIDEO PAIR — deux vidéos côte à côte
   -------------------------------------------------------------------------- */
.video-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  margin-top: var(--space-xl);
}

.video-pair figure {
  margin: 0;
}

.video-pair video {
  width: 100%;
  border-radius: var(--radius-md);
  background: #000;
}

.video-pair figcaption {
  margin-top: var(--space-xs);
  font-size: var(--fs-sm);
  color: var(--clr-text-light);
  font-style: italic;
  text-align: center;
}

@media (max-width: 640px) {
  .video-pair {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------------------------------
   19. FAMILLES INDEX — .cards-grid & .family-card
   -------------------------------------------------------------------------- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-xl);
}

.family-card {
  display: block;
  background-color: var(--clr-white);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--clr-border-light);
  text-decoration: none !important;
  color: var(--clr-text);
  transition: transform var(--duration-base) var(--ease-default),
              box-shadow var(--duration-base) var(--ease-default),
              border-color var(--duration-base) var(--ease-default);
}

.family-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--clr-forest-300);
  color: var(--clr-text);
}

.family-card h3 {
  color: var(--clr-forest-800);
  margin-bottom: var(--space-sm);
}

.family-card p {
  color: var(--clr-text-light);
  font-size: var(--fs-sm);
}

/* --------------------------------------------------------------------------
   20. GALLERY & REPORTAGES
   -------------------------------------------------------------------------- */

.gallery-placeholder {
  aspect-ratio: 4 / 3;
  background-color: var(--clr-cream-dark);
  border: 2px dashed var(--clr-border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--clr-text-muted);
  font-size: var(--fs-sm);
}

/* --------------------------------------------------------------------------
   21. HISTOIRE INDEX — .history-cards & .history-card
   -------------------------------------------------------------------------- */
.history-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-xl);
}

.history-card {
  display: block;
  background-color: var(--clr-white);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--clr-border-light);
  text-decoration: none !important;
  color: var(--clr-text);
  transition: transform var(--duration-base) var(--ease-default),
              box-shadow var(--duration-base) var(--ease-default),
              border-color var(--duration-base) var(--ease-default);
}

.history-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--clr-forest-300);
  color: var(--clr-text);
}

.history-card h3 {
  color: var(--clr-forest-800);
  margin-bottom: var(--space-sm);
}

.history-card p {
  color: var(--clr-text-light);
  font-size: var(--fs-sm);
}

/* ==========================================================================
   22. RESPONSIVE — Mobile-first breakpoints
   ========================================================================== */

/* --- Mobile (up to 767px) --- */
@media (max-width: 767px) {
  /* Navigation */
  .hamburger {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    flex-direction: column;
    background-color: var(--clr-forest-900);
    padding: var(--space-lg);
    gap: var(--space-xs);
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform var(--duration-base) var(--ease-default);
  }

  .nav-menu.is-open {
    transform: translateX(0);
  }

  .nav-link {
    font-size: var(--fs-base);
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  /* Mobile dropdown */
  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    background-color: rgba(255, 255, 255, 0.05);
    box-shadow: none;
    border-radius: var(--radius-sm);
    max-height: 0;
    overflow: hidden;
    padding: 0;
    transition: max-height var(--duration-base) var(--ease-default);
  }

  .dropdown.is-open > .dropdown-menu {
    max-height: 500px;
    padding: var(--space-sm) 0;
  }

  .dropdown-link {
    color: var(--clr-forest-100) !important;
    padding: var(--space-sm) var(--space-2xl);
    font-size: var(--fs-sm);
  }

  .dropdown-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--clr-white) !important;
  }

  /* Hero */
  .hero-home {
    min-height: 60vh;
  }

  .hero-content h1 {
    font-size: var(--fs-2xl);
  }

  .hero-subtitle {
    font-size: var(--fs-md);
  }

  /* Sidebar layout stacks */
  .content-with-sidebar {
    flex-direction: column;
    padding: var(--space-xl) var(--space-lg);
  }

  .sidebar {
    width: 100%;
    order: -1;
    padding-bottom: var(--space-xl);
    border-bottom: 1px solid var(--clr-border);
    margin-bottom: var(--space-xl);
  }

  /* Contact grid stacks */
  .contact-grid {
    grid-template-columns: 1fr;
  }

  /* Sections */
  .section {
    padding: var(--space-2xl) 0;
  }

  .section-title {
    font-size: var(--fs-xl);
  }

  /* Cards */
  .card-grid,
  .cards-grid,
  .history-cards {
    grid-template-columns: 1fr;
  }
}

/* --- Tablet (768px – 1023px) --- */
@media (min-width: 768px) and (max-width: 1023px) {
  .nav-link {
    font-size: var(--fs-xs);
    padding: var(--space-sm) var(--space-sm);
  }

  .content-with-sidebar {
    gap: var(--space-xl);
  }

  .sidebar {
    width: 220px;
  }

  .card-grid,
  .cards-grid,
  .history-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }
}

/* --- Desktop (1024px+) --- */
@media (min-width: 1024px) {
  .hero-content h1 {
    font-size: var(--fs-5xl);
  }

  .hero-subtitle {
    font-size: var(--fs-xl);
  }

  .section-title {
    font-size: var(--fs-3xl);
  }
}

/* ==========================================================================
   23. DARK MODE
   ========================================================================== */
@media (prefers-color-scheme: dark) {
  :root {
    --clr-cream:        #1a1a18;
    --clr-cream-dark:   #151513;
    --clr-white:        #232320;
    --clr-offwhite:     #1e1e1b;

    --clr-text:         #e5ddd0;
    --clr-text-light:   #b8ae9e;
    --clr-text-muted:   #8a7e70;

    --clr-border:       #3a3530;
    --clr-border-light: #2e2a25;

    --clr-forest-50:    #1e241e;
    --clr-forest-100:   #263026;
  }

  #main-nav {
    background-color: rgba(30, 58, 30, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }

  .dropdown-menu {
    background-color: #1e1e1b;
    border: 1px solid var(--clr-border);
  }

  .dropdown-link:hover {
    background-color: rgba(107, 163, 107, 0.1);
  }

  .hero-overlay {
    background: linear-gradient(
      135deg,
      rgba(10, 20, 10, 0.5) 0%,
      rgba(15, 25, 15, 0.35) 40%,
      rgba(30, 20, 10, 0.25) 100%
    );
  }

  .card,
  .family-card,
  .history-card,
  .link-item,
  .info-item {
    background-color: var(--clr-white);
    border-color: var(--clr-border);
  }

  .card:hover,
  .family-card:hover,
  .history-card:hover {
    border-color: var(--clr-forest-400);
  }

  .breadcrumb {
    background-color: var(--clr-cream-dark);
    border-color: var(--clr-border);
  }

  .sidebar ul li a.active {
    background-color: var(--clr-forest-800);
  }

  .sidebar ul ul li a {
    color: var(--clr-forest-200);
    border-left-color: var(--clr-forest-700);
  }

  .sidebar ul ul li a:hover {
    background-color: var(--clr-forest-900);
    color: var(--clr-forest-100);
    border-left-color: var(--clr-forest-400);
  }

  .sidebar ul ul li a.active {
    background-color: var(--clr-forest-900);
    color: var(--clr-forest-100);
    border-left-color: var(--clr-forest-400);
  }

  .main-content table {
    background-color: var(--clr-white);
  }

  .main-content thead {
    background-color: #111a11;
  }

  .main-content td {
    border-color: var(--clr-border);
  }

  .main-content tbody tr:hover {
    background-color: var(--clr-forest-50);
  }

  .form-group input,
  .form-group textarea,
  .form-group select {
    background-color: var(--clr-cream-dark);
    border-color: var(--clr-border);
    color: var(--clr-text);
  }

  .form-message--info {
    background-color: var(--clr-forest-50);
    border-color: rgba(107, 163, 107, 0.3);
  }

  .form-message--error {
    background-color: rgba(179, 58, 58, 0.1);
    border-color: rgba(179, 58, 58, 0.3);
  }

  .notice {
    background-color: var(--clr-forest-50);
    border-color: rgba(107, 163, 107, 0.3);
  }

  .notice-warning {
    background-color: rgba(139, 105, 20, 0.1);
    border-color: rgba(196, 162, 78, 0.3);
  }

  .construction-notice {
    background-color: var(--clr-offwhite);
    border-color: var(--clr-border);
  }

  .map-placeholder,
  #map-placeholder,
  .gallery-placeholder {
    background-color: var(--clr-cream-dark);
    border-color: var(--clr-border);
  }

  #main-footer {
    background-color: #1e3a1e;
  }

  .back-to-top {
    background-color: var(--clr-forest-800);
  }

  .back-to-top:hover {
    background-color: var(--clr-forest-700);
  }

  .featured-quote {
    background-color: var(--clr-offwhite);
    color: var(--clr-forest-300);
  }

  h1, h2, h3, h4, h5, h6 {
    color: var(--clr-forest-300);
  }

  .section-title {
    color: var(--clr-forest-300);
  }

  .section-cta {
    background-color: #1e3a1e;
  }

  .sidebar h3 {
    color: var(--clr-forest-300);
  }

  .card h3,
  .family-card h3,
  .history-card h3 {
    color: var(--clr-forest-300);
  }

  .main-content h1 { color: var(--clr-forest-300); }
  .main-content h2 { color: var(--clr-forest-400); }
  .main-content h3 { color: var(--clr-forest-400); }
}

/* ==========================================================================
   24. PRINT STYLES
   ========================================================================== */
@media print {
  *,
  *::before,
  *::after {
    background: transparent !important;
    color: #000 !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  body {
    font-size: 12pt;
    line-height: 1.5;
    display: block;
  }

  #main-nav,
  .hamburger,
  .back-to-top,
  .lightbox-overlay,
  .breadcrumb {
    display: none !important;
  }

  .hero {
    min-height: auto !important;
    padding: 1cm 0;
  }

  .hero-overlay {
    display: none;
  }

  .hero-content h1 {
    font-size: 24pt;
    color: #000 !important;
    text-shadow: none !important;
  }

  .hero-subtitle,
  .hero-tagline {
    color: #333 !important;
  }

  .section {
    padding: 0.5cm 0;
    page-break-inside: avoid;
  }

  .content-with-sidebar {
    display: block;
  }

  .sidebar {
    display: none;
  }

  .main-content {
    width: 100%;
  }

  .card-grid,
  .cards-grid,
  .history-cards,
  .gallery-grid {
    display: block;
  }

  .card,
  .family-card,
  .history-card {
    border: 1px solid #ccc !important;
    page-break-inside: avoid;
    margin-bottom: 0.5cm;
    padding: 0.3cm;
  }

  a[href]::after {
    content: ' (' attr(href) ')';
    font-size: 0.8em;
    color: #555 !important;
  }

  .nav-logo::after,
  .nav-link::after,
  .dropdown-link::after,
  .btn::after,
  .card::after,
  .family-card::after,
  .history-card::after {
    content: '' !important;
  }

  #main-footer {
    border-top: 1px solid #ccc;
    padding: 0.3cm 0;
  }

  .footer-container {
    display: block;
  }

  img {
    max-width: 100% !important;
    page-break-inside: avoid;
  }

  #contact-form {
    display: none;
  }
}

/* ==========================================================================
   25. ACCESSIBILITY & MISC
   ========================================================================== */
:focus-visible {
  outline: 2px solid var(--clr-forest-500);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Skip-link for keyboard users */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-md);
  background-color: var(--clr-forest-700);
  color: var(--clr-white);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  z-index: 10000;
  font-size: var(--fs-sm);
}

.skip-link:focus {
  top: var(--space-md);
}

/* Lightbox trigger cursor */
.lightbox-trigger {
  cursor: zoom-in;
}

/* ==========================================================================
   Arbre généalogique
   ========================================================================== */

.family-tree ul {
  list-style: none;
  padding-left: 1.5rem;
  margin: 0;
}

.family-tree > ul {
  padding-left: 0;
}

.family-tree li {
  position: relative;
  padding: 0.5rem 0 0.5rem 1.25rem;
  border-left: 2px solid var(--clr-brown-200, #d4c4a8);
}

.family-tree li::before {
  content: "";
  position: absolute;
  left: -2px;
  top: 1.1rem;
  width: 1rem;
  height: 2px;
  background: var(--clr-brown-200, #d4c4a8);
}

.family-tree li:last-child {
  border-left-color: transparent;
}

.family-tree li:last-child::before {
  border-left: 2px solid var(--clr-brown-200, #d4c4a8);
  height: calc(1.1rem + 2px);
  top: 0;
  width: 1rem;
  background: none;
  border-bottom: 2px solid var(--clr-brown-200, #d4c4a8);
  border-bottom-left-radius: 4px;
}

.family-tree > ul > li {
  border-left: none;
  padding-left: 0;
}

.family-tree > ul > li::before {
  display: none;
}

.tree-dates {
  font-size: 0.88rem;
  color: var(--clr-forest-600, #4a7a4a);
  font-style: italic;
}

.tree-detail {
  font-size: 0.9rem;
  color: #777;
}

@media (prefers-color-scheme: dark) {
  .family-tree li {
    border-left-color: var(--clr-forest-700, #3a5a3a);
  }

  .family-tree li::before,
  .family-tree li:last-child::before {
    background: var(--clr-forest-700, #3a5a3a);
    border-color: var(--clr-forest-700, #3a5a3a);
  }

  .tree-dates {
    color: var(--clr-brown-200, #d4c4a8);
  }

  .tree-detail {
    color: #aaa;
  }
}

/* ==========================================================================
   Accordéons — Articles dépliables
   ========================================================================== */

.article-accordion {
  border: 1px solid var(--clr-brown-200, #d4c4a8);
  border-radius: 6px;
  margin-bottom: var(--space-sm);
  background: var(--clr-cream, #faf6f0);
  overflow: hidden;
}

.article-accordion summary {
  padding: 1rem 1.25rem;
  cursor: pointer;
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--clr-forest-800, #2a4a2a);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: background 0.2s;
}

.article-accordion summary:hover {
  background: var(--clr-brown-100, #f0e6d8);
}

.article-accordion summary::before {
  content: "▸";
  font-size: 0.9rem;
  transition: transform 0.2s;
  flex-shrink: 0;
}

.article-accordion[open] summary::before {
  transform: rotate(90deg);
}

.article-accordion summary::-webkit-details-marker {
  display: none;
}

.article-accordion-body {
  padding: 0 1.5rem 1.5rem;
  border-top: 1px solid var(--clr-brown-200, #d4c4a8);
  line-height: 1.8;
}

.article-accordion-body p {
  margin-top: var(--space-sm);
}

.article-accordion-body .article-signature {
  margin-top: var(--space-md);
  font-style: italic;
  color: var(--clr-forest-600, #4a7a4a);
}

.article-section-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  color: var(--clr-forest-700, #3a5a3a);
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm);
  padding-bottom: 0.3rem;
  border-bottom: 2px solid var(--clr-accent, #8b6914);
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  .article-accordion {
    background: var(--clr-forest-900, #1a2e1a);
    border-color: var(--clr-forest-700, #3a5a3a);
  }

  .article-accordion summary {
    color: var(--clr-brown-100, #f0e6d8);
  }

  .article-accordion summary:hover {
    background: var(--clr-forest-800, #2a4a2a);
  }

  .article-accordion-body {
    border-top-color: var(--clr-forest-700, #3a5a3a);
  }

  .article-section-title {
    color: var(--clr-brown-100, #f0e6d8);
  }

  .read-more summary {
    color: var(--clr-brown-200, #d4c4a8);
  }

  .read-more summary:hover {
    color: var(--clr-accent, #8b6914);
  }
}

/* ==========================================================================
   Lire la suite — Bloc dépliable discret
   ========================================================================== */

.read-more {
  margin-top: 0;
}

.read-more summary {
  display: inline;
  cursor: pointer;
  color: var(--clr-accent, #8b6914);
  font-style: italic;
  font-size: 0.95rem;
  list-style: none;
}

.read-more summary:hover {
  text-decoration: underline;
}

.read-more summary::-webkit-details-marker {
  display: none;
}

.read-more summary::before {
  content: "\25B8\00a0";
}

.read-more[open] summary::before {
  content: "\25BE\00a0";
}

/* --------------------------------------------------------------------------
   GENEALOGY VIEWER — .genea-viewer (Laurent family tree)
   -------------------------------------------------------------------------- */
.genea-viewer {
  margin: 2rem 0;
  border: 1px solid var(--clr-brown-200);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--clr-cream);
}

.genea-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  background: var(--clr-forest-50);
  border-bottom: 1px solid var(--clr-brown-100);
  font-size: 0.75rem;
}

.genea-legend-item {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 3px;
  border: 1px solid #ccc;
}

.genea-panels { position: relative; }

.genea-panel { display: none; }
.genea-panel--active { display: block; }

.genea-scroll {
  overflow-x: auto;
  overflow-y: auto;
  max-height: 520px;
  -webkit-overflow-scrolling: touch;
}

.genea-table {
  border-collapse: collapse;
  font-size: 0.72rem;
  font-family: var(--font-body);
  white-space: nowrap;
  min-width: 100%;
}

.genea-table td {
  padding: 3px 8px;
  border: 1px solid #e0d8cc;
  vertical-align: top;
  min-width: 120px;
  max-width: 220px;
  white-space: normal;
  line-height: 1.3;
}

.genea-table td:empty {
  min-width: 40px;
  background: #f9f7f2 !important;
  border-color: #ede8df;
}

.genea-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 4px 6px;
  background: var(--clr-brown-100);
  border-top: 1px solid var(--clr-brown-200);
}

.genea-tab {
  padding: 4px 12px;
  font-size: 0.75rem;
  font-family: var(--font-body);
  background: var(--clr-brown-200);
  border: 1px solid var(--clr-brown-300);
  border-bottom: none;
  border-radius: 3px 3px 0 0;
  cursor: pointer;
  color: var(--clr-text);
  transition: background 0.15s;
}

.genea-tab:hover {
  background: var(--clr-cream);
}

.genea-tab--active {
  background: var(--clr-cream);
  border-color: var(--clr-accent);
  color: var(--clr-accent);
  font-weight: 600;
}

@media (prefers-color-scheme: dark) {
  .genea-table td { border-color: #3a3428; }
  .genea-table td:empty { background: #1e1a14 !important; border-color: #2a2418; }
  .genea-tabs { background: #2a2418; border-color: #3a3428; }
  .genea-tab { background: #3a3428; border-color: #4a4438; color: var(--clr-text); }
  .genea-tab:hover { background: #2e2820; }
  .genea-tab--active { background: #1e1a14; border-color: var(--clr-accent); }
  .genea-legend { background: #1a1810; border-color: #2a2418; }
  .genea-viewer { border-color: #3a3428; background: #1e1a14; }
}

/* PIN Guard */
.pin-guard {
  display: flex;
  justify-content: center;
  padding: var(--space-3xl) var(--space-lg);
}
.pin-guard-box {
  background: var(--clr-cream);
  border: 2px solid var(--clr-forest-200);
  border-radius: var(--radius-lg);
  padding: var(--space-xl) var(--space-2xl);
  text-align: center;
  max-width: 380px;
  width: 100%;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.pin-guard-icon {
  font-size: 2.5rem;
  margin-bottom: var(--space-md);
}
.pin-guard-box h3 {
  color: var(--clr-forest-800);
  margin-bottom: var(--space-sm);
}
.pin-guard-notice {
  font-size: var(--fs-sm);
  color: var(--clr-forest-700);
  font-style: italic;
  line-height: 1.6;
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--clr-forest-200);
  text-align: left;
}
.pin-guard-notice a {
  color: var(--clr-accent);
  text-decoration: underline;
}
.pin-guard-box p {
  color: var(--clr-forest-600);
  font-size: var(--fs-sm);
  margin-bottom: var(--space-lg);
}
.pin-input-row {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
  margin-bottom: var(--space-md);
}
.pin-input {
  width: 100px;
  padding: var(--space-sm) var(--space-md);
  font-size: 1.5rem;
  text-align: center;
  border: 2px solid var(--clr-forest-200);
  border-radius: var(--radius-sm);
  letter-spacing: 0.3em;
  font-family: monospace;
}
.pin-input:focus {
  outline: none;
  border-color: var(--clr-accent);
}
.pin-error {
  color: #c0392b;
  font-size: var(--fs-sm);
  min-height: 1.2em;
  margin: 0;
}
@media (prefers-color-scheme: dark) {
  .pin-guard-box {
    background: #1e1a14;
    border-color: #3a3428;
  }
  .pin-guard-box h3 { color: var(--clr-forest-100); }
  .pin-guard-box p { color: var(--clr-forest-300); }
  .pin-input {
    background: #2a2418;
    border-color: #3a3428;
    color: var(--clr-text);
  }
  .pin-input:focus { border-color: var(--clr-accent); }
}
