/* ============ BREADCRUMB ============ */
.breadcrumb {
  margin-top: var(--header-h, 92px);
  background: var(--surface-primary-background);
  border-bottom: 1px solid rgba(201, 150, 12, 0.2);
  padding: 0.6rem max(4rem, calc(50% - 600px));
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.breadcrumb a {
  color: rgba(245, 240, 232, 0.45);
  text-decoration: none;
  transition: color 0.15s;
}
.breadcrumb-sep {
  color: rgba(201, 150, 12, 0.4);
}

/* ============ HERO ============ */
.arr-hero {
  position: relative;
  min-height: 420px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.arr-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  filter: sepia(45%) contrast(1.08) brightness(0.72);
}
.arr-hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      to right,
      rgba(8, 18, 32, 0.92) 0%,
      rgba(8, 18, 32, 0.65) 50%,
      rgba(8, 18, 32, 0.2) 100%
    ),
    linear-gradient(
      to top,
      rgba(8, 18, 32, 0.97) 0%,
      rgba(8, 18, 32, 0.35) 40%,
      transparent 70%
    );
}
.arr-hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 3rem 4rem 3.5rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2.5rem;
  align-items: end;
}
.arr-hero-number {
  font-family: "Playfair Display", serif;
  font-size: clamp(5rem, 10vw, 8rem);
  font-weight: 900;
  color: var(--secondary-color);
  line-height: 0.85;
  letter-spacing: -0.03em;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
}
.arr-hero-number sup {
  font-size: 0.35em;
  vertical-align: super;
  letter-spacing: 0;
}
.arr-hero-meta {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.arr-hero-eyebrow {
  font-family: "Cinzel", serif;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(245, 240, 232, 0.5);
}
.arr-hero-eyebrow::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 1px;
  background: var(--secondary-color);
  margin-right: 0.5rem;
  vertical-align: middle;
}
.arr-hero-title {
  font-family: "Playfair Display", serif;
  font-size: clamp(1.8rem, 3.2vw, 2.8rem);
  font-weight: 700;
  color: var(--background-color);
  line-height: 1.1;
}
.arr-hero-quartiers {
  font-family: "EB Garamond", serif;
  font-size: 1.08rem;
  font-style: italic;
  color: rgba(245, 240, 232, 0.6);
  line-height: 1.4;
}
.arr-hero-stats {
  display: flex;
  gap: 2rem;
  margin-top: 0.5rem;
}
.arr-hero-stat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.arr-hero-stat-num {
  font-family: "Playfair Display", serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--secondary-color);
  line-height: 1;
}
.arr-hero-stat-label {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(245, 240, 232, 0.45);
  margin-top: 0.15rem;
}

/* ============ PAGE BODY ============ */
.page-body {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 4rem;
}

/* ============ SECTION HEADERS ============ */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 2.5rem 0 1.25rem;
  border-bottom: 1px solid var(--surface-primary-foreground-muted);
  margin-bottom: 1.5rem;
}
.section-header-left {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}
.section-number {
  font-family: "Cinzel", serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--secondary-color);
}
.section-title {
  font-family: "Playfair Display", serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--surface-primary-background);
}
.section-count {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--text-color-subtle);
}

/* ============ EDITORIAL INTRO ============ */
.editorial-intro {
  padding: 2.5rem 0 1rem;
}
.editorial-text {
  font-family: "EB Garamond", serif;
  font-size: 1.1rem;
  line-height: 1.75;
  color: var(--text-color);
  max-width: 780px;
}
.editorial-text p {
  margin-bottom: 1rem;
}
.editorial-text p:last-child {
  margin-bottom: 0;
}

/* Editorial image gallery strip */
.editorial-gallery {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scrollbar-width: thin;
  scrollbar-color: var(--surface-primary-foreground-strong) transparent;
}
.editorial-gallery::-webkit-scrollbar {
  height: 4px;
}
.editorial-gallery::-webkit-scrollbar-thumb {
  background: var(--surface-primary-foreground-strong);
  border-radius: 2px;
}
.editorial-gallery-item {
  flex: 0 0 auto;
  width: 260px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.editorial-gallery-item img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  filter: sepia(20%) contrast(1.05);
  display: block;
  border: 1px solid var(--surface-primary-foreground-muted);
  transition: filter 0.3s;
}
.editorial-gallery-item:hover img {
  filter: sepia(5%) contrast(1.1);
}
.editorial-gallery-caption {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  color: var(--text-color-subtle);
  line-height: 1.4;
  margin-top: 0.35rem;
}

/* ============ QUARTIER CARDS ============ */
.quartier-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 0.5rem;
}
.quartier-card {
  background: white;
  border: 1px solid var(--surface-primary-foreground-muted);
  text-decoration: none;
  overflow: hidden;
  transition:
    border-color 0.2s,
    box-shadow 0.2s,
    transform 0.2s;
  display: flex;
  flex-direction: column;
}
.quartier-card:hover {
  border-color: var(--secondary-color);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}
.quartier-card-img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  filter: sepia(25%) contrast(1.05) brightness(0.9);
  transition: filter 0.3s;
}
.quartier-card:hover .quartier-card-img {
  filter: sepia(10%) contrast(1.1);
}
.quartier-card-body {
  padding: 0.85rem 0.9rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.quartier-card-name {
  font-family: "Playfair Display", serif;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--surface-primary-background);
  margin-bottom: 0.25rem;
  line-height: 1.2;
}
.quartier-card:hover .quartier-card-name {
  color: var(--primary-color);
}
.quartier-card-subs {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  color: var(--text-color-subtle);
  line-height: 1.35;
  margin-bottom: 0.5rem;
  flex: 1;
}
.quartier-card-stat {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--text-color-muted);
  padding-top: 0.45rem;
  border-top: 1px solid var(--surface-primary-foreground-muted);
}
.quartier-card-stat strong {
  color: var(--secondary-color);
  font-weight: 600;
}

/* ============ LIEUX NOMMÉS SCROLL ============ */
.lieux-scroll-wrap {
  position: relative;
  margin-bottom: 0.5rem;
}
.lieux-scroll {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.75rem;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--surface-primary-foreground-strong) transparent;
}
.lieux-scroll::-webkit-scrollbar {
  height: 4px;
}
.lieux-scroll::-webkit-scrollbar-thumb {
  background: var(--surface-primary-foreground-strong);
  border-radius: 2px;
}
.lieu-card {
  flex: 0 0 185px;
  scroll-snap-align: start;
  text-decoration: none;
  background: white;
  border: 1px solid var(--surface-primary-foreground-muted);
  overflow: hidden;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
.lieu-card:hover {
  border-color: var(--secondary-color);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.07);
}
.lieu-card-img {
  width: 100%;
  height: 100px;
  object-fit: cover;
  filter: sepia(30%) contrast(1.05) brightness(0.85);
  transition: filter 0.3s;
}
.lieu-card:hover .lieu-card-img {
  filter: sepia(10%) contrast(1.1);
}
.lieu-card-body {
  padding: 0.55rem 0.65rem;
}
.lieu-card-name {
  font-family: "Playfair Display", serif;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--surface-primary-background);
  line-height: 1.2;
  margin-bottom: 0.2rem;
}
.lieu-card:hover .lieu-card-name {
  color: var(--primary-color);
}
.lieu-card-meta {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  color: var(--text-color-subtle);
  letter-spacing: 0.04em;
}
.lieu-card-meta strong {
  color: var(--secondary-color);
  font-weight: 600;
}
.lieux-scroll-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-60%);
  width: 32px;
  height: 32px;
  background: var(--surface-primary-background);
  color: var(--background-color);
  border: 1px solid var(--secondary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.85rem;
  z-index: 5;
  transition: background 0.2s;
  border-radius: 0;
}
.lieux-scroll-arrow:hover {
  background: var(--secondary-color);
  color: var(--surface-primary-background);
}
.lieux-scroll-arrow.left {
  left: -12px;
}
.lieux-scroll-arrow.right {
  right: -12px;
}

/* ============ MAP WITH LAYER TOGGLE ============ */
.map-section {
  margin-bottom: 0.5rem;
}

/* Layer toggle bar */
.map-layer-bar {
  display: flex;
  align-items: stretch;
  background: var(--surface-primary-background);
  border: 1px solid var(--surface-primary-foreground-muted);
  border-bottom: none;
}
.map-layer-label {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(245, 240, 232, 0.4);
  padding: 0.6rem 0.85rem;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  border-right: 1px solid rgba(201, 150, 12, 0.15);
}
.map-layer-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;
  border-right: 1px solid rgba(201, 150, 12, 0.12);
  padding: 0.55rem 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
}
.map-layer-btn:last-child {
  border-right: none;
}
.map-layer-btn:hover {
  color: var(--background-color);
  background: rgba(201, 150, 12, 0.1);
}
.map-layer-btn.active {
  color: var(--secondary-color);
  background: rgba(201, 150, 12, 0.12);
}
.map-layer-btn-year {
  font-weight: 600;
  font-size: 0.72rem;
}
.map-layer-btn-name {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.65;
}
.map-layer-btn.active .map-layer-btn-name {
  opacity: 0.85;
}

/* Overlay indicator */
.map-overlay-indicator {
  display: none;
  align-items: center;
  gap: 0.5rem;
  background: var(--surface-primary-background);
  border: 1px solid var(--surface-primary-foreground-muted);
  border-top: none;
  border-bottom: none;
  padding: 0.35rem 0.85rem;
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  color: rgba(245, 240, 232, 0.65);
  letter-spacing: 0.04em;
}
.map-overlay-indicator.visible {
  display: flex;
}
.map-overlay-indicator-icon {
  font-size: 0.72rem;
}
.map-overlay-indicator-text {
  flex: 1;
}
.map-overlay-indicator-text strong {
  color: var(--secondary-color);
  font-weight: 600;
}
.map-overlay-indicator-note {
  font-size: 0.72rem;
  font-style: italic;
  color: rgba(245, 240, 232, 0.4);
}

/* Map container */
.map-container {
  width: 100%;
  height: 380px;
  border: 1px solid var(--surface-primary-foreground-muted);
  border-top: none;
  position: relative;
  overflow: hidden;
  transition: background 0.5s;
}

/* Layer-specific backgrounds */
.map-container[data-layer="actuel"] {
  background: linear-gradient(135deg, #d2c8b4 0%, #c4b8a2 50%, #b8ac98 100%);
}
.map-container[data-layer="turgot"] {
  background:
    radial-gradient(
      ellipse at 40% 45%,
      rgba(168, 145, 108, 0.5) 0%,
      transparent 70%
    ),
    linear-gradient(135deg, #c4b08a 0%, #b8a47c 30%, #a89468 60%, #c0ae8e 100%);
}
.map-container[data-layer="verniquet"] {
  background:
    radial-gradient(
      ellipse at 50% 50%,
      rgba(200, 190, 170, 0.4) 0%,
      transparent 65%
    ),
    linear-gradient(135deg, #d8d0be 0%, #c8bea8 40%, #bab09a 70%, #d0c8b4 100%);
}
.map-container[data-layer="atlas"] {
  background:
    radial-gradient(
      ellipse at 45% 50%,
      rgba(180, 160, 120, 0.35) 0%,
      transparent 65%
    ),
    linear-gradient(135deg, #c8b898 0%, #baa880 35%, #a89470 65%, #c4b490 100%);
}

/* Simulated map textures per layer */
.map-texture {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s;
}
.map-texture.visible {
  opacity: 1;
}

/* Modern map: subtle grid lines */
.map-texture-actuel {
  background-image:
    linear-gradient(rgba(180, 170, 155, 0.25) 1px, transparent 1px),
    linear-gradient(90deg, rgba(180, 170, 155, 0.25) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* Turgot: warm sepia hatching feel */
.map-texture-turgot {
  background-image:
    repeating-linear-gradient(
      45deg,
      rgba(120, 95, 55, 0.07) 0px,
      rgba(120, 95, 55, 0.07) 1px,
      transparent 1px,
      transparent 8px
    ),
    repeating-linear-gradient(
      -45deg,
      rgba(120, 95, 55, 0.05) 0px,
      rgba(120, 95, 55, 0.05) 1px,
      transparent 1px,
      transparent 12px
    );
}

/* Verniquet: fine geometric lines */
.map-texture-verniquet {
  background-image:
    linear-gradient(rgba(100, 90, 70, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(100, 90, 70, 0.12) 1px, transparent 1px),
    linear-gradient(rgba(100, 90, 70, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(100, 90, 70, 0.05) 1px, transparent 1px);
  background-size:
    80px 80px,
    80px 80px,
    20px 20px,
    20px 20px;
}

/* Atlas municipal: denser, warmer grid */
.map-texture-atlas {
  background-image:
    linear-gradient(rgba(100, 80, 45, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(100, 80, 45, 0.1) 1px, transparent 1px),
    repeating-linear-gradient(
      135deg,
      rgba(100, 80, 45, 0.04) 0px,
      rgba(100, 80, 45, 0.04) 1px,
      transparent 1px,
      transparent 6px
    );
  background-size:
    40px 40px,
    40px 40px,
    8px 8px;
}

/* Simulated old-map decorative elements */
.map-ornament {
  position: absolute;
  pointer-events: none;
  transition: opacity 0.5s;
  opacity: 0;
}
.map-ornament.visible {
  opacity: 1;
}
.map-ornament-compass {
  top: 1.2rem;
  right: 1.2rem;
  width: 55px;
  height: 55px;
}
.map-ornament-cartouche {
  bottom: 2.5rem;
  left: 1.5rem;
  padding: 0.55rem 0.85rem;
  background: rgba(245, 238, 220, 0.85);
  border: 1.5px solid rgba(140, 115, 75, 0.5);
  box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.1);
}
.map-ornament-cartouche-title {
  font-family: "Playfair Display", serif;
  font-size: 0.75rem;
  font-weight: 700;
  font-style: italic;
  color: #3a2e1e;
  line-height: 1.2;
}
.map-ornament-cartouche-sub {
  font-family: "EB Garamond", serif;
  font-size: 0.72rem;
  font-style: italic;
  color: #6a5a42;
  margin-top: 0.15rem;
}

.map-placeholder-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  transition: opacity 0.4s;
}
.map-placeholder-icon {
  font-size: 2.5rem;
  opacity: 0.35;
}
.map-placeholder-label {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-color-muted);
  opacity: 0.65;
  text-align: center;
}
.map-badge {
  position: absolute;
  bottom: 0.5rem;
  right: 0.75rem;
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--text-color-subtle);
  background: rgba(245, 240, 232, 0.85);
  padding: 0.15rem 0.5rem;
}

/* POI dots — always on top */
.map-dots {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}
.map-dot {
  position: absolute;
  width: 8px;
  height: 8px;
  background: var(--primary-color);
  border-radius: 50%;
  border: 1.5px solid white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

/* Mobile: layer bar scrolls horizontally */
@media (max-width: 640px) {
  .map-layer-bar {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .map-layer-bar::-webkit-scrollbar {
    display: none;
  }
  .map-layer-label {
    font-size: 0.72rem;
    padding: 0.5rem 0.65rem;
  }
  .map-layer-btn {
    padding: 0.45rem 0.7rem;
    white-space: nowrap;
  }
  .map-layer-btn-year {
    font-size: 0.72rem;
  }
  .map-layer-btn-name {
    font-size: 0.72rem;
  }
  .map-overlay-indicator {
    font-size: 0.72rem;
    padding: 0.35rem 0.65rem;
  }
  .map-container {
    height: 300px;
  }
  .map-ornament-compass {
    width: 42px;
    height: 42px;
    top: 0.8rem;
    right: 0.8rem;
  }
  .map-ornament-cartouche {
    padding: 0.4rem 0.65rem;
  }
  .map-ornament-cartouche-title {
    font-size: 0.72rem;
  }
  .map-ornament-cartouche-sub {
    font-size: 0.72rem;
  }
}

/* ============ FILTER BAR ============ */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--surface-primary-foreground-muted);
}
.filter-label {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-color-subtle);
  flex-shrink: 0;
  margin-right: 0.25rem;
}
.filter-select {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  border: 1px solid var(--surface-primary-foreground-muted);
  background: var(--background-color);
  color: var(--text-color-muted);
  padding: 0.32rem 1.6rem 0.32rem 0.6rem;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%237A7060'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  transition: border-color 0.15s;
}
.filter-select:hover {
  border-color: var(--secondary-color);
}
.filter-select:focus {
  outline: none;
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 2px rgba(201, 150, 12, 0.15);
}
.filter-input {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  border: 1px solid var(--surface-primary-foreground-muted);
  background: var(--background-color);
  color: var(--text-color-muted);
  padding: 0.32rem 0.6rem;
  width: 150px;
  transition: border-color 0.15s;
}
.filter-input::placeholder {
  color: var(--surface-primary-foreground-strong);
  font-style: italic;
}
.filter-input:focus {
  outline: none;
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 2px rgba(201, 150, 12, 0.15);
}
.filter-sep {
  width: 1px;
  height: 20px;
  background: var(--surface-primary-foreground-muted);
  flex-shrink: 0;
  margin: 0 0.15rem;
}
.filter-count {
  margin-left: auto;
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--text-color-subtle);
}
.filter-sort {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.filter-sort-label {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-color-subtle);
}
.sort-btn {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  background: none;
  border: none;
  color: var(--text-color-subtle);
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  transition: color 0.15s;
}
.sort-btn:hover {
  color: var(--surface-primary-background);
}
.sort-btn.active {
  color: var(--surface-primary-background);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--secondary-color);
  text-underline-offset: 3px;
}

/* Active filter pills */
.active-filters {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.active-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  background: var(--surface-primary-background);
  color: var(--background-color);
  padding: 0.2rem 0.55rem;
  cursor: pointer;
  transition: background 0.15s;
}
.active-filter-pill:hover {
  background: var(--primary-color);
}
.active-filter-pill .pill-x {
  font-size: 0.7rem;
  opacity: 0.6;
}
.filter-reset {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  color: var(--primary-color);
  letter-spacing: 0.06em;
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.filter-reset:hover {
  color: var(--surface-primary-background);
}

/* ============ FICHE ROW LIST ============ */
.fiches-list {
  display: flex;
  flex-direction: column;
  margin-bottom: 2rem;
}
.fiche-row {
  display: block;
  padding: 1.25rem 0 1rem;
  border-bottom: 1px solid var(--surface-primary-foreground-muted);
  text-decoration: none;
  transition: background 0.15s;
  overflow: hidden;
}
.fiche-row:first-child {
  border-top: 1px solid var(--surface-primary-foreground-muted);
}
.fiche-row:hover {
  background: var(--background-color-muted);
  margin: 0 -1.5rem;
  padding: 1.25rem 1.5rem 1rem;
}

/* Type indicator — left border on hover */
.fiche-row[data-type="evenement"]:hover {
  border-left: 3px solid var(--type-evenement);
}
.fiche-row[data-type="personnage"]:hover {
  border-left: 3px solid var(--type-personnage);
}
.fiche-row[data-type="lieu"]:hover {
  border-left: 3px solid var(--type-lieu);
}

/* Thumbnail */
.fiche-row-thumb {
  float: right;
  width: 110px;
  height: 90px;
  object-fit: cover;
  filter: sepia(20%) contrast(1.05);
  border: 1px solid var(--surface-primary-foreground-muted);
  margin: 0 0 0.75rem 1.5rem;
}
.fiche-row-thumb[src=""],
.fiche-row-thumb:not([src]) {
  display: none;
}

/* Header line */
.fiche-row-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.3rem;
  flex-wrap: wrap;
}
.fiche-row-date {
  font-family: "Playfair Display", serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--secondary-color);
  flex-shrink: 0;
  white-space: nowrap;
}
.fiche-row-addr {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--primary-color);
  white-space: nowrap;
  flex-shrink: 0;
}
.fiche-row-addr::before {
  content: "📍 ";
  font-style: normal;
}

/* Type badge inline */
.fiche-row-type {
  font-family: "Cinzel", serif;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.12rem 0.5rem;
  display: inline-block;
  margin-right: 0.5rem;
}
.fiche-row-type.evenement {
  background: rgba(184, 40, 28, 0.08);
  color: var(--type-evenement);
}
.fiche-row-type.personnage {
  background: rgba(201, 150, 12, 0.12);
  color: var(--type-personnage);
}

/* Subtitle */
.fiche-row-subtitle {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--text-color-subtle);
  margin-bottom: 0.3rem;
  font-style: italic;
}

/* Title */
.fiche-row-title {
  font-family: "Playfair Display", serif;
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--surface-primary-background);
  line-height: 1.3;
  margin-bottom: 0.5rem;
}
.fiche-row:hover .fiche-row-title {
  color: var(--primary-color);
}

/* Excerpt */
.fiche-row-excerpt {
  font-family: "EB Garamond", serif;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-color);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0.65rem;
}

/* Personnages */
.fiche-row-people {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  color: var(--text-color-subtle);
  margin-bottom: 0.55rem;
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.fiche-row-people-label {
  color: var(--text-color-subtle);
  flex-shrink: 0;
}
.fiche-row-people a {
  color: var(--primary-color);
  text-decoration: none;
}
.fiche-row-people a:hover {
  text-decoration: underline;
}
.fiche-row-people-sep {
  color: var(--surface-primary-foreground-strong);
}

/* Read more */
.fiche-row-readmore {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--surface-primary-background-muted);
  margin-bottom: 0.7rem;
  transition: color 0.15s;
}
.fiche-row:hover .fiche-row-readmore {
  color: var(--primary-color);
}
.fiche-row-readmore::after {
  content: "→";
  font-size: 0.8rem;
}

/* Tags */
.fiche-row-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}
.fiche-row-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.fiche-tag {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.55rem;
  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;
  text-decoration: none;
  transition: opacity 0.15s;
}
.fiche-tag:hover { opacity: 0.75; }

.fiche-tag.epoque   { background: var(--tag-epoque-bg);  color: var(--tag-epoque-text);  font-weight: 600; }
.fiche-tag.theme    { background: var(--tag-theme-bg);   color: var(--tag-theme-text);   font-weight: 500; }
.fiche-tag.arr      { background: var(--tag-arr-bg);     color: var(--tag-arr-text);     font-weight: 600; }
.fiche-tag.arrond   { background: var(--tag-arr-bg);     color: var(--tag-arr-text);     font-weight: 600; }
.fiche-tag.quartier { background: rgba(160,120,20,0.10); color: #5A4A14;                 font-weight: 400; }
.fiche-tag.voie     { background: rgba(92,82,70,0.14);   color: #3A3028;                 font-weight: 400; }
.fiche-tag.lieu     { background: rgba(58,48,52,0.12);   color: #3a3035;                 font-weight: 400; }

/* ============ OTHER PEOPLE (personnage embed mode) ============ */
.fr-people-other {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  color: var(--text-color-subtle);
  margin-bottom: 0.35rem;
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.fr-people-other-label {
  color: var(--text-color-subtle);
  flex-shrink: 0;
  font-style: italic;
}
.fr-people-other a {
  color: var(--primary-color);
  text-decoration: none;
}
.fr-people-other a:hover { text-decoration: underline; }

/* Hide when no other people exist */
.fr-people-other:empty { display: none; }

/* ============ PAGINATION ============ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--surface-primary-foreground-muted);
  margin-bottom: 3rem;
}
.page-btn {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  min-width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--surface-primary-foreground-muted);
  background: var(--background-color);
  color: var(--text-color-muted);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s;
}
.page-btn:hover {
  border-color: var(--secondary-color);
  color: var(--surface-primary-background);
  background: var(--background-color-muted);
}
.page-btn.active {
  background: var(--surface-primary-background);
  color: var(--background-color);
  border-color: var(--surface-primary-background);
}
.page-btn.disabled {
  opacity: 0.3;
  pointer-events: none;
}
.page-ellipsis {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  color: var(--text-color-subtle);
  padding: 0 0.3rem;
}

/* ============ JUMP LINKS (sticky) ============ */
.page-jump-bar {
  position: sticky;
  top: var(--header-h, 92px);
  z-index: 50;
  background: var(--background-color);
  border-bottom: 1px solid var(--surface-primary-foreground-muted);
  padding: 0.55rem max(4rem, calc(50% - 600px + 4rem));
  display: flex;
  align-items: center;
  gap: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.jump-link {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-color-subtle);
  text-decoration: none;
  padding: 0.2rem 0;
  border-bottom: 2px solid transparent;
  transition:
    color 0.15s,
    border-color 0.15s;
}
.jump-link:hover {
  color: var(--surface-primary-background);
}
.jump-link.active {
  color: var(--surface-primary-background);
  border-bottom-color: var(--secondary-color);
}

/* ============ MOBILE ============ */
@media (max-width: 960px) {
  .arr-hero-content {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 2rem 2rem 2.5rem;
  }
  .arr-hero-number {
    font-size: 4rem;
  }
  .arr-hero-stats {
    gap: 1.2rem;
  }
  .page-body {
    padding: 0 2rem;
  }
  .quartier-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .page-jump-bar {
    padding: 0.55rem 2rem;
    gap: 1rem;
    overflow-x: auto;
  }
  .breadcrumb {
    padding: 0.6rem 2rem;
  }
}
@media (max-width: 640px) {
  .arr-hero {
    min-height: 340px;
  }
  .arr-hero-content {
    padding: 1.5rem 1.25rem 2rem;
  }
  .arr-hero-number {
    font-size: 3rem;
  }
  .arr-hero-title {
    font-size: 1.5rem;
  }
  .arr-hero-stats {
    flex-wrap: wrap;
    gap: 1rem;
  }
  .page-body {
    padding: 0 1.25rem;
  }
  .quartier-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
  }
  .quartier-card-img {
    height: 100px;
  }
  .editorial-gallery-item {
    width: 220px;
  }
  .editorial-gallery-item img {
    height: 140px;
  }

  /* ── JUMP BAR — stronger contrast on mobile ── */
  .page-jump-bar {
    padding: 0.6rem 1.25rem;
    gap: 0.85rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .page-jump-bar::-webkit-scrollbar {
    display: none;
  }
  .jump-link {
    font-size: 0.72rem;
    color: var(--text-color-muted); /* was --text-color-subtle, now darker */
    white-space: nowrap;
    padding: 0.25rem 0;
  }
  .jump-link.active {
    color: var(--surface-primary-background);
  }

  /* ── SECTION HEADERS — bigger counts on mobile ── */
  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
  }
  .section-count {
    font-size: 0.72rem; /* was 0.65rem */
    color: var(--text-color-muted); /* was --text-color-subtle, now darker */
  }

  /* ── QUARTIER CARDS — readable text on small screens ── */
  .quartier-card-name {
    font-size: 0.92rem;
  }
  .quartier-card-subs {
    font-size: 0.72rem; /* was 0.62rem */
    color: var(--text-color-muted); /* was --text-color-subtle */
  }
  .quartier-card-stat {
    font-size: 0.72rem; /* was 0.6rem */
  }

  /* ── LIEUX NOMMÉS — larger card text ── */
  .lieu-card {
    flex: 0 0 165px;
  }
  .lieu-card-img {
    height: 85px;
  }
  .lieu-card-name {
    font-size: 0.85rem; /* was 0.82rem */
  }
  .lieu-card-meta {
    font-size: 0.72rem; /* was 0.58rem */
    color: var(--text-color-muted); /* was --text-color-subtle */
  }

  /* ── FILTER BAR — bigger touch targets, readable text ── */
  .filter-bar {
    gap: 0.5rem;
  }
  .filter-label {
    font-size: 0.72rem; /* was 0.62rem */
    color: var(--text-color-muted); /* darker */
  }
  .filter-select {
    font-size: 0.72rem; /* was 0.65rem */
    padding: 0.38rem 1.6rem 0.38rem 0.6rem; /* taller touch target */
    color: var(--text-color); /* was --text-color-muted, now darker */
  }
  .filter-input {
    font-size: 0.72rem;
    padding: 0.38rem 0.6rem;
    width: 130px;
  }
  .filter-count {
    font-size: 0.72rem; /* was 0.6rem */
    color: var(--text-color-muted);
  }
  .filter-sort-label {
    font-size: 0.72rem;
  }
  .sort-btn {
    font-size: 0.72rem;
    padding: 0.25rem 0.45rem;
  }

  /* ── FICHE ROW HEADER — bigger metadata on mobile ── */
  .fiche-row:hover {
    margin: 0 -1rem;
    padding: 1.25rem 1rem 1rem;
  }
  .fiche-row-date {
    font-size: 1rem;
  }
  .fiche-row-addr {
    font-size: 0.74rem; /* was 0.68rem */
  }
  .fiche-row-subtitle {
    font-size: 0.76rem; /* was 0.72rem */
  }

  /* ── FICHE ROW PEOPLE — tighter wrap, better readability ── */
  .fiche-row-people {
    font-size: 0.78rem; /* was 0.72rem */
    line-height: 1.3; /* tighter line-height to keep names close */
    gap: 0.2rem 0.35rem; /* smaller row-gap, same column-gap */
  }
  .fiche-row-people a {
    font-size: 0.78rem;
  }

  /* ── FICHE ROW READMORE — bigger tap target ── */
  .fiche-row-readmore {
    font-size: 0.72rem;
    padding: 0.2rem 0;
  }

  

  /* ── EDITORIAL — caption readability ── */
  .editorial-gallery-caption {
    font-size: 0.72rem; /* was 0.62rem */
    color: var(--text-color-muted); /* was --text-color-subtle */
  }
}
