/* Nos streamers sur Twitch (twitch-live.js) : violet Twitch, rouge du direct. */
.tw-home-tools { display:flex; justify-content:flex-end; gap:8px; margin:0 0 12px; min-width:0 }
html.fmx .tw-home-tools .tw-btn { flex:none; min-height:44px; padding:8px 14px }
/* La roue déplacée dans l'accueil doit inclure son padding dans sa largeur à 320 px. */
.pocket-review #nextBoosters { box-sizing:border-box; min-width:0; max-width:100% }
.tw-btn, .tw-pop, .tw-toast { --tw-purple:#9146ff; --tw-purple-soft:#bf94ff; --tw-red:#eb0400; --tw-bg:#121018; --tw-card:#1b1724; --tw-line:#2e2840; --tw-ink:#efeaf9; --tw-muted:#a39cb8 }
.tw-btn { position:relative; display:inline-flex; align-items:center; justify-content:center; gap:8px; transition:border-color .18s, box-shadow .18s, transform .18s, background-color .18s }
.tw-btn .tw-glyph { width:18px; height:18px; flex:none; color:var(--tw-purple-soft); transition:transform .25s cubic-bezier(.3, 1.6, .5, 1) }
.tw-btn:hover, .tw-btn[aria-expanded="true"] { border-color:var(--tw-purple) !important; background-color:#9146ff1f !important; box-shadow:0 0 0 1px #9146ff55, 0 8px 22px #9146ff33; transform:translateY(-1px) }
.tw-btn:hover .tw-glyph, .tw-btn[aria-expanded="true"] .tw-glyph { transform:rotate(-8deg) scale(1.12) }
.tw-btn:focus-visible { outline:2px solid var(--tw-purple-soft); outline-offset:2px }
.tw-btn.is-live { border-color:#eb040088 !important; background:linear-gradient(135deg, #9146ff26, #eb04001f) !important }
.tw-btn.is-live:hover { border-color:var(--tw-red) !important; box-shadow:0 0 0 1px #eb040066, 0 8px 22px #eb040040 }
.tw-dot { position:relative; width:9px; height:9px; flex:none; border-radius:50%; background:var(--tw-red) }
.tw-dot::after { content:""; position:absolute; inset:0; border-radius:50%; background:var(--tw-red); animation:tw-pulse 1.6s ease-out infinite }
@keyframes tw-pulse { from { transform:scale(1); opacity:.7 } to { transform:scale(2.6); opacity:0 } }
.tw-label { white-space:nowrap }

/* Panneau : sous le bouton sur ordinateur, feuille du bas sur téléphone. */
.tw-pop { position:fixed; z-index:9000; width:380px; max-height:min(560px, calc(100vh - 120px)); max-height:min(560px, calc(100dvh - 120px)); overflow:auto; box-sizing:border-box; padding:16px; border-radius:18px;
  background:var(--tw-bg); color:var(--tw-ink); border:1px solid var(--tw-line); box-shadow:0 24px 60px #000c, 0 0 0 1px #9146ff22;
  opacity:0; transform:translateY(-6px) scale(.98); transform-origin:top right; transition:opacity .16s, transform .2s cubic-bezier(.2, 1, .3, 1) }
.tw-pop.is-open { opacity:1; transform:none }
.tw-pop-head { position:sticky; top:0; z-index:2; background:var(--tw-bg); display:flex; align-items:center; gap:12px; margin-bottom:14px }
.tw-pop-head > div { flex:1; min-width:0 }
.tw-pop-head b { display:block; font-size:16px }
.tw-pop-head small { display:block; color:var(--tw-muted); font-size:12.5px; margin-top:2px }
.tw-pop-mark { display:grid; place-items:center; width:38px; height:38px; flex:none; border-radius:11px; background:var(--tw-purple); color:#fff }
.tw-pop-mark .tw-glyph { width:22px; height:22px }
.tw-x { display:grid; place-items:center; width:32px; height:32px; flex:none; padding:0; border:0; border-radius:9px; background:transparent; color:var(--tw-muted); cursor:pointer }
.tw-x svg { width:14px; height:14px }
.tw-x:hover { background:#ffffff14; color:var(--tw-ink) }
.tw-live-list, .tw-off-list { display:flex; flex-direction:column; gap:10px }
.tw-sep { margin:14px 0 8px; color:var(--tw-muted); font-size:11px; font-weight:800; letter-spacing:.1em; text-transform:uppercase }

/* Live : miniature du direct, badge rouge, spectateurs ; survol : léger zoom et bouton lecture. */
.tw-live { display:block; overflow:hidden; border-radius:14px; background:var(--tw-card); border:1px solid var(--tw-line); color:inherit; text-decoration:none; transition:border-color .18s, transform .18s, box-shadow .18s }
.tw-live:hover, .tw-live:focus-visible { border-color:var(--tw-purple); transform:translateY(-2px); box-shadow:0 12px 26px #9146ff2e; outline:none }
.tw-thumb { position:relative; display:block; aspect-ratio:16 / 9; overflow:hidden; background:#0b0a10 }
.tw-thumb img { width:100%; height:100%; object-fit:cover; display:block; transition:transform .35s ease, filter .25s }
.tw-live:hover .tw-thumb img { transform:scale(1.05); filter:brightness(.8) }
.tw-badge { position:absolute; top:8px; left:8px; padding:2px 7px; border-radius:5px; background:var(--tw-red); color:#fff; font:800 11px/1.5 system-ui, sans-serif; letter-spacing:.06em; text-transform:uppercase }
.tw-viewers { position:absolute; left:8px; bottom:8px; display:inline-flex; align-items:center; gap:4px; padding:1px 7px; border-radius:5px; background:#000000b3; color:#fff; font:700 12px/1.6 system-ui, sans-serif }
.tw-viewers svg { width:13px; height:13px; color:#ff6b6b }
.tw-play { position:absolute; inset:0; margin:auto; display:grid; place-items:center; width:54px; height:54px; border-radius:50%; background:var(--tw-purple); color:#fff; opacity:0; transform:scale(.7); transition:opacity .2s, transform .25s cubic-bezier(.3, 1.6, .5, 1) }
.tw-play svg { width:24px; height:24px; margin-left:3px }
.tw-live:hover .tw-play, .tw-live:focus-visible .tw-play { opacity:1; transform:none }
.tw-live-body { display:flex; align-items:flex-start; gap:10px; padding:10px 12px 12px }
.tw-live-text { min-width:0; display:flex; flex-direction:column; gap:2px }
.tw-live-text b { font-size:14.5px }
.tw-title { color:#d8d1ea; font-size:13px; line-height:1.35; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden }
.tw-live-text small { color:var(--tw-muted); font-size:12px }
.tw-av { width:38px; height:38px; flex:none; border-radius:50%; object-fit:cover; background:#2a2438 }
.tw-av.is-live { box-shadow:0 0 0 2px var(--tw-bg), 0 0 0 4px var(--tw-red) }
.tw-av-letter { display:grid; place-items:center; color:var(--tw-purple-soft); font-weight:800 }

/* Hors ligne : ligne simple, flèche qui glisse au survol. */
.tw-off { display:flex; align-items:center; gap:12px; padding:10px 12px; border-radius:12px; border:1px solid transparent; color:inherit; text-decoration:none; transition:background-color .18s, border-color .18s }
.tw-off .tw-av { filter:grayscale(.55); opacity:.85; transition:filter .2s, opacity .2s }
.tw-off:hover, .tw-off:focus-visible { background:var(--tw-card); border-color:var(--tw-line); outline:none }
.tw-off:hover .tw-av { filter:none; opacity:1 }
.tw-off-text { flex:1; min-width:0; display:flex; flex-direction:column; gap:1px }
.tw-off-text b { font-size:14px }
.tw-off-text small { color:var(--tw-muted); font-size:12px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis }
.tw-go { display:grid; place-items:center; width:30px; height:30px; flex:none; border-radius:9px; color:var(--tw-muted); transition:color .18s, transform .2s, background-color .18s }
.tw-go svg { width:16px; height:16px }
.tw-off:hover .tw-go { color:#fff; background:var(--tw-purple); transform:translateX(2px) }
.tw-foot { margin:14px 0 0; color:var(--tw-muted); font-size:11.5px; text-align:center }
.tw-error { color:var(--tw-muted); font-size:12px; line-height:1.5 }

/* Annonce d'un live qui commence. */
.tw-toast { position:fixed; z-index:9001; left:20px; bottom:20px; display:flex; align-items:flex-start; gap:4px; width:340px; max-width:calc(100vw - 32px); box-sizing:border-box; padding:8px;
  border-radius:16px; background:var(--tw-bg); color:var(--tw-ink); border:1px solid var(--tw-purple); box-shadow:0 18px 48px #000c, 0 0 24px #9146ff40;
  opacity:0; transform:translateY(16px); transition:opacity .25s, transform .35s cubic-bezier(.2, 1.3, .4, 1) }
.tw-toast.is-in { opacity:1; transform:none }
.tw-toast-link { flex:1; min-width:0; display:flex; gap:10px; color:inherit; text-decoration:none }
.tw-toast-thumb { position:relative; width:118px; flex:none; aspect-ratio:16 / 9; overflow:hidden; border-radius:10px; background:#0b0a10 }
.tw-toast-thumb img { width:100%; height:100%; object-fit:cover; display:block }
.tw-toast-thumb .tw-badge { top:5px; left:5px; font-size:9.5px }
.tw-toast-text { min-width:0; display:flex; flex-direction:column; gap:2px; padding-top:2px }
.tw-toast-text small { display:inline-flex; align-items:center; gap:5px; color:var(--tw-purple-soft); font-size:11px; font-weight:800; letter-spacing:.06em; text-transform:uppercase }
.tw-toast-text small .tw-glyph { width:13px; height:13px }
.tw-toast-text b { font-size:14px }
.tw-toast-text span { color:var(--tw-muted); font-size:12px; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden }
.tw-toast-link:hover b { color:var(--tw-purple-soft) }

@media (max-width:600px) {
  .pocket-review #nextBoosters { max-width:calc(100vw - 28px) }
  .pocket-home-tools:has(.tw-btn.is-live) { flex-wrap:wrap }
  .tw-btn { min-width:0 }
  .tw-btn:not(.is-live) .tw-label { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap }
  .tw-btn:not(.is-live) { flex:0 0 46px !important }
  .tw-btn.is-live { flex:1 0 100% !important; order:-1 }
  .tw-pop { left:0 !important; right:0; top:auto !important; bottom:0; width:auto; max-height:80vh; max-height:80dvh; border-radius:20px 20px 0 0; padding:18px 16px calc(18px + env(safe-area-inset-bottom, 0px)); transform:translateY(24px); transform-origin:bottom center }
  .tw-pop .tw-x { width:44px; height:44px }
  .tw-toast { left:16px; bottom:calc(84px + env(safe-area-inset-bottom, 0px)) }
}
@media (prefers-reduced-motion: reduce) {
  .tw-dot::after { animation:none }
  .tw-btn, .tw-btn .tw-glyph, .tw-pop, .tw-live, .tw-thumb img, .tw-play, .tw-toast, .tw-go { transition:none }
}
