/* =========================================================
   app.css — LeapViews v3 : coquille (barre latérale, barre mobile, zone de contenu) + composants partagés.
   Même vocabulaire que la v2 (les vues l'utilisent) ; seule la peau change (arrondie, contours 1 px, ombres douces courtes).

   Coquille (index.html + app.js)
     .tp-app > .tp-topbar (mobile < 900 px) + aside.tp-sidebar#sidebar + main.tp-main#view[data-view="<vue>"]
     html.tp-sidebar-collapsed (rail de 16 px) · html.tp-sidebar-open (tiroir mobile) · html.tp-guest (sans barre latérale :
     écrans de compte, partage public) · --tp-main-left = marge du contenu · .tp-view-in = transition d'entrée de vue
     #view[data-view="board"] : bloc pleine hauteur SANS marge ni défilement de page (le tableau gère son défilement) ;
     sa racine doit faire height: 100%.
     Barre latérale v3 : .tp-snav__item[data-nav] · .tp-snav__members (avatars d'un tableau partagé) · .tp-sidebar__foot >
       .tp-plan (.tp-planbadge | .tp-button--sun) + .tp-usermenu (avatar, nom, plan) · .tp-sync[data-state=ok|saving|offline|error]
   Pages classiques
     .tp-page (1200 px max, marges 24 px) · .tp-page--narrow (760 px) · .tp-page--center
     .tp-page-head > h1 + .tp-page-head__actions (+ .tp-page-head__sub)  ·  .tp-section > .tp-section__head > h2.tp-section__title
     .tp-panel (surface encadrée, --flat sans ombre) · .tp-toolbar (+ .tp-toolbar__spacer) · .tp-form (pile de champs, gap 12 px)
     .tp-alert (--error | --success | --info | --warn) > .tp-alert__icon + .tp-alert__body
   Composants (ui.js)
     Cartes vidéo  .tp-vgrid (+ --shorts | --list) > .tp-vcard (.is-short .is-selected .is-compact .is-onboard .is-leaving)
                   __media __thumb __img __blur __dur __check __box __actions __act __body __title __tags __extra __remove
                   Carte de grille façon YouTube : __body > __avatar + __meta (__title, __channel, __tags.__line) + __menu (⋮)
                   Tags d'infos (.tp-vcard__tags) : 26 px, 13 px gras, icône + liseré ; score 28 px, plein dès ×2.
                   Score ×10+ : .tp-tag--score.tp-tag--red pulse doucement.
     Filtres       .tp-filterbar > .tp-filterbar__btn(.is-active) .tp-filterbar__count + .tp-filterbar__tags > .tp-ftag
                   panneau : .tp-fpanel > .tp-fpanel__group > .tp-fpanel__legend + .tp-seg | .tp-fpanel__checks ; .tp-fpanel__foot
     Popover       .tp-pop > .tp-pop__head (.tp-pop__back · h2.tp-pop__title · .tp-pop__close) + .tp-pop__body > .tp-viewstack__view
                   menus : .tp-menu > .tp-menu__item (+ --danger, .tp-icon) · .tp-menu__sep · .tp-menu__title
                   texte : .tp-pop__text · actions : .tp-pop__actions
     Modale        .tp-modal(--dialog|--drawer|--sheet|--lightbox, --sm..--xl) > .tp-modal__backdrop + .tp-modal__dialog(--sm|md|lg|xl)
                   > .tp-modal__head (.tp-modal__title, .tp-modal__close) + .tp-modal__body (.tp-modal__text, .tp-modal__actions)
     Tiroir        .tp-drawer(.is-open, --inside) > .tp-drawer__head + .tp-drawer__body
     Toasts        #toast-root.tp-toasts > .tp-toast(--success|--error|--info, .is-leaving)
     États         .tp-skeleton (--line --short --tag --block) chatoyant · .tp-empty (--error) > __art | __icon, __title, __text, __actions
     Sélection     .tp-selbar(.is-visible) > .tp-selbar__inner ; body.has-selbar
     Tableaux      .tp-btiles > .tp-btile(.is-starred, --create) > .tp-btile__link > .tp-btile__title + .tp-btile__star
                   création : .tp-cboard (__preview) + .tp-bgpick > .tp-bgpick__opt(.is-selected, --lg) ; .tp-pick
     Avatars       .tp-avatar(--tag|xs|sm|md|lg, --fallback, --user) · .tp-avstack · .tp-members (> .tp-members__more)
     Fichiers      .tp-fileicon(--image|video|audio|pdf|doc|sheet|slides|archive|text|link|file) · .tp-dropzone(.is-dragover)
     Visionneuse   .tp-lb > __bar (__name __meta __count __actions) + __stage (__img __video __audio __pdf __file) + __nav(--prev|--next)
     Pro           .tp-upsell > __art __badge __title __text __list __actions · .tp-planbadge · .tp-confetti (canvas)
     Comptes       .tp-auth (> __main __brand __card __head __form __switch __foot) · .tp-pass · .tp-invite
     Divers        .tp-swatches > .tp-swatch · .tp-status · .tp-boot · .tp-import · .tp-shortcut(--sun|mint|coral|purple) (écran de compte)
     Accueil       .tp-home > .tp-hero (__hello __title __accent __lead __search __submit __input __random) · .tp-hsec (__head __title __sub)
                   .tp-hshow (__legend __grid __notice) · .tp-hsteps > .tp-hstep (__art.tp-mock --find|board|script, __text, __num) · .tp-hcta
   ========================================================= */

/* ---------- Shell ---------- */
html { --tp-main-left: var(--tp-sidebar-w); }
html.tp-sidebar-collapsed { --tp-main-left: 16px; }
html.tp-guest { --tp-main-left: 0px; }
html.tp-lock { overflow: hidden; padding-right: var(--tp-sbw, 0px); }
html.tp-guest .tp-sidebar, html.tp-guest .tp-topbar, html.tp-guest .tp-scrim { display: none !important; }

.tp-app { min-height: 100vh; }
.tp-topbar { display: none; }

.tp-brand {
  display: inline-flex; align-items: center; gap: 9px; min-width: 0; color: var(--tp-text-strong);
  font-family: var(--tp-font-display); font-size: 20px; line-height: 24px; font-weight: 800; letter-spacing: -0.01em; text-decoration: none;
}
.tp-brand:hover { color: #fff; text-decoration: none; }
.tp-brand .tp-logo { width: 28px; height: 28px; flex: none; }

.tp-sidebar {
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 50; width: var(--tp-sidebar-w);
  background: var(--tp-bg-sunken); border-right: 1px solid var(--tp-line);
  transition: width 240ms var(--tp-ease-out);
}
.tp-sidebar__inner {
  display: flex; flex-direction: column; width: var(--tp-sidebar-w); height: 100%; overflow-x: hidden; overflow-y: auto;
  transition: opacity 160ms var(--tp-ease), visibility 0s linear 0s;
}
.tp-sidebar__head { display: flex; align-items: center; gap: 6px; height: 60px; flex: none; padding: 0 8px 0 16px; }
.tp-sidebar__head .tp-brand { margin-right: auto; }
.tp-sidebar__close { display: none; }
.tp-sidebar__nav { display: flex; flex-direction: column; gap: 3px; flex: 1; padding: 6px 10px 12px; }
.tp-sidebar__foot { display: flex; flex-direction: column; gap: 6px; flex: none; padding: 10px; border-top: 1px solid var(--tp-line); }
.tp-sidebar__expand {
  display: none; position: absolute; top: 18px; left: 3px; z-index: 2; place-items: center; width: 26px; height: 26px; padding: 0;
  border: 1px solid var(--tp-line); border-radius: 50%; background: var(--tp-surface-3); color: var(--tp-text-strong);
  box-shadow: var(--tp-shadow-raised); transition: transform 200ms var(--tp-spring), background-color var(--tp-dur) var(--tp-ease);
}
.tp-sidebar__expand:hover { background: var(--tp-surface-3-hover); }
html.tp-sidebar-collapsed .tp-sidebar { width: 16px; }
html.tp-sidebar-collapsed .tp-sidebar__inner { opacity: 0; visibility: hidden; transition: opacity 120ms var(--tp-ease), visibility 0s linear 120ms; }
html.tp-sidebar-collapsed .tp-sidebar__expand { display: grid; animation: tp-pop-in 220ms var(--tp-spring) both; }

.tp-snav__item {
  --tp-nav-c: var(--tp-accent);
  display: flex; align-items: center; gap: 10px; min-width: 0; min-height: 36px; padding: 6px 10px;
  border: 1px solid transparent; border-radius: var(--tp-radius-md); color: var(--tp-text); font-weight: 700; text-decoration: none;
  transition: background-color var(--tp-dur) var(--tp-ease), color var(--tp-dur) var(--tp-ease), border-color var(--tp-dur) var(--tp-ease), transform 160ms var(--tp-spring);
}
.tp-snav__item .tp-icon { width: 18px; height: 18px; color: var(--tp-text-subtle); transition: color var(--tp-dur) var(--tp-ease), transform 220ms var(--tp-spring); }
.tp-snav__item:hover { background: var(--tp-hover); color: var(--tp-text-strong); text-decoration: none; }
.tp-snav__item:hover .tp-icon { color: var(--tp-nav-c); }
.tp-snav__item:active { transform: scale(0.98); }
.tp-snav__item.is-current { border-color: var(--tp-line); background: var(--tp-surface-2); color: var(--tp-text-strong); box-shadow: var(--tp-shadow-raised); }
.tp-snav__item.is-current .tp-icon { color: var(--tp-nav-c); }
.tp-snav__item > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-snav__item[data-nav="idees"] { --tp-nav-c: var(--tp-sun); }
.tp-snav__item[data-nav="analyse"] { --tp-nav-c: var(--tp-mint); }
.tp-snav__item[data-nav="dossiers"] { --tp-nav-c: var(--tp-orange); }
.tp-snav__item[data-nav="calendrier"] { --tp-nav-c: var(--tp-coral); }
.tp-snav__item[data-nav="suivi"] { --tp-nav-c: var(--tp-purple); }
.tp-snav__item[data-nav="testeur"] { --tp-nav-c: var(--tp-pink); }
.tp-snav__item[data-nav="reglages"] { --tp-nav-c: var(--tp-text-strong); }
.tp-snav__section { display: flex; flex-direction: column; gap: 2px; margin: 4px 0; }
.tp-snav__row { display: flex; align-items: center; gap: 2px; }
.tp-snav__row > .tp-snav__item { flex: 1; }
.tp-snav__row .tp-icon-btn { color: var(--tp-text-subtlest); }
.tp-snav__row .tp-icon-btn:hover { color: var(--tp-text-strong); }
.tp-snav__toggle .tp-icon { transition: transform 200ms var(--tp-spring); }
.tp-snav__toggle[aria-expanded="false"] .tp-icon { transform: rotate(-90deg); }
.tp-snav__sub { display: flex; flex-direction: column; gap: 1px; margin-left: 14px; padding-left: 6px; border-left: 1px solid var(--tp-surface-2); list-style: none; }
.tp-snav__sub:not([hidden]) { animation: tp-fade 180ms var(--tp-ease); }
.tp-snav__subitem { position: relative; display: flex; align-items: center; min-width: 0; }
.tp-snav__sublink {
  display: flex; align-items: center; gap: 9px; flex: 1; min-width: 0; min-height: 32px; padding: 4px 34px 4px 8px;
  border-radius: var(--tp-radius-sm); color: var(--tp-text); font-weight: 600; text-decoration: none;
  transition: background-color var(--tp-dur) var(--tp-ease), color var(--tp-dur) var(--tp-ease);
}
.tp-snav__sublink:hover { background: var(--tp-hover); color: var(--tp-text-strong); text-decoration: none; }
.tp-snav__sublink.is-current { background: var(--tp-hover-strong); color: var(--tp-text-strong); }
.tp-snav__swatch { width: 24px; height: 18px; flex: none; border: 1px solid var(--tp-line); border-radius: var(--tp-radius-xs); background: var(--tp-surface-3); background-size: cover; }
.tp-snav__sublink .tp-dot { margin: 0 7px; }
.tp-snav__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-snav__meta { color: var(--tp-text-subtlest); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.tp-snav__members { display: inline-flex; flex: none; }
.tp-snav__members .tp-members > * { box-shadow: 0 0 0 2px var(--tp-bg-sunken); }
.tp-snav__star { position: absolute; top: 50%; right: 4px; transform: translateY(-50%); opacity: 0; }
.tp-snav__star:active { transform: translateY(-50%) scale(0.85); }
.tp-snav__subitem:hover .tp-snav__star, .tp-snav__star:focus-visible, .tp-snav__star.is-on { opacity: 1; }
.tp-snav__star.is-on, .tp-snav__star.is-on:hover { color: var(--tp-sun); }
.tp-snav__empty { padding: 4px 8px 6px; color: var(--tp-text-subtlest); font-size: 12px; line-height: 16px; }
.tp-snav__all { padding: 2px 12px 6px; font-size: 12px; }

/* Plan badge, user menu, sync indicator */
.tp-sidebar__footrow { display: flex; align-items: center; gap: 4px; }
.tp-sidebar__footrow > .tp-snav__item { flex: 1; min-width: 0; }
.tp-sidebar__user:empty { display: none; }
.tp-plan { display: flex; }
.tp-plan:empty { display: none; }
.tp-plan .tp-button { width: 100%; }
.tp-planbadge {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border: 1px solid var(--tp-sun-edge); border-radius: 999px;
  background: var(--tp-sun-bg); color: var(--tp-sun-text); font-family: var(--tp-font); font-weight: 800; font-size: 13px; text-decoration: none;
  box-shadow: var(--tp-shadow-raised); transition: transform 200ms var(--tp-spring);
}
.tp-planbadge:hover { color: #ffe39e; text-decoration: none; }
.tp-planbadge .tp-icon { color: var(--tp-sun); width: 15px; height: 15px; }
.tp-usermenu {
  display: flex; align-items: center; gap: 10px; width: 100%; min-width: 0; padding: 6px 8px; border: 1px solid transparent; border-radius: var(--tp-radius);
  background: transparent; color: var(--tp-text-strong); text-align: left; transition: background-color var(--tp-dur) var(--tp-ease), border-color var(--tp-dur) var(--tp-ease);
}
.tp-usermenu:hover, .tp-usermenu[aria-expanded="true"] { background: var(--tp-surface-2); border-color: var(--tp-line); }
.tp-usermenu__text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.tp-usermenu__name { overflow: hidden; font-weight: 800; line-height: 18px; text-overflow: ellipsis; white-space: nowrap; }
.tp-usermenu__plan { color: var(--tp-text-subtlest); font-size: 12px; line-height: 16px; }
.tp-usermenu > .tp-icon { color: var(--tp-text-subtle); }
.tp-userpop__head { display: flex; align-items: center; gap: 12px; padding: 4px 0 12px; }
.tp-userpop__who { display: flex; flex-direction: column; min-width: 0; }
.tp-userpop__name { overflow: hidden; color: var(--tp-text-strong); font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.tp-userpop__email { overflow: hidden; color: var(--tp-text-subtle); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.tp-sync {
  display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 6px; border-radius: var(--tp-radius-sm);
  color: var(--tp-text-subtlest); font-size: 12px; font-weight: 700; white-space: nowrap;
}
.tp-sync .tp-icon { width: 16px; height: 16px; }
.tp-sync__text { display: none; }
.tp-sync[data-state="saving"] .tp-icon { animation: tp-pulse 1s ease-in-out infinite; color: var(--tp-accent-hover); }
.tp-sync[data-state="offline"] { background: var(--tp-sun-bg); color: var(--tp-sun-text); }
.tp-sync[data-state="error"] { background: var(--tp-coral-bg); color: var(--tp-coral-text); }
.tp-sync[data-state="offline"] .tp-sync__text, .tp-sync[data-state="error"] .tp-sync__text { display: inline; }
.tp-sync[data-state="hidden"] { display: none; }

.tp-scrim { position: fixed; inset: 0; z-index: 80; background: #03050ab8; animation: tp-fade 180ms var(--tp-ease); }

.tp-main { position: relative; display: block; min-height: 100vh; margin-left: var(--tp-main-left); transition: margin-left 240ms var(--tp-ease-out); }
.tp-main:focus { outline: none; }
.tp-main[aria-busy="true"] { cursor: progress; }
.tp-main[data-view="board"] { height: 100vh; height: 100dvh; min-height: 0; overflow: hidden; }
.tp-main.tp-view-in > * { animation: tp-view-in 260ms var(--tp-ease-out) both; }
.tp-main.tp-view-in[data-view="board"] > * { animation-name: tp-fade; animation-duration: 200ms; }
@keyframes tp-view-in { from { opacity: 0; transform: translateY(8px); } }
body.has-selbar .tp-main { padding-bottom: 76px; }

@media (max-width: 899px) {
  html, html.tp-sidebar-collapsed { --tp-main-left: 0px; }
  .tp-topbar {
    position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 8px; height: var(--tp-topbar-h);
    padding: 0 8px; background: var(--tp-bg-sunken); border-bottom: 1px solid var(--tp-line);
  }
  .tp-topbar .tp-brand { font-size: 18px; }
  .tp-topbar .tp-brand .tp-logo { width: 26px; height: 26px; }
  .tp-topbar__spacer { flex: 1; }
  .tp-topbar .tp-icon-btn { color: var(--tp-text); }
  .tp-topbar__user { display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: none; }
  .tp-topbar__user:active { transform: scale(0.94); }
  .tp-sidebar, html.tp-sidebar-collapsed .tp-sidebar {
    z-index: 90; width: min(300px, 86vw); visibility: hidden; transform: translateX(-100%);
    transition: transform 240ms var(--tp-ease-out), visibility 0s linear 240ms;
  }
  html.tp-sidebar-open .tp-sidebar { visibility: visible; transform: none; box-shadow: 2px 0 12px rgba(0, 0, 0, 0.35); transition: transform 260ms var(--tp-ease-out), visibility 0s; }
  .tp-sidebar__inner, html.tp-sidebar-collapsed .tp-sidebar__inner { width: 100%; opacity: 1; visibility: inherit; }
  .tp-sidebar__collapse, .tp-sidebar__expand, html.tp-sidebar-collapsed .tp-sidebar__expand { display: none; }
  .tp-sidebar__close { display: grid; }
  .tp-main { min-height: calc(100vh - var(--tp-topbar-h)); }
  .tp-main[data-view="board"] { height: calc(100vh - var(--tp-topbar-h)); height: calc(100dvh - var(--tp-topbar-h)); }
  html.tp-guest .tp-main { min-height: 100vh; }
}
@media (min-width: 900px) { .tp-topbar__user, .tp-topbar__spacer { display: none; } }

/* ---------- Boot ---------- */
.tp-boot { display: grid; place-items: center; align-content: center; gap: 14px; min-height: 70vh; padding: 24px; color: var(--tp-text-subtle); text-align: center; animation: tp-fade 300ms var(--tp-ease) 120ms both; }
.tp-boot__art { width: 96px; height: auto; animation: tp-boot-hop 900ms var(--tp-ease-out) infinite; transform-origin: 50% 100%; }
@keyframes tp-boot-hop { 0%, 100% { transform: translateY(0) scaleY(1); } 18% { transform: translateY(0) scale(1.06, 0.92); } 50% { transform: translateY(-16px) scale(0.97, 1.04); } }

/* ---------- Pages ---------- */
.tp-page { width: 100%; max-width: 2200px; margin: 0 auto; padding: 28px 32px; }
.tp-page--narrow { max-width: 808px; }
.tp-page--center { display: grid; place-items: center; min-height: 70vh; }
.tp-page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; min-height: 34px; margin-bottom: 22px; }
.tp-page-head h1 { min-width: 0; font-size: 26px; line-height: 32px; overflow-wrap: anywhere; }
.tp-page-head__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tp-page-head__sub { flex-basis: 100%; margin-top: -8px; color: var(--tp-text-subtle); }
.tp-section { margin-top: 36px; }
.tp-section:first-child { margin-top: 0; }
.tp-section__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-bottom: 14px; }
.tp-section__title { display: flex; align-items: center; gap: 9px; font-size: 18px; line-height: 24px; }
.tp-section__title .tp-icon { width: 18px; height: 18px; color: var(--tp-text-subtle); }
.tp-panel { padding: 16px; border: 1px solid var(--tp-line); border-radius: var(--tp-radius-lg); background: var(--tp-surface); box-shadow: var(--tp-shadow-pop); }
.tp-panel--flat { box-shadow: none; }
.tp-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tp-toolbar__spacer { flex: 1; }
.tp-form { display: flex; flex-direction: column; gap: 12px; }
.tp-form .tp-field + .tp-field { margin-top: 0; }
@media (max-width: 899px) { .tp-page { padding: 18px 16px; } .tp-page-head h1 { font-size: 22px; line-height: 28px; } }

/* Alerts */
.tp-alert {
  --tp-al-bg: var(--tp-blue-bg); --tp-al-fg: var(--tp-blue-text); --tp-al-edge: #2a57d4;
  display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--tp-al-edge); border-radius: var(--tp-radius);
  background: var(--tp-al-bg); color: var(--tp-text-strong); animation: tp-pop-in 240ms var(--tp-spring);
}
.tp-alert__icon { display: grid; place-items: center; flex: none; height: 20px; color: var(--tp-al-fg); }
.tp-alert__body { flex: 1; min-width: 0; }
.tp-alert__body strong { display: block; color: var(--tp-al-fg); }
.tp-alert--error { --tp-al-bg: var(--tp-coral-bg); --tp-al-fg: var(--tp-coral-text); --tp-al-edge: var(--tp-coral-edge); }
.tp-alert--success { --tp-al-bg: var(--tp-mint-bg); --tp-al-fg: var(--tp-mint-text); --tp-al-edge: var(--tp-mint-edge); }
.tp-alert--warn { --tp-al-bg: var(--tp-sun-bg); --tp-al-fg: var(--tp-sun-text); --tp-al-edge: var(--tp-sun-edge); }

/* ---------- Avatars, members, swatches, status ---------- */
.tp-avatar { flex: none; border-radius: 50%; object-fit: cover; background: var(--tp-surface-3); }
.tp-avatar--tag { width: 16px; height: 16px; }
.tp-avatar--xs { width: 20px; height: 20px; }
.tp-avatar--sm { width: 28px; height: 28px; }
.tp-avatar--md { width: 36px; height: 36px; }
.tp-avatar--lg { width: 56px; height: 56px; }
.tp-avatar--fallback { display: inline-grid; place-items: center; background: #334366; color: var(--tp-text-strong); font-weight: 800; font-size: 11px; line-height: 1; }
.tp-avatar--tag.tp-avatar--fallback, .tp-avatar--xs.tp-avatar--fallback { font-size: 9px; }
.tp-avatar--md.tp-avatar--fallback { font-size: 13px; }
.tp-avatar--lg.tp-avatar--fallback { font-size: 20px; }
.tp-avatar--user { background: var(--c, var(--tp-accent)); color: #0b0f17; border: 1px solid var(--tp-line); font-family: var(--tp-font); font-weight: 800; }
.tp-avatar--user.tp-avatar--tag, .tp-avatar--user.tp-avatar--xs { border-width: 1.5px; }
.tp-tag .tp-avatar { margin-left: -3px; }
.tp-avstack { display: flex; align-items: center; padding-left: 6px; }
.tp-avstack > * { margin-left: -6px; box-shadow: 0 0 0 2px var(--tp-surface); }
.tp-members { display: inline-flex; align-items: center; padding-left: 6px; }
.tp-members > * { margin-left: -6px; box-shadow: 0 0 0 2px var(--tp-surface); }
.tp-members__more {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border: 1px solid var(--tp-line); border-radius: 10px;
  background: var(--tp-surface-3); color: var(--tp-text-strong); font-size: 10px; font-weight: 800; line-height: 1;
}
.tp-members--sm .tp-members__more { min-width: 28px; height: 28px; border-radius: 14px; font-size: 11px; }

.tp-swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.tp-swatch { position: relative; display: inline-grid; }
.tp-swatch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.tp-swatch__dot {
  display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid var(--tp-line); border-radius: var(--tp-radius-sm); background: var(--c); color: transparent;
  box-shadow: var(--tp-shadow-raised); transition: transform 200ms var(--tp-spring);
}
.tp-swatch:hover .tp-swatch__dot { transform: translateY(-1px); }
.tp-swatch input:checked + .tp-swatch__dot { color: #0b0f17; transform: scale(1.08); box-shadow: 0 0 0 2px var(--tp-surface-2), 0 0 0 4px var(--c); }
.tp-swatch input:focus-visible + .tp-swatch__dot { outline: 2px solid var(--tp-accent-hover); outline-offset: 4px; }
/* At the top of a popover body (no top padding, overflow-y: auto) the ring of the chosen colour needs room above it. */
.tp-pop__body .tp-viewstack__view > .tp-swatches:first-child, .tp-pop__body > .tp-swatches:first-child { padding-top: 8px; }

.tp-status { display: flex; align-items: flex-start; gap: 10px; padding: 12px; border: 1px solid var(--tp-line); border-radius: var(--tp-radius); background: var(--tp-surface); }
.tp-status__dot { width: 12px; height: 12px; flex: none; margin-top: 4px; border: 1px solid var(--tp-line); border-radius: 50%; background: var(--tp-gray); }
.tp-status__dot--ok { background: var(--tp-success); }
.tp-status__dot--warn { background: var(--tp-warning); }
.tp-status__dot--error { background: var(--tp-danger); }
.tp-status__dot--loading { animation: tp-pulse 1.2s ease-in-out infinite; }
.tp-status__text { color: var(--tp-text-strong); }
.tp-status__text small { display: block; margin-top: 2px; color: var(--tp-text-subtle); font-size: 12px; }

/* ---------- Video grid + card ---------- */
/* Auto columns: 4 at most and 320 px minimum (3 to 4 videos per row on a desktop screen); « Colonnes » overrides it. */
.tp-vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, max(320px, calc((100% - 54px) / 4))), 1fr)); gap: 18px; }
.tp-vgrid--shorts { grid-template-columns: repeat(auto-fill, minmax(min(100%, 168px), 1fr)); gap: 18px 14px; }
.tp-vgrid--list { grid-template-columns: minmax(0, 1fr); gap: 10px; }

.tp-vcard {
  position: relative; display: flex; flex-direction: column; min-width: 0; overflow: hidden;
  border: 1px solid var(--tp-line); border-radius: var(--tp-radius-lg); background: var(--tp-surface); box-shadow: var(--tp-shadow-pop);
  transition: box-shadow 200ms var(--tp-ease), border-color var(--tp-dur) var(--tp-ease), opacity 160ms var(--tp-ease), transform 220ms var(--tp-spring);
}
.tp-vcard:hover { transform: translateY(-2px); box-shadow: var(--tp-shadow-pop-lg); }
.tp-vcard.is-compact:hover { transform: translateY(-1px); }
.tp-vcard.is-selected { border-color: var(--tp-accent); box-shadow: 0 0 0 1px var(--tp-accent); }
.tp-vcard.is-leaving { opacity: 0; transform: scale(0.97); pointer-events: none; }
.tp-vcard__media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--tp-surface-3); }
.tp-vcard__thumb { position: absolute; inset: 0; display: block; }
.tp-vcard__img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; transition: transform 400ms var(--tp-ease-out); }
/* YouTube thumbnails are shown as they are: no blurred copy (a Short sits on a plain background); zoom only while hovered. */
.tp-vcard.is-short .tp-vcard__media { background: #05070b; }
.tp-vcard.is-short .tp-vcard__img { left: 50%; width: auto; height: 100%; aspect-ratio: 9 / 16; transform: translateX(-50%); }
.tp-vgrid--shorts .tp-vcard__media { aspect-ratio: 9 / 16; }
.tp-vgrid--shorts .tp-vcard.is-short .tp-vcard__img { left: 0; width: 100%; aspect-ratio: auto; transform: none; }
/* Survol d'une miniature, comme fortnite.gg/creative (relevé le 09/11/2026 sur leur CSS) : l'image s'éclaircit et zoome
   (brightness 1.35, scale 1.08, 0,2 s) et un reflet blanc bleuté la traverse de gauche à droite en 1 s. Le reflet ne
   repart qu'à un nouveau survol : à la sortie il revient d'un coup à gauche (pas de transition au repos). */
.tp-vcard__img { transition: filter 200ms ease, transform 200ms ease; }
.tp-vcard:hover .tp-vcard__img { filter: brightness(1.35); transform: scale(1.08); }
.tp-vcard.is-short:hover .tp-vcard__img { transform: translateX(-50%) scale(1.08); }
.tp-vgrid--shorts .tp-vcard.is-short:hover .tp-vcard__img { transform: scale(1.08); }
.tp-vcard__thumb::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(206, 216, 255, 0.6), transparent);
}
.tp-vcard:hover .tp-vcard__thumb::before { opacity: 1; transform: translateX(100%); transition: opacity 1s, transform 1s; }
@media (prefers-reduced-motion: reduce) {
  .tp-vcard__img, .tp-vcard:hover .tp-vcard__img { transition: none; }
  .tp-vcard:hover .tp-vcard__thumb::before { opacity: 0; transition: none; }
}
.tp-vcard__media.is-broken .tp-vcard__thumb::after {
  content: "Miniature indisponible"; position: absolute; inset: 0; display: grid; place-items: center;
  color: var(--tp-text-subtlest); font-size: 12px; font-weight: 700;
}
.tp-vcard__dur {
  position: absolute; right: 7px; bottom: 7px; padding: 0 5px; border-radius: var(--tp-radius-xs);
  background: #070a10d9; color: #fff; font-size: 12px; line-height: 18px; font-weight: 800; font-variant-numeric: tabular-nums; pointer-events: none;
}
.tp-vcard__check { position: absolute; top: 7px; left: 7px; z-index: 2; opacity: 0; transition: opacity var(--tp-dur) var(--tp-ease), transform 200ms var(--tp-spring); }
.tp-vcard__check input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.tp-vcard__box {
  display: grid; place-items: center; width: 26px; height: 26px; border: 1px solid var(--tp-line); border-radius: var(--tp-radius-sm);
  background: #0b0f17e6; box-shadow: inset 0 0 0 2px var(--tp-text-strong); color: transparent;
  transition: background-color var(--tp-dur) var(--tp-ease), transform 220ms var(--tp-spring);
}
.tp-vcard__box .tp-icon { transform: scale(0.4); transition: transform 220ms var(--tp-spring); }
.tp-vcard__check input:checked + .tp-vcard__box { background: var(--tp-accent); box-shadow: var(--tp-shadow-raised); color: var(--tp-accent-text); }
.tp-vcard__check input:checked + .tp-vcard__box .tp-icon { transform: none; }
.tp-vcard__check input:focus-visible + .tp-vcard__box { outline: 2px solid var(--tp-accent-hover); outline-offset: 2px; }
.tp-vcard__actions { position: absolute; top: 7px; right: 7px; z-index: 2; display: flex; gap: 4px; opacity: 0; transform: translateY(-4px); transition: opacity var(--tp-dur) var(--tp-ease), transform 220ms var(--tp-spring); }
.tp-vcard__act {
  display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 1px solid var(--tp-line); border-radius: var(--tp-radius-sm);
  background: #0b0f17e6; color: var(--tp-text-strong); text-decoration: none; box-shadow: var(--tp-shadow-raised);
  transition: background-color var(--tp-dur) var(--tp-ease), transform 200ms var(--tp-spring);
}
.tp-vcard__act:hover { background: var(--tp-surface-3); color: #fff; text-decoration: none; }
.tp-vcard__act:active { transform: translateY(1px); box-shadow: none; }
.tp-vcard:hover .tp-vcard__check, .tp-vcard:focus-within .tp-vcard__check, .tp-vcard.is-selected .tp-vcard__check,
.tp-vcard:hover .tp-vcard__actions, .tp-vcard:focus-within .tp-vcard__actions { opacity: 1; transform: none; }
@media (hover: none) { .tp-vcard__check, .tp-vcard__actions { opacity: 1; transform: none; } .tp-vcard:hover { transform: none; } }
.tp-vcard__body { display: flex; flex-direction: column; gap: 9px; flex: 1; min-width: 0; padding: 11px 12px 13px; }
/* Title always reserves 2 lines so the tags start at the same height on every card. */
.tp-vcard__title { font-size: 14px; line-height: 20px; font-weight: 800; min-height: 40px; }
.tp-vcard__title a {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  color: var(--tp-text-strong); overflow-wrap: anywhere; text-decoration: none;
}
.tp-vcard__title a:hover { color: #fff; text-decoration: underline; text-decoration-thickness: 2px; }
/* Video info tags (channel, views, date, format, duration, score, « Dans ton tableau ») : big, contrasted (AA), one icon
   each; they wrap onto a second line instead of being cut. --vt = strong colour, --vt-fg = light text on its tinted fill. */
.tp-vcard__tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.tp-vcard__tags .tp-tag {
  --vt: var(--tp-gray);
  height: 26px; gap: 5px; padding: 0 9px; border: 1px solid color-mix(in srgb, var(--vt) 70%, #000); border-radius: var(--tp-radius-sm);
  background: var(--vt); color: #fff;
  font-size: 13px; line-height: 24px; font-weight: 800; letter-spacing: 0.005em;
}
.tp-vcard__tags .tp-tag .tp-icon { width: 14px; height: 14px; stroke-width: 2.5; }
.tp-vcard__tags .tp-tag--channel { max-width: 100%; }
.tp-vcard__tags .tp-avatar--tag { width: 18px; height: 18px; margin-left: -4px; box-shadow: 0 0 0 1.5px rgba(8, 11, 18, 0.6); }
.tp-vcard__tags .tp-avatar--tag.tp-avatar--fallback { font-size: 10px; }
.tp-vcard__tags .tp-tag--link:hover { color: #fff; filter: brightness(1.12); }
/* Vivid solid fills, dark text (contrast AA on every colour) */
.tp-vcard__tags .tp-tag--green { --vt: #15803d; }
.tp-vcard__tags .tp-tag--yellow { --vt: #eab308; color: #1a1300; }
.tp-vcard__tags .tp-tag--orange { --vt: #c2410c; }
.tp-vcard__tags .tp-tag--red { --vt: #dc2626; }
.tp-vcard__tags .tp-tag--purple { --vt: #7c3aed; }
.tp-vcard__tags .tp-tag--blue { --vt: #2563eb; }
.tp-vcard__tags .tp-tag--sky { --vt: #0369a1; }
.tp-vcard__tags .tp-tag--pink { --vt: #be185d; }
.tp-vcard__tags .tp-tag--gray { --vt: #475569; }
/* Date tags added by the views without an icon (« Date inconnue », « avant le … ») get the calendar too */
.tp-vcard__tags .tp-tag:is([data-undated], [data-fd-date])::before {
  content: ""; width: 14px; height: 14px; flex: none; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cpath d='M16 2v4M8 2v4M3 10h18'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cpath d='M16 2v4M8 2v4M3 10h18'/%3E%3C/svg%3E") center / contain no-repeat;
}
/* Score: larger, solid colour from ×2 (yellow), ×5 (orange), ×10 (red) */
.tp-vcard__tags .tp-tag--score { height: 28px; padding: 0 10px; font-size: 15px; line-height: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
.tp-vcard__tags .tp-tag--score .tp-icon { width: 16px; height: 16px; stroke-width: 2.5; }
.tp-vcard__tags .tp-tag--score.tp-tag--yellow { color: #1a1300; }
.tp-vcard__tags .tp-tag--score.tp-tag--red { --vt: #dc2626; }
.tp-vcard__tags .tp-tag--score.tp-tag--orange { --vt: #ea580c; }
/* Style « pleines compactes » (choisi par l'utilisateur) : aplat vif, texte blanc, sans icône ni avatar ni liseré */
.tp-vcard__tags .tp-tag { height: 24px; padding: 0 8px; border: 0; border-radius: 4px; font-size: 12.5px; line-height: 24px; font-weight: 700; }
.tp-vcard__tags .tp-tag .tp-icon,
.tp-vcard__tags .tp-avatar--tag,
.tp-vcard__tags .tp-tag:is([data-undated], [data-fd-date])::before { display: none; }
.tp-vcard__tags .tp-tag--score { height: 24px; padding: 0 8px; font-size: 13px; line-height: 24px; }
/* Narrow cards (3 columns near 1100 px, 2 columns near 900 px): tighter tags, still wrapped rather than cut */
.tp-vcard__body { container: tp-vcard / inline-size; }
@container tp-vcard (max-width: 268px) {
  .tp-vcard__tags { gap: 4px; }
  .tp-vcard__tags .tp-tag { gap: 4px; padding: 0 7px; }
  .tp-vcard__tags .tp-tag--score { padding: 0 8px; }
}
/* Shorts-only grid (narrow 9:16 cards): the « Short » tag says what the thumbnail already shows */
.tp-vgrid--shorts .tp-vcard.is-short .tp-tag--format { display: none; }
/* Compact cards (references in a card, public page): same look, a notch smaller */
.tp-vcard.is-compact .tp-vcard__tags { gap: 5px; }
.tp-vcard.is-compact .tp-vcard__tags .tp-tag { height: 24px; padding: 0 8px; gap: 4px; line-height: 24px; }
.tp-vcard.is-compact .tp-vcard__tags .tp-tag--score { height: 26px; font-size: 14px; line-height: 24px; }
.tp-vcard__extra { display: flex; flex-wrap: wrap; gap: 4px; }
.tp-vcard__remove {
  position: absolute; top: 7px; right: 7px; z-index: 3; display: grid; place-items: center; width: 26px; height: 26px; padding: 0;
  border: 0; border-radius: var(--tp-radius-sm); background: transparent; color: var(--tp-text-subtle);
}
.tp-vcard__remove:hover { background: var(--tp-hover); color: var(--tp-text-strong); }
.tp-vcard.is-compact { flex-direction: row; align-items: flex-start; box-shadow: var(--tp-shadow-raised); }
.tp-vcard.is-compact .tp-vcard__media { width: 128px; flex: none; margin: 8px 0 8px 8px; border: 1px solid var(--tp-line); border-radius: var(--tp-radius-sm); }
.tp-vcard.is-compact .tp-vcard__body { gap: 6px; padding: 8px 12px; }
.tp-vcard.is-compact[data-flags*="r"] .tp-vcard__body { padding-right: 38px; }
@media (max-width: 480px) { .tp-vcard.is-compact .tp-vcard__media { width: 96px; } }

/* Grid cards, YouTube style (ui.videoCardHTML, every card but .is-compact) :
   .tp-vcard__body > .tp-vcard__avatar (round, 36 px) + .tp-vcard__meta (title 16/22 500 on 2 lines max, channel name in
   grey 14 px, .tp-vcard__line « ×N  views • date  Dans ton tableau ») + .tp-vcard__menu (⋮, 40 px, top right).
   In the line, the views / date tags (and the « Date inconnue » ones added by the views) are grey text separated by « • »;
   the score keeps its solid colour (same scale as before), « Dans ton tableau » stays a small sky tag. */
.tp-vgrid:not(.tp-vgrid--list) { gap: 32px 16px; }
.tp-vcard:not(.is-compact) .tp-vcard__body { position: relative; flex-direction: row; align-items: flex-start; gap: 0; }
.tp-vcard__avatar {
  display: block; flex: none; width: 36px; height: 36px; margin-right: 12px; overflow: hidden; border-radius: 50%;
  background: var(--tp-surface-3); text-decoration: none;
}
.tp-vcard__avatar .tp-avatar { display: grid; place-items: center; width: 36px; height: 36px; margin: 0; box-shadow: none; }
.tp-vcard__meta { display: flex; flex-direction: column; align-items: flex-start; flex: 1; min-width: 0; padding-right: 32px; }
.tp-vcard:not(.is-compact) .tp-vcard__title { align-self: stretch; min-height: 0; margin: 0 0 4px; font-size: 16px; line-height: 22px; font-weight: 500; }
.tp-vcard:not(.is-compact) .tp-vcard__title a:hover { text-decoration: none; }
.tp-vcard__channel {
  display: block; max-width: 100%; overflow: hidden; color: var(--tp-text-subtle); font-size: 14px; line-height: 20px; font-weight: 400;
  white-space: nowrap; text-overflow: ellipsis; text-decoration: none;
}
a.tp-vcard__channel:hover { color: var(--tp-text-strong); text-decoration: none; }
.tp-vcard__tags.tp-vcard__line { gap: 4px 8px; color: var(--tp-text-subtle); font-size: 14px; line-height: 20px; }
.tp-vcard .tp-vcard__line > .tp-tag:not(.tp-tag--score):not([data-action]) {
  height: auto; gap: 0; padding: 0; border: 0; border-radius: 0; background: none; color: var(--tp-text-subtle);
  font-size: 14px; line-height: 20px; font-weight: 400; letter-spacing: 0; white-space: nowrap; animation: none;
}
/* « • » after a stat followed by another one: when the line wraps, the dot stays at the end of the first line. */
.tp-vcard .tp-vcard__line > .tp-tag:not(.tp-tag--score):not([data-action]):has(+ .tp-tag:not(.tp-tag--score):not([data-action])) { margin-right: -4px; }
.tp-vcard .tp-vcard__line > .tp-tag:not(.tp-tag--score):not([data-action]):has(+ .tp-tag:not(.tp-tag--score):not([data-action]))::after { content: "•"; margin-left: 4px; }
.tp-vcard .tp-vcard__tags.tp-vcard__line > .tp-tag.tp-tag--score { height: 20px; padding: 0 6px; font-size: 13px; line-height: 20px; font-weight: 700; }
/* « Dans ton tableau » : a discreet link (check + text in the accent colour), not a coloured block */
.tp-vcard .tp-vcard__tags.tp-vcard__line > .tp-tag[data-action] {
  height: 20px; gap: 4px; padding: 0; border: 0; background: none; color: var(--tp-accent-hover); font-size: 13px; line-height: 20px; font-weight: 500;
}
.tp-vcard .tp-vcard__tags.tp-vcard__line > .tp-tag[data-action] .tp-icon { display: inline-block; width: 14px; height: 14px; }
.tp-vcard .tp-vcard__tags.tp-vcard__line > .tp-tag[data-action]:hover { color: var(--tp-text-strong); filter: none; text-decoration: none; }
.tp-vcard__meta .tp-vcard__extra { margin-top: 8px; }
.tp-vcard__menu {
  position: absolute; top: 4px; right: 0; z-index: 2; display: grid; place-items: center; width: 40px; height: 40px; padding: 0;
  border: 0; border-radius: 50%; background: transparent; color: var(--tp-text-strong); cursor: pointer;
  opacity: 0; transition: opacity 200ms var(--tp-ease), background-color var(--tp-dur) var(--tp-ease);
}
.tp-vcard__menu .tp-icon { width: 22px; height: 22px; stroke-width: 3; transform: rotate(90deg); }
.tp-vcard__menu:hover, .tp-vcard__menu[aria-expanded="true"] { background: var(--tp-hover-strong); }
.tp-vcard__menu:focus-visible { outline: 2px solid var(--tp-accent-hover); outline-offset: -2px; }
.tp-vcard:hover .tp-vcard__menu, .tp-vcard:focus-within .tp-vcard__menu, .tp-vcard__menu[aria-expanded="true"] { opacity: 1; }
@media (hover: none) { .tp-vcard__menu { opacity: 1; } }
/* Shorts grid (narrow 9:16 cards): no avatar, like the Shorts shelf of YouTube */
.tp-vgrid--shorts .tp-vcard__avatar { display: none; }
/* Skeleton of a grid card: round avatar + lines */
.tp-vcard--skeleton .tp-vcard__body { padding-top: 12px; }
.tp-vcard--skeleton .tp-vcard__meta { gap: 8px; align-items: stretch; }
.tp-vcard--skeleton .tp-skeleton--tag { height: 20px; }

/* Score ×10 and more: a gentle pulse */
.tp-tag--score.tp-tag--red { animation: tp-score-pulse 2.4s ease-in-out infinite; transform-origin: center; }
.tp-tag--score.is-pending { animation: tp-pulse 1.2s ease-in-out infinite; }
@keyframes tp-score-pulse { 0%, 70%, 100% { transform: scale(1); } 84% { transform: scale(1.05); } }

/* ---------- Skeletons (shimmer) ---------- */
.tp-skeleton {
  display: block; border-radius: var(--tp-radius-xs);
  background: linear-gradient(100deg, var(--tp-surface-3) 35%, #2c3850 50%, var(--tp-surface-3) 65%) var(--tp-surface-3);
  background-size: 300% 100%; animation: tp-shimmer 1.5s ease-in-out infinite;
}
.tp-skeleton--line { height: 12px; width: 100%; }
.tp-skeleton--short { width: 60%; }
.tp-skeleton--tag { display: inline-block; width: 56px; height: 20px; }
.tp-skeleton--block { height: 96px; border-radius: var(--tp-radius); }
.tp-skeleton-row { display: flex; gap: 4px; }
.tp-vcard--skeleton { box-shadow: none; }
.tp-vcard--skeleton:hover { transform: none; box-shadow: none; }
.tp-vcard--skeleton .tp-vcard__media { border-radius: 0; }
.tp-vcard--skeleton .tp-skeleton-row { gap: 6px; }
.tp-vcard--skeleton .tp-skeleton--tag { width: 72px; height: 26px; border-radius: var(--tp-radius-sm); }

/* ---------- Empty / error states ---------- */
.tp-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; max-width: 480px; margin: 0 auto; padding: 40px 16px; text-align: center; }
.tp-empty__art { width: 168px; height: auto; margin-bottom: 6px; animation: tp-float 3.2s ease-in-out infinite; }
.tp-empty__icon {
  display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 6px; border: 1px solid var(--tp-line); border-radius: var(--tp-radius-lg);
  background: var(--tp-surface-2); color: var(--tp-accent-hover); box-shadow: var(--tp-shadow-pop);
}
.tp-empty__icon .tp-icon { width: 24px; height: 24px; }
.tp-empty__title { font-family: var(--tp-font-display); font-size: 19px; line-height: 26px; font-weight: 600; }
.tp-empty__text { color: var(--tp-text-subtle); white-space: pre-line; }
.tp-empty__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 10px; }
.tp-empty--error .tp-empty__icon { background: var(--tp-coral-bg); color: var(--tp-coral); }

/* ---------- Filters ---------- */
.tp-filterbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.tp-filterbar__btn.is-active { --tp-btn-bg: var(--tp-selected); --tp-btn-bg-hover: #1b2d5c; --tp-btn-fg: var(--tp-accent-hover); --tp-btn-edge: var(--tp-accent-edge); }
.tp-filterbar__count {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px;
  background: var(--tp-sun); color: #2a1f02; font-size: 11px; line-height: 20px; font-weight: 800; animation: tp-pop-in 240ms var(--tp-spring);
}
.tp-filterbar__tags { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; }
.tp-ftag {
  display: inline-flex; align-items: center; gap: 2px; max-width: 100%; height: 26px; padding: 0 3px 0 9px; border: 1px solid #2a57d4;
  border-radius: var(--tp-radius-sm); background: var(--tp-blue-bg); color: var(--tp-blue-text); font-size: 12px; font-weight: 700;
  animation: tp-pop-in 220ms var(--tp-spring);
}
.tp-ftag__text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-ftag__x { display: grid; place-items: center; width: 20px; height: 20px; flex: none; padding: 0; border: 0; border-radius: var(--tp-radius-xs); background: none; color: inherit; }
.tp-ftag__x:hover { background: #ffffff1f; }
.tp-ftag__x .tp-icon { width: 12px; height: 12px; }
.tp-fpanel { display: flex; flex-direction: column; gap: 16px; }
.tp-fpanel__group { display: flex; flex-direction: column; gap: 6px; }
.tp-fpanel__legend { margin-bottom: 6px; color: var(--tp-text-subtle); font-size: 12px; line-height: 16px; font-weight: 800; }
.tp-fpanel__checks { display: flex; flex-direction: column; }
.tp-fpanel__checks .tp-check { padding: 3px 6px; border-radius: var(--tp-radius-sm); }
.tp-fpanel__checks .tp-check:hover { background: var(--tp-hover); }
.tp-fpanel__swatch { flex: 1; max-width: 160px; height: 24px; border-radius: var(--tp-radius-xs); }
.tp-fpanel__foot { padding-top: 12px; border-top: 1px solid var(--tp-border); }

/* ---------- Popovers ---------- */
.tp-pop {
  position: fixed; z-index: 450; display: flex; flex-direction: column; max-width: calc(100vw - 16px); /* above modals (200) and toasts (400) */
  border-radius: var(--tp-radius-lg); background: var(--tp-surface-2); box-shadow: var(--tp-shadow-overlay); color: var(--tp-text);
  transform-origin: top center; animation: tp-pop-in 240ms var(--tp-spring);
}
.tp-pop:focus { outline: none; }
.tp-pop__head { display: grid; grid-template-columns: 32px minmax(0, 1fr) 32px; align-items: center; gap: 4px; flex: none; padding: 6px 8px; min-height: 50px; }
.tp-pop__back { grid-column: 1; }
.tp-pop__title {
  grid-column: 2; overflow: hidden; color: var(--tp-text-strong); font-size: 15px; line-height: 20px; font-weight: 600;
  text-align: center; text-overflow: ellipsis; white-space: nowrap;
}
.tp-pop__close { grid-column: 3; }
.tp-pop__back, .tp-pop__close, .tp-drawer__back, .tp-drawer__close, .tp-modal__close, .tp-modal__back {
  display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: var(--tp-radius-md);
  background: transparent; color: var(--tp-text-subtle); transition: background-color var(--tp-dur) var(--tp-ease), transform 200ms var(--tp-spring);
}
.tp-pop__back:hover, .tp-pop__close:hover, .tp-drawer__back:hover, .tp-drawer__close:hover, .tp-modal__close:hover, .tp-modal__back:hover { background: var(--tp-hover); color: var(--tp-text-strong); }
.tp-pop__close:hover, .tp-modal__close:hover, .tp-drawer__close:hover { transform: rotate(90deg); }
.tp-pop__body { min-height: 0; overflow-y: auto; padding: 0 12px 12px; overscroll-behavior: contain; }
.tp-pop__text { margin-bottom: 12px; color: var(--tp-text); }
.tp-pop__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tp-viewstack__view { min-width: 0; }
.tp-viewstack__view:not(:only-child) { animation: tp-fade 160ms var(--tp-ease); }
@keyframes tp-fade-in { from { opacity: 0; transform: translateY(-2px); } }

.tp-menu { display: flex; flex-direction: column; gap: 1px; margin: 0 -6px; }
.tp-menu__item {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 34px; padding: 6px 10px; border: 0; border-radius: var(--tp-radius-sm);
  background: none; color: var(--tp-text); font-weight: 600; text-align: left; text-decoration: none;
  transition: background-color var(--tp-dur) var(--tp-ease), color var(--tp-dur) var(--tp-ease);
}
.tp-menu__item:hover, .tp-menu__item:focus-visible { background: var(--tp-hover-strong); color: var(--tp-text-strong); text-decoration: none; }
/* Items fill the scrolling popover body (overflow-y: auto): the focus ring stays inside the item, never cut. */
.tp-menu__item:focus-visible { outline-offset: -2px; }
.tp-menu__item:hover .tp-icon { color: var(--tp-text-strong); }
.tp-menu__item:disabled { color: var(--tp-text-disabled); background: none; }
.tp-menu__item .tp-icon { color: var(--tp-text-subtle); transition: color var(--tp-dur) var(--tp-ease); }
.tp-menu__item--danger, .tp-menu__item--danger .tp-icon, .tp-menu__item--danger:hover .tp-icon { color: var(--tp-danger); }
.tp-menu__item--danger:hover { background: var(--tp-danger-soft); color: var(--tp-danger-hover); }
.tp-menu__sep { height: 2px; margin: 6px 10px; border-radius: 2px; background: var(--tp-border); }
.tp-menu__title { padding: 8px 10px 4px; color: var(--tp-text-subtle); font-size: 12px; line-height: 16px; font-weight: 800; }

/* ---------- Modals ---------- */
.tp-modal { position: fixed; inset: 0; z-index: 200; display: flex; padding: 48px 16px; overflow-y: auto; overscroll-behavior: contain; }
.tp-modal__backdrop { position: fixed; inset: 0; background: #03050ac4; animation: tp-fade 180ms var(--tp-ease); }
.tp-modal__dialog {
  position: relative; display: flex; flex-direction: column; width: 100%; max-width: 560px; max-height: calc(100vh - 32px); margin: auto;
  border-radius: var(--tp-radius-xl); background: var(--tp-surface-2); box-shadow: var(--tp-shadow-overlay); color: var(--tp-text);
  animation: tp-spring-in 300ms var(--tp-spring) both;
}
.tp-modal__dialog:focus { outline: none; }
.tp-modal__dialog--sm { max-width: 420px; }
.tp-modal__dialog--md { max-width: 560px; }
.tp-modal__dialog--lg { max-width: 768px; }
.tp-modal__dialog--xl { max-width: 1080px; }
.tp-modal__head { display: flex; align-items: center; gap: 8px; flex: none; padding: 16px 12px 8px 24px; }
.tp-modal__head--bare { position: absolute; top: 8px; right: 8px; z-index: 5; padding: 0; }
.tp-modal__title { flex: 1; min-width: 0; font-size: 19px; line-height: 26px; overflow-wrap: anywhere; }
.tp-modal__close { margin-left: auto; }
.tp-modal__body { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 24px 24px; }
.tp-modal__text { color: var(--tp-text); white-space: pre-line; }
.tp-modal__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 22px; }
.tp-modal.is-closing { opacity: 0; transition: opacity 140ms var(--tp-ease); pointer-events: none; }
.tp-modal.is-closing .tp-modal__dialog { transform: translateY(6px) scale(0.97); transition: transform 140ms var(--tp-ease); }
.tp-modal--drawer { padding: 0; justify-content: flex-end; overflow: hidden; }
.tp-modal--drawer .tp-modal__dialog {
  max-width: min(var(--tp-drawer-w, 340px), 100%); height: 100%; max-height: none; margin: 0; border-radius: var(--tp-radius-xl) 0 0 var(--tp-radius-xl);
  animation: tp-slide-in 240ms var(--tp-ease-out) both;
}
.tp-modal--drawer.is-closing .tp-modal__dialog { transform: translateX(24px); }
.tp-modal--drawer .tp-modal__head { padding: 8px; }
.tp-modal--drawer .tp-modal__title { text-align: center; font-size: 15px; color: var(--tp-text-strong); }
.tp-modal--drawer .tp-modal__body { padding: 0 12px 12px; }
.tp-modal--sheet { padding: 0; align-items: flex-end; }
.tp-modal--sheet .tp-modal__dialog { max-width: none; max-height: 85vh; margin: 0; border-radius: var(--tp-radius-xl) var(--tp-radius-xl) 0 0; animation: tp-sheet-in 260ms var(--tp-ease-out) both; }
@keyframes tp-slide-in { from { transform: translateX(32px); opacity: 0; } }
@keyframes tp-sheet-in { from { transform: translateY(40px); opacity: 0; } }
@media (max-width: 899px) {
  .tp-modal--xl { padding: 0; }
  .tp-modal--xl .tp-modal__dialog { max-width: none; min-height: 100%; max-height: none; margin: 0; border-radius: 0; animation: tp-sheet-in 260ms var(--tp-ease-out) both; }
}
@media (max-width: 599px) {
  .tp-modal { padding: 16px 8px; }
  .tp-modal--xl, .tp-modal--drawer, .tp-modal--sheet, .tp-modal--lightbox { padding: 0; }
  .tp-modal__head { padding: 12px 8px 4px 16px; }
  .tp-modal__body { padding: 8px 16px 16px; }
}

/* ---------- Drawers (non modal) ---------- */
.tp-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 150; display: flex; flex-direction: column;
  width: min(var(--tp-drawer-w, 340px), 100%); border-left: 1px solid var(--tp-line); background: var(--tp-surface-2); box-shadow: -2px 0 12px rgba(0, 0, 0, 0.35); color: var(--tp-text);
  transform: translateX(104%); transition: transform 260ms var(--tp-ease-out);
}
.tp-drawer.is-open { transform: none; }
.tp-drawer:focus { outline: none; }
.tp-drawer--inside { position: absolute; z-index: 20; }
.tp-drawer__head { display: grid; grid-template-columns: 32px minmax(0, 1fr) 32px; align-items: center; gap: 4px; flex: none; min-height: 52px; padding: 8px; border-bottom: 1px solid var(--tp-border); }
.tp-drawer__back { grid-column: 1; }
.tp-drawer__title { grid-column: 2; overflow: hidden; color: var(--tp-text-strong); font-size: 16px; line-height: 20px; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.tp-drawer__close { grid-column: 3; }
.tp-drawer__body { flex: 1; min-height: 0; overflow-y: auto; padding: 12px; }

/* ---------- Toasts ---------- */
.tp-toasts {
  position: fixed; left: calc(var(--tp-main-left) + 16px); bottom: 16px; z-index: 400; display: flex; flex-direction: column; gap: 10px;
  width: min(420px, calc(100vw - var(--tp-main-left) - 32px)); pointer-events: none;
}
body.has-selbar .tp-toasts { bottom: 84px; }
.tp-toast {
  --tp-toast-chip: var(--tp-blue-bg); --tp-toast-c: var(--tp-blue-text);
  display: flex; align-items: flex-start; gap: 10px; padding: 10px 8px 10px 10px; border: 1px solid var(--tp-line); border-radius: var(--tp-radius-lg);
  background: var(--tp-surface-2); box-shadow: var(--tp-shadow-pop-lg); color: var(--tp-text-strong); font-weight: 600; pointer-events: auto;
  animation: tp-toast-in 320ms var(--tp-spring) both;
}
.tp-toast__icon { display: grid; place-items: center; width: 26px; height: 26px; flex: none; margin-top: -3px; border-radius: var(--tp-radius-sm); background: var(--tp-toast-chip); color: var(--tp-toast-c); }
.tp-toast__icon .tp-icon { width: 15px; height: 15px; }
.tp-toast--success { --tp-toast-chip: var(--tp-mint-bg); --tp-toast-c: var(--tp-mint); }
.tp-toast--error { --tp-toast-chip: var(--tp-coral-bg); --tp-toast-c: var(--tp-coral); }
.tp-toast__msg { flex: 1; min-width: 0; white-space: pre-line; }
.tp-toast__action {
  flex: none; padding: 0 6px; border: 0; border-radius: var(--tp-radius-xs); background: none; color: var(--tp-accent-hover);
  font-family: var(--tp-font); font-weight: 800; line-height: 20px;
}
.tp-toast__action:hover { background: var(--tp-hover); text-decoration: underline; }
.tp-toast__close { display: grid; place-items: center; width: 22px; height: 22px; flex: none; padding: 0; border: 0; border-radius: var(--tp-radius-xs); background: none; color: var(--tp-text-subtle); }
.tp-toast__close:hover { background: var(--tp-hover); color: var(--tp-text-strong); }
.tp-toast__close .tp-icon { width: 14px; height: 14px; }
.tp-toast.is-leaving { opacity: 0; transform: translateX(-20px) scale(0.97); transition: opacity 160ms, transform 160ms; pointer-events: none; }
@keyframes tp-toast-in { from { opacity: 0; transform: translateX(-28px) scale(0.96); } }

/* ---------- Selection bar ---------- */
.tp-selbar {
  position: fixed; left: var(--tp-main-left); right: 0; bottom: 16px; z-index: 120; display: flex; justify-content: center; padding: 0 16px;
  opacity: 0; transform: translateY(16px) scale(0.97); pointer-events: none; transition: opacity 180ms var(--tp-ease), transform 300ms var(--tp-spring);
}
.tp-selbar.is-visible { opacity: 1; transform: none; }
.tp-selbar__inner {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; max-width: 100%; padding: 8px 8px 8px 16px;
  border: 1px solid var(--tp-line); border-radius: var(--tp-radius-xl); background: var(--tp-surface-2); box-shadow: var(--tp-shadow-pop-lg); pointer-events: auto;
}
.tp-selbar__count { color: var(--tp-text-strong); font-weight: 700; }
.tp-selbar__num { display: inline-block; min-width: 1ch; font-family: var(--tp-font); font-weight: 800; font-size: 16px; }
.tp-selbar__actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Board tiles ---------- */
.tp-btiles { display: grid; grid-template-columns: repeat(auto-fill, 194px); gap: 18px; list-style: none; }
@media (max-width: 599px) { .tp-btiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }
.tp-btile {
  position: relative; height: 96px; overflow: hidden; border: 1px solid var(--tp-line); border-radius: var(--tp-radius-lg);
  background: var(--tp-btile-bg, #0079bf); box-shadow: var(--tp-shadow-pop);
  transition: transform 220ms var(--tp-spring), box-shadow 200ms var(--tp-ease);
}
.tp-btile:hover, .tp-btile:focus-within { transform: translateY(-2px); box-shadow: var(--tp-shadow-pop-lg); }
.tp-btile::before { content: ""; position: absolute; inset: 0; background: #00000033; transition: background-color var(--tp-dur) var(--tp-ease); }
.tp-btile:hover::before, .tp-btile:focus-within::before { background: #0000004d; }
.tp-btile__link {
  position: absolute; inset: 0; z-index: 1; padding: 9px 11px; color: #fff; font-family: var(--tp-font); font-size: 17px; line-height: 21px; font-weight: 800;
  text-decoration: none; text-shadow: 0 1px 0 #0006;
}
.tp-btile__link:hover { color: #fff; text-decoration: none; }
.tp-btile__link:focus-visible { outline-offset: -4px; border-radius: var(--tp-radius); }
.tp-btile__title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.tp-btile__members { position: absolute; left: 10px; bottom: 8px; z-index: 2; pointer-events: none; }
.tp-btile__members .tp-members > * { box-shadow: 0 0 0 2px #0006; }
.tp-btile__star {
  position: absolute; right: 6px; bottom: 6px; z-index: 2; display: grid; place-items: center; width: 30px; height: 30px; padding: 0;
  border: 0; border-radius: var(--tp-radius-sm); background: transparent; color: #fff; opacity: 0; transform: translateX(6px);
  transition: opacity var(--tp-dur) var(--tp-ease), transform 220ms var(--tp-spring);
}
.tp-btile__star:hover { transform: scale(1.08); }
.tp-btile:hover .tp-btile__star, .tp-btile:focus-within .tp-btile__star, .tp-btile.is-starred .tp-btile__star { opacity: 1; transform: none; }
.tp-btile.is-starred .tp-btile__star { color: var(--tp-sun); }
@media (hover: none) { .tp-btile__star { opacity: 1; transform: none; } .tp-btile:hover { transform: none; } }
.tp-btile--create {
  display: grid; place-items: center; width: 100%; border: 1.5px dashed #34415c; background: var(--tp-surface); color: var(--tp-text);
  font-family: var(--tp-font); font-size: 15px; font-weight: 800; box-shadow: none;
}
.tp-btile--create::before { display: none; }
.tp-btile--create:hover, .tp-btile--create:focus-visible { border-color: var(--tp-accent); background: var(--tp-surface-2); color: var(--tp-text-strong); box-shadow: none; }

/* Board creation (popover) */
.tp-cboard { display: flex; flex-direction: column; gap: 12px; }
.tp-cboard__preview {
  display: flex; align-items: flex-start; gap: 6px; width: 200px; height: 120px; margin: 0 auto; padding: 12px 10px;
  border: 1px solid var(--tp-line); border-radius: var(--tp-radius); background: #0079bf; box-shadow: var(--tp-shadow-pop);
  transition: background 200ms var(--tp-ease);
}
.tp-cboard__preview span { flex: 1; height: 60%; border-radius: var(--tp-radius-xs); background: #ffffff3d; }
.tp-cboard__preview span:nth-child(2) { height: 40%; }
.tp-cboard__preview span:nth-child(3) { height: 80%; }
.tp-bgpick { display: flex; gap: 8px; margin-top: 4px; }
.tp-bgpick__opt {
  position: relative; display: grid; place-items: center; flex: 1; min-width: 0; height: 40px; padding: 0; border: 1px solid var(--tp-line);
  border-radius: var(--tp-radius-sm); color: #fff; box-shadow: var(--tp-shadow-raised); transition: filter var(--tp-dur) var(--tp-ease), transform 200ms var(--tp-spring);
}
.tp-bgpick__opt:hover { filter: brightness(0.9); transform: translateY(-1px); }
.tp-bgpick__opt.is-selected { transform: scale(1.03); }
.tp-bgpick__opt .tp-icon { filter: drop-shadow(0 1px 0 #0009); }
.tp-bgpick[data-row="colors"] .tp-bgpick__opt { height: 32px; }
.tp-bgpick__more { background: var(--tp-surface-3); color: var(--tp-text); }
.tp-bgpick__more:hover { background: var(--tp-surface-3-hover); filter: none; }
.tp-bgpick--all { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tp-bgpick__opt--lg { height: 56px; }

/* ---------- Home ---------- */
.tp-shortcut {
  --tp-sc: var(--tp-accent); --tp-sc-bg: var(--tp-blue-bg);
  display: flex; align-items: center; gap: 12px; min-height: 72px; padding: 12px 14px; border: 1px solid var(--tp-line); border-radius: var(--tp-radius-lg);
  background: var(--tp-surface); color: var(--tp-text); text-decoration: none; box-shadow: var(--tp-shadow-pop);
  transition: transform 220ms var(--tp-spring), box-shadow 200ms var(--tp-ease), background-color var(--tp-dur) var(--tp-ease);
}
.tp-shortcut:hover { background: var(--tp-surface-2); color: var(--tp-text); text-decoration: none; transform: translateY(-2px); box-shadow: var(--tp-shadow-pop-lg); }
.tp-shortcut:active { transform: translateY(1px); box-shadow: var(--tp-shadow-raised); }
.tp-shortcut__icon {
  display: grid; place-items: center; width: 44px; height: 44px; flex: none; border: 1px solid var(--tp-line); border-radius: var(--tp-radius);
  background: var(--tp-sun-bg); color: var(--tp-text-strong); transition: transform 260ms var(--tp-spring); /* always neutral: no coloured pastilles */
}
.tp-shortcut__icon .tp-icon { width: 22px; height: 22px; }
/* Optical sizing: the lightbulb (12 px wide) and chart (short bars) glyphs look smaller than calendar / trend */
.tp-shortcut--sun .tp-shortcut__icon .tp-icon { width: 26px; height: 26px; }
.tp-shortcut--mint .tp-shortcut__icon .tp-icon { width: 24px; height: 24px; }
.tp-shortcut:hover .tp-shortcut__icon { transform: scale(1.05); }
.tp-shortcut__text { display: flex; flex-direction: column; min-width: 0; }
.tp-shortcut__title { color: var(--tp-text-strong); font-family: var(--tp-font); font-size: 16px; font-weight: 800; }
.tp-shortcut__sub { color: var(--tp-text-subtle); font-size: 12px; line-height: 16px; }
.tp-shortcut--sun { --tp-sc: var(--tp-sun); --tp-sc-bg: var(--tp-sun-bg); }
.tp-shortcut--mint { --tp-sc: var(--tp-mint); --tp-sc-bg: var(--tp-mint-bg); }
.tp-shortcut--coral { --tp-sc: var(--tp-coral); --tp-sc-bg: var(--tp-coral-bg); }
.tp-shortcut--purple { --tp-sc: var(--tp-purple); --tp-sc-bg: var(--tp-purple-bg); }
.tp-flist { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 10px; list-style: none; }
.tp-frow {
  display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 10px 12px; border: 1px solid var(--tp-line); border-radius: var(--tp-radius-lg);
  background: var(--tp-surface); box-shadow: var(--tp-shadow-raised); color: var(--tp-text); text-decoration: none;
  transition: transform 200ms var(--tp-spring), background-color var(--tp-dur) var(--tp-ease), box-shadow 200ms var(--tp-ease);
}
.tp-frow:hover { background: var(--tp-surface-2); color: var(--tp-text); text-decoration: none; transform: translateY(-1px); box-shadow: var(--tp-shadow-pop); }
.tp-frow__main { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.tp-frow__name { overflow: hidden; color: var(--tp-text-strong); font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.tp-frow__meta { color: var(--tp-text-subtlest); font-size: 12px; line-height: 16px; }
.tp-frow--add {
  justify-content: center; border: 1.5px dashed #34415c; background: transparent; box-shadow: none; font: inherit; font-family: var(--tp-font);
  font-weight: 800; color: var(--tp-text); width: 100%;
}
.tp-frow--add:hover { border-color: var(--tp-accent); background: var(--tp-surface); color: var(--tp-text-strong); box-shadow: none; }

/* Home v3.1 (views/home.js): centred hero + pill search, showcase of real outlier videos, « Comment ça marche », boards / folders */
.tp-home { max-width: none; } /* full width like YouTube: no empty margins on a large screen */
.tp-hero { display: flex; flex-direction: column; align-items: center; padding: 48px 0 8px; text-align: center; }
.tp-hero__hello { margin-bottom: 14px; color: var(--tp-text-subtle); font-size: 15px; font-weight: 700; }
.tp-hero__title {
  max-width: 980px; font-size: clamp(36px, 4.6vw, 64px); line-height: 1.05; font-weight: 800; letter-spacing: -0.035em; text-wrap: balance;
}
.tp-hero__title > span { display: block; }
.tp-hero__accent { color: #3b6ff5; }
.tp-hero__lead { max-width: 680px; margin-top: 20px; color: var(--tp-text-subtle); font-size: 17px; line-height: 27px; text-wrap: pretty; }
.tp-hero__lead strong { color: var(--tp-text-strong); }
/* Search: the site's YouTube bar (searchbar.css) + « Aléatoire » as YouTube's round microphone button */
.tp-hero__search { width: min(100%, 900px); margin-top: 32px; }
.tp-hero__random .tp-icon { transition: transform 400ms var(--tp-spring); }
.tp-hero__random.is-spinning .tp-icon { transform: rotate(180deg); }
/* Popular searches under the bar (free, from the shared cache): plain chips, hidden when there are none */
.tp-hero__chips { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 10px; width: min(100%, 780px); margin-top: 16px; }
.tp-hero__chipslabel { color: var(--tp-text-subtle); font-size: 13px; font-weight: 700; }
.tp-hero__chiplist { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; list-style: none; }
.tp-hero__chip {
  display: inline-flex; align-items: center; height: 32px; padding: 0 14px; border: 1px solid var(--tp-line); border-radius: var(--tp-radius-pill);
  background: var(--tp-surface); color: var(--tp-text); font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap;
  transition: background-color var(--tp-dur) var(--tp-ease), color var(--tp-dur) var(--tp-ease);
}
.tp-hero__chip:hover { background: var(--tp-surface-2); color: var(--tp-text-strong); text-decoration: none; }

/* Home sections */
.tp-hsec { margin-top: 64px; }
.tp-hsec--compact { margin-top: 40px; }
.tp-hsec__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 16px; margin-bottom: 18px; }
.tp-hsec__titles { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tp-hsec__title { display: flex; align-items: center; gap: 10px; font-size: 26px; line-height: 32px; font-weight: 800; letter-spacing: -0.02em; }
.tp-hsec__title--sm { font-size: 19px; line-height: 26px; }
.tp-hsec__title .tp-icon { width: 20px; height: 20px; color: var(--tp-text-subtle); }
.tp-hsec__sub { max-width: 70ch; color: var(--tp-text-subtle); font-size: 15px; line-height: 22px; }
.tp-hsec__more .tp-icon { width: 14px; height: 14px; }
.tp-hsec__note { color: var(--tp-text-subtlest); font-size: 13px; line-height: 18px; }

/* Showcase: as many cards as fill whole rows (4 / 3 / 2 columns, 1 on phones) */
.tp-hshow { container: tp-hshow / inline-size; }
.tp-hshow__legend { display: flex; align-items: flex-start; gap: 8px; margin: -6px 0 18px; color: var(--tp-text-subtle); font-size: 13px; line-height: 18px; }
.tp-hshow__chip {
  display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border-radius: var(--tp-radius-sm);
  background: #ea580c; color: #fff; font-size: 13px; font-weight: 800;
}
.tp-hshow__chip .tp-icon { width: 13px; height: 13px; stroke-width: 2.5; }
.tp-hshow__grid { grid-template-columns: minmax(0, 1fr); gap: 32px 16px; }
.tp-hshow__grid > :nth-child(n + 5) { display: none; }
.tp-hshow .tp-vcard__check { display: none; }
@container tp-hshow (min-width: 560px) { .tp-hshow__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container tp-hshow (min-width: 860px) {
  .tp-hshow__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tp-hshow__grid > :nth-child(n + 5) { display: flex; }
  .tp-hshow__grid > :nth-child(n + 7) { display: none; }
}
@container tp-hshow (min-width: 1160px) {
  .tp-hshow__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .tp-hshow__grid > :nth-child(n + 7) { display: flex; }
}
.tp-hshow__grid > .tp-sr { display: block !important; }
.tp-hshow__notice {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 18px 20px; border: 1px solid var(--tp-line); border-radius: var(--tp-radius-lg);
  background: var(--tp-surface);
}
.tp-hshow__noticon { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 50%; background: var(--tp-selected); color: var(--tp-accent-hover); }
.tp-hshow__noticon .tp-icon { width: 20px; height: 20px; }
.tp-hshow__notext { flex: 1; min-width: min(100%, 240px); }
.tp-hshow__notext strong { display: block; font-size: 15px; }
.tp-hshow__notext p { margin-top: 2px; color: var(--tp-text-subtle); }
.tp-hshow__noactions { display: flex; gap: 8px; }

/* « Comment ça marche »: 3 steps with a small drawn preview */
.tp-hsteps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 18px; list-style: none; }
.tp-hstep {
  display: flex; flex-direction: column; min-width: 0; overflow: hidden; border: 1px solid var(--tp-line); border-radius: var(--tp-radius-xl);
  background: var(--tp-surface);
}
.tp-hstep__art { position: relative; height: 188px; overflow: hidden; border-bottom: 1px solid var(--tp-line); background: #0e1320; }
.tp-hstep__text { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px 20px; }
.tp-hstep__text h3 { display: flex; align-items: center; gap: 10px; font-size: 17px; line-height: 24px; font-weight: 800; }
.tp-hstep__num {
  display: inline-grid; place-items: center; width: 26px; height: 26px; flex: none; border-radius: 50%;
  background: var(--tp-accent); color: #fff; font-size: 13px; font-weight: 800;
}
.tp-hstep__text p { color: var(--tp-text-subtle); }
.tp-hstep__inline { display: inline-block; width: 15px; height: 15px; margin: 0 1px; vertical-align: -3px; color: var(--tp-text-strong); }

/* Mock pieces (decorative, aria-hidden) */
.tp-mock i { display: block; height: 7px; width: var(--w, 80%); border-radius: 4px; background: #2a3550; }
.tp-mock--find { display: flex; flex-direction: column; gap: 10px; padding: 18px 20px; }
.tp-mock__pill {
  display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border: 1px solid #263149; border-radius: var(--tp-radius-pill);
  background: #151b28; color: var(--tp-text-subtlest);
}
.tp-mock__pill .tp-icon { width: 14px; height: 14px; }
.tp-mock__pill span { width: 38%; height: 7px; border-radius: 4px; background: #2a3550; }
.tp-mock__row { display: flex; align-items: center; gap: 12px; padding: 7px; border: 1px solid var(--tp-line); border-radius: var(--tp-radius-md); background: var(--tp-surface-2); }
.tp-mock__thumb {
  position: relative; width: 84px; aspect-ratio: 16 / 9; flex: none; overflow: hidden; border-radius: var(--tp-radius-xs); background: #2b4a8f;
}
.tp-mock__thumb--b { background: #6b3a1f; }
.tp-mock__thumb img, .tp-mock__cthumb img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; }
.tp-mock__meta { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; align-items: flex-start; }
.tp-mock__score {
  display: inline-flex; align-items: center; gap: 3px; height: 20px; padding: 0 6px; border-radius: var(--tp-radius-xs);
  color: #fff; font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums;
}
.tp-mock__score .tp-icon { width: 11px; height: 11px; stroke-width: 2.6; }
.tp-mock__score--red { background: #dc2626; animation: tp-score-pulse 2.4s ease-in-out infinite; }
.tp-mock__score--orange { background: #ea580c; }
.tp-mock--board { display: flex; gap: 10px; padding: 16px; background: #1d4fd8; }
.tp-mock__list {
  display: flex; flex-direction: column; gap: 7px; flex: 1; min-width: 0; align-self: flex-start; padding: 8px; border-radius: var(--tp-radius-md); background: #0e1320;
}
.tp-mock__list b { color: var(--tp-text-strong); font-size: 11px; line-height: 14px; font-weight: 800; }
.tp-mock__card { display: flex; flex-direction: column; gap: 5px; padding: 7px; border-radius: var(--tp-radius-xs); background: var(--tp-surface-3); }
.tp-mock__card i { height: 6px; background: #3a4866; }
.tp-mock__card.is-new { box-shadow: 0 0 0 2px var(--tp-accent-hover); animation: tp-float 3.2s ease-in-out infinite; }
.tp-mock__cthumb { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 4px; background: #2b4a8f; }
.tp-mock--script { display: grid; place-items: center; padding: 18px 22px; }
.tp-mock__doc {
  display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 300px; padding: 14px 16px; border: 1px solid var(--tp-line);
  border-radius: var(--tp-radius-md); background: var(--tp-surface-2);
}
.tp-mock__ai {
  display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; height: 24px; padding: 0 10px; border-radius: var(--tp-radius-pill);
  background: var(--tp-accent); color: #fff; font-size: 12px; font-weight: 800;
}
.tp-mock__ai .tp-icon { width: 13px; height: 13px; }
.tp-mock__lines { display: flex; flex-direction: column; gap: 8px; }
.tp-mock__lines .tp-mock__typing { position: relative; background: #3a4866; transform-origin: left center; animation: tp-mock-type 3.6s var(--tp-ease) infinite; }
.tp-mock__typing::after { content: ""; position: absolute; top: -3px; right: -5px; width: 2px; height: 13px; border-radius: 1px; background: var(--tp-accent-hover); }
@keyframes tp-mock-type { 0% { transform: scaleX(0.08); } 60%, 100% { transform: scaleX(1); } }

/* Empty account: one call to action */
.tp-hcta {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; padding: 24px 26px;
  border: 1px solid var(--tp-line); border-radius: var(--tp-radius-xl); background: var(--tp-surface);
}
.tp-hcta__text { display: flex; flex-direction: column; gap: 4px; min-width: min(100%, 280px); flex: 1; }
.tp-hcta .tp-hsec__title { font-size: 21px; line-height: 28px; }
.tp-home__mine { padding-bottom: 24px; }

@media (max-width: 899px) {
  .tp-hero { padding-top: 24px; }
  .tp-hsec { margin-top: 48px; }
  .tp-hsec__title { font-size: 22px; line-height: 28px; }
}
@media (max-width: 599px) {
  .tp-hero__title { font-size: 34px; letter-spacing: -0.03em; }
  .tp-hero__lead { font-size: 15px; line-height: 23px; }
  .tp-hero__search { margin-top: 24px; }
  .tp-hcta .tp-button { width: 100%; }
}

/* ---------- Settings ---------- */
.tp-setsec { padding: 24px 0; border-top: 1px solid var(--tp-border); }
.tp-setsec:first-of-type { padding-top: 0; border-top: 0; }
.tp-setsec__head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.tp-setsec__head h2 { display: flex; align-items: center; gap: 8px; }
.tp-setsec__head h2 .tp-icon { color: var(--tp-text-subtle); }
.tp-setsec__lead { max-width: 68ch; margin-bottom: 16px; color: var(--tp-text-subtle); }
.tp-setsec__row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tp-setsec--danger .tp-setsec__head h2, .tp-setsec--danger .tp-setsec__head h2 .tp-icon { color: var(--tp-danger); }
.tp-setsec .tp-field { max-width: 560px; }
.tp-setsec .tp-field + .tp-field { margin-top: 16px; }
.tp-saved { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; color: var(--tp-success); font-size: 12px; font-weight: 700; opacity: 0; transition: opacity 150ms var(--tp-ease); }
.tp-saved .tp-icon { width: 14px; height: 14px; }
.tp-saved.is-shown { opacity: 1; }
.tp-saved.is-error { color: var(--tp-danger); opacity: 1; }
.tp-keyrow { display: flex; gap: 8px; }
.tp-keyrow .tp-input { flex: 1; min-width: 0; font-family: var(--tp-font-mono); }
.tp-length { display: flex; align-items: center; gap: 12px; }
.tp-length output { min-width: 56px; color: var(--tp-text-strong); font-weight: 800; text-align: right; }
.tp-stats { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.tp-about { margin-top: 24px; color: var(--tp-text-subtlest); font-size: 12px; }
/* Compact settings page: account line, language select, look chips, folded « More settings ». */
.tp-settings .tp-setsec { padding: 20px 0; }
.tp-settings .tp-setsec__head { margin-bottom: 12px; }
.tp-set-account { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.tp-set-account__name { margin: 0; font-weight: 700; font-size: 16px; color: var(--tp-text-strong); }
.tp-set-account__mail { margin: 2px 0 0; color: var(--tp-text-subtle); }
.tp-set-lang { width: auto; min-width: 220px; max-width: 100%; }
/* Settings › Appearance: accent colour, one row of round swatches (name on hover / aria-label, the chosen one ticked) */
.tp-set-accent { margin: 0; padding: 0; border: 0; min-width: 0; }
.tp-set-accent__legend { margin: 0 0 10px; padding: 0; color: var(--tp-text-subtle); font-size: 14px; }
.tp-set-accent__row { display: flex; flex-wrap: wrap; gap: 12px; }
.tp-set-accent__opt { position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; }
.tp-set-accent__opt input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; margin: 0; cursor: pointer; }
.tp-set-accent__dot {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--sw);
  color: #0f0f0f; box-shadow: 0 0 0 2px var(--tp-bg), 0 0 0 2px transparent; transition: box-shadow 140ms var(--tp-ease), transform 140ms var(--tp-ease);
  pointer-events: none;
}
.tp-set-accent__dot .tp-icon { width: 18px; height: 18px; stroke-width: 3; opacity: 0; }
.tp-set-accent__opt:hover .tp-set-accent__dot { transform: scale(1.08); }
.tp-set-accent__opt:has(input:checked) .tp-set-accent__dot { box-shadow: 0 0 0 2px var(--tp-bg), 0 0 0 4px var(--tp-text-strong); }
.tp-set-accent__opt:has(input:checked) .tp-set-accent__dot .tp-icon { opacity: 1; }
.tp-set-accent__opt:has(input:focus-visible) { outline: 2px solid var(--tp-text-strong); outline-offset: 2px; }
.tp-settings .tp-setmore { padding-bottom: 8px; border-top: 1px solid var(--tp-border); }
.tp-setmore__sum { display: flex; align-items: center; gap: 8px; list-style: none; cursor: pointer; }
.tp-setmore__sum::-webkit-details-marker { display: none; }
.tp-setmore__sum h2 { display: flex; align-items: center; gap: 8px; margin: 0; }
.tp-setmore__sum h2 .tp-icon { color: var(--tp-text-subtle); }
.tp-setmore__sum > .tp-icon { margin-left: auto; color: var(--tp-text-subtle); transition: transform 150ms var(--tp-ease); }
.tp-setmore[open] > .tp-setmore__sum > .tp-icon { transform: rotate(180deg); }
.tp-setmore__item { padding: 16px 0; border-top: 1px solid var(--tp-border); }
.tp-setmore__item:first-of-type { margin-top: 16px; }
.tp-setmore__label { margin: 0 0 10px; color: var(--tp-text-strong); font-weight: 700; }
.tp-setmore .tp-field { max-width: 560px; }
.tp-set-assets + .tp-set-assets { margin-top: 14px; }
.tp-set-assets__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; margin-top: 8px; }
.tp-set-asset { margin: 0; min-width: 0; }
.tp-set-asset__view { display: block; width: 100%; aspect-ratio: 1 / 1; padding: 0; border: 0; border-radius: 12px; overflow: hidden; background: var(--tp-surface-3); cursor: zoom-in; }
.tp-set-asset__view img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tp-set-asset figcaption { display: flex; align-items: center; gap: 4px; margin-top: 4px; font-size: 12px; color: var(--tp-text-subtle); }
.tp-set-asset figcaption > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-set-asset__progress { display: grid; place-items: center; aspect-ratio: 1 / 1; border-radius: 12px; background: var(--tp-surface-2); padding: 10px; }
.tp-set-meter { height: 8px; border-radius: 999px; background: var(--tp-surface-3); overflow: hidden; }
.tp-set-meter > span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--tp-accent); transition: width 120ms linear; }
.tp-setmore .tp-saved { margin-left: 6px; }
.tp-set-assets__queue { margin: 6px 0 0; }
/* Settings › API key: window provider -> key -> model */
.tp-llm-head { display: flex; align-items: center; gap: 8px; min-height: 32px; margin-bottom: 14px; }
.tp-llm-head__name { color: var(--tp-text-strong); font-weight: 700; }
.tp-llm-steps { display: flex; gap: 4px; margin: 0 0 0 auto; padding: 0; list-style: none; }
.tp-llm-steps li { width: 18px; height: 4px; border-radius: 999px; background: var(--tp-surface-3); }
.tp-llm-steps li.is-done { background: var(--tp-text-subtle); }
.tp-llm-steps li.is-on { background: var(--tp-text-strong); }
.tp-llm-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.tp-llm-tile {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; min-height: 60px; padding: 10px 14px;
  border: 1px solid var(--tp-border); border-radius: 12px; background: var(--tp-surface-2); color: var(--tp-text-strong); text-align: left; cursor: pointer;
  transition: background 120ms var(--tp-ease), border-color 120ms var(--tp-ease);
}
.tp-llm-tile:hover { background: var(--tp-surface-3); }
.tp-llm-tile:focus-visible { outline: 2px solid var(--tp-text-strong); outline-offset: 2px; }
.tp-llm-tile.is-current { border-color: var(--tp-text-strong); }
.tp-llm-tile__name { font-weight: 700; font-size: 15px; }
.tp-llm-tile__sub { min-height: 1em; color: var(--tp-text-subtle); font-size: 12px; }
.tp-llm-dialog .tp-select { width: 100%; }
@media (max-width: 359px) { .tp-llm-tiles { grid-template-columns: 1fr; } }
@media (max-width: 599px) { .tp-keyrow { flex-wrap: wrap; } .tp-keyrow .tp-input { flex-basis: 100%; } }

/* ---------- Files: icons, drop zone ---------- */
.tp-fileicon {
  --tp-fi: var(--tp-gray-text); --tp-fi-bg: var(--tp-gray-bg);
  display: inline-grid; place-items: center; width: 36px; height: 36px; flex: none; border: 1px solid var(--tp-line); border-radius: var(--tp-radius-sm);
  background: var(--tp-fi-bg); color: var(--tp-fi);
}
.tp-fileicon .tp-icon { width: 18px; height: 18px; }
.tp-fileicon--sm { width: 28px; height: 28px; border-radius: var(--tp-radius-xs); }
.tp-fileicon--sm .tp-icon { width: 15px; height: 15px; }
.tp-fileicon--lg { width: 64px; height: 64px; border-radius: var(--tp-radius-lg); box-shadow: var(--tp-shadow-pop); }
.tp-fileicon--lg .tp-icon { width: 30px; height: 30px; }
.tp-fileicon--image { --tp-fi: var(--tp-mint); --tp-fi-bg: var(--tp-mint-bg); }
.tp-fileicon--video { --tp-fi: var(--tp-coral); --tp-fi-bg: var(--tp-coral-bg); }
.tp-fileicon--audio { --tp-fi: var(--tp-purple-text); --tp-fi-bg: var(--tp-purple-bg); }
.tp-fileicon--pdf { --tp-fi: var(--tp-red-text); --tp-fi-bg: var(--tp-red-bg); }
.tp-fileicon--doc { --tp-fi: var(--tp-blue-text); --tp-fi-bg: var(--tp-blue-bg); }
.tp-fileicon--sheet { --tp-fi: var(--tp-green-text); --tp-fi-bg: var(--tp-green-bg); }
.tp-fileicon--slides { --tp-fi: var(--tp-orange-text); --tp-fi-bg: var(--tp-orange-bg); }
.tp-fileicon--archive { --tp-fi: var(--tp-sun-text); --tp-fi-bg: var(--tp-sun-bg); }
.tp-fileicon--text { --tp-fi: var(--tp-sky-text); --tp-fi-bg: var(--tp-sky-bg); }
.tp-fileicon--link { --tp-fi: var(--tp-accent-hover); --tp-fi-bg: var(--tp-selected); }
.tp-dropzone.is-dragover::after {
  content: attr(data-drop-label); position: absolute; inset: 6px; z-index: 60; display: grid; place-items: center; padding: 16px;
  border: 2px dashed var(--tp-mint); border-radius: var(--tp-radius-lg); background: #123f30e6; color: var(--tp-mint-text);
  font-family: var(--tp-font); font-size: 18px; font-weight: 800; text-align: center; pointer-events: none;
  animation: tp-pop-in 200ms var(--tp-spring);
}

/* ---------- Lightbox ---------- */
.tp-modal--lightbox { padding: 0; }
.tp-modal--lightbox .tp-modal__backdrop { background: #07090cfa; }
.tp-modal--lightbox .tp-modal__dialog {
  max-width: none; width: 100%; height: 100%; max-height: none; margin: 0; border-radius: 0; background: transparent; box-shadow: none;
  animation: tp-fade 200ms var(--tp-ease) both;
}
.tp-modal--lightbox .tp-modal__head { display: none; }
.tp-modal--lightbox .tp-modal__body { display: flex; padding: 0; overflow: hidden; }
.tp-lb { position: relative; display: flex; flex-direction: column; width: 100%; height: 100%; min-height: 0; }
.tp-lb__bar { display: flex; align-items: center; gap: 12px; flex: none; min-height: 60px; padding: 10px 12px 10px 18px; color: var(--tp-text-strong); }
.tp-lb__info { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.tp-lb__titles { display: flex; flex-direction: column; min-width: 0; }
.tp-lb__name { overflow: hidden; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.tp-lb__meta { color: var(--tp-text-subtle); font-size: 12px; }
.tp-lb__actions { display: flex; align-items: center; gap: 8px; flex: none; }
.tp-lb__close { color: var(--tp-text-strong); }
.tp-lb__stage { position: relative; display: grid; place-items: center; flex: 1; min-height: 0; padding: 0 64px 24px; overflow: auto; }
.tp-lb__stage > * { animation: tp-spring-in 300ms var(--tp-spring) both; }
.tp-lb__img { max-width: 100%; max-height: 100%; border: 1px solid var(--tp-line); border-radius: var(--tp-radius); background: #070a10; box-shadow: var(--tp-shadow-pop-lg); object-fit: contain; cursor: zoom-in; }
.tp-lb__stage.is-zoomed { place-items: start center; }
.tp-lb__stage.is-zoomed .tp-lb__img { max-width: none; max-height: none; cursor: zoom-out; }
.tp-lb__video { width: min(100%, 1280px); max-height: 100%; border: 1px solid var(--tp-line); border-radius: var(--tp-radius); background: #000; box-shadow: var(--tp-shadow-pop-lg); }
.tp-lb__pdf { width: min(100%, 980px); height: 100%; border: 1px solid var(--tp-line); border-radius: var(--tp-radius); background: #fff; }
.tp-lb__file {
  display: flex; flex-direction: column; align-items: center; gap: 12px; max-width: 420px; padding: 28px 24px; border: 1px solid var(--tp-line);
  border-radius: var(--tp-radius-xl); background: var(--tp-surface-2); box-shadow: var(--tp-shadow-pop-lg); text-align: center;
}
.tp-lb__file h3 { font-family: var(--tp-font); font-size: 18px; font-weight: 800; overflow-wrap: anywhere; }
.tp-lb__file p { color: var(--tp-text-subtle); overflow-wrap: anywhere; }
.tp-lb__file audio { width: 100%; }
.tp-lb__nav {
  position: absolute; top: 50%; z-index: 3; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; margin-top: -22px;
  border: 1px solid var(--tp-line); border-radius: 50%; background: var(--tp-surface-3); color: var(--tp-text-strong); box-shadow: var(--tp-shadow-pop);
  transition: transform 200ms var(--tp-spring), background-color var(--tp-dur) var(--tp-ease);
}
.tp-lb__nav:hover { background: var(--tp-surface-3-hover); }
.tp-lb__nav:active { transform: scale(0.94); }
.tp-lb__nav .tp-icon { width: 22px; height: 22px; }
.tp-lb__nav--prev { left: 12px; }
.tp-lb__nav--next { right: 12px; }
@media (max-width: 599px) {
  .tp-lb__bar { flex-wrap: wrap; padding: 8px 8px 8px 12px; }
  .tp-lb__actions .tp-button span { display: none; }
  .tp-lb__stage { padding: 0 8px 72px; }
  .tp-lb__nav { top: auto; bottom: 12px; margin-top: 0; }
}

/* ---------- Upsell (Pro) ---------- */
.tp-upsell { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.tp-upsell__art { width: 104px; height: auto; margin-top: -4px; animation: tp-float 3s ease-in-out infinite; }
.tp-upsell__badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 1px 10px; border: 1px solid var(--tp-sun-edge); border-radius: 999px;
  background: var(--tp-sun-bg); color: var(--tp-sun-text); font-family: var(--tp-font); font-size: 12px; font-weight: 800;
}
.tp-upsell__badge .tp-icon { width: 13px; height: 13px; color: var(--tp-sun); }
.tp-upsell__title { font-family: var(--tp-font-display); font-size: 19px; line-height: 25px; font-weight: 600; }
.tp-upsell__text { color: var(--tp-text-subtle); }
.tp-upsell__list { display: flex; flex-direction: column; gap: 6px; width: 100%; margin: 6px 0 2px; padding: 12px; border: 1px solid var(--tp-line); border-radius: var(--tp-radius); background: var(--tp-bg-sunken); list-style: none; text-align: left; }
.tp-upsell__list li { display: flex; align-items: flex-start; gap: 8px; color: var(--tp-text); font-size: 13px; line-height: 18px; }
.tp-upsell__list li.is-key { color: var(--tp-text-strong); font-weight: 800; }
.tp-upsell__list .tp-icon { width: 15px; height: 15px; margin-top: 1px; color: var(--tp-mint); }
.tp-upsell__actions { display: flex; flex-direction: column; gap: 6px; width: 100%; margin-top: 6px; }

/* ---------- Confetti ---------- */
.tp-confetti { position: fixed; inset: 0; z-index: 700; width: 100%; height: 100%; pointer-events: none; }

/* ---------- Import (first sign-in) ---------- */
.tp-import { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.tp-import__art { width: 140px; height: auto; }
.tp-import__counts { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; list-style: none; }
.tp-import .tp-modal__actions { align-self: stretch; }

/* ---------- Account screens ---------- */
/* Only the form, centred (no column presenting the site). */
.tp-auth { display: grid; grid-template-columns: minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
.tp-auth__main { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; min-width: 0; padding: 32px 24px; }
.tp-auth__brand { font-size: 24px; }
.tp-auth__brand .tp-logo { width: 34px; height: 34px; }
.tp-auth__card {
  width: 100%; max-width: 420px; padding: 26px 24px 24px; border: 1px solid var(--tp-line); border-radius: var(--tp-radius-xl);
  background: var(--tp-surface); box-shadow: var(--tp-shadow-pop-lg);
}
.tp-auth__head { margin-bottom: 18px; }
.tp-auth__head h1 { font-size: 26px; line-height: 32px; }
.tp-auth__head p { margin-top: 6px; color: var(--tp-text-subtle); }
.tp-auth__form { display: flex; flex-direction: column; gap: 14px; }
.tp-auth__form .tp-field + .tp-field { margin-top: 0; }
.tp-auth__row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tp-auth__switch { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--tp-border); color: var(--tp-text-subtle); text-align: center; }
.tp-auth__foot { max-width: 420px; color: var(--tp-text-subtlest); font-size: 12px; text-align: center; }
.tp-auth__done { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.tp-auth__done img { width: 120px; height: auto; }
.tp-auth__tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 16px; padding: 4px; border: 1px solid var(--tp-line); border-radius: var(--tp-radius); background: var(--tp-bg-sunken); }
.tp-auth__tab {
  min-height: 34px; border: 1px solid transparent; border-radius: var(--tp-radius-sm); background: none; color: var(--tp-text-subtle);
  font-family: var(--tp-font); font-weight: 700; transition: background-color var(--tp-dur) var(--tp-ease), color var(--tp-dur) var(--tp-ease);
}
.tp-auth__tab:hover { color: var(--tp-text-strong); }
.tp-auth__tab[aria-selected="true"] { border-color: var(--tp-line); background: var(--tp-surface-3); color: var(--tp-text-strong); box-shadow: var(--tp-shadow-raised); }
.tp-auth__swap { animation: tp-rise 260ms var(--tp-ease-out); }
@media (max-width: 959px) {
  .tp-auth__main { justify-content: flex-start; padding: 28px 16px 24px; }
}
@media (max-width: 420px) { .tp-auth__card { padding: 20px 16px 18px; } }

/* Password field with show / hide */
.tp-pass { position: relative; display: flex; }
.tp-pass .tp-input { padding-right: 46px; }
.tp-pass__toggle { position: absolute; top: 50%; right: 5px; transform: translateY(-50%); }
.tp-pass__toggle:active { transform: translateY(-50%) scale(0.9); }
.tp-pass__caps { color: var(--tp-sun-text); font-size: 12px; font-weight: 700; }

/* Invitation card */
.tp-invite { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.tp-invite__board {
  display: grid; place-items: center; width: 72px; height: 52px; border: 1px solid var(--tp-line); border-radius: var(--tp-radius);
  background: var(--tp-accent); color: #fff; box-shadow: var(--tp-shadow-pop);
}
.tp-invite__board .tp-icon { width: 26px; height: 26px; }
.tp-invite__title { font-family: var(--tp-font-display); font-size: 20px; line-height: 26px; font-weight: 600; overflow-wrap: anywhere; }
.tp-invite__role { margin-top: -2px; }
.tp-invite__actions { display: flex; flex-direction: column; gap: 8px; align-self: stretch; margin-top: 6px; }

/* ---------- « Filtres et vues » panel (ui.filtersDialog) ----------
   Bar : .tp-vfbar (= .tp-filterbar) + .tp-vfbar__sort (« Trier par »). Modal xl : .tp-vf > .tp-vf__cols > .tp-vf__main
   (.tp-vf__ranges > .tp-vf-range ; .tp-vf-dates > .tp-vf-pills) + .tp-vf__side (.tp-vf-card : .tp-vf-seg, .tp-vf-stepper)
   + .tp-vf__foot. Grids : .tp-vgrid--thumbs (compact thumbnails, title always under the image),
   .tp-vgrid--cols (--tp-cols / --tp-cols-md / --tp-cols-sm set by ui.applyGridDisplay). */
.tp-vfbar__sort { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; color: var(--tp-text-subtle); font-size: 13px; font-weight: 700; white-space: nowrap; }
.tp-vfbar__sort .tp-select { width: auto; min-width: 128px; }
.tp-vf-dialog { background: #0d1320; }
.tp-vf { display: flex; flex-direction: column; gap: 18px; }
.tp-vf__sub { margin-top: -6px; color: var(--tp-text-subtle); }
.tp-vf__cols { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.tp-vf__side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.tp-vf-card { display: flex; flex-direction: column; gap: 12px; min-width: 0; padding: 18px; border: 1px solid var(--tp-line); border-radius: var(--tp-radius-lg); background: var(--tp-surface); }
.tp-vf-card__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.tp-vf-card__title { color: var(--tp-text-strong); font-size: 16px; line-height: 22px; font-weight: 800; }
.tp-vf-card__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.tp-vf-card__label { color: var(--tp-text-subtle); font-size: 13px; line-height: 18px; font-weight: 800; }
.tp-vf__reset:disabled { color: var(--tp-text-subtlest); text-decoration: none; cursor: default; }
.tp-vf__ranges { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 22px; }
.tp-vf-range { --lo: 0%; --hi: 100%; display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 12px 14px 14px; border: 1px solid var(--tp-line); border-radius: var(--tp-radius-md); background: var(--tp-surface-2); }
.tp-vf-range__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tp-vf-range__title { color: var(--tp-text-subtle); font-weight: 800; }
.tp-vf-range.is-on .tp-vf-range__title { color: var(--tp-text-strong); }
.tp-vf-range__toggle {
  display: grid; place-items: center; width: 26px; height: 26px; flex: none; padding: 0; border: 1px solid var(--tp-border-input);
  border-radius: var(--tp-radius-pill); background: var(--tp-surface-3); color: var(--tp-text-strong);
  transition: background-color var(--tp-dur) var(--tp-ease), transform 120ms var(--tp-ease);
}
.tp-vf-range__toggle:hover { background: var(--tp-surface-3-hover); }
.tp-vf-range__toggle[aria-pressed="false"] { border-color: var(--tp-accent-edge); background: var(--tp-accent); color: #fff; }
.tp-vf-range__toggle .tp-icon { width: 14px; height: 14px; }
.tp-vf-range__track { position: relative; height: 26px; }
.tp-vf-range__rail, .tp-vf-range__fill { position: absolute; top: 50%; height: 4px; margin-top: -2px; border-radius: 4px; pointer-events: none; }
.tp-vf-range__rail { left: 0; right: 0; background: var(--tp-surface-3); }
.tp-vf-range__fill { left: var(--lo); right: calc(100% - var(--hi)); background: var(--tp-text-subtlest); }
.tp-vf-range.is-on .tp-vf-range__fill { background: var(--tp-accent); }
.tp-vf-range__track input[type="range"] {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; background: none; pointer-events: none;
  -webkit-appearance: none; appearance: none;
}
.tp-vf-range__track input[type="range"]::-webkit-slider-runnable-track { background: none; border: 0; }
.tp-vf-range__track input[type="range"]::-moz-range-track { background: none; border: 0; }
.tp-vf-range__track input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 18px; height: 18px; border: 2px solid var(--tp-bg); border-radius: 50%;
  background: var(--tp-text-subtle); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5); cursor: grab; pointer-events: auto;
}
.tp-vf-range__track input[type="range"]::-moz-range-thumb {
  width: 14px; height: 14px; border: 2px solid var(--tp-bg); border-radius: 50%; background: var(--tp-text-subtle); cursor: grab; pointer-events: auto;
}
.tp-vf-range.is-on .tp-vf-range__track input[type="range"]::-webkit-slider-thumb { background: #fff; }
.tp-vf-range.is-on .tp-vf-range__track input[type="range"]::-moz-range-thumb { background: #fff; }
.tp-vf-range__track input[type="range"]:focus-visible { outline: none; }
.tp-vf-range__track input[type="range"]:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--tp-accent-hover); outline-offset: 2px; }
.tp-vf-range__vals { display: flex; justify-content: space-between; gap: 8px; }
.tp-vf-pill {
  min-width: 64px; padding: 3px 10px; border: 1px solid var(--tp-border-input); border-radius: var(--tp-radius-pill);
  background: var(--tp-field-bg); color: var(--tp-text-subtle); font-size: 13px; line-height: 18px; font-weight: 700;
  text-align: center; font-variant-numeric: tabular-nums;
}
.tp-vf-range.is-on .tp-vf-pill { color: var(--tp-text-strong); }
.tp-vf-dates { min-width: 0; margin: 4px 0 0; padding: 0; border: 0; }
.tp-vf-dates legend { margin-bottom: 10px; }
.tp-vf-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.tp-vf-pillbtn, .tp-vf-seg__btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 32px; padding: 5px 14px;
  border: 1px solid var(--tp-border-input); border-radius: var(--tp-radius-pill); background: var(--tp-surface-3); color: var(--tp-text);
  font-size: 13px; font-weight: 700; line-height: 18px; white-space: nowrap;
  transition: background-color var(--tp-dur) var(--tp-ease), color var(--tp-dur) var(--tp-ease), border-color var(--tp-dur) var(--tp-ease);
}
.tp-vf-pillbtn:hover, .tp-vf-seg__btn:hover { background: var(--tp-surface-3-hover); color: var(--tp-text-strong); }
.tp-vf-pillbtn[aria-pressed="true"], .tp-vf-seg__btn[aria-pressed="true"] { border-color: var(--tp-accent-edge); background: var(--tp-accent); color: #fff; }
.tp-vf-seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; padding: 3px; border: 1px solid var(--tp-line); border-radius: var(--tp-radius-pill); background: var(--tp-field-bg); }
.tp-vf-seg__btn { border-color: transparent; background: transparent; min-width: 0; }
/* Segmented choices (view, type): white when active, like the reference panel */
.tp-vf-seg__btn[aria-pressed="true"] { border-color: #fff; background: #fff; color: #0b0f17; }
.tp-vf-seg__btn[aria-pressed="true"]:hover { background: #e8ecf3; color: #0b0f17; }
.tp-vf-seg__btn .tp-icon { width: 15px; height: 15px; flex: none; }
.tp-vf-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.tp-vf-stepper { display: inline-flex; align-items: center; gap: 2px; margin-left: auto; padding: 3px; border: 1px solid var(--tp-line); border-radius: var(--tp-radius-pill); background: var(--tp-field-bg); }
.tp-vf-stepper__btn { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; background: var(--tp-surface-3); color: var(--tp-text-strong); }
.tp-vf-stepper__btn:hover:not(:disabled) { background: var(--tp-surface-3-hover); }
.tp-vf-stepper__btn:disabled { opacity: 0.4; cursor: default; }
.tp-vf-stepper__btn .tp-icon { width: 14px; height: 14px; }
.tp-vf-stepper__val { min-width: 44px; color: var(--tp-text-strong); font-weight: 800; text-align: center; font-variant-numeric: tabular-nums; }
.tp-vf__auto { font-size: 12px; }
.tp-vf-checks { display: flex; flex-direction: column; max-height: 220px; overflow-y: auto; }
.tp-vf__foot { display: flex; justify-content: flex-end; }
.tp-vf__foot .tp-button { min-height: 40px; padding: 8px 20px; }
.tp-vf-saveform { display: flex; flex-direction: column; gap: 6px; }
.tp-vf-saveform__row { display: flex; gap: 6px; }
.tp-vf-saveform__row .tp-input { flex: 1; min-width: 0; }
.tp-vf-savedlist { display: flex; flex-direction: column; gap: 2px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--tp-border); list-style: none; }
.tp-vf-savedlist li { display: flex; align-items: center; gap: 4px; }
.tp-vf-savedlist__apply {
  display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; padding: 6px 8px; border: 0; border-radius: var(--tp-radius-sm);
  background: none; color: var(--tp-text-strong); font-weight: 700; text-align: left;
}
.tp-vf-savedlist__apply span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-vf-savedlist__apply:hover { background: var(--tp-hover); }
.tp-vf-savedlist__empty { margin-top: 12px; color: var(--tp-text-subtlest); font-size: 13px; }
.tp-vf-note { color: var(--tp-text-subtlest); font-size: 12px; font-weight: 600; }
@media (max-width: 899px) {
  .tp-vf__cols { grid-template-columns: minmax(0, 1fr); }
  .tp-vf__foot { position: sticky; bottom: -16px; z-index: 2; margin: 0 -16px -16px; padding: 12px 16px; border-top: 1px solid var(--tp-line); background: #0d1320; }
  .tp-vf__foot .tp-button { width: 100%; }
  /* Full-screen panel: toasts (« Filtre chargé : clique sur Appliquer… ») sit above the sticky Apply button. */
  body:has(.tp-vf-dialog) .tp-toasts { bottom: 84px; }
  .tp-vfbar__sort { margin-left: 0; }
}
@media (max-width: 560px) {
  .tp-vf__ranges { grid-template-columns: minmax(0, 1fr); }
  .tp-vf-card { padding: 14px; }
  .tp-vf-card__actions { width: 100%; justify-content: space-between; }
}

/* Fixed number of columns (Colonnes) : N from 1100 px, 4 at most on tablets, 2 at most on phones. */
.tp-vgrid.tp-vgrid--cols { grid-template-columns: repeat(var(--tp-cols-sm, 2), minmax(0, 1fr)); gap: 24px 12px; }
@media (min-width: 600px) { .tp-vgrid.tp-vgrid--cols { grid-template-columns: repeat(var(--tp-cols-md, 3), minmax(0, 1fr)); gap: 32px 16px; } }
@media (min-width: 1100px) { .tp-vgrid.tp-vgrid--cols { grid-template-columns: repeat(var(--tp-cols, 5), minmax(0, 1fr)); } }
.tp-vgrid.tp-vgrid--thumbs.tp-vgrid--cols { row-gap: 20px; }
/* « Miniatures » : a compact grid, but the title stays visible UNDER the thumbnail, never on top of it (YouTube's
   compliance guide: thumbnail and title visible and unmodified); only the channel, views and LeapViews' score (when
   allowed) are kept in the tags. */
.tp-vgrid--thumbs:not(.tp-vgrid--cols) { grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 12px; }
.tp-vgrid--thumbs.tp-vgrid--shorts:not(.tp-vgrid--cols) { grid-template-columns: repeat(auto-fill, minmax(min(100%, 140px), 1fr)); }
.tp-vgrid--thumbs .tp-vcard { border-radius: var(--tp-radius); }
.tp-vgrid--thumbs .tp-vcard__title a { -webkit-line-clamp: 2; }
.tp-vgrid--thumbs .tp-vcard__tags .tp-tag--dur { display: none; }
.tp-vgrid--thumbs .tp-vcard__dur { bottom: 7px; }
.tp-vgrid--thumbs .tp-vcard__extra { display: none; }
/* Narrow thumbnails (Colonnes: 2 on a phone, many on a computer): one line of title, smaller tags. */
.tp-vgrid--thumbs .tp-vcard { container: tp-thumb / inline-size; }
@container tp-thumb (max-width: 220px) {
  .tp-vgrid--thumbs .tp-vcard__title a { -webkit-line-clamp: 1; }
}
@media (hover: none) {
  @container tp-thumb (max-width: 220px) {
    .tp-vgrid--thumbs .tp-vcard__actions { display: none; }
    .tp-vgrid--thumbs .tp-vcard__check { top: 6px; left: 6px; }
    .tp-vgrid--thumbs .tp-vcard__box { width: 22px; height: 22px; }
  }
}
/* « Miniatures » : wide cards (≥ 261 px, 4 columns on a laptop) keep the YouTube card as is (avatar 36 px, title 16/22,
   channel and « vues • date » 14/20). Narrower cards only: no avatar, smaller text, smaller ⋮. */
@container tp-thumb (max-width: 260px) {
  .tp-vgrid--thumbs .tp-vcard__body { gap: 6px; padding: 8px 8px 10px; }
  .tp-vgrid--thumbs .tp-vcard__title { min-height: 0; font-size: 13px; line-height: 18px; }
  .tp-vgrid--thumbs .tp-vcard__tags { gap: 4px; }
  .tp-vgrid--thumbs .tp-vcard__tags .tp-tag { height: 22px; gap: 4px; padding: 0 7px; font-size: 12px; line-height: 22px; }
  .tp-vgrid--thumbs .tp-vcard__tags .tp-tag--score { height: 22px; padding: 0 7px; font-size: 12px; line-height: 20px; }
  .tp-vgrid--thumbs .tp-vcard__avatar { display: none; }
  .tp-vgrid--thumbs .tp-vcard__meta { padding-right: 26px; }
  .tp-vgrid--thumbs .tp-vcard:not(.is-compact) .tp-vcard__title { margin-bottom: 2px; font-size: 13px; line-height: 18px; }
  .tp-vgrid--thumbs .tp-vcard__channel,
  .tp-vgrid--thumbs .tp-vcard__tags.tp-vcard__line,
  .tp-vgrid--thumbs .tp-vcard .tp-vcard__line > .tp-tag:not(.tp-tag--score):not([data-action]) { font-size: 12px; line-height: 16px; }
  .tp-vgrid--thumbs .tp-vcard .tp-vcard__tags.tp-vcard__line { gap: 2px 8px; }
  .tp-vgrid--thumbs .tp-vcard .tp-vcard__tags.tp-vcard__line > .tp-tag.tp-tag--score { height: 18px; padding: 0 5px; font-size: 12px; line-height: 18px; }
  .tp-vgrid--thumbs .tp-vcard .tp-vcard__tags.tp-vcard__line > .tp-tag[data-action] { height: 18px; font-size: 12px; line-height: 18px; }
  .tp-vgrid--thumbs .tp-vcard__menu { top: 0; width: 32px; height: 32px; }
  .tp-vgrid--thumbs .tp-vcard__menu .tp-icon { width: 18px; height: 18px; }
}
/* Tiny thumbnails (2 columns on a 320 px phone, 8 columns on a laptop): smaller title and tags. */
@container tp-thumb (max-width: 150px) {
  .tp-vgrid--thumbs .tp-vcard__body { gap: 4px; padding: 6px; }
  .tp-vgrid--thumbs .tp-vcard__title { font-size: 12px; line-height: 16px; }
  .tp-vgrid--thumbs .tp-vcard__tags .tp-tag--score, .tp-vgrid--thumbs .tp-vcard__tags .tp-tag--views { height: 20px; padding: 0 6px; font-size: 11px; line-height: 18px; }
  .tp-vgrid--thumbs .tp-vcard:not(.is-compact) .tp-vcard__title { font-size: 12px; line-height: 16px; }
}

/* ⋮ menu of a video card: no header (the title stays for screen readers), tight like a YouTube menu */
.tp-pop--vmenu .tp-pop__head { position: absolute; width: 1px; height: 1px; min-height: 0; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tp-pop--vmenu .tp-pop__body { padding: 6px 0; }
.tp-pop--vmenu .tp-menu { margin: 0; gap: 0; }
.tp-pop--vmenu .tp-menu__item { min-height: 34px; padding: 0 14px; gap: 12px; border-radius: 0; }
.tp-pop--vmenu .tp-menu__sep { margin: 4px 0; }

/* « Continuer avec Google » (views/auth.js): Google's own look (white, multicolour G, dark text), then « ou »;
   « Créer un compte » as a full-width button under the login form. */
.tp-auth__google {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  border: 1px solid #747775; background: #ffffff; color: #1f1f1f; font-weight: 500; text-decoration: none;
}
.tp-auth__google:hover { background: #f2f2f2; color: #1f1f1f; text-decoration: none; }
.tp-auth__google:focus-visible { outline: 2px solid var(--tp-accent); outline-offset: 2px; }
.tp-auth__g { flex: none; }
.tp-auth__google-terms { margin: 8px 0 0; color: var(--tp-text-subtle); font-size: 12px; line-height: 17px; }
.tp-auth__google-terms a { color: var(--tp-text); text-decoration: underline; }
.tp-auth__or { display: flex; align-items: center; gap: 12px; margin: 16px 0; color: var(--tp-text-subtlest); font-size: 13px; }
.tp-auth__or::before, .tp-auth__or::after { content: ""; flex: 1; border-top: 1px solid var(--tp-line); }
.tp-auth__create { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--tp-line); color: var(--tp-text-subtle); font-size: 14px; text-align: center; }

/* ---------- Accueil : haut centré et animé (04/11/2026) ----------
   Halo bleu flou qui respire derrière le titre et la barre (deux nappes floutées, sans bande ni bord visible), titre /
   barre / puces qui montent à l'arrivée, lueur bleue qui pulse autour du champ de recherche seul (champ + loupe, pas le
   bouton Aléatoire ; plus forte au focus). Rien ne bouge si « réduire les animations ». */
.tp-home > .tp-hero { position: relative; isolation: isolate; }
.tp-home > .tp-hero::before, .tp-home > .tp-hero::after {
  content: ""; position: absolute; z-index: -1; left: 50%; border-radius: 50%; pointer-events: none; filter: blur(60px);
}
.tp-home > .tp-hero::before {
  top: -10px; width: min(820px, 90%); height: 170px; background: rgba(47, 98, 240, 0.32);
  transform: translateX(-50%); animation: tp-hero-glow 8s ease-in-out infinite alternate;
}
.tp-home > .tp-hero::after {
  top: 50px; width: min(460px, 60%); height: 110px; background: rgba(110, 150, 255, 0.22);
  transform: translateX(-50%); animation: tp-hero-glow2 6s ease-in-out infinite alternate;
}
@keyframes tp-hero-glow { from { opacity: 0.55; transform: translateX(-52%) scale(0.92); } to { opacity: 0.95; transform: translateX(-48%) scale(1.06); } }
@keyframes tp-hero-glow2 { from { opacity: 0.4; transform: translateX(-46%) scale(1); } to { opacity: 0.85; transform: translateX(-54%) scale(1.12); } }
.tp-home > .tp-hero .tp-hero__title { animation: tp-hero-in 620ms var(--tp-ease-out) both; }
.tp-home > .tp-hero .tp-hero__search { animation: tp-hero-in 700ms 110ms var(--tp-ease-out) both; }
.tp-home > .tp-hero .tp-hero__chips { animation: tp-hero-in 700ms 220ms var(--tp-ease-out) both; }
@keyframes tp-hero-in { from { opacity: 0; transform: translateY(16px) scale(0.985); } }
/* La lueur suit la partie visible de la barre (champ + loupe) : un calque posé dessus, décalé de la marge de 32 px que
   la case garde au repos pour la petite loupe de gauche (DA Écran), collé au bord au focus quand cette loupe paraît. */
.tp-home > .tp-hero .tp-ytsb__host { position: relative; }
/* Champ (632 px au plus) + bouton aléatoire centrés dans la barre, donc sous le titre (avant : calés à gauche, le titre
   paraissait décalé de ~54 px vers la droite ; signalé par Nao le 23/11/2026 ; contrôle : server/tools/check-hero-center.browser.js). */
.tp-home > .tp-hero .tp-ytsb:not(.is-full) .tp-ytsb__bar { justify-content: center; }
.tp-home > .tp-hero .tp-ytsb__host::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: var(--hero-ring-left, 0px); right: 0; border-radius: 40px; pointer-events: none;
  animation: tp-hero-ring 3.6s ease-in-out 900ms infinite;
}
:root[data-da="ecran"] .tp-home > .tp-hero .tp-ytsb__host { --hero-ring-left: 32px; }
:root[data-da="ecran"] .tp-home > .tp-hero .tp-ytsb__host:focus-within { --hero-ring-left: 0px; }
.tp-home > .tp-hero .tp-ytsb__host:focus-within::after { animation: none; box-shadow: 0 0 0 1px rgba(80, 130, 255, 0.75), 0 0 26px rgba(47, 98, 240, 0.4); }
@keyframes tp-hero-ring {
  0%, 100% { box-shadow: 0 0 0 1px rgba(80, 130, 255, 0.18), 0 0 0 rgba(47, 98, 240, 0); }
  50% { box-shadow: 0 0 0 1px rgba(80, 130, 255, 0.5), 0 0 24px rgba(47, 98, 240, 0.32); }
}
@media (prefers-reduced-motion: reduce) {
  .tp-home > .tp-hero::before, .tp-home > .tp-hero::after, .tp-home > .tp-hero .tp-hero__title, .tp-home > .tp-hero .tp-hero__search,
  .tp-home > .tp-hero .tp-hero__chips, .tp-home > .tp-hero .tp-ytsb__host::after { animation: none; }
}
