/* ============================================================================
   Parité Android 1.2.58 (19/10/2026) — js/ui/parite.js
   Chargée en DERNIER (après un-seul-aplat.css). Jetons de thème uniquement :
   un seul aplat plein = le focus (--rsk-accent), aucun rouge en dur.
   Chromium M56 : flexbox -webkit-, pas de gap, pas de calc(), pas de grid.
   ============================================================================ */

/* ── 2. Barre du direct : Pause / Depuis le début / Direct / Format ─────────── */
.pl-live-strip .pl-live-hints { -webkit-flex-wrap: wrap; flex-wrap: wrap; }
.pl-live-strip .pl-hint-btn.pl-lb { padding: 10px 20px !important; }
.pl-live-strip .pl-lb svg { width: 28px; height: 28px; vertical-align: middle; margin-right: 10px; }
.pl-live-strip .pl-lb .pl-lb-txt { vertical-align: middle; }
/* Une seule ligne en français et en anglais (lot 5) : marges resserrées. */
.pl-live-strip .pl-live-hints > .pl-hint-btn { margin-right: 6px !important; margin-left: 0 !important; padding: 10px 16px !important; }
.pl-live-strip .pl-live-hints > .pl-hint-btn:last-child { margin-right: 0 !important; }
/* Les commandes de lecture à gauche, les raccourcis à droite. */
.pl-live-strip .pl-live-hints > .pl-lb-fin { margin-right: auto !important; }
.pl-live-strip .pl-lb .ico-lecture { display: none; }
.pl-live-strip .pl-lb.est-en-pause .ico-lecture { display: inline; }
.pl-live-strip .pl-lb.est-en-pause .ico-pause { display: none; }
/* Pastille fusionnée : « EN DIRECT » ou « DIFFÉRÉ −X min » dans la barre. */
.pl-live-strip.pl-en-differe .pl-live-dot { background: var(--rsk-amber, #f5a623) !important; -webkit-animation: none !important; animation: none !important; }
.pl-live-strip.pl-en-differe .pl-live-label { color: var(--rsk-amber, #f5a623) !important; }
#rsk-differe { display: none !important; }
/* Rattrapage : bouton « Direct » dans la rangée du lecteur (films, replay). */
#pl-golive-btn .pl-ctrl-label { white-space: nowrap; }

/* ── 3. Dernières chaînes (OK en plein direct) ─────────────────────────────── */
#rsk-recents {
  display: none; position: absolute; left: 0; right: 0; bottom: 0; z-index: 9600;
  padding: 40px 96px 64px 96px;
  background: -webkit-linear-gradient(top, rgba(0,0,0,0) 0%, rgba(0,0,0,0.92) 40%);
  background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.92) 40%);
}
#rsk-recents .rc-titre { font-size: 34px; font-weight: 800; color: #fff; margin-bottom: 22px; }
#rsk-recents .rc-cadre { overflow: hidden; }
#rsk-recents .rc-piste { white-space: nowrap; -webkit-transition: -webkit-transform .18s ease-out; transition: transform .18s ease-out; }
#rsk-recents .rc-carte {
  display: inline-block; vertical-align: top; width: 280px; margin-right: 20px;
  padding: 18px; border-radius: 16px; white-space: normal;
  background: rgba(255,255,255,0.08); color: #fff;
  -webkit-box-sizing: border-box; box-sizing: border-box;
}
#rsk-recents .rc-carte.rc-focus { background: var(--rsk-accent); }
#rsk-recents .rc-logo { display: block; width: 100%; height: 72px; -o-object-fit: contain; object-fit: contain; margin-bottom: 12px; }
#rsk-recents .rc-nom {
  font-size: 26px; font-weight: 700; line-height: 32px; height: 64px; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}

/* ── 14. Menu contextuel universel ─────────────────────────────────────────── */
#rsk-menu-ctx {
  display: none; position: fixed; left: 0; top: 0; right: 0; bottom: 0; z-index: 99980;
  background: rgba(0,0,0,0.62); outline: none;
}
#rsk-menu-ctx .mc-boite {
  position: absolute; left: 50%; top: 50%;
  -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%);
  min-width: 640px; max-width: 80%; padding: 30px 0 20px 0; border-radius: 20px;
  background: var(--rsk-surface, #14141c); border: 1px solid rgba(255,255,255,0.14);
}
#rsk-menu-ctx .mc-titre {
  font-size: 32px; font-weight: 800; color: var(--rsk-text, #fff); padding: 0 36px 6px 36px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#rsk-menu-ctx .mc-aide { font-size: 22px; color: var(--rsk-text-dim, #9aa); padding: 0 36px 18px 36px; }
#rsk-menu-ctx .mc-item { padding: 18px 36px; font-size: 28px; font-weight: 700; color: var(--rsk-text, #fff); }
#rsk-menu-ctx .mc-item.mc-focus { background: var(--rsk-accent); color: #fff; }

/* ── 7. Hero Films/Séries : boutons TOUJOURS affichés ──────────────────────── */
/* Le texte cède (résumé raccourci), jamais les boutons : leçon Android 1.2.58. */
.media-hero .hero-info { display: -webkit-flex; display: flex; -webkit-flex-direction: column; flex-direction: column; min-width: 0; }
.media-hero .hero-plot { -webkit-flex-shrink: 1; flex-shrink: 1; min-height: 0; -webkit-line-clamp: 2; }
.media-hero .hero-actions {
  display: -webkit-flex; display: flex; -webkit-flex-shrink: 0; flex-shrink: 0;
  margin-top: 18px;
}
.media-hero .hero-act {
  -webkit-flex-shrink: 0; flex-shrink: 0; margin-right: 16px;
  padding: 12px 26px; border-radius: 12px; border: 2px solid rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.10); color: #fff;
  font-size: 24px; font-weight: 700; white-space: nowrap; outline: none;
  font-family: inherit;
}
.media-hero .hero-act svg { width: 26px; height: 26px; vertical-align: middle; margin-right: 10px; }
.media-hero .hero-act .ha-txt { vertical-align: middle; }
.media-hero .hero-act:focus, .media-hero .hero-act.is-focused { background: var(--rsk-accent); border-color: var(--rsk-accent); }

/* ── 4. Grille EPG : programme passé et rattrapable ────────────────────────── */
.eg-prog.eg-rattrapable .eg-prog-t:before { content: '\21BA\00a0'; color: var(--rsk-text-dim, #9aa); font-weight: 800; }
.eg-prog.eg-rattrapable.eg-focus .eg-prog-t:before { color: #fff; }

/* ── Rejet Samsung 2.1.7 : saisie d'un code d'activation ──────────────────── */
#screen-blocked .blk-btn { padding: 18px 30px !important; margin: 0 8px !important; }
#rsk-code-activation {
  display: none; position: fixed; left: 0; top: 0; right: 0; bottom: 0; z-index: 99985;
  background: rgba(0,0,0,0.78); outline: none;
}
#rsk-code-activation .ca-boite {
  position: absolute; left: 50%; top: 50%; width: 760px; margin-left: -380px;
  -webkit-transform: translateY(-50%); transform: translateY(-50%);
  padding: 36px 40px 30px 40px; border-radius: 20px; text-align: center;
  background: var(--rsk-surface, #14141c); border: 1px solid rgba(255,255,255,0.14);
}
#rsk-code-activation .ca-titre { font-size: 34px; font-weight: 800; color: var(--rsk-text, #fff); }
#rsk-code-activation .ca-aide { font-size: 22px; color: var(--rsk-text-dim, #9aa); margin: 10px 0 22px 0; line-height: 1.4; }
#rsk-code-activation .ca-code { font-size: 46px; font-weight: 800; letter-spacing: 6px; color: #fff; white-space: pre; }
#rsk-code-activation .ca-msg { min-height: 34px; font-size: 24px; margin: 12px 0 18px 0; color: var(--rsk-text-dim, #9aa); }
#rsk-code-activation .ca-msg.ca-erreur { color: #ff8a80; }
#rsk-code-activation .ca-pave { width: 492px; margin: 0 auto; font-size: 0; }
#rsk-code-activation .ca-touche {
  display: inline-block; vertical-align: top; width: 148px; height: 76px; line-height: 76px; margin: 6px;
  border-radius: 12px; font-size: 32px; font-weight: 800; color: #fff; background: rgba(255,255,255,0.08);
}
#rsk-code-activation .ca-touche.ca-valider { font-size: 26px; }
#rsk-code-activation .ca-touche.ca-focus { background: var(--rsk-accent); }

/* ── 5. Liste Direct : horaire du programme en cours ───────────────────────── */
#live-channel-list .ch-epg-time { color: var(--rsk-text-dim, #9aa); font-weight: 600; margin-right: 10px; white-space: nowrap; }
#live-channel-list .channel-item.ch-cursor .ch-epg-time { color: inherit; }

/* ── Écran d'erreur du démarrage, version client (20/10/2026) ───────────────
   Calme : aucun rouge hors du focus, texte lisible à 3 m, pas de majuscules
   forcées (.spl-load-msg est en uppercase + letter-spacing). */
#splash-msg .boot-err { text-transform: none; letter-spacing: 0; max-width: 1200px; margin: 0 auto; text-align: center; }
#splash-msg .boot-err-t1 { font-size: 36px; font-weight: 600; color: #ffffff; line-height: 1.3; }
#splash-msg .boot-err-t2 { font-size: 26px; color: rgba(255,255,255,0.78); line-height: 1.45; margin-top: 14px; }
#splash-msg .boot-err-cd { font-size: 24px; color: rgba(255,255,255,0.60); margin-top: 18px; }
#splash-msg .boot-err-btns { margin-top: 22px; }
#splash-msg .boot-err-btn { background: rgba(255,255,255,0.14); color: #ffffff; border: 0; padding: 14px 40px;
  font-size: 28px; border-radius: 8px; margin: 0 10px; outline: none; }
#splash-msg .boot-err-btn.est-curseur, #splash-msg .boot-err-btn:focus { background: var(--rsk-accent); }
#splash-msg .boot-err-code { font-size: 22px; color: rgba(255,255,255,0.40); margin-top: 18px; }

/* Favoris : onglets hors de la zone de rognage du haut de l'écran (ils étaient à y = 0). */
#section-favoris .fav-tab-bar { padding-top: var(--tv-safe-px, 54px); }

/* Fiche film/série : un seul aplat rouge = le focus (UX 4.3/4.4, relevé sur TV le 23/10). */
#modal-detail .sd-btn-primary.is-focused, #modal-detail .sd-btn-primary:focus,
#modal-detail .sd-btn-secondary.is-focused, #modal-detail .sd-btn-secondary:focus,
#modal-detail .season-btn.is-focused, #modal-detail .season-btn:focus,
#modal-detail .episode-item.is-focused, #modal-detail .episode-item:focus {
  background: var(--rsk-accent) !important; color: #fff !important;
  border-color: transparent !important; outline: none !important;
  -webkit-box-shadow: none !important; box-shadow: none !important;
}
#modal-detail .episode-item.is-focused *, #modal-detail .episode-item:focus * { color: #fff !important; }
/* Saison choisie (sans focus) : neutre, soulignée — elle ne doit pas ressembler au focus. */
#modal-detail .season-btn.active:not(.is-focused):not(:focus) {
  background: rgba(255,255,255,0.14) !important; color: #fff !important;
  border-color: rgba(255,255,255,0.35) !important;
  -webkit-box-shadow: inset 0 -4px 0 var(--rsk-accent) !important; box-shadow: inset 0 -4px 0 var(--rsk-accent) !important;
}

/* Ascenseur de la fiche : neutre (il était rouge, un 2e rouge à côté du focus). */
.sd-content::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.45) !important; }

/* Catch-up : un seul aplat rouge = le focus ; groupe choisi neutre ; pas de scale (TV, 23/10). */
#cu-cat-list .cu-cat-item.cu-focused, #cu-chan-list .cu-chan-item.cu-focused, #cu-prog-list .cu-prog-item.cu-focused {
  background: var(--rsk-accent) !important; color: #fff !important;
  -webkit-transform: none !important; transform: none !important;
}
#cu-chan-list .cu-chan-item.cu-focused *, #cu-prog-list .cu-prog-item.cu-focused * { color: #fff !important; }
#cu-cat-list .cu-cat-item.cu-selected:not(.cu-focused) {
  background: rgba(255,255,255,0.10) !important; color: #fff !important;
  border-left-color: var(--rsk-accent) !important;
}

/* Sélections neutres : seul le focus porte l'aplat rouge (double focus vu sur TV, 23/10). */
#fav-cat-list .cat-item.active:not(:focus):not(.focused):not(.is-focused) {
  background: transparent !important; color: #fff !important;
  -webkit-box-shadow: inset 0 -4px 0 var(--rsk-accent) !important; box-shadow: inset 0 -4px 0 var(--rsk-accent) !important;
}
#fav-cat-list .cat-item:focus, #fav-cat-list .cat-item.is-focused {
  background: var(--rsk-accent) !important; color: #fff !important;
}
.cu-day-pill.cu-day-active {
  background: rgba(255,255,255,0.16) !important; border-color: var(--rsk-accent) !important; color: #fff !important;
}

/* Marge de sécurité basse des listes longues (focus mesuré à 1080 px sur TV, 23/10). */
#radio-channel-list, #vod-cat-list, #series-cat-list, #vod-grid, #series-grid {
  margin-bottom: var(--tv-safe-px, 54px) !important;
}
/* Badges LIVE : l'aplat rouge est réservé au focus. */
.dv3-pill { background: rgba(0,0,0,0.62) !important; color: #fff !important; }
.dv3-pill i { background: var(--rsk-accent) !important; }
html.ui-v2 #dash-v2 .dv-hx-badge { background: rgba(0,0,0,0.62) !important; color: var(--rsk-accent) !important; }

/* « View demo » : le masquage en ligne doit l'emporter (une règle !important le forçait). */
#section-settings #spanel-playlists #pl-demo-btn[style*="display:none"],
#section-settings #spanel-playlists #pl-demo-btn[style*="display: none"] { display: none !important; }

/* Panneau des chaînes du lecteur : un seul aplat rouge = le focus (TV, 23/10). */
.zap-item.zap-focused { background: var(--rsk-accent) !important; color: #fff !important; }
.zap-item.zap-focused * { color: #fff !important; }
.zap-item.zap-current:not(.zap-focused) {
  background: rgba(255,255,255,0.08) !important;
  -webkit-box-shadow: inset 4px 0 0 var(--rsk-accent) !important; box-shadow: inset 4px 0 0 var(--rsk-accent) !important;
}

/* CO-UI-13 (Samsung) : affiche absente -> visuel de remplacement, jamais une case vide. */
.vod-card-thumb {
  background: #1C1C30 url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-opacity='.32' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='16' rx='2'/%3E%3Cpath d='M7 4v16M17 4v16M3 9h4M3 15h4M17 9h4M17 15h4'/%3E%3C/svg%3E") center 58% / 96px 96px no-repeat;
}

/* 31/10/2026 — Sous-titres lisibles à 3 m (parité Android : blanc sur bandeau
   semi-opaque, ~5 % de la hauteur). Les lignes sont des <span> construits par
   player.js ; :empty (style.css) masque toujours la zone vide. */
#pl-subtitle { left: 6%; right: 6%; bottom: 8%; font-size: 52px; line-height: 1.34;
  font-weight: 500; white-space: normal; text-shadow: 0 2px 3px rgba(0,0,0,0.9); }
#pl-subtitle .pl-sub-ligne { background: rgba(0,0,0,0.62); padding: 0 16px; border-radius: 6px;
  -webkit-box-decoration-break: clone; box-decoration-break: clone; }
#pl-subtitle i { font-style: italic; }
#pl-subtitle.pl-sub-haut { bottom: auto; top: 8%; }
#pl-subtitle.pl-sub-barre { bottom: 34%; }
#pl-subtitle.pl-sub-haut.pl-sub-barre { top: 16%; bottom: auto; }
