/* ============================================================
   ut-tube2.css - Tube V2 (SPA YouTube-like, iteration UX).

   Prefixe : .ut-t2-*  (independant de ut-tube.css v1)
   Theme   : variables locales --t2-* declinees light/dark
             (html.is-dark, pilote par le store Alpine `theme`).
   ============================================================ */

:root {
    --t2-bg: #f9f9f9;
    --t2-surface: #ffffff;
    --t2-surface-2: #f1f1f1;
    --t2-text: #0f0f0f;
    --t2-text-2: #606060;
    --t2-border: rgba(0, 0, 0, 0.10);
    --t2-hover: rgba(0, 0, 0, 0.05);
    --t2-active: rgba(0, 0, 0, 0.09);
    --t2-accent: var(--main-color, #fd3a13);
    --t2-pill-bg: rgba(0, 0, 0, 0.06);
    --t2-pill-active-bg: #0f0f0f;
    --t2-pill-active-color: #ffffff;
    --t2-shadow: 0 2px 12px rgba(0, 0, 0, 0.10);
}
html.is-dark {
    --t2-bg: #0f0f0f;
    --t2-surface: #1c1c1c;
    --t2-surface-2: #272727;
    --t2-text: #f1f1f1;
    --t2-text-2: #aaaaaa;
    --t2-border: rgba(255, 255, 255, 0.12);
    --t2-hover: rgba(255, 255, 255, 0.08);
    --t2-active: rgba(255, 255, 255, 0.14);
    --t2-pill-bg: rgba(255, 255, 255, 0.10);
    --t2-pill-active-bg: #f1f1f1;
    --t2-pill-active-color: #0f0f0f;
    --t2-shadow: 0 2px 12px rgba(0, 0, 0, 0.55);
}

body.ut-t2-body {
    margin: 0;
    background: var(--t2-bg);
    color: var(--t2-text);
    font-family: 'Inter', system-ui, sans-serif;
    transition: background 0.2s;
}
[x-cloak] { display: none !important; }

.ut-t2 { display: flex; flex-direction: column; min-height: 100vh; }

/* ============================================================
   HEADER
   ============================================================ */
.ut-t2-header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: 56px;
    background: var(--t2-bg);
    border-bottom: 1px solid var(--t2-border);
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 16px;
}
.ut-t2-header__left { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.ut-t2-header__center { flex: 1; max-width: 680px; margin: 0 auto; }
.ut-t2-header__right { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

.ut-t2-iconbtn {
    width: 40px; height: 40px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: inherit;
    font-size: 17px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.12s;
    flex-shrink: 0;
}
.ut-t2-iconbtn:hover { background: var(--t2-hover); }

.ut-t2-logo {
    display: flex; align-items: center; gap: 7px;
    color: inherit;
    text-decoration: none;
    font-weight: 700;
    font-size: 20px;
    letter-spacing: -0.5px;
}
.ut-t2-logo__mark {
    display: flex; align-items: center; justify-content: center;
    width: 32px; height: 22px;
    background: var(--t2-accent);
    color: #fff;
    border-radius: 7px;
    font-size: 10px;
}

.ut-t2-link {
    display: flex; align-items: center; gap: 6px;
    padding: 8px 13px;
    border-radius: 999px;
    color: inherit;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.12s;
}
.ut-t2-link:hover { background: var(--t2-hover); color: inherit; }

/* Search */
.ut-t2-search {
    position: relative;
    display: flex;
    align-items: center;
    height: 40px;
    background: var(--t2-surface);
    border: 1px solid var(--t2-border);
    border-radius: 999px;
    overflow: visible;
}
.ut-t2-search input {
    flex: 1;
    height: 100%;
    border: 0;
    background: transparent;
    color: inherit;
    font-size: 15px;
    padding: 0 16px;
    outline: none;
    border-radius: 999px 0 0 999px;
}
.ut-t2-search__clear {
    width: 32px; height: 32px;
    border: 0;
    background: transparent;
    color: inherit;
    opacity: 0.65;
    cursor: pointer;
}
.ut-t2-search__clear:hover { opacity: 1; }
.ut-t2-search__btn {
    width: 60px;
    height: 100%;
    border: 0;
    border-left: 1px solid var(--t2-border);
    border-radius: 0 999px 999px 0;
    background: var(--t2-surface-2);
    color: inherit;
    cursor: pointer;
    transition: background 0.12s;
}
.ut-t2-search__btn:hover { background: var(--t2-active); }

.ut-t2-search__sugg {
    position: absolute;
    top: calc(100% + 8px);
    left: 0; right: 0;
    background: var(--t2-surface);
    border: 1px solid var(--t2-border);
    border-radius: 14px;
    box-shadow: var(--t2-shadow);
    padding: 6px;
    z-index: 200;
    max-height: 70vh;
    overflow-y: auto;
}
.ut-t2-search__row {
    display: flex;
    gap: 12px;
    padding: 8px;
    border-radius: 10px;
    color: inherit;
    text-decoration: none;
    transition: background 0.1s;
    align-items: center;
}
.ut-t2-search__row:hover { background: var(--t2-hover); color: inherit; }
.ut-t2-search__thumb {
    position: relative;
    width: 90px;
    aspect-ratio: 16/9;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}
.ut-t2-search__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ut-t2-search__title { display: block; font-size: 13.5px; font-weight: 500; line-height: 1.3; }
.ut-t2-search__sub { display: block; font-size: 12px; color: var(--t2-text-2); margin-top: 2px; }

/* ============================================================
   LAYOUT + SIDEBAR
   ============================================================ */
.ut-t2-layout { display: flex; flex: 1; min-height: 0; }

.ut-t2-sidebar {
    width: 250px;
    flex-shrink: 0;
    padding: 10px 8px 0;
    overflow-y: auto;
    position: sticky;
    top: 56px;
    height: calc(100vh - 56px);
    transition: width 0.18s ease;
    scrollbar-width: thin;
    display: flex;
    flex-direction: column;
}
.ut-t2-sidebar.is-collapsed { width: 76px; }

/* Bloc compte : colle en bas de la sidebar (toujours visible). */
.ut-t2-side-account {
    margin: 6px -8px 0;
    margin-top: auto;
    position: sticky;
    bottom: 0;
    z-index: 20;                 /* au-dessus du contenu qui defile derriere */
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    background: var(--t2-bg);
    border-top: 1px solid var(--t2-border);
}
.ut-t2-sidebar.is-collapsed .ut-t2-side-account { justify-content: center; padding: 11px 0; }
.ut-t2-side-account__av { flex-shrink: 0; }
.ut-t2-side-account__me { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0;
    text-decoration: none; color: inherit; padding: 4px 6px; margin: -4px -6px; border-radius: 8px; }
.ut-t2-side-account__me:hover,
.ut-t2-side-account__me.is-active { background: var(--t2-active); }
.ut-t2-sidebar.is-collapsed .ut-t2-side-account__me { flex: 0 0 auto; justify-content: center; margin: 0; }
.ut-t2-side-account__name {
    flex: 1; min-width: 0; font-size: 13px; font-weight: 600;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--t2-text);
}
.ut-t2-side-account__logout {
    flex-shrink: 0; color: var(--t2-text-2); padding: 6px; border-radius: 6px;
    text-decoration: none; line-height: 1;
}
.ut-t2-side-account__logout:hover { color: var(--t2-text); background: var(--t2-active); }
.ut-t2-side-account__login {
    display: flex; align-items: center; gap: 10px; width: 100%;
    border: 0; background: none; cursor: pointer; padding: 0; color: var(--t2-text);
    font-size: 13px; font-weight: 600; font-family: inherit; text-align: left;
}
.ut-t2-side-account__login i { font-size: 24px; color: var(--t2-text-2); flex-shrink: 0; }

.ut-t2-side-section { padding: 2px 4px; }
.ut-t2-side-sep { border-bottom: 1px solid var(--t2-border); margin: 8px 12px; }
.ut-t2-side-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--t2-text-2);
    padding: 8px 12px 4px;
}

.ut-t2-side-item {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 18px;
    padding: 9px 12px;
    border: 0;
    background: transparent;
    color: inherit;
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    text-align: left;
    transition: background 0.12s;
    margin-bottom: 1px;
}
.ut-t2-side-item:hover { background: var(--t2-hover); color: inherit; }
.ut-t2-side-item.is-active { background: var(--t2-active); font-weight: 600; }
.ut-t2-side-item__icon { width: 22px; text-align: center; font-size: 17px; flex-shrink: 0; }
.ut-t2-side-item__label { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ut-t2-side-item__badge {
    font-size: 11px;
    background: var(--t2-pill-bg);
    color: var(--t2-text-2);
    padding: 1px 8px;
    border-radius: 999px;
}
.ut-t2-side-item__ext { font-size: 10px; opacity: 0.5; }
.ut-t2-side-item--more { color: var(--t2-text-2); font-size: 13px; }

.ut-t2-sidebar.is-collapsed .ut-t2-side-item {
    flex-direction: column;
    gap: 5px;
    padding: 12px 4px;
}
.ut-t2-sidebar.is-collapsed .ut-t2-side-item__icon { font-size: 19px; width: auto; }
.ut-t2-sidebar.is-collapsed .ut-t2-side-item__label { font-size: 9.5px; text-align: center; max-width: 100%; }
.ut-t2-sidebar.is-collapsed .ut-t2-side-item__badge,
.ut-t2-sidebar.is-collapsed .ut-t2-side-item__ext,
.ut-t2-sidebar.is-collapsed .ut-t2-side-title,
.ut-t2-sidebar.is-collapsed .ut-t2-side-item--more { display: none; }

.ut-t2-main {
    flex: 1;
    min-width: 0;
    padding: 18px 24px 110px;   /* place pour le mini-player */
}

/* ============================================================
   AVATAR (reutilise partout)
   ============================================================ */
.ut-t2-avatar {
    position: relative;
    flex-shrink: 0;
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--t2-surface-2);
    overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 14px;
    color: var(--t2-text-2);
    text-transform: uppercase;
}
/* Initiale = fallback CSS toujours rendu DERRIERE la photo (attr data-initial).
   La photo (z-index:1) la recouvre quand elle charge ; si l'image manque ou
   404, l'initiale reste visible. Plus de manipulation destructive du DOM en JS. */
.ut-t2-avatar::before {
    content: attr(data-initial);
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    pointer-events: none;
}
.ut-t2-avatar img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; display: block; }
.ut-t2-avatar.is-fallback { background: rgba(253, 58, 19, 0.14); color: var(--t2-accent); }
.ut-t2-avatar--xs { width: 24px; height: 24px; font-size: 11px; }
.ut-t2-avatar--lg { width: 46px; height: 46px; font-size: 17px; }
.ut-t2-avatar--xl { width: 88px; height: 88px; font-size: 32px; }
.ut-t2-avatar .is-fallback-init { font-size: inherit; }

/* (Logo play sur vignettes : retire - le badge type suffit) */

/* ============================================================
   CARD (feed grid + rows home)
   ============================================================ */
.ut-t2-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}
.ut-t2-card:hover { color: inherit; }
.ut-t2-card:hover .ut-t2-card__title { color: var(--t2-accent); }
.ut-t2-card__thumb {
    position: relative;
    display: block;
    aspect-ratio: 16/9;
    background: var(--t2-surface-2);
    border-radius: 12px;
    overflow: hidden;
}
.ut-t2-card__thumb img {
    width: 100%; height: 100%;
    object-fit: cover; display: block;
    transition: transform 0.25s ease;
}
.ut-t2-card:hover .ut-t2-card__thumb img { transform: scale(1.04); }
.ut-t2-card__badge {
    position: absolute;
    top: 8px; right: 8px;
    background: rgba(0, 0, 0, 0.78);
    color: #fff;
    font-size: 10.5px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 5px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    z-index: 2;
}
.ut-t2-card__badge.is-type-chiour { background: rgba(147, 51, 234, 0.92); }
.ut-t2-card__badge.is-type-video { background: rgba(37, 99, 235, 0.92); }

.ut-t2-card__meta { display: flex; gap: 11px; }
.ut-t2-card__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ut-t2-card__title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.12s;
}
.ut-t2-card__sub { font-size: 12.5px; color: var(--t2-text-2); }
.ut-t2-card__date { font-size: 11.5px; color: var(--t2-text-2); opacity: 0.85; }

/* Grid feed */
.ut-t2-grid {
    display: grid;
    gap: 28px 16px;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
}

/* ============================================================
   HOME rows
   ============================================================ */
.ut-t2-row { margin-bottom: 30px; }
.ut-t2-row__head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}
.ut-t2-row__title {
    font-size: 19px;
    font-weight: 700;
    margin: 0;
    display: flex; align-items: center; gap: 9px;
}
.ut-t2-row__title i { color: var(--t2-accent); font-size: 18px; }
.ut-t2-row__all,
.ut-t2-row__clear {
    margin-left: auto;
    display: flex; align-items: center; gap: 6px;
    border: 0;
    background: transparent;
    color: var(--t2-text-2);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 999px;
    transition: background 0.12s, color 0.12s;
}
.ut-t2-row__all:hover,
.ut-t2-row__clear:hover { background: var(--t2-hover); color: var(--t2-text); }
.ut-t2-row__all i { font-size: 10px; }

/* Wrapper row : ancre des fleches desktop */
.ut-t2-row__wrap { position: relative; }
.ut-t2-row__scroll {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 8px;
    scroll-snap-type: x proximity;
    /* Desktop : pas de scrollbar visible (navigation par fleches),
       le scroll trackpad/molette reste possible. */
    scrollbar-width: none;
}
.ut-t2-row__scroll::-webkit-scrollbar { display: none; }
.ut-t2-card--row {
    flex: 0 0 300px;
    scroll-snap-align: start;
}

/* Fleches de navigation (desktop uniquement).
   Centrees sur la VIGNETTE : cards de 300px -> thumb 16/9 = ~169px de haut,
   centre a ~84px, moins la moitie de la fleche (21px) = top 63px. */
.ut-t2-row__nav {
    position: absolute;
    top: 63px;
    z-index: 5;
    width: 42px; height: 42px;
    border: 1px solid var(--t2-border);
    border-radius: 50%;
    background: var(--t2-surface);
    color: var(--t2-text);
    font-size: 14px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    box-shadow: var(--t2-shadow);
    opacity: 0;
    transition: opacity 0.15s, background 0.12s, transform 0.12s;
}
.ut-t2-row__wrap:hover .ut-t2-row__nav { opacity: 1; }
.ut-t2-row__nav:hover { background: var(--t2-surface-2); transform: scale(1.08); }
.ut-t2-row__nav--prev { left: -14px; }
.ut-t2-row__nav--next { right: -14px; }
@media (max-width: 768px) {
    /* Mobile : scroll tactile naturel, pas de fleches */
    .ut-t2-row__nav { display: none; }
    .ut-t2-row__scroll { scrollbar-width: thin; }
}

/* ============================================================
   PILLS (2 niveaux) + TRI
   ============================================================ */
.ut-t2-pills {
    position: sticky;
    top: 56px;
    z-index: 50;
    background: var(--t2-bg);
    padding: 8px 0 4px;
    margin-bottom: 14px;
}
.ut-t2-pills__row {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: none;
    align-items: center;
}
.ut-t2-pills__row::-webkit-scrollbar { display: none; }
.ut-t2-pills__sep {
    flex-shrink: 0;
    width: 1px;
    align-self: stretch;
    margin: 4px 4px;
    background: var(--t2-border);
}
.ut-t2-pill {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 0;
    background: var(--t2-pill-bg);
    color: inherit;
    padding: 8px 14px;
    border-radius: 9px;
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.12s, color 0.12s;
}
.ut-t2-pill:hover { background: var(--t2-active); }
.ut-t2-pill.is-active {
    background: var(--t2-pill-active-bg);
    color: var(--t2-pill-active-color);
}
.ut-t2-pill--theme { font-size: 12.5px; padding: 6px 12px; border-radius: 999px; }
.ut-t2-pill--theme i { font-size: 10px; color: var(--t2-accent); }
.ut-t2-pill--theme.is-active i { color: inherit; }
.ut-t2-pill__count {
    font-size: 10.5px;
    background: rgba(0, 0, 0, 0.10);
    padding: 1px 7px;
    border-radius: 999px;
}
html.is-dark .ut-t2-pill__count { background: rgba(255, 255, 255, 0.14); }
.ut-t2-pill.is-active .ut-t2-pill__count { background: rgba(255, 255, 255, 0.22); }
html.is-dark .ut-t2-pill.is-active .ut-t2-pill__count { background: rgba(0, 0, 0, 0.18); }

.ut-t2-pills__row--sort { padding-top: 2px; }
.ut-t2-feed-count { font-size: 13px; color: var(--t2-text-2); white-space: nowrap; }
.ut-t2-feed-count strong { color: var(--t2-text); }
.ut-t2-sort { display: flex; gap: 4px; background: var(--t2-pill-bg); border-radius: 999px; padding: 3px; }
.ut-t2-sort__btn {
    display: inline-flex; align-items: center; gap: 6px;
    border: 0;
    background: transparent;
    color: var(--t2-text-2);
    font-size: 12.5px;
    font-weight: 600;
    padding: 6px 13px;
    border-radius: 999px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.12s, color 0.12s;
}
.ut-t2-sort__btn:hover { color: var(--t2-text); }
.ut-t2-sort__btn.is-active {
    background: var(--t2-surface);
    color: var(--t2-text);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

/* ============================================================
   FEED : sentinel + spinner + empty
   ============================================================ */
.ut-t2-sentinel {
    display: flex;
    justify-content: center;
    padding: 28px 0;
    min-height: 40px;
}
.ut-t2-spinner {
    width: 30px; height: 30px;
    border: 3px solid var(--t2-pill-bg);
    border-top-color: var(--t2-accent);
    border-radius: 50%;
    animation: ut-t2-spin 0.7s linear infinite;
}
@keyframes ut-t2-spin { to { transform: rotate(360deg); } }

.ut-t2-empty { text-align: center; padding: 80px 20px; color: var(--t2-text-2); }
.ut-t2-empty i { font-size: 46px; margin-bottom: 14px; opacity: 0.5; display: block; }
.ut-t2-empty p { margin-bottom: 16px; font-size: 15px; }

.ut-t2-btn {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 9px 18px;
    border: 1px solid var(--t2-border);
    background: transparent;
    border-radius: 999px;
    color: inherit;
    cursor: pointer;
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.12s;
}
.ut-t2-btn:hover { background: var(--t2-hover); color: inherit; }
.ut-t2-btn--primary {
    background: var(--t2-accent);
    border-color: transparent;
    color: #fff;
}
.ut-t2-btn--primary:hover { background: #d62f0e; color: #fff; }
.ut-t2-btn:disabled { opacity: 0.6; cursor: default; }

/* ============================================================
   SKELETONS
   ============================================================ */
.ut-t2-skel {
    background: linear-gradient(90deg, var(--t2-pill-bg) 0%, var(--t2-active) 50%, var(--t2-pill-bg) 100%);
    background-size: 200% 100%;
    animation: ut-t2-shimmer 1.4s linear infinite;
    border-radius: 8px;
}
@keyframes ut-t2-shimmer { to { background-position: -200% 0; } }
.ut-t2-skel--title { height: 22px; width: 220px; }
.ut-t2-skel--line { height: 13px; margin-top: 8px; }
.ut-t2-skel--short { width: 55%; }
.ut-t2-card--skel .ut-t2-card__thumb { background: var(--t2-pill-bg); }

/* ============================================================
   WATCH
   ============================================================ */
.ut-t2-watch__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 400px;
    gap: 24px;
}
.ut-t2-watch__main { min-width: 0; }
.ut-t2-watch__aside { min-width: 0; }
.ut-t2-watch__aside-title { font-size: 16px; font-weight: 700; margin-bottom: 12px; }

.ut-t2-player {
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--t2-shadow);
}
.ut-t2-player__video { width: 100%; height: 100%; display: block; }

/* Player AUDIO (cover + overlay play + progress) */
.ut-t2-player__audio { position: relative; width: 100%; height: 100%; }
.ut-t2-player__audio-bg {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    opacity: 0.55;
}
.ut-t2-player__audio-overlay {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
}
.ut-t2-player__audio-toggle {
    width: 54px; height: 54px;
    flex-shrink: 0;
    border: 0;
    border-radius: 50%;
    background: var(--t2-accent);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    padding-left: 3px;
    transition: transform 0.12s;
}
.ut-t2-player__audio-toggle:hover { transform: scale(1.06); }
.ut-t2-player__audio-progress {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 3px;
    cursor: pointer;
}
.ut-t2-player__audio-bar {
    height: 100%;
    background: var(--t2-accent);
    border-radius: 3px;
}
.ut-t2-player__audio-time { color: #fff; font-size: 13px; font-variant-numeric: tabular-nums; }

.ut-t2-watch__title {
    font-size: 20px;
    font-weight: 700;
    margin: 16px 0 12px;
    line-height: 1.3;
}

/* Barre auteur + actions */
.ut-t2-watch__bar {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--t2-border);
    margin-bottom: 14px;
}
.ut-t2-watch__author {
    display: flex; align-items: center; gap: 12px;
    color: inherit;
    text-decoration: none;
    min-width: 0;
}
.ut-t2-watch__author:hover .ut-t2-watch__author-name { color: var(--t2-accent); }
.ut-t2-watch__author-name { display: block; font-weight: 600; font-size: 15px; transition: color 0.12s; }
.ut-t2-watch__author-sub { display: block; font-size: 12px; color: var(--t2-text-2); margin-top: 2px; }

.ut-t2-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.ut-t2-action {
    display: inline-flex; align-items: center; gap: 7px;
    height: 36px;
    padding: 0 14px;
    border: 0;
    border-radius: 999px;
    background: var(--t2-pill-bg);
    color: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.12s;
}
.ut-t2-action:hover { background: var(--t2-active); color: inherit; }
.ut-t2-action i { font-size: 14px; }
.ut-t2-action .fa-whatsapp { color: #25d366; }
.ut-t2-action .fa-facebook-f { color: #1877f2; }

/* Toggle autoplay */
.ut-t2-action--toggle { gap: 8px; user-select: none; }
.ut-t2-action--toggle input { display: none; }
.ut-t2-action__switch {
    width: 30px; height: 16px;
    border-radius: 999px;
    background: var(--t2-border);
    position: relative;
    transition: background 0.15s;
    flex-shrink: 0;
}
.ut-t2-action__switch::after {
    content: '';
    position: absolute;
    top: 2px; left: 2px;
    width: 12px; height: 12px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.15s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}
.ut-t2-action--toggle input:checked + .ut-t2-action__switch { background: var(--t2-accent); }
.ut-t2-action--toggle input:checked + .ut-t2-action__switch::after { transform: translateX(14px); }

/* Description (repliable) */
.ut-t2-watch__desc {
    background: var(--t2-surface-2);
    border-radius: 12px;
    padding: 13px 16px;
    margin-bottom: 14px;
    font-size: 14px;
    line-height: 1.5;
}
.ut-t2-watch__desc-txt {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ut-t2-watch__desc.is-open .ut-t2-watch__desc-txt { display: block; }
.ut-t2-watch__desc-more {
    border: 0;
    background: transparent;
    color: var(--t2-text-2);
    font-weight: 700;
    font-size: 12.5px;
    cursor: pointer;
    padding: 6px 0 0;
}
.ut-t2-watch__desc-more:hover { color: var(--t2-text); }

.ut-t2-watch__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }

/* ============================================================
   COMMENTAIRES
   ============================================================ */
.ut-t2-comments { margin-top: 26px; }
.ut-t2-comments__title {
    font-size: 17px;
    font-weight: 700;
    display: flex; align-items: center; gap: 9px;
    margin: 0 0 16px;
}
.ut-t2-comments__title i { color: var(--t2-accent); font-size: 15px; }
.ut-t2-comments__count {
    font-size: 12px;
    background: var(--t2-pill-bg);
    color: var(--t2-text-2);
    padding: 2px 10px;
    border-radius: 999px;
}
.ut-t2-comments__form {
    display: flex;
    flex-direction: column;
    gap: 9px;
    margin-bottom: 22px;
}
.ut-t2-comments__form input,
.ut-t2-comments__form textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--t2-border);
    background: var(--t2-surface);
    color: inherit;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    resize: vertical;
    transition: border-color 0.12s;
}
.ut-t2-comments__form input:focus,
.ut-t2-comments__form textarea:focus { border-color: var(--t2-accent); }
.ut-t2-comments__form input { max-width: 280px; }
.ut-t2-comments__form-foot { display: flex; align-items: center; gap: 12px; justify-content: flex-end; }
.ut-t2-comments__feedback { font-size: 13px; color: var(--t2-accent); }

.ut-t2-comments__list { display: flex; flex-direction: column; gap: 16px; }
.ut-t2-comment { display: flex; gap: 12px; }
.ut-t2-comment__body { flex: 1; min-width: 0; }
.ut-t2-comment__head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 3px; }
.ut-t2-comment__name { font-weight: 600; font-size: 13.5px; }
.ut-t2-comment__date { font-size: 11.5px; color: var(--t2-text-2); }
.ut-t2-comment__text { font-size: 14px; line-height: 1.5; white-space: pre-line; }
.ut-t2-comments__more { margin-top: 18px; }
.ut-t2-comments__empty { color: var(--t2-text-2); font-size: 14px; }

/* ============================================================
   SIDECARD (suggestions watch)
   ============================================================ */
.ut-t2-sidecard {
    display: flex;
    gap: 9px;
    margin-bottom: 8px;
    padding: 5px;
    border-radius: 10px;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.12s;
}
.ut-t2-sidecard:hover { background: var(--t2-hover); color: inherit; }
.ut-t2-sidecard__thumb {
    position: relative;
    flex-shrink: 0;
    width: 168px;
    aspect-ratio: 16/9;
    border-radius: 9px;
    overflow: hidden;
    background: var(--t2-surface-2);
}
.ut-t2-sidecard__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ut-t2-sidecard__thumb .ut-t2-card__badge { top: 5px; right: 5px; font-size: 9px; padding: 2px 6px; }
.ut-t2-sidecard__body { flex: 1; min-width: 0; padding: 2px 0; }
.ut-t2-sidecard__title {
    display: -webkit-box;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.3;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ut-t2-sidecard__sub { display: block; font-size: 12px; color: var(--t2-text-2); margin-top: 4px; }
.ut-t2-sidecard__date { display: block; font-size: 11px; color: var(--t2-text-2); opacity: 0.85; }

/* ============================================================
   RAV (chaine)
   ============================================================ */
.ut-t2-rav__head {
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 10px 0 24px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--t2-border);
    flex-wrap: wrap;
}
.ut-t2-rav__infos { flex: 1; min-width: 220px; }
.ut-t2-rav__name { font-size: 26px; font-weight: 800; margin: 0 0 6px; }
.ut-t2-rav__stats { font-size: 13.5px; color: var(--t2-text-2); }
.ut-t2-rav__stats strong { color: var(--t2-text); }
.ut-t2-rav__bio {
    font-size: 13.5px;
    color: var(--t2-text-2);
    margin: 10px 0 0;
    max-width: 640px;
    line-height: 1.5;
}

/* ============================================================
   MINI-PLAYER audio persistant
   ============================================================ */
.ut-t2-mini {
    position: fixed;
    left: 50%;
    bottom: 14px;
    transform: translateX(-50%);
    z-index: 9000;
    display: flex;
    align-items: center;
    gap: 12px;
    width: min(680px, calc(100vw - 28px));
    padding: 9px 12px;
    background: var(--t2-surface);
    border: 1px solid var(--t2-border);
    border-radius: 16px;
    box-shadow: var(--t2-shadow);
}
.ut-t2-mini__open {
    flex-shrink: 0;
    width: 64px;
    aspect-ratio: 16/9;
    border: 0;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    padding: 0;
    background: var(--t2-surface-2);
}
.ut-t2-mini__open img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ut-t2-mini__body { min-width: 0; flex-shrink: 1; cursor: pointer; max-width: 200px; }
.ut-t2-mini__title {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ut-t2-mini__sub {
    font-size: 11.5px;
    color: var(--t2-text-2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ut-t2-mini__progress {
    flex: 1;
    height: 5px;
    background: var(--t2-pill-bg);
    border-radius: 3px;
    cursor: pointer;
    min-width: 60px;
}
.ut-t2-mini__bar { height: 100%; background: var(--t2-accent); border-radius: 3px; }
.ut-t2-mini__time { font-size: 11.5px; color: var(--t2-text-2); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
    .ut-t2-watch__layout { grid-template-columns: 1fr; }
    .ut-t2-watch__aside { margin-top: 18px; }
}
@media (max-width: 768px) {
    .ut-t2-sidebar {
        position: fixed;
        z-index: 99;
        top: 56px;
        left: 0;
        height: calc(100vh - 56px);
        background: var(--t2-bg);
        transform: translateX(-100%);
        transition: transform 0.2s;
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.25);
        width: 260px;
        /* reserve la hauteur de la bottom nav (fixed) -> le bloc compte se cale au-dessus */
        padding-bottom: calc(52px + env(safe-area-inset-bottom, 0px));
    }
    .ut-t2-sidebar:not(.is-collapsed) { transform: translateX(0); }
    .ut-t2-sidebar.is-collapsed { width: 260px; }
    .ut-t2-main { padding: 14px 12px 120px; }
    .ut-t2-header__center { max-width: none; }
    .ut-t2-link__txt { display: none; }
    .ut-t2-grid { grid-template-columns: 1fr; gap: 22px; }
    .ut-t2-card--row { flex-basis: 240px; }
    .ut-t2-actions { margin-left: 0; }
    .ut-t2-sidecard__thumb { width: 140px; }
    .ut-t2-mini__body { max-width: 110px; }
    .ut-t2-mini__time { display: none; }
    .ut-t2-rav__head { gap: 14px; }
    .ut-t2-avatar--xl { width: 64px; height: 64px; font-size: 24px; }
    .ut-t2-rav__name { font-size: 20px; }
}

/* Burger : mobile uniquement. Sur PC la sidebar est TOUJOURS etendue. */
@media (min-width: 769px) {
    .ut-t2-burger { display: none; }
    /* Force la sidebar etendue meme si sidebarOpen=false (etat mobile residuel) */
    .ut-t2-sidebar.is-collapsed { width: 250px; }
    .ut-t2-sidebar.is-collapsed .ut-t2-side-item { flex-direction: row; gap: 18px; padding: 9px 12px; }
    .ut-t2-sidebar.is-collapsed .ut-t2-side-item__icon { font-size: 17px; width: 22px; }
    .ut-t2-sidebar.is-collapsed .ut-t2-side-item__label { font-size: 14px; text-align: left; }
    .ut-t2-sidebar.is-collapsed .ut-t2-side-item__badge,
    .ut-t2-sidebar.is-collapsed .ut-t2-side-item__ext,
    .ut-t2-sidebar.is-collapsed .ut-t2-side-title,
    .ut-t2-sidebar.is-collapsed .ut-t2-side-item--more { display: flex; }
    .ut-t2-sidebar.is-collapsed .ut-t2-side-title { display: block; }
}

/* Mini-player en mode VIDEO (PiP) : la vraie video continue dedans */
.ut-t2-mini--video { width: min(760px, calc(100vw - 28px)); }
.ut-t2-mini__pip {
    flex-shrink: 0;
    width: 200px;
    aspect-ratio: 16/9;
    border-radius: 10px;
    overflow: hidden;
    background: #000;
    cursor: pointer;
    position: relative;
}
.ut-t2-mini__pip video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    pointer-events: none;   /* le clic va au slot (retour grand ecran) */
}
/* Indice visuel "agrandir" au survol */
.ut-t2-mini__pip::after {
    content: '\f065';        /* fa-expand */
    font-family: 'Font Awesome 6 Free', 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
    background: rgba(0, 0, 0, 0.35);
    opacity: 0;
    transition: opacity 0.15s;
}
.ut-t2-mini__pip:hover::after { opacity: 1; }
@media (max-width: 768px) {
    .ut-t2-mini__pip { width: 120px; }
}

/* Headings : couleur explicite (les CSS v1 charges par _head peuvent
   imposer une couleur sombre non adaptee au dark mode). */
.ut-t2 h1, .ut-t2 h2, .ut-t2 h3, .ut-t2 h4 {
    color: var(--t2-text);
}

/* Logo UniversTorah dans le header (lien vers le site).
   Version light/dark switchee en CSS, masque en mobile. */
.ut-t2-utlogo {
    display: flex;
    align-items: center;
    margin-left: 6px;
    padding: 4px 8px;
    border-radius: 8px;
    transition: background 0.12s;
}
.ut-t2-utlogo:hover { background: var(--t2-hover); }
.ut-t2-utlogo__img { height: 26px; width: auto; display: block; }
.ut-t2-utlogo__img--dark { display: none; }
html.is-dark .ut-t2-utlogo__img--light { display: none; }
html.is-dark .ut-t2-utlogo__img--dark { display: block; }
@media (max-width: 768px) {
    .ut-t2-utlogo { display: none; }
}

/* Le Tube IGNORE le zoom global du site (--site-zoom) : interface
   independante, toujours a l echelle 1. Evite aussi les problemes de
   coordonnees (position:fixed du mini-player, IntersectionObserver). */
body.ut-t2-body { zoom: 1 !important; }

/* ============================================================
   GESTIONNAIRE DE THEMES "Pour Vous" (bouton + modale)
   ============================================================ */
.ut-t2-foryou-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin: 0 0 14px;
}
.ut-t2-managebtn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--t2-border);
    background: var(--t2-surface);
    color: var(--t2-text);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, border-color .15s, transform .1s;
}
.ut-t2-managebtn:hover { background: var(--t2-hover); border-color: var(--t2-accent); }
.ut-t2-managebtn:active { transform: scale(.97); }
.ut-t2-managebtn i { font-size: 13px; color: var(--t2-accent); }

/* Overlay + modale */
.ut-t2-modal-overlay {
    position: fixed; inset: 0; z-index: 9999;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, .55);
    backdrop-filter: blur(3px);
}
.ut-t2-modal {
    width: 100%; max-width: 540px;
    max-height: min(86vh, 720px);
    display: flex; flex-direction: column;
    background: var(--t2-surface);
    color: var(--t2-text);
    border: 1px solid var(--t2-border);
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
    overflow: hidden;
    transition: transform .18s ease, opacity .18s ease;
}
.ut-t2-modal--in-start { opacity: 0; transform: translateY(12px) scale(.98); }
.ut-t2-modal--in { opacity: 1; transform: none; }

.ut-t2-modal__head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid var(--t2-border);
}
.ut-t2-modal__head h3 {
    margin: 0; font-size: 16px; font-weight: 800;
    display: flex; align-items: center; gap: 9px;
}
.ut-t2-modal__head h3 i { color: var(--t2-accent); font-size: 15px; }
.ut-t2-modal__close {
    width: 32px; height: 32px; border-radius: 50%;
    border: none; background: var(--t2-hover); color: var(--t2-text);
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: background .15s;
}
.ut-t2-modal__close:hover { background: var(--t2-active); }

.ut-t2-modal__body {
    padding: 16px 18px 20px;
    overflow-y: auto;
}

.ut-tm-block { margin-bottom: 22px; }
.ut-tm-block:last-child { margin-bottom: 0; }
.ut-tm-block__label {
    font-size: 12px; font-weight: 700; text-transform: uppercase;
    letter-spacing: .04em; opacity: .65; margin-bottom: 10px;
    display: flex; align-items: center; gap: 8px;
}
.ut-tm-count {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 20px; height: 20px; padding: 0 6px;
    border-radius: 999px; background: var(--t2-accent); color: #fff;
    font-size: 11px; font-weight: 700;
}
.ut-tm-empty { font-size: 13px; opacity: .6; margin: 4px 0; line-height: 1.4; }

/* Chips "mes themes" */
.ut-tm-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ut-tm-chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 6px 6px 12px; border-radius: 999px;
    background: var(--t2-pill-bg); font-size: 13px; font-weight: 600;
}
.ut-tm-chip__rm {
    width: 20px; height: 20px; border-radius: 50%;
    border: none; cursor: pointer;
    background: transparent; color: inherit; opacity: .6;
    display: flex; align-items: center; justify-content: center;
    transition: background .15s, opacity .15s, color .15s;
}
.ut-tm-chip__rm:hover { background: var(--t2-accent); color: #fff; opacity: 1; }
.ut-tm-chip__rm i { font-size: 11px; }

/* Recherche */
.ut-tm-search { position: relative; margin-bottom: 10px; }
.ut-tm-search__ic {
    position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
    font-size: 13px; opacity: .45; pointer-events: none;
}
.ut-tm-search input {
    width: 100%; box-sizing: border-box;
    padding: 11px 38px 11px 36px;
    border-radius: 10px; border: 1px solid var(--t2-border);
    background: var(--t2-bg); color: var(--t2-text);
    font-size: 14px; outline: none;
    transition: border-color .15s;
}
.ut-tm-search input:focus { border-color: var(--t2-accent); }
.ut-tm-search__clear {
    position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
    width: 26px; height: 26px; border-radius: 50%;
    border: none; background: var(--t2-hover); color: var(--t2-text);
    cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.ut-tm-search__clear:hover { background: var(--t2-active); }
.ut-tm-search__clear i { font-size: 11px; }

/* Resultats */
.ut-tm-results { max-height: 300px; overflow-y: auto; margin: 0 -4px; padding: 0 4px; }
.ut-tm-result {
    width: 100%; box-sizing: border-box;
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 10px 12px; margin-bottom: 4px;
    border-radius: 10px; border: 1px solid transparent;
    background: transparent; color: var(--t2-text); text-align: left;
    cursor: pointer; transition: background .12s, border-color .12s;
}
.ut-tm-result:hover { background: var(--t2-hover); border-color: var(--t2-border); }
.ut-tm-result__main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ut-tm-result__name { font-size: 14px; font-weight: 600; }
.ut-tm-result__meta { font-size: 12px; opacity: .55; }
.ut-tm-result__add {
    flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%;
    background: var(--t2-pill-bg); color: var(--t2-accent);
    display: flex; align-items: center; justify-content: center; font-size: 12px;
    transition: background .12s, color .12s;
}
.ut-tm-result:hover .ut-tm-result__add { background: var(--t2-accent); color: #fff; }

/* Chips "Recommandation automatique" : style attenue (vs manuelles, pleines) */
.ut-tm-chip--auto {
    background: transparent;
    border: 1px dashed var(--t2-border);
    opacity: .85;
}
.ut-tm-chip--auto .ut-tm-chip__name { opacity: .85; }

/* Bouton "Tout supprimer" des recommandations automatiques */
.ut-tm-clearall {
    margin-top: 10px;
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 12px; border-radius: 8px;
    border: 1px solid var(--t2-border); background: transparent;
    color: var(--t2-text); opacity: .7;
    font-size: 12.5px; font-weight: 600; cursor: pointer;
    transition: background .15s, color .15s, border-color .15s, opacity .15s;
}
.ut-tm-clearall:hover { opacity: 1; color: #fff; background: #e53935; border-color: #e53935; }
.ut-tm-clearall i { font-size: 12px; }

/* SweetAlert2 au-dessus de la modale "Gerer mes recommandations" (z-index 9999) */
.swal2-container { z-index: 100000 !important; }

/* Titre de la modale : la modale est teleportee dans body, donc la regle globale
   site.css "h1..h6{color:var(--color-ink-900)}" ecrasait la couleur -> invisible
   en dark. On force la couleur theme-aware du tube. */
.ut-t2-modal__head h3 { color: var(--t2-text); }

/* Etat vide : wrapper interne (les 2 variantes feed/pour-vous) */
.ut-t2-empty__in { display: flex; flex-direction: column; align-items: center; gap: 14px; }
/* Gros bouton "Gerer mes centres d'interet" dans l'etat vide "Pour Vous" */
.ut-t2-btn--lg {
    display: inline-flex; align-items: center; gap: 9px;
    padding: 12px 22px; border-radius: 999px;
    background: var(--t2-accent); color: #fff; border: none;
    font-size: 14.5px; font-weight: 700; cursor: pointer;
    box-shadow: 0 4px 16px rgba(253, 58, 19, .28);
    transition: transform .1s, box-shadow .15s, filter .15s;
}
/* background redeclarae ICI : sinon .ut-t2-btn:hover (gris) ecrase le fond rouge
   car le bouton porte les 2 classes .ut-t2-btn + .ut-t2-btn--lg. */
.ut-t2-btn--lg:hover { background: #fd3a13; color: #fff; filter: brightness(1.08); box-shadow: 0 6px 20px rgba(253, 58, 19, .38); }
.ut-t2-btn--lg:active { transform: scale(.97); }
.ut-t2-btn--lg i { font-size: 14px; }

/* L'icone DANS le gros bouton ne doit pas heriter du style de la grosse icone
   d'etat vide (.ut-t2-empty i { font-size:46px; display:block; margin-bottom }). */
.ut-t2-btn--lg i {
    font-size: 14px;
    margin: 0;
    display: inline-block;
    opacity: 1;
    line-height: 1;
}

/* ============================================================
   Fleches gauche/droite des rangees de pills (style YouTube)
   ============================================================ */
.ut-t2-pillbar { position: relative; }
.ut-t2-pillbar__arrow {
    position: absolute; top: 0; bottom: 8px; z-index: 4;
    width: 56px; padding: 0; border: none; cursor: pointer;
    display: flex; align-items: center; color: var(--t2-text);
}
.ut-t2-pillbar__arrow--left {
    left: 0; justify-content: flex-start;
    background: linear-gradient(to right, var(--t2-bg) 48%, transparent);
}
.ut-t2-pillbar__arrow--right {
    right: 0; justify-content: flex-end;
    background: linear-gradient(to left, var(--t2-bg) 48%, transparent);
}
.ut-t2-pillbar__arrow i {
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--t2-surface); border: 1px solid var(--t2-border);
    box-shadow: var(--t2-shadow);
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; transition: background .15s;
}
.ut-t2-pillbar__arrow:hover i { background: var(--t2-hover); }

/* Rangee des types (Tout / Videos / Chiourim) : ligne dediee, hors slider.
   Sur mobile elle ne defile pas avec les filtres. */
.ut-t2-pills__types {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

/* ============================================================
   Segmented control TYPE (Tout / Videos / Chiourim) - PC.
   Cache sur mobile (la nav du bas le remplace).
   ============================================================ */
.ut-t2-seg {
    display: inline-flex;
    gap: 2px;
    padding: 3px;
    margin-bottom: 10px;
    background: var(--t2-surface-2);
    border: 1px solid var(--t2-border);
    border-radius: 999px;
}
.ut-t2-seg__btn {
    border: none; background: transparent; color: var(--t2-text);
    padding: 4px 18px; border-radius: 999px;
    font-size: 13.5px; font-weight: 600; cursor: pointer;
    white-space: nowrap; transition: background .15s, color .15s;
}
.ut-t2-seg__btn:hover:not(.is-active) { background: var(--t2-hover); }
.ut-t2-seg__btn.is-active { background: var(--t2-accent); color: #fff; }

/* ============================================================
   Bottom nav (footer fixe facon app) - MOBILE uniquement.
   ============================================================ */
.ut-t2-bnav { display: none; }
@media (max-width: 768px) {
    .ut-t2-seg { display: none; }   /* le footer gere la selection de type */

    .ut-t2-bnav {
        display: flex;
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 9500;
        background: var(--t2-bg);
        border-top: 1px solid var(--t2-border);
        padding: 6px 2px calc(4px + env(safe-area-inset-bottom, 0px));
        justify-content: space-around;
    }
    .ut-t2-bnav__item {
        flex: 1 1 0; min-width: 0;
        display: flex; flex-direction: column; align-items: center; gap: 3px;
        background: none; border: none; cursor: pointer; text-decoration: none;
        color: var(--t2-text-2); font-size: 10px; font-weight: 600;
        padding: 4px 0;
    }
    .ut-t2-bnav__item i { font-size: 18px; line-height: 1; }
    .ut-t2-bnav__item span { white-space: nowrap; }
    .ut-t2-bnav__item.is-active { color: var(--t2-accent); }
    /* Dark : le rouge de marque (#fd3a13) est trop sombre sur fond noir -> teinte plus vive. */
    html.is-dark .ut-t2-bnav__item.is-active { color: #ff6a4d; }

    /* Place pour le footer : le contenu ne doit pas passer dessous */
    .ut-t2-main { padding-bottom: calc(70px + env(safe-area-inset-bottom, 0px)); }
    /* Mini-player remonte au-dessus du footer */
    .ut-t2-mini { bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
}

/* Segmented type aligne a DROITE sur PC (sur sa propre ligne) */
@media (min-width: 769px) {
    .ut-t2-seg { display: flex; width: fit-content; margin-left: auto; }
}

/* Badges de nb de contenu dans les pills (themes / rubriques) masques pour le moment */
.ut-t2-pill__count { display: none; }

/* Ligne segmented (gauche) + chips familles/themes (droite, defilables) sur une ligne */
.ut-t2-pills__bar { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 4px; }
.ut-t2-pills__bar .ut-t2-pillbar { flex: 1; min-width: 0; }
/* annule le right-align precedent : dans la barre le segmented est a GAUCHE, sans marge */
.ut-t2-pills__bar .ut-t2-seg { margin: 0; flex-shrink: 0; }

/* Hauteurs EGALES segmented (gauche) et chips (droite), independamment des paddings */
.ut-t2-seg, .ut-t2-pill { box-sizing: border-box; min-height: 34px; }
.ut-t2-seg { align-items: center; }
