/* ============ 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);
}


/* ============ SECTION WRAPPERS ============ */
.section {
  padding: 4rem 4rem;
  max-width: var(--max-w);
  margin: 0 auto;
}

.section-title {
  font-family: "Cinzel", serif;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--primary-color);
  margin-bottom: 1.75rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}
.section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--surface-primary-foreground-muted), transparent);
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 2rem;
  gap: 2rem;
}
.section-header-left {
  flex: 1;
}
.section-h2 {
  font-family: "Playfair Display", serif;
  font-size: clamp(1.4rem, 2.5vw, 1.9rem);
  font-weight: 700;
  color: var(--surface-primary-background);
  line-height: 1.1;
}
.section-desc {
  font-family: "EB Garamond", serif;
  font-size: 0.95rem;
  font-style: italic;
  color: var(--text-color-subtle);
  line-height: 1.6;
  margin-top: 0.35rem;
}

/* Full-width section bands */
.band {
  background: var(--background-color-muted);
  padding: 4rem 0;
}
.band-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 4rem;
}

/* ============ SUBCATEGORY CARDS ============ */
.subcat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
}

.subcat-card {
  position: relative;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  overflow: hidden;
  cursor: pointer;
}

/* Fallback backgrounds */
.subcat-card.sc-1 {
  background: linear-gradient(135deg, #2c3e58, #1a2a42);
}
.subcat-card.sc-2 {
  background: linear-gradient(135deg, #3a2a0a, #261a04);
}
.subcat-card.sc-3 {
  background: linear-gradient(135deg, #1a3a2a, #0f2018);
}
.subcat-card.sc-4 {
  background: linear-gradient(135deg, #3a2020, #200a0a);
}
.subcat-card.sc-5 {
  background: linear-gradient(135deg, #2a2a3e, #18182e);
}
.subcat-card.sc-6 {
  background: linear-gradient(135deg, #1a3a3a, #0a2222);
}

.subcat-card-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: sepia(45%) contrast(1.08) brightness(0.8);
  transition:
    transform 0.55s ease,
    filter 0.4s;
}
.subcat-card:hover .subcat-card-img {
  transform: scale(1.05);
  filter: sepia(20%) contrast(1.1) brightness(0.88);
}

.subcat-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(26, 42, 66, 0.97) 0%,
    rgba(26, 42, 66, 0.4) 55%,
    rgba(26, 42, 66, 0.05) 100%
  );
  transition: background 0.3s;
}
.subcat-card:hover .subcat-card-overlay {
  background: linear-gradient(
    to top,
    rgba(26, 42, 66, 0.99) 0%,
    rgba(26, 42, 66, 0.55) 60%,
    rgba(26, 42, 66, 0.15) 100%
  );
}

.subcat-card-icon {
  position: absolute;
  top: 1.1rem;
  left: 1.1rem;
  font-size: 1.4rem;
  z-index: 2;
  opacity: 0.75;
  transition: opacity 0.3s;
}
.subcat-card:hover .subcat-card-icon {
  opacity: 1;
}

.subcat-card-body {
  position: relative;
  z-index: 2;
  padding: 1.1rem 1.25rem 1.1rem;
  margin-top: auto;
}

.subcat-card-count {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--secondary-color);
  margin-bottom: 0.3rem;
  display: block;
}

.subcat-card-title {
  font-family: "Playfair Display", serif;
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--background-color);
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

.subcat-card-desc {
  font-family: "EB Garamond", serif;
  font-size: 0.85rem;
  color: rgba(245, 240, 232, 0.58);
  line-height: 1.5;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.subcat-card:hover .subcat-card-desc {
  max-height: 80px;
}

.subcat-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.65rem;
  padding-top: 0.6rem;
  border-top: 1px solid rgba(201, 150, 12, 0.18);
}
.subcat-card-arr {
  font-size: 0.75rem;
  color: var(--secondary-color);
  transition: transform 0.2s;
}
.subcat-card:hover .subcat-card-arr {
  transform: translateX(4px);
}

/* ============ FILTER BAR ============ */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
  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-btn {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  border: 1px solid var(--surface-primary-foreground-muted);
  background: var(--background-color);
  color: var(--text-color-muted);
  padding: 0.28rem 0.75rem;
  cursor: pointer;
  transition: all 0.15s;
  text-transform: none;
}
.filter-btn:hover {
  border-color: var(--secondary-color);
  color: var(--surface-primary-background);
}
.filter-btn.active {
  background: var(--surface-primary-background);
  color: var(--background-color);
  border-color: var(--surface-primary-background);
}

.filter-sep {
  width: 1px;
  height: 20px;
  background: var(--surface-primary-foreground-muted);
  flex-shrink: 0;
  margin: 0 0.2rem;
}

.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.28rem 0.6rem;
  cursor: pointer;
  appearance: none;
  padding-right: 1.4rem;
  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;
}

.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);
}

/* ============ FICHE ROW LIST ============ */
.fiches-list {
  display: flex;
  flex-direction: column;
  margin-bottom: 2rem;
}

/* Each row */
.fiche-row {
  display: grid;
  grid-template-columns: 72px 1fr 56px;
  gap: 0 1.5rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--surface-primary-foreground-muted);
  align-items: start;
  text-decoration: none;
  transition: background 0.15s;
  position: relative;
}
.fiche-row:first-child {
  border-top: 1px solid var(--surface-primary-foreground-muted);
}
.fiche-row:hover {
  background: var(--background-color-muted);
  margin: 0 -1rem;
  padding: 1.25rem 1rem;
}

/* No image: collapse the third column */
.fiche-row.no-img {
  grid-template-columns: 72px 1fr;
}

/* Date column */
.fiche-row-date {
  font-family: "Playfair Display", serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--secondary-color);
  line-height: 1.3;
  padding-top: 0.1rem;
  text-align: right;
  flex-shrink: 0;
}
.fiche-row-date.circa {
  font-family: "EB Garamond", serif;
  font-size: 0.78rem;
  font-style: italic;
  color: var(--text-color-subtle);
  font-weight: 400;
}

/* Main body */
.fiche-row-body {
  min-width: 0;
}

.fiche-row-subtitle {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.07em;
  color: var(--text-color-subtle);
  margin-bottom: 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fiche-row-title {
  font-family: "Playfair Display", serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--surface-primary-background);
  line-height: 1.25;
  margin-bottom: 0.4rem;
}
.fiche-row:hover .fiche-row-title {
  color: var(--primary-color);
}

.fiche-row-excerpt {
  font-family: "EB Garamond", serif;
  font-size: 0.93rem;
  line-height: 1.6;
  color: var(--text-color-subtle);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0.6rem;
}

/* Personnages */
.fiche-row-people {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--text-color-subtle);
  margin-bottom: 0.55rem;
}
.fiche-row-people a {
  color: var(--primary-color);
  text-decoration: none;
}
.fiche-row-people a:hover {
  text-decoration: underline;
}

/* Tag pills */
.fiche-row-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: center;
}
.fiche-tag {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  padding: 0.18rem 0.55rem;
  border-radius: 0;
  white-space: nowrap;
}
/* Tag colour by type — matching current site logic */
.fiche-tag.epoque {
  background: var(--surface-primary-background);
  color: var(--background-color);
}
.fiche-tag.theme {
  background: #7a4a1a;
  color: var(--background-color);
}
.fiche-tag.quartier {
  background: #1a4a2a;
  color: var(--background-color);
}
.fiche-tag.lieu {
  background: #3a3a3a;
  color: var(--background-color);
}

/* Address — top right of body */
.fiche-row-addr {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--text-color-subtle);
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-bottom: 0.5rem;
}
.fiche-row-addr::before {
  content: "📍";
  font-size: 0.72rem;
}

/* Thumbnail — right column, optional; collapse when src is empty */
.fiche-row-thumb[src=""] {
  display: none;
}

.fiche-row:has(.fiche-row-thumb[src=""]) {
  grid-template-columns: 72px 1fr;
}

.fiche-row-thumb {
  width: 56px;
  height: 56px;
  object-fit: cover;
  filter: sepia(20%) contrast(1.05);
  border: 1px solid var(--surface-primary-foreground-muted);
  flex-shrink: 0;
  align-self: start;
  margin-top: 0.1rem;
}

/* "Has image" dot indicator when no thumb shown */
.fiche-row-imgdot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--surface-primary-foreground-strong);
  margin-top: 0.55rem;
  justify-self: center;
  title: "Cette fiche contient des images";
}

/* ============ 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);
}

.page-btn {
  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.4rem 0.75rem;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  display: inline-block;
  min-width: 36px;
  text-align: center;
}
.page-btn:hover {
  border-color: var(--secondary-color);
  color: var(--surface-primary-background);
}
.page-btn.active {
  background: var(--surface-primary-background);
  color: var(--background-color);
  border-color: var(--surface-primary-background);
}
.page-btn.nav {
  padding: 0.4rem 1rem;
}
.page-ellipsis {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  color: var(--text-color-subtle);
  padding: 0 0.2rem;
}

/* ============ MAP SECTION ============ */
.map-section {
  background: var(--surface-primary-background);
  padding: 0;
  position: relative;
  overflow: hidden;
}

.map-header {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2.5rem 4rem 2rem;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
}

.map-header-left {
}

.map-eyebrow {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--secondary-color);
  margin-bottom: 0.4rem;
}

.map-title {
  font-family: "Playfair Display", serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--background-color);
  line-height: 1.1;
}

.map-desc {
  font-family: "EB Garamond", serif;
  font-size: 0.95rem;
  font-style: italic;
  color: rgba(245, 240, 232, 0.5);
  margin-top: 0.4rem;
}

.map-btn {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid var(--secondary-color);
  color: var(--secondary-color);
  padding: 0.5rem 1.1rem;
  text-decoration: none;
  transition:
    background 0.2s,
    color 0.2s;
  flex-shrink: 0;
  display: inline-block;
}
.map-btn:hover {
  background: var(--secondary-color);
  color: var(--surface-primary-background);
}

/* Map viewport */
.map-viewport {
  position: relative;
  height: 460px;
  background: #0d1829;
  overflow: hidden;
}

/* Stylised Paris map SVG background */
.map-bg-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.18;
}

/* Seine river decoration */
.map-seine {
  position: absolute;
  top: 52%;
  left: 0;
  right: 0;
  height: 18px;
  background: rgba(44, 74, 110, 0.5);
  transform: rotate(-1.5deg) scaleX(1.1);
  filter: blur(2px);
}

/* Grid overlay */
.map-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(201, 150, 12, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201, 150, 12, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* Arrondissement boundary hints */
.map-arr-hint {
  position: absolute;
  border: 1px solid rgba(201, 150, 12, 0.08);
  border-radius: 2px;
}

/* Map pins container */
.map-pins {
  position: absolute;
  inset: 0;
}

.map-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  cursor: pointer;
  z-index: 2;
}

.map-pin-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary-color);
  border: 2px solid rgba(245, 240, 232, 0.8);
  box-shadow: 0 0 0 0 rgba(184, 40, 28, 0.5);
  animation: pinPulse 2.8s ease-in-out infinite;
  transition:
    transform 0.2s,
    background 0.2s;
}

.map-pin:hover .map-pin-dot {
  transform: scale(1.5);
  background: var(--secondary-color);
}

@keyframes pinPulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(184, 40, 28, 0.5);
  }
  50% {
    box-shadow: 0 0 0 7px rgba(184, 40, 28, 0);
  }
}

.map-pin-label {
  position: absolute;
  bottom: calc(100% + 5px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface-primary-background);
  border: 1px solid rgba(201, 150, 12, 0.3);
  color: var(--background-color);
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  padding: 0.22rem 0.5rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.map-pin:hover .map-pin-label {
  opacity: 1;
}

/* Map legend */
.map-legend {
  position: absolute;
  bottom: 1.25rem;
  right: 1.25rem;
  background: rgba(10, 22, 40, 0.88);
  border: 1px solid rgba(201, 150, 12, 0.2);
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  backdrop-filter: blur(6px);
}

.map-legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.07em;
  color: rgba(245, 240, 232, 0.55);
}

.map-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid rgba(245, 240, 232, 0.6);
  flex-shrink: 0;
}
.map-legend-dot.crimson {
  background: var(--primary-color);
}
.map-legend-dot.gold {
  background: var(--secondary-color);
}

/* Compass rose */
.map-compass {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 40px;
  height: 40px;
  opacity: 0.3;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Map footer bar */
.map-footer-bar {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 1.25rem 4rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  border-top: 1px solid rgba(201, 150, 12, 0.15);
}

.map-footer-stat {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
}
.map-footer-num {
  font-family: "Playfair Display", serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--secondary-color);
}
.map-footer-lbl {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(245, 240, 232, 0.4);
}
.map-footer-divider {
  width: 1px;
  height: 30px;
  background: rgba(201, 150, 12, 0.15);
}


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

/* ============ RESPONSIVE ============ */
/* Show-all button */
.show-all-btn {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid var(--secondary-color);
  color: var(--secondary-color);
  background: none;
  padding: 0.5rem 1.25rem;
  cursor: pointer;
  transition:
    background 0.2s,
    color 0.2s;
}
.show-all-btn:hover {
  background: var(--secondary-color);
  color: var(--background-color);
}

@media (max-width: 900px) {
  .section {
    padding: 3rem 2rem;
  }
  .band-inner {
    padding: 0 2rem;
  }
  .subcat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .map-header {
    padding: 2rem 2rem 1.5rem;
  }
  .map-footer-bar {
    padding: 1rem 2rem;
  }
}

@media (max-width: 600px) {
  .breadcrumb {
    padding: 0.5rem 1.1rem;
    font-size: 0.72rem;
  }
  .section {
    padding: 1.75rem 1.25rem;
  }
  .band {
    padding: 1.5rem 0;
  }
  .band-inner {
    padding: 0 1.25rem;
  }
  .section-header {
    margin-bottom: 0.9rem;
  }
  .section-title {
    margin-bottom: 0.4rem;
  }
  .section-desc {
    margin-top: 0;
  }
  .subcat-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2px;
  }
  .subcat-card {
    min-height: 160px;
  }
  /* Row list on mobile — collapse date into inline */
  .fiche-row {
    grid-template-columns: 52px 1fr 44px;
    gap: 0 0.75rem;
  }
  .fiche-row.no-img {
    grid-template-columns: 52px 1fr;
  }
  .fiche-row-date {
    font-size: 0.78rem;
  }
  .fiche-row-title {
    font-size: 0.92rem;
  }
  .fiche-row-excerpt {
    -webkit-line-clamp: 2;
  }
  .fiche-row-thumb {
    width: 44px;
    height: 44px;
  }
  .filter-bar {
    gap: 0.4rem;
  }
  .map-header {
    padding: 1.75rem 1.25rem 1.25rem;
    flex-direction: column;
    align-items: flex-start;
  }
  .map-viewport {
    height: 300px;
  }
  .map-footer-bar {
    padding: 1rem 1.25rem;
    flex-wrap: wrap;
    gap: 1rem;
  }
  .map-compass {
    display: none;
  }
}
