/* « Trouver une brocante » : moteur de recherche, familles d'événements, résultats, tiroir de filtres.
   Mobile d'abord (390 px) ; la barre devient horizontale dès 48 rem, la grille passe à 3 colonnes dès 70 rem. */

.wrap--wide { max-width: 80rem; }

/* ------------------------------------------------------------------ Hero */
.finder-hero {
  background: var(--paper-deep); border-bottom: 2px dashed var(--line-strong);
  padding-block: var(--s-3) var(--s-5);
}
.finder-hero .bunting { margin-bottom: var(--s-3); }
.finder-hero h1 { max-width: 18ch; }
.finder-hero .lead { margin-top: var(--s-2); }

/* ------------------------------------------------------------------ Barre de recherche unifiée */
.search-bar {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: var(--s-4);
  background: var(--white); border: 2px solid var(--forest); border-radius: var(--r-lg);
  box-shadow: var(--shadow); overflow: hidden;
}
.seg { position: relative; display: flex; flex-direction: column; justify-content: center; min-width: 0; border-top: 1px solid var(--line); }
.seg--place { grid-column: 1 / -1; border-top: 0; }
.seg:nth-child(3) { border-left: 1px solid var(--line); }
.seg label { padding: var(--s-2) var(--s-4) 0; font-size: 1rem; font-weight: 700; line-height: 1.3; color: var(--ink-soft); }
.seg__control {
  display: block; width: 100%; min-height: 3rem; padding: 0 var(--s-4) var(--s-2);
  border: 0; border-radius: 0; background: transparent; color: var(--ink);
  font-size: 1.125rem; font-weight: 700; text-overflow: ellipsis;
}
select.seg__control { appearance: none; padding-right: 2.5rem; cursor: pointer; }
.seg__control::placeholder { color: var(--ink-soft); font-weight: 400; opacity: 1; }
.seg__chevron { position: absolute; right: var(--s-3); bottom: 1.1rem; width: 1.25rem; height: 1.25rem; color: var(--forest); pointer-events: none; }
/* Le segment entier porte l'anneau de focus (visible, 3 px, à l'intérieur de la barre). */
.seg:focus-within { background: var(--forest-tint); outline: 3px solid var(--focus); outline-offset: -3px; }
.seg__control:focus-visible { outline: none; }
.search-bar__go { grid-column: 1 / -1; margin: var(--s-2); }

.finder-hero__foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-4); margin-top: var(--s-4); }
.finder-hero__proof { margin: 0; font-size: 1rem; color: var(--ink-soft); }

@media (min-width: 48rem) {
  .finder-hero { padding-block: var(--s-4) var(--s-6); }
  .search-bar { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr) auto; border-radius: var(--r-pill); margin-top: var(--s-5); }
  .seg { border-top: 0; }
  .seg--place { grid-column: auto; }
  .seg:nth-child(2), .seg:nth-child(3) { border-left: 1px solid var(--line); }
  .seg label { padding-left: var(--s-5); }
  .seg__control { padding-left: var(--s-5); }
  .seg__chevron { right: var(--s-4); }
  .search-bar__go { grid-column: auto; align-self: center; border-radius: var(--r-pill); padding-inline: var(--s-5); }
}
@media (min-width: 64rem) {
  .finder-hero { text-align: center; padding-block: var(--s-4) var(--s-7); }
  .finder-hero h1, .finder-hero .lead { margin-inline: auto; }
  .search-bar { max-width: 62rem; margin-inline: auto; }
  .finder-hero__foot { justify-content: center; }
  .search-bar__go { padding-inline: var(--s-6); }
}

/* ------------------------------------------------------------------ Familles d'événements */
.categories { padding-block: var(--s-5) var(--s-2); }
.categories__title { font-size: 1.5rem; margin-bottom: var(--s-3); }
/* Mobile : rail horizontal (le bord de la tuile suivante reste visible : on voit qu'on peut faire défiler). */
.cat-rail {
  display: flex; gap: var(--s-3); overflow-x: auto; scroll-snap-type: x proximity;
  margin-inline: calc(var(--s-4) * -1); padding: var(--s-1) var(--s-4) var(--s-3);
}
.cat-rail > li { flex: none; scroll-snap-align: start; }

.cat {
  --tone-fg: var(--forest); --tone-bg: var(--forest-tint);
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-1);
  width: 8.75rem; min-height: 7.5rem; padding: var(--s-3); text-align: left; cursor: pointer;
  background: var(--surface); color: var(--ink); border: 2px solid var(--line-strong); border-radius: var(--r-lg);
  transition: background-color var(--ease), border-color var(--ease), transform var(--ease);
}
.cat:hover { border-color: var(--tone-fg); transform: translateY(-2px); }
.cat__icon {
  display: grid; place-items: center; width: 2.75rem; height: 2.75rem; margin-bottom: var(--s-1);
  border-radius: 50%; background: var(--tone-bg); color: var(--tone-fg);
}
.cat__label { font-size: 1.0625rem; font-weight: 700; line-height: 1.2; min-width: 0; }
.cat__count { font-size: 1rem; line-height: 1.2; color: var(--ink-soft); }
/* Sélection : fond teinté + cadre épais + coche. La couleur ne porte jamais seule l'information. */
.cat[aria-pressed='true'] { background: var(--tone-bg); border-color: var(--tone-fg); box-shadow: inset 0 0 0 1px var(--tone-fg); }
.cat[aria-pressed='true'] .cat__count { color: var(--ink); font-weight: 700; }
.cat__check {
  position: absolute; top: var(--s-2); right: var(--s-2); display: none; place-items: center;
  width: 1.5rem; height: 1.5rem; border-radius: 50%; background: var(--tone-fg); color: var(--white);
}
.cat__check .icon { width: 1rem; height: 1rem; }
.cat[aria-pressed='true'] .cat__check { display: grid; }

.cat--brocante { --tone-fg: #1E4D3B; --tone-bg: #E3EDE4; }
.cat--vide-grenier { --tone-fg: #7A3E21; --tone-bg: #F3E1D3; }
.cat--vide-maison { --tone-fg: #4D3A73; --tone-bg: #E9E4F3; }
.cat--vide-dressing { --tone-fg: #7A3150; --tone-bg: #F7E3EB; }
.cat--bourse { --tone-fg: #315A78; --tone-bg: #E4EEF7; }
.cat--braderie { --tone-fg: #624600; --tone-bg: #FBEBC6; }
.cat--marche-autre { --tone-fg: #245D4E; --tone-bg: #E2F0EC; }

@media (min-width: 48rem) {
  .cat-rail { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: visible; margin-inline: 0; padding: var(--s-1) 0 var(--s-2); }
  .cat { width: 100%; }
}
@media (min-width: 64rem) {
  .cat-rail { grid-template-columns: repeat(7, minmax(0, 1fr)); }
}

/* ------------------------------------------------------------------ Résultats */
.results { padding-block: var(--s-4) 0; }
.results-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--s-1) var(--s-4); margin-bottom: var(--s-3); }
.results-count { margin: 0; font-size: 1.25rem; font-weight: 700; color: var(--forest); }

.toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3);
  padding-block: var(--s-3); margin-bottom: var(--s-4); border-block: 1px solid var(--line);
}
.toolbar .chip, .toolbar .btn { flex: none; }
.active-filters { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.chip--active { background: var(--forest-tint); border-color: var(--forest); color: var(--forest-deep); }
.chip--active:hover { background: var(--paper-deep); }
.chip--active .icon { width: 1.125rem; height: 1.125rem; }

.results__body .event-card__title { font-size: 1.375rem; }
@media (min-width: 70rem) {
  .results__body .event-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ------------------------------------------------------------------ Tiroir de filtres (dialog natif) */
.filter-drawer {
  width: 100%; max-width: none; max-height: 90dvh; margin: auto 0 0; padding: 0; border: 0;
  border-radius: var(--r-lg) var(--r-lg) 0 0; background: var(--paper); color: var(--ink);
  box-shadow: 0 -12px 40px rgba(43, 33, 24, 0.25);
}
.filter-drawer::backdrop { background: rgba(25, 20, 16, 0.6); }
.drawer { display: flex; flex-direction: column; max-height: 90dvh; }
.drawer__head, .drawer__foot { display: flex; gap: var(--s-3); padding: var(--s-3) var(--s-4); background: var(--surface); }
.drawer__head { align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.drawer__head h2 { font-size: 1.625rem; }
.drawer__body { display: grid; gap: var(--s-4); align-content: start; flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: var(--s-4); }
.drawer__foot { flex-direction: column; border-top: 1px solid var(--line); padding-bottom: calc(var(--s-3) + env(safe-area-inset-bottom)); }
@media (min-width: 48rem) {
  .filter-drawer { width: min(26rem, 100%); height: 100dvh; max-height: none; margin: 0 0 0 auto; border-radius: 0; box-shadow: -12px 0 40px rgba(43, 33, 24, 0.25); }
  .drawer { height: 100dvh; max-height: none; }
}

/* ------------------------------------------------------------------ Aperçu : agrandir le flyer */
.quick-event__flyer[data-flyer-open] { cursor: zoom-in; }
.flyer-dialog {
  width: min(72rem, calc(100% - 1rem)); max-width: none; max-height: 96dvh; margin: auto; padding: 0; border: 0;
  border-radius: var(--r-lg); background: var(--surface); color: var(--ink); overflow: hidden;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.4);
}
.flyer-dialog::backdrop { background: rgba(20, 16, 12, 0.85); }
.flyer { display: flex; flex-direction: column; max-height: 96dvh; }
.flyer__head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: var(--s-3) var(--s-4); background: var(--paper); border-bottom: 1px solid var(--line); }
.flyer__title { min-width: 0; font-size: 1.25rem; line-height: 1.25; }
.flyer__actions { display: flex; flex: none; align-items: center; gap: var(--s-2); }
.flyer__actions .favorite, .flyer__actions .btn { min-height: var(--tap); padding-block: var(--s-2); }
.flyer__stage { display: grid; place-items: center; flex: 1 1 auto; min-height: 0; margin: 0; overflow: auto; background: #211D19; }
.flyer__stage img { width: auto; height: auto; max-width: 100%; max-height: calc(96dvh - 9.5rem); object-fit: contain; }
.flyer__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-2) var(--s-4); padding: var(--s-3) var(--s-4); background: var(--paper); border-top: 1px solid var(--line); }
.flyer__foot p { margin: 0; }
.flyer__foot a { display: inline-flex; align-items: center; gap: var(--s-2); min-height: var(--tap); font-weight: 700; }
@media (max-width: 32rem) {
  .flyer__actions .favorite span, .flyer__actions .btn span { display: none; }
  .flyer__actions .favorite, .flyer__actions .btn { width: var(--tap-cta); padding-inline: 0; }
}


/* ------------------------------------------------------------------ Teaser App Indiana intégré au hero */
.finder-hero__grid {
  display: grid;
  gap: var(--s-4);
  align-items: end;
}

.finder-hero__main {
  min-width: 0;
}

.hero-mobile-teaser {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  gap: var(--s-3);
  align-items: center;
  margin-top: var(--s-4);
  text-align: left;
}

.hero-mobile-teaser__mascot {
  width: 6.5rem;
  height: auto;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(43, 33, 24, 0.18));
}

.hero-mobile-teaser__copy {
  min-width: 0;
}

.hero-mobile-teaser__copy .eyebrow {
  margin-bottom: .2rem;
}

.hero-mobile-teaser__copy h2 {
  margin: 0 0 .35rem;
  font-size: 1.45rem;
  line-height: 1.06;
}

.hero-mobile-teaser__copy p {
  margin: 0 0 .65rem;
  font-size: 1rem;
  color: var(--ink-soft);
}

.hero-mobile-teaser__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: .75rem 1rem;
  border: 2px solid var(--forest);
  border-radius: var(--r-pill);
  font-weight: 800;
  color: var(--forest);
  background: transparent;
  text-decoration: none;
}

.hero-mobile-teaser__cta:hover {
  background: var(--forest-tint);
}

@media (min-width: 64rem) {
  .finder-hero__grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(16rem, 20rem);
    gap: var(--s-5);
  }

  .finder-hero__main {
    text-align: center;
  }

  .finder-hero h1,
  .finder-hero .lead,
  .finder-hero .search-bar {
    margin-inline: auto;
  }

  .finder-hero__foot {
    justify-content: center;
  }

  .hero-mobile-teaser {
    align-self: center;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: var(--s-2);
    margin-top: 0;
    padding-bottom: var(--s-2);
  }

  .hero-mobile-teaser__mascot {
    width: min(100%, 12.5rem);
  }

  .hero-mobile-teaser__copy {
    text-align: left;
  }

  .hero-mobile-teaser__copy h2 {
    font-size: 1.8rem;
  }
}

/* === INDIANA HERO MASCOT V2 BEGIN === */

/* Petit bandeau situé entre la navigation et les fanions */
.app-launch-strip {
  background: var(--forest);
  color: var(--white);
  border-bottom: 1px solid rgba(255,255,255,.12);
}

.app-launch-strip__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  min-height: 2.75rem;
  padding-block: .35rem;
}

.app-launch-strip__inner strong {
  font-size: .95rem;
  line-height: 1.2;
}

.app-launch-strip__inner a {
  display: inline-flex;
  align-items: center;
  min-height: 2.1rem;
  color: var(--white);
  font-size: .9rem;
  font-weight: 800;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .2rem;
}

/* La colonne droite devient une vraie zone mascotte */
.hero-mobile-teaser {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  margin-top: var(--s-4);
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.hero-mobile-teaser__mascot {
  display: block;
  width: min(72vw, 17rem);
  height: auto;
  max-width: none;
  object-fit: contain;
  filter: drop-shadow(0 14px 18px rgba(43, 33, 24, .16));
}

/* Plus aucun ancien texte teaser */
.hero-mobile-teaser__copy {
  display: none !important;
}

@media (min-width: 64rem) {
  .finder-hero__grid {
    grid-template-columns:
      minmax(0, 1fr)
      minmax(20rem, 26rem);
    gap: var(--s-3);
    align-items: center;
  }

  .hero-mobile-teaser {
    align-self: stretch;
    margin: 0;
    min-height: 20rem;
    overflow: visible;
  }

  .hero-mobile-teaser__mascot {
    width: min(100%, 23rem);
    transform: translateY(.5rem);
  }
}

@media (min-width: 78rem) {
  .hero-mobile-teaser__mascot {
    width: min(100%, 25rem);
  }
}

@media (max-width: 38rem) {
  .app-launch-strip__inner {
    justify-content: space-between;
    gap: .75rem;
  }

  .app-launch-strip__inner strong {
    font-size: .82rem;
  }

  .app-launch-strip__inner a {
    flex: none;
    font-size: .82rem;
  }
}

/* === INDIANA HERO MASCOT V2 END === */

/* === INDIANA WAITLIST POPUP V1 === */

.app-launch-strip__signup {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--white);
  font: inherit;
  font-size: .9rem;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: .2rem;
  cursor: pointer;
}

.waitlist-dialog {
  width: min(31rem, calc(100% - 2rem));
  padding: 0;
  border: 0;
  border-radius: 1.25rem;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 25px 70px rgba(30,24,18,.3);
}

.waitlist-dialog::backdrop {
  background: rgba(30,24,18,.58);
  backdrop-filter: blur(3px);
}

.waitlist-modal {
  position: relative;
  padding: 2rem;
}

.waitlist-modal__close {
  position: absolute;
  right: .75rem;
  top: .75rem;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.waitlist-modal__close:hover {
  background: var(--paper-deep);
}

.waitlist-modal h2 {
  margin: .2rem 2.5rem .6rem 0;
  font-size: 2rem;
  line-height: 1.05;
}

.waitlist-modal__lead {
  margin-bottom: 1.35rem;
  color: var(--ink-soft);
}

.waitlist-form label {
  display: block;
  margin-bottom: .45rem;
  font-weight: 700;
}

.waitlist-form__row {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: .6rem;
}

.waitlist-modal__privacy {
  margin: .65rem 0 0;
  color: var(--ink-soft);
  font-size: .8rem;
}

.waitlist-modal__status {
  margin: .9rem 0 0;
  color: var(--forest);
  font-weight: 700;
}

.waitlist-hp {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
}

@media (max-width: 34rem) {
  .waitlist-modal {
    padding: 1.5rem;
  }

  .waitlist-form__row {
    grid-template-columns: 1fr;
  }

  .waitlist-form__row .btn {
    width: 100%;
  }
}

/* === /INDIANA WAITLIST POPUP V1 === */
