@import url("./theme.css");

:root {
  --max-w: 1200px;
  --content-w: 780px;
  --header-h: 92px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: "EB Garamond", Georgia, serif;
  background: var(--background-color);
  color: var(--text-color);
  overflow-x: hidden;
  width: 100%;
}

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

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  opacity: 0.35;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
}

.logo-mark {
  width: 34px;
  height: 34px;
  border: 2px solid var(--secondary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Cinzel", serif;
  font-size: 1rem;
  color: var(--secondary-color);
  flex-shrink: 0;
}

.logo-text {
  font-family: "Cinzel", serif;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  color: var(--menu-link-color, var(--text-color));
  line-height: 1.2;
}

.logo-text span {
  display: block;
  font-size: 0.6rem;
  color: var(--secondary-color-strong);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.nav-search {
  margin-left: 0.5rem;
  background: none;
  border: 1px solid var(--secondary-color);
  color: var(--secondary-color);
  padding: 0.32rem 0.9rem;
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    background 0.2s,
    color 0.2s;
}

.nav-search:hover {
  background: var(--secondary-color);
  color: var(--surface-primary-background);
}

/* Canonical two-row header used by the standardized page templates. */
body>header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: var(--menu-background-color);
  border-bottom: 2px solid var(--secondary-color);
  display: flex;
  flex-direction: column;
  padding: 0;
  height: auto;
}

body>header .header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1180px;
  height: 52px;
  gap: 0.75rem;
  padding: 0 clamp(1rem, 3vw, 2.5rem);
  margin: 0 auto;
}

body>header .header-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 100%;
  height: 40px;
  max-width: calc(1380px + 2 * max(2.5rem, calc(50vw - 670px)));
  margin: 0 auto;
  padding: 0 clamp(0.75rem, 2vw, 1.5rem);
  border-top: 1px solid var(--menu-divider-color, rgba(184, 134, 11, 0.15));
  overflow-x: auto;
  scrollbar-width: none;
}

body>header .header-nav::-webkit-scrollbar {
  display: none;
}

body>header .header-nav a {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--menu-link-color);
  text-decoration: none;
  padding: 0 1.25rem;
  height: 100%;
  display: flex;
  align-items: center;
  border-right: 1px solid var(--menu-border-color);
  transition:
    color 0.15s,
    background 0.15s;
}

body>header .header-nav a[href*="bibliographie"] {
  color: var(--secondary-color);
}

body>header .header-nav a::after {
  content: none;
}

body>header .header-nav a:first-child {
  border-left: 1px solid var(--menu-border-color);
}

body>header .header-nav a:hover {
  color: var(--menu-link-hover-color);
  background: var(--menu-link-hover-background, rgba(184, 134, 11, 0.08));
}

body>header .header-nav a.active {
  color: var(--menu-link-active-color);
  background: var(--menu-link-active-background, rgba(184, 134, 11, 0.06));
}

body>header .header-utils {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  flex-shrink: 0;
}

body>header .nav-search-trigger {
  background: none;
  border: 1px solid var(--menu-border-color);
  color: var(--menu-link-color);
  padding: 0.3rem 0.85rem;
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.84rem;
  letter-spacing: 0.08em;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition:
    border-color 0.15s,
    color 0.15s;
  border-radius: 2px;
}

body>header .nav-search-trigger:hover {
  border-color: var(--secondary-color);
  color: var(--menu-link-hover-color);
}

body>header .nav-search-trigger svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

body>header .theme-switcher-trigger {
  padding: 0.3rem 0.55rem;
}

body>header .theme-switcher {
  position: relative;
}

body>header .theme-switcher-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.45rem);
  min-width: 180px;
  max-width: min(18rem, calc(100vw - 2rem));
  background: var(--menu-panel-background, rgba(18, 13, 9, 0.98));
  border: 1px solid var(--menu-panel-border-color, rgba(184, 134, 11, 0.25));
  box-shadow: var(--menu-panel-shadow, 0 20px 40px rgba(0, 0, 0, 0.28));
  padding: 0.35rem;
  display: none;
  flex-direction: column;
  gap: 0.18rem;
  z-index: 260;
}

body>header .theme-switcher.open .theme-switcher-menu {
  display: flex;
}

body>header .theme-switcher-option {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  color: var(--menu-panel-text-color, rgba(245, 240, 232, 0.82));
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.6rem 0.75rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

body>header .theme-switcher-option:hover,
body>header .theme-switcher-option.active {
  background: var(--menu-panel-option-hover-background, rgba(184, 134, 11, 0.12));
  color: var(--secondary-color-strong);
}

body>header .hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  z-index: 200;
}

body>header .hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--secondary-color);
  transition: transform 0.3s, opacity 0.3s;
  transform-origin: center;
}

body>header .hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

body>header .hamburger.open span:nth-child(2) {
  opacity: 0;
}

body>header .hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

body>.mobile-menu#mobileMenu {
  display: none;
  position: fixed;
  top: 92px;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--surface-primary-background);
  z-index: 150;
  flex-direction: column;
  padding: 1.5rem;
  overflow-y: auto;
  border-top: 1px solid var(--mobile-menu-border-color, rgba(184, 134, 11, 0.3));
}

body>.mobile-menu#mobileMenu.open {
  display: flex;
}

body>.mobile-menu#mobileMenu a {
  font-family: "Cinzel", serif;
  font-size: 1.2rem;
  letter-spacing: 0.1em;
  color: var(--background-color);
  text-decoration: none;
  padding: 1rem 0;
  border-bottom: 1px solid var(--mobile-menu-link-border-color, rgba(184, 134, 11, 0.15));
  transition: color 0.2s;
}

body>.mobile-menu#mobileMenu a:hover,
body>.mobile-menu#mobileMenu a.active {
  color: var(--secondary-color);
}

body>.mobile-menu#mobileMenu .mobile-menu-search {
  margin-top: 1.5rem;
  display: flex;
  background: var(--mobile-search-background, rgba(255, 255, 255, 0.08));
  border: 1px solid var(--mobile-search-border-color, rgba(184, 134, 11, 0.3));
  min-width: 0;
}

body>.mobile-menu#mobileMenu .mobile-menu-search input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  padding: 0.85rem 1rem;
  font-family: "EB Garamond", serif;
  font-size: 1rem;
  color: var(--background-color);
  outline: none;
}

body>.mobile-menu#mobileMenu .mobile-menu-search input::placeholder {
  color: var(--mobile-search-placeholder-color, rgba(245, 240, 232, 0.4));
}

body>.mobile-menu#mobileMenu .mobile-menu-search button {
  background: var(--secondary-color);
  border: none;
  padding: 0.85rem 1.25rem;
  color: var(--surface-primary-background);
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

@media (max-width: 1100px) {
  body>header .header-top {
    padding: 0 1.5rem;
  }

  body>header .header-nav a {
    padding: 0 0.9rem;
    font-size: 0.78rem;
  }
}

@media (max-width: 900px) {
  body>header .header-nav {
    display: none;
  }

  body>header .hamburger {
    display: flex;
  }

  :root {
    --header-h: 52px;
  }

  body>header .theme-switcher-menu {
    right: -0.5rem;
  }

  .search-overlay {
    position: fixed;
    height: 52px;
    padding: 0 1rem;
  }

  .search-overlay-inner {
    gap: 0.5rem;
  }

  .search-overlay-submit {
    flex-shrink: 0;
    padding-inline: 0.95rem;
  }
}

@media (max-width: 680px) {

  body>header .header-top {
    padding: 0 0.85rem;
  }

  body>header .logo {
    gap: 0.5rem;
  }

  body>header .logo-mark {
    width: 30px;
    height: 30px;
    font-size: 0.95rem;
  }

  body>header .logo-text {
    font-size: 0.82rem;
    letter-spacing: 0.05em;
  }

  body>header .logo-text span {
    display: none;
  }

  body>header .search-label-text {
    display: none;
  }

  body>header .nav-search-trigger {
    padding: 0.4rem 0.5rem;
  }

  body>.mobile-menu#mobileMenu {
    top: 52px;
    padding: 1.25rem;
  }

  footer {
    padding: 2rem 1.25rem 1.25rem;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }

  .search-overlay {
    padding: 0 0.75rem;
  }

  .search-overlay-input {
    min-width: 0;
    padding-inline: 0.75rem;
  }

  .search-overlay-submit {
    padding: 0.55rem 0.85rem;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
  }
}

.breadcrumb {
  padding: 0.6rem 2rem;
}

.breadcrumb a {
  color: var(--breadcrumb-link-color, rgba(245, 240, 232, 0.45));
  text-decoration: none;
  transition: color 0.15s;
}

.breadcrumb a:hover {
  color: var(--breadcrumb-link-hover-color, var(--secondary-color-strong));
}

.breadcrumb-sep {
  color: var(--breadcrumb-sep-color, rgba(201, 150, 12, 0.4));
}

.breadcrumb-current {
  color: var(--breadcrumb-current-color, var(--secondary-color-strong));
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-links a {
  font-family: "Source Sans 3", sans-serif;
  color: var(--surface-footer-link, var(--footer-link-color, inherit));
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--surface-footer-link-hover, var(--footer-link-hover-color, var(--background-color)));
}

footer {
  background: var(--surface-footer-background, var(--footer-background-color, #0f1520));
  color: var(--surface-footer-foreground, var(--footer-color, rgba(245, 240, 232, 0.5)));
  padding: 3.5rem max(4rem, calc(50% - 600px)) 2rem;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--surface-footer-border, var(--footer-border-color, rgba(184, 134, 11, 0.2)));
  margin-bottom: 2rem;
}

.footer-brand-name {
  font-family: "Cinzel", serif;
  font-size: 1.1rem;
  color: var(--surface-footer-foreground-strong, var(--background-color));
  margin-bottom: 0.75rem;
}

.footer-brand-desc {
  font-size: 0.85rem;
  color: var(--surface-footer-foreground, inherit);
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.footer-social a {
  color: var(--surface-footer-accent, var(--secondary-color));
  text-decoration: none;
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 0.2s;
}

.footer-social a:hover {
  color: var(--surface-footer-foreground-strong, var(--background-color));
}

.footer-col-title {
  font-family: "Cinzel", serif;
  font-size: 0.86rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--surface-footer-accent, var(--secondary-color));
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  /**border-bottom: 1px solid var(--footer-border-color, rgba(184, 134, 11, 0.2));*/
  border-bottom: 1px solid var(--surface-footer-border, var(--footer-border-color, rgba(184, 134, 11, 0.2)));
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 0.5rem;
}

.footer-col ul li a {
  color: var(--surface-footer-link, var(--footer-link-color, rgba(245, 240, 232, 0.5)));
  text-decoration: none;
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.footer-col ul li a:hover {
  color: var(--surface-footer-link-hover, var(--footer-link-hover-color, var(--background-color)));
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  color: var(--surface-footer-foreground-muted, var(--footer-color, inherit));
}

.footer-bottom a {
  color: var(--surface-footer-foreground-muted, var(--footer-bottom-link-color, rgba(245, 240, 232, 0.4)));
  text-decoration: none;
}

@media (max-width: 980px) {
  footer {
    padding: 2.75rem 2rem 1.75rem;
  }

  .footer-top {
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 2rem;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .footer-brand-desc {
    max-width: 42rem;
  }

  .footer-bottom {
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
  }
}

/* Mobile : colonnes empilées (aligné sur le footer de la HP dans home.css) —
   sans ce bloc la grille 3 colonnes de ≤980px déborde et se fait rogner. */
@media (max-width: 680px) {
  footer {
    padding: 2rem 1.25rem 1.25rem;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
}

.surface-hero {
  margin-top: var(--surface-hero-margin-top, var(--header-h));
  background: var(--surface-hero-background);
  padding: var(--surface-hero-padding, 4rem 4rem 3rem);
  border-bottom: 3px solid var(--surface-hero-border, var(--secondary-color));
  position: relative;
  overflow: hidden;
}

.surface-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(-45deg,
      transparent,
      transparent 40px,
      var(--surface-hero-stripe, rgba(201, 150, 12, 0.025)) 40px,
      var(--surface-hero-stripe, rgba(201, 150, 12, 0.025)) 41px);
  pointer-events: none;
}

.surface-hero::after {
  content: var(--surface-hero-watermark, "");
  position: absolute;
  right: var(--surface-hero-watermark-right, 1.5rem);
  bottom: var(--surface-hero-watermark-bottom, -0.15em);
  font-family: "Playfair Display", serif;
  font-size: var(--surface-hero-watermark-size, 9rem);
  font-weight: 900;
  color: var(--surface-hero-watermark, rgba(201, 150, 12, 0.05));
  line-height: 1;
  pointer-events: none;
  white-space: nowrap;
}

/* When breadcrumb precedes hero, don't double the header margin */
.breadcrumb + .surface-hero {
  margin-top: 0;
}

/* Hero with background image */
.surface-hero--img {
  min-height: 380px;
}

.surface-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  filter: sepia(35%) contrast(1.05) brightness(0.75);
}

.surface-hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      to right,
      var(--surface-hero-background, rgba(8, 18, 32, 0.92)) 0%,
      color-mix(in srgb, var(--surface-hero-background, rgba(8, 18, 32)) 75%, transparent) 50%,
      color-mix(in srgb, var(--surface-hero-background, rgba(8, 18, 32)) 25%, transparent) 100%
    ),
    linear-gradient(
      to top,
      var(--surface-hero-background, rgba(8, 18, 32, 0.95)) 0%,
      transparent 60%
    );
}

.surface-hero-inner {
  position: relative;
  z-index: 2;
  max-width: 680px;
}

.surface-hero-title {
  font-family: "Playfair Display", serif;
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 900;
  font-style: italic;
  color: var(--surface-hero-foreground-strong);
  line-height: 1;
  margin-bottom: 1rem;
}

.surface-hero-eyebrow {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--surface-hero-accent);
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.surface-hero-eyebrow::before {
  content: "";
  display: inline-block;
  width: 24px;
  height: 1px;
  background: var(--surface-hero-accent);
}

.surface-hero-desc {
  font-family: "EB Garamond", serif;
  font-size: 1.1rem;
  color: var(--surface-hero-foreground, rgba(245, 240, 232, 0.72));
  line-height: 1.75;
  max-width: var(--surface-hero-desc-max-width, 540px);
}

.surface-hero-stats {
  display: flex;
  gap: var(--surface-hero-stats-gap, 2.5rem);
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--surface-hero-stats-border, rgba(201, 150, 12, 0.15));
}

.hero-stat-num {
  font-family: "Playfair Display", serif;
  font-size: 2rem;
  font-weight: var(--surface-hero-stat-num-weight, 900);
  color: var(--surface-hero-accent, var(--secondary-color));
  line-height: 1;
}

.hero-stat-label {
  font-family: "Source Sans 3", sans-serif;
  font-size: var(--surface-hero-stat-label-size, 0.64rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--surface-hero-foreground-muted, rgba(245, 240, 232, 0.55));
  margin-top: var(--surface-hero-stat-label-margin-top, 0.3rem);
}

.surface-hero-jumps {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.jump-link {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--surface-hero-link, rgba(245, 240, 232, 0.6));
  border: 1px solid var(--surface-hero-link-border, rgba(201, 150, 12, 0.25));
  padding: 0.32rem 0.85rem;
  text-decoration: none;
  transition: all 0.2s;
}

.jump-link:hover,
.jump-link.active {
  color: var(--surface-hero-link, rgba(245, 240, 232, 0.6));
  border-color: var(--surface-hero-link-border, rgba(201, 150, 12, 0.25));
  background: var(--surface-hero-link-active-background, rgba(201, 150, 12, 0.08));
}


@media (max-width: 900px) {
  .surface-hero {
    padding: 3rem 2rem 2rem;
  }

  .surface-hero::after {
    font-size: 6rem;
    right: 0.5rem;
  }

  .surface-hero-stats {
    gap: 1.5rem;
    flex-wrap: wrap;
  }
}


@media (max-width: 600px) {
  .surface-hero {
    padding: 2rem 1.2rem 1.5rem;
  }

  /* Revue mobile 2026-07 : hero raccourci — la hauteur vient du contenu,
     pas d'un minimum pensé pour desktop */
  .surface-hero--img {
    min-height: 0;
  }

  /* Revue mobile 2026-07 : sur-titre + h2 + description empilés — en ligne
     (baseline) ils se compressent illisiblement à 375px */
  .section-header-left {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
  }

  .surface-hero-title {
    font-size: 2rem;
  }

  .surface-hero-desc {
    font-size: 1rem;
    color: var(--surface-hero-foreground-mobile, rgba(245, 240, 232, 0.8));
    line-height: 1.6;
  }

  .surface-hero-stats {
    gap: 1.2rem;
  }

  .hero-stat-num {
    font-size: 1.6rem;
  }

  .hero-stat-label {
    font-size: 0.72rem;
    color: var(--surface-hero-foreground-muted-mobile, rgba(245, 240, 232, 0.6));
    letter-spacing: 0.08em;
  }

  .surface-hero-jumps .jump-link {
    font-size: 0.72rem;
    color: var(--surface-hero-link-mobile, rgba(245, 240, 232, 0.65));
    padding: 0.4rem 0.9rem;
  }

  .surface-hero-eyebrow {
    font-size: 0.7rem;
  }
}


.search-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 52px;
  background: var(--surface-primary-background);
  display: flex;
  align-items: center;
  padding: 0 clamp(1rem, 3vw, 2.5rem);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 210;
}

.search-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.search-overlay-inner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  min-width: 0;
}

.search-overlay-input {
  flex: 1;
  min-width: 0;
  background: var(--overlay-input-background, rgba(245, 240, 232, 0.08));
  border: 1px solid var(--secondary-color);
  padding: 0.4rem 0.85rem;
  font-family: "EB Garamond", serif;
  font-size: 0.95rem;
  color: var(--background-color);
  outline: none;
}

.search-overlay-input::placeholder {
  color: var(--overlay-input-placeholder-color, rgba(245, 240, 232, 0.4));
  font-style: italic;
}

.search-overlay-input:focus {
  border-color: var(--secondary-color-strong);
  box-shadow: 0 0 0 2px var(--focus-ring-color, rgba(201, 150, 12, 0.2));
}

.search-overlay-submit {
  background: var(--secondary-color);
  color: var(--surface-primary-background);
  border: none;
  padding: 0.4rem 1rem;
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}

.search-overlay-close {
  background: none;
  border: none;
  color: var(--background-color);
  cursor: pointer;
  padding: 0.3rem;
}

.search-overlay-close svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2;
}

.mobile-search {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--surface-primary-foreground-muted);
}

.mobile-search form {
  display: flex;
  width: 100%;
}

.mobile-search input {
  flex: 1;
  padding: 0.8rem 1rem;
  border: 1px solid var(--surface-primary-foreground-muted);
  border-right: none;
  font-family: "EB Garamond", serif;
  font-size: 1rem;
  background: var(--background-color);
  outline: none;
  border-radius: 2px 0 0 2px;
}

.mobile-search input::placeholder {
  color: rgba(245, 240, 232, 0.4);
  font-style: italic;
}

.mobile-search button {
  background: var(--secondary-color);
  border: 1px solid var(--secondary-color);
  border-radius: 0 2px 2px 0;
  padding: 0.8rem 1.2rem;
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--surface-primary-background);
  cursor: pointer;
}

.mobile-nav {
  display: flex;
  flex-direction: column;
}

.mobile-nav a {
  font-family: "Source Sans 3", sans-serif;
  font-size: 1.05rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-color-muted);
  text-decoration: none;
  padding: 1.2rem 1.5rem;
  border-bottom: 1px solid rgba(184, 134, 11, 0.1);
  transition: all 0.2s;
}

.mobile-nav a:hover,
.mobile-nav a.active {
  color: var(--secondary-color);
  background: rgba(201, 150, 12, 0.06);
}

body.menu-open {
  overflow: hidden;
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 2rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.section-header-left {
  display: flex;
  align-items: baseline;
  gap: 1rem;
}

.section-number {
  font-family: "Cinzel", serif;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--secondary-color);
  opacity: 0.7;
}

/* ============ STICKY NAVIGATION BAR (shared: époques, thèmes, etc.) ============ */
.timeline-bar-wrap {
  position: sticky;
  top: var(--header-h);
  z-index: 90;
  background: var(--surface-primary-background);
  border-bottom: 1px solid rgba(201, 150, 12, 0.25);
}

.timeline-bar {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 max(4rem, calc(50% - 600px));
  display: flex;
  align-items: stretch;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.timeline-bar::-webkit-scrollbar {
  display: none;
}

.timeline-bar-label {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(245, 240, 232, 0.35);
  padding: 0.7rem 0.85rem 0.7rem 0;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  white-space: nowrap;
}

.timeline-btn {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: rgba(245, 240, 232, 0.55);
  background: transparent;
  border: none;
  padding: 0.65rem 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.12rem;
}

.timeline-btn::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--secondary-color);
  transform: scaleX(0);
  transition: transform 0.2s;
}

.timeline-btn:hover {
  color: rgba(245, 240, 232, 0.85);
}

.timeline-btn:hover::after {
  transform: scaleX(1);
}

.timeline-btn.active {
  color: var(--secondary-color-strong);
}

.timeline-btn.active::after {
  transform: scaleX(1);
}

.timeline-btn-century {
  font-family: "Playfair Display", serif;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1;
}

.timeline-btn-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.7;
}

.timeline-btn-count {
  font-size: 0.72rem;
  background: rgba(201, 150, 12, 0.15);
  color: var(--secondary-color);
  padding: 0.08rem 0.35rem;
  border-radius: 1px;
  margin-top: 0.1rem;
  line-height: 1;
}

@media (max-width: 860px) {
  .timeline-bar {
    padding: 0 1.5rem;
  }

  .timeline-bar-label {
    display: none;
  }
}

/* Mobile : bandeau compact (sans les pastilles de compte) + fondu à droite
   pour signaler que la barre défile — sinon le dernier item semble tronqué. */
@media (max-width: 600px) {
  .timeline-bar-wrap::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 34px;
    background: linear-gradient(to right, transparent, var(--surface-primary-background));
    pointer-events: none;
  }

  .timeline-bar {
    padding: 0 1rem;
  }

  .timeline-btn {
    padding: 0.55rem 0.55rem;
  }

  .timeline-btn-label {
    font-size: 0.6rem;
    letter-spacing: 0.05em;
  }

  .timeline-btn-count {
    display: none;
  }
}

.section-title {
  font-family: "Playfair Display", serif;
  font-size: 1.8rem;
  font-weight: 900;
  /*color: var(--text-color);*/
  line-height: 1.1;
}

.section-count {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-color-subtle);
  white-space: nowrap;
}

/* ============ ANIMATIONS ============ */
.fade-in {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.5s ease,
    transform 0.5s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}



/* ============ CONTENT WIDTH CONSTRAINT ============ */
/* Applied inside sections to keep backgrounds full-width while limiting text/content width */
.section-inner {
  max-width: 1380px;
  margin: 0 auto;
  width: 100%;
}

/* ============ TYPOGRAPHY READABILITY FLOOR ============
     Minimum sizes and contrast — applies site-wide.
     No text may fall below these values. Palette tokens TBD but floors are fixed.

     Dark bg (navy/blue-deep):
       Body text    : 1rem / rgba(parchment, 0.88) minimum
       Secondary    : 0.9rem / rgba(parchment, 0.70) minimum
       Meta/caption : 0.82rem / rgba(parchment, 0.60) minimum — FLOOR, never lower
       Labels/badges: 0.72rem uppercase — ABSOLUTE FLOOR

     Light bg (parchment/stone):
       Body text    : 1rem / var(--text-color) = #201810
       Secondary    : 0.9rem / var(--text-color-muted) = #5C5246
       Meta/caption : 0.82rem / var(--text-color-muted)
       Labels/badges: 0.72rem uppercase / var(--text-color-muted) — FLOOR

     Mobile (≤768px): add 0.05–0.1rem to all sizes above
     Contrast ratios: WCAG AA minimum (4.5:1 for body text, 3:1 for large text ≥1.5rem bold)
     Gold (#C9960C) on parchment (#F5F0E8) = FAIL — use #6B4F00 or darker for text on light bg
     Gold on navy/dark: ✓ passes AA
  ============================================================ */

.surface-primary {
  --surface-local-background: var(--surface-primary-background);
  --surface-local-background-muted: var(--surface-primary-background-muted);
  --surface-local-background-alt: var(--surface-primary-background-alt);
  --surface-local-foreground: var(--surface-primary-foreground);
  --surface-local-foreground-muted: var(--surface-primary-foreground-muted);
  --surface-local-foreground-strong: var(--surface-primary-foreground-strong);
  --surface-local-border: var(--surface-primary-border);
  --surface-local-accent: var(--surface-primary-accent);
  --surface-local-link: var(--surface-primary-link);
  --surface-local-link-hover: var(--surface-primary-link-hover);
  border-top: 3px solid var(--surface-local-border);
  background: var(--surface-primary-background);
  color: var(--surface-local-foreground);
}

.surface-thin {
  padding: 5rem max(4rem, calc(50% - 670px));
}

.surface-secondary {
  --surface-local-background: var(--surface-secondary-background);
  --surface-local-background-muted: var(--surface-secondary-background-muted);
  --surface-local-background-alt: var(--surface-secondary-background-alt);
  --surface-local-foreground: var(--surface-secondary-foreground);
  --surface-local-foreground-muted: var(--surface-secondary-foreground-muted);
  --surface-local-foreground-strong: var(--surface-secondary-foreground-strong);
  --surface-local-border: var(--surface-secondary-border);
  --surface-local-accent: var(--surface-secondary-accent);
  --surface-local-link: var(--surface-secondary-link);
  --surface-local-link-hover: var(--surface-secondary-link-hover);
  background: var(--surface-secondary-background);
  color: var(--surface-local-foreground);
}

.surface-wide {
  padding: 3.5rem max(3rem, calc(50% - 670px));
}

.surface-tertiary {
  --surface-local-background: var(--surface-tertiary-background);
  --surface-local-background-muted: var(--surface-tertiary-background-muted);
  --surface-local-background-alt: var(--surface-tertiary-background-alt);
  --surface-local-foreground: var(--surface-tertiary-foreground);
  --surface-local-foreground-muted: var(--surface-tertiary-foreground-muted);
  --surface-local-foreground-strong: var(--surface-tertiary-foreground-strong);
  --surface-local-border: var(--surface-tertiary-border);
  --surface-local-accent: var(--surface-tertiary-accent);
  --surface-local-link: var(--surface-tertiary-link);
  --surface-local-link-hover: var(--surface-tertiary-link-hover);
  background: var(--surface-tertiary-background);
  color: var(--surface-local-foreground);
}

.surface-quaternary {
  --surface-local-background: var(--surface-quaternary-background);
  --surface-local-background-muted: var(--surface-quaternary-background-muted);
  --surface-local-background-alt: var(--surface-quaternary-background-alt);
  --surface-local-foreground: var(--surface-quaternary-foreground);
  --surface-local-foreground-muted: var(--surface-quaternary-foreground-muted);
  --surface-local-foreground-strong: var(--surface-quaternary-foreground-strong);
  --surface-local-border: var(--surface-quaternary-border);
  --surface-local-accent: var(--surface-quaternary-accent);
  --surface-local-link: var(--surface-quaternary-link);
  --surface-local-link-hover: var(--surface-quaternary-link-hover);
  background: var(--surface-quaternary-background);
  color: var(--surface-local-foreground);
}

.surface-quinary {
  --surface-local-background: var(--surface-quinary-background);
  --surface-local-background-muted: var(--surface-quinary-background-muted);
  --surface-local-background-alt: var(--surface-quinary-background-alt);
  --surface-local-foreground: var(--surface-quinary-foreground);
  --surface-local-foreground-muted: var(--surface-quinary-foreground-muted);
  --surface-local-foreground-strong: var(--surface-quinary-foreground-strong);
  --surface-local-border: var(--surface-quinary-border);
  --surface-local-accent: var(--surface-quinary-accent);
  --surface-local-link: var(--surface-quinary-link);
  --surface-local-link-hover: var(--surface-quinary-link-hover);
  background: var(--surface-quinary-background);
  color: var(--surface-local-foreground);
}

.surface-senary {
  --surface-local-background: var(--surface-senary-background);
  --surface-local-background-muted: var(--surface-senary-background-muted);
  --surface-local-background-alt: var(--surface-senary-background-alt);
  --surface-local-foreground: var(--surface-senary-foreground);
  --surface-local-foreground-muted: var(--surface-senary-foreground-muted);
  --surface-local-foreground-strong: var(--surface-senary-foreground-strong);
  --surface-local-border: var(--surface-senary-border);
  --surface-local-accent: var(--surface-senary-accent);
  --surface-local-link: var(--surface-senary-link);
  --surface-local-link-hover: var(--surface-senary-link-hover);
  background: var(--surface-senary-background);
  color: var(--surface-local-foreground);
}

.surface-primary a,
.surface-secondary a,
.surface-tertiary a,
.surface-quaternary a,
.surface-quinary a,
.surface-senary a {
  color: var(--surface-local-link);
}

.surface-primary a:hover,
.surface-secondary a:hover,
.surface-tertiary a:hover,
.surface-quaternary a:hover,
.surface-quinary a:hover,
.surface-senary a:hover {
  color: var(--surface-local-link-hover);
}

.surface-primary .muted,
.surface-secondary .muted,
.surface-tertiary .muted,
.surface-quaternary .muted,
.surface-quinary .muted,
.surface-senary .muted {
  color: var(--surface-local-foreground-muted);
}

.surface-primary .strong,
.surface-secondary .strong,
.surface-tertiary .strong,
.surface-quaternary .strong,
.surface-quinary .strong,
.surface-senary .strong {
  color: var(--surface-local-foreground-strong);
}

.surface-primary .accent,
.surface-secondary .accent,
.surface-tertiary .accent,
.surface-quaternary .accent,
.surface-quinary .accent,
.surface-senary .accent {
  color: var(--surface-local-accent);
}

.surface-primary hr,
.surface-secondary hr,
.surface-tertiary hr,
.surface-quaternary hr,
.surface-quinary hr,
.surface-senary hr,
.surface-primary .surface-divider,
.surface-secondary .surface-divider,
.surface-tertiary .surface-divider,
.surface-quaternary .surface-divider,
.surface-quinary .surface-divider,
.surface-senary .surface-divider {
  border-color: var(--surface-local-border);
}

.spotlight-wrap {
  padding: 0;

}

.highlight {
  background-color: var(--ternary-color);
}

.btn-primary {
  text-align: center;
  background: var(--ternary-color);
  color: var(--background-color);
  padding: 0.85rem 2rem;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.90rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.2s;
  display: inline-block;
}

.btn-primary:hover {
  background: var(--primary-color-strong);
  transform: translateY(-1px);
}


/* ============================================================
   FICHE ROW — .fr  (v3)
   Canonical component. Two display modes:
     default      → index/listing pages (full)
     .fr--embed   → embedded inside a fiche (compact)

   Three completeness levels drive DOM content:
     stub     → title + date + address only
     standard → + short notice (.fr-notice), no accordion
     complete → + long notice + accordion + images

   Embed modifier classes:
     .fr--embed           → balade context
     .fr--embed-personne  → also hides .fr-people
     .fr--embed-adresse   → also hides .fr-addr-zone
   ============================================================ */

/* Tokens missing from theme.css */
:root {
  --nouveau-bg:   rgba(42, 125, 42, 0.12);
  --nouveau-text: #1a5c1a;
  --recent-bg:    rgba(184, 40, 28, 0.08);
  --recent-text:  #7a1510;
}

/* ── Container ── */
.fiche-list {
  display: flex;
  flex-direction: column;
}

/* ── Base row ── */
.fr {
  display: block;
  position: relative;
  border-bottom: 1px solid var(--surface-primary-foreground-muted);
  padding: 1.35rem 0 1.1rem;
  transition: background 0.15s;
  cursor: pointer;
  text-decoration: none;
  color: var(--text-color);
}
.fr:first-child {
  border-top: 1px solid var(--surface-primary-foreground-muted);
}
.fr:hover {
  background: var(--background-color-muted);
  margin: 0 -1.5rem;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* ── Type hover borders (mixed-type lists only) ── */
.fr[data-type="evenement"]:hover  { border-left: 3px solid var(--ternary-color); }
.fr[data-type="personnage"]:hover { border-left: 3px solid var(--secondary-color); }
.fr[data-type="lieu"]:hover       { border-left: 3px solid var(--surface-primary-background-muted); }
.fr[data-type="adresse"]:hover    { border-left: 3px solid var(--text-color-muted); }

/* ── Corner type badge (mixed-type lists only) ── */
.fr-type {
  position: absolute;
  top: 1.5rem;
  right: 0;
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
  padding: 0.12rem 0.5rem;
}
.fr:hover .fr-type { right: 1.5rem; }
.fr-type.evenement  { background: var(--badge-bg-evenement);  color: var(--badge-text-evenement); }
.fr-type.personnage { background: var(--badge-bg-personnage); color: var(--badge-text-personnage); }
.fr-type.lieu       { background: var(--badge-bg-lieu);       color: var(--badge-text-lieu); }
.fr-type.adresse    { background: var(--badge-bg-adresse);    color: var(--badge-text-adresse); }

/* ── Desktop: 3-zone grid ── */
@media (min-width: 768px) {
  .fr-grid {
    display: grid;
    grid-template-columns: 72px 1fr auto;
    grid-template-rows: auto auto;
    column-gap: 1.1rem;
  }
  .fr-date-col  { grid-column: 1; grid-row: 1; padding-top: 0.1rem; }
  .fr-content   { grid-column: 2; grid-row: 1; min-width: 0; }
  .fr-addr-zone {
    grid-column: 3; grid-row: 1;
    text-align: right; padding-left: 0.75rem;
    max-width: 200px; padding-top: 0.1rem;
  }
  .fr-footer {
    grid-column: 1 / -1; grid-row: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
    border-top: 1px solid var(--parchment-dark);
    margin-top: 8px;
    padding-top: 7px;
  }
  .fr[data-type] .fr-addr-zone { margin-top: 1.6rem; }
  .fr-date-mobile { display: none; }
  .fr-addr-mobile { display: none; }
}

/* ── Mobile ── */
@media (max-width: 767px) {
  .fr:hover {
    margin: 0 -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .fr:hover .fr-type { right: 1rem; }
  .fr-grid {
    display: flex;
    flex-direction: column;
  }
  .fr-date-col  { display: none; }
  .fr-addr-zone { display: none; }
  .fr-date-mobile {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    padding-right: 5.5rem;
  }
  .fr-addr-mobile {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    flex-wrap: wrap;
    justify-content: flex-end;
    margin-bottom: 0.35rem;
    padding-top: 0.45rem;
    border-top: 1px solid var(--surface-primary-foreground-muted);
    margin-top: 0.4rem;
  }
  .fr-footer {
    margin-top: 0.45rem;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.35rem;
  }
  .fr-img     { width: 140px; }
  .fr-img img { height: 95px; }
}

/* ── Date ── */
.fr-date {
  font-family: "Playfair Display", serif;
  font-size: 0.83rem;
  font-weight: 700;
  color: var(--secondary-color);
  text-decoration: none;
  line-height: 1.3;
}
.fr-date-col .fr-date {
  display: block;
  text-align: right;
  font-size: 0.85rem;
}
.fr-date:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: var(--secondary-color);
}

/* ── Address ── */
.fr-addr {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ternary-color);
  text-decoration: none;
  letter-spacing: 0.02em;
  line-height: 1.4;
}
.fr-addr::before {
  content: "📍 ";
  font-size: 0.65rem;
}
.fr-addr:hover {
  color: var(--ternary-color-hover);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.fr-addr-mobile .fr-addr { font-size: 0.78rem; }

/* ── Title ── */
.fr-title {
  font-family: "Playfair Display", serif;
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--surface-primary-background);
  line-height: 1.3;
  margin-bottom: 0.2rem;
}
.fr-title a { color: inherit; text-decoration: none; }
.fr:hover .fr-title,
.fr:hover .fr-title a { color: var(--ternary-color); }

/* ── Subtitle / lieu-dit (only rendered when lieu data exists) ── */
.fr-subtitle {
  font-family: "EB Garamond", serif;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-color-subtle);
  font-style: italic;
  margin-bottom: 0.25rem;
}

/* ── Thumbnail (only rendered when image exists) ── */
.fr-thumb {
  float: right;
  margin: 0 0 0.5rem 1rem;
  width: 88px;
  height: 60px;
  object-fit: cover;
  border: 1px solid var(--surface-primary-foreground-muted);
  flex-shrink: 0;
}

/* ── Notice (short text, no accordion) ── */
.fr-notice {
  font-family: "EB Garamond", serif;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text-color);
  margin-bottom: 0.35rem;
  clear: both;
}

/* ── Excerpt (longer text, clamped + accordion) ── */
.fr-excerpt {
  font-family: "EB Garamond", serif;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text-color);
  margin-bottom: 0.35rem;
  clear: both;
}
.fr:not(.expanded) .fr-excerpt {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* Search highlight */
.fr-excerpt mark {
  background: rgba(201, 150, 12, 0.2);
  color: inherit;
  padding: 0.05em 0.15em;
}

/* ── People ── */
.fr-people {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.8rem;
  color: var(--text-color-subtle);
  line-height: 1.8;
  margin-bottom: 0.1rem;
}
.fr-people .lbl,
.fr-people .label  { color: var(--text-color-muted); font-weight: 500; }
.fr-people a       { color: var(--ternary-color); text-decoration: none; font-weight: 500; white-space: nowrap; }
.fr-people a:hover { text-decoration: underline; text-underline-offset: 2px; }
.fr-people .sep    { color: var(--surface-primary-foreground-strong); font-size: 0.72rem; margin: 0 0.1rem; }

/* ── AI attribution (optional) ── */
.fr-ai {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  color: var(--text-color-subtle);
  margin-top: 0.25rem;
  line-height: 1.5;
}
.fr-ai a { color: var(--text-color-subtle); text-decoration: underline; text-underline-offset: 2px; }

/* ── Stub indicator ── */
.fr-stub {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  color: var(--text-color-subtle);
  font-style: italic;
  margin-top: 0.1rem;
}

/* ── Accordion ── */
.fr-toggle {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--surface-primary-background-muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.15rem 0;
  letter-spacing: 0.04em;
  transition: color 0.15s;
  display: block;
}
.fr-toggle:hover { color: var(--ternary-color); }
.fr-toggle .arrow { font-size: 0.58rem; margin-left: 0.2rem; }

.fr-expanded {
  display: none;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--surface-primary-foreground-muted);
}
.fr.expanded .fr-expanded              { display: block; }
.fr.expanded .fr-toggle-collapse       { display: block; }
.fr:not(.expanded) .fr-toggle-collapse { display: none; }
.fr.expanded .fr-toggle-expand         { display: none; }
.fr:not(.expanded) .fr-toggle-expand   { display: block; }

.fr-expanded .fr-people {
  margin-top: 0.5rem;
  margin-bottom: 0.3rem;
}

/* ── Images in expanded area ── */
.fr-images {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin: 0.6rem 0;
}
.fr-img {
  width: 120px;
  flex-shrink: 0;
}
.fr-img img {
  width: 100%;
  height: 80px;
  object-fit: cover;
  border: 1px solid var(--surface-primary-foreground-muted);
  display: block;
}
.fr-img-cap,
.fr-img-caption {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  color: var(--text-color-subtle);
  margin-top: 0.2rem;
  line-height: 1.3;
  font-style: italic;
}

/* ── View full fiche ── */
.fr-viewfiche {
  display: inline-block;
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ternary-color);
  text-decoration: none;
  margin-top: 0.45rem;
  letter-spacing: 0.04em;
}
.fr-viewfiche::after { content: " →"; }
.fr-viewfiche:hover  { text-decoration: underline; text-underline-offset: 2px; }

/* ── Tags ── */
.fr-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}
.tag-grp {
  display: flex;
  align-items: center;
  gap: 3px;
}
.tag-sep {
  width: 1px;
  height: 13px;
  background: var(--surface-primary-foreground-muted);
  flex-shrink: 0;
}
/* Canonical System B tag base (listing rows) */
.ftag,
.fiche-tag {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0 0.45rem;
  height: 18px;
  line-height: 18px;
  display: inline-block;
  white-space: nowrap;
  border-radius: 0;
  font-weight: 600;
  text-decoration: none;
}
.ftag:hover,
.fiche-tag:hover { opacity: 0.75; }
.ftag.epoque,
.fiche-tag.epoque   { background: rgba(26,42,66,0.22);   color: #0F1A2C; font-weight: 600; }
.ftag.theme,
.fiche-tag.theme    { background: rgba(107,58,16,0.18);  color: #4A2208; font-weight: 500; }
.ftag.arr,
.fiche-tag.arr      { background: rgba(160,120,20,0.18); color: #3A2E06; font-weight: 600; }
.ftag.arrond,
.fiche-tag.arrond   { background: rgba(160,120,20,0.18); color: #3A2E06; font-weight: 600; }
.ftag.quartier,
.fiche-tag.quartier { background: rgba(160,120,20,0.10); color: #5A4A14; font-weight: 400; }
.ftag.voie,
.fiche-tag.voie     { background: rgba(92,82,70,0.14);   color: #3A3028; font-weight: 400; }

/* Backward-compat layout helpers */
.tag-group { display: flex; align-items: center; gap: 3px; }
.tag-group-sep { width: 1px; height: 13px; background: var(--surface-primary-foreground-muted); flex-shrink: 0; }

/* ── Mod date ── */
.fr-mod {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  color: var(--text-color-subtle);
}

/* ── Load more bar (§7.17) ── */
.load-more-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  padding: 1.75rem 0 0.5rem;
}
.load-more-progress {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  color: var(--stone-text);
  letter-spacing: 0.05em;
}
.load-more-progress strong {
  color: var(--blue-deep);
  font-weight: 600;
}
.load-more-track {
  width: 180px;
  height: 1px;
  background: var(--parchment-dark);
}
.load-more-fill {
  height: 1px;
  background: var(--gold);
  transition: width 0.4s ease;
}
.load-more-rule-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  max-width: 400px;
}
.load-more-rule {
  flex: 1;
  height: 1px;
  background: var(--parchment-dark);
}
.btn-load-more {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--stone-text);
  background: none;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  padding: 0.2rem 0;
  transition: color 0.15s;
}
.btn-load-more:hover { color: var(--blue-deep); }
.btn-load-more:disabled { opacity: 0.4; pointer-events: none; }
.load-more-note {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  color: var(--stone-text);
  letter-spacing: 0.03em;
}

/* badge-new (canonical) and badge-nouveau / badge-recent (legacy aliases) */
.badge-new,
.badge-nouveau {
  display: inline-block;
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 0.05rem 0.32rem;
  margin-left: 0.28rem;
  vertical-align: middle;
  background: var(--nouveau-bg);
  color: var(--nouveau-text);
}
.badge-recent {
  display: inline-block;
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
  padding: 0.05rem 0.32rem;
  margin-left: 0.28rem;
  vertical-align: middle;
  background: var(--recent-bg);
  color: var(--recent-text);
}

/* ── More link (bottom of embed list) ── */
.fr-more {
  display: block;
  text-align: right;
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ternary-color);
  text-decoration: none;
  padding: 0.6rem 0 0;
  letter-spacing: 0.04em;
  border-top: 1px solid var(--surface-primary-foreground-muted);
}
.fr-more::after { content: " →"; }
.fr-more:hover  { text-decoration: underline; text-underline-offset: 2px; }


/* ── Embed modes ── */
.fr--embed { padding: 0.72rem 0 0.6rem; }
.fr--embed:hover { margin: 0 -1.25rem; padding-left: 1.25rem; padding-right: 1.25rem; }
.fr--embed .fr-grid { grid-template-columns: 58px 1fr auto; column-gap: 0.8rem; }

.fr--embed .fr-date     { font-size: 0.75rem; }
.fr--embed .fr-title    { font-size: 0.92rem; margin-bottom: 0.1rem; }
.fr--embed .fr-subtitle { font-size: 0.78rem; margin-bottom: 0.18rem; }
.fr--embed .fr-addr     { font-size: 0.72rem; }
.fr--embed .fr-notice   { font-size: 0.88rem; line-height: 1.6; margin-bottom: 0.2rem; }
.fr--embed .fr-excerpt  { font-size: 0.88rem; line-height: 1.6; margin-bottom: 0.2rem; -webkit-line-clamp: 2; }
.fr--embed .fr-people   { font-size: 0.72rem; }

.fr--embed .fr-thumb    { display: none; }
.fr--embed .fr-footer   { display: none; }
.fr--embed .fr-toggle   { display: none; }
.fr--embed .fr-expanded { display: none !important; }

.fr--embed-personne .fr-people   { display: none; }

.fr--embed-adresse .fr-addr-zone { display: none; }
.fr--embed-adresse .fr-grid      { grid-template-columns: 58px 1fr; }



/* =============================================================================
   CONTRIBUTION STRIP
   Shared component — appears on every page above the footer.
   Partial: partials/contrib-strip.html
   JS: handleShare() in shared/render_shared_layout.js (or equivalent)
   ============================================================================= */

/* Outer wrapper — full-width background */
.contrib-strip {
  background: var(--background-color-muted);
  border-top: 1px solid var(--surface-primary-foreground-muted);
  border-bottom: 1px solid var(--surface-primary-foreground-muted);
}

/* Inner wrapper — constrained to max-w, two rows centred */
.contrib-strip-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 1rem 4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

/* Editorial tagline */
.contrib-strip-editorial {
  font-family: "EB Garamond", serif;
  font-size: 1rem;
  font-style: italic;
  color: var(--text-color-muted);
  text-align: center;
  line-height: 1.4;
}

/* Actions row */
.contrib-strip-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}

/* Individual action button / link */
.contrib-action {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-color-muted);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.45rem 0.85rem;
  border-left: 1px solid var(--surface-primary-foreground-muted);
  transition: color 0.15s;
  white-space: nowrap;
}
.contrib-action:first-child { border-left: none; }
.contrib-action:hover { color: var(--primary-color); }
.contrib-action svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  stroke-width: 1.5;
  fill: none;
  flex-shrink: 0;
}

/* Label variants — full on desktop, short on mobile */
.contrib-action .label-short { display: none; }
.contrib-action .label-full  { display: inline; }

@media (max-width: 680px) {
  .contrib-strip-inner {
    padding: 0.85rem 1.25rem;
    gap: 0.65rem;
  }
  .contrib-strip-editorial {
    font-size: 0.92rem;
  }
  .contrib-strip-actions {
    width: 100%;
    justify-content: space-between;
  }
  .contrib-action {
    flex: 1;
    flex-direction: column;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.4rem 0.25rem;
    border-left: none;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
  }
  .contrib-action svg {
    width: 16px;
    height: 16px;
  }
  .contrib-action .label-short { display: inline; }
  .contrib-action .label-full  { display: none; }
}
