/* ============ TOKENS ============ */
:root {
  --secondary-color-dark: #8a6b08;
}

/* ============ HEADER ============ */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--surface-primary-background);
  border-bottom: 2px solid var(--secondary-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2.5rem;
  height: var(--header-h);
}
.logo-text {
  font-family: "Cinzel", serif;
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  color: var(--background-color);
  line-height: 1.2;
}
.logo-text span {
  display: block;
  font-size: 0.62rem;
  color: var(--secondary-color-strong);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
nav {
  display: flex;
  align-items: center;
  gap: 0.2rem;
}
nav a {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(245, 240, 232, 0.7);
  text-decoration: none;
  padding: 0.4rem 0.7rem;
  transition: color 0.2s;
  position: relative;
}
nav a.active {
  color: var(--secondary-color-strong);
}
nav a:hover {
  color: var(--secondary-color-strong);
}
.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;
  text-decoration: none;
}

/* ============ DEMO SWITCHER ============ */
.demo-switcher {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  z-index: 90;
  background: var(--text-color-strong);
  border-bottom: 1px solid rgba(201, 150, 12, 0.25);
  display: flex;
  align-items: center;
  padding: 0 2.5rem;
  height: 46px;
  gap: 0;
}
.demo-label {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(245, 240, 232, 0.3);
  margin-right: 1.5rem;
  white-space: nowrap;
}
.demo-tab {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: rgba(245, 240, 232, 0.45);
  padding: 0.7rem 1.2rem;
  cursor: pointer;
  border: none;
  background: none;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}
.demo-tab:hover {
  color: var(--background-color);
}
.demo-tab.active {
  color: var(--secondary-color-strong);
  border-bottom-color: var(--secondary-color);
}

/* ============ BREADCRUMB ============ */
.breadcrumb {
  margin-top: 110px;
  background: var(--surface-primary-background);
  border-bottom: 1px solid rgba(201, 150, 12, 0.2);
  /* Aligne le fil d'Ariane sur le contenu du hero (.street-hero-inner = max-w centré) :
     bord gauche = max(4rem, (viewport - max-w)/2), identique au conteneur centré. */
  padding: 0.6rem max(4rem, calc((100% - var(--max-w)) / 2));
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  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);
}

/* ============ STREET HERO ============ */
.street-hero {
  background: var(--surface-primary-background);
  padding: 0 4rem 3rem;
  position: relative;
  overflow: hidden;
}
.street-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 40px,
    rgba(201, 150, 12, 0.025) 40px,
    rgba(201, 150, 12, 0.025) 41px
  );
  pointer-events: none;
}
/* Hero avec photo de fond (même schéma que .surface-hero-bg des pages sœurs).
   La photo vedette est reprise complète dans la galerie Iconographie. */
.street-hero--img::before {
  display: none; /* pas de hachures sous la photo */
}
.street-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  filter: sepia(35%) contrast(1.05) brightness(0.62);
  z-index: 0;
}
.street-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(
      to right,
      var(--surface-primary-background) 0%,
      color-mix(in srgb, var(--surface-primary-background) 78%, transparent) 48%,
      color-mix(in srgb, var(--surface-primary-background) 28%, transparent) 100%
    ),
    linear-gradient(
      to top,
      var(--surface-primary-background) 0%,
      transparent 55%
    );
}
.street-hero-inner {
  position: relative;
  z-index: 2;
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2rem;
  align-items: end;
  padding-top: 2.5rem;
}
.street-hero-badge-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  padding-bottom: 0.4rem;
}
.street-type-icon {
  width: 52px;
  height: 52px;
  border: 2px solid rgba(201, 150, 12, 0.35);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: var(--secondary-color);
  background: rgba(201, 150, 12, 0.06);
}
.street-arr-badge {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--secondary-color-strong);
  text-align: center;
  line-height: 1.2;
}
.street-hero-meta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.street-hero-eyebrow {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(245, 240, 232, 0.45);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.street-hero-eyebrow::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 1px;
  background: var(--secondary-color);
  flex-shrink: 0;
}
.street-hero-title {
  font-family: "Playfair Display", serif;
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 900;
  color: var(--background-color);
  line-height: 1.1;
}
.street-hero-subtitle {
  font-family: "EB Garamond", serif;
  font-size: 1.05rem;
  font-style: italic;
  color: rgba(245, 240, 232, 0.55);
  line-height: 1.4;
}
.street-hero-fromto {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  color: rgba(245, 240, 232, 0.5);
  line-height: 1.4;
}
.street-hero-fromto em {
  color: rgba(245, 240, 232, 0.7);
  font-style: normal;
}
.street-hero-stats {
  display: flex;
  gap: 2rem;
  margin-top: 0.8rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(201, 150, 12, 0.15);
}
.street-stat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.street-stat-num {
  font-family: "Playfair Display", serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--secondary-color);
  line-height: 1;
}
.street-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.4);
  margin-top: 0.15rem;
}
.cross-arr-note {
  margin-top: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  color: rgba(245, 240, 232, 0.5);
}
.cross-arr-note a {
  color: var(--secondary-color-strong);
  text-decoration: none;
}
.cross-arr-note a:hover {
  text-decoration: underline;
}

/* ============ PAGE BODY ============ */
.page-body {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 4rem;
}
.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);
}

/* ============ TOPONYMIE ============ */
.toponymie-content {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2.5rem;
  align-items: start;
  padding-top: 0.5rem;
}
.toponymie-text {
  font-family: "EB Garamond", serif;
  font-size: 1.08rem;
  line-height: 1.75;
  color: var(--text-color);
  max-width: 740px;
}
.toponymie-text p {
  margin-bottom: 1rem;
}
.toponymie-text p:last-child {
  margin-bottom: 0;
}
/* Sous-titres DANS le corps de la notice (les ## du markdown). Bien plus discrets que
   le titre de section « Histoire de la rue » — un intertitre, pas un titre de page. */
.toponymie-text h2 {
  font-family: "EB Garamond", serif;
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.3;
  margin: 1.75rem 0 0.5rem;
  color: var(--text-color);
}
.toponymie-text h2:first-child {
  margin-top: 0;
}
.toponymie-text h3 {
  font-family: "EB Garamond", serif;
  font-size: 1.12rem;
  font-weight: 600;
  line-height: 1.35;
  margin: 1.3rem 0 0.4rem;
  color: var(--text-color);
}
/* « Lire la suite » : replie une longue notice (desktop + mobile). L'état replié
   n'est posé par JS que si le texte dépasse ; sans JS le texte reste entier (le
   bouton est masqué par défaut via [hidden]). Le contenu reste dans le DOM (max-height
   + overflow, jamais display:none) → toujours lu par Pagefind. */
.histoire-collapse.is-collapsed .toponymie-text {
  max-height: 19rem;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, #000 68%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 68%, transparent 100%);
}
.histoire-more {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.85rem;
  padding: 0.5rem 1.05rem;
  border: 1px solid var(--surface-primary-foreground-muted);
  border-radius: 999px;
  background: transparent;
  color: var(--text-color);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}
.histoire-more:hover {
  background: var(--background-color-muted);
}
.histoire-more-chev {
  font-size: 0.78rem;
  line-height: 1;
}
/* (Source attribution uses .contrib-cta-source — see contribution section) */
.name-timeline {
  background: var(--background-color-muted);
  border: 1px solid var(--surface-primary-foreground-muted);
  padding: 1.25rem 1.5rem;
}
/* Frise « Évolution » en section autonome (pleine largeur) : cadrée sur la
   colonne de texte pour ne pas s'étaler en bloc trop large. */
.name-timeline--section {
  max-width: 740px;
}
/* — Évolution : distinction Nom / Tracé — */
/* Entrée « tracé » (percement, prolongement, coupure, absorption…) :
   filet doré dans la gouttière gauche. */
.name-entry--trace {
  border-left: 2px solid var(--secondary-color);
  padding-left: 0.85rem;
  margin-left: -0.85rem;
}
/* Micro-étiquette de type, devant l'intitulé de l'entrée. */
.name-entry-kind {
  display: inline-block;
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.1rem 0.4rem;
  margin-right: 0.5rem;
  border-radius: 2px;
  vertical-align: 0.1em;
  background: var(--surface-primary-foreground-muted);
  color: var(--text-color-subtle);
}
.name-entry-kind--trace {
  background: var(--secondary-color);
  color: var(--surface-primary-background);
}
.name-timeline-title {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-color-subtle);
  margin-bottom: 1rem;
}
.name-entry {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 0.6rem 0;
  border-top: 1px solid var(--surface-primary-foreground-muted);
}
.name-entry:first-of-type {
  border-top: none;
  padding-top: 0;
}
.name-entry-date {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--surface-primary-background);
  min-width: 65px;
  flex-shrink: 0;
}
.name-entry-info {
  font-family: "EB Garamond", serif;
  font-size: 0.92rem;
  line-height: 1.4;
  color: var(--text-color);
}
.name-entry-current {
  font-weight: 500;
  color: var(--surface-primary-background);
}
.name-entry-reason {
  display: block;
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  color: var(--text-color-subtle);
  margin-top: 0.15rem;
}

/* ============ CARTE D'IDENTITÉ DE LA VOIE ============ */
/* Bandeau factuel pleine largeur — l'ancre de la page (toujours rempli,
   issu de l'open data « dénominations »). Theme-aware via les tokens. */
.street-idcard {
  background: var(--surface-primary-foreground);
  border: 1px solid var(--surface-primary-foreground-strong);
  padding: 1.1rem 1.4rem;
  margin: 1.75rem 0 0.5rem;
}
.street-idcard-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
}
.street-idcard-title {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-color-subtle);
}
.street-idcard-tag {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-color-subtle);
  border: 1px solid var(--surface-primary-foreground-strong);
  border-radius: 99px;
  padding: 0.1rem 0.6rem;
  flex-shrink: 0;
}
.street-idcard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem 2rem;
  margin: 0;
}
.street-idcard-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px dotted var(--surface-primary-foreground-strong);
  padding-bottom: 0.4rem;
}
.street-idcard-row--full {
  grid-column: 1 / -1;
}
.street-idcard-row dt {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.78rem;
  color: var(--text-color-subtle);
  margin: 0;
  flex-shrink: 0;
}
.street-idcard-row dd {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.82rem;
  color: var(--text-color);
  margin: 0;
  text-align: right;
}
@media (max-width: 768px) {
  .street-idcard-grid {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }
}

/* ====== MISE EN PAGE VOIE (POC) : contenu principal + infobox carte d'identité ====== */
/* La carte d'identité passe en infobox de colonne droite (façon encyclopédie) :
   comble le vide à droite, borne le « box » à 320px, aligne le contenu à gauche. */
.voie-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 2.5rem;
  align-items: start;
}
.voie-main {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
}
.voie-aside {
  grid-column: 2;
  grid-row: 1;
  position: sticky;
  top: 110px;
}
.voie-aside .street-idcard {
  margin: 0;
}
.voie-aside .street-idcard-grid {
  grid-template-columns: 1fr;
  gap: 0.55rem;
}
/* Colonne étroite → label au-dessus de la valeur (lecture infobox). */
.voie-aside .street-idcard-row {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
}
.voie-aside .street-idcard-row dd {
  text-align: left;
}
/* Frise « Évolution » en bloc d'infobox sous la carte d'identité. */
.voie-aside .name-timeline {
  margin-top: 1.5rem;
}
.voie-aside-people {
  margin-top: 1.5rem;
}
.voie-mobile-toggle {
  display: none;
}
@media (max-width: 960px) {
  .voie-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  /* Annule le placement explicite → empilement naturel (infobox en tête). */
  .voie-main,
  .voie-aside {
    grid-column: 1;
    grid-row: auto;
  }
  .voie-aside {
    position: static;
  }
  /* Repli mobile : « Voir tout » masque l'infobox + histoire/évolution, pour que
     iconographie / carte / fiches restent à portée. */
  .voie-mobile-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    margin: 0 0 1.25rem;
    padding: 0.8rem 1rem;
    background: var(--surface-primary-foreground);
    border: 1px solid var(--surface-primary-foreground-strong);
    font-family: "Source Sans 3", sans-serif;
    cursor: pointer;
    text-align: left;
  }
  .voie-mobile-toggle-label {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--surface-primary-background);
  }
  .voie-mobile-toggle-action {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    color: var(--secondary-color-strong);
    white-space: nowrap;
  }
  .voie-layout:not(.ref-open) .voie-aside,
  .voie-layout:not(.ref-open) .voie-ref {
    display: none;
  }
}

/* ============ BLOC RÉFÉRENCE REPLIABLE (mobile) ============ */
/* Desktop : tout visible, pas de bouton. Mobile : histoire + carte d'identité
   + évolution repliées derrière un seul « Voir tout », pour que les fiches
   (cible du visiteur) restent à portée. */
.street-reference-toggle {
  display: none;
}
@media (max-width: 768px) {
  .street-reference-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    margin: 1.1rem 0 0.25rem;
    padding: 0.8rem 1rem;
    background: var(--surface-primary-foreground);
    border: 1px solid var(--surface-primary-foreground-strong);
    font-family: "Source Sans 3", sans-serif;
    cursor: pointer;
    text-align: left;
  }
  .street-reference-toggle-label {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--surface-primary-background);
  }
  .street-reference-toggle-action {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    color: var(--secondary-color-strong);
    white-space: nowrap;
  }
  .street-reference {
    display: none;
  }
  .street-reference.expanded {
    display: block;
  }
}

/* ============ ICONOGRAPHIE (galerie) ============ */
.icono-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-top: 0.5rem;
}
.icono-tile {
  position: relative;
  margin: 0;
  padding: 0;
  display: block;
  text-align: left;
  border: 1px solid var(--surface-primary-foreground-strong);
  background: var(--background-color-muted);
  overflow: hidden;
  cursor: pointer;
}
.icono-tile img {
  display: block;
  width: 100%;
  height: 180px;
  object-fit: cover;
  filter: sepia(12%);
  transition: transform 0.3s ease;
}
.icono-tile:hover img {
  transform: scale(1.04);
}
.icono-tile figcaption {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  color: var(--text-color);
  line-height: 1.35;
  padding: 0.5rem 0.6rem 0.6rem;
}
.icono-kind {
  display: block;
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--secondary-color-dark);
  margin-bottom: 0.1rem;
}
.icono-credit {
  display: block;
  font-size: 0.66rem;
  color: var(--text-color-subtle);
  margin-top: 0.15rem;
}
.icono-tile--more {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  min-height: 180px;
}
.icono-more-count {
  font-family: "Playfair Display", serif;
  font-size: 1.6rem;
  color: var(--surface-primary-background);
}
.icono-more-label {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-color-subtle);
}
.icono-note {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  color: var(--text-color-subtle);
  margin-top: 0.6rem;
}
@media (max-width: 768px) {
  /* Galerie en bande horizontale swipeable : un seul étage, on fait défiler. */
  .icono-gallery {
    display: flex;
    grid-template-columns: none;
    overflow-x: auto;
    gap: 0.6rem;
    padding-bottom: 0.4rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }
  .icono-tile {
    flex: 0 0 64%;
    scroll-snap-align: start;
  }
  .icono-tile img {
    height: 150px;
  }
  .icono-tile--more {
    flex: 0 0 40%;
    min-height: 0;
  }
}

/* ============ SUR CETTE VOIE (relationnel) ============ */
.onvoie {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
  padding-top: 0.5rem;
}
.onvoie-label {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-color-subtle);
  margin-bottom: 0.7rem;
}
/* Frise-jauge des époques : hauteur fixe, segments proportionnels — ne
   s'allonge jamais, quel que soit le nombre d'époques. */
.epoque-gauge {
  display: flex;
  gap: 2px;
  height: 12px;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 0.45rem;
}
.epoque-seg {
  background: var(--surface-primary-background-muted);
}
.epoque-seg--accent {
  background: var(--surface-primary-background);
}
.epoque-seg--gold {
  background: var(--secondary-color);
}
.epoque-seg--muted {
  background: var(--text-color-subtle);
}
.epoque-gauge-labels {
  display: flex;
  justify-content: space-between;
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.62rem;
  letter-spacing: 0.02em;
  color: var(--text-color-subtle);
}
.onvoie-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.onvoie-tag {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.78rem;
  color: var(--surface-primary-background);
  background: var(--surface-primary-foreground);
  border: 1px solid var(--surface-primary-foreground-strong);
  border-radius: 99px;
  padding: 0.25rem 0.75rem;
  text-decoration: none;
  transition: background 0.15s;
}
.onvoie-tag:hover {
  background: var(--surface-primary-foreground-muted);
}

/* ============ SOURCES (typées) ============ */
.sources-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-top: 0.25rem;
  max-width: 740px;
}
.source-item {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  flex-wrap: wrap;
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.85rem;
  color: var(--text-color);
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--surface-primary-foreground-muted);
}
.source-type {
  flex-shrink: 0;
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.12rem 0.5rem;
  border-radius: 2px;
  background: var(--surface-primary-foreground-muted);
  color: var(--text-color-subtle);
}
.source-type--data {
  background: var(--secondary-color);
  color: var(--surface-primary-background);
}
.source-type--text {
  background: var(--surface-primary-background);
  color: var(--background-color);
}
.source-ref {
  flex: 1;
  min-width: 200px;
}
.source-ref a {
  color: var(--surface-primary-background);
}
.source-lic {
  font-size: 0.72rem;
  color: var(--text-color-subtle);
  font-style: italic;
}
@media (max-width: 768px) {
  .onvoie {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* ============ STREET MAP (Mapbox GL placeholder) ============ */
.street-map-section {
  margin: 2rem 0 1.5rem;
  position: relative;
}
.street-map-container {
  position: relative;
  height: 320px;
  background: #e2d9c8;
  border: 1px solid var(--surface-primary-foreground-muted);
  overflow: hidden;
}
.mapbox-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(rgba(226, 217, 200, 0.6), rgba(226, 217, 200, 0.6)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='800' height='320'%3E%3Crect width='800' height='320' fill='%23E2D9C8'/%3E%3Cline x1='80' y1='0' x2='80' y2='320' stroke='%23C8BFA8' stroke-width='8'/%3E%3Cline x1='0' y1='160' x2='800' y2='162' stroke='%231A2A42' stroke-width='6' opacity='0.4'/%3E%3Cline x1='350' y1='0' x2='355' y2='320' stroke='%23C8BFA8' stroke-width='5'/%3E%3Cline x1='620' y1='0' x2='620' y2='320' stroke='%23C8BFA8' stroke-width='5'/%3E%3Cline x1='0' y1='10' x2='800' y2='10' stroke='%23C8BFA8' stroke-width='7'/%3E%3Crect x='85' y='15' width='260' height='140' fill='%23DDD5C4' stroke='%23C8BFA8' stroke-width='0.5'/%3E%3Crect x='360' y='15' width='255' height='140' fill='%23DDD5C4' stroke='%23C8BFA8' stroke-width='0.5'/%3E%3Crect x='85' y='170' width='260' height='150' fill='%23DDD5C4' stroke='%23C8BFA8' stroke-width='0.5'/%3E%3Crect x='360' y='175' width='255' height='145' fill='%23DDD5C4' stroke='%23C8BFA8' stroke-width='0.5'/%3E%3C/svg%3E");
  background-size: cover;
}
.mapbox-placeholder-inner {
  background: rgba(245, 240, 232, 0.92);
  border: 1px solid var(--surface-primary-foreground-muted);
  padding: 1.25rem 2rem;
  text-align: center;
  max-width: 360px;
}
.mapbox-placeholder-icon {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  opacity: 0.5;
}
.mapbox-placeholder-title {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--surface-primary-background);
  margin-bottom: 0.3rem;
}
.mapbox-placeholder-text {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  color: var(--text-color-subtle);
  line-height: 1.5;
}
.mapbox-placeholder-text code {
  background: var(--surface-primary-foreground-muted);
  padding: 0.1rem 0.3rem;
  font-size: 0.72rem;
  font-family: monospace;
}
.street-map-legend {
  display: flex;
  gap: 1rem;
  padding: 0.6rem 0;
  flex-wrap: wrap;
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  color: var(--text-color-subtle);
}
.map-legend-item {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.map-legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}
.map-legend-dot.multi {
  background: var(--primary-color);
}
.map-legend-dot.lieu {
  background: var(--surface-primary-background-muted);
}
.map-legend-dot.single {
  background: var(--surface-primary-background);
}
.map-legend-dot.highlight {
  background: var(--primary-color);
  border: 2px solid var(--secondary-color);
}

/* ============ ACTION BAR — share + error (site-wide) ============ */
.action-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--surface-primary-foreground-muted);
  margin-bottom: 1.5rem;
}
.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-color-muted);
  background: none;
  border: 1px solid var(--surface-primary-foreground-muted);
  padding: 0.35rem 0.7rem;
  cursor: pointer;
  transition: all 0.15s;
}
.action-btn:hover {
  border-color: var(--surface-primary-background-muted);
  color: var(--surface-primary-background);
}
.action-btn svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
}
.action-sep {
  width: 1px;
  height: 18px;
  background: var(--surface-primary-foreground-muted);
}
.share-dropdown {
  position: relative;
}
.share-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--background-color);
  border: 1px solid var(--surface-primary-foreground-muted);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  z-index: 50;
  min-width: 160px;
  margin-top: 0.25rem;
}
.share-menu.show {
  display: block;
}
.share-menu a {
  display: block;
  padding: 0.5rem 0.85rem;
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  color: var(--text-color-muted);
  text-decoration: none;
  transition: background 0.15s;
}
.share-menu a:hover {
  background: var(--background-color-muted);
  color: var(--surface-primary-background);
}

/* ============ CONTEXTUAL CONTRIBUTION CTA ============ */
.contrib-cta {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: var(--surface-primary-foreground);
  border-left: 3px solid var(--secondary-color);
  padding: 0.85rem 1.15rem;
  margin-bottom: 1.5rem;
}
.contrib-cta-icon {
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 0.05rem;
}
.contrib-cta-text {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  color: var(--text-color-muted);
  line-height: 1.55;
  flex: 1;
}
.contrib-cta-text a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}
.contrib-cta-text a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}
.contrib-cta-source {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  color: var(--text-color-subtle);
  margin-top: 0.25rem;
}
.contrib-cta-source a {
  color: var(--surface-primary-background-muted);
  text-decoration: none;
  font-weight: 500;
}
.contrib-cta-source a:hover {
  text-decoration: underline;
}

/* ============ CONTRIBUTION FOOTER STRIP (site-wide) ============ */
.contrib-strip {
  background: var(--surface-primary-foreground);
  border-top: 1px solid var(--surface-primary-foreground-strong);
  border-bottom: 1px solid var(--surface-primary-foreground-strong);
  padding: 1rem 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}
.contrib-strip-text {
  font-family: "EB Garamond", serif;
  font-size: 1rem;
  font-style: italic;
  color: var(--text-color-muted);
}
.contrib-strip-links {
  display: flex;
  gap: 1rem;
  align-items: center;
}
.contrib-strip-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--surface-primary-background);
  text-decoration: none;
  transition: color 0.15s;
}
.contrib-strip-link:hover {
  color: var(--primary-color);
}
.contrib-strip-link svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
}
.contrib-strip-sep {
  width: 1px;
  height: 14px;
  background: var(--surface-primary-foreground-strong);
}

/* ============ SORT BAR ============ */
.sort-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  border-bottom: 1px solid var(--surface-primary-foreground-muted);
  margin-bottom: 0.5rem;
}
.sort-bar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.sort-toggle {
  display: flex;
  border: 1px solid var(--surface-primary-foreground-muted);
  background: var(--background-color-muted);
}
.sort-btn {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  padding: 0.4rem 0.85rem;
  border: none;
  background: none;
  color: var(--text-color-subtle);
  cursor: pointer;
  transition: all 0.2s;
}
.sort-btn.active {
  background: var(--surface-primary-background);
  color: var(--background-color);
}
.sort-btn:hover:not(.active) {
  background: var(--surface-primary-foreground-muted);
}
.filter-pills {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.filter-pill {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  padding: 0.3rem 0.65rem;
  border: 1px solid var(--surface-primary-foreground-muted);
  background: var(--background-color);
  color: var(--text-color-muted);
  cursor: pointer;
  transition: all 0.18s;
}
.filter-pill:hover {
  border-color: var(--secondary-color);
}
.filter-pill.active {
  background: var(--surface-primary-background);
  color: var(--background-color);
  border-color: var(--surface-primary-background);
}
.sort-bar-right {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  color: var(--text-color-subtle);
}

/* ============ PAGE LAYOUT ============ */
.page-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 3rem;
  align-items: start;
}
.page-main {
  min-width: 0;
}
.page-sidebar {
  position: sticky;
  top: 120px;
  padding-top: 1rem;
}

/* ============ ADDRESS GROUP ============ */
.address-group {
  margin-bottom: 0;
}
.address-group-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 0 0.75rem;
  border-top: 3px solid var(--surface-primary-background);
  margin-top: 2rem;
}
.address-group:first-child .address-group-header {
  margin-top: 0.5rem;
}
.address-group-number {
  font-family: "Playfair Display", serif;
  font-size: 2rem;
  font-weight: 900;
  color: var(--surface-primary-background);
  min-width: 56px;
  text-align: right;
  line-height: 1;
}
.address-group-info {
  flex: 1;
  min-width: 0;
}
.address-group-name {
  font-family: "Playfair Display", serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--surface-primary-background);
}
.address-group-lieu {
  font-family: "EB Garamond", serif;
  font-size: 0.88rem;
  font-style: italic;
  color: var(--secondary-color-dark);
}
.address-group-count {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-color-subtle);
}
.address-group-link {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--surface-primary-background-muted);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
  transition: color 0.15s;
}
.address-group-link:hover {
  color: var(--primary-color);
}
.address-group-link svg {
  width: 12px;
  height: 12px;
}

/* ============================================================
   FICHE ROW — inherited from the shared canonical component in
   css/style.css (.fr / .fr--embed / .fr--embed-adresse). The voie
   list renders in EMBED mode, grouped by address (.address-group,
   above), exactly like the address fiche. No local .fr overrides
   here — that stale copy diverged from the canon and was removed
   (Session I, 2026-07-17) so the rows match the other pages.
   ============================================================ */

/* ============ SIDEBAR ============ */
.sidebar-block {
  margin-bottom: 1.5rem;
}
.sidebar-block-title {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-color-subtle);
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--surface-primary-foreground-muted);
  margin-bottom: 0.75rem;
}
.sidebar-person {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0;
  text-decoration: none;
}
.sidebar-person:hover .sidebar-person-name {
  color: var(--primary-color);
}
.sidebar-person-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--surface-primary-foreground);
  border: 1px solid var(--surface-primary-foreground-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Playfair Display", serif;
  font-size: 0.72rem;
  color: var(--text-color-subtle);
  flex-shrink: 0;
}
.sidebar-person-info {
  flex: 1;
  min-width: 0;
}
.sidebar-person-name {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  color: var(--surface-primary-background);
  font-weight: 600;
  line-height: 1.2;
  transition: color 0.15s;
}
.sidebar-person-role {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  color: var(--text-color-subtle);
  line-height: 1.2;
}
.sidebar-person-count {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  color: var(--text-color-subtle);
  flex-shrink: 0;
}
.sidebar-street {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0;
  text-decoration: none;
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  color: var(--surface-primary-background);
  transition: color 0.15s;
}
.sidebar-street:hover {
  color: var(--primary-color);
}
.sidebar-street-count {
  font-size: 0.72rem;
  color: var(--text-color-subtle);
  margin-left: auto;
}
.sidebar-quartier-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  padding: 0.8rem 1rem;
  background: var(--surface-primary-foreground);
  border: 1px solid var(--surface-primary-foreground-strong);
  transition: background 0.2s;
}
.sidebar-quartier-link:hover {
  background: var(--surface-primary-foreground-muted);
}
.sidebar-quartier-icon {
  font-size: 1.1rem;
}
.sidebar-quartier-text {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  color: var(--text-color-muted);
  line-height: 1.3;
}
.sidebar-quartier-text strong {
  display: block;
  color: var(--surface-primary-background);
  margin-bottom: 0.1rem;
  font-size: 0.72rem;
}

/* ============ SPARSE NOTICE ============ */
.sparse-notice {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  background: rgba(201, 150, 12, 0.06);
  border-left: 3px solid var(--secondary-color);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}
.sparse-notice-icon {
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}
.sparse-notice-text {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  color: var(--text-color-muted);
  line-height: 1.55;
}
.sparse-notice-text strong {
  color: var(--surface-primary-background);
}

/* ============ FICHE NAV ============ */
.fiche-nav {
  background: var(--surface-primary-background);
  border-top: 1px solid rgba(201, 150, 12, 0.12);
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.fiche-nav-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 4rem;
  text-decoration: none;
  transition: background 0.18s;
}
.fiche-nav-item:hover {
  background: rgba(201, 150, 12, 0.05);
}
.fiche-nav-item + .fiche-nav-item {
  border-left: 1px solid rgba(201, 150, 12, 0.12);
  justify-content: flex-end;
  text-align: right;
}
.fiche-nav-dir {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-color-subtle);
  display: block;
  margin-bottom: 0.2rem;
}
.fiche-nav-title {
  font-family: "Playfair Display", serif;
  font-size: 0.88rem;
  color: var(--background-color);
  display: block;
  line-height: 1.3;
}
.fiche-nav-arrow {
  font-size: 1.1rem;
  color: var(--secondary-color);
  flex-shrink: 0;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 960px) {
  .page-layout {
    grid-template-columns: 1fr;
  }
  .page-sidebar {
    position: static;
    padding-top: 0;
    border-top: 1px solid var(--surface-primary-foreground-muted);
    margin-top: 2rem;
    padding-top: 1.5rem;
  }
  .toponymie-content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .breadcrumb {
    padding: 0.5rem 1.5rem;
    font-size: 0.72rem;
  }
  .street-hero {
    padding: 0 1.25rem 1.25rem;
  }
  .street-hero-inner {
    grid-template-columns: 1fr;
    gap: 0.4rem;
    padding-top: 1rem;
  }
  .street-hero-badge-col {
    flex-direction: row;
    gap: 0.7rem;
    align-items: center;
  }
  .street-hero-title {
    font-size: 1.4rem;
  }
  .street-hero-subtitle {
    font-size: 0.95rem;
  }
  .street-hero-stats {
    gap: 1rem;
    margin-top: 0.5rem;
    padding-top: 0.6rem;
    flex-wrap: wrap;
  }
  .street-stat-num {
    font-size: 1.15rem;
  }
  /* doublon avec la carte d'identité → masqué sur mobile */
  .street-hero-fromto {
    display: none;
  }
  /* Barre de tri/filtres : empilée et lisible sur mobile */
  .sort-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
  .sort-bar-left {
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
    width: 100%;
  }
  .sort-toggle {
    width: 100%;
  }
  .sort-btn {
    flex: 1;
    text-align: center;
  }
  /* compteur redondant avec l'en-tête « 14 fiches · 6 adresses » */
  .sort-bar-right {
    display: none;
  }
  .page-body {
    padding: 0 1.5rem;
  }
  .fiche-nav-item {
    padding: 1rem 1.5rem;
  }
  .street-map-container {
    height: 220px;
  }
  .contrib-strip {
    padding: 0.85rem 1.5rem;
    gap: 0.75rem;
    flex-direction: column;
    text-align: center;
  }
  .address-group-number {
    font-size: 1.6rem;
    min-width: 42px;
  }
  header {
    padding: 0 1.5rem;
  }
  nav {
    display: none;
  }
  .street-hero-eyebrow {
    font-size: 0.72rem;
  }
  .street-stat-label {
    font-size: 0.72rem;
    color: rgba(245, 240, 232, 0.5);
  }
}

/* ============ FICHE PAGE (demo wrapper) ============ */
.fiche-page {
  display: none;
}
.fiche-page.active {
  display: block;
}
