/* Catalogue /aventures (spec 5.2, 4.22, 4.23). Page-only styles. */
@layer pages {

/* 1. Hero: photo + scrim (shell .w-hero in app.css). d1440 min 440, t1024 400. Bottom padding leaves
      room for the filter bar / pill that overlaps the hero edge. No photo: forest + glow + topo. */
.w-cat-hero .w-hero__content { --_pt: calc(var(--w-header-h) + 32px); padding-bottom: 64px; }
.w-cat-hero--plain { min-height: 0; }
/* Below 1024 the text block sits at the top on a text-anchored scrim (>= .80 under every line, fading
   to 0 88 px below the stats), and the lower part of the photo (ground, people: where landscape
   subjects sit) stays clean down to the overlapping pill. A bottom-anchored text block would cover
   the subject and leave only sky visible. */
@media (max-width: 1023px) {
  .w-cat-hero:not(.w-cat-hero--plain) { min-height: min(540px, 66svh); justify-content: flex-start; }
  .w-cat-hero:not(.w-cat-hero--plain) .w-hero__scrim { background: linear-gradient(180deg, rgb(16 34 32 / .2) 0%, rgb(16 34 32 / 0) 55%, rgb(16 34 32 / .3) 100%); }
  .w-cat-hero:not(.w-cat-hero--plain) .w-hero__content { padding-bottom: 24px; }
  .w-cat-hero:not(.w-cat-hero--plain) .w-hero__content::before {
    top: 0; bottom: -88px;
    background: linear-gradient(180deg, rgb(16 34 32 / .92) 0, rgb(16 34 32 / .8) calc(100% - 104px), rgb(16 34 32 / 0) 100%);
  }
}
.w-cat-hero .w-hero__lead { max-width: 44ch; }
/* One sentence per line from 400 px (no "et Casablanca." orphan); below, the sentences flow inline. */
@media (min-width: 400px) { .w-cat-hero__s + .w-cat-hero__s { display: block; } }
.w-cat-hero__stats { margin-top: 20px; gap: 12px 32px; }
.w-cat-hero__stats .w-stat__num .w-icon { width: 18px; height: 18px; }
.w-cat-hero--plain { background: var(--w-glow-dark), var(--w-topo) 0 0 / 640px repeat, var(--w-forest); }
.w-cat-hero--plain .w-hero__content::before { display: none; }
.w-cat-hero--solo .w-hero__content { padding-bottom: 40px; }
@media (max-width: 599px) {
  .w-cat-hero__stats { justify-content: space-between; gap: 12px; }
  .w-cat-hero__stats .w-stat__label { font-size: 12px; }
}
@media (min-width: 768px) {
  .w-cat-hero .w-hero__content { --_pt: calc(var(--w-header-h) + 48px); padding-bottom: 72px; }
  .w-cat-hero__stats { margin-top: 28px; }
}
@media (min-width: 1024px) {
  .w-cat-hero { min-height: 400px; }
  .w-cat-hero .w-hero__content { --_pt: calc(var(--w-header-h) + 56px); padding-bottom: 88px; }
  .w-cat-hero--solo .w-hero__content { padding-bottom: 56px; }
}
@media (min-width: 1280px) { .w-cat-hero { min-height: 440px; } }

/* 2. Filter dock: overlaps the hero bottom (half the control), sticky under the header. The 1 px
      sentinel sits where the dock's top rests, so aventures.js knows when it docks (.is-stuck). */
.w-cat-body { position: relative; --_ov: 26px; }
@media (min-width: 1024px) { .w-cat-body { --_ov: 36px; } }
.w-cat-sentinel { position: absolute; left: 0; top: calc(var(--_ov) * -1); width: 1px; height: 1px; pointer-events: none; visibility: hidden; }
.w-cat-dock { margin-top: calc(var(--_ov) * -1); }
.w-cat-pill__text { min-width: 0; }

.w-cat-bar .w-btn { padding-inline: 24px; }
/* Budget is hidden when fewer than 2 price thresholds exist (4.22): 3 fields + the button */
@media (min-width: 1024px) { .w-cat-bar--3 { grid-template-columns: 1.3fr 1fr 1fr auto; } }
.w-cat-bar select.w-filter__control option:disabled { color: var(--w-disabled-fg); }

/* No JS below 1024: the bar form shows as a stacked card (the pill needs JS to open its sheet). */
@media (max-width: 1023px) {
  html.no-js .w-cat-dock { position: relative; top: auto; }
  html.no-js .w-cat-bar {
    display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; padding: 8px;
    background: var(--w-white); border-radius: 24px; box-shadow: var(--w-sh-3); color: var(--w-ink);
  }
  html.no-js .w-cat-bar .w-filter__field + .w-filter__field::after { left: 18px; right: 18px; top: 0; bottom: auto; width: auto; height: 1px; }
  html.no-js .w-cat-bar .w-btn { margin-top: 8px; }
}

/* Keyboard focus and anchors land below the docked band */
:root:has(.w-cat-dock) { scroll-padding-top: calc(var(--w-header-h) + 84px); }
@media (min-width: 1024px) { :root:has(.w-cat-dock) { scroll-padding-top: calc(var(--w-header-h) + 88px); } }

/* 3. Results */
.w-cat-results { padding-top: 40px; }
.w-cat-results--solo { padding-top: var(--w-section-y); }
.w-cat-results .w-results-head__count { margin: 0; }
.w-cat-results .w-results-head__count:focus { outline: none; }
.w-cat-results .w-results-head__count:focus-visible { outline: var(--_ring); outline-offset: 4px; border-radius: 6px; }
.w-cat-clear { min-height: 36px; font-size: 14px; position: relative; }
.w-cat-clear::after { content: ""; position: absolute; inset: -4px 0; }
.w-cat-sort { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.w-cat-grid > .is-out { display: none !important; }
/* Where 4 cards fit (d1440), 3, 5, 6 or 9 results take 3 columns: 3 + 3 instead of 4 + 2 with a half-empty
   row (the orphan rule of spec 5.6). data-n = cards shown (server, then aventures.js). */
@media (min-width: 1200px) {
  .w-cat-grid:is([data-n="3"], [data-n="5"], [data-n="6"], [data-n="9"]) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.w-cat-none { margin-top: 8px; }
.w-cat-none .w-empty__chips .w-chip-link { font-size: 13px; font-weight: 700; }

/* 4. Réserver en 3 étapes */
.w-cat-steps__more { margin-top: 28px; }
@media (min-width: 768px) { .w-cat-steps__more { margin-top: 36px; } }

/* 5. CTA card (two actions: text on top of the buttons until 1200, app.css) */
.w-cat-cta .w-cta-card__title, .w-cat-cta .w-cta-card__text { text-wrap: balance; }

/* Mobile filter sheet (4.22): the form spans body + sticky footer; centred panel on tablets. */
.w-cat-sheet__form { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.w-cat-sheet .w-sheet__foot .w-btn--ghost { padding-inline: 16px; }
.w-cat-sheet__apply { flex: 1; max-width: 260px; }
.w-cat-sheet .w-rchip:has(:disabled) { opacity: 1; color: var(--w-disabled-fg); background: var(--w-disabled-bg); border-color: var(--w-line); }
/* Type and Budget chips size to their label (long budget labels would wrap in a 2-column grid);
   "Quand ?" keeps the 2 columns of the spec. */
.w-cat-sheet .w-radio-chips:not(.w-cat-sheet__months) { display: flex; flex-wrap: wrap; }
@media (min-width: 600px) {
  .w-cat-sheet .w-sheet__panel { max-width: 640px; margin-inline: auto; }
}
}
