/* Result-first layout. All filters retain their original controls and URLs. */
.intro { padding: 24px 0 18px; }
.intro h1 { font-size: clamp(28px, 2.8vw, 39px); }
.intro h1 br { display: none; }
.intro h1 span::before { content: ' '; }
.intro p:not(.eyebrow) { margin-top: 8px; }
#results { scroll-margin-top: 100px; }
.section-head { margin: 20px 0 12px; }
.section-head h2 { font-size: 23px; }
.section-head .eyebrow { margin-bottom: 4px; }
.filters.primary-filters { grid-template-columns: minmax(0, 2fr) minmax(100px, 1fr) auto; align-items: end; margin: 0 0 10px; }
.filters.primary-filters .trade-filter { grid-column: auto; }
.primary-filters select { min-height: 44px; font-size: 15px; }
#toggleAdvancedFilters { min-height: 44px; display: flex; align-items: center; gap: 8px; }
#toggleAdvancedFilters[aria-expanded="true"] { background: #edf2e8; border-color: #708d7f; }
#advancedFilterCount { background: var(--ink); color: white; border-radius: 20px; padding: 1px 5px; font-size: 12px; }
.advanced-panel { background: #f0f4ec; border: 1px solid var(--line); padding: 16px; border-radius: 12px; margin-bottom: 12px; scroll-margin-top: 100px; }
.advanced-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.advanced-heading h3 { font-size: 17px; margin: 0; }
.advanced-heading button { min-height: 44px; font-size: 14px; }
.advanced-fields { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.advanced-fields select { min-height: 44px; font-size: 14px; }
.advanced-panel .filter-bottom { margin-bottom: 0; }
.active-filters { gap: 6px; margin: 6px 0; }
.active-filters button { min-height: 36px; padding: 5px 10px; font-size: 13px; }
#searchStatus { margin: 8px 0 12px; }
.results-footnote { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 20px; margin-top: 12px; }
/* « Comment les résultats sont classés » (conditions, point 4): under the sort selector and under the list of results. */
.sort-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ranking-link, .ranking-note { font-size: 13px; }
.ranking-note { margin: 0; }
.demo-explanation { color: var(--muted); font-size: 13px; max-width: 620px; margin: 0; }
.search-sharing { margin: 0; }
#mobileMapToggle { display: none; }
.local-guide { border-top: 1px solid var(--line); padding: 28px 0; }
.local-guide p { max-width: 850px; color: var(--muted); line-height: 1.6; }
/* Local pages, hubs and /metiers written by the server (local_pages.py, audits B22 and B52): the breadcrumb in the place of
   the eyebrow, the facts under the <h1> (kept on a phone), the list's pages, the guide's links. */
.intro nav.local-breadcrumb { display: block; font-size: 14px; }
.intro .local-breadcrumb ol { margin: 0 0 10px; }
.local-guide nav { display: block; font-size: inherit; }  /* Not the header's navigation (site.css: nav). */
.local-guide nav a { text-decoration: underline; }
.local-communes { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px 24px; margin: 0 0 14px; padding: 0; list-style: none; }
.local-communes a { font-weight: 600; }
.local-pagination { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 6px 0; font-size: 15px; }
.local-pagination [aria-current] { font-weight: 700; }
.local-links h3 { font-size: 16px; margin: 14px 0 4px; }
@media (max-width: 900px) { .advanced-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 650px) {
  header { height: 68px; }
  .intro { padding: 18px 0 14px; }
  .intro .eyebrow { display: none; }
  .intro h1 { font-size: 28px; line-height: 1.15; letter-spacing: -.9px; max-width: 430px; }
  .intro p:not(.eyebrow) { display: none; }
  .search { grid-template-columns: minmax(0, 1fr) auto; padding: 9px; gap: 6px 8px; }
  .search > label { grid-column: 1 / -1; border-bottom: 1px solid var(--line); padding-bottom: 3px; }
  .search input { font-size: 16px; min-height: 38px; }
  .search .primary { height: 44px; font-size: 13px; padding: 8px 11px; margin-top: 0; }
  .search .city-field label { font-size: 12px; }
  .section-head { margin: 16px 0 10px; gap: 8px; align-items: center; }
  .section-head h2 { font-size: 18px; letter-spacing: -.4px; }
  .section-head .eyebrow { font-size: 10px; letter-spacing: .7px; }
  .view-switch { flex-shrink: 0; max-width: none; }
  .view-switch [data-view] { display: none; }
  .view-switch #mobileMapToggle { display: block; min-height: 44px; font-size: 12px; padding: 8px; }
  .filters.primary-filters { grid-template-columns: minmax(0, 1fr) 95px; gap: 8px; }
  #toggleAdvancedFilters { grid-column: 1 / -1; justify-content: center; min-height: 44px; font-size: 13px; }
  .primary-filters label { font-size: 12px; }
  .primary-filters select { font-size: 16px; }
  .advanced-panel { padding: 12px; scroll-margin-top: 82px; }
  .advanced-heading h3 { font-size: 16px; }
  .advanced-fields { grid-template-columns: 1fr; }
  .advanced-fields select { font-size: 16px; }
  .advanced-panel .check { min-height: 44px; }
  .active-filters button { min-height: 44px; }
  #searchStatus { font-size: 12px; line-height: 1.4; margin: 8px 0 10px; }
  #mapPanel { order: 0; }
  .card-photo { height: 160px; }
  #map { height: min(60dvh, 450px); min-height: 260px; }
  .results-footnote { gap: 10px; }
  .ranking-link, .ranking-note a { display: inline-flex; align-items: center; min-height: 44px; }
  .intro p.local-intro { display: block; font-size: 14px; }
}

/* Chevron drawn in CSS (the ⌄ glyph looked like a stray « v » on phones); it turns when the panel is open. */
.filters-chevron { width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .15s; }
#toggleAdvancedFilters[aria-expanded="true"] .filters-chevron { transform: translateY(2px) rotate(-135deg); }
