/* Thème commun « plateforme de streaming » des quatre templates (copié par _commun/sync-lib.php : modifier ici).
   Sombre, bannières plein écran, rangées d'affiches, lecteur. Aucun JavaScript, aucun style en ligne. */
:root {
  --bg: #0b0d12; --bg-2: #12151d; --bg-3: #1a1e29; --bg-4: #242a38; --line: #262c3b;
  --text: #f1f3f9; --muted: #9ba3b8; --dim: #6d7590;
  --accent: #ff3d57; --accent-2: #ffb547; --ok: #3ddc97; --link: #ff6b80;
  --radius: 12px; --radius-sm: 8px; --wrap: 1360px; --header: 68px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --shadow: 0 12px 40px rgba(0, 0, 0, .45);
  /* Couleurs dérivées (peaux : _commun/lib/Skin.php) ; valeurs du thème sombre d'origine. */
  --strong: #fff; --on-accent: #fff; --text-2: #dfe3ee; --fg-rgb: 255 255 255; --bg-rgb: 11 13 18; --accent-rgb: 255 61 87;
  --accent-hover: #ff5268; --accent-3: #ff7a45; --footer-bg: #07080c; --scheme: dark; --card-min: 160px;
  --text-soft: #d8dcea; --text-softer: #c9cfdd; --notice-text: #ffe2b5; --ok-text: #b9f5d8;
}
* { box-sizing: border-box; }
html { color-scheme: var(--scheme); scroll-behavior: smooth; scroll-padding-top: calc(var(--header) + 12px); }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--strong); }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; font-weight: 800; letter-spacing: -.015em; }
h1 { font-size: clamp(1.6rem, 3.6vw, 2.6rem); }
h2 { font-size: clamp(1.15rem, 2.2vw, 1.45rem); }
h2 small { font-weight: 500; color: var(--muted); font-size: .7em; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
small, .small { font-size: .86rem; color: var(--muted); }
code { background: var(--bg-3); padding: 1px 6px; border-radius: 6px; font-size: .9em; }
table { border-collapse: collapse; width: 100%; }
.ico { width: 1.15em; height: 1.15em; fill: currentColor; flex: none; vertical-align: -.2em; }
.wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }
.full-bleed { width: 100vw; margin-inline-start: calc(50% - 50vw); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 8px; top: -80px; background: var(--accent); color: var(--on-accent); padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { top: 8px; }

/* ------------------------------------------------------------ en-tête */
.site-header { position: sticky; top: 0; z-index: 40; background: rgb(var(--bg-rgb) / .92); backdrop-filter: blur(12px); border-bottom: 1px solid rgb(var(--fg-rgb) / .06); }
.header-inner { display: flex; align-items: center; gap: 22px; min-height: var(--header); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 900; font-size: 1.25rem; letter-spacing: -.02em; flex: none; }
.brand:hover { color: var(--text); }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(135deg, var(--accent), var(--accent-3)); color: var(--on-accent); box-shadow: 0 6px 18px rgb(var(--accent-rgb) / .35); }
.brand-mark .ico { width: 18px; height: 18px; margin-left: 2px; }
.nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; flex: 1; }
.nav::-webkit-scrollbar { display: none; }
.nav a { color: var(--muted); font-weight: 600; font-size: .95rem; padding: 8px 12px; border-radius: 999px; white-space: nowrap; }
.nav a:hover { color: var(--text); background: rgb(var(--fg-rgb) / .06); }
.nav a[aria-current="page"] { color: var(--strong); background: rgb(var(--accent-rgb) / .16); }
.search { display: flex; align-items: center; background: var(--bg-3); border: 1px solid var(--line); border-radius: 999px; padding: 3px 4px 3px 16px; width: min(340px, 34vw); flex: none; }
.search:focus-within { border-color: var(--accent); }
.search input { flex: 1; min-width: 0; background: transparent; border: 0; color: var(--text); font: inherit; font-size: .92rem; padding: 7px 0; outline: none; }
.search input::placeholder { color: var(--dim); }
.search button { border: 0; background: var(--accent); color: var(--on-accent); width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; }
.local-badge { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; padding: 4px 9px; border-radius: 999px; background: rgba(255, 181, 71, .14); color: var(--accent-2); border: 1px solid rgba(255, 181, 71, .3); flex: none; }
@media (max-width: 900px) {
  .header-inner { flex-wrap: wrap; gap: 10px 14px; padding: 10px 0; }
  .nav { order: 3; flex-basis: 100%; }
  .search { width: auto; flex: 1; }
}

/* ------------------------------------------------------------ boutons, puces */
.button { display: inline-flex; align-items: center; gap: 8px; padding: 11px 20px; border-radius: 999px; border: 0; background: var(--accent); color: var(--on-accent); font: inherit; font-weight: 700; cursor: pointer; transition: transform .15s, background .15s; }
.button:hover { color: var(--on-accent); transform: translateY(-1px); background: var(--accent-hover); }
.button-play { background: #fff; color: #0b0d12; }
.button-play:hover { background: #e9ecf4; color: #0b0d12; }
.button-ghost { background: rgba(255, 255, 255, .1); color: #fff; backdrop-filter: blur(6px); border: 1px solid rgba(255, 255, 255, .14); }
.button-ghost:hover { background: rgba(255, 255, 255, .18); }
.chips, .filters { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips a, .chips span, .filters a { display: inline-flex; align-items: center; gap: 7px; padding: 6px 13px; border-radius: 999px; background: var(--bg-3); border: 1px solid var(--line); color: var(--text); font-size: .86rem; font-weight: 600; }
.chips a:hover, .filters a:hover { border-color: var(--accent); color: var(--strong); }
.chips img { border-radius: 6px; }
.chips small { color: var(--muted); }
.chips-large a { font-size: .98rem; padding: 10px 16px; }
.chips-small span { font-size: .78rem; padding: 4px 10px; font-weight: 500; }
.chips-logo a { padding: 5px 13px 5px 5px; }
.genre-chips a { background: rgb(var(--fg-rgb) / .08); border-color: rgb(var(--fg-rgb) / .12); }
.chips a[aria-current="page"], .filters a[aria-current="page"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.badge { display: inline-block; font-size: .78rem; font-weight: 800; padding: 3px 9px; border-radius: 999px; background: var(--bg-3); }
.badge-score { color: var(--accent-2); }
.meta-badges { list-style: none; padding: 0; margin: 10px 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.meta-badges li { font-size: .88rem; font-weight: 600; color: var(--text-2); padding: 4px 10px; border-radius: 6px; background: rgb(var(--fg-rgb) / .08); display: inline-flex; align-items: center; gap: 5px; }
.meta-badges li small { color: var(--muted); font-weight: 500; }
.meta-badges .badge-rating { background: rgba(255, 181, 71, .16); color: var(--accent-2); }
.meta-badges .badge-cert { border: 1px solid rgb(var(--fg-rgb) / .35); background: transparent; }
.meta-badges .badge-live { background: rgba(61, 220, 151, .15); color: var(--ok); }
.meta-badges .badge-code { background: var(--accent); color: var(--on-accent); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

/* ------------------------------------------------------------ avis, vides */
main { padding-bottom: 60px; min-height: 60vh; }
.notices { margin: 14px 0; }
.notice { background: rgba(255, 181, 71, .1); border: 1px solid rgba(255, 181, 71, .35); color: var(--notice-text); padding: 10px 14px; border-radius: 10px; margin: 0 0 8px; font-size: .92rem; }
.notice-block { background: var(--bg-2); border: 1px solid var(--accent); border-radius: var(--radius); padding: 20px; margin: 20px 0; }
.empty { color: var(--muted); padding: 22px; border: 1px dashed var(--line); border-radius: var(--radius); text-align: center; margin: 0; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .72rem; font-weight: 800; color: var(--accent); margin-bottom: 6px; }
.lead { font-size: 1.05rem; color: var(--muted); max-width: 75ch; }

/* ------------------------------------------------------------ bannière d'accueil */
.hero-banner { position: relative; min-height: min(78vh, 720px); display: flex; align-items: flex-end; overflow: hidden; margin-top: 0; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgb(var(--bg-rgb) / .96) 0%, rgb(var(--bg-rgb) / .7) 38%, rgb(var(--bg-rgb) / .1) 70%), linear-gradient(0deg, var(--bg) 0%, rgb(var(--bg-rgb) / 0) 45%); }
.hero-content { position: relative; padding: 120px 0 34px; }
.hero-tag { display: inline-flex; gap: 8px; align-items: center; font-size: .85rem; font-weight: 700; color: var(--muted); margin-bottom: 12px; }
.hero-tag span { color: var(--accent-2); display: inline-flex; align-items: center; gap: 5px; }
.hero-title { font-size: clamp(2rem, 5.2vw, 4rem); line-height: 1; max-width: 16ch; margin-bottom: 8px; text-shadow: 0 4px 30px rgba(0, 0, 0, .6); }
.hero-title a { color: var(--strong); }
.hero-overview { max-width: 60ch; color: var(--text-soft); font-size: 1.04rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 0; }
.hero-next { list-style: none; padding: 0; margin: 28px 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 220px)); gap: 12px; }
.hero-next a { display: block; position: relative; border-radius: var(--radius-sm); overflow: hidden; aspect-ratio: 16/9; border: 2px solid rgb(var(--fg-rgb) / .12); }
.hero-next a:hover { border-color: var(--strong); }
.hero-next img { width: 100%; height: 100%; object-fit: cover; }
.hero-next span { position: absolute; inset: auto 0 0; padding: 18px 10px 8px; font-size: .82rem; font-weight: 700; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, .85)); }
@media (max-width: 760px) { .hero-next { grid-template-columns: repeat(2, 1fr); } .hero-banner { min-height: 70vh; } }
.intro { margin: 18px 0 8px; }
.intro h1 { font-size: clamp(1.25rem, 2.6vw, 1.7rem); margin-bottom: 4px; }
.intro p { color: var(--muted); margin: 0; max-width: 85ch; }

/* ------------------------------------------------------------ rangées d'affiches */
.row-section { margin-top: 34px; }
.row-head, .block-head, .section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.row-head h2, .block-head h2, .section-head h2 { margin: 0; }
.row-more { display: inline-flex; align-items: center; gap: 2px; font-size: .9rem; font-weight: 700; color: var(--muted); white-space: nowrap; }
.row-more:hover { color: var(--strong); }
.row-scroll { display: grid; grid-auto-flow: column; grid-auto-columns: 168px; gap: 14px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; padding: 4px 2px 12px; scrollbar-width: thin; scrollbar-color: var(--bg-4) transparent; }
.row-scroll > * { scroll-snap-align: start; }
@media (min-width: 1200px) { .row-scroll { grid-auto-columns: calc((100% - 7 * 14px) / 8); } }
.row-ranked { grid-auto-columns: 210px; }
@media (min-width: 1200px) { .row-ranked { grid-auto-columns: calc((100% - 5 * 14px) / 6); } }
.row-episodes { grid-auto-columns: 280px; }
@media (min-width: 1200px) { .row-episodes { grid-auto-columns: calc((100% - 4 * 14px) / 5); } }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--card-min), 1fr)); gap: 22px 16px; }
.card { min-width: 0; position: relative; }
.card-link { display: block; color: var(--text); }
.card-link:hover { color: var(--strong); }
.card-poster { position: relative; display: block; aspect-ratio: 2 / 3; border-radius: var(--radius-sm); overflow: hidden; background: var(--bg-3); box-shadow: 0 6px 20px rgba(0, 0, 0, .35); }
.card-poster .poster { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.card-link:hover .card-poster .poster { transform: scale(1.06); }
.poster-empty { display: grid !important; place-items: center; width: 100%; height: 100%; color: var(--dim); }
.poster-empty .ico { width: 36px; height: 36px; }
.card-type { position: absolute; top: 8px; inset-inline-start: 8px; font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; padding: 3px 7px; border-radius: 5px; background: rgb(var(--bg-rgb) / .8); color: var(--strong); }
.card-rating { position: absolute; top: 8px; inset-inline-end: 8px; display: inline-flex; align-items: center; gap: 3px; font-size: .75rem; font-weight: 800; padding: 3px 7px; border-radius: 5px; background: rgb(var(--bg-rgb) / .8); color: var(--accent-2); }
.card-rating .ico { width: 12px; height: 12px; }
.card-hover { position: absolute; inset: 0; display: grid; place-items: center; background: rgb(var(--bg-rgb) / .45); opacity: 0; transition: opacity .2s; }
.card-link:hover .card-hover, .card-link:focus-visible .card-hover { opacity: 1; }
.card-play { width: 54px; height: 54px; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; box-shadow: 0 8px 24px rgb(var(--accent-rgb) / .5); }
.card-play .ico { width: 26px; height: 26px; margin-left: 3px; }
.card-title { display: block; margin-top: 9px; font-weight: 700; font-size: .93rem; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-meta { display: block; font-size: .8rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-ranked .card-link { display: grid; grid-template-columns: 52px 1fr; align-items: end; }
.card-rank { font-size: 5.4rem; font-weight: 900; line-height: .8; color: var(--bg); -webkit-text-stroke: 2px rgb(var(--fg-rgb) / .55); letter-spacing: -.08em; margin-bottom: 42px; text-align: right; padding-right: 4px; }
.card-ranked .card-poster, .card-ranked .card-title, .card-ranked .card-meta { grid-column: 2; }
.card-ranked .card-title { margin-top: 9px; }

/* ------------------------------------------------------------ cartes épisodes */
.ep-card { min-width: 0; }
.ep-card a { display: block; color: var(--text); }
.ep-card a:hover { color: var(--strong); }
.ep-thumb { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: var(--radius-sm); overflow: hidden; background: var(--bg-3); }
.ep-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.ep-card a:hover .ep-thumb img, .ep-item a:hover .ep-thumb img { transform: scale(1.05); }
.ep-code { position: absolute; inset-inline-start: 8px; top: 8px; background: var(--accent); color: var(--on-accent); font: 800 .72rem/1 ui-monospace, SFMono-Regular, Menlo, monospace; padding: 4px 7px; border-radius: 5px; }
.ep-len { position: absolute; inset-inline-end: 8px; bottom: 8px; background: rgba(0, 0, 0, .78); color: #fff; font-size: .72rem; font-weight: 700; padding: 3px 6px; border-radius: 5px; font-variant-numeric: tabular-nums; }
.ep-playicon { position: absolute; inset: 0; display: grid; place-items: center; background: rgb(var(--bg-rgb) / .35); opacity: 0; transition: opacity .2s; color: #fff; }
.ep-playicon .ico { width: 44px; height: 44px; padding: 10px; border-radius: 50%; background: rgb(var(--accent-rgb) / .92); }
.ep-card a:hover .ep-playicon, .ep-item a:hover .ep-playicon { opacity: 1; }
.ep-card.current .ep-thumb { outline: 3px solid var(--accent); outline-offset: -3px; }
.ep-info { display: block; padding: 9px 2px 0; }
.ep-show { display: block; font-size: .74rem; color: var(--accent-2); font-weight: 800; text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ep-name { display: block; font-weight: 700; font-size: .93rem; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ep-info small { display: block; }
.ep-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px 14px; }

.ep-list { display: grid; gap: 12px; }
.ep-item a { display: grid; grid-template-columns: minmax(150px, 260px) 1fr; gap: 16px; align-items: start; padding: 10px; border-radius: var(--radius); background: var(--bg-2); border: 1px solid transparent; color: var(--text); transition: border-color .15s, background .15s; }
.ep-item a:hover { background: var(--bg-3); border-color: var(--line); color: var(--strong); }
.ep-item.upcoming a { opacity: .6; }
.ep-body { min-width: 0; display: block; }
.ep-title { display: block; font-weight: 800; font-size: 1rem; line-height: 1.3; }
.ep-meta { display: block; font-size: .84rem; color: var(--muted); margin: 3px 0 6px; }
.ep-desc { display: block; font-size: .9rem; color: var(--text-softer); line-height: 1.45; }
@media (max-width: 620px) { .ep-item a { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------ fiches (bannière + affiche) */
.detail-hero { position: relative; overflow: hidden; background: var(--bg-2); }
.detail-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 25%; }
.detail-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgb(var(--bg-rgb) / .97) 0%, rgb(var(--bg-rgb) / .82) 45%, rgb(var(--bg-rgb) / .45) 100%), linear-gradient(0deg, var(--bg) 0%, rgb(var(--bg-rgb) / 0) 50%); }
.detail-inner { position: relative; display: grid; grid-template-columns: 260px 1fr; gap: 36px; padding: 34px 0 40px; align-items: end; }
.detail-hero-small .detail-inner { grid-template-columns: 170px 1fr; padding: 26px 0 30px; }
.detail-poster .poster, .detail-poster .poster-empty { width: 100%; aspect-ratio: 2/3; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }
.detail-info { min-width: 0; }
.detail-info .breadcrumb ol { margin-bottom: 14px; }
.detail-info h1 { max-width: 28ch; text-shadow: 0 2px 20px rgba(0, 0, 0, .5); }
.alt-title { color: var(--muted); margin: -4px 0 4px; font-style: italic; }
.tagline { color: var(--text-soft); font-style: italic; margin: 10px 0 0; }
.detail-overview { color: var(--text-soft); max-width: 72ch; margin: 12px 0 0; }
.detail-credits { margin: 10px 0 0; font-size: .92rem; }
.detail-credits span { color: var(--muted); margin-inline-end: 4px; }
.detail-credits span + a, .detail-credits a { color: var(--strong); font-weight: 600; }
.next-ep { display: inline-flex; align-items: center; gap: 8px; margin: 16px 0 0; padding: 8px 14px; border-radius: 999px; background: rgba(61, 220, 151, .12); color: var(--ok-text); font-size: .9rem; }
.next-ep a { color: var(--strong); font-weight: 700; }
@media (max-width: 760px) {
  .detail-inner, .detail-hero-small .detail-inner { grid-template-columns: 1fr; gap: 18px; padding-top: 22px; }
  .detail-poster { max-width: 170px; }
}

/* ------------------------------------------------------------ mise en page de contenu */
.content-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 34px; margin-top: 26px; align-items: start; }
@media (max-width: 980px) { .content-grid { grid-template-columns: 1fr; } }
.block { margin-top: 28px; }
.content-main > .block:first-child, .watch-main > .block:first-child { margin-top: 0; }
.content-side, .fiche-aside { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; position: sticky; top: calc(var(--header) + 14px); }
@media (max-width: 980px) { .content-side, .fiche-aside { position: static; } }
.content-side h2, .fiche-aside h2 { font-size: .95rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 18px 0 10px; }
.content-side h2:first-child, .fiche-aside h2:first-child { margin-top: 0; }
.facts { margin: 0; display: grid; gap: 8px; }
.facts div { display: grid; grid-template-columns: 112px 1fr; gap: 10px; font-size: .9rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; color: var(--text-soft); }
.links { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: .9rem; }
.season-list { display: grid; gap: 8px; }
.season-card { display: flex; gap: 10px; align-items: center; padding: 6px; border-radius: var(--radius-sm); color: var(--text); border: 1px solid transparent; }
.season-card:hover { background: var(--bg-3); color: var(--strong); }
.season-card.current { background: rgb(var(--accent-rgb) / .12); border-color: rgb(var(--accent-rgb) / .4); }
.season-card strong, .season-card small { display: block; }
.season-poster { flex: 0 0 42px; }
.thumb { width: 44px; aspect-ratio: 2/3; object-fit: cover; border-radius: 6px; background: var(--bg-3); display: block; }
.season-tabs { margin: 0 0 16px; }
.season-tabs a { background: var(--bg-2); }

/* ------------------------------------------------------------ où regarder */
.watch { padding: 20px; border-radius: var(--radius); background: linear-gradient(135deg, rgba(61, 220, 151, .08), rgb(var(--fg-rgb) / .02)); border: 1px solid rgba(61, 220, 151, .25); }
.watch h2 { font-size: 1.15rem; }
.watch-none { color: var(--muted); }
.provider-group { display: grid; grid-template-columns: 150px 1fr; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid rgb(var(--fg-rgb) / .06); }
.provider-group:first-of-type { border-top: 0; }
.provider-label { font-size: .76rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.provider-list { display: flex; flex-wrap: wrap; gap: 8px; }
.provider { display: inline-flex; align-items: center; gap: 9px; padding: 5px 14px 5px 5px; border-radius: 10px; background: var(--bg-3); border: 1px solid var(--line); color: var(--text); font-weight: 700; font-size: .9rem; }
.provider img { width: 34px; height: 34px; border-radius: 8px; }
a.provider:hover { border-color: var(--ok); color: var(--strong); }
@media (max-width: 620px) { .provider-group { grid-template-columns: 1fr; gap: 6px; } }

/* ------------------------------------------------------------ casting */
.cast-row { display: grid; grid-auto-flow: column; grid-auto-columns: 112px; gap: 14px; overflow-x: auto; padding-bottom: 10px; scrollbar-width: thin; scrollbar-color: var(--bg-4) transparent; }
.cast { display: block; text-align: center; color: var(--text); }
.cast:hover { color: var(--strong); }
.cast-photo { display: grid; place-items: center; width: 96px; height: 96px; margin: 0 auto 8px; border-radius: 50%; overflow: hidden; background: var(--bg-3); color: var(--dim); border: 2px solid var(--line); }
.cast:hover .cast-photo { border-color: var(--accent); }
.cast-photo img { width: 100%; height: 100%; object-fit: cover; }
.cast strong { display: block; font-size: .85rem; line-height: 1.25; }
.cast small { display: block; font-size: .76rem; line-height: 1.25; margin-top: 2px; }
.trailer { position: relative; display: block; border-radius: var(--radius); overflow: hidden; max-width: 560px; aspect-ratio: 16/9; }
.trailer img { width: 100%; height: 100%; object-fit: cover; }
.trailer-play { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, .3); color: #fff; }
.trailer-play .ico { width: 64px; height: 64px; padding: 16px; border-radius: 50%; background: rgb(var(--accent-rgb) / .9); }
.trailer-name { position: absolute; inset: auto 0 0; padding: 22px 14px 10px; background: linear-gradient(transparent, rgba(0, 0, 0, .85)); color: #fff; font-weight: 700; font-size: .9rem; }

/* ------------------------------------------------------------ lecteur */
.player { margin: 22px 0 0; border-radius: var(--radius); overflow: hidden; background: #000; box-shadow: var(--shadow); border: 1px solid var(--line); }
.player-top { display: flex; align-items: center; gap: 12px; padding: 8px 12px; background: var(--bg-2); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.player-label { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.player-versions { display: flex; gap: 6px; }
.pv { padding: 5px 12px; border-radius: 6px; font-size: .82rem; font-weight: 800; color: var(--muted); background: var(--bg-3); border: 1px solid var(--line); }
.pv.current, .pv:hover { color: var(--on-accent); background: var(--accent); border-color: var(--accent); }
.player-demo { margin-left: auto; font-size: .7rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; padding: 4px 9px; border-radius: 6px; color: var(--accent-2); border: 1px solid rgba(255, 181, 71, .4); }
.player-screen { position: relative; display: block; aspect-ratio: 16 / 9; background: #000; overflow: hidden; color: #fff; cursor: pointer; }
.player-screen:hover { color: #fff; }
.player-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s, filter .3s; }
.player-screen:hover .player-bg { transform: scale(1.02); filter: brightness(1.08); }
.player-shade { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0, 0, 0, .85) 0%, rgba(0, 0, 0, 0) 32%), linear-gradient(180deg, rgba(0, 0, 0, .65) 0%, rgba(0, 0, 0, 0) 22%), rgba(0, 0, 0, .18); }
.player-title { position: absolute; top: 14px; left: 18px; right: 18px; font-weight: 700; font-size: clamp(.85rem, 1.6vw, 1.05rem); text-shadow: 0 2px 8px rgba(0, 0, 0, .8); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: clamp(64px, 9vw, 96px); height: clamp(64px, 9vw, 96px); border-radius: 50%; background: rgb(var(--accent-rgb) / .92); display: grid; place-items: center; box-shadow: 0 0 0 10px rgb(var(--accent-rgb) / .2), 0 14px 40px rgba(0, 0, 0, .55); transition: transform .2s, box-shadow .2s; }
.player-play .ico { width: 46%; height: 46%; margin-left: 6%; }
.player-screen:hover .player-play { transform: translate(-50%, -50%) scale(1.08); box-shadow: 0 0 0 16px rgb(var(--accent-rgb) / .22), 0 14px 40px rgba(0, 0, 0, .55); }
.player-controls { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 14px 10px; }
.player-progress { position: relative; display: block; height: 5px; border-radius: 999px; background: rgba(255, 255, 255, .25); margin-bottom: 10px; }
.player-buffer { position: absolute; left: 0; top: 0; bottom: 0; width: 18%; border-radius: 999px; background: rgba(255, 255, 255, .45); }
.player-knob { position: absolute; left: 0; top: 50%; width: 13px; height: 13px; border-radius: 50%; background: var(--accent); transform: translate(-30%, -50%); box-shadow: 0 0 0 3px rgb(var(--accent-rgb) / .35); }
.player-row { display: flex; align-items: center; gap: clamp(8px, 1.6vw, 18px); }
.pc { display: grid; place-items: center; opacity: .9; }
.pc .ico { width: clamp(18px, 2vw, 24px); height: clamp(18px, 2vw, 24px); }
.player-time { font-size: clamp(.75rem, 1.3vw, .88rem); font-weight: 600; font-variant-numeric: tabular-nums; }
.player-spacer { flex: 1; }
@media (max-width: 520px) { .player-row .pc:nth-child(2), .player-row .pc:nth-child(3), .player-row .pc:nth-child(8) { display: none; } }

/* fenêtre « Où regarder » : affichée par l'ancre #regarder (CSS :target), sans JavaScript */
.modal { display: none; position: fixed; inset: 0; z-index: 80; }
.modal:target { display: grid; place-items: center; padding: 16px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(4, 5, 8, .82); backdrop-filter: blur(4px); }
.modal-box { position: relative; width: min(100%, 580px); max-height: 90vh; overflow: auto; background: var(--bg-2); border: 1px solid var(--line); border-radius: 16px; padding: 26px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); animation: pop .18s ease-out; }
@keyframes pop { from { transform: scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-box h2 { margin-top: 0; font-size: 1.4rem; }
.modal-close { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-3); color: var(--text); }
.modal-close:hover { background: var(--accent); color: var(--on-accent); }
.modal-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 0; }

/* ------------------------------------------------------------ page épisode */
.watch-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 26px; align-items: start; }
.watch-layout .player { margin-top: 6px; }
@media (max-width: 1080px) { .watch-layout { grid-template-columns: 1fr; } }
.ep-head { margin-top: 18px; }
.ep-head h1 { font-size: clamp(1.35rem, 2.8vw, 2rem); }
.ep-nav { display: flex; justify-content: space-between; gap: 10px; margin: 16px 0 0; flex-wrap: wrap; }
.ep-nav a { display: inline-flex; align-items: center; gap: 6px; padding: 10px 16px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line); color: var(--text); font-weight: 700; font-size: .9rem; }
.ep-nav a small { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--accent-2); margin-left: 4px; }
.ep-nav a:hover { border-color: var(--accent); color: var(--strong); }
.ep-nav .ep-nav-all { background: transparent; }
.watch-side { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; position: sticky; top: calc(var(--header) + 14px); max-height: calc(100vh - var(--header) - 28px); display: flex; flex-direction: column; }
@media (max-width: 1080px) { .watch-side { position: static; max-height: none; } }
.aside-show { display: flex; gap: 12px; align-items: center; color: var(--text); padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.aside-show:hover { color: var(--strong); }
.aside-show strong, .aside-show small { display: block; }
.side-head { display: flex; justify-content: space-between; align-items: baseline; margin: 12px 0 8px; }
.side-head h2 { margin: 0; font-size: 1.05rem; }
.side-head span { color: var(--muted); font-size: .85rem; }
.watch-side .season-tabs { margin: 0 0 10px; gap: 6px; flex-wrap: wrap; overflow: visible; padding-bottom: 0; }
.watch-side .season-tabs a { font-size: .8rem; padding: 5px 11px; white-space: nowrap; }
.ep-side { overflow-y: auto; display: grid; gap: 4px; padding-right: 4px; scrollbar-width: thin; scrollbar-color: var(--bg-4) transparent; }
.ep-row { display: grid; grid-template-columns: 118px 1fr; gap: 10px; align-items: center; padding: 6px; border-radius: var(--radius-sm); color: var(--text); }
.ep-row:hover { background: var(--bg-3); color: var(--strong); }
.ep-row.current { background: rgb(var(--accent-rgb) / .14); box-shadow: inset 3px 0 0 var(--accent); }
.ep-row-thumb { position: relative; display: block; aspect-ratio: 16/9; border-radius: 6px; overflow: hidden; background: var(--bg-4); }
.ep-row-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ep-row-now { position: absolute; inset: 0; display: grid; place-items: center; background: rgb(var(--accent-rgb) / .55); color: var(--on-accent); }
.ep-row-info { min-width: 0; }
.ep-row-info strong { display: block; font-size: .86rem; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ep-row-info small { display: block; font-size: .76rem; }

/* ------------------------------------------------------------ pages listes et génériques */
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; padding: 0; margin: 18px 0 12px; font-size: .84rem; color: var(--muted); }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--strong); }
.breadcrumb li + li::before { content: "/"; margin: 0 7px; color: var(--dim); }
.page-head { margin: 8px 0 22px; }
.page-head h1 small { font-size: .55em; color: var(--muted); font-weight: 500; }
.section { margin-top: 34px; }
.section-sm { margin-top: 26px; }
.section-split { display: grid; gap: 30px; }
@media (min-width: 900px) { .section-split { grid-template-columns: 1fr 1fr; } }
.browse { display: grid; gap: 24px; }
@media (min-width: 1000px) { .browse { grid-template-columns: 1.1fr 1.3fr 1fr; } }
.pagination { display: flex; justify-content: center; align-items: center; gap: 14px; margin: 30px 0 10px; }
.pagination a, .pagination .disabled { padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg-2); color: var(--text); font-weight: 600; }
.pagination a:hover { border-color: var(--accent); }
.pagination .disabled { color: var(--dim); }
.page-info { color: var(--muted); font-size: .9rem; }
.ranked, .stack, .credits { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.ranked a, .stack a, .credits a { display: flex; align-items: center; gap: 12px; padding: 8px 10px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; color: var(--text); }
.ranked a:hover, .stack a:hover, .credits a:hover { border-color: var(--accent); color: var(--strong); }
.ranked a > span:nth-child(3), .stack a > span:nth-child(2), .credits a > span:nth-child(2) { flex: 1; min-width: 0; }
.ranked strong, .stack strong, .credits strong { display: block; font-size: .95rem; line-height: 1.3; }
.ranked small, .stack small, .credits small { display: block; }
.rank { font-weight: 900; font-size: 1.2rem; color: var(--accent); min-width: 1.6em; text-align: center; }
.ranked-thumb { flex: 0 0 44px; }
.fiche-head { display: grid; gap: 24px; margin: 8px 0 20px; }
@media (min-width: 720px) { .fiche-head { grid-template-columns: 240px 1fr; } }
.fiche-poster .poster, .fiche-poster .poster-empty { width: 100%; aspect-ratio: 2/3; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }
.fiche-body { display: grid; gap: 28px; }
@media (min-width: 900px) { .fiche-body { grid-template-columns: 1fr 320px; align-items: start; } }
.stats { display: flex; flex-wrap: wrap; gap: 10px 24px; margin: 10px 0; }
.stat strong { display: block; font-size: 1.25rem; }
.stat span { font-size: .8rem; color: var(--muted); }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: .92rem; }
.table th { color: var(--muted); font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; }
.people { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.people li { display: flex; gap: 10px; align-items: center; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px; }
.people img { width: 50px; height: 75px; object-fit: cover; border-radius: 6px; flex: none; }
.people strong, .people small { display: block; }
.prose { max-width: 75ch; }
.prose h2 { margin-top: 26px; }
.search-page { max-width: 640px; width: 100%; margin: 12px 0; }
.error-page { padding: 60px 0; text-align: center; }
.error-page p:last-child { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.method { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.method-grid { display: grid; gap: 18px; }
@media (min-width: 760px) { .method-grid { grid-template-columns: repeat(3, 1fr); } }

/* ------------------------------------------------------------ pied de page */
.site-footer { margin-top: 40px; background: var(--footer-bg); border-top: 1px solid rgb(var(--fg-rgb) / .06); padding: 36px 0 30px; color: var(--muted); }
.footer-inner { display: grid; gap: 28px; }
@media (min-width: 860px) { .footer-inner { grid-template-columns: 1.4fr 1fr 1.2fr; } }
.footer-inner .brand { margin-bottom: 10px; }
.footer-title { color: var(--text); font-weight: 800; margin-bottom: 10px; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; font-size: .9rem; }
.footer-links a, .attribution a { color: var(--muted); }
.footer-links a:hover, .attribution a:hover { color: var(--strong); }
.tmdb-logo { display: inline-block; margin-bottom: 8px; }
.tmdb-logo img { height: 16px; width: auto; }

/* --- correctifs : vignettes à hauteur automatique, colonnes qui ne débordent jamais sur mobile --- */
.thumb { height: auto; }
.watch-layout > *, .content-grid > *, .detail-inner > *, .fiche-body > * { min-width: 0; }
.season-card .thumb, .aside-show .thumb { width: 44px; height: 66px; }
.aside-show .thumb { width: 54px; height: 81px; }
@media (max-width: 620px) {
  .wrap { width: min(100% - 24px, var(--wrap)); }
  .search { flex-basis: 100%; order: 2; }
  .local-badge { display: none; }
  .ep-nav a { flex: 1; justify-content: center; }
  .ep-nav .ep-nav-all { order: 3; flex-basis: 100%; }
  .row-scroll { grid-auto-columns: 132px; }
  .row-ranked { grid-auto-columns: 172px; }
  .row-episodes { grid-auto-columns: 240px; }
  .card-rank { font-size: 4.2rem; }
  .hero-content { padding-top: 90px; }
  .facts div { grid-template-columns: 100px 1fr; }
}
@media (max-width: 1080px) { .watch-layout { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 980px) { .content-grid { grid-template-columns: minmax(0, 1fr); } }
.watch-side, .watch-side .season-tabs, .ep-side { max-width: 100%; min-width: 0; }

/* ------------------------------------------------------------ contenu SEO : à propos, FAQ */
.about p { color: var(--text-soft); max-width: 80ch; }
.faq-list { display: grid; gap: 10px; }
.faq-item { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; }
.faq-item h3 { font-size: 1rem; margin: 0 0 6px; }
.faq-item p { margin: 0; color: var(--text-softer); }
.seo-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; }

/* ------------------------------------------------------------ éléments propres à certaines sources */
.ep-placeholder { display: grid; place-items: center; height: 100%; font-size: 2rem; font-weight: 900; color: var(--bg-4); }
.player-bg-portrait { object-fit: contain; background: #07080c; }
.sources { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.source, .match { font-size: .76rem; font-weight: 800; padding: 3px 10px; border-radius: 999px; color: var(--on-accent); }
.source-jikan { background: #2e51a2; }
.source-tvmaze { background: #3c948b; }
.source-tmdb { background: #01b4e4; color: #062a3a; }
.match { background: var(--bg-3); color: var(--text); border: 1px solid var(--line); font-weight: 600; }
.match-certaine { border-color: var(--ok); }
.match-haute { border-color: var(--accent-2); }
.match-moyenne { border-style: dashed; }
.provider .ico { opacity: .6; }
.watch-list { list-style: none; padding: 0; margin: 0 0 6px; display: flex; flex-wrap: wrap; gap: 8px; }
.watch-list a { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 10px; background: var(--bg-3); border: 1px solid var(--line); color: var(--text); font-weight: 700; }
.watch-list a:hover { border-color: var(--ok); color: var(--strong); }
.episodes, .schedule { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.episodes a, .schedule a { display: flex; gap: 12px; align-items: center; padding: 8px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; color: var(--text); }
.episodes a:hover, .schedule a:hover { border-color: var(--accent); color: var(--strong); }
.still { flex: 0 0 120px; aspect-ratio: 16/9; border-radius: 8px; overflow: hidden; background: var(--bg-3); }
.still img { width: 100%; height: 100%; object-fit: cover; }
.ep-body small { display: block; }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8rem; color: var(--accent-2); font-weight: 800; }
.time { font-variant-numeric: tabular-nums; font-weight: 800; min-width: 3.4em; color: var(--accent-2); }
.schedule a > span:nth-child(3) { flex: 1; min-width: 0; }
.schedule strong, .schedule small { display: block; }
.people-full img { width: 60px; height: 90px; }
.portrait { border-radius: 12px; object-fit: cover; }
.studio-head { display: flex; gap: 18px; align-items: flex-start; }
.studio-logo { border-radius: 12px; background: #fff; padding: 6px; }
.relations { padding-inline-start: 18px; }
.relations li { margin-bottom: 6px; }
.days a { min-width: 86px; text-align: center; justify-content: center; }
.seasons td a { display: inline-block; padding: 3px 0; }
details summary { cursor: pointer; color: var(--link); }
.lead a { font-weight: 600; }

/* Casting complet : grille sur plusieurs lignes au lieu d'une rangée défilante. */
.cast-row.cast-grid { grid-auto-flow: row; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); overflow: visible; }
/* Fond tiré d'une affiche portrait (pas d'image paysage chez la source) : flou et atténué. */
.bg-blur { filter: blur(28px) saturate(1.25); transform: scale(1.2); opacity: .5; }
/* Bannière avec affiche (sources sans image paysage : MyAnimeList). */
.hero-with-poster { display: flex; gap: 28px; align-items: flex-end; }
.hero-poster img { display: block; width: 200px; height: auto; aspect-ratio: 2/3; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }
@media (max-width: 760px) { .hero-poster { display: none; } }

/* Bande-annonce intégrée (YouTube sans cookie) */
.trailer-embed { position: relative; aspect-ratio: 16/9; max-width: 860px; border-radius: var(--radius); overflow: hidden; background: #000; box-shadow: var(--shadow); }
.trailer-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Barre précédent / suivant */
.pager { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 14px; align-items: stretch; margin: 22px 0; }
.pager-link { display: flex; align-items: center; gap: 14px; min-width: 0; padding: 16px 20px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); color: var(--text); transition: border-color .15s, background .15s; }
.pager-link:hover { border-color: var(--accent); background: var(--bg-3); color: var(--strong); }
.pager-next { justify-content: flex-end; text-align: right; }
.pager-text { display: grid; gap: 2px; min-width: 0; }
.pager-text small { color: var(--accent-2); font-size: .8rem; }
.pager-text strong { font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pager-link .ico { flex: none; width: 22px; height: 22px; color: var(--muted); }
.pager-empty { background: transparent; border-color: transparent; }
.pager-all { display: grid; place-items: center; width: 64px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); color: var(--text); }
.pager-all:hover { border-color: var(--accent); color: var(--strong); }
.pager-all .ico { width: 24px; height: 24px; }
@media (max-width: 620px) {
  .pager { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .pager-all { grid-column: 1 / -1; grid-row: 2; width: auto; height: 46px; }
  .pager-link { padding: 12px 14px; gap: 8px; }
  .pager-text strong { font-size: .85rem; }
}

/* Fiche sur mobile : fil d'Ariane, titre et infos d'abord ; affiche réduite à gauche des boutons, en bas de l'en-tête. */
@media (max-width: 760px) {
  .detail-inner, .detail-hero-small .detail-inner { grid-template-columns: 112px minmax(0, 1fr); column-gap: 14px; row-gap: 0; align-items: start; padding: 18px 0 26px; }
  .detail-info { display: contents; }
  .detail-info > * { grid-column: 1 / -1; order: 0; }
  .detail-poster { grid-column: 1; order: 1; max-width: none; margin-top: 18px; }
  .detail-poster .poster, .detail-poster .poster-empty { height: auto; aspect-ratio: 2/3; }
  .detail-info > .hero-actions { grid-column: 2; order: 1; flex-direction: column; align-items: stretch; gap: 8px; margin-top: 18px; }
  .detail-info > .hero-actions .button { justify-content: center; padding: 10px 12px; font-size: .9rem; }
  .detail-info > .next-ep { order: 2; }
  .detail-info h1 { font-size: clamp(1.45rem, 6.4vw, 1.9rem); }
}

/* FAQ en menu déroulant (<details>) */
.faq-item { padding: 0; }
.faq-item summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; cursor: pointer; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary h3 { margin: 0; font-size: 1rem; }
.faq-item summary .ico { flex: none; width: 20px; height: 20px; color: var(--muted); transition: transform .2s; }
.faq-item[open] summary .ico { transform: rotate(90deg); color: var(--accent); }
.faq-item summary:hover h3 { color: var(--strong); }
.faq-item .faq-answer { padding: 0 18px 16px; }
.faq-item[open] { border-color: rgb(var(--accent-rgb) / .35); }

/* Filtres à onglets (boutons radio + CSS, sans JavaScript) */
.tab-labels { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 14px; scrollbar-width: none; }
.tab-labels::-webkit-scrollbar { display: none; }
.tab-labels label { flex: none; padding: 8px 16px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line); color: var(--text); font-weight: 700; font-size: .9rem; cursor: pointer; white-space: nowrap; }
.tab-labels label:hover { border-color: var(--accent); }
.tab-panel { display: none; }
.tab-more { margin: 10px 0 0; }
.tab-input:focus-visible + .tab-input, .tab-input:focus-visible ~ .tab-labels { outline: none; }
.tab-input:nth-of-type(1):checked ~ .tab-panels > .tab-panel:nth-child(1),
.tab-input:nth-of-type(2):checked ~ .tab-panels > .tab-panel:nth-child(2),
.tab-input:nth-of-type(3):checked ~ .tab-panels > .tab-panel:nth-child(3),
.tab-input:nth-of-type(4):checked ~ .tab-panels > .tab-panel:nth-child(4),
.tab-input:nth-of-type(5):checked ~ .tab-panels > .tab-panel:nth-child(5),
.tab-input:nth-of-type(6):checked ~ .tab-panels > .tab-panel:nth-child(6),
.tab-input:nth-of-type(7):checked ~ .tab-panels > .tab-panel:nth-child(7),
.tab-input:nth-of-type(8):checked ~ .tab-panels > .tab-panel:nth-child(8),
.tab-input:nth-of-type(9):checked ~ .tab-panels > .tab-panel:nth-child(9),
.tab-input:nth-of-type(10):checked ~ .tab-panels > .tab-panel:nth-child(10) { display: block; }
.tab-input:nth-of-type(1):checked ~ .tab-labels > label:nth-child(1),
.tab-input:nth-of-type(2):checked ~ .tab-labels > label:nth-child(2),
.tab-input:nth-of-type(3):checked ~ .tab-labels > label:nth-child(3),
.tab-input:nth-of-type(4):checked ~ .tab-labels > label:nth-child(4),
.tab-input:nth-of-type(5):checked ~ .tab-labels > label:nth-child(5),
.tab-input:nth-of-type(6):checked ~ .tab-labels > label:nth-child(6),
.tab-input:nth-of-type(7):checked ~ .tab-labels > label:nth-child(7),
.tab-input:nth-of-type(8):checked ~ .tab-labels > label:nth-child(8),
.tab-input:nth-of-type(9):checked ~ .tab-labels > label:nth-child(9),
.tab-input:nth-of-type(10):checked ~ .tab-labels > label:nth-child(10) { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.tab-input:nth-of-type(1):focus-visible ~ .tab-labels > label:nth-child(1),
.tab-input:nth-of-type(2):focus-visible ~ .tab-labels > label:nth-child(2),
.tab-input:nth-of-type(3):focus-visible ~ .tab-labels > label:nth-child(3),
.tab-input:nth-of-type(4):focus-visible ~ .tab-labels > label:nth-child(4),
.tab-input:nth-of-type(5):focus-visible ~ .tab-labels > label:nth-child(5),
.tab-input:nth-of-type(6):focus-visible ~ .tab-labels > label:nth-child(6),
.tab-input:nth-of-type(7):focus-visible ~ .tab-labels > label:nth-child(7),
.tab-input:nth-of-type(8):focus-visible ~ .tab-labels > label:nth-child(8),
.tab-input:nth-of-type(9):focus-visible ~ .tab-labels > label:nth-child(9),
.tab-input:nth-of-type(10):focus-visible ~ .tab-labels > label:nth-child(10) { outline: 2px solid var(--strong); outline-offset: 2px; }

/* Chiffres clés */
.stat-grid { list-style: none; padding: 0; margin: 18px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.stat-grid li { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; display: grid; gap: 2px; }
.stat-grid strong { font-size: 1.35rem; color: var(--strong); }
.stat-grid span { color: var(--muted); font-size: .85rem; }
.about p + p { margin-top: 10px; }
.genre-head .lead { max-width: 80ch; }
/* Les boutons radio masqués restent dans le bloc de filtres : un clic sur un onglet ne fait pas défiler la page. */
.tabset { position: relative; }
.tabset > .tab-input { top: 0; left: 0; }

/* Résumé original (VO) replié sous le résumé français */
details.vo { margin: 12px 0 0; border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; background: rgba(255,255,255,.02); }
details.vo summary { cursor: pointer; color: var(--muted); font-size: .92rem; }
details.vo[open] summary { margin-bottom: 8px; }

/* Calendrier des prochains épisodes (anime) */
.schedule-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.schedule-list li { display: flex; flex-wrap: wrap; gap: 4px 14px; justify-content: space-between; padding: 10px 14px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.schedule-list li span { color: var(--muted); }

/* Pages personnage et personne (anime) */
.person-head { display: grid; grid-template-columns: 230px 1fr; gap: 28px; align-items: start; margin: 8px 0 24px; }
.person-photo { width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: cover; border-radius: var(--radius); background: var(--bg-3); box-shadow: var(--shadow); }
.person-head h1 small { display: block; font-size: .5em; font-weight: 500; color: var(--muted); margin-top: 6px; }
.work-photo { border-radius: var(--radius-sm) !important; aspect-ratio: 2 / 3; height: auto !important; }
@media (max-width: 700px) { .person-head { grid-template-columns: 120px 1fr; gap: 16px; } .person-head h1 { font-size: 1.4rem; } }

/* Logo de studio ou de chaîne (en-tête de liste) */
.company-logo { display: block; max-width: 180px; max-height: 64px; width: auto; height: auto; margin: 0 0 12px; padding: 8px 12px; background: #fff; border-radius: var(--radius-sm); }

/* Sélecteur de langue (pied de page, mode multilingue) */
/* Écritures de droite à gauche (arabe, hébreu, persan, ourdou) */
[dir="rtl"] .row-more .ico, [dir="rtl"] .pager .ico, [dir="rtl"] .faq-item summary .ico { transform: scaleX(-1); }
/* Le lecteur vidéo garde la disposition habituelle de gauche à droite ; les icônes directionnelles sont retournées. */
[dir="rtl"] .player-screen, [dir="rtl"] .player-top { direction: ltr; }
[dir="rtl"] .pagination, [dir="rtl"] .hero-actions .ico { direction: rtl; }

/* Menu déroulant des langues (en-tête, sans JavaScript : élément details) */
.lang-menu { position: relative; flex: none; }
.lang-menu > summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px 7px 12px; border-radius: 999px; background: var(--bg-3); border: 1px solid var(--line); color: var(--text); font-size: .86rem; font-weight: 600; cursor: pointer; user-select: none; white-space: nowrap; }
.lang-menu > summary::-webkit-details-marker { display: none; }
.lang-menu > summary:hover, .lang-menu[open] > summary { border-color: var(--accent); }
.lang-menu > summary .ico { width: 18px; height: 18px; }
.lang-menu > summary .ico:last-child { width: 16px; height: 16px; transition: transform .15s; }
.lang-menu[open] > summary .ico:last-child { transform: rotate(180deg); }
.lang-current { max-width: 9em; overflow: hidden; text-overflow: ellipsis; }
.lang-panel { position: absolute; inset-inline-end: 0; top: calc(100% + 8px); z-index: 60; width: min(700px, 94vw); max-height: min(70vh, 460px); overflow-y: auto; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 8px; }
.lang-panel ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 2px; }
.lang-panel a { display: flex; align-items: center; gap: 9px; padding: 7px 10px; border-radius: var(--radius-sm); color: var(--text); font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lang-panel a:hover { background: var(--bg-3); color: var(--strong); }
.lang-panel a { text-align: left; }
.lang-name { overflow: hidden; text-overflow: ellipsis; }
html[dir="rtl"] .lang-panel a { text-align: right; }
.lang-panel a[aria-current] { background: var(--accent); color: var(--on-accent); font-weight: 700; }
@media (max-width: 700px) {
  .lang-menu { order: 2; }
  .lang-current { display: none; }
  .lang-panel { position: fixed; inset-inline: 12px; top: calc(var(--header) + 4px); width: auto; }
}
@media (max-width: 560px) { .lang-panel ul { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Drapeaux (sprite 2× pour les écrans haute densité) */
.flag { display: inline-block; flex: none; width: 20px; height: 15px; border-radius: 2px; background: url(/flags.png?v=e1bf371e) 0 0 / 240px 90px no-repeat; box-shadow: 0 0 0 1px rgba(255,255,255,.12); vertical-align: -2px; }
.flag-fr { background-position: 0px 0px; }
.flag-us { background-position: -20px 0px; }
.flag-es { background-position: -40px 0px; }
.flag-za { background-position: -60px 0px; }
.flag-sa { background-position: -80px 0px; }
.flag-by { background-position: -100px 0px; }
.flag-bg { background-position: -120px 0px; }
.flag-bd { background-position: -140px 0px; }
.flag-es-ct { background-position: -160px 0px; }
.flag-gu { background-position: -180px 0px; }
.flag-cz { background-position: -200px 0px; }
.flag-gb-wls { background-position: -220px 0px; }
.flag-dk { background-position: 0px -15px; }
.flag-de { background-position: -20px -15px; }
.flag-gr { background-position: -40px -15px; }
.flag-eo { background-position: -60px -15px; }
.flag-ee { background-position: -80px -15px; }
.flag-es-pv { background-position: -100px -15px; }
.flag-ir { background-position: -120px -15px; }
.flag-fi { background-position: -140px -15px; }
.flag-ie { background-position: -160px -15px; }
.flag-gb-sct { background-position: -180px -15px; }
.flag-es-ga { background-position: -200px -15px; }
.flag-il { background-position: -220px -15px; }
.flag-in { background-position: 0px -30px; }
.flag-hr { background-position: -20px -30px; }
.flag-hu { background-position: -40px -30px; }
.flag-am { background-position: -60px -30px; }
.flag-id { background-position: -80px -30px; }
.flag-it { background-position: -100px -30px; }
.flag-jp { background-position: -120px -30px; }
.flag-ge { background-position: -140px -30px; }
.flag-kz { background-position: -160px -30px; }
.flag-kr { background-position: -180px -30px; }
.flag-ku { background-position: -200px -30px; }
.flag-kg { background-position: -220px -30px; }
.flag-lt { background-position: 0px -45px; }
.flag-lv { background-position: -20px -45px; }
.flag-my { background-position: -40px -45px; }
.flag-no { background-position: -60px -45px; }
.flag-np { background-position: -80px -45px; }
.flag-nl { background-position: -100px -45px; }
.flag-pl { background-position: -120px -45px; }
.flag-pt { background-position: -140px -45px; }
.flag-ro { background-position: -160px -45px; }
.flag-ru { background-position: -180px -45px; }
.flag-lk { background-position: -200px -45px; }
.flag-sk { background-position: -220px -45px; }
.flag-si { background-position: 0px -60px; }
.flag-so { background-position: -20px -60px; }
.flag-al { background-position: -40px -60px; }
.flag-rs { background-position: -60px -60px; }
.flag-se { background-position: -80px -60px; }
.flag-tz { background-position: -100px -60px; }
.flag-th { background-position: -120px -60px; }
.flag-ph { background-position: -140px -60px; }
.flag-tr { background-position: -160px -60px; }
.flag-ua { background-position: -180px -60px; }
.flag-pk { background-position: -200px -60px; }
.flag-uz { background-position: -220px -60px; }
.flag-vn { background-position: 0px -75px; }
.flag-cn { background-position: -20px -75px; }
.flag-mx { background-position: -40px -75px; }
.flag-br { background-position: -60px -75px; }
.flag-ca { background-position: -80px -75px; }
.flag-tw { background-position: -100px -75px; }
.flag-hk { background-position: -120px -75px; }

/* Pages Plateformes et Genres : sommaire en puces, puis une rangée défilante par plateforme ou genre */
.browse-jump { margin: 4px 0 26px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); }
.jump { display: grid; grid-template-columns: 130px 1fr; gap: 12px; align-items: start; }
.jump + .jump { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.jump-label { padding-top: 16px; font-weight: 800; font-size: .9rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.jump .chips { margin: 0; }
.browse-row .row-head h2 { display: flex; align-items: center; gap: 12px; }
.browse-row .row-head h2 img { width: 32px; height: 32px; border-radius: 8px; flex: none; }
@media (max-width: 700px) { .jump { grid-template-columns: 1fr; gap: 6px; } .jump-label { padding-top: 0; } }

/* Filtres de liste (genre, plateforme, année, tri), sans JavaScript */
.list-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 12px; margin: 18px 0 4px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); }
.lf-field { display: grid; gap: 5px; min-width: 150px; flex: 1 1 150px; }
.lf-field span { font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.lf-field select { width: 100%; padding: 9px 34px 9px 12px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--bg-3) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5z' fill='%23aab'/%3E%3C/svg%3E") no-repeat right 8px center / 18px; color: var(--text); font: inherit; font-size: .9rem; appearance: none; cursor: pointer; }
.lf-field select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.lf-submit { flex: none; padding: 10px 20px; }
.lf-reset { flex: none; align-self: flex-end; padding: 0 4px 11px; font-size: .88rem; color: var(--muted); }
.lf-reset:hover { color: var(--text); }
html[dir="rtl"] .lf-field select { padding: 9px 12px 9px 34px; background-position: left 8px center; }
.page-head .stat-grid { margin-top: 16px; }

/* Longues listes d'onglets (saisons, jours) : menu déroulant (élément details, sans JavaScript) */
.tabs-menu { display: none; margin: 0 0 16px; }
.tabs-menu > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 16px; border-radius: var(--radius-sm); background: var(--bg-2); border: 1px solid var(--line); color: var(--text); font-weight: 700; cursor: pointer; user-select: none; }
.tabs-menu > summary::-webkit-details-marker { display: none; }
.tabs-menu > summary .ico { width: 20px; height: 20px; flex: none; transition: transform .15s; }
.tabs-menu[open] > summary { border-color: var(--accent); }
.tabs-menu[open] > summary .ico { transform: rotate(180deg); }
.tabs-menu ul { list-style: none; margin: 8px 0 0; padding: 8px; display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 6px; max-height: min(60vh, 420px); overflow-y: auto; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.tabs-menu a { display: block; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--bg-3); color: var(--text); font-size: .88rem; font-weight: 600; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tabs-menu a:hover { color: var(--strong); outline: 1px solid var(--accent); }
.tabs-menu a[aria-current] { background: var(--accent); color: var(--on-accent); }
ul.tabs-huge { display: none; }
.tabs-menu.tabs-huge { display: block; }
.watch-side .tabs-menu { margin-bottom: 10px; }
@media (max-width: 700px) {
  ul.tabs-many { display: none; }
  .tabs-menu.tabs-many { display: block; }
}

/* Formulaire de contact (relayé vers le panel) et mentions légales tournées */
.contact-box { max-width: 75ch; margin: 8px 0 28px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); }
.contact-box h2 { margin-top: 0; }
.contact-form { display: grid; gap: 14px; margin-top: 14px; }
.cf-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.cf-field { display: grid; gap: 6px; font-size: .92rem; }
.cf-field > span { font-weight: 600; color: var(--strong); }
.cf-field small { color: var(--text-2); font-weight: 400; }
.cf-field input, .cf-field select, .cf-field textarea { width: 100%; padding: 10px 12px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--bg-3); color: var(--text); font: inherit; }
.cf-field textarea { resize: vertical; min-height: 140px; }
.cf-check { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; color: var(--text-2); }
.cf-check input { margin-top: 4px; flex: none; }
.cf-hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.contact-form .button { justify-self: start; }
.contact-ok, .contact-error { padding: 12px 14px; border-radius: 10px; margin: 12px 0; }
.contact-ok { border: 1px solid var(--accent); background: rgba(var(--accent-rgb), .1); }
.contact-error { border: 1px solid rgba(255, 99, 99, .5); background: rgba(255, 99, 99, .1); }
.contact-ok p, .contact-error p { margin: 4px 0 0; }
