/* films.egrev.fr — the « Cinéma » direction (docs/DESIGN.md), after the WebAccueil and WebFiche mockups.
   Flat colours, images, text, simple gradients; no blur, no glow, no soft shadow; 6 px radius at most.
   The accent comes from the content: --accent is set on <body> by the server. */

@font-face { font-family: "Geist"; src: url(/static/fonts/Geist-Regular.ttf) format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Geist"; src: url(/static/fonts/Geist-Medium.ttf) format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Geist"; src: url(/static/fonts/Geist-SemiBold.ttf) format("truetype"); font-weight: 600 700; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url(/static/fonts/GeistMono-Regular.ttf) format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url(/static/fonts/GeistMono-Medium.ttf) format("truetype"); font-weight: 500 700; font-display: swap; }

:root {
  --bg: #07080A; --fg: #F4F5F7; --mid: #B4B8C2; --dim: #8E93A0; --soft: #D5D8DE;
  --card: #0E1014; --line: #1C1F25; --edge: #2A2D34; --sys: #8FA6C9;
  --accent: #E8B04B;
  --gutter: clamp(16px, 4vw, 56px);
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--fg); font-family: "Geist", system-ui, sans-serif; display: flex; flex-direction: column; }
main { flex: 1; }
a { color: var(--soft); }
a:hover { color: #FFFFFF; }
img { max-width: 100%; }
.mono { font-family: "Geist Mono", ui-monospace, monospace; }
.pad { padding-left: var(--gutter); padding-right: var(--gutter); }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.fg { color: var(--fg); }
.dark { color: var(--edge); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---- top bar */
.top { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; padding: 20px var(--gutter); border-bottom: 1px solid var(--line); }
.brand { font-size: 20px; font-weight: 500; text-decoration: none; color: var(--fg); display: inline-flex; gap: 10px; }
.brand .mark { color: var(--accent); }
.tabs { display: flex; flex-wrap: wrap; gap: 6px 26px; font-size: 16px; }
.tabs a { color: var(--mid); text-decoration: none; padding-bottom: 6px; border-bottom: 2px solid transparent; }
.tabs a.on { color: var(--fg); border-bottom-color: var(--accent); }
.tabs .n { color: var(--dim); }
.search { flex: 1 1 280px; display: flex; min-width: 0; }
.search input { flex: 1; min-width: 0; height: 44px; padding: 0 16px; background: var(--card); border: 1px solid var(--edge); border-radius: 4px; color: var(--fg); font-family: "Geist Mono", ui-monospace, monospace; font-size: 15px; }
.search input::placeholder { color: var(--dim); }
.search input:focus { border-color: var(--accent); outline: none; }
.who { display: flex; gap: 14px; align-items: center; font-size: 15px; color: var(--mid); }
.who form { margin: 0; }
.linkish { background: none; border: 0; padding: 0; color: var(--dim); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.linkish:hover { color: var(--fg); }

/* ---- hero (library) */
.hero { position: relative; overflow: hidden; min-height: 460px; background: #0C1620; }
.backdrop { position: absolute; top: 0; right: 0; width: min(100%, 1280px); height: 100%; object-fit: cover; object-position: center 25%; }
.hero .veil { position: absolute; inset: 0; background: linear-gradient(90deg, #07080A 0%, rgba(7, 8, 10, 0.85) 38%, rgba(7, 8, 10, 0) 72%), linear-gradient(180deg, rgba(7, 8, 10, 0) 70%, #07080A 100%); }
.hero .inner { position: relative; max-width: 680px; padding: 72px var(--gutter) 64px; }
.shapes div { position: absolute; }
.shapes .s1 { right: -60px; top: -140px; width: 560px; height: 560px; border-radius: 50%; background: var(--accent); opacity: 0.85; }
.shapes .s2 { right: 120px; top: 170px; width: 70px; height: 320px; background: #1D3550; }
.shapes .s3 { right: 300px; top: 250px; width: 30px; height: 220px; background: var(--fg); opacity: 0.9; }
.shapes .s4 { right: 282px; top: 222px; width: 66px; height: 66px; border-radius: 50%; background: var(--fg); opacity: 0.9; }
.kicker { font-size: 14px; letter-spacing: 0.14em; color: var(--accent); }
.title { margin: 12px 0 0; font-weight: 600; font-size: clamp(38px, 5vw, 64px); line-height: 1.02; letter-spacing: -0.03em; overflow-wrap: anywhere; }
.title.small { font-size: clamp(30px, 4vw, 48px); }
.title a.plain { color: inherit; text-decoration: none; }
.lede { margin: 18px 0 0; font-size: 18px; line-height: 1.5; color: var(--mid); }
.actions { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px; }
.actions.big { margin-top: 34px; }
.actions form { display: contents; }
.btn { height: 48px; padding: 0 22px; display: inline-flex; gap: 10px; align-items: center; justify-content: center; border-radius: 4px; text-decoration: none; font-size: 15px; cursor: pointer; white-space: nowrap; }
.btn.big { height: 52px; padding: 0 26px; font-size: 16px; }
.btn.primary { background: var(--accent); color: #07080A; border: 0; font-weight: 600; }
.btn.primary:hover { color: #07080A; filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--fg); border: 1px solid rgba(244, 245, 247, 0.32); }
.btn.ghost:hover { border-color: var(--fg); color: var(--fg); }
.btn.wide { width: 100%; margin-top: 28px; }

/* ---- library grid */
.lib { padding-top: 40px; padding-bottom: 24px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; justify-content: space-between; font-size: 15px; color: var(--dim); }
.sorts { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; }
.sorts a { color: var(--mid); text-decoration: none; padding-bottom: 4px; border-bottom: 2px solid transparent; }
.sorts a.on { color: var(--fg); border-bottom-color: var(--accent); }
.sorts a.lit { color: var(--fg); }
.sorts .gap { margin-left: 12px; }
.grid { margin-top: 28px; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 32px 22px; }
.card { display: block; text-decoration: none; color: var(--fg); min-width: 0; }
.card:hover { color: var(--fg); }
.card:hover .poster img { filter: brightness(1.08); }
.poster { position: relative; aspect-ratio: 2 / 3; overflow: hidden; background: var(--card); }
.poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-shape { position: absolute; left: -20%; top: 10%; width: 110%; aspect-ratio: 1; border-radius: 50%; background: var(--accent); opacity: 0.35; }
.ph { position: absolute; left: 12px; right: 12px; bottom: 12px; font-weight: 600; font-size: 17px; line-height: 1.05; }
.track { height: 3px; background: var(--edge); }
.track.none { background: transparent; }
.bar { height: 3px; background: var(--accent); }
.card .name { margin-top: 10px; font-size: 15px; font-weight: 500; line-height: 1.25; }
.card .meta { margin-top: 4px; font-size: 13px; color: var(--dim); }
.empty { margin: 28px 0 0; font-size: 17px; line-height: 1.5; color: var(--mid); }

/* ---- requests */
.reqs { padding-top: 32px; padding-bottom: 64px; }
.label { margin: 0; font-weight: 500; font-size: 15px; color: var(--dim); }
.reqgrid { margin-top: 18px; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 16px; }
.req { display: block; padding: 18px 20px; background: var(--card); border-top: 3px solid var(--dim); text-decoration: none; color: var(--fg); }
.req:hover { color: var(--fg); background: #12151A; }
.rt { font-weight: 600; font-size: 18px; }
.yr { font-weight: 400; color: var(--dim); }
.rs { margin-top: 10px; font-size: 14px; color: var(--mid); line-height: 1.5; }
.rs .dark { color: #4A4E57; }

/* ---- one title (library or request) */
.fiche { position: relative; overflow: hidden; background: #14161B; }
.fiche .veil { position: absolute; inset: 0; background: linear-gradient(90deg, #07080A 0%, rgba(7, 8, 10, 0.9) 45%, rgba(7, 8, 10, 0.2) 80%); }
.fiche .fade { position: absolute; left: 0; bottom: 0; width: 100%; height: 200px; background: linear-gradient(180deg, rgba(7, 8, 10, 0) 0%, #07080A 100%); }
.fiche .inner { position: relative; display: flex; flex-wrap: wrap; gap: 40px; padding: 64px var(--gutter) 72px; align-items: flex-start; }
.poster.big { flex: 0 0 240px; }
.poster.big .ph { font-size: 24px; left: 16px; right: 16px; bottom: 16px; }
.info { flex: 999 1 420px; min-width: 0; max-width: 760px; }
.facts { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 15px; color: var(--mid); }
.overview { margin: 22px 0 0; font-size: 19px; line-height: 1.55; color: var(--soft); }
.cast { margin-top: 14px; font-size: 15px; color: var(--dim); line-height: 1.5; }
.cast span { color: var(--mid); }
.note { margin-top: 16px; font-size: 14px; color: var(--dim); line-height: 1.5; }
.state { margin-top: 34px; font-size: 16px; color: var(--mid); line-height: 1.6; }
.state .dark { color: #4A4E57; }

/* ---- search results */
.results-page { padding-top: 48px; padding-bottom: 64px; }
.results { margin-top: 18px; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 14px; }
.result { display: flex; gap: 14px; align-items: center; padding: 12px; background: var(--card); text-decoration: none; color: var(--fg); min-width: 0; }
.result:hover { color: var(--fg); background: #12151A; }
.result > div:last-child { min-width: 0; }
.result .rt { font-size: 16px; }
.thumb { width: 48px; height: 72px; flex: none; background: #1A1C22; object-fit: cover; display: block; }
.st { margin-top: 6px; font-size: 13px; }
.st-dispo { color: var(--sys); }
.st-dem { color: var(--mid); }
.st-later { color: var(--dim); }

/* ---- flash, forms, small pages */
.flash { margin: 0; padding: 14px var(--gutter); font-size: 14px; background: var(--card); border-left: 3px solid var(--accent); color: var(--fg); }
.flash.err { border-left-color: #E2365B; }
.narrow { max-width: 760px; padding: 56px var(--gutter) 72px; }
.narrow > .brand { display: inline-flex; }
.steps { margin: 24px 0 0; padding-left: 22px; font-size: 18px; line-height: 1.6; color: var(--mid); }
.steps li { margin-top: 6px; }
.narrow .flash { margin-top: 28px; padding: 14px 18px; }
form.code { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px; }
form.code .field { flex: 0 1 240px; font-size: 26px; letter-spacing: 0.3em; text-align: center; height: 52px; }
.field { width: 100%; height: 48px; padding: 0 16px; background: var(--card); border: 1px solid var(--edge); border-radius: 4px; color: var(--fg); font-size: 16px; }
.field:focus { border-color: var(--accent); outline: none; }
.lbl { display: block; margin-top: 22px; margin-bottom: 8px; font-size: 14px; color: var(--dim); }
.auth { min-height: 100vh; display: grid; place-items: center; padding: 32px 16px; }
.authbox { width: min(440px, 100%); }
.authbox .title { margin-top: 40px; }
.authbox .flash { margin-top: 24px; padding: 12px 16px; }
.small { margin-top: 28px; font-size: 13px; color: var(--dim); }


/* ---- search suggestions (static/suggest.js) */
.search { position: relative; }
.suggest { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 30; background: var(--card); border: 1px solid var(--edge); border-radius: 4px; padding: 6px 0; max-height: min(70vh, 560px); overflow-y: auto; }
.sug { display: flex; gap: 12px; align-items: center; padding: 8px 12px; color: var(--fg); text-decoration: none; min-height: 52px; }
.sug:hover, .sug.on { background: #171A20; color: var(--fg); }
.sug.on { box-shadow: inset 3px 0 0 var(--accent); }
.sug .sthumb { width: 32px; height: 48px; flex: none; object-fit: cover; background: #1A1C22; display: block; }
.sug .sname { font-weight: 500; font-size: 15px; line-height: 1.25; }
.sug .sname .yr { font-weight: 400; }
.sug .sst { margin-top: 2px; font-size: 13px; }
.sug.all { min-height: 40px; font-size: 14px; color: var(--mid); border-top: 1px solid var(--line); margin-top: 4px; padding-top: 10px; }

/* ---- one title: extras */
.orig { margin-top: 10px; font-size: 14px; color: var(--dim); }
.tagline { margin: 12px 0 0; font-size: 18px; line-height: 1.45; color: var(--mid); font-style: italic; }
.note a { color: var(--mid); }
.trailer { margin-top: 14px; }
.trailer > summary { list-style: none; display: inline-flex; width: auto; }
.trailer > summary::-webkit-details-marker { display: none; }
.trailer[open] > summary { border-color: var(--accent); }
.trailer .frame { margin-top: 14px; width: min(100%, 760px); aspect-ratio: 16 / 9; background: #000; }
.trailer iframe { width: 100%; height: 100%; border: 0; display: block; }
.result .rm { margin-top: 4px; font-size: 13px; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- cast */
.castrow { padding-top: 28px; padding-bottom: 24px; }
.people { list-style: none; margin: 18px 0 0; padding: 0 0 12px; display: grid; grid-auto-flow: column; grid-auto-columns: 128px; gap: 18px; overflow-x: auto; scroll-snap-type: x proximity; }
.person { scroll-snap-align: start; min-width: 0; }
.person .photo { aspect-ratio: 2 / 3; background: var(--card); overflow: hidden; display: grid; place-items: center; }
.person .photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.person .ini { font-size: 26px; color: var(--dim); }
.person .pname { margin-top: 8px; font-size: 15px; font-weight: 500; line-height: 1.25; }
.person .prole { margin-top: 3px; font-size: 13px; line-height: 1.35; color: var(--dim); }

/* ---- seasons to request */
.seasons { padding-top: 32px; padding-bottom: 24px; }
.seasonform { margin-top: 18px; max-width: 980px; }
.langue { border: 0; margin: 0 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; font-size: 15px; color: var(--mid); }
.langue legend { float: left; margin-right: 10px; color: var(--dim); padding: 0; }
.langue label { display: inline-flex; gap: 8px; align-items: center; cursor: pointer; min-height: 36px; }
.langue input { accent-color: var(--accent); width: 18px; height: 18px; }
.seasonlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.season { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between; padding: 14px 18px; background: var(--card); }
.season .sname { font-weight: 600; font-size: 17px; }
.season .smeta { margin-top: 4px; font-size: 14px; color: var(--dim); }
.season .btn { height: 44px; }
.seasons .actions { margin-top: 20px; }

/* ---- episodes (library) */
.episodes { padding-top: 32px; padding-bottom: 24px; }
.seasontabs { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 15px; }
.seasontabs a { color: var(--mid); text-decoration: none; padding-bottom: 6px; border-bottom: 2px solid transparent; }
.seasontabs a.on { color: var(--fg); border-bottom-color: var(--accent); }
.dim { color: var(--dim); }
.mid { color: var(--mid); }
.eps { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 14px; max-width: 1100px; }
.ep { display: grid; grid-template-columns: 220px minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 12px; background: var(--card); }
.epthumb { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #14161B; color: var(--fg); }
.epthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.epplay { position: absolute; left: 10px; bottom: 12px; width: 32px; height: 32px; display: grid; place-items: center; background: rgba(7, 8, 10, 0.72); border-radius: 4px; }
.epbar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--edge); }
.ept { font-weight: 600; font-size: 17px; line-height: 1.3; }
.epm { margin-top: 4px; font-size: 14px; color: var(--dim); }
.epo { margin: 8px 0 0; font-size: 15px; line-height: 1.5; color: var(--mid); }
.eplire { height: 44px; }

/* ---- the web player (static/player.js) */
.playerpage { background: #000; min-height: 100vh; min-height: 100dvh; overflow: hidden; }
.lecteur { --side: clamp(18px, 3.3vw, 64px); position: fixed; inset: 0; background: #000; color: var(--fg); font-family: "Geist", system-ui, sans-serif; user-select: none; -webkit-user-select: none; }
.lecteur video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.lecteur.remplir video { object-fit: cover; }
.lecteur.nocursor { cursor: none; }
.pshade { position: absolute; left: 0; right: 0; pointer-events: none; opacity: 0; transition: opacity 150ms; }
.pshade.top { top: 0; height: 200px; background: linear-gradient(180deg, rgba(7, 8, 10, 0.92) 0%, rgba(7, 8, 10, 0) 100%); }
.pshade.bottom { bottom: 0; height: 300px; background: linear-gradient(180deg, rgba(7, 8, 10, 0) 0%, rgba(7, 8, 10, 0.95) 70%); }
.ptop { position: absolute; left: 0; right: 0; top: 0; display: flex; justify-content: space-between; gap: 24px; padding: max(28px, env(safe-area-inset-top)) max(var(--side), env(safe-area-inset-right)) 0 max(var(--side), env(safe-area-inset-left)); opacity: 0; transition: opacity 150ms; pointer-events: none; }
.pstate { font-size: 15px; letter-spacing: 0.14em; color: var(--accent); }
.ptitle { margin-top: 8px; font-weight: 600; font-size: clamp(24px, 2.4vw, 44px); letter-spacing: -0.02em; line-height: 1.1; }
.psub { margin-top: 6px; font-size: 15px; color: var(--mid); }
.pclock { font-size: clamp(16px, 1.3vw, 24px); font-weight: 500; white-space: nowrap; }
.pbottom { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 max(var(--side), env(safe-area-inset-right)) max(22px, env(safe-area-inset-bottom)) max(var(--side), env(safe-area-inset-left)); opacity: 0; transition: opacity 150ms; pointer-events: none; }
.chrome-on .pshade, .chrome-on .ptop, .chrome-on .pbottom { opacity: 1; }
.chrome-on .pbottom { pointer-events: auto; }
.lecteur:not(.paused) .pstate { visibility: hidden; }
.ptimes { display: flex; justify-content: space-between; gap: 16px; font-size: clamp(15px, 1.15vw, 22px); }
.pbar { position: relative; margin-top: 14px; height: 6px; background: var(--edge); cursor: pointer; touch-action: none; }
.pbar::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; bottom: -12px; }
.pbuf { position: absolute; left: 0; top: 0; height: 6px; width: 0; background: #4A4F5A; }
.pdone { position: absolute; left: 0; top: 0; height: 6px; width: 0; background: var(--accent); }
.pmark { position: absolute; top: -9px; left: 0; width: 6px; height: 24px; margin-left: -3px; background: var(--fg); }
.pbar:focus-visible { outline-offset: 10px; }
.pkeys { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 6px 26px; align-items: center; font-size: clamp(14px, 1vw, 19px); color: var(--dim); }
.pk { display: inline-flex; align-items: center; background: none; border: 0; padding: 6px 0; margin: 0; font: inherit; color: var(--dim); cursor: pointer; text-decoration: none; white-space: nowrap; min-height: 40px; }
.pk .k { margin-right: 0.4em; }
.pk .k { color: var(--fg); }
.pk:hover, .pk:focus-visible { color: var(--fg); }
.pk.main { color: var(--fg); }
.pkeys .grow { flex: 1; }
.pk .court { display: none; }
/* Subtitles: player.js places them after the picture as shown (--subs-bottom; or --subs-top with .sous, in the
   band under the picture) and keeps the font size of .subs; the fallbacks hold until it has measured. Shown by
   the system's player instead while it has the video (.natif). */
.subs { position: absolute; left: max(4%, calc(env(safe-area-inset-left) + 8px)); right: max(4%, calc(env(safe-area-inset-right) + 8px)); bottom: max(var(--subs-bottom, 8vh), calc(env(safe-area-inset-bottom) + 8px)); display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; transition: bottom 150ms; font-weight: 500; font-size: clamp(18px, 2.2vw, 42px); line-height: 1.25; }
.chrome-on .subs { bottom: max(var(--subs-bottom, min(210px, 50%)), calc(env(safe-area-inset-bottom) + 8px)); }
.subs.sous { top: var(--subs-top, auto); bottom: auto; }
.lecteur.natif .subs { visibility: hidden; }
.subs div { padding: 4px 16px; background: rgba(0, 0, 0, 0.6); color: #FFFFFF; text-align: center; white-space: pre-line; }
.toast { position: absolute; right: max(var(--side), env(safe-area-inset-right)); top: 110px; padding: 12px 18px; background: rgba(7, 8, 10, 0.72); font-size: 17px; color: var(--mid); }
.toast b { color: var(--fg); font-weight: 400; }
.loading { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-size: 17px; color: var(--mid); }
.loading[hidden] { display: none; }
.refus { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; padding: 0 clamp(18px, 6vw, 120px); background: rgba(7, 8, 10, 0.9); }
.refus .lede { max-width: 760px; }
.refus .btn { white-space: normal; height: auto; min-height: 52px; padding-top: 12px; padding-bottom: 12px; text-align: center; }
.pistes { position: absolute; right: max(var(--side), env(safe-area-inset-right)); top: 130px; width: min(520px, calc(100% - 36px)); max-height: calc(100% - 340px); overflow-y: auto; padding: 24px 28px; background: rgba(14, 16, 20, 0.94); border-top: 3px solid var(--accent); z-index: 5; }
.plabel { font-size: 15px; color: var(--dim); }
.plabel ~ .plabel { margin-top: 22px; }
.plist { margin-top: 10px; display: flex; flex-direction: column; gap: 2px; }
.plist button { text-align: left; background: none; border: 0; padding: 9px 12px; margin: 0 -12px; font: inherit; font-size: 17px; color: var(--mid); cursor: pointer; min-height: 40px; }
.plist button .m { color: var(--dim); }
.plist button[aria-selected="true"] { color: var(--fg); }
.plist button[aria-selected="true"] .m { color: var(--accent); }
.plist button:hover, .plist button:focus-visible { background: #2A2418; color: var(--fg); outline: none; }
.plist button:disabled { cursor: default; color: var(--edge); background: none; }

/* ---- footer */
.foot { padding: 24px var(--gutter) 40px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 12px 28px; font-size: 13px; color: var(--dim); }

/* ---- phones */
@media (max-width: 640px) {
  .top { gap: 14px 20px; padding-top: 16px; padding-bottom: 16px; }
  .tabs { gap: 6px 18px; font-size: 15px; }
  .who { width: 100%; justify-content: flex-end; order: -1; position: absolute; right: var(--gutter); top: 20px; width: auto; }
  .top { position: relative; }
  .hero { min-height: 380px; }
  .hero .inner { padding-top: 140px; padding-bottom: 40px; }
  .backdrop { width: 100%; }
  .hero .veil { background: linear-gradient(180deg, rgba(7, 8, 10, 0.2) 0%, rgba(7, 8, 10, 0.75) 45%, #07080A 100%); }
  .lede { font-size: 16px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 24px 14px; }
  .fiche .inner { gap: 24px; padding-top: 32px; }
  .poster.big { flex-basis: 150px; }
  .fiche .veil { background: linear-gradient(180deg, rgba(7, 8, 10, 0.55) 0%, rgba(7, 8, 10, 0.92) 40%, #07080A 100%); }
  .overview { font-size: 17px; }
  .btn.big { width: 100%; }
  .trailer > summary { display: flex; }
  .sorts .gap { margin-left: 0; }
  .people { grid-auto-columns: 104px; gap: 14px; }
  .season .btn { width: 100%; }
  .ep { grid-template-columns: 120px minmax(0, 1fr); gap: 12px; }
  .ep .eplire { grid-column: 1 / -1; }
  .epo { display: none; }
  .ptop { padding-top: max(16px, env(safe-area-inset-top)); }
  .pshade.bottom { height: 260px; }
  .pkeys { gap: 2px 4px; justify-content: space-between; margin-left: -8px; margin-right: -8px; }
  .pkeys .k, .pkeys .grow { display: none; }
  .pk { min-height: 44px; padding: 0 8px; }
  .pk .long { display: none; }
  .pk .court { display: inline; }
  .subs { font-size: clamp(16px, 4.6vw, 18px); }
  .subs div { padding: 4px 10px; }
  .pistes { top: 90px; max-height: calc(100% - 102px - var(--pbottom-h, 200px)); }
}

/* ---- the web player on small screens: a phone held sideways (short), and any touch screen */
@media (hover: none) {
  .pkeys .k { display: none; }
  .pk { min-height: 44px; min-width: 44px; justify-content: center; }
  .plist button { min-height: 44px; }
}
/* The « fin » and « refus » overlays end above the bottom controls (their real height, from player.js), and
   scroll when they do not fit. */
@media (max-width: 640px), (max-height: 500px) {
  .refus { justify-content: flex-start; overflow-y: auto; padding-top: max(16px, env(safe-area-inset-top)); padding-bottom: calc(var(--pbottom-h, 200px) + 12px); }
  .refus > :first-child { margin-top: auto; }
  .refus > :last-child { margin-bottom: auto; }
}
@media (max-height: 500px) {
  .pshade.top { height: 110px; }
  .pshade.bottom { height: 150px; }
  .ptop { gap: 16px; padding-top: max(10px, env(safe-area-inset-top)); }
  .pstate { font-size: 12px; }
  .ptitle { margin-top: 4px; font-size: 18px; }
  .psub { margin-top: 2px; font-size: 13px; }
  .pclock { font-size: 14px; }
  /* One line for the time and the bar, one row of controls. */
  .pbottom { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; column-gap: 14px; padding-bottom: max(8px, env(safe-area-inset-bottom)); }
  .ptimes { display: contents; font-size: 13px; }
  .ptimes > :first-child { grid-area: 1 / 1; }
  .ptimes > :last-child { grid-area: 1 / 3; white-space: nowrap; }
  .pbar { grid-area: 1 / 2; margin-top: 0; }
  .pkeys { grid-column: 1 / -1; grid-row: 2; margin: 8px -8px 0; flex-wrap: nowrap; justify-content: space-between; gap: 0 4px; font-size: 13px; }
  .pkeys .k, .pkeys .grow { display: none; }
  .pk { min-height: 44px; padding: 0 8px; }
  .pk .long { display: none; }
  .pk .court { display: inline; }
  .subs { font-size: clamp(16px, 4.5vh, 18px); }
  .subs div { padding: 4px 12px; }
  .toast { top: 60px; padding: 8px 14px; font-size: 14px; }
  .loading { font-size: 14px; }
  .pistes { top: max(8px, env(safe-area-inset-top)); bottom: max(8px, env(safe-area-inset-bottom)); right: max(8px, env(safe-area-inset-right)); width: min(340px, calc(100% - 16px)); max-height: none; padding: 12px 18px; overscroll-behavior: contain; }
  .plabel { font-size: 13px; }
  .plabel ~ .plabel { margin-top: 12px; }
  .plist { margin-top: 4px; gap: 0; }
  .plist button { font-size: 15px; padding: 8px 12px; }
  .refus { padding-left: max(24px, env(safe-area-inset-left)); padding-right: max(24px, env(safe-area-inset-right)); }
  .refus .kicker { font-size: 12px; }
  .refus .lede { margin-top: 8px; font-size: 15px; line-height: 1.4; }
  .refus .actions { margin-top: 14px; gap: 8px 10px; }
  .refus .btn { min-height: 44px; height: auto; padding: 8px 16px; font-size: 14px; }
  .refus .note { margin-top: 8px; font-size: 12px; }
}
