/* Swaygo — home & search results (body.sy-page.swhome). Uses tokens from sy.css. */

/* ── Hero ───────────────────────────────────────────────────────────────
   One immersive photo in a framed stage; title and lead sit on its darker left
   side (light text in both themes); the search card overlaps the bottom edge. */
.sy-hero { position: relative; padding-top: 0; overflow: hidden; }
.sy-hero__grid { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "stage" "search"; }
.sy-hero__media, .sy-hero__copy { grid-area: stage; }
.sy-hero__media {
  position: relative; margin-inline: calc(-1 * var(--sy-gutter)); min-height: 0; aspect-ratio: 4 / 5; max-height: 560px;
  background: #2a1d14; overflow: hidden;
}
.sy-hero__media picture, .sy-hero__img { display: block; width: 100%; height: 100%; }
.sy-hero__img { object-fit: cover; object-position: 62% 50%; }
/* legibility: dark veil under the text (bottom on phones, left from 900px) */
.sy-hero__media::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(0deg, rgba(20,13,8,.88) 0%, rgba(20,13,8,.62) 38%, rgba(20,13,8,.12) 70%, rgba(20,13,8,0) 100%);
}
.sy-hero__media.sy-sig-frame::after { top: 16px; bottom: auto; right: 16px; width: 64px; height: 64px; transform: scaleY(-1); }
.sy-hero__copy { position: relative; z-index: 4; align-self: end; padding: 0 0 92px; color: #fff; }
.sy-hero .sy-display { color: #fff; text-shadow: 0 1px 18px rgba(0,0,0,.25); }
.sy-hero .sy-display__accent { color: var(--sy-brand); }
.sy-hero__lead { margin-top: 12px; max-width: 30ch; color: rgba(255,255,255,.92); }
.sy-hero__search { grid-area: search; position: relative; z-index: 5; margin-top: -64px; }
.sy-hero__quick { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 14px; padding-bottom: 6px; }

@media (min-width: 640px) and (max-width: 899px) {
  .sy-hero__media { aspect-ratio: 16 / 13; }
}
@media (min-width: 900px) {
  .sy-hero { padding-top: 20px; }
  .sy-hero__media {
    margin-inline: 0; aspect-ratio: auto; max-height: none; min-height: clamp(470px, 40vw, 600px);
    border-radius: var(--sy-r-xl); box-shadow: var(--sy-shadow-2);
  }
  /* the photo fills the right three quarters and melts into a warm dark panel that carries the title */
  .sy-hero__media { background: #1f150e; }
  .sy-hero__media picture { position: absolute; top: 0; right: 0; bottom: 0; width: 74%; height: auto; }
  .sy-hero__img { object-position: 40% 45%; }
  .sy-hero .sy-display { font-size: clamp(3.3rem, 1.4rem + 3.6vw, 4.6rem); }
  .sy-hero__media::before {
    background:
      linear-gradient(90deg, #1f150e 0%, #1f150e 26%, rgba(31,21,14,.78) 34%, rgba(31,21,14,.28) 50%, rgba(31,21,14,0) 64%),
      linear-gradient(0deg, rgba(31,21,14,.5) 0%, rgba(31,21,14,0) 30%);
  }
  .sy-hero__media.sy-sig-frame::after { top: auto; bottom: 86px; right: 22px; width: 104px; height: 104px; transform: none; }
  .sy-hero__copy { align-self: center; padding: 48px 0 120px clamp(28px, 4.2vw, 64px); }
  .sy-hero__lead { max-width: 36rem; }
  .sy-hero__search { margin-top: -58px; padding-inline: clamp(16px, 2.6vw, 36px); }
  .sy-hero__quick { justify-content: flex-start; margin-top: 12px; }
  .sy-hero__search .sy-search__note { margin-top: 10px; }
}

/* Search inside the hero: on phones the card reads as one stacked block */
@media (max-width: 899px) {
  .sy-search__pair { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .sy-search__seg--guests { grid-column: 1 / -1; }
  .sy-search__seg { min-height: 58px; padding: 7px 12px; column-gap: 10px; }
  .sy-search__seg > svg { width: 18px; height: 18px; }
}
@media (max-width: 359px) {
  .sy-search__pair { grid-template-columns: minmax(0, 1fr); }
}

/* ── Sections ─────────────────────────────────────────────────────────── */
.sy-section--tight { padding-block: 8px 24px; }
.swhome .sy-section:first-of-type { padding-top: 40px; }

/* Mood tiles — one tall tile and two stacked ones from 900px */
.sy-moods { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 640px) and (max-width: 899px) { .sy-moods .sy-tile { aspect-ratio: 3.4 / 1; } }
@media (min-width: 900px) {
  .sy-moods { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .sy-moods .sy-tile { aspect-ratio: 2.35 / 1; }
  .sy-moods .sy-tile:first-child { grid-row: 1 / span 2; aspect-ratio: auto; min-height: 100%; }
  .sy-moods .sy-tile:first-child .sy-tile__title { font-size: 1.75rem; }
  .sy-moods .sy-tile:first-child .sy-tile__sub { font-size: .9375rem; }
  .sy-moods .sy-tile:first-child .sy-tile__body { left: 24px; bottom: 22px; }
  .sy-moods .sy-tile:first-child .sy-tile__go { right: 22px; bottom: 22px; }
}
.sy-moods__more { margin-top: 14px; }

/* Featured restaurants ("Tables d'exception") — one large card + two complementary ones */
@media (min-width: 1024px) {
  .sy-rail--feature { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); grid-template-rows: repeat(2, auto); gap: 20px; }
  .sy-rail--feature > .sy-rcard:first-child { grid-row: 1 / span 2; }
  .sy-rail--feature > .sy-rcard:first-child .sy-rcard__media { aspect-ratio: auto; flex: 1 1 auto; min-height: 280px; }
  .sy-rail--feature > .sy-rcard:first-child .sy-rcard__body { flex: none; padding: 18px 20px 20px; }
  .sy-rail--feature > .sy-rcard:first-child .sy-rcard__name { font-size: 1.375rem; }
  .sy-rail--feature > .sy-rcard:not(:first-child) { flex-direction: row; }
  .sy-rail--feature > .sy-rcard:not(:first-child) .sy-rcard__media { flex: 0 0 40%; aspect-ratio: auto; min-height: 100%; }
  .sy-rail--feature > .sy-rcard:not(:first-child) .sy-rcard__body { padding: 14px 16px; }
  .sy-rail--feature > .sy-rcard:only-child { grid-row: auto; }
}

/* Breathing: a soft band behind "Nos sélections", more air before the larger blocks */
.sy-section--band { background: var(--sy-bg-alt); padding-block: 48px 52px; margin-block: 24px 8px; }
.sy-section--band + .sy-section { padding-top: 40px; }
@media (min-width: 900px) { .sy-section--band { padding-block: 64px 68px; margin-block: 32px 8px; } }
.sy-section--band .sy-coll { box-shadow: var(--sy-shadow-1); }

/* Banners */
.sy-banner {
  position: relative; overflow: hidden; display: grid; gap: 14px; align-items: center;
  grid-template-columns: auto minmax(0, 1fr);
  padding: 20px; border-radius: var(--sy-r-lg);
  background: linear-gradient(90deg, var(--sy-accent-soft) 0%, var(--sy-accent-soft) 60%, color-mix(in srgb, var(--sy-accent-soft) 0%, transparent) 100%), var(--sy-accent-soft);
  border: 1px solid var(--sy-accent-line);
}
.sy-banner__icon {
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  border: 1.5px solid var(--sy-action); color: var(--sy-accent-text); background: var(--sy-surface);
}
.sy-banner__title { margin: 0; font-size: clamp(1.125rem, 1rem + .5vw, 1.375rem); font-weight: 800; letter-spacing: -0.025em; color: var(--sy-ink); }
.sy-banner__text { margin: 4px 0 0; color: var(--sy-ink-2); font-size: .9375rem; }
.sy-banner__cta { grid-column: 1 / -1; justify-self: start; background: var(--sy-surface); position: relative; z-index: 1; }
.sy-banner__media { display: none; }
@media (min-width: 900px) {
  .sy-banner { grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 32%); padding: 22px 0 22px 28px; gap: 22px; min-height: 120px; }
  .sy-banner__cta { grid-column: auto; justify-self: auto; }
  .sy-banner__media { display: block; align-self: stretch; margin: -22px 0 -22px 0; position: relative; }
  .sy-banner__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
  .sy-banner__media::before {
    content: ""; position: absolute; inset: 0; z-index: 1;
    background: linear-gradient(90deg, var(--sy-accent-soft) 0%, color-mix(in srgb, var(--sy-accent-soft) 0%, transparent) 55%);
  }
}

/* Collections */
.sy-coll {
  display: flex; flex-direction: column; min-width: 0; overflow: hidden;
  background: var(--sy-surface); border: 1px solid var(--sy-line); border-radius: var(--sy-r); box-shadow: var(--sy-shadow-1);
}
.sy-coll__media { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 3px; aspect-ratio: 16 / 9; overflow: hidden; background: var(--sy-surface-3); }
.sy-coll__media > * { min-height: 0; min-width: 0; }
.sy-coll__media > :first-child { grid-row: 1 / span 2; }
.sy-coll__media > :only-child { grid-column: 1 / -1; }
.sy-coll__media > :nth-child(2):last-child { grid-row: 1 / span 2; }
.sy-coll__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* themed visual (one photo per collection) instead of the restaurants' mosaic */
.sy-coll__media--visual { display: block; position: relative; }
.sy-coll__media--visual picture { display: block; width: 100%; height: 100%; }
.sy-coll__media--visual.sy-sig-frame::after { width: 64px; height: 64px; right: 10px; bottom: 10px; opacity: .85; }
.sy-coll__ph { display: grid; place-items: center; color: var(--sy-ink-3); background: var(--sy-surface-2); }
.sy-coll__ph svg { width: 26px; height: 26px; }
.sy-coll__body { padding: 14px 16px 16px; display: grid; gap: 6px; align-content: start; }
.sy-coll__org { margin: 0; font-size: .8125rem; font-weight: 600; color: var(--sy-accent-text); }
.sy-coll__name { margin: 0; font-size: 1.125rem; font-weight: 800; letter-spacing: -0.02em; color: var(--sy-ink); }
.sy-coll__desc { margin: 0; font-size: .9375rem; color: var(--sy-ink-2); }
.sy-coll__count { margin: 0; font-size: .875rem; color: var(--sy-ink-3); }
.sy-coll__more { margin-top: 6px; }
.sy-coll__more > summary { list-style: none; width: fit-content; }
.sy-coll__more > summary::-webkit-details-marker { display: none; }
.sy-coll__more[open] > summary svg { transform: rotate(180deg); }
.sy-coll__list { list-style: none; margin: 10px -10px 0; padding: 0; display: grid; gap: 2px; }
.sy-coll__list .sy-rrow__name, .sy-coll__list .sy-rrow__meta { display: block; }

/* Explore */
.sy-explore { display: grid; gap: 28px; }
@media (min-width: 1024px) { .sy-explore { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 40px; } }
.sy-explore__title { margin-bottom: 12px; }
.sy-cuisines { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.sy-cuisine {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px 8px 8px; min-height: 56px;
  border: 1px solid var(--sy-line); border-radius: var(--sy-r); background: var(--sy-surface);
  text-decoration: none; color: var(--sy-ink); font-weight: 600; font-size: .9375rem;
  transition: border-color .15s, background-color .15s;
}
.sy-cuisine:hover { border-color: var(--sy-line-strong); background: var(--sy-surface-2); }
.sy-cuisine img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; }
.sy-cuisine span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

/* Restaurateurs */
.sy-pro {
  display: grid; overflow: hidden; border-radius: var(--sy-r-lg);
  background: var(--sy-surface); border: 1px solid var(--sy-line); box-shadow: var(--sy-shadow-1);
}
.sy-pro__copy { padding: 24px 20px; display: grid; gap: 14px; align-content: center; }
.sy-pro__kicker { margin: 0; font-size: .875rem; font-weight: 700; color: var(--sy-accent-text); }
.sy-pro__title { margin: 0; font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.25rem); font-weight: 800; letter-spacing: -0.035em; line-height: 1.05; color: var(--sy-ink); }
.sy-pro__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.sy-pro__list li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; color: var(--sy-ink-2); font-size: .9375rem; }
.sy-pro__list li svg { width: 20px; height: 20px; color: var(--sy-accent-text); margin-top: 1px; }
.sy-pro__list strong { color: var(--sy-ink); display: block; }
.sy-pro__media { display: block; position: relative; min-height: 200px; background: #2b221c; }
.sy-pro__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
@media (min-width: 900px) {
  .sy-pro { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); }
  .sy-pro__copy { padding: 36px 40px; }
  .sy-pro__media { min-height: 100%; }
}

/* ── Results ──────────────────────────────────────────────────────────── */
.sy-results { padding-top: 20px; }
.sy-results .sy-search { margin-bottom: 24px; }
@media (max-width: 899px) {
  /* compact on phones: the query field and the button stay, the rest folds under them */
  .sy-results .sy-search { padding: 10px; gap: 8px; }
}
.sy-results__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sy-results__meta { margin: 6px 0 0; color: var(--sy-ink-3); font-size: .9375rem; }
.sy-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 16px; }
.sy-filters__field { flex: 1 1 170px; max-width: 260px; }
body.sy-page .sy-filters__field select { width: 100%; min-height: 40px; padding-top: 7px; padding-bottom: 7px; font-size: .9375rem; }
.sy-filters .sy-btn { min-height: 40px; }
.sy-results__active { margin-top: 14px; align-items: center; }
.sy-results__grid { margin-top: 24px; }
@media (max-width: 639px) {
  .sy-filters__field { flex-basis: calc(50% - 4px); max-width: none; }
}

/* mood tile text stacks */
.sy-tile__title, .sy-tile__sub { display: block; }

/* date select built by JS (progressive enhancement of the native date input) */
body.sy-page select.sy-search__ctl[data-sy-datesel] { padding-right: 24px; }

/* small phones: keep "Aujourd'hui" / "Peu importe" readable in the half-width fields */
@media (max-width: 480px) {
  .sy-search__pair .sy-search__seg { padding: 7px 8px 7px 10px; column-gap: 8px; grid-template-columns: 18px minmax(0, 1fr); }
  body.sy-page .sy-search__pair select.sy-search__ctl { padding-right: 18px; background-size: 14px; }
  .sy-search__lbl { font-size: .78rem; }
}
@media (max-width: 899px) {
  .sy-banner { grid-template-columns: 1fr; padding: 18px; gap: 12px; }
  .sy-banner__icon { width: 44px; height: 44px; }
  .sy-hero__quick { justify-content: flex-start; }
}

/* results: one-line search summary (phones) */
.sy-searchsum {
  display: flex; align-items: center; gap: 12px; width: 100%; margin-bottom: 16px; padding: 10px 12px 10px 14px; min-height: 56px;
  background: var(--sy-surface); border: 1px solid var(--sy-line-strong); border-radius: var(--sy-r); box-shadow: var(--sy-shadow-1);
  font: inherit; color: var(--sy-ink); text-align: left; cursor: pointer;
}
.sy-searchsum[hidden] { display: none; }
.sy-searchsum > svg { width: 20px; height: 20px; flex: none; color: var(--sy-ink-2); }
.sy-searchsum__text { flex: 1; min-width: 0; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sy-searchsum__sub { display: block; font-weight: 500; font-size: .875rem; color: var(--sy-ink-3); overflow: hidden; text-overflow: ellipsis; }
.sy-searchsum__edit { flex: none; font-weight: 700; font-size: .875rem; color: var(--sy-accent-text); }
.sy-results .sy-search[hidden] { display: none; }
.sy-results .sy-empty { margin-top: 24px; }
.sy-results__note { margin-top: 20px; }
.sy-results__note[hidden] { display: none; }

/* Hero title lines stay on one line from 900px (they sit on the darker left half of the photo) */
@media (min-width: 900px) {
  .sy-hero .sy-display > *, .sy-hero .sy-display { white-space: nowrap; }
}
@media (min-width: 900px) and (max-width: 1199px) {
  .sy-hero .sy-display { font-size: clamp(3.1rem, 1rem + 4.2vw, 3.9rem); }
  .sy-hero__lead { font-size: 1.125rem; }
}
.sy-occ__name:not(:empty) + .sy-occ__raw { display: none; }

/* Collections — a larger lead collection, then complementary cards */
@media (min-width: 640px) and (max-width: 1023px) {
  .sy-colls > .sy-coll:first-child { grid-column: 1 / -1; }
  .sy-colls > .sy-coll:first-child .sy-coll__media { aspect-ratio: 21 / 9; }
}
@media (min-width: 1024px) {
  .sy-colls > .sy-coll:first-child:not(:only-child) { grid-column: 1 / span 2; grid-row: 1 / span 2; }
  .sy-colls > .sy-coll:first-child:not(:only-child) .sy-coll__media { aspect-ratio: auto; flex: 1 1 auto; min-height: 300px; }
  .sy-colls > .sy-coll:first-child:not(:only-child) .sy-coll__body { padding: 20px 24px 22px; }
  .sy-colls > .sy-coll:first-child:not(:only-child) .sy-coll__name { font-size: 1.5rem; }
  .sy-colls > .sy-coll:first-child:not(:only-child) .sy-coll__media--visual.sy-sig-frame::after { width: 96px; height: 96px; right: 16px; bottom: 16px; }
}
