/* Films & Séries — un seul thème : nuit, cocooning, accent ambre. */
:root {
  --fond: #100e12;
  --fond-2: #17141a;
  --carte: #1f1b22;
  --carte-2: #2a2430;
  --ligne: #3a3240;
  --texte: #efe6dc;
  --texte-2: #b9ab9c;
  --texte-3: #85796d;
  --ambre: #e3a55a;
  --cuivre: #c47a45;
  --ambre-doux: rgba(227, 165, 90, .16);
  --bordeaux: #7a2e3b;
  --ombre: 0 18px 40px rgba(0, 0, 0, .55);
  --rayon: 14px;
  --lent: .45s cubic-bezier(.2, .7, .2, 1);
  --titre: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --corps: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--fond); color: var(--texte); font-family: var(--corps); }
html { font-size: 16px; }
body {
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(196, 122, 69, .10), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(122, 46, 59, .12), transparent 60%),
    var(--fond);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { display: block; }
h1, h2, h3 { font-family: var(--titre); font-weight: 600; letter-spacing: .2px; margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--ambre); outline-offset: 3px; border-radius: 10px; }
.cache { display: none !important; }

/* ---------- boutons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5em; justify-content: center;
  padding: .72em 1.25em; border-radius: 999px; border: 1px solid var(--ligne);
  background: var(--carte-2); color: var(--texte); cursor: pointer; font-weight: 600;
  transition: transform var(--lent), background var(--lent), border-color var(--lent), box-shadow var(--lent);
  white-space: nowrap; min-height: 44px; text-decoration: none;
}
.btn:hover { transform: translateY(-1px); border-color: var(--ambre); }
.btn.principal {
  background: linear-gradient(135deg, var(--ambre), var(--cuivre)); color: #1d130b; border-color: transparent;
  box-shadow: 0 8px 24px rgba(227, 165, 90, .25);
}
.btn.principal:hover { box-shadow: 0 10px 30px rgba(227, 165, 90, .38); }
.btn.discret { background: transparent; }
.btn.actif { border-color: var(--ambre); background: var(--ambre-doux); color: var(--ambre); }
.btn.petit { padding: .45em .9em; min-height: 36px; font-size: .9rem; }
.btn.rond { width: 48px; height: 48px; padding: 0; border-radius: 50%; }
.btn[disabled] { opacity: .45; cursor: default; transform: none; }

/* ---------- barre du haut ---------- */
.barre {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px;
  padding: 12px max(16px, 3vw); background: linear-gradient(180deg, rgba(16, 14, 18, .96), rgba(16, 14, 18, .82));
  backdrop-filter: blur(10px); border-bottom: 1px solid rgba(58, 50, 64, .5);
}
.logo { font-family: var(--titre); font-size: 1.35rem; color: var(--ambre); white-space: nowrap; cursor: pointer;
  background: none; border: 0; padding: 4px 6px; }
.logo small { color: var(--texte-2); font-size: .8rem; margin-left: .3em; }
.nav { display: flex; gap: 6px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav .btn { padding: .5em 1em; min-height: 40px; border-color: transparent; background: transparent; color: var(--texte-2); }
.nav .btn.actif { color: var(--texte); background: var(--carte); border-color: var(--ligne); }
.recherche { margin-left: auto; position: relative; flex: 0 1 280px; }
.recherche input {
  width: 100%; padding: .65em 1em .65em 2.4em; border-radius: 999px; border: 1px solid var(--ligne);
  background: var(--fond-2); min-height: 42px;
}
.recherche input:focus { outline: none; border-color: var(--ambre); }
.recherche::before { content: "⌕"; position: absolute; left: .9em; top: 50%; transform: translateY(-52%); color: var(--texte-3); font-size: 1.2rem; }
.avatar-btn { background: var(--carte); border: 1px solid var(--ligne); border-radius: 12px; width: 44px; height: 44px; font-size: 1.4rem; cursor: pointer; }
.menu-profil { position: absolute; right: max(16px, 3vw); top: 64px; background: var(--carte); border: 1px solid var(--ligne);
  border-radius: var(--rayon); padding: 8px; display: grid; gap: 4px; box-shadow: var(--ombre); min-width: 220px; z-index: 40; }
.menu-profil .btn { justify-content: flex-start; border-color: transparent; background: transparent; }
.menu-profil .btn:hover { background: var(--carte-2); }
.croix { font-size: 1.1rem; }

/* ---------- page ---------- */
main { padding: 0 0 80px; }
.contenu { padding: 24px max(16px, 3vw); }
.titre-page { font-size: clamp(1.6rem, 3vw, 2.3rem); margin: 8px 0 18px; }
.sous { color: var(--texte-2); }
.vide { color: var(--texte-3); padding: 30px 0; text-align: center; }
.chargement { padding: 80px; text-align: center; color: var(--texte-3); }

/* ---------- bandeau d'accueil ---------- */
.heros { position: relative; min-height: min(78vh, 720px); display: flex; align-items: flex-end; overflow: hidden; }
.heros .fond { position: absolute; inset: 0; background-size: cover; background-position: center 20%;
  animation: respire 30s ease-in-out infinite alternate; }
@keyframes respire { from { transform: scale(1.02); } to { transform: scale(1.08); } }
.heros::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(16, 14, 18, .95) 0%, rgba(16, 14, 18, .55) 45%, rgba(16, 14, 18, .1) 80%),
              linear-gradient(0deg, var(--fond) 0%, rgba(16, 14, 18, 0) 45%); }
.heros .texte { position: relative; z-index: 1; padding: 0 max(16px, 4vw) 7vh; max-width: 720px; }
.heros h1 { font-size: clamp(2rem, 5vw, 3.6rem); line-height: 1.05; margin-bottom: 12px; text-shadow: 0 4px 30px rgba(0, 0, 0, .6); }
.heros .accroche { color: var(--texte-2); font-size: 1.1rem; margin: 0 0 8px; font-style: italic; }
.heros .meta { color: var(--texte-2); margin-bottom: 20px; }
.heros .actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- rangées ---------- */
.rangee { margin: 26px 0 8px; position: relative; }
.rangee h2 { font-size: 1.3rem; padding: 0 max(16px, 3vw); margin-bottom: 12px; display: flex; align-items: baseline; gap: 12px; }
.rangee h2 .btn { font-family: var(--corps); }
.piste { display: flex; gap: 14px; overflow-x: auto; scroll-behavior: smooth; padding: 10px max(16px, 3vw) 22px;
  scroll-snap-type: x proximity; scrollbar-width: none; }
.piste::-webkit-scrollbar { display: none; }
.fleche { position: absolute; top: 50%; z-index: 5; width: 46px; height: 90px; border: 0; cursor: pointer; font-size: 1.6rem;
  color: var(--texte); background: rgba(16, 14, 18, .75); opacity: 0; transition: opacity var(--lent); border-radius: 12px; }
.rangee:hover .fleche, .fleche:focus-visible { opacity: 1; }
.fleche.g { left: 4px; } .fleche.d { right: 4px; }

/* ---------- cartes ---------- */
.carte {
  flex: 0 0 auto; width: clamp(128px, 14vw, 190px); background: none; border: 0; padding: 0; cursor: pointer; text-align: left;
  scroll-snap-align: start; border-radius: var(--rayon); transition: transform var(--lent);
}
.carte .affiche { position: relative; aspect-ratio: 2/3; border-radius: var(--rayon); overflow: hidden; background: var(--carte);
  box-shadow: 0 10px 26px rgba(0, 0, 0, .45); transition: box-shadow var(--lent); }
.carte img { width: 100%; height: 100%; object-fit: cover; }
.carte:hover, .carte:focus-visible { transform: scale(1.06); z-index: 2; }
.carte:hover .affiche, .carte:focus-visible .affiche { box-shadow: 0 16px 40px rgba(0, 0, 0, .6), 0 0 0 2px var(--ambre); }
.carte .nom { font-size: .9rem; margin-top: 8px; color: var(--texte-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.carte .sans-img { display: grid; place-items: center; height: 100%; padding: 10px; text-align: center; font-family: var(--titre); color: var(--texte-2); }
.barre-prog { position: absolute; left: 8px; right: 8px; bottom: 8px; height: 4px; background: rgba(255, 255, 255, .2); border-radius: 4px; overflow: hidden; }
.barre-prog i { display: block; height: 100%; background: var(--ambre); }
.pastille { position: absolute; top: 8px; left: 8px; background: rgba(16, 14, 18, .85); color: var(--ambre); font-size: .72rem;
  padding: 3px 8px; border-radius: 999px; font-weight: 700; }
.carte.large { width: clamp(220px, 26vw, 320px); }
.carte.large .affiche { aspect-ratio: 16/9; }
.carte.large .titre-sur { position: absolute; left: 12px; bottom: 18px; right: 12px; font-family: var(--titre); font-size: 1.05rem;
  text-shadow: 0 2px 10px #000; }
.carte.large .affiche::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0, 0, 0, .75), transparent 60%); }
.carte.large .titre-sur, .carte.large .barre-prog { z-index: 1; }
.grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(clamp(120px, 14vw, 180px), 1fr)); gap: 22px 16px; }
.grille .carte { width: auto; }

/* ---------- fiche film / série ---------- */
.fiche { position: relative; min-height: 100vh; }
.fiche .fond-flou { position: fixed; inset: 0; background-size: cover; background-position: center; filter: blur(3px) brightness(.38) saturate(1.1);
  transform: scale(1.04); z-index: -1; }
.fiche .fond-flou::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(0deg, var(--fond) 4%, rgba(16, 14, 18, .35) 60%, rgba(16, 14, 18, .6)); }
.entete { display: grid; grid-template-columns: minmax(180px, 300px) 1fr; gap: clamp(20px, 4vw, 48px); padding: 6vh max(16px, 4vw) 10px; align-items: end; }
.entete .poster { border-radius: var(--rayon); overflow: hidden; box-shadow: var(--ombre); aspect-ratio: 2/3; background: var(--carte); }
.entete .poster img { width: 100%; height: 100%; object-fit: cover; }
.entete h1 { font-size: clamp(2rem, 4.4vw, 3.4rem); line-height: 1.05; }
.entete .orig { color: var(--texte-3); margin-top: 6px; }
.entete .accroche { font-style: italic; color: var(--ambre); margin: 12px 0 0; font-family: var(--titre); font-size: 1.15rem; }
.puces { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.puce { border: 1px solid var(--ligne); border-radius: 999px; padding: .3em .85em; color: var(--texte-2); font-size: .9rem; background: rgba(31, 27, 34, .6); }
.puce.note { color: var(--ambre); border-color: rgba(227, 165, 90, .45); }
.puce.alerte { color: #f2c38b; border-color: var(--bordeaux); background: rgba(122, 46, 59, .3); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 8px; }
.synopsis { max-width: 820px; line-height: 1.65; color: var(--texte); font-size: 1.05rem; }
.bloc { padding: 10px max(16px, 4vw); }
.bloc h2 { font-size: 1.35rem; margin: 26px 0 14px; }
.equipe { display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--texte-2); }
.equipe b { color: var(--texte); font-weight: 600; }
.lien { background: none; border: 0; padding: 0; color: var(--texte); cursor: pointer; text-decoration: underline; text-decoration-color: rgba(227, 165, 90, .5); text-underline-offset: 3px; }
.lien:hover { color: var(--ambre); }
.acteur { flex: 0 0 auto; width: 128px; background: none; border: 0; cursor: pointer; text-align: center; padding: 0; transition: transform var(--lent); }
.acteur:hover, .acteur:focus-visible { transform: translateY(-4px); }
.acteur .photo { width: 112px; height: 112px; margin: 0 auto 8px; border-radius: 50%; overflow: hidden; background: var(--carte-2);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .4); display: grid; place-items: center; font-size: 2rem; color: var(--texte-3); }
.acteur img { width: 100%; height: 100%; object-fit: cover; }
.acteur .n { font-weight: 600; font-size: .92rem; }
.acteur .r { color: var(--texte-3); font-size: .82rem; margin-top: 2px; }
.technique { color: var(--texte-3); font-size: .88rem; display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 18px; }

/* séries */
.onglets { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 18px; }
.episode { display: grid; grid-template-columns: 220px 1fr; gap: 18px; padding: 14px; border-radius: var(--rayon); background: rgba(31, 27, 34, .72);
  border: 1px solid transparent; cursor: pointer; text-align: left; width: 100%; margin-bottom: 12px; transition: border-color var(--lent), background var(--lent); }
.episode:hover, .episode:focus-visible { border-color: var(--ambre); background: rgba(42, 36, 48, .85); }
.episode .vign { position: relative; aspect-ratio: 16/9; border-radius: 10px; overflow: hidden; background: var(--carte-2); }
.episode .vign img { width: 100%; height: 100%; object-fit: cover; }
.episode h3 { font-size: 1.1rem; margin-bottom: 6px; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.episode p { margin: 0; color: var(--texte-2); line-height: 1.5; font-size: .95rem; }
.episode.manquant { opacity: .55; cursor: default; border-style: dashed; border-color: var(--bordeaux); }
.etat-ep { font-family: var(--corps); font-size: .78rem; padding: 2px 8px; border-radius: 999px; background: var(--ambre-doux); color: var(--ambre); }
.etat-ep.vu { background: rgba(255, 255, 255, .08); color: var(--texte-2); }
.etat-ep.manque { background: rgba(122, 46, 59, .4); color: #f2c38b; }

/* ---------- filtres ---------- */
.filtres { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 22px; }
.filtres select, .champ { background: var(--carte); border: 1px solid var(--ligne); border-radius: 12px; padding: .6em .9em; min-height: 42px; }
.filtres select:focus, .champ:focus { outline: none; border-color: var(--ambre); }
.compte { color: var(--texte-3); margin-left: auto; }

/* ---------- profils / connexion ---------- */
.ecran-centre { min-height: 100vh; display: grid; place-items: center; padding: 24px; text-align: center; }
.ecran-centre h1 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 34px; }
.profils { display: flex; flex-wrap: wrap; gap: 28px; justify-content: center; }
.profil { background: none; border: 0; cursor: pointer; color: var(--texte-2); font-size: 1.1rem; transition: transform var(--lent); }
.profil .av { width: clamp(110px, 14vw, 150px); aspect-ratio: 1; border-radius: 22px; display: grid; place-items: center; font-size: 4rem;
  background: linear-gradient(145deg, var(--carte-2), var(--carte)); border: 2px solid var(--ligne); margin-bottom: 12px; box-shadow: var(--ombre);
  transition: border-color var(--lent); }
.profil:hover, .profil:focus-visible { transform: translateY(-6px); color: var(--texte); }
.profil:hover .av, .profil:focus-visible .av { border-color: var(--ambre); }
.carte-connexion { background: rgba(31, 27, 34, .85); border: 1px solid var(--ligne); border-radius: 22px; padding: 34px; width: min(400px, 100%);
  box-shadow: var(--ombre); display: grid; gap: 14px; text-align: left; }
.carte-connexion h1 { text-align: center; color: var(--ambre); margin-bottom: 8px; }
.carte-connexion label { display: grid; gap: 6px; color: var(--texte-2); font-size: .92rem; }
.erreur { color: #f2a08b; min-height: 1.2em; }

/* ---------- recherche ---------- */
.res-personnes { display: flex; gap: 18px; overflow-x: auto; padding-bottom: 12px; margin-bottom: 18px; }

/* ---------- lecteur ---------- */
.lecteur { position: fixed; inset: 0; background: #000; z-index: 100; }
.lecteur video { width: 100%; height: 100%; background: #000; }
.lecteur .ctrl { position: absolute; left: 0; right: 0; bottom: 0; padding: 60px 3vw 22px;
  background: linear-gradient(0deg, rgba(0, 0, 0, .9), transparent); transition: opacity .6s; }
.lecteur .haut { position: absolute; top: 0; left: 0; right: 0; padding: 20px 3vw 60px; display: flex; gap: 16px; align-items: center;
  background: linear-gradient(180deg, rgba(0, 0, 0, .85), transparent); transition: opacity .6s; }
.lecteur .haut h2 { font-size: 1.3rem; }
.lecteur.calme .ctrl, .lecteur.calme .haut { opacity: 0; }
.lecteur.calme { cursor: none; }
.temps { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; font-variant-numeric: tabular-nums; color: var(--texte-2); }
.temps input[type=range] { flex: 1; accent-color: var(--ambre); height: 6px; cursor: pointer; }
.boutons { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.boutons .droite { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; }
.panneau { position: absolute; right: 3vw; bottom: 120px; background: rgba(31, 27, 34, .96); border: 1px solid var(--ligne); border-radius: var(--rayon);
  padding: 14px; display: grid; gap: 6px; min-width: 240px; box-shadow: var(--ombre); }
.panneau h3 { font-size: 1rem; color: var(--texte-2); margin: 4px 0; }
.suivant { position: absolute; right: 3vw; bottom: 130px; background: rgba(31, 27, 34, .96); border: 1px solid var(--ambre); border-radius: var(--rayon);
  padding: 18px; box-shadow: var(--ombre); display: grid; gap: 10px; max-width: 360px; }
.attente { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; color: var(--texte-2); }
.attente i { width: 54px; height: 54px; border-radius: 50%; border: 4px solid rgba(255, 255, 255, .15); border-top-color: var(--ambre); animation: tourne 1s linear infinite; }
@keyframes tourne { to { transform: rotate(360deg); } }
video::cue { background: rgba(0, 0, 0, .55); color: #fff; font-size: 1.15em; }

/* ---------- fenêtre ---------- */
.voile { position: fixed; inset: 0; background: rgba(5, 4, 6, .78); z-index: 80; display: grid; place-items: center; padding: 16px; backdrop-filter: blur(6px); }
.fenetre { background: var(--fond-2); border: 1px solid var(--ligne); border-radius: 18px; width: min(960px, 100%); max-height: 90vh; overflow: auto; padding: 20px; box-shadow: var(--ombre); }
.fenetre iframe { width: 100%; aspect-ratio: 16/9; border: 0; border-radius: 12px; }

/* ---------- admin ---------- */
.admin-onglets { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.tableau { width: 100%; border-collapse: collapse; }
.tableau td, .tableau th { padding: 10px 8px; border-bottom: 1px solid var(--ligne); text-align: left; vertical-align: top; }
.tableau th { color: var(--texte-3); font-weight: 600; font-size: .9rem; }
.ligne-admin { display: grid; grid-template-columns: 70px 1fr auto; gap: 16px; align-items: center; padding: 12px; background: var(--carte); border-radius: var(--rayon); margin-bottom: 10px; }
.ligne-admin img { width: 70px; border-radius: 8px; aspect-ratio: 2/3; object-fit: cover; background: var(--carte-2); }
.ligne-admin .info { min-width: 0; }
.ligne-admin .info small { color: var(--texte-3); display: block; word-break: break-word; }
.form { display: grid; gap: 14px; max-width: 860px; }
.form label { display: grid; gap: 6px; color: var(--texte-2); font-size: .92rem; }
.form textarea { min-height: 150px; resize: vertical; line-height: 1.5; }
.choix-affiches { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 10px; }
.choix-affiches button { padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; cursor: pointer; background: none; }
.choix-affiches button.actif { border-color: var(--ambre); }
.choix-affiches img { width: 100%; aspect-ratio: 2/3; object-fit: cover; }
.tuiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; margin-bottom: 24px; }
.tuile { background: var(--carte); border: 1px solid var(--ligne); border-radius: var(--rayon); padding: 18px; }
.tuile b { display: block; font-size: 1.8rem; font-family: var(--titre); color: var(--ambre); }
.tuile span { color: var(--texte-2); }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--carte-2); border: 1px solid var(--ambre);
  padding: 12px 22px; border-radius: 999px; z-index: 200; box-shadow: var(--ombre); }

/* ---------- petits écrans ---------- */
@media (max-width: 760px) {
  .barre { flex-wrap: wrap; gap: 8px; position: relative; }
  .recherche { order: 3; flex: 1 1 100%; }
  .nav { order: 4; flex: 1 1 100%; }
  .entete { grid-template-columns: 1fr; padding-top: 3vh; }
  .entete .poster { width: 52%; max-width: 220px; }
  .episode { grid-template-columns: 1fr; }
  .heros { min-height: 70vh; }
  .fleche { display: none; }
  .ligne-admin { grid-template-columns: 54px 1fr; }
  .ligne-admin img { width: 54px; }
  .ligne-admin .act { grid-column: 1 / -1; }
}
/* ---------- tablette ---------- */
@media (min-width: 761px) and (max-width: 1100px) {
  .entete { grid-template-columns: minmax(160px, 240px) 1fr; }
  .carte { width: clamp(120px, 17vw, 170px); }
  .barre { flex-wrap: wrap; }
  .nav { order: 4; flex: 1 1 100%; }
  .recherche { flex: 1 1 240px; margin-left: 0; }
  .logo { margin-right: auto; }
  .episode { grid-template-columns: 180px 1fr; }
}
html, body { overflow-x: clip; }
.carte, .acteur, .episode, .btn, .lien { scroll-margin: 90px 40px; }

/* ---------- tactile (téléphone, tablette) : balayage, grandes cibles ---------- */
@media (hover: none), (pointer: coarse) {
  .fleche { display: none; }
  .piste { scroll-snap-type: x mandatory; scroll-behavior: auto; -webkit-overflow-scrolling: touch; scroll-padding: 0 max(16px, 3vw); overscroll-behavior-x: contain; }
  .btn.petit, .nav .btn, .filtres select, .champ, .recherche input { min-height: 44px; }
  .btn.rond, .avatar-btn { min-width: 44px; min-height: 44px; }
  .lien { padding: 13px 2px; display: inline-block; }
  .logo { min-height: 44px; }
  .carte:hover { transform: none; }
  .lecteur .boutons .btn { min-height: 44px; }
  .lecteur .temps input[type=range], .lecteur #vol { min-height: 44px; }
}
@media (max-width: 760px) {
  .carte { width: clamp(112px, 30vw, 150px); }
  .carte.large { width: min(72vw, 300px); }
  .heros .texte { padding-bottom: 4vh; }
  .heros h1 { font-size: clamp(1.8rem, 8vw, 2.4rem); }
  .menu-profil { left: 16px; right: 16px; min-width: 0; }
  .lecteur .haut h2 { font-size: 1rem; }
  .lecteur .ctrl { padding: 40px 4vw 14px; }
  .panneau { right: 3vw; left: 3vw; bottom: 110px; max-height: 60vh; overflow: auto; }
}
@media (max-height: 500px) and (orientation: landscape) { .heros { min-height: 90vh; } .lecteur .ctrl { padding-top: 24px; } }

/* ---------- mode TV / grand écran ---------- */
@media (min-width: 1800px) { html { font-size: 18px; } }
html.tv { font-size: 24px; }
.tv body, .tv main { overscroll-behavior: none; }
.tv .barre { padding: 18px 56px; gap: 22px; }
.tv .nav { padding: 10px 14px; margin: -10px -14px; }
.tv .heros { min-height: 62vh; }
.tv .contenu, .tv .bloc { padding-left: 56px; padding-right: 56px; }
.tv .rangee h2, .tv .piste { padding-left: 56px; padding-right: 56px; }
.tv .piste { gap: 26px; padding-top: 26px; padding-bottom: 40px; scroll-behavior: smooth; }
.tv .carte { width: clamp(190px, 12.5vw, 260px); }
.tv .carte.large { width: clamp(340px, 22vw, 440px); }
.tv .carte .nom { font-size: 1rem; }
.tv .fleche { display: none; }
.tv .btn, .tv .nav .btn { min-height: 56px; }
.tv .heros .texte { max-width: 1000px; padding-left: 56px; }
.tv :focus, .tv :focus-visible { outline: 5px solid #fff; outline-offset: 5px; border-radius: 14px; }
.tv .carte:focus, .tv .acteur:focus, .tv .profil:focus, .tv .episode:focus { transform: scale(1.1); z-index: 3; outline: none; }
.tv .carte:focus .affiche { box-shadow: 0 0 0 5px #fff, 0 0 0 9px var(--ambre), 0 24px 50px rgba(0, 0, 0, .7); }
.tv .episode:focus { outline: 5px solid #fff; outline-offset: 3px; }
.tv .btn:focus { transform: scale(1.08); background: #fff; color: #1d130b; border-color: #fff; }
.tv .btn.principal:focus { background: linear-gradient(135deg, #fff, var(--ambre)); }
.tv .recherche { flex-basis: 380px; }
.tv .menu-profil { top: 90px; right: 56px; }
.tv .lecteur .btn { min-height: 64px; }
.tv .lecteur .btn.rond { width: 64px; height: 64px; }
.tv .lecteur .temps input[type=range] { height: 12px; }
@media (min-width: 2400px) { html.tv { font-size: 32px; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* numéro de version, discret, en bas à droite */
#version { position: fixed; right: 8px; bottom: 6px; font-size: 11px; opacity: .35; pointer-events: none; z-index: 1; }
.lecteur ~ #version, body:has(.lecteur) #version { display: none; }
