/* ===================== Otub — feuille de style ===================== */
:root, [data-theme=light] {
  --bg: #fff; --bg-2: #f9f9f9; --bg-3: #f2f2f2; --text: #0f0f0f; --text-2: #606060; --text-3: #909090;
  --chip: rgba(0,0,0,.05); --chip-hover: rgba(0,0,0,.1); --chip-on: #0f0f0f; --chip-on-text: #fff;
  --hover: rgba(0,0,0,.05); --press: rgba(0,0,0,.1); --line: rgba(0,0,0,.1); --border: #ccc; --search-btn: #f8f8f8;
  --red: #ff0033; --red-dark: #cc0000; --blue: #065fd4; --blue-hover: #def1ff; --menu: #fff; --shadow: 0 4px 32px rgba(0,0,0,.1);
  --sub-bg: #0f0f0f; --sub-text: #fff; --sk: #e5e5e5; --card-hover: rgba(0,0,0,.05); --scrim: rgba(0,0,0,.5);
  --head-h: 56px; --guide-w: 240px; --mini-w: 72px; --radius: 12px;
  color-scheme: light;
}
[data-theme=dark] {
  --bg: #0f0f0f; --bg-2: #181818; --bg-3: #212121; --text: #f1f1f1; --text-2: #aaa; --text-3: #717171;
  --chip: rgba(255,255,255,.1); --chip-hover: rgba(255,255,255,.2); --chip-on: #f1f1f1; --chip-on-text: #0f0f0f;
  --hover: rgba(255,255,255,.1); --press: rgba(255,255,255,.2); --line: rgba(255,255,255,.2); --border: #303030; --search-btn: #222;
  --blue: #3ea6ff; --blue-hover: #263850; --menu: #282828; --shadow: 0 4px 32px rgba(0,0,0,.4);
  --sub-bg: #f1f1f1; --sub-text: #0f0f0f; --sk: #272727; --card-hover: rgba(255,255,255,.1); --scrim: rgba(0,0,0,.7);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.43 Roboto, Arial, sans-serif; overflow-y: scroll; }
body.modal-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button:disabled { cursor: default; opacity: .5; }
input, textarea, select { font: inherit; color: inherit; }
img { display: block; }
h1, h2, h3, h4, p { margin: 0; }
[hidden] { display: none !important; }
::selection { background: rgba(62,166,255,.35); }
.ic { width: 24px; height: 24px; flex: none; display: block; }
.ic.filled { fill: currentColor; }
.muted { color: var(--text-2); }
.pad { padding: 16px 0; }
.grow { flex: 1; }
.dot-sep { margin: 0 4px; }
.red { color: var(--red); }
kbd { font: 12px/1 Roboto Mono, monospace; background: var(--chip); padding: 4px 8px; border-radius: 4px; }

/* ---------- Boutons ---------- */
.icon-btn { width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex: none; position: relative; }
.icon-btn:hover { background: var(--hover); }
.icon-btn:active { background: var(--press); }
.icon-btn.sm { width: 32px; height: 32px; }
.icon-btn.sm .ic { width: 20px; height: 20px; }
.icon-btn.glass { background: rgba(255,255,255,.1); color: #fff; }
.icon-btn.glass:hover { background: rgba(255,255,255,.2); }
.btn-blue { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 16px; border-radius: 18px; background: var(--blue); color: #fff; font-weight: 500; }
[data-theme=dark] .btn-blue { color: #0f0f0f; }
.btn-blue:hover:not(:disabled) { filter: brightness(1.1); }
.btn-blue:disabled { background: var(--chip); color: var(--text-3); opacity: 1; }
.btn-blue.big { height: 40px; padding: 0 24px; border-radius: 20px; }
.btn-blue .ic { width: 20px; height: 20px; }
.btn-text { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 16px; border-radius: 18px; font-weight: 500; }
.btn-text:hover { background: var(--hover); }
.btn-text.blue { color: var(--blue); }
.btn-text.blue:hover { background: var(--blue-hover); }
.btn-text.danger { color: #e53935; }
.btn-text.sm { height: 32px; padding: 0 12px; font-size: 12px; }
.btn-text .ic { width: 20px; height: 20px; }
.btn-chip { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 16px; border-radius: 18px; background: var(--chip); font-weight: 500; white-space: nowrap; }
.btn-chip:hover { background: var(--chip-hover); }
.btn-chip.sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn-chip.danger { color: #e53935; }
.btn-chip .ic { width: 20px; height: 20px; }
.btn-outline-blue { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 15px 0 11px; border: 1px solid var(--line); border-radius: 18px; color: var(--blue); font-weight: 500; white-space: nowrap; }
.btn-outline-blue:hover { background: var(--blue-hover); border-color: transparent; }
.btn-outline-blue .ic { width: 24px; height: 24px; }
.btn-white { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 16px; border-radius: 18px; background: #fff; color: #0f0f0f; font-weight: 500; }
.btn-white:hover { background: #e6e6e6; }
.btn-glass { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 16px; border-radius: 18px; background: rgba(255,255,255,.1); color: #fff; font-weight: 500; }
.btn-glass:hover { background: rgba(255,255,255,.2); }
.btn-white .ic, .btn-glass .ic { width: 20px; height: 20px; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 16px 0 12px; border-radius: 18px; background: var(--chip); font-weight: 500; white-space: nowrap; flex: none; }
.pill:hover { background: var(--chip-hover); }
.pill.pill-icon { width: 36px; padding: 0; justify-content: center; }
.chip { display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border-radius: 8px; background: var(--chip); font-weight: 500; white-space: nowrap; flex: none; }
.chip:hover { background: var(--chip-hover); }
.chip.active { background: var(--chip-on); color: var(--chip-on-text); }
.chips { display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }

.sub-btn { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 16px; border-radius: 18px; background: var(--sub-bg); color: var(--sub-text); font-weight: 500; white-space: nowrap; flex: none; }
.sub-btn:hover { opacity: .85; }
.sub-btn.subbed { background: var(--chip); color: var(--text); padding: 0 10px 0 12px; }
.sub-btn.subbed:hover { background: var(--chip-hover); opacity: 1; }
.sub-btn .ic { width: 22px; height: 22px; }
.sub-btn .sub-chev { width: 18px; height: 18px; }
.sub-btn.sm { height: 32px; padding: 0 12px; font-size: 13px; }

/* ---------- Avatars, badges, miniatures ---------- */
.av { border-radius: 50%; object-fit: cover; flex: none; display: inline-block; background: var(--sk); }
.av-letter { display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: 500; user-select: none; }
.av-letter .ic { width: 60%; height: 60%; }
.verified { display: inline-flex; vertical-align: -2px; margin-left: 4px; color: var(--text-2); }
.verified .ic { width: 14px; height: 14px; }
.th { position: relative; display: block; border-radius: var(--radius); overflow: hidden; background: var(--sk); aspect-ratio: 16/9; }
.th-img { width: 100%; height: 100%; object-fit: cover; transition: opacity .2s; }
.th-none { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; background: linear-gradient(135deg, #3a3a3a, #1b1b1b); color: rgba(255,255,255,.6); }
.th-none .ic { width: 36px; height: 36px; }
.th-dur { position: absolute; right: 8px; bottom: 8px; background: rgba(0,0,0,.6); color: #fff; font-size: 12px; font-weight: 500; line-height: 12px; padding: 3px 4px; border-radius: 4px; z-index: 2; }
.th-prog { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255,255,255,.4); z-index: 2; }
.th-prog i { display: block; height: 100%; background: var(--red); }
.th-preview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; z-index: 1; background: #000; }
.previewing .th-preview { opacity: 1; }
.previewing .th-dur { opacity: 0; }
.th-pbar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255,255,255,.3); z-index: 3; opacity: 0; }
.previewing .th-pbar { opacity: 1; }
.th-pbar i { display: block; height: 100%; background: var(--red); width: 0; }
.card .th, .row-item .th { transition: border-radius .2s; }
.previewing { border-radius: 0 !important; }

/* ---------- Chargement / vide ---------- */
.spinner { display: inline-block; width: 36px; height: 36px; border: 3px solid var(--chip); border-top-color: var(--text-2); border-radius: 50%; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.page-loading { display: flex; justify-content: center; padding: 80px 0; }
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 80px 24px; gap: 12px; max-width: 520px; margin: 0 auto; }
.empty-ic { width: 96px !important; height: 96px !important; color: var(--text-3); stroke-width: 1.2; }
.empty h2 { font-size: 22px; font-weight: 400; }
.empty p { color: var(--text-2); }
.empty .btn-blue, .empty .btn-chip, .empty .btn-outline-blue { margin-top: 12px; }
.not-found { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 100px 24px; gap: 14px; }
.nf-ic { width: 120px; height: 120px; opacity: .9; }
.not-found h2 { font-size: 20px; font-weight: 400; }
.not-found p { color: var(--text-2); }

/* ===================== En-tête ===================== */
#masthead { position: fixed; top: 0; left: 0; right: 0; height: var(--head-h); z-index: 100; background: var(--bg); display: flex; align-items: center; justify-content: space-between; padding: 0 16px; gap: 16px; }
.mh-start { display: flex; align-items: center; gap: 8px; flex: none; }
.mh-logo { display: flex; align-items: center; height: 40px; padding: 0 14px 0 8px; }
.logo { display: inline-flex; align-items: center; gap: 3px; position: relative; color: var(--text); }
.logo-mark { width: 26px; height: 26px; }
.logo-text { font-size: 21px; font-weight: 700; letter-spacing: -1.1px; line-height: 1; font-family: Roboto, "Arial Black", Arial, sans-serif; margin-left: 1px; }
.logo-cc { position: absolute; right: -15px; top: -6px; font-size: 10px; color: var(--text-2); font-weight: 400; }
.mh-center { flex: 0 1 732px; display: flex; align-items: center; gap: 12px; min-width: 0; }
.mh-back { display: none; }
.search { flex: 1; display: flex; min-width: 0; margin-left: 40px; }
.search-box { position: relative; flex: 1; display: flex; align-items: center; height: 40px; border: 1px solid var(--border); border-right: 0; border-radius: 40px 0 0 40px; padding: 0 4px 0 16px; background: var(--bg); min-width: 0; }
.search.focus { margin-left: 0; }
.search.focus .search-box { border-color: #1c62b9; box-shadow: inset 0 1px 2px rgba(0,0,0,.3); padding-left: 48px; }
.search-ic { display: none; position: absolute; left: 16px; color: var(--text); }
.search-ic .ic { width: 20px; height: 20px; }
.search.focus .search-ic { display: block; }
.search-box input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 16px; height: 100%; }
.search-box input::placeholder { color: var(--text-3); }
.search-clear .ic { width: 22px; height: 22px; }
.search-btn { width: 64px; height: 40px; border: 1px solid var(--border); border-radius: 0 40px 40px 0; background: var(--search-btn); display: flex; align-items: center; justify-content: center; flex: none; }
.search-btn:hover { background: var(--chip); }
.search-btn .ic { width: 22px; height: 22px; }
.mh-mic { background: var(--chip); }
.mh-mic:hover { background: var(--chip-hover); }
.suggest { position: absolute; top: calc(100% + 4px); left: 0; right: -64px; background: var(--menu); border-radius: 12px; box-shadow: var(--shadow); padding: 16px 0; z-index: 10; border: 1px solid var(--line); }
.sg-item { display: flex; align-items: center; gap: 14px; padding: 0 16px; height: 32px; cursor: default; font-size: 16px; font-weight: 500; }
.sg-item .ic { width: 20px; height: 20px; color: var(--text); }
.sg-item span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg-item:hover, .sg-item.sel { background: var(--hover); }
.sg-item .sg-del { color: var(--blue); font-size: 13px; opacity: 0; }
.sg-item:hover .sg-del { opacity: 1; }
.mh-end { display: flex; align-items: center; gap: 8px; flex: none; justify-content: flex-end; min-width: 225px; }
.mh-search-open { display: none; }
.create-btn { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 16px 0 10px; border-radius: 18px; background: var(--chip); font-weight: 500; }
.create-btn:hover { background: var(--chip-hover); }
.bell-badge { position: absolute; top: 2px; right: 0; min-width: 18px; height: 16px; padding: 0 4px; border-radius: 8px; background: #cc0000; color: #fff; font-size: 11px; line-height: 16px; text-align: center; border: 2px solid var(--bg); box-sizing: content-box; }
.mh-avatar { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; margin-left: 8px; }

/* ===================== Menu latéral ===================== */
#page { padding-top: var(--head-h); min-height: 100vh; }
body.guide-full #page { margin-left: var(--guide-w); }
body.guide-mini #page { margin-left: var(--mini-w); }
#guide { position: fixed; top: var(--head-h); left: 0; bottom: 0; width: var(--guide-w); background: var(--bg); z-index: 90; display: none; }
body.guide-full #guide { display: block; }
.g-drawer-head { display: none; height: var(--head-h); align-items: center; padding: 0 16px; gap: 8px; }
.g-scroll { height: 100%; overflow-y: auto; padding: 12px 12px 24px; scrollbar-width: thin; scrollbar-color: transparent transparent; }
.g-scroll:hover { scrollbar-color: var(--text-3) transparent; }
.g-item { display: flex; align-items: center; gap: 24px; height: 40px; padding: 0 12px; border-radius: 10px; width: 100%; text-align: left; position: relative; }
.g-item:hover { background: var(--hover); }
.g-item.active { background: var(--chip); font-weight: 500; }
.g-item.active:hover { background: var(--chip-hover); }
.g-item > span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-item .av { width: 24px !important; height: 24px !important; font-size: 12px !important; }
.g-fresh { width: 4px; height: 4px; border-radius: 50%; background: var(--blue); flex: none; }
.g-brand { width: 24px; height: 24px; border-radius: 50%; background: var(--red); color: #fff; display: flex; align-items: center; justify-content: center; }
.g-brand .ic { width: 12px; height: 12px; margin-left: 2px; }
.g-sep { height: 1px; background: var(--line); margin: 12px 0; }
.g-title { display: flex; align-items: center; gap: 8px; padding: 6px 12px 4px; font-size: 16px; font-weight: 500; height: 40px; border-radius: 10px; }
a.g-title:hover { background: var(--hover); }
.g-title .ic { width: 18px; height: 18px; }
.g-login { padding: 8px 12px 4px 20px; }
.g-login p { font-size: 14px; margin-bottom: 12px; }
.g-foot { padding: 4px 12px; color: var(--text-2); font-size: 13px; font-weight: 500; }
.g-foot p { margin-bottom: 12px; display: flex; flex-wrap: wrap; gap: 0 8px; }
.g-foot a { cursor: pointer; }
.g-copy { color: var(--text-3); font-weight: 400; font-size: 12px; }
#mini-guide { position: fixed; top: var(--head-h); left: 0; bottom: 0; width: var(--mini-w); background: var(--bg); z-index: 89; padding: 4px; display: none; }
body.guide-mini #mini-guide { display: block; }
.mg-item { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 0 14px; border-radius: 10px; font-size: 10px; }
.mg-item:hover { background: var(--hover); }
.mg-item span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 64px; }
#drawer-bg { position: fixed; inset: 0; background: var(--scrim); z-index: 200; opacity: 0; pointer-events: none; transition: opacity .2s; }
body.drawer-open #drawer-bg { opacity: 1; pointer-events: auto; }
body.drawer-open #guide { display: block; top: 0; z-index: 201; box-shadow: var(--shadow); animation: slideIn .2s ease; }
body.drawer-open .g-drawer-head { display: flex; }
body.drawer-open .g-scroll { height: calc(100% - var(--head-h)); padding-top: 0; }
@keyframes slideIn { from { transform: translateX(-100%); } }
#bottom-nav { display: none; }

/* ===================== Menus, toasts, fenêtres ===================== */
.popmenu { position: fixed; z-index: 400; background: var(--menu); border-radius: 12px; box-shadow: var(--shadow); padding: 8px 0; min-width: 220px; max-width: 340px; max-height: calc(100vh - 80px); overflow-y: auto; animation: pop .12s ease; }
[data-theme=dark] .popmenu { border: 1px solid rgba(255,255,255,.06); }
@keyframes pop { from { opacity: 0; transform: translateY(-4px); } }
.popmenu.pm-wide { width: 300px; max-width: 300px; }
.pm-item { display: flex; align-items: center; gap: 16px; width: 100%; height: 40px; padding: 0 16px; text-align: left; white-space: nowrap; }
.pm-item:hover { background: var(--hover); }
.pm-item > span { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.pm-item.danger { color: #e53935; }
.pm-item .pm-sub { flex: 0; }
.pm-chev { width: 20px !important; height: 20px !important; }
.pm-sep { height: 1px; background: var(--line); margin: 8px 0; }
.pm-head { display: flex; align-items: center; gap: 12px; padding: 4px 16px 8px; font-size: 16px; }
.pm-note { padding: 4px 16px 12px; color: var(--text-2); font-size: 12px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.pm-theme .pm-item .ic:not(:first-child) { display: none; }
.pm-theme .pm-item svg path[d^="M20 6"] { stroke: var(--text); }
.pm-account { display: flex; gap: 16px; padding: 8px 16px; }
.pm-name { font-size: 16px; }
.pm-handle { font-size: 16px; }
.pm-link { display: block; color: var(--blue); margin-top: 8px; }
.notif-panel { width: 480px !important; max-width: calc(100vw - 16px) !important; padding: 0; max-height: min(80vh, 700px); }
.np-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 8px 4px 16px; border-bottom: 1px solid var(--line); height: 48px; }
.np-head h3 { font-size: 16px; font-weight: 400; }
.np-load { display: flex; justify-content: center; padding: 40px; }
.np-item { display: flex; align-items: flex-start; gap: 12px; padding: 16px 16px 16px 8px; }
.np-item:hover { background: var(--hover); }
.np-dot { width: 4px; height: 4px; border-radius: 50%; margin-top: 22px; flex: none; }
.np-item.unread .np-dot { background: var(--blue); }
.np-text { flex: 1; font-size: 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.np-text span { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.np-text small { color: var(--text-2); font-size: 12px; }
.np-th { width: 86px; aspect-ratio: 16/9; object-fit: cover; border-radius: 4px; flex: none; }
.np-th.v { width: 48px; aspect-ratio: 9/16; }
.np-empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 48px 32px; gap: 8px; }
.np-empty-ic { width: 96px !important; height: 96px !important; color: var(--text-3); stroke-width: 1.2; }
.np-empty p { font-size: 16px; font-weight: 500; color: var(--text-2); }
.np-empty small { color: var(--text-2); }

#toast { position: fixed; left: 12px; bottom: 24px; z-index: 600; background: #0f0f0f; color: #f1f1f1; border-radius: 8px; padding: 14px 16px; display: flex; align-items: center; gap: 24px; font-size: 14px; max-width: min(560px, calc(100vw - 24px));
  transform: translateY(150%); opacity: 0; transition: transform .25s, opacity .25s; pointer-events: none; box-shadow: 0 4px 16px rgba(0,0,0,.3); }
[data-theme=dark] #toast { background: #f1f1f1; color: #0f0f0f; }
#toast.show { transform: none; opacity: 1; pointer-events: auto; }
.toast-btn { color: #3ea6ff; font-weight: 500; white-space: nowrap; }
[data-theme=dark] .toast-btn { color: #065fd4; }

.modal-wrap { position: fixed; inset: 0; z-index: 500; background: var(--scrim); display: flex; align-items: center; justify-content: center; padding: 16px; opacity: 0; transition: opacity .15s; }
.modal-wrap.open { opacity: 1; }
.modal-wrap.closing { opacity: 0; }
.modal { background: var(--menu); border-radius: 12px; box-shadow: var(--shadow); width: 100%; max-width: 520px; max-height: calc(100vh - 32px); overflow: auto; padding: 24px; position: relative; transform: scale(.97); transition: transform .15s; }
[data-theme=dark] .modal { background: #212121; }
.modal-wrap.open .modal { transform: none; }
.m-small { max-width: 420px; }
.m-title { font-size: 18px; font-weight: 400; margin-bottom: 12px; }
.m-text { color: var(--text-2); margin-bottom: 8px; }
.m-hint { color: var(--text-2); font-size: 12px; margin-top: 12px; }
.m-actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-top: 20px; flex-wrap: wrap; }
.m-head { display: flex; align-items: center; justify-content: space-between; margin: -8px -8px 16px 0; gap: 12px; }
.m-head h2 { font-size: 18px; font-weight: 400; }
.login-ask { text-align: center; }
.login-ask > .ic { width: 56px; height: 56px; margin: 0 auto 12px; color: var(--text-2); }
.login-ask .m-actions { justify-content: center; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; position: relative; }
.field > span { font-size: 13px; color: var(--text-2); }
.field input, .field textarea, .field select { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: transparent; outline: 0; font-size: 15px; resize: vertical; }
.field select { appearance: auto; background: var(--menu); }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue); }
.field small { color: var(--text-2); font-size: 12px; }
.field .cnt { position: absolute; right: 12px; bottom: 8px; }
.field.big { border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px 24px; }
.field.big:focus-within { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue); }
.field.big input, .field.big textarea { border: 0; padding: 4px 0; box-shadow: none !important; }
.field.big .cnt { bottom: 6px; }
.field-pre { display: flex; align-items: center; gap: 6px; }
.field-pre b { color: var(--text-2); font-weight: 400; font-size: 15px; }
.field-pass { position: relative; }
.field-pass input { padding-right: 44px; }
.pass-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); }
.radio-row, .check-row, .save-row { display: flex; align-items: center; gap: 16px; padding: 8px 0; cursor: pointer; position: relative; }
.radio-row input, .check-row input, .save-row input, .share-start input { position: absolute; opacity: 0; pointer-events: none; }
.rd { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--text-2); flex: none; position: relative; }
input:checked + .rd { border-color: var(--blue); }
input:checked + .rd::after { content: ''; position: absolute; inset: 3px; border-radius: 50%; background: var(--blue); }
.cb { width: 20px; height: 20px; border-radius: 2px; border: 2px solid var(--text-2); flex: none; position: relative; }
input:checked + .cb { background: var(--blue); border-color: var(--blue); }
input:checked + .cb::after { content: ''; position: absolute; left: 5px; top: 1px; width: 5px; height: 10px; border: solid var(--bg); border-width: 0 2px 2px 0; transform: rotate(45deg); }
input:disabled + .cb { opacity: .4; }
.radio-row.big, .check-row { align-items: flex-start; }
.radio-row.big .rd, .check-row .cb { margin-top: 2px; }
.radio-row.big b, .check-row b { display: block; font-weight: 400; }
.radio-row.big small, .check-row small { display: block; color: var(--text-2); font-size: 12px; }
.save-list { margin: 0 -24px; padding: 0 24px; max-height: 300px; overflow: auto; }
.save-name { flex: 1; }
.save-vis { width: 18px !important; height: 18px !important; color: var(--text-2); }
.save-new { border-top: 1px solid var(--line); margin: 12px -24px 0; padding: 12px 24px 0; }
.save-create { display: flex; align-items: center; gap: 16px; height: 40px; width: 100%; }
.save-form { margin-top: 8px; }
.m-save { max-width: 360px; }
.m-share { max-width: 540px; }
.share-targets { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 12px; margin-bottom: 12px; }
.share-t { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 68px; flex: none; font-size: 12px; text-align: center; cursor: pointer; }
.share-c { width: 60px; height: 60px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 24px; font-weight: 700; }
.share-link { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 12px; padding: 8px 8px 8px 12px; background: var(--bg-2); }
.share-link input { flex: 1; min-width: 0; border: 0; background: none; outline: 0; font-size: 14px; }
.share-start { display: flex; align-items: center; gap: 12px; margin-top: 16px; cursor: pointer; position: relative; }
.m-kbd { max-width: 480px; }
.kbd-list > div { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.help h3 { font-size: 16px; font-weight: 500; margin: 16px 0 4px; }
.help h3:first-child { margin-top: 0; }
.help p { color: var(--text-2); }
.help .ic { display: inline; width: 16px; height: 16px; vertical-align: -3px; }
.m-voice { max-width: 640px; min-height: 320px; display: flex; }
.voice { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px; padding: 32px; }
.voice-x { position: absolute; top: 12px; right: 12px; }
.voice-t { font-size: 24px; text-align: center; }
.voice-mic { width: 64px; height: 64px; border-radius: 50%; background: var(--chip); display: flex; align-items: center; justify-content: center; }
.voice-mic.on { background: #e62117; color: #fff; animation: pulse 1.2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(230,33,23,.4); } 100% { box-shadow: 0 0 0 26px rgba(230,33,23,0); } }
.voice-h { color: var(--text-2); }

/* ===================== Grilles & cartes ===================== */
.home, .lib-page, .results, .channel, .trend-page { padding: 0 24px 48px; }
.grid { --gap: 16px; display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); gap: 40px var(--gap); }
body { --cols: 4; }
@media (max-width: 1311px) { body { --cols: 3; } }
@media (max-width: 879px) { body { --cols: 2; } }
@media (max-width: 499px) { body { --cols: 1; } }
@media (min-width: 1800px) { body { --cols: 5; } }
@media (min-width: 2300px) { body { --cols: 6; } }
.home-feed { --cols: inherit; }
.card { min-width: 0; position: relative; }
.card-details { display: flex; gap: 12px; padding-top: 12px; position: relative; }
.card-av { flex: none; }
.card-meta { flex: 1; min-width: 0; padding-right: 24px; }
.card-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 16px; font-weight: 500; line-height: 22px; margin-bottom: 4px; }
.card-chan, .card-stats { display: block; color: var(--text-2); font-size: 14px; line-height: 20px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-chan:hover { color: var(--text); }
.card-more { position: absolute; right: -8px; top: 6px; opacity: 0; }
.card:hover .card-more, .row-item:hover .card-more, .short-card:hover .card-more, .card-more:focus { opacity: 1; }
@media (hover: none) { .card-more { opacity: 1 !important; } }
.card.sk .th { background: var(--sk); }
.sk-circle { width: 36px; height: 36px; border-radius: 50%; background: var(--sk); flex: none; }
.sk-lines { flex: 1; display: flex; flex-direction: column; gap: 10px; }
.sk-lines i { display: block; height: 20px; background: var(--sk); border-radius: 4px; }
.sk-lines i:last-child { width: 60%; }
.sentinel, .cm-sentinel { height: 1px; }

/* barre de catégories */
.chips-bar { position: sticky; top: var(--head-h); z-index: 50; background: var(--bg); margin: 0 -24px 24px; padding: 12px 24px; display: flex; align-items: center; }
.chips-bar .chips { flex: 1; }
.chips-arrow { position: absolute; top: 12px; z-index: 2; width: 40px; height: 32px; display: none; align-items: center; justify-content: center; border-radius: 50%; }
.chips-arrow.show { display: flex; }
.chips-arrow.l { left: 24px; background: linear-gradient(to right, var(--bg) 60%, transparent); width: 72px; justify-content: flex-start; }
.chips-arrow.r { right: 24px; background: linear-gradient(to left, var(--bg) 60%, transparent); width: 72px; justify-content: flex-end; }
.chips-arrow .ic { width: 40px; height: 32px; padding: 4px 8px; border-radius: 50%; }
.chips-arrow:hover .ic { background: var(--hover); }

/* étagères */
.shelf { margin: 24px 0 40px; border-top: 4px solid var(--line); padding-top: 20px; }
.grid + .shelf { margin-top: 40px; }
.shelf-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 12px; }
.shelf-head h2 { font-size: 20px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.shelf-ic { width: 26px; height: 26px; }
.shorts-shelf + .grid { margin-top: 0; }
.shorts-row { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 16px * 5) / 6); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.shorts-row::-webkit-scrollbar { display: none; }
@media (max-width: 1311px) { .shorts-row { grid-auto-columns: calc((100% - 16px * 3) / 4); } }
@media (max-width: 879px) { .shorts-row { grid-auto-columns: calc((100% - 16px * 2) / 2.6); } }
.short-card { position: relative; min-width: 0; scroll-snap-align: start; }
.sc-th { display: block; aspect-ratio: 9/16; border-radius: var(--radius); overflow: hidden; background: var(--sk); }
.sc-th img { width: 100%; height: 100%; object-fit: cover; }
.sc-meta { padding: 8px 28px 0 0; }
.sc-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 16px; font-weight: 500; line-height: 22px; }
.sc-views { color: var(--text-2); font-size: 14px; margin-top: 2px; }
.short-card .card-more { top: auto; bottom: 18px; right: -8px; }
.shorts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 24px 16px; }
.h-row { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 16px * (var(--cols) - 1)) / var(--cols)); gap: 16px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: thin; }

/* lignes (recherche, historique, suggestions) */
.row-item { display: flex; gap: 16px; position: relative; margin-bottom: 16px; }
.row-item .th { flex: none; }
.row-lg .th { width: min(500px, 45%); min-width: 240px; }
.row-xl .th { width: min(424px, 45%); }
.row-md .th { width: 160px; border-radius: 8px; }
.row-sm .th { width: 168px; border-radius: 8px; }
.row-sm { margin-bottom: 8px; gap: 8px; }
.row-meta { flex: 1; min-width: 0; padding-right: 32px; }
.row-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 18px; line-height: 26px; font-weight: 400; margin-bottom: 4px; }
.row-sm .row-title, .row-md .row-title { font-size: 14px; line-height: 20px; font-weight: 500; }
.row-xl .row-title { font-size: 18px; font-weight: 500; }
.row-stats { color: var(--text-2); font-size: 12px; line-height: 18px; }
.row-sm .row-stats, .row-sm .row-chan, .row-md .row-chan { font-size: 12px; }
.row-chan { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 12px; margin: 12px 0; }
.row-sm .row-chan, .row-md .row-chan { margin: 4px 0 0; gap: 0; }
.row-chan:hover { color: var(--text); }
.row-snippet { color: var(--text-2); font-size: 12px; line-height: 18px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row-item .card-more { top: -6px; right: -8px; }
.row-index { width: 24px; flex: none; align-self: center; text-align: center; color: var(--text-2); font-size: 14px; }

/* ===================== Page de lecture ===================== */
.watch { padding: 24px 24px 48px; max-width: 2400px; margin: 0 auto; }
.w-cols { display: flex; gap: 24px; }
.w-primary { flex: 1; min-width: 0; }
.w-secondary { width: 402px; flex: none; min-width: 300px; }
.w-player-box { position: relative; aspect-ratio: 16/9; max-height: calc(100vh - 169px); width: 100%; background: #000; border-radius: var(--radius); overflow: hidden; }
.watch.theater { padding-top: 0; }
.w-theater-slot { margin: 0 -24px 24px; background: #000; }
.watch:not(.theater) .w-theater-slot { display: none; }
.watch.theater .w-player-box { aspect-ratio: auto; height: min(calc(100vh - 169px), 56.25vw); max-height: none; border-radius: 0; }
.w-sk { padding-top: 16px; }
.w-sk i { display: block; height: 22px; background: var(--sk); border-radius: 4px; margin-bottom: 12px; }
.w-sk i:nth-child(1) { width: 70%; height: 28px; }
.w-sk i:nth-child(2) { width: 40%; }
.w-title { font-size: 20px; line-height: 28px; font-weight: 700; margin: 12px 0 0; word-break: break-word; }
.w-vis { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-size: 12px; margin-top: 4px; }
.w-vis .ic { width: 16px; height: 16px; }
.w-toprow { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.w-owner { display: flex; align-items: center; gap: 12px; min-width: 0; }
.w-owner-meta { display: flex; flex-direction: column; min-width: 0; margin-right: 12px; }
.w-chan { font-size: 16px; font-weight: 500; line-height: 22px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-subs { font-size: 12px; color: var(--text-2); line-height: 18px; }
.w-actions { display: flex; align-items: center; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.w-actions::-webkit-scrollbar { display: none; }
.seg { display: flex; align-items: center; background: var(--chip); border-radius: 18px; height: 36px; flex: none; }
.seg button { display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 16px 0 12px; font-weight: 500; }
.seg button:hover { background: var(--chip); }
.seg .seg-l { border-radius: 18px 0 0 18px; }
.seg .seg-r { border-radius: 0 18px 18px 0; padding: 0 14px 0 12px; }
.seg-sep { width: 1px; height: 24px; background: var(--line); }
.seg button.on .ic { fill: currentColor; }
.w-desc { background: var(--chip); border-radius: 12px; padding: 12px; margin-top: 12px; font-size: 14px; position: relative; }
.w-desc.collapsed { cursor: pointer; }
.w-desc.collapsed:hover { background: var(--chip-hover); }
.w-desc-info { font-weight: 500; display: flex; flex-wrap: wrap; gap: 0 8px; }
.w-desc-info a { color: var(--blue); }
.w-desc-text { white-space: pre-wrap; word-break: break-word; margin-top: 4px; }
.w-desc-text a { color: var(--blue); }
.w-desc.collapsed .w-desc-text { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.w-desc-more { font-weight: 500; margin-top: 4px; }
.w-desc:not(.collapsed) .w-desc-more, .w-desc.collapsed .w-desc-less, .w-desc.collapsed .w-desc-extra { display: none; }
.w-desc-less { font-weight: 500; margin-top: 16px; }
.w-desc-extra { margin-top: 24px; }
.w-desc-ch { display: flex; align-items: center; gap: 16px; }
.w-desc-ch b { display: block; font-size: 16px; }
.w-desc-ch span { color: var(--text-2); font-size: 12px; }
.w-desc-links { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.w-desc-links .pill { border: 1px solid var(--line); background: transparent; }
.w-chips { display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none; margin-bottom: 12px; }
.w-chips::-webkit-scrollbar { display: none; }
.w-related .row-meta { padding-right: 24px; }
.pl-panel { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 24px; overflow: hidden; }
.pl-head { display: flex; justify-content: space-between; align-items: flex-start; padding: 12px 6px 8px 16px; background: var(--bg-2); }
.pl-head h3 { font-size: 20px; font-weight: 700; line-height: 28px; }
.pl-sub { font-size: 12px; color: var(--text-2); margin-top: 4px; }
.pl-tools { display: flex; gap: 4px; padding: 0 8px 8px; background: var(--bg-2); }
.pl-tools .icon-btn.on { color: var(--text); background: var(--chip); }
.pl-items { max-height: 400px; overflow-y: auto; padding: 4px 0; }
.pl-panel.folded .pl-items, .pl-panel.folded .pl-tools { display: none; }
.pl-item { display: flex; align-items: center; gap: 8px; padding: 4px 8px 4px 0; }
.pl-item:hover { background: var(--hover); }
.pl-item.current { background: var(--chip); }
.pl-n { width: 24px; text-align: center; font-size: 12px; color: var(--text-2); flex: none; display: flex; justify-content: center; }
.pl-n .ic { width: 12px; height: 12px; }
.pl-th { position: relative; width: 100px; aspect-ratio: 16/9; border-radius: 8px; overflow: hidden; background: var(--sk); flex: none; }
.pl-th img { width: 100%; height: 100%; object-fit: cover; }
.pl-th .th-dur { right: 4px; bottom: 4px; font-size: 11px; }
.pl-meta { min-width: 0; }
.pl-meta b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 14px; font-weight: 500; line-height: 20px; }
.pl-meta small { color: var(--text-2); font-size: 12px; }

/* commentaires */
.w-comments { margin-top: 24px; }
.cm-head-row { display: flex; align-items: center; gap: 32px; margin-bottom: 24px; }
.cm-count { font-size: 20px; font-weight: 700; }
.cm-sort { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.cm-teaser { display: none; }
.cm-new { display: flex; gap: 16px; margin-bottom: 32px; }
.cm-new-main { flex: 1; min-width: 0; }
.cm-new textarea { width: 100%; border: 0; border-bottom: 1px solid var(--line); background: none; outline: 0; resize: none; padding: 2px 0 4px; font-size: 14px; overflow: hidden; min-height: 26px; }
.cm-new textarea:focus { border-bottom: 2px solid var(--text); padding-bottom: 3px; }
.cm-new-btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.cm-new-reply { margin: 8px 0 8px; gap: 12px; }
.cm { display: flex; gap: 16px; margin-bottom: 16px; position: relative; }
.cm.hl { background: var(--chip); border-radius: 12px; padding: 8px; margin: -8px -8px 8px; }
.cm-r { gap: 12px; margin-bottom: 8px; }
.cm-main { flex: 1; min-width: 0; }
.cm-top { display: flex; align-items: baseline; gap: 4px; margin-bottom: 2px; flex-wrap: wrap; }
.cm-author { font-size: 13px; font-weight: 500; }
.cm-author.owner { background: var(--chip-hover); padding: 0 6px; border-radius: 12px; }
.cm-time { color: var(--text-2); font-size: 12px; }
.cm-text { white-space: pre-wrap; word-break: break-word; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.cm-text.full { display: block; }
.cm-text a { color: var(--blue); }
.cm-readmore { color: var(--text-2); font-weight: 500; margin-top: 4px; }
.cm-actions { display: flex; align-items: center; margin-left: -8px; }
.cm-actions .icon-btn .ic { width: 18px; height: 18px; }
.cm-like.on .ic, .cm-dislike.on .ic { fill: currentColor; }
.cm-likes { font-size: 12px; color: var(--text-2); min-width: 4px; margin-right: 8px; }
.cm-toggle { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 16px 0 10px; border-radius: 18px; color: var(--blue); font-weight: 500; margin-left: -10px; }
.cm-toggle:hover { background: var(--blue-hover); }
.cm-toggle .ic { width: 22px; height: 22px; transition: transform .2s; }
.cm-toggle.open .ic { transform: rotate(180deg); }
.cm-replies { margin-top: 8px; }
.cm-more { opacity: 0; margin-top: -6px; }
.cm:hover > .cm-more { opacity: 1; }
@media (hover: none) { .cm-more { opacity: 1; } }
.cm-none { color: var(--text-2); padding: 12px 0; }

/* ===================== Lecteur vidéo ===================== */
.op { position: absolute; inset: 0; background: #000; color: #fff; overflow: hidden; user-select: none; -webkit-user-select: none; outline: none; font-family: Roboto, Arial, sans-serif; }
.op-video { width: 100%; height: 100%; object-fit: contain; display: block; background: #000; }
.op-click { position: absolute; inset: 0 0 48px; cursor: pointer; }
.op-idle .op-click { cursor: none; }
.op-shade { position: absolute; left: 0; right: 0; bottom: 0; height: 160px; background: linear-gradient(to top, rgba(0,0,0,.75), rgba(0,0,0,.3) 50%, transparent); pointer-events: none; transition: opacity .25s; }
.op-bottom { position: absolute; left: 12px; right: 12px; bottom: 0; transition: opacity .25s; }
.op-idle .op-shade, .op-idle .op-bottom { opacity: 0; }
.op-idle .op-bottom { pointer-events: none; }
.op-prog { position: relative; height: 16px; display: flex; align-items: center; cursor: pointer; touch-action: none; }
.op-track { position: relative; width: 100%; height: 3px; background: rgba(255,255,255,.2); transition: height .1s; }
.op-prog:hover .op-track, .op-scrubbing .op-track { height: 5px; }
.op-track i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; }
.op-buf { background: rgba(255,255,255,.4); }
.op-hov { background: rgba(255,255,255,.5); opacity: 0; }
.op-prog:hover .op-hov { opacity: 1; }
.op-played { background: var(--red); }
.op-knob { position: absolute; top: 50%; left: 0; width: 13px; height: 13px; border-radius: 50%; background: var(--red); transform: translate(-50%, -50%) scale(0); transition: transform .1s; }
.op-prog:hover .op-knob, .op-scrubbing .op-knob { transform: translate(-50%, -50%) scale(1); }
.op-tip { position: absolute; bottom: 22px; left: 0; transform: translateX(-50%); background: rgba(28,28,28,.9); padding: 4px 8px; border-radius: 4px; font-size: 13px; font-weight: 500; opacity: 0; pointer-events: none; white-space: nowrap; }
.op-prog:hover .op-tip, .op-scrubbing .op-tip { opacity: 1; }
.op-bar { display: flex; justify-content: space-between; align-items: center; height: 48px; }
.op-l, .op-r { display: flex; align-items: center; height: 100%; }
.op-b { width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; opacity: .92; }
.op-b:hover { opacity: 1; }
.op-b .ic { width: 26px; height: 26px; filter: drop-shadow(0 0 2px rgba(0,0,0,.5)); }
.op-play .ic { width: 30px; height: 30px; }
.op-vol { display: flex; align-items: center; }
.op-vslider { width: 0; overflow: hidden; height: 48px; display: flex; align-items: center; transition: width .2s, margin .2s; cursor: pointer; touch-action: none; }
.op-vol:hover .op-vslider, .op-vslider:active { width: 60px; margin-right: 6px; }
.op-vtrack { position: relative; width: 52px; height: 3px; background: rgba(255,255,255,.2); margin: 0 4px; }
.op-vtrack i { position: absolute; left: 0; top: 0; bottom: 0; background: #fff; }
.op-vtrack span { position: absolute; top: 50%; width: 12px; height: 12px; border-radius: 50%; background: #fff; transform: translate(-50%, -50%); }
.op-time { font-size: 13px; padding: 0 8px; white-space: nowrap; text-shadow: 0 0 2px rgba(0,0,0,.5); }
.op-sep { opacity: .7; }
.op-switch { position: relative; width: 36px; height: 14px; border-radius: 7px; background: rgba(255,255,255,.3); }
.op-switch i { position: absolute; top: 50%; left: -2px; width: 20px; height: 20px; border-radius: 50%; background: #bdbdbd; color: #000; transform: translateY(-50%); display: flex; align-items: center; justify-content: center; transition: left .15s; }
.op-switch i .ic { width: 12px; height: 12px; }
.op-auto.on .op-switch i { left: 18px; background: #fff; }
.op-spin { position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px; display: none; pointer-events: none; }
.op-spin i { display: block; width: 100%; height: 100%; border: 4px solid rgba(255,255,255,.2); border-top-color: #fff; border-radius: 50%; animation: spin .9s linear infinite; }
.op-loading:not(.op-paused) .op-spin { display: block; }
.op-flash { position: absolute; left: 50%; top: 50%; pointer-events: none; }
.op-flash span { display: flex; align-items: center; justify-content: center; width: 52px; height: 52px; margin: -26px; border-radius: 50%; background: rgba(0,0,0,.5); opacity: 0; }
.op-flash .ic { width: 28px; height: 28px; }
.op-flash .op-flash-t { width: auto; height: auto; padding: 10px 16px; margin: 0; transform: translate(-50%, -50%); border-radius: 4px; font-size: 18px; white-space: nowrap; }
.op-flash.go span { animation: flash .6s ease-out; }
@keyframes flash { 0% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.8); } }
.op-flash.go .op-flash-t { animation: flashT .8s ease-out; }
@keyframes flashT { 0%, 60% { opacity: 1; } 100% { opacity: 0; } }
.op-dtap { position: absolute; top: 0; bottom: 0; width: 40%; display: flex; align-items: center; justify-content: center; pointer-events: none; opacity: 0; }
.op-dtap-l { left: 0; border-radius: 0 50% 50% 0 / 0 100% 100% 0; }
.op-dtap-r { right: 0; border-radius: 50% 0 0 50% / 100% 0 0 100%; }
.op-dtap span { display: flex; align-items: center; gap: 0; flex-direction: column; font-size: 13px; }
.op-dtap span .ic { display: inline-block; width: 18px; height: 18px; }
.op-dtap.go { animation: dtap .6s ease-out; background: rgba(255,255,255,.12); }
@keyframes dtap { 0% { opacity: 1; } 70% { opacity: 1; } 100% { opacity: 0; } }
.op-center { position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px; border-radius: 50%; background: rgba(0,0,0,.45); display: none; align-items: center; justify-content: center; }
.op-center .ic { width: 34px; height: 34px; }
@media (hover: none) { .op-show .op-center, .op-paused .op-center { display: flex; } .op:not(.op-show):not(.op-paused) .op-shade, .op:not(.op-show):not(.op-paused) .op-bottom { opacity: 0; pointer-events: none; } }
.op-paused .op-shade, .op-paused .op-bottom { opacity: 1 !important; pointer-events: auto !important; }
.op-err { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 16px; padding: 24px; text-align: center; background: #000; flex-direction: column; }
.op-err .ic { width: 48px; height: 48px; }
.op-err small { color: #aaa; }
.op-end { position: absolute; inset: 0; background: rgba(0,0,0,.75); display: flex; align-items: center; justify-content: center; z-index: 3; }
.op-end-box { width: min(420px, 90%); }
.op-end-k { color: #aaa; margin-bottom: 12px; font-size: 15px; }
.op-end-k b { color: #fff; }
.op-end-card { display: flex; gap: 12px; align-items: center; margin-bottom: 20px; }
.op-end-card img { width: 160px; aspect-ratio: 16/9; object-fit: cover; border-radius: 8px; }
.op-end-t { font-size: 18px; font-weight: 500; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.op-end-c { color: #aaa; margin-top: 4px; }
.op-end-btns { display: flex; gap: 12px; }
.op-end-btns button { flex: 1; height: 40px; border-radius: 20px; font-weight: 500; background: rgba(255,255,255,.15); }
.op-end-btns .op-end-go { background: #fff; color: #0f0f0f; }
.op-menu { position: absolute; right: 12px; bottom: 60px; min-width: 260px; background: rgba(28,28,28,.92); border-radius: 12px; padding: 8px 0; z-index: 4; text-shadow: none; }
.op-m-row, .op-m-opt, .op-m-head { display: flex; align-items: center; gap: 14px; width: 100%; height: 40px; padding: 0 12px 0 16px; font-size: 14px; text-align: left; }
.op-m-row:hover, .op-m-opt:hover { background: rgba(255,255,255,.1); }
.op-m-row > span:nth-of-type(1) { flex: 1; }
.op-m-row .ic, .op-m-opt .ic, .op-m-head .ic { width: 22px; height: 22px; }
.op-m-head { border-bottom: 1px solid rgba(255,255,255,.2); margin-bottom: 8px; font-weight: 500; }
.op-m-val { color: #ddd; font-size: 13px; }
.op-m-switch { position: relative; width: 36px; height: 14px; border-radius: 7px; background: rgba(255,255,255,.3); }
.op-m-switch i { position: absolute; top: -3px; left: -2px; width: 20px; height: 20px; border-radius: 50%; background: #bdbdbd; transition: left .15s; }
.op-m-switch.on i { left: 18px; background: #fff; }
.op-m-opt i.ic { display: inline-block; }
.op-fullscreen .op-b { width: 56px; height: 56px; }
.op-fullscreen .op-bar { height: 56px; }
.op-fullscreen .op-b .ic { width: 30px; height: 30px; }
.op-fullscreen .op-video { object-fit: contain; }
@media (max-width: 600px) { .op-b { width: 40px; } .op-r .op-cc, .op-r .op-mini, .op-r .op-theater, .op-l .op-next { display: none; } .op-time { font-size: 12px; } }

/* lecteur réduit */
#miniplayer { position: fixed; right: 24px; bottom: 24px; width: 400px; z-index: 300; background: var(--menu); border-radius: 12px; overflow: hidden; box-shadow: 0 4px 24px rgba(0,0,0,.35); }
.mp-video { position: relative; aspect-ratio: 16/9; background: #000; }
.mp-info { padding: 12px 16px; }
.mp-title { display: block; font-weight: 500; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-chan { color: var(--text-2); font-size: 12px; }
.mp-btn { position: absolute; top: 8px; width: 36px; height: 36px; border-radius: 50%; color: #fff; display: flex; align-items: center; justify-content: center; z-index: 5; opacity: 0; transition: opacity .2s; background: rgba(0,0,0,.4); }
#miniplayer:hover .mp-btn { opacity: 1; }
.mp-expand { left: 8px; }
.mp-close { right: 8px; }
.op-in-mini .op-r .op-auto, .op-in-mini .op-r .op-cc, .op-in-mini .op-r .op-theater, .op-in-mini .op-r .op-set, .op-in-mini .op-next, .op-in-mini .op-vol .op-vslider { display: none; }
.op-in-mini .op-b { width: 40px; height: 40px; }
.op-in-mini .op-bar { height: 40px; }
@media (max-width: 600px) { #miniplayer { right: 8px; left: 8px; width: auto; bottom: 64px; display: flex; } #miniplayer .mp-video { width: 45%; flex: none; } .mp-info { flex: 1; min-width: 0; padding-right: 48px; } }

/* ===================== Shorts ===================== */
body.page-shorts { overflow: hidden; }
.shorts { position: relative; height: calc(100vh - var(--head-h)); height: calc(100dvh - var(--head-h)); }
.shorts-feed { height: 100%; overflow-y: auto; scroll-snap-type: y mandatory; scrollbar-width: none; }
.shorts-feed::-webkit-scrollbar { display: none; }
.sh { height: 100%; scroll-snap-align: start; scroll-snap-stop: always; display: flex; justify-content: center; align-items: center; padding: 16px 0; }
.sh-wrap { height: 100%; display: flex; align-items: flex-end; gap: 16px; transition: transform .25s; }
.shorts.with-comments .sh-wrap { transform: translateX(-240px); }
.sh-player { position: relative; height: 100%; aspect-ratio: 9/16; max-width: calc(100vw - 120px); border-radius: var(--radius); overflow: hidden; background: #000; color: #fff; }
.sh-video { width: 100%; height: 100%; object-fit: cover; cursor: pointer; }
.sh-shade { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0,0,0,.35), transparent 18%, transparent 60%, rgba(0,0,0,.7)); pointer-events: none; }
.sh-top { position: absolute; top: 8px; left: 8px; display: flex; gap: 4px; }
.sh-btn { width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.sh-btn:hover { background: rgba(255,255,255,.12); }
.sh-play .i-pause { display: block; }
.sh-play .i-play { display: none; }
.sh.paused .sh-play .i-pause { display: none; }
.sh.paused .sh-play .i-play { display: block; }
.sh-spin { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: none; }
.sh.loading:not(.paused) .sh-spin { display: block; }
.sh-spin .spinner { border-color: rgba(255,255,255,.2); border-top-color: #fff; }
.sh-flash { position: absolute; left: 50%; top: 50%; pointer-events: none; }
.sh-flash span { display: flex; align-items: center; justify-content: center; width: 64px; height: 64px; margin: -32px; border-radius: 50%; background: rgba(0,0,0,.5); opacity: 0; }
.sh-flash .ic { width: 32px; height: 32px; }
.sh-flash.go span { animation: flash .6s ease-out; }
.sh-bottom { position: absolute; left: 0; right: 0; bottom: 12px; padding: 0 16px; pointer-events: none; }
.sh-bottom a, .sh-bottom button { pointer-events: auto; }
.sh-chan { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.sh-chan a { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.sh-chan .sub-btn:not(.subbed) { background: #fff; color: #0f0f0f; }
.sh-chan .sub-btn.subbed { background: rgba(255,255,255,.2); color: #fff; }
.sh-title { font-size: 15px; line-height: 20px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-shadow: 0 1px 2px rgba(0,0,0,.5); }
.sh-prog { position: absolute; left: 0; right: 0; bottom: 0; height: 12px; display: flex; align-items: flex-end; cursor: pointer; touch-action: none; }
.sh-prog::before { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255,255,255,.3); }
.sh-prog i { position: relative; display: block; height: 3px; background: var(--red); width: 0; }
.sh-prog:hover i, .sh-prog:hover::before { height: 5px; }
.sh-actions { display: flex; flex-direction: column; align-items: center; gap: 16px; padding-bottom: 4px; }
.sh-actions button { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 13px; font-weight: 500; }
.sh-circ { width: 48px; height: 48px; border-radius: 50%; background: var(--chip); display: flex; align-items: center; justify-content: center; }
.sh-actions button:hover .sh-circ { background: var(--chip-hover); }
.sh-actions button.on .ic { fill: currentColor; }
.sh-chan-th img, .sh-chan-th .av { width: 40px !important; height: 40px !important; border-radius: 8px; object-fit: cover; }
.sh-nav { position: absolute; right: 24px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 16px; }
.sh-navb { width: 56px; height: 56px; border-radius: 50%; background: var(--chip); display: flex; align-items: center; justify-content: center; }
.sh-navb:hover:not(:disabled) { background: var(--chip-hover); }
.sh-navb:disabled { opacity: .3; }
.sh-comments { position: absolute; top: 16px; bottom: 16px; left: calc(50% + 40px); width: 480px; max-width: calc(100vw - 32px); background: var(--bg); border: 1px solid var(--line); border-radius: 12px; display: flex; flex-direction: column; z-index: 5; box-shadow: var(--shadow); }
.shc-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 8px 12px 24px; border-bottom: 1px solid var(--line); }
.shc-head h3 { font-size: 20px; font-weight: 700; }
.shc-head h3 span { color: var(--text-2); font-weight: 400; font-size: 16px; margin-left: 8px; }
.shc-body { flex: 1; overflow-y: auto; padding: 16px 24px; }
.shc-body .cm-head-row { display: none; }

/* ===================== Recherche ===================== */
.results { max-width: 1280px; margin: 0 auto; padding-top: 16px; }
.res-chips { margin-bottom: 20px; }
.res-channel { display: flex; align-items: center; gap: 16px; padding: 12px 0; margin-bottom: 8px; }
.res-ch-av { width: min(500px, 45%); min-width: 240px; display: flex; justify-content: center; flex: none; }
.res-ch-meta { flex: 1; min-width: 0; }
.res-ch-name { font-size: 18px; line-height: 26px; display: inline-flex; align-items: center; }
.res-ch-line, .res-ch-desc { color: var(--text-2); font-size: 12px; line-height: 18px; }
.res-ch-desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 4px; }
.res-ch-btn { flex: none; }
.res-sep { height: 1px; background: var(--line); margin: 8px 0 24px; }
.results .shelf { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding-bottom: 16px; }

/* ===================== Chaîne ===================== */
.channel { max-width: 1284px; margin: 0 auto; }
.ch-banner { margin-top: 8px; aspect-ratio: 6.2/1; border-radius: 16px; overflow: hidden; background: var(--sk); }
.ch-banner img { width: 100%; height: 100%; object-fit: cover; }
.ch-head { display: flex; gap: 24px; align-items: center; padding: 24px 0 8px; }
.ch-av .av { width: 160px !important; height: 160px !important; font-size: 72px !important; }
.ch-meta h1 { font-size: 36px; line-height: 50px; font-weight: 700; display: flex; align-items: center; }
.ch-meta h1 .verified .ic { width: 20px; height: 20px; }
.ch-line { color: var(--text-2); }
.ch-line b { color: var(--text); font-weight: 500; }
.ch-desc { color: var(--text-2); display: flex; align-items: center; gap: 4px; margin-top: 6px; text-align: left; max-width: 640px; }
.ch-desc .ic { width: 18px; height: 18px; flex: none; }
.ch-desc:hover { color: var(--text); }
.ch-btns { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.ch-tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--line); margin-bottom: 24px; overflow-x: auto; scrollbar-width: none; position: sticky; top: var(--head-h); background: var(--bg); z-index: 20; }
.ch-tabs::-webkit-scrollbar { display: none; }
.ch-tab { height: 48px; display: flex; align-items: center; font-size: 16px; font-weight: 500; color: var(--text-2); border-bottom: 2px solid transparent; white-space: nowrap; }
.ch-tab:hover { color: var(--text); border-bottom-color: var(--text-3); }
.ch-tab.active { color: var(--text); border-bottom-color: var(--text); }
.ch-featured { padding-bottom: 24px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.ch-featured .row-item { margin: 0; }
.ch-body .shelf { border-top: 0; padding-top: 0; }
.ch-sort { margin-bottom: 24px; }
.about { max-width: 720px; }
.about h2 { font-size: 20px; font-weight: 700; margin: 8px 0 12px; }
.about-desc { white-space: pre-wrap; margin-bottom: 24px; }
.about-desc a { color: var(--blue); }
.about-stats { list-style: none; padding: 0; margin: 0; }
.about-stats li { display: flex; align-items: center; gap: 16px; padding: 10px 0; }
.about-stats .ic { color: var(--text-2); }
.pl-card { min-width: 0; }
.pl-card-th { position: relative; display: block; aspect-ratio: 16/9; margin-top: 8px; margin-bottom: 12px; }
.pl-card-th img, .pl-card-th .th-none { position: relative; width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); z-index: 1; }
.pl-stack { position: absolute; left: 12px; right: 12px; top: -8px; height: 20px; border-radius: 12px 12px 0 0; background: var(--sk); opacity: .8; }
.pl-count { position: absolute; right: 8px; bottom: 8px; z-index: 2; background: rgba(0,0,0,.6); color: #fff; font-size: 12px; font-weight: 500; padding: 2px 6px; border-radius: 4px; display: flex; align-items: center; gap: 4px; }
.pl-count .ic { width: 16px; height: 16px; }
.pl-hover { position: absolute; inset: 0; z-index: 2; border-radius: var(--radius); background: rgba(0,0,0,.6); color: #fff; display: flex; align-items: center; justify-content: center; gap: 6px; font-weight: 500; opacity: 0; transition: opacity .15s; }
.pl-hover .ic { width: 20px; height: 20px; }
.pl-card-th:hover .pl-hover { opacity: 1; }
.pl-card .card-title { font-size: 14px; }
.pl-card-link { display: block; color: var(--text-2); font-size: 14px; margin-top: 4px; }
.pl-card-link:hover { color: var(--text); }

/* ===================== Bibliothèque ===================== */
.lib-page { max-width: 2200px; margin: 0 auto; padding-top: 16px; }
.lib-page.narrow { max-width: 1100px; }
.lib-head { display: flex; justify-content: space-between; align-items: center; margin: 8px 0 24px; }
.lib-head h1, .lib-title { font-size: 20px; font-weight: 700; margin: 8px 0 24px; }
.lib-title.big { font-size: 36px; }
.you-head { display: flex; align-items: center; gap: 16px; margin: 16px 0 24px; }
.you-head h1 { font-size: 36px; font-weight: 700; line-height: 1.3; }
.you-line { color: var(--text-2); margin: 4px 0 12px; }
.you-line a { color: var(--text); }
.you-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.you-page .shelf { border-top: 0; padding-top: 0; margin: 16px 0 32px; }
.you-page .shelf-head h2 { font-size: 20px; }
.hist-page { display: flex; gap: 48px; max-width: 1280px; }
.hist-main { flex: 1; min-width: 0; }
.hist-main .lib-title { font-size: 36px; }
.hist-day { font-size: 20px; font-weight: 700; margin: 24px 0 16px; }
.hist-del { position: absolute !important; right: 28px; top: -6px; }
.hist-side { width: 300px; flex: none; position: sticky; top: calc(var(--head-h) + 40px); align-self: flex-start; padding-top: 80px; }
.hist-search { display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); padding: 8px 0; margin-bottom: 24px; }
.hist-search:focus-within { border-bottom: 2px solid var(--text); }
.hist-search input { flex: 1; border: 0; background: none; outline: 0; font-size: 15px; }
.hist-act { display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 16px 0 12px; border-radius: 20px; width: 100%; text-align: left; }
.hist-act:hover { background: var(--hover); }
.trend-page { max-width: 1280px; margin: 0 auto; padding-top: 16px; }
.trend-head { display: flex; align-items: center; gap: 16px; margin: 16px 0 20px; }
.trend-ic { width: 72px; height: 72px; border-radius: 50%; background: linear-gradient(135deg, #ff4e50, #ff0033); color: #fff; display: flex; align-items: center; justify-content: center; }
.trend-ic .ic { width: 36px; height: 36px; }
.trend-head h1 { font-size: 36px; font-weight: 700; }
.pl-page { display: flex; gap: 24px; padding: 24px; max-width: 1600px; margin: 0 auto; }
.pl-hero { width: 360px; flex: none; position: sticky; top: calc(var(--head-h) + 24px); align-self: flex-start; height: calc(100vh - var(--head-h) - 48px); border-radius: 16px; overflow: hidden; color: #fff; background: #3a3a3a; }
.pl-hero-bg { position: absolute; inset: -40px; background-size: cover; background-position: center; filter: blur(40px) saturate(1.4); opacity: .8; }
.pl-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0,0,0,.15), rgba(0,0,0,.55) 60%, rgba(0,0,0,.7)); }
.pl-hero-in { position: relative; z-index: 1; padding: 24px; height: 100%; overflow-y: auto; }
.pl-hero-th { position: relative; aspect-ratio: 16/9; border-radius: 12px; overflow: hidden; margin-bottom: 20px; }
.pl-hero-th img { width: 100%; height: 100%; object-fit: cover; }
.pl-hero-play { position: absolute; inset: 0; background: rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; gap: 6px; opacity: 0; font-weight: 500; }
.pl-hero-th:hover .pl-hero-play { opacity: 1; }
.pl-hero h1 { font-size: 28px; line-height: 38px; font-weight: 700; margin-bottom: 16px; word-break: break-word; }
.pl-owner { display: flex; align-items: center; gap: 8px; font-weight: 500; margin-bottom: 8px; }
.pl-stats { display: flex; flex-wrap: wrap; gap: 4px 12px; color: rgba(255,255,255,.7); font-size: 12px; margin-bottom: 16px; }
.pl-stats span { display: inline-flex; align-items: center; gap: 4px; }
.pl-stats .ic { width: 14px; height: 14px; }
.pl-acts { display: flex; gap: 8px; margin-bottom: 16px; }
.pl-btns { display: flex; gap: 8px; }
.pl-btns > * { flex: 1; }
.pl-list { flex: 1; min-width: 0; }
.pl-list .row-item { padding: 4px 0 4px 0; border-radius: 12px; margin-bottom: 4px; align-items: flex-start; }
.pl-list .row-item:hover { background: var(--hover); }

/* ===================== Connexion & paramètres ===================== */
body.page-auth #page { display: flex; }
.auth { flex: 1; display: flex; align-items: center; justify-content: center; padding: 24px 16px 64px; background: var(--bg-2); }
.auth-card { width: 100%; max-width: 450px; background: var(--bg); border: 1px solid var(--line); border-radius: 28px; padding: 36px 40px 32px; }
.auth-logo { margin-bottom: 20px; }
.auth-logo .logo-mark { width: 32px; height: 32px; }
.auth-logo .logo-text { font-size: 26px; }
.auth-card h1 { font-size: 32px; font-weight: 400; line-height: 40px; margin-bottom: 8px; }
.auth-sub { color: var(--text-2); font-size: 16px; margin-bottom: 28px; }
.auth-card .field input { height: 52px; font-size: 16px; border-radius: 6px; }
.auth-card .field-pre input { flex: 1; }
.auth-err { background: rgba(229,57,53,.1); color: #e53935; border-radius: 8px; padding: 10px 12px; margin-bottom: 12px; }
.auth-btns { display: flex; justify-content: space-between; align-items: center; margin-top: 24px; gap: 12px; flex-wrap: wrap; }
.auth-legal { color: var(--text-2); font-size: 12px; margin-top: 24px; }
.settings { display: flex; gap: 32px; max-width: 1100px; margin: 0 auto; padding: 24px; }
.set-nav { width: 220px; flex: none; display: flex; flex-direction: column; gap: 2px; }
.set-nav h2 { font-size: 13px; text-transform: uppercase; color: var(--text-2); padding: 8px 16px; font-weight: 500; letter-spacing: .5px; }
.set-tab { height: 40px; display: flex; align-items: center; padding: 0 16px; border-radius: 10px; }
.set-tab:hover { background: var(--hover); }
.set-tab.active { background: var(--chip); font-weight: 500; }
.set-body { flex: 1; min-width: 0; }
.set-body h1 { font-size: 24px; font-weight: 400; margin-bottom: 6px; }
.set-sec { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 20px; }
.set-sec h3 { font-size: 16px; font-weight: 500; margin-bottom: 12px; }
.set-row { display: flex; align-items: center; gap: 16px; }
.set-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0 -16px; }
.set-form { max-width: 420px; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; cursor: pointer; }
.switch-row b { display: block; font-weight: 400; }
.switch-row small { color: var(--text-2); }
.sw { appearance: none; width: 36px; height: 14px; border-radius: 7px; background: var(--chip-hover); position: relative; cursor: pointer; flex: none; }
.sw::after { content: ''; position: absolute; top: -3px; left: -2px; width: 20px; height: 20px; border-radius: 50%; background: #f1f1f1; box-shadow: 0 1px 3px rgba(0,0,0,.4); transition: left .15s; }
.sw:checked { background: #7fb2e6; }
.sw:checked::after { left: 18px; background: var(--blue); }

/* ===================== Mise en ligne ===================== */
.m-upload { max-width: 960px; height: min(820px, calc(100vh - 32px)); padding: 0; display: flex; flex-direction: column; overflow: hidden; }
.up-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 12px 12px 24px; border-bottom: 1px solid var(--line); gap: 12px; }
.up-head h2 { font-size: 20px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-body { flex: 1; overflow-y: auto; }
.up-drop { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 32px; gap: 8px; }
.up-drop.over { background: var(--blue-hover); }
.up-circle { width: 136px; height: 136px; border-radius: 50%; background: var(--bg-3); display: flex; align-items: center; justify-content: center; margin-bottom: 20px; color: var(--text-3); }
.up-drop.over .up-circle { background: var(--blue); color: #fff; }
.up-circle .ic { width: 64px; height: 64px; stroke-width: 1.5; }
.up-t { font-size: 15px; }
.up-s { color: var(--text-2); font-size: 13px; margin-bottom: 20px; }
.up-legal { color: var(--text-2); font-size: 12px; margin-top: 48px; max-width: 520px; }
.up-form { display: flex; gap: 24px; padding: 24px; }
.up-left { flex: 1; min-width: 0; }
.up-left h3 { font-size: 24px; font-weight: 500; margin-bottom: 16px; }
.up-left h4, .up-right h4 { font-size: 15px; font-weight: 500; margin: 20px 0 4px; }
.up-hint { color: var(--text-2); font-size: 12px; margin-bottom: 12px; }
.up-right { width: 320px; flex: none; }
.up-preview { border-radius: 8px; overflow: hidden; background: var(--bg-3); }
.up-preview video { width: 100%; aspect-ratio: 16/9; background: #000; display: block; }
.up-pv-info { padding: 12px 16px; display: grid; gap: 2px; font-size: 14px; }
.up-pv-info small { color: var(--text-2); font-size: 12px; margin-top: 8px; }
.up-pv-info small:first-child { margin-top: 0; }
.up-pv-info a { color: var(--blue); word-break: break-all; }
.vis-box { border: 1px solid var(--line); border-radius: 8px; padding: 8px 16px; }
.tp { display: flex; gap: 8px; flex-wrap: wrap; }
.tp-up, .tp-it { width: 120px; aspect-ratio: 16/9; border-radius: 4px; overflow: hidden; position: relative; }
.tp.vert .tp-it, .tp.vert .tp-up { width: 72px; aspect-ratio: 9/16; }
.tp-up { border: 1px dashed var(--text-3); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 11px; color: var(--text-2); padding: 4px; text-align: center; }
.tp-up .ic { width: 22px; height: 22px; }
.tp-it img { width: 100%; height: 100%; object-fit: cover; }
.tp-it small { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,.6); color: #fff; font-size: 10px; }
.tp-it.sel { outline: 2px solid var(--text); outline-offset: -2px; }
.tp-it:not(.sel) { opacity: .65; }
.tp-it:hover { opacity: 1; }
.tp-none, .tp-load { color: var(--text-2); font-size: 12px; display: flex; align-items: center; gap: 12px; }
.tp-load .spinner { width: 20px; height: 20px; border-width: 2px; }
.up-foot { display: flex; align-items: center; gap: 16px; padding: 12px 24px; border-top: 1px solid var(--line); }
.up-status { flex: 1; display: flex; align-items: center; gap: 12px; color: var(--text-2); font-size: 13px; flex-wrap: wrap; min-width: 0; }
.up-status .ic { width: 22px; height: 22px; }
.up-status.done { color: var(--text); }
.up-status.done .ic { color: #2ba640; }
.up-bar { flex-basis: 100%; height: 4px; border-radius: 2px; background: var(--chip); overflow: hidden; }
.up-bar i { display: block; height: 100%; width: 0; background: var(--blue); transition: width .3s; }
.up-status.done .up-bar i { background: #2ba640; }
.up-done { display: flex; gap: 24px; padding: 32px; align-items: flex-start; }
.up-done img { width: 280px; aspect-ratio: 16/9; object-fit: cover; border-radius: 8px; flex: none; }
.up-done img.vert { width: 140px; aspect-ratio: 9/16; }
.up-done > div { flex: 1; min-width: 0; }
.up-done p { margin-bottom: 12px; font-size: 16px; }

/* ===================== Studio ===================== */
body.page-studio { background: var(--bg-2); }
[data-theme=dark] body.page-studio { background: #1f1f1f; }
.studio { display: flex; min-height: calc(100vh - var(--head-h)); }
.st-side { width: 255px; flex: none; background: var(--bg); border-right: 1px solid var(--line); position: sticky; top: var(--head-h); height: calc(100vh - var(--head-h)); overflow-y: auto; display: flex; flex-direction: column; }
[data-theme=dark] .st-side { background: #282828; }
.st-me { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 24px 16px 16px; text-align: center; }
.st-me .av { width: 112px !important; height: 112px !important; font-size: 48px !important; margin-bottom: 12px; }
.st-me b { font-weight: 500; font-size: 15px; }
.st-me span { color: var(--text-2); font-size: 13px; }
.st-nav { display: flex; align-items: center; gap: 24px; height: 48px; padding: 0 24px; color: var(--text-2); font-weight: 500; border-left: 3px solid transparent; }
.st-nav:hover { background: var(--hover); }
.st-nav.active { color: var(--red); background: var(--hover); border-left-color: var(--red); }
.st-side-foot { margin-top: auto; border-top: 1px solid var(--line); padding: 8px 0; }
.st-main { flex: 1; min-width: 0; padding: 24px 32px 48px; }
.st-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; gap: 16px; flex-wrap: wrap; }
.st-top h1 { font-size: 25px; font-weight: 500; }
.st-top-btns { display: flex; gap: 8px; }
.st-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; align-items: start; }
.st-card { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 24px; }
[data-theme=dark] .st-card { background: #282828; }
.st-card.wide { margin-bottom: 24px; }
.st-card h3 { font-size: 18px; font-weight: 500; margin-bottom: 16px; }
.st-card h4 { font-size: 15px; font-weight: 500; margin: 8px 0; }
.st-last { display: block; border-radius: 8px; overflow: hidden; aspect-ratio: 16/9; background: var(--sk); margin-bottom: 12px; }
.st-last img { width: 100%; height: 100%; object-fit: cover; }
.st-last-t { font-weight: 500; margin-bottom: 12px; }
.st-kv { list-style: none; padding: 0; margin: 0 0 12px; }
.st-kv li { display: flex; justify-content: space-between; padding: 6px 0; color: var(--text-2); }
.st-kv b { color: var(--text); font-weight: 400; }
.st-small { color: var(--text-2); font-size: 13px; }
.st-big { font-size: 36px; font-weight: 500; margin: 4px 0; }
.st-sep { height: 1px; background: var(--line); margin: 16px 0; }
.st-card .btn-text { margin-left: -16px; }
.st-empty { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 24px 0; }
.st-empty .empty-ic { width: 96px !important; height: 96px !important; }
.st-cm { display: flex; gap: 12px; padding: 10px 0; align-items: flex-start; }
.st-cm > div { flex: 1; min-width: 0; }
.st-cm small { color: var(--text-2); }
.st-cm p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.st-cm > img { width: 64px; aspect-ratio: 16/9; object-fit: cover; border-radius: 4px; }
.st-cm.big { border-bottom: 1px solid var(--line); padding: 16px 0; }
.st-cm-v { width: 160px; flex: none; color: var(--text-2); font-size: 12px; }
.st-cm-v img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 4px; margin-bottom: 4px; }
.st-tabs { position: static; }
.st-table { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; overflow-x: auto; }
[data-theme=dark] .st-table { background: #282828; }
.st-tr { display: grid; grid-template-columns: minmax(380px, 3fr) 140px 120px 80px 110px 140px; align-items: center; gap: 12px; padding: 12px 24px; border-bottom: 1px solid var(--line); font-size: 13px; min-width: 1050px; }
.st-tr:last-child { border-bottom: 0; }
.st-tr:not(.st-head):hover { background: var(--hover); }
.st-head { color: var(--text-2); font-weight: 500; font-size: 12px; padding: 14px 24px; }
.st-tr > span small { display: block; color: var(--text-2); font-size: 12px; }
.st-vid { display: flex; gap: 16px; min-width: 0; }
a.st-th { position: relative; width: 120px; aspect-ratio: 16/9; border-radius: 4px; overflow: hidden; flex: none; background: #000; }
a.st-th.vert img { object-fit: contain; }
a.st-th img { width: 100%; height: 100%; object-fit: cover; }
a.st-th .th-dur { right: 4px; bottom: 4px; font-size: 11px; }
.st-vmeta { min-width: 0; flex: 1; position: relative; }
.st-vmeta b { display: block; font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.st-vmeta small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--text-2); font-size: 12px; }
.st-row-acts { display: none; gap: 2px; margin-top: 2px; }
.st-tr:hover .st-row-acts { display: flex; }
.st-tr:hover .st-vmeta small { display: none; }
@media (hover: none) { .st-row-acts { display: flex; } }
.st-vis { display: flex; align-items: center; gap: 6px; }
.st-vis .ic { width: 18px; height: 18px; color: var(--text-2); }
.st-pct { display: block; height: 2px; background: var(--line); margin: 4px 0; width: 80px; }
.st-pct b { display: block; height: 100%; background: var(--text-2); }
.st-kpis { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; margin-bottom: 24px; }
[data-theme=dark] .st-kpis { background: #282828; }
.st-kpis > div { padding: 20px 24px; border-right: 1px solid var(--line); }
.st-kpis > div:last-child { border-right: 0; }
.st-kpis small { color: var(--text-2); display: block; }
.st-kpis b { font-size: 28px; font-weight: 500; }
.st-bar { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.st-bar-n { width: 20px; color: var(--text-2); }
.st-bar img, .st-bar .th-none { width: 80px; aspect-ratio: 16/9; object-fit: cover; border-radius: 4px; flex: none; height: auto; }
.st-bar-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-bar-g { width: 30%; height: 8px; background: var(--chip); border-radius: 4px; overflow: hidden; }
.st-bar-g i { display: block; height: 100%; background: #3ea6ff; }
.st-bar b { width: 80px; text-align: right; font-weight: 400; }
.st-rep { display: flex; gap: 16px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.st-rep img, .st-rep .th-none { width: 120px; aspect-ratio: 16/9; object-fit: cover; border-radius: 4px; height: auto; }
.st-rep > div:nth-child(2) { flex: 1; min-width: 0; }
.st-rep p { color: var(--text-2); font-size: 13px; margin-top: 4px; }
.st-tag { background: rgba(229,57,53,.12); color: #e53935; padding: 2px 8px; border-radius: 10px; font-size: 12px; margin-right: 6px; }
.st-rep-acts { display: flex; gap: 8px; }
.cust h3 { font-size: 15px; font-weight: 500; margin: 8px 0 4px; }
.cust > p { font-size: 13px; margin-bottom: 16px; max-width: 640px; }
.cust-row { display: flex; align-items: center; gap: 24px; margin-bottom: 24px; }
.cust-banner { width: 300px; aspect-ratio: 6.2/1; background: var(--bg-3); border-radius: 4px; overflow: hidden; }
.cust-banner img { width: 100%; height: 100%; object-fit: cover; }
.cust-av { width: 300px; display: flex; justify-content: center; padding: 8px; background: var(--bg-3); border-radius: 4px; }
.cust-btns { display: flex; gap: 8px; }
.cust-form { max-width: 720px; }

/* ===================== Adaptation écrans ===================== */
@media (max-width: 1015px) {
  .w-cols { flex-direction: column; }
  .w-secondary { width: 100%; min-width: 0; }
  .row-sm .th { width: 168px; }
  .w-comments { border-top: 1px solid var(--line); padding-top: 12px; }
  .w-comments:not(.open) .cm-head-row, .w-comments:not(.open) .cm-body-wrap { display: none; }
  .w-comments:not(.open) .cm-teaser { display: flex; align-items: center; gap: 8px; background: var(--chip); border-radius: 12px; padding: 12px; cursor: pointer; }
  .cm-teaser .ic { margin-left: auto; }
  .hist-page { flex-direction: column-reverse; gap: 0; }
  .hist-side { position: static; width: 100%; padding-top: 0; }
  .pl-page { flex-direction: column; }
  .pl-hero { position: relative; top: 0; width: 100%; height: auto; }
  .st-side { width: 72px; }
  .st-me { display: none; }
  .st-nav { padding: 0; justify-content: center; }
  .st-nav span { display: none; }
  .up-form { flex-direction: column-reverse; }
  .up-right { width: 100%; }
  .settings { flex-direction: column; }
  .set-nav { width: 100%; flex-direction: row; overflow-x: auto; }
  .set-nav h2 { display: none; }
  .set-tab { white-space: nowrap; }
}
@media (max-width: 791px) {
  .shorts.with-comments .sh-wrap { transform: none; }
  .sh-comments { left: 0; right: 0; top: auto; bottom: 0; height: 70%; width: 100%; max-width: none; border-radius: 16px 16px 0 0; }
  .sh-nav { display: none; }
  .row-lg .th, .res-ch-av { min-width: 0; width: 40%; }
  .row-title { font-size: 16px; line-height: 22px; }
  .row-lg .row-chan { margin: 6px 0; }
  .row-lg .row-snippet { display: none; }
  .res-ch-av .av { width: 88px !important; height: 88px !important; }
}
@media (max-width: 656px) {
  :root { --head-h: 48px; }
  #masthead { padding: 0 4px 0 8px; gap: 4px; }
  .mh-logo { padding: 0 8px 0 4px; }
  .mh-start .mh-menu { display: none; }
  .logo-cc { display: none; }
  .mh-center { display: none; }
  .mh-search-open { display: inline-flex; }
  .mh-end { min-width: 0; gap: 0; }
  .create-btn { display: none; }
  .mh-avatar { margin-left: 0; }
  .mh-login span { display: none; }
  .mh-login { padding: 0 6px; border: 0; }
  body.mobile-search .mh-start, body.mobile-search .mh-end { display: none; }
  body.mobile-search .mh-center { display: flex; flex: 1; }
  body.mobile-search .mh-back { display: inline-flex; }
  body.mobile-search .search { margin: 0; }
  body.mobile-search .search-box { border-radius: 20px; border-right: 1px solid var(--border); }
  body.mobile-search .search-btn { display: none; }
  .suggest { right: 0; }
  #bottom-nav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; height: 48px; padding-bottom: env(safe-area-inset-bottom); background: var(--bg); border-top: 1px solid var(--line); z-index: 95; align-items: center; justify-content: space-around; box-sizing: content-box; }
  .bn-item { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10px; flex: 1; padding-top: 2px; }
  .bn-item.active .ic { fill: currentColor; }
  .bn-create { width: 40px; height: 40px; border-radius: 50%; background: var(--chip); display: flex; align-items: center; justify-content: center; }
  .bn-create .ic { width: 28px; height: 28px; }
  #page { padding-bottom: 56px; }
  body.page-shorts #page { padding-bottom: 0; }
  body.page-shorts .shorts { height: calc(100dvh - var(--head-h) - 49px); }
  .home, .lib-page, .results, .channel, .trend-page { padding: 0 0 48px; }
  .chips-bar { margin: 0 0 12px; padding: 10px 12px; }
  .chips-arrow { display: none !important; }
  .grid { gap: 24px 16px; }
  body { --cols: 1; }
  .home .grid .th, .lib-page .grid .th, .channel .grid .th { border-radius: 0; }
  .card-details { padding: 12px 12px 0; }
  .card-more { right: 4px; }
  .shelf { margin: 16px 0 24px; padding: 16px 12px 0; }
  .shorts-row { grid-auto-columns: 45%; }
  .h-row { grid-auto-columns: 75%; }
  .lib-head, .lib-title, .ch-tabs, .ch-head, .ch-sort, .ch-body > .grid, .about, .res-chips, .res-body, .trend-head, .you-head, .hist-main, .hist-side, .trend-list, .ch-featured { padding-left: 12px; padding-right: 12px; }
  .ch-banner { margin: 0; border-radius: 0; }
  .ch-head { gap: 16px; align-items: flex-start; }
  .ch-av .av { width: 72px !important; height: 72px !important; font-size: 32px !important; }
  .ch-meta h1 { font-size: 24px; line-height: 32px; }
  .ch-line { font-size: 12px; }
  .watch { padding: 0 0 48px; }
  .w-player-box { border-radius: 0; max-height: none; }
  .watch .w-below { padding: 0 12px; }
  .w-secondary { padding: 0 12px; }
  .w-title { font-size: 18px; line-height: 26px; }
  .w-toprow { flex-direction: column; align-items: stretch; }
  .w-owner .sub-btn, .w-owner .btn-chip { margin-left: auto; }
  .w-act-dl span, .w-act-save span { display: none; }
  .w-act-dl, .w-act-save { padding: 0 10px; }
  .row-sm .th { width: 45%; }
  .sh { padding: 0; }
  .sh-wrap { width: 100%; position: relative; gap: 0; }
  .sh-player { width: 100%; max-width: none; aspect-ratio: auto; border-radius: 0; }
  .sh-actions { position: absolute; right: 6px; bottom: 72px; gap: 14px; }
  .sh-actions button { color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.6); }
  .sh-circ { background: rgba(0,0,0,.3); color: #fff; }
  .sh-bottom { padding-right: 72px; }
  .pl-page { padding: 0 0 48px; }
  .pl-hero { border-radius: 0; }
  .studio { flex-direction: column; }
  .st-side { width: 100%; height: auto; position: static; flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .st-nav { flex: 1; height: 48px; min-width: 56px; border-left: 0; border-bottom: 3px solid transparent; }
  .st-nav.active { border-bottom-color: var(--red); }
  .st-side-foot { display: none; }
  .st-main { padding: 16px 12px 48px; }
  .st-kpis { grid-template-columns: repeat(2, 1fr); }
  .m-upload { height: calc(100vh - 16px); }
  .modal-wrap { padding: 8px; }
  .up-done { flex-direction: column; }
  .up-done img { width: 100%; }
  .auth-card { padding: 24px; border: 0; border-radius: 0; }
  .auth { background: var(--bg); align-items: flex-start; }
  #toast { bottom: 64px; }
}
