.surface-hero::after {
  --surface-hero-watermark: "Recherche";
}

/* ============ TOKENS ============ */
:root {
  /* Type accent colors */

  /* Tag semantic colors */
}

/* ============ BREADCRUMB ============ */
.breadcrumb {
  margin-top: 64px;
  background: var(--surface-primary-background);
  border-bottom: 1px solid rgba(201, 150, 12, 0.2);
  padding: 0.6rem 4rem;
  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);
}

/* ============ SEARCH HERO ============ */
.search-hero {
  background: var(--surface-primary-background);
  padding: 2.5rem 4rem 2.8rem;
  position: relative;
  /* overflow stays visible so the absolutely-positioned autocomplete dropdown can
     extend below the hero; z-index lifts the whole hero (and the dropdown) above the
     results section that follows it. The decorative ::before/::after are kept contained. */
  z-index: 20;
}
.search-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 40px,
    rgba(201, 150, 12, 0.02) 40px,
    rgba(201, 150, 12, 0.02) 41px
  );
  pointer-events: none;
}
.search-hero::after {
  content: "🔍";
  position: absolute;
  right: 3rem;
  bottom: 0;
  font-size: 8rem;
  opacity: 0.04;
  pointer-events: none;
  overflow: hidden;
}
.search-hero-inner {
  position: relative;
  z-index: 2;
  max-width: var(--max-w);
  margin: 0 auto;
}

.search-hero-eyebrow {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--secondary-color);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.search-hero-eyebrow::before {
  content: "";
  display: inline-block;
  width: 24px;
  height: 1px;
  background: var(--secondary-color);
}

.search-hero-title {
  font-family: "Playfair Display", serif;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 900;
  font-style: italic;
  color: var(--background-color);
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

/* Search input group */
.search-input-wrap {
  position: relative;
  max-width: 680px;
}
.search-input-group {
  display: flex;
  background: var(--background-color);
  border: 2px solid rgba(201, 150, 12, 0.4);
  transition: border-color 0.2s;
}
.search-input-group:focus-within {
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 3px rgba(201, 150, 12, 0.15);
}

.search-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  flex-shrink: 0;
  color: var(--text-color-subtle);
  font-size: 1.1rem;
}

.search-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: "EB Garamond", serif;
  font-size: 1.15rem;
  color: var(--text-color);
  padding: 0.85rem 0;
}
.search-input::placeholder {
  color: var(--surface-primary-foreground-strong);
  font-style: italic;
}

.search-submit {
  border: none;
  background: var(--surface-primary-background);
  color: var(--background-color);
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0 1.5rem;
  cursor: pointer;
  transition: background 0.15s;
}
.search-submit:hover {
  background: var(--surface-primary-background-muted);
}

.search-clear {
  position: absolute;
  right: 100px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-color-subtle);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.3rem;
  display: none;
}
.search-clear.visible {
  display: block;
}

/* Autocomplete dropdown */
.autocomplete {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--background-color);
  border: 2px solid var(--secondary-color);
  border-top: 1px solid var(--surface-primary-foreground-muted);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.12);
  z-index: 50;
  display: none;
}
.autocomplete.open {
  display: block;
}

.ac-section-label {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-color-subtle);
  padding: 0.6rem 1rem 0.3rem;
  background: var(--background-color-muted);
}

.ac-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 1rem;
  cursor: pointer;
  transition: background 0.1s;
  text-decoration: none;
  color: var(--text-color);
}
.ac-item:hover,
.ac-item.highlighted {
  background: var(--background-color-muted);
}

.ac-type-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.ac-type-dot.personnage {
  background: var(--type-personnage);
}
.ac-type-dot.evenement {
  background: var(--type-evenement);
}
.ac-type-dot.lieu {
  background: var(--type-lieu);
}
.ac-type-dot.adresse {
  background: var(--type-adresse);
}
.ac-type-dot.theme {
  background: var(--type-theme);
}

.ac-text {
  flex: 1;
  font-family: "EB Garamond", serif;
  font-size: 1rem;
  line-height: 1.3;
}
.ac-text strong {
  font-weight: 500;
}
.ac-text .ac-meta {
  display: block;
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  color: var(--text-color-subtle);
  letter-spacing: 0.02em;
}

.ac-type-badge {
  font-family: "Cinzel", serif;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.15rem 0.4rem;
  flex-shrink: 0;
}
.ac-type-badge.personnage {
  background: var(--badge-bg-personnage);
  color: var(--badge-text-personnage);
}
.ac-type-badge.evenement {
  background: var(--badge-bg-evenement);
  color: var(--badge-text-evenement);
}
.ac-type-badge.lieu {
  background: var(--badge-bg-lieu);
  color: var(--badge-text-lieu);
}
.ac-type-badge.adresse {
  background: var(--badge-bg-adresse);
  color: var(--badge-text-adresse);
}
.ac-type-badge.theme {
  background: var(--badge-bg-theme);
  color: var(--badge-text-theme);
}

.ac-footer {
  padding: 0.5rem 1rem;
  background: var(--background-color-muted);
  border-top: 1px solid var(--surface-primary-foreground-muted);
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  color: var(--text-color-subtle);
  text-align: center;
  letter-spacing: 0.06em;
}
.ac-footer a {
  color: var(--primary-color);
  text-decoration: none;
}

/* ============ MAIN LAYOUT ============ */
.search-layout {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 4rem;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2.5rem;
  align-items: start;
  padding-top: 1.5rem;
  padding-bottom: 3rem;
}

/* ============ SIDEBAR ============ */
.sidebar {
  position: sticky;
  top: 80px;
  padding-top: 0.5rem;
}

.sidebar-section {
  margin-bottom: 2rem;
}

.sidebar-title {
  font-family: "Cinzel", serif;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-color-muted);
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--surface-primary-foreground-muted);
  margin-bottom: 0.75rem;
}

.filter-group {
  margin-bottom: 0;
}

.filter-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0;
  cursor: pointer;
  transition: color 0.15s;
  position: relative;
}
.filter-item:hover {
  color: var(--surface-primary-background);
}

.filter-checkbox {
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--surface-primary-foreground-strong);
  background: var(--background-color);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s;
  cursor: pointer;
}
.filter-item.active .filter-checkbox {
  background: var(--surface-primary-background);
  border-color: var(--surface-primary-background);
}
.filter-item.active .filter-checkbox::after {
  content: "✓";
  color: var(--background-color);
  font-size: 0.6rem;
  font-weight: 600;
}

.filter-type-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.filter-label {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.76rem;
  color: var(--text-color);
  flex: 1;
}

.filter-count {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  color: var(--text-color-subtle);
  margin-left: auto;
}

/* Reset filters link */
.filter-reset {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--primary-color);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.75rem;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}
.filter-reset.visible {
  opacity: 1;
  pointer-events: auto;
}
.filter-reset:hover {
  text-decoration: underline;
}

/* Sidebar tip */
.sidebar-tip {
  background: var(--background-color-muted);
  border-left: 3px solid var(--secondary-color);
  padding: 0.85rem 0.9rem;
  font-family: "EB Garamond", serif;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text-color-muted);
}
.sidebar-tip strong {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--secondary-color);
  display: block;
  margin-bottom: 0.35rem;
}

/* ============ RESULTS AREA ============ */
.results-area {
  min-width: 0;
}

/* Results bar */
.results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0 0.85rem;
  border-bottom: 1px solid var(--surface-primary-foreground-muted);
  margin-bottom: 0;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.results-count {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  color: var(--text-color-subtle);
  letter-spacing: 0.02em;
}
.results-count strong {
  color: var(--text-color);
  font-weight: 600;
}

.results-sort {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.results-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;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-color-subtle);
  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;
  border-bottom: 2px solid var(--secondary-color);
}

/* Active filter pills */
.active-filters {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  padding: 0.6rem 0;
  display: none; /* shown when filters active */
}
.active-filters.visible {
  display: flex;
}

.active-filter-label {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-color-subtle);
  margin-right: 0.25rem;
}

.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: var(--surface-primary-background);
  color: var(--background-color);
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  padding: 0.22rem 0.6rem;
  cursor: pointer;
  transition: background 0.15s;
}
.filter-pill:hover {
  background: var(--primary-color);
}
.filter-pill .pill-x {
  font-size: 0.72rem;
  opacity: 0.7;
  margin-left: 0.15rem;
}

/* ============ RESULT ROWS ============ */
.result-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;
  position: relative;
}
.result-row:hover {
  background: var(--background-color-muted);
  margin: 0 -1.5rem;
  padding: 1.25rem 1.5rem 1rem;
}

/* Type accent — left border on hover */
.result-row::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: transparent;
  transition: background 0.15s;
}
.result-row:hover::before {
  left: 0;
}
.result-row.type-personnage:hover::before {
  background: var(--type-personnage);
}
.result-row.type-evenement:hover::before {
  background: var(--type-evenement);
}
.result-row.type-lieu:hover::before {
  background: var(--type-lieu);
}
.result-row.type-adresse:hover::before {
  background: var(--type-adresse);
}
.result-row.type-theme:hover::before {
  background: var(--type-theme);
}

/* Result header: type badge + metadata line */
.result-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.35rem;
  flex-wrap: wrap;
}

.result-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: "Cinzel", serif;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.15rem 0.55rem;
  flex-shrink: 0;
}
.result-type-badge .type-icon {
  font-size: 0.72rem;
}
.result-type-badge.personnage {
  background: var(--badge-bg-personnage);
  color: var(--badge-text-personnage);
}
.result-type-badge.evenement {
  background: var(--badge-bg-evenement);
  color: var(--badge-text-evenement);
}
.result-type-badge.lieu {
  background: var(--badge-bg-lieu);
  color: var(--badge-text-lieu);
}
.result-type-badge.adresse {
  background: var(--badge-bg-adresse);
  color: var(--badge-text-adresse);
}
.result-type-badge.theme {
  background: var(--badge-bg-theme);
  color: var(--badge-text-theme);
}

.result-meta-inline {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  color: var(--text-color-subtle);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.result-meta-sep {
  color: var(--surface-primary-foreground-muted);
}

/* Address on right */
.result-addr {
  margin-left: auto;
  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;
}
.result-addr::before {
  content: "📍 ";
  font-style: normal;
}

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

/* Excerpt with highlights */
.result-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.55rem;
}
.result-excerpt mark {
  background: rgba(201, 150, 12, 0.2);
  color: var(--text-color);
  padding: 0.05em 0.15em;
  font-weight: 500;
}

/* Tags row */
.result-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 0.4rem;
}
/* Tags — canonical spec from parisrev-fiche-row-v3 */
.fiche-tag {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0 0.45rem;
  height: 18px;
  line-height: 18px;
  border-radius: 0;
  white-space: nowrap;
  text-decoration: none;
  display: inline-block;
  font-weight: 600;
  transition: opacity 0.15s;
}
.fiche-tag:hover { opacity: 0.75; }
.fiche-tag.epoque   { background: rgba(26,42,66,0.22);   color: #0F1A2C; font-weight: 600; }
.fiche-tag.theme    { background: rgba(107,58,16,0.18);  color: #4A2208; font-weight: 500; }
.fiche-tag.arr,
.fiche-tag.arrond   { background: rgba(160,120,20,0.18); color: #3A2E06; 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; }
.fiche-tag.date     { background: rgba(107,101,96,0.10); color: #6b6560; font-weight: 500; }

/* Read more */
.result-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);
  transition: color 0.15s;
}
.result-row:hover .result-readmore {
  color: var(--primary-color);
}
.result-readmore::after {
  content: " →";
  font-size: 0.8rem;
}

/* ============ NO RESULTS STATE ============ */
.no-results {
  text-align: center;
  padding: 4rem 2rem;
}
.no-results-icon {
  font-size: 3rem;
  opacity: 0.3;
  margin-bottom: 1rem;
}
.no-results h2 {
  font-family: "Playfair Display", serif;
  font-size: 1.3rem;
  color: var(--surface-primary-background);
  margin-bottom: 0.5rem;
}
.no-results p {
  color: var(--text-color-subtle);
  font-size: 1rem;
}

/* ============ PAGINATION ============ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--surface-primary-foreground-muted);
  margin-top: 0.5rem;
}
.page-btn {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.7rem;
  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.7rem;
  color: var(--text-color-subtle);
  padding: 0 0.2rem;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
  .search-layout {
    grid-template-columns: 200px 1fr;
    gap: 2rem;
    padding: 0 2.5rem;
    padding-top: 1.5rem;
    padding-bottom: 3rem;
  }
  .search-hero {
    padding: 2rem 2.5rem 2.4rem;
  }
}

@media (max-width: 860px) {
  .search-layout {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 0 2rem;
    padding-top: 1rem;
    padding-bottom: 2rem;
  }
  .sidebar {
    position: static;
    border-bottom: 1px solid var(--surface-primary-foreground-muted);
    padding-bottom: 1rem;
    margin-bottom: 0.5rem;
  }
  .filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1rem;
  }
  .search-hero {
    padding: 2rem 2rem;
  }
}

@media (max-width: 600px) {
  .breadcrumb {
    padding: 0.5rem 1.1rem;
    font-size: 0.72rem;
  }
  .search-hero {
    padding: 1.5rem 1.25rem 1.8rem;
  }
  .search-hero-title {
    font-size: 1.6rem;
  }
  .search-layout {
    padding: 0 1.25rem;
    padding-top: 1rem;
    padding-bottom: 2rem;
  }
  .result-row:hover {
    margin: 0 -1rem;
    padding: 1.25rem 1rem 1rem;
  }
  .result-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }
  .result-addr {
    margin-left: 0;
  }
}
