/* Portail StreamBox — structure de page, pied de page, recherche, pages du site, formulaires. */

/* ---- Structure : barre fixe en haut, pied de page toujours en bas de l'écran ---- */
html { scroll-padding-top: var(--topbar-h); }
#app { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; padding-top: var(--topbar-h); }
#view { flex: 1 0 auto; }
.topbar .icon-btn.active { color: var(--accent); }

/* Visiteur non connecté (pages Aide, Contact…) : barre réduite au logo + « Se connecter ». */
.guest-login { display: none; margin-left: auto; }
body.guest .nav, body.guest .top-actions { display: none; }
body.guest .guest-login { display: inline-flex; }

/* ---- Pied de page ---- */
.site-footer { position: relative; z-index: 2; background: var(--bg); border-top: 1px solid var(--surface-3); color: var(--muted); font-size: 15px; }
.footer-main { display: grid; grid-template-columns: minmax(240px, 1.1fr) 2fr; gap: 40px 64px; padding: 56px var(--gutter) 40px; max-width: 1400px; margin: 0 auto; }
.footer-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.footer-brand .logo { font-size: 28px; }
.footer-brand .logo-mark { width: 32px; height: 32px; }
.footer-brand .logo-mark::after { left: 12px; top: 8px; border-left-width: 11px; border-top-width: 8px; border-bottom-width: 8px; }
.footer-brand p { margin: 0; max-width: 380px; line-height: 1.6; color: var(--text-2); }
.footer-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 32px; }
.footer-col h3 { margin: 4px 0 18px; color: var(--text); font-size: 18px; font-weight: 800; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.footer-col a, .footer-legal a { color: var(--muted); transition: color .15s; }
.footer-col a:hover, .footer-legal a:hover { color: var(--text); }
.footer-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 40px; padding: 22px var(--gutter) 28px; border-top: 1px solid var(--surface-2); font-size: 14px; }
.footer-legal { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 40px; }
.footer-copy { color: var(--muted); }

/* Sélecteur de langue : menu qui s'ouvre vers le haut */
.lang-picker { position: relative; }
.lang-btn { display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px; border: 2px solid var(--line); border-radius: var(--btn-radius); background: transparent;
  color: var(--text); cursor: pointer; font-weight: 700; font-size: 14px; text-transform: uppercase; letter-spacing: .04em; }
.lang-btn:hover { border-color: var(--text-2); }
.lang-btn svg { width: 20px; height: 20px; }
.lang-btn svg:last-child { width: 16px; height: 16px; }
.lang-menu { position: absolute; left: 0; bottom: calc(100% + 8px); z-index: 20; min-width: 240px; padding: 6px 0; background: var(--surface-2); border-radius: 8px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .55); }
.lang-menu button { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 20px; border: 0; background: none;
  color: var(--text-2); font-size: 16px; text-align: left; cursor: pointer; }
.lang-menu button:hover, .lang-menu button.active { background: var(--surface-3); color: var(--text); }
.lang-menu svg { width: 20px; height: 20px; color: var(--accent); }

/* Accueil non connecté : le pied de page suit le grand visuel */
.landing .site-footer { margin-top: auto; }
.landing .landing-hero { flex: none; min-height: calc(100vh - 72px); min-height: calc(100dvh - 72px); }

/* ---- Recherche ---- */
.search-head { background: var(--surface-2); border-bottom: 1px solid var(--surface-3); padding: 34px var(--gutter) 30px; }
.search-box { position: relative; display: flex; align-items: center; max-width: 1040px; margin: 0 auto; border-bottom: 2px solid var(--accent); }
.search-input { flex: 1; min-width: 0; padding: 6px 48px 8px 2px; border: 0; background: transparent; color: var(--text); font-size: clamp(26px, 4vw, 44px); font-weight: 500; letter-spacing: -.01em; }
.search-input::placeholder { color: var(--muted); }
.search-input:focus { outline: none; }
.search-input::-webkit-search-cancel-button { display: none; }
.search-clear { position: absolute; right: 0; }
.search-results { max-width: 1240px; margin: 0 auto; padding: 18px var(--gutter) 60px; }
.sr-group { margin-top: 34px; }
.sr-group h2 { margin: 0 0 18px; font-size: 24px; font-weight: 800; }
.sr-group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.sr-more { margin-top: 16px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; font-size: 14px; color: var(--muted); }
.sr-recent { padding: 0; }
.sr-tops { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 28px 34px; }
.sr-top { display: flex; flex-direction: column; gap: 6px; }
.sr-top-img { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface-2); margin-bottom: 8px; }
.sr-top-img img, .sr-top-img .card-fallback { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.sr-top:hover .sr-top-img img { transform: scale(1.04); }
.sr-top strong { font-size: 17px; }
.sr-top span { color: var(--muted); font-size: 14px; }
.sr-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); gap: 14px 34px; }
.sr-row { display: flex; gap: 14px; align-items: center; padding: 4px; border-radius: 4px; transition: background .15s; min-width: 0; }
.sr-row:hover { background: var(--surface); }
.sr-thumb { position: relative; flex-shrink: 0; width: 72px; aspect-ratio: 2 / 3; overflow: hidden; background: var(--surface-2); }
.sr-thumb.wide { width: 184px; aspect-ratio: 16 / 9; }
.sr-thumb img, .sr-thumb .card-fallback { width: 100%; height: 100%; object-fit: cover; }
.sr-thumb .card-fallback { font-size: 11px; padding: 6px; }
.sr-thumb .ep-play svg { width: 26px; height: 26px; padding: 7px; }
.sr-thumb .ep-duration { right: 4px; bottom: 6px; font-size: 12px; }
.sr-row:hover .ep-play svg { background: var(--accent); color: var(--on-accent); }
.sr-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.sr-text strong { font-size: 17px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.sr-text span { color: var(--muted); font-size: 14px; }
.sr-kicker { text-transform: uppercase; letter-spacing: .06em; font-size: 12px !important; font-weight: 700; }

/* ---- Pages du site ---- */
.site-page { max-width: 880px; margin: 0 auto; padding: 48px var(--gutter) 64px; }
.site-page h1 { margin: 0 0 24px; font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 900; letter-spacing: -.02em; }
.prose { color: var(--text-2); font-size: 16px; line-height: 1.75; }
.prose h2 { margin: 36px 0 10px; color: var(--text); font-size: 22px; font-weight: 800; line-height: 1.3; }
.prose h3 { margin: 26px 0 8px; color: var(--text); font-size: 18px; font-weight: 800; }
.prose p, .prose ul { margin: 0 0 16px; }
.prose ul { padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.prose a:hover { color: var(--accent-hover); }
.prose strong { color: var(--text); }
.page-updated { margin: 40px 0 0; color: var(--muted); font-size: 13px; }

/* Formulaires Contact / Signaler un problème */
.page-form { display: grid; gap: 20px; margin-top: 30px; padding: 28px; background: var(--surface); border: 1px solid var(--surface-3); border-radius: 8px; }
.form-field { display: flex; flex-direction: column; gap: 8px; font-weight: 700; font-size: 14px; color: var(--text-2); }
.form-field small { font-weight: 400; color: var(--muted); }
.form-field input, .form-field select, .form-field textarea { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 4px; background: var(--bg);
  color: var(--text); font-size: 16px; font-weight: 400; }
.form-field textarea { resize: vertical; min-height: 140px; line-height: 1.5; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.form-actions small { color: var(--muted); font-size: 13px; }
.form-actions a { color: var(--accent); }
.page-form .form-error { min-height: 0; }
.page-form .form-error:empty { display: none; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-done { display: flex; gap: 16px; align-items: flex-start; margin-top: 30px; padding: 24px 28px; border-left: 4px solid #22c55e; background: var(--surface); border-radius: 4px; }
.form-done > span svg { width: 28px; height: 28px; color: #22c55e; }
.form-done strong { display: block; color: var(--text); font-size: 18px; margin-bottom: 4px; }
.form-done p { margin: 0; color: var(--text-2); }

/* Lien « Signaler un problème » (page de lecture) */
.report-link { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; margin-top: 8px; color: var(--muted); font-size: 14px; font-weight: 600; }
.report-link:hover { color: var(--text); }
.report-link svg { width: 16px; height: 16px; }

/* ---- Épisodes en liste texte (réglage « Liste » dans l'admin) ---- */
.ep-list { display: flex; flex-direction: column; border-top: 1px solid var(--surface-3); }
.ep-row { position: relative; display: grid; grid-template-columns: 44px 36px minmax(0, 1fr) auto auto; align-items: center; gap: 14px; padding: 14px 12px;
  border-bottom: 1px solid var(--surface-3); transition: background .15s; }
.ep-row:hover { background: var(--surface); }
.ep-row-num { color: var(--muted); font-size: 18px; font-weight: 800; text-align: center; }
.ep-row-play { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--surface-3); color: var(--text); }
.ep-row-play svg { width: 16px; height: 16px; margin-left: 2px; }
.ep-row:hover .ep-row-play { background: var(--accent); color: var(--on-accent); }
.ep-row-text { display: flex; flex-direction: column; min-width: 0; }
.ep-row-text strong { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ep-row-text small { color: var(--accent); font-weight: 600; }
.ep-row-date, .ep-row-dur { color: var(--muted); font-size: 14px; white-space: nowrap; }
.ep-row .card-progress { left: 0; right: 0; bottom: -1px; height: 3px; }

/* Mobile : la barre fixe passe sur deux lignes (logo + actions, puis menu) */
@media (max-width: 900px) {
  :root { --topbar-h: 100px; }
  .topbar { height: var(--topbar-h); align-content: flex-start; }
  body.guest { --topbar-h: 64px; }
  body.guest .topbar { padding-top: 0; align-content: center; }
}

@media (max-width: 760px) {
  .footer-main { grid-template-columns: 1fr; padding-top: 40px; }
  .footer-bottom { justify-content: flex-start; }
  .footer-legal { justify-content: flex-start; gap: 10px 24px; }
  .sr-thumb.wide { width: 140px; }
  .ep-row { grid-template-columns: 30px 32px minmax(0, 1fr) auto; }
  .ep-row-date { display: none; }
  .page-form { padding: 20px; }
  body.guest .guest-login { padding: 8px 16px; font-size: 13px; }
}

/* ---- Carrousel principal (grand écran) : image plein cadre, dégradé à gauche,
   la première rangée vient se poser sur le bas de l'image ---- */
@media (min-width: 901px) {
  .hero { height: min(90vh, 860px); min-height: 560px; background: var(--bg); }
  .hero-backdrop { left: 0; background-position: center top; }
  .hero-slide.has-backdrop .hero-shade { background:
    linear-gradient(90deg, color-mix(in srgb, var(--bg) 88%, transparent) 0%, color-mix(in srgb, var(--bg) 55%, transparent) 30%, transparent 60%),
    linear-gradient(0deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 70%, transparent) 16%, transparent 42%); }
  .hero-content { padding-bottom: 24vh; max-width: 680px; }
  .hero-dots { bottom: calc(24vh - 4px); }
  .hero-arrow { top: 38%; }
  .hero-art { top: 38%; height: 62%; }
  .hero + .rows { position: relative; z-index: 3; margin-top: -20vh; }
}

/* ---- Barre du haut (grand écran) : compacte, logo collé à gauche, actions collées à droite ---- */
@media (min-width: 901px) {
  :root { --topbar-h: 60px; }
  .topbar { gap: 22px; padding: 0 20px; box-shadow: 0 1px 0 rgba(0, 0, 0, .35); }
  .topbar .logo { font-size: 22px; margin-right: 8px; }
  .nav { gap: 0; }
  .nav a { padding: 0 18px; font-size: 16px; font-weight: 500; color: var(--text-2); border: 0; }
  .nav a:hover { color: var(--text); background: rgba(255, 255, 255, .06); }
  .nav a.active { color: var(--text); background: rgba(255, 255, 255, .04); box-shadow: inset 0 -3px 0 var(--accent); }
  .top-actions { gap: 4px; margin-right: -4px; }
  .top-actions .icon-btn { width: 44px; height: 44px; border-radius: 0; }
  .top-actions .icon-btn:hover { background: rgba(255, 255, 255, .06); }
  .account { display: flex; align-items: center; }
  .account .avatar { width: 36px; height: 36px; font-size: 15px; }
  .account-menu { top: calc(100% + 12px); }
}
@media (min-width: 901px) {
  .account { padding-right: 20px; }
  #account-btn { position: relative; overflow: visible; }
  #account-btn::after { content: ""; position: absolute; left: calc(100% + 7px); top: 50%; margin-top: -2px; border-top: 5px solid var(--text-2);
    border-left: 5px solid transparent; border-right: 5px solid transparent; }
  #account-btn:hover::after, #account-btn[aria-expanded="true"]::after { border-top-color: var(--text); }
}

/* Mon compte : mot de passe masquable, changement de mot de passe */
.eye-btn { width: 34px; height: 34px; }
.eye-btn svg { width: 20px; height: 20px; }
.pw-intro { margin: -6px 0 16px !important; }
.pw-form { display: grid; gap: 16px; max-width: 460px; }
.pw-form .hint { margin: 0 !important; }
.pw-form .form-error:empty { display: none; }
.pw-form .btn-ghost { border-color: var(--line); }
.imdb-badge { display: inline-flex; align-items: center; gap: 6px; color: var(--text); font-weight: 700; }
.imdb-badge b { padding: 0 5px; border-radius: 3px; background: #f5c518; color: #000; font-size: 11px; font-weight: 900; line-height: 18px; letter-spacing: .02em; }

/* ---- Essai gratuit (/trial) ---- */
.landing-actions { display: flex; align-items: center; gap: 10px; }
.landing-cta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.landing-hero .landing-cta .btn { align-self: auto; }
.guest-trial { display: none; }
body.guest .guest-trial:not(.is-hidden) { display: inline-flex; margin-left: auto; margin-right: 8px; }
body.guest .guest-trial:not(.is-hidden) + .guest-login { margin-left: 0; }
.trial-page { display: flex; justify-content: center; padding: 48px var(--gutter) 72px; }
.trial-card { width: min(780px, 100%); padding: clamp(24px, 4vw, 48px); background: var(--surface); border: 1px solid var(--surface-3); border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .35); }
.trial-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.trial-head h1 { margin: 0; font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 900; letter-spacing: -.01em; }
.trial-price { display: flex; align-items: baseline; gap: 8px; color: var(--accent); }
.trial-price strong { font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 900; line-height: 1; }
.trial-price span { font-weight: 800; font-size: 18px; }
.trial-features { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 12px; font-size: 17px; color: var(--text-2); }
.trial-features li { display: flex; gap: 12px; align-items: center; }
.trial-features svg, .trial-nocard svg { width: 20px; height: 20px; color: #22c55e; flex-shrink: 0; }
.trial-card hr { margin: 30px 0; border: 0; border-top: 1px solid var(--surface-3); }
.trial-form { display: grid; gap: 18px; }
.trial-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 22px; }
.trial-form .form-field small { font-weight: 400; }
.trial-form .form-error:empty { display: none; }
.trial-send { justify-self: start; padding: 14px 30px; border-radius: max(var(--btn-radius), 999px); font-size: 16px; }
.trial-nocard { display: flex; align-items: center; gap: 8px; margin: -4px 0 0; font-size: 13px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--text-2); }
.trial-legal { margin: 0; font-size: 13px; color: var(--muted); }
.trial-legal a { color: var(--accent); }
.trial-done-head { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 22px; }
.trial-done-head > span svg { width: 34px; height: 34px; color: #22c55e; }
.trial-done-head h2 { margin: 0 0 6px; font-size: 24px; font-weight: 900; }
.trial-done-head p { margin: 0; color: var(--text-2); }
.trial-creds { display: grid; grid-template-columns: max-content 1fr; gap: 12px 20px; margin: 0 0 22px; padding: 20px; background: var(--bg); border: 1px solid var(--surface-3); border-radius: 10px; }
.trial-creds dt { color: var(--muted); }
.trial-creds dd { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; min-width: 0; }
.trial-steps { margin: 0 0 24px; padding-left: 20px; display: grid; gap: 8px; color: var(--text-2); }
@media (max-width: 640px) {
  .trial-grid { grid-template-columns: 1fr; }
  .trial-creds { grid-template-columns: 1fr; gap: 4px; }
  .trial-creds dd { margin-bottom: 10px; }
}
.trial-mailed { margin: 6px 0 0 !important; color: #22c55e !important; font-weight: 600; }
/* Visiteur sur mobile : boutons du haut compacts sur une seule ligne */
@media (max-width: 900px) {
  body.guest .topbar { flex-wrap: nowrap; gap: 8px; }
  body.guest .topbar .btn { padding: 8px 14px; font-size: 12px; white-space: nowrap; }
}
@media (max-width: 420px) { body.guest .guest-trial { display: none !important; } }
/* Logo image (Paramètres du site) à la place du logo texte */
.logo-img { display: block; height: 34px; width: auto; max-width: 220px; object-fit: contain; }
.footer-brand .logo-img { height: 44px; max-width: 260px; }
@media (max-width: 900px) { .topbar .logo-img { height: 28px; max-width: 160px; } }
/* Essai envoyé par e-mail : confirmation et rappel « courrier indésirable » */
.trial-checks { list-style: none; margin: 0 0 20px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.trial-checks li { display: flex; align-items: flex-start; gap: 10px; }
.trial-checks li > span:first-child { flex: none; display: inline-flex; width: 22px; height: 22px; align-items: center; justify-content: center; border-radius: 6px; background: #22c55e; color: #000; }
.trial-checks li > span:first-child svg { width: 15px; height: 15px; }
.trial-checks strong { color: var(--text); word-break: break-all; }
.trial-spam { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1px solid color-mix(in srgb, var(--primary) 45%, transparent); border-radius: 10px; background: color-mix(in srgb, var(--primary) 10%, transparent); margin-bottom: 20px; }
.trial-spam > span svg { width: 22px; height: 22px; color: var(--primary); }
.trial-spam p { margin: 4px 0 0; color: var(--text-2); }

/* ---- Chat avec l'équipe (bulle en bas à droite) ---- */
.chat-widget { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 60; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.chat-launcher { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 58px; height: 58px; border-radius: 50%; background: var(--accent); color: var(--on-accent); box-shadow: 0 8px 24px rgba(0, 0, 0, .45); transition: transform .15s, background .15s; }
.chat-launcher:hover { background: var(--accent-hover); transform: translateY(-2px); }
.chat-launcher svg { width: 28px; height: 28px; }
.chat-badge { position: absolute; top: -2px; right: -2px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--live); color: #fff; font-size: 12px; font-weight: 800; line-height: 20px; text-align: center; }
.chat-panel { width: min(380px, calc(100vw - 32px)); height: min(560px, calc(100dvh - 120px)); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--surface-3); border-radius: 14px; box-shadow: 0 16px 48px rgba(0, 0, 0, .55); overflow: hidden; }
.chat-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; background: var(--surface-2); border-bottom: 1px solid var(--surface-3); }
.chat-head > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.chat-title { font-size: 16px; font-weight: 800; color: var(--text); }
.chat-state { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.chat-state::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.chat-state.on::before { background: #22c55e; }
.chat-close { display: inline-flex; padding: 6px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); }
.chat-close:hover { color: var(--text); }
.chat-close svg { width: 20px; height: 20px; }
.chat-msgs { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 16px; }
.chat-msg { display: flex; flex-direction: column; gap: 3px; max-width: 82%; }
.chat-msg.them { align-self: flex-start; }
.chat-msg.me { align-self: flex-end; align-items: flex-end; }
.chat-bubble { padding: 9px 13px; border-radius: 14px; font-size: 15px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-msg.them .chat-bubble { background: var(--surface-3); color: var(--text); border-bottom-left-radius: 4px; }
.chat-msg.me .chat-bubble { background: var(--accent); color: var(--on-accent); border-bottom-right-radius: 4px; }
.chat-time { font-size: 11px; color: var(--muted); }
.chat-foot { padding: 12px; border-top: 1px solid var(--surface-3); background: var(--surface); }
.chat-form { display: flex; flex-direction: column; gap: 8px; }
.chat-identity { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.chat-identity input, .chat-compose textarea { width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); font: inherit; font-size: 14px; }
.chat-identity input:focus, .chat-compose textarea:focus { outline: none; border-color: var(--accent); }
.chat-compose { display: flex; align-items: flex-end; gap: 8px; }
.chat-compose textarea { resize: none; max-height: 120px; }
.chat-send { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 50%; background: var(--accent); color: var(--on-accent); }
.chat-send:hover { background: var(--accent-hover); }
.chat-send:disabled { opacity: .5; }
.chat-send svg { width: 20px; height: 20px; }
.chat-error { margin: 0; min-height: 0; color: var(--live); font-size: 13px; }
.chat-error:empty { display: none; }
.chat-offline { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.chat-offline p { margin: 0; color: var(--text-2); font-size: 14px; line-height: 1.5; }
@media (max-width: 480px) {
  .chat-panel { width: calc(100vw - 24px); height: calc(100dvh - 96px); }
  .chat-identity { grid-template-columns: 1fr; }
}

/* ---- Lecteur : sous-titres, pistes audio, vignettes d'aperçu ---- */
.player video::cue { background: rgba(0, 0, 0, .72); color: #fff; font-family: var(--font), system-ui, sans-serif; font-size: clamp(16px, 2.4vw, 28px); line-height: 1.3; }
.pl-tracks { min-width: 200px; max-height: 60vh; overflow-y: auto; }
.pl-preview { position: absolute; bottom: calc(100% - 34px); transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 4px; pointer-events: none; z-index: 3; }
.pl-preview-img { width: 160px; height: 90px; border: 2px solid #fff; border-radius: 4px; background-color: #000; background-repeat: no-repeat; box-shadow: 0 6px 18px rgba(0, 0, 0, .6); }
.pl-preview-time { padding: 2px 8px; border-radius: 4px; background: rgba(0, 0, 0, .8); color: #fff; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
