/* The page of the search (search.html, search-page.js; Ludoc, 14/11/2026):
   the section of the magnifying glass of the iPhone app (ExploreScreen,
   BrowseList). Its title, the field on the blue glow of the top, and under it
   the lists one can browse, a line each with a thin rule; as one types, the
   results in their place. Linked by that page alone, after site.css. */

/* The blue glow at the top, as on the home page and in the search of the app
   (redTop): it starts under the header, which lets it through a little. */
.page-search main { position: relative; isolation: isolate; }
.page-search main::before { content: ''; position: absolute; top: calc(-1 * var(--top-now, var(--top-h))); inset-inline: 0; z-index: -1; height: 420px; background: radial-gradient(ellipse 80% 60% at 50% 0%, var(--glow-top), transparent 70%); pointer-events: none; }

/* A column, as the app has its search on an iPad (680). */
.search-page { max-width: calc(680px + 2 * var(--gutter)); padding-block: 8px 48px; }
.search-page__title { font: 800 30px/1.2 var(--font); letter-spacing: -.02em; }
.search-page__line { margin-top: 4px; font: 500 14px/1.4 var(--font); color: var(--text-2); }
.search-page .grid { margin-top: 20px; }
.search-page > .browse__list { margin-top: 12px; }

/* ---------- The field ---------- */
/* No "Search" button: the key of the keyboard sends. ✕ empties it. */
.page-search .find { max-width: none; margin: 16px 0 0; }
.page-search .find__form { gap: 10px; padding-right: 4px; }
.page-search .find__go { display: none; }
.find__clear { flex: none; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: var(--r-ctl); background: none; color: var(--text-3); transition: color .15s; }
.find__clear:active { color: var(--text); }
.find__clear-icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

/* ---------- The results, in place of the lists ---------- */
.page-search .find__pop { position: static; margin-top: 12px; padding: 0; background: none; border: 0; border-radius: 0; box-shadow: none; }
.page-search:has(.find__pop:not([hidden])) .browse { display: none; }
.page-search .find__none { padding: 8px 0; font-size: 14px; }
.page-search .find__foot { padding: 16px 0 0; font-size: 13px; }
/* The poster of 46 as in the app, a disc or a ring of the same width; a
   little room on either side for the light of the line chosen with the keys. */
.page-search .hit { gap: 12px; margin-inline: -8px; padding: 8px; border-radius: var(--r-ctl); transition: background-color .15s; }
.page-search .hit .poster { width: 46px; }
.page-search .hit__mark { width: 36px; height: 36px; margin: 5px; }
.page-search .hit__face { width: 46px; height: 46px; margin: 0; }
.page-search .hit__icon { width: 20px; height: 20px; }
.page-search .hit__title { font-size: 16px; }
.page-search .hit__title span { font-size: 13px; }
.page-search :is(.hit__tabs, .hit__n) { font-size: 13px; }
/* A finger chooses by touching: no line lit in advance. */
@media (pointer: coarse) {
  .page-search .hit[aria-selected="true"] { background: none; }
  .page-search .hit:active { background: var(--surface-hi); }
}
/* On a phone, as the app: the name whole on top (two lines at most), then
   how many and what (site.css does the same under 400). */
@media (max-width: 720px) {
  .page-search .hit:has(> .hit__n) { display: grid; grid-template: 1fr auto auto 1fr / 46px auto minmax(0, 1fr); gap: 0 12px; }
  .page-search .hit:has(> .hit__n) > :first-child { grid-area: 1 / 1 / -1 / 2; }
  .page-search .hit:has(> .hit__n) .hit__text { display: contents; }
  .page-search .hit:has(> .hit__n) .hit__title { grid-area: 2 / 2 / 3 / -1; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; white-space: normal; overflow-wrap: anywhere; }
  .page-search .hit__n { grid-area: 3 / 2; margin-top: 2px; line-height: 1.4; }
  .page-search .hit:has(> .hit__n) .hit__tabs { grid-area: 3 / 3; min-width: 0; margin: 2px 0 0 -6px; }
  .page-search .hit:has(> .hit__n) .hit__tabs:not(:empty)::before { content: "· "; }
}

/* ---------- The results in rows (search-rows.js; Ludoc, 20/11/2026) ---------- */
/* As the app (SearchResults.swift): posters and cards sliding sideways from
   one edge of the screen to the other, one block in two in a grey band. The
   title, the field and the lists keep their column; the rows leave it. */
.search-page--home { max-width: none; }
.search-page--home > :is(.search-page__title, .browse), .search-page--home :is(.find__form, .find__none, .find__foot, [role="listbox"]) { max-width: 680px; }
.found > .row { padding-top: 28px; }
.found > .row--band { margin: 32px calc(-1 * var(--gutter)) 0; padding: 22px var(--gutter) 26px; background: var(--surface-section); border-block: 1px solid var(--line); }
.found .row__head { align-items: center; margin-bottom: 12px; }
.found .row__head h2 { overflow: hidden; font: 800 20px/1.2 var(--font); letter-spacing: -.3px; white-space: nowrap; text-overflow: ellipsis; }
.found .row__more { display: inline-flex; flex: none; align-items: center; gap: 6px; margin-left: 8px; font: 600 14px/1 var(--font); color: var(--text-2); }
.found .row__more::after { content: ''; width: 6px; height: 6px; border: solid var(--accent-text); border-width: 2px 2px 0 0; rotate: 45deg; }
/* Under the title, the work the row is about: « Alien, le huitième passager ». */
.found .row__note { overflow: hidden; margin: -9px 0 12px; font: 400 13px/1.3 var(--font); color: var(--text-3); white-space: nowrap; text-overflow: ellipsis; }
.found .row__track { gap: 10px; }
/* Three posters and a half in sight on a phone, as Netflix (20 of margin, three gaps). */
.found .card { flex: none; width: calc((100vw - 50px) / 3.5); }
.found .card .poster { border-radius: 8px; }
.found .card__name { margin-top: 8px; font: 600 13px/1.3 var(--font); }
.found .card__meta { overflow: hidden; margin-top: 2px; font-size: 12px; white-space: nowrap; text-overflow: ellipsis; }
/* A person: a disc, their name, what they do, how many works. */
.who { flex: none; display: flex; align-items: center; gap: 12px; box-sizing: border-box; width: 248px; min-height: 80px; padding: 8px 14px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); color: var(--text); scroll-snap-align: start; -webkit-tap-highlight-color: transparent; transition: background-color .15s; }
.who:active { background: var(--surface-hi); }
.who__face { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; background: var(--surface-hi); color: var(--text-2); }
.who__icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.who__text { display: grid; gap: 2px; min-width: 0; }
.who__name { overflow: hidden; font: 700 15px/1.3 var(--font); white-space: nowrap; text-overflow: ellipsis; }
.who__trade, .who__count { overflow: hidden; font: 400 13px/1.25 var(--font); color: var(--text-2); white-space: nowrap; text-overflow: ellipsis; }
.who__count { color: var(--text-3); }
/* The person typed, over their works. */
.star { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; color: var(--text); -webkit-tap-highlight-color: transparent; }
.star__face { width: 48px; height: 48px; }
.star__text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.star__name { overflow: hidden; font: 700 22px/1.2 var(--font); letter-spacing: -.4px; white-space: nowrap; text-overflow: ellipsis; }
.star__line { overflow: hidden; font: 400 13px/1.3 var(--font); color: var(--text-2); white-space: nowrap; text-overflow: ellipsis; }
@media (min-width: 721px) {
  .found .row__track { gap: 12px; }
  .found .card { width: 168px; }
  .star__face { width: 56px; height: 56px; }
  .star__name { font-size: 28px; }
  .star__line { font-size: 15px; }
}
@media (hover: hover) and (pointer: fine) {
  .who:hover { background: var(--surface-hi); }
  .star:hover .star__name { color: var(--accent-text); }
}
@media (prefers-reduced-motion: reduce) { .who { transition: none; } }

/* ---------- What one can browse ---------- */
/* The heading small and in the accent, as the app: the lines say the rest. */
.browse__head { margin: 28px 0 4px; font: 700 14px/1.3 var(--font); color: var(--accent-text); }
.browse__list { list-style: none; margin: 0; padding: 0; }
.browse__row { display: flex; align-items: center; gap: 12px; min-height: 56px; border-bottom: 1px solid var(--line); color: var(--text); }
a.browse__row { -webkit-tap-highlight-color: transparent; transition: opacity .15s; }
a.browse__row:active { opacity: .6; }
.browse__label { flex: 1; min-width: 0; overflow: hidden; font: 500 17px/1.3 var(--font); white-space: nowrap; text-overflow: ellipsis; }
.browse__count { flex: none; font: 500 14px/1 var(--font); font-variant-numeric: tabular-nums; color: var(--text-3); }
.browse__chevron { flex: none; width: 16px; height: 16px; fill: none; stroke: var(--text-3); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.browse__row .skel--bar { height: 14px; }
@media (hover: hover) and (pointer: fine) {
  a.browse__row:hover { opacity: 1; }
  a.browse__row:hover .browse__chevron { stroke: var(--text-2); }
}

/* ---------- On a phone ---------- */
@media (max-width: 720px) {
  .search-page { padding-top: 4px; }
  /* In a phone's browser the header has no magnifier here (the field is the
     page): its buttons go to the right all the same, as on the other pages,
     where the magnifier pushes them (audit of 24/11/2026). */
  .page-search .top__moment { margin-left: auto; }
  /* A list or a kind of video: "←" back to the search. */
  .page-search.is-sub .top__back { display: grid; place-items: center; min-width: 44px; min-height: 44px; margin-left: -12px; font: 600 20px/1 var(--font); }
}
@media (prefers-reduced-motion: reduce) { .page-search .hit, a.browse__row, .find__clear { transition: none; } }
