/* Kino prototype: title page extras — technical badges and personal actions (Vu, Favori, À voir).
   Theme tokens only (--accent, --fg, --muted, --line, --surface, --font-mono), so all four themes follow. */

/* ---------- Technical badges ---------- */

.badges {
  display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none;
}
.badge {
  display: inline-flex; align-items: center; min-height: 26px; padding: 2px 10px;
  border: 1px solid var(--line); border-radius: 2px; color: var(--fg);
  font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: .04em; line-height: 1.2;
  white-space: nowrap;
}
/* Picture and sound formats are what a collector checks first: drawn in the accent colour. */
.badge-video, .badge-hdr, .badge-audio { border-color: var(--accent); color: var(--accent); }
.badge-lang { color: var(--muted); }

/* ---------- Ratings row (IMDb, Rotten Tomatoes, Metascore) ---------- */

/* Compact ratings in the top-right corner of every cover (ratings.js coverChipHTML).
   Sized in cqw: covers are containers, so the chip scales from small grid tiles to the big film page. */
.cover-ratings {
  position: absolute; z-index: 2; top: 4cqw; right: 4cqw;
  display: flex; flex-direction: column; align-items: flex-end; gap: 1.6cqw;
  pointer-events: none;
}
.cr-item {
  display: inline-flex; align-items: center; gap: 1.8cqw;
  padding: 1.2cqw 2.2cqw 1.2cqw 1.4cqw; border-radius: 2.4cqw;
  background: rgb(10 10 10 / .78); color: #fff;
  font-family: var(--font-ui); font-size: max(10px, 6.2cqw); font-weight: 700; line-height: 1;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 1px 3px rgb(0 0 0 / .4);
}
.cr-imdb {
  padding: .5cqw 1.3cqw; border-radius: 1cqw;
  background: #f5c518; color: #000;
  font-size: .78em; font-weight: 900; letter-spacing: -.02em;
}
.cr-tomato { width: 1.15em; height: 1.15em; flex: none; }
.cr-tomato.is-fresh { fill: #d9372b; }
.cr-tomato.is-fresh .leaf { fill: #3f9b4a; }
.cr-tomato.is-rotten { fill: #7fae3a; }
/* Tiny thumbnails (resume cards) stay clean. */
.resume-card .cover-ratings { display: none; }

.ratings { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin: 14px 0 0; }
.rating { display: inline-flex; align-items: center; gap: 7px; color: var(--fg); text-decoration: none; line-height: 1.2; }
.rating-mark { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.rating-value { font-family: var(--font-mono); font-size: 16px; font-weight: 600; }
.rating-imdb .rating-mark { padding: 1px 6px; border: 1px solid var(--line); border-radius: 2px; letter-spacing: .06em; }
a.rating:hover .rating-value, a.rating:focus-visible .rating-value { color: var(--accent); }
a.rating:focus-visible, .rating-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
.rating-icon { width: 18px; height: 18px; flex: none; }
.rating-icon.is-fresh { fill: var(--rt-fresh, #d9372b); }
.rating-icon.is-fresh .leaf { fill: var(--rt-leaf, #3f9b4a); }
.rating-icon.is-rotten { fill: var(--rt-rotten, #7fae3a); }
.rating-link { font-size: 13px; color: var(--muted); text-decoration-color: var(--line); text-underline-offset: 3px; }
.rating-link:hover { color: var(--accent); }

/* ---------- Actions: play first, personal toggles second ---------- */

.film .actions { align-items: center; gap: 12px 20px; }
.actions-play, .actions-personal { display: flex; flex-wrap: wrap; gap: 12px; }
.actions-personal { gap: 8px; }

.btn.btn-toggle {
  min-height: 44px; padding: 0 14px; gap: 8px;
  border-color: var(--line); background: transparent; color: var(--fg);
  letter-spacing: .08em;
}
.btn.btn-toggle svg { width: 18px; height: 18px; flex: none; }
.btn.btn-toggle:hover { border-color: var(--accent); }
.btn.btn-toggle[aria-pressed='true'] { border-color: var(--accent); color: var(--accent); }
.btn-toggle[data-toggle='favorite'][aria-pressed='true'] svg,
.btn-toggle[data-toggle='watchlist'][aria-pressed='true'] svg { fill: currentColor; }
.btn.btn-toggle[aria-busy='true'] { cursor: progress; opacity: .7; }

/* Themes that restyle every .btn: keep the toggles quiet beside the primary button. */
[data-kino-theme='palais'] .btn.btn-toggle { box-shadow: none; }
[data-kino-theme='programme'] .btn.btn-toggle { border-width: 1px; box-shadow: 2px 2px 0 var(--line); }

.personal-status { min-height: 1.4em; margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.personal-status:empty { margin: 0; min-height: 0; }

@media (max-width: 860px) {
  .actions-personal { width: 100%; }
  .btn.btn-toggle { flex: 1 1 0; justify-content: center; min-width: 0; padding: 0 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .btn.btn-toggle { transition: none; }
}

/* ---------- Fiche (facts) and Distribution ---------- */

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px 24px; margin: 28px 0 0; padding-top: 20px; border-top: 1px solid var(--line); }
.facts dt { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 2px 0 0; font-size: 14px; }
.facts a { color: var(--fg); text-decoration-color: var(--accent); text-underline-offset: 3px; }
.facts a:hover { color: var(--accent); }

.cast-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 20px 16px; margin: 0; padding: 0; list-style: none; }
.cast-card { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; text-decoration: none; color: var(--fg); border-radius: 8px; padding: 4px; }
.cast-photo {
  display: grid; place-items: center; width: 96px; height: 96px; overflow: hidden; border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 24px; font-weight: 600; letter-spacing: .04em;
}
.cast-photo img { width: 100%; height: 100%; object-fit: cover; }
.cast-name { font-size: 14px; font-weight: 600; }
.cast-role { font-size: 13px; color: var(--muted); }
.cast-card:hover .cast-name { color: var(--accent); }
.cast-card:hover .cast-photo { border-color: var(--accent); }
.cast-plain { margin: 0; color: var(--muted); }

@media (max-width: 640px) {
  .cast-list { display: flex; overflow-x: auto; gap: 16px; padding-bottom: 8px; scroll-snap-type: x proximity; }
  .cast-list li { flex: 0 0 110px; scroll-snap-align: start; }
}

/* ---------- Person page ---------- */

.person-head { display: flex; gap: 24px; align-items: flex-start; margin-bottom: 8px; }
.person-photo { flex: none; display: grid; place-items: center; width: 140px; height: 140px; overflow: hidden; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 40px; font-weight: 600; }
.person-photo img { width: 100%; height: 100%; object-fit: cover; }
.person-bio { max-width: 68ch; margin: 12px 0 0; line-height: 1.6; }
.person-link { display: inline-block; margin-top: 12px; }
.grid-role { display: block; margin-top: 2px; font-size: 12px; color: var(--accent); }
@media (max-width: 640px) { .person-head { flex-direction: column; align-items: center; text-align: center; } }
