/* Kino prototype: "Mode léger" (light mode). Loaded last among the stylesheets.
   Active under html[data-light='on'] (set by light-mode.js: Auto, Activé or Désactivé).
   Goal: same colours, fonts and layout per theme, but no blur, no blend modes on big layers,
   no decorative or infinite animation, no transitions, cheaper shadows.
   It mirrors each theme's "Reduced motion" block, plus the paint costs a TV feels most.
   The video player keeps its own animations (player.js waits for its exit animation) and
   its video is never touched: only the blurred track panel and the buffering light leak go. */

/* ---------- Settings control (always loaded): radio chips look like pressed chips ---------- */

.light-title { margin: 0; }
.light-desc { margin: 2px 0 12px; }
.light-choices .chip[aria-checked='true'] { background: var(--accent); color: var(--accent-fg); }
[data-kino-theme='palais'] .light-choices .chip[aria-checked='true'] {
  background: var(--brass-metal); color: var(--accent-fg); font-weight: 600;
}
[data-kino-theme='programme'] .light-choices .chip[aria-checked='true'] { background: var(--prog-ink); color: var(--surface); }
[data-kino-theme='console'] .light-choices .chip[aria-checked='true']:focus-visible { --kc-c: var(--accent-fg); }
/* .chips clips its overflow: draw the ring inside so it stays visible from the sofa */
.light-choices .chip:focus-visible { outline-offset: -4px; }
.light-status { margin-top: 10px; }

/* ---------- 1. Motion: everything in the interface is still ---------- */

html[data-light='on'] #app *,
html[data-light='on'] #app *::before,
html[data-light='on'] #app *::after,
html[data-light='on'] #overlay-root *,
html[data-light='on'] #overlay-root *::before,
html[data-light='on'] #overlay-root *::after {
  animation: none !important;
  transition: none !important;
}
html[data-light='on'] body,
html[data-light='on'] .ambient { transition: none; }

/* Theme rest states, as in their reduced-motion blocks (the global rule above stops them;
   these make sure the resting look is the finished one). */
html[data-light='on'][data-kino-theme='console'] .cap-meta::before { transform: translateX(101%); }

/* ---------- 2. Full-screen layers: grain, dust, flicker ---------- */

/* Grain: a blended layer over the whole page, recomposited on every scroll frame. */
html[data-light='on'] body::after { display: none; }

/* Cabine: dust jumping forever, the beam flickering at each change. */
html[data-light='on'][data-kino-theme='cabine'] body::before { animation: none; will-change: auto; }
/* !important: the flicker selector uses :has() and outranks this one. */
html[data-light='on'][data-kino-theme='cabine'] .ambient { animation: none !important; }

/* ---------- 3. Ambient light: a soft gradient instead of a huge blur ---------- */

html[data-light='on'] .ambient { filter: none; }
html[data-light='on']:not([data-kino-theme='cabine']):not([data-kino-theme='programme']) .ambient {
  background-color: transparent;
  background-image: radial-gradient(closest-side, var(--light-amb, var(--amb)) 25%, transparent);
}
html[data-light='on'][data-kino-theme='palais'] { --light-amb: color-mix(in srgb, var(--amb) 70%, #c9a24a); }
/* Cabine keeps its beam (gradients and mask), only the blur goes: the cone gets crisp edges. */
/* Programme: the halftone stays, printed normally rather than multiplied. */
html[data-light='on'][data-kino-theme='programme'] .ambient,
html[data-light='on'][data-kino-theme='programme'] .hero-word { mix-blend-mode: normal; }

/* ---------- 4. Glass: no backdrop blur, a near-opaque surface instead ---------- */

html[data-light='on'] .topbar {
  -webkit-backdrop-filter: none; backdrop-filter: none;
  background: color-mix(in srgb, var(--bg) 94%, transparent);
}
html[data-light='on'] .search { -webkit-backdrop-filter: none; backdrop-filter: none; }
html[data-light='on'] .adm-dialog::backdrop { -webkit-backdrop-filter: none; backdrop-filter: none; }
html[data-light='on'] .player .player-panel {
  -webkit-backdrop-filter: none; backdrop-filter: none;
  background: rgb(var(--pl-shade-rgb) / .95);
}
/* Player loader: the drifting light leak goes, the spinning reel (it means "loading") stays. */
html[data-light='on'] .player .player-leak { animation: none; opacity: 0; }

/* ---------- 5. Shelves and covers: cheaper paint on dozens of 3D faces ---------- */

/* The halftone texture on every cover and spine: same dots, no blend mode. */
html[data-light='on'] .cover::after,
html[data-light='on'] .spine::after { mix-blend-mode: normal; }

/* Case shadows: shorter blur radius, theme accents kept. Programme's flat printed
   shadow (no blur) is already cheap and stays as it is. */
html[data-light='on']:not([data-kino-theme='programme']) { --case-shadow: 0 16px 22px -16px rgba(0, 0, 0, .85); }
html[data-light='on'][data-kino-theme='palais'] {
  --case-shadow: 0 16px 22px -16px rgba(0, 0, 0, .9), 0 0 0 1px rgba(201, 162, 74, .24);
}
html[data-light='on'][data-kino-theme='console'] {
  --case-shadow: 0 16px 22px -16px rgba(0, 0, 0, .9), -1px 0 0 rgba(79, 209, 217, .4);
}
html[data-light='on'][data-kino-theme='cabine'] {
  --case-shadow: 0 16px 22px -16px #000, 0 -1px 0 rgba(255, 236, 200, .14);
}
html[data-light='on'] .film-cover .cover { box-shadow: 0 24px 36px -24px rgba(0, 0, 0, .7); }
