/* ============================================================
   ProductivityHub — Vipro styles
   Dark par défaut, light supporté via [data-theme="light"]
   ============================================================ */

:root {
  --yt-bg: #0f0f0f;
  --yt-surface: #181818;
  --yt-surface-2: #272727;
  --yt-text: #f1f1f1;
  --yt-text-dim: #aaa;
  --yt-border: #303030;
  --yt-accent: #ffffff;
  --yt-accent-2: #e5e5e5;
  --yt-accent-text: #0f0f0f;
}

[data-theme="light"] {
  --yt-bg: #ffffff;
  --yt-surface: #f9f9f9;
  --yt-surface-2: #eeeeee;
  --yt-text: #0f0f0f;
  --yt-text-dim: #606060;
  --yt-border: #e5e5e5;
  --yt-accent: #0f0f0f;
  --yt-accent-2: #333333;
  --yt-accent-text: #ffffff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--yt-bg);
  color: var(--yt-text);
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }

/* ============ Avertissement config manquante ============ */
.yt-warning {
  background: #5a2a2a;
  color: #fff;
  padding: 10px 16px;
  font-size: 14px;
  text-align: center;
}
.yt-warning code {
  background: rgba(0,0,0,0.4);
  padding: 2px 6px;
  border-radius: 4px;
}

/* ============ Layout ============ */
.yt-app {
  display: grid;
  grid-template-columns: 240px 1fr;
  grid-template-rows: 56px 1fr;
  grid-template-areas:
    "header header"
    "sidebar main";
  min-height: 100vh;
}
.yt-app.is-nav-collapsed {
  grid-template-columns: 0 1fr;
}

/* ============ Header ============ */
.yt-header {
  grid-area: header;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 16px;
  background: var(--yt-bg);
  border-bottom: 1px solid var(--yt-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.yt-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 20px;
  color: var(--yt-text);
}
.yt-logo-mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: #fff;
  color: #000;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 17px;
}
.yt-logo i { color: #000; font-size: 26px; }

.yt-back-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 20px;
  border: 1px solid var(--yt-border);
  color: var(--yt-text);
  font-size: 14px;
  transition: background 0.2s;
}
.yt-back-btn:hover { background: var(--yt-surface-2); }
.yt-nav-toggle {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--yt-border);
  border-radius: 999px;
  background: var(--yt-bg);
  color: var(--yt-text);
  cursor: pointer;
}
.yt-nav-toggle:hover {
  background: var(--yt-surface-2);
}

#yt-search-form {
  flex: 1;
  max-width: 640px;
  margin: 0 auto;
  display: flex;
}
#yt-search-input {
  flex: 1;
  background: var(--yt-bg);
  color: var(--yt-text);
  border: 1px solid var(--yt-border);
  border-right: none;
  border-radius: 20px 0 0 20px;
  padding: 8px 16px;
  font-size: 15px;
  outline: none;
}
#yt-search-input:focus { border-color: var(--yt-accent); }
#yt-search-form button {
  background: var(--yt-surface-2);
  color: var(--yt-text);
  border: 1px solid var(--yt-border);
  border-radius: 0 20px 20px 0;
  padding: 0 20px;
  cursor: pointer;
  font-size: 16px;
}
#yt-search-form button:hover { background: var(--yt-border); }

#yt-auth-slot {
  flex-shrink: 0;
}

.yt-auth-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--yt-text-dim);
  font-size: 13px;
  white-space: nowrap;
}
.yt-auth-status-action {
  border: 1px solid var(--yt-border);
  background: var(--yt-surface);
  border-radius: 18px;
  padding: 7px 12px;
  cursor: pointer;
}
.yt-auth-status-action:hover {
  color: var(--yt-text);
  border-color: var(--yt-text-dim);
}

/* ============ Sidebar ============ */
.yt-sidebar {
  grid-area: sidebar;
  background: var(--yt-bg);
  border-right: 1px solid var(--yt-border);
  padding: 12px 0;
  overflow-y: auto;
  position: sticky;
  top: 56px;
  height: calc(100vh - 56px);
}
.yt-app.is-nav-collapsed .yt-sidebar {
  overflow: hidden;
  pointer-events: none;
  border-right: 0;
}
.yt-app.is-nav-collapsed .yt-sidebar > * {
  display: none;
}

.yt-nav-section {
  padding: 12px 16px 8px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--yt-text-dim);
  border-top: 1px solid var(--yt-border);
  margin-top: 8px;
}
.yt-nav-section:first-of-type { border-top: none; margin-top: 0; }

.yt-nav-item {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  background: transparent;
  border: none;
  color: var(--yt-text);
  font-size: 14px;
  font-weight: 500;
  padding: 10px 16px;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
}
.yt-nav-item i { width: 20px; text-align: center; font-size: 16px; }
.yt-nav-item[hidden] { display: none; }
.yt-nav-item:hover { background: var(--yt-surface-2); }
.yt-nav-item.active {
  background: var(--yt-surface-2);
  font-weight: 600;
}

/* ============ Main ============ */
.yt-main {
  grid-area: main;
  padding: 24px;
  overflow-y: auto;
  max-height: calc(100vh - 56px);
}

.yt-page-title {
  margin: 0 0 24px;
  font-size: 24px;
  font-weight: 600;
}
.yt-page-title em { font-style: normal; color: var(--yt-accent); }

.yt-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.yt-page-header .yt-page-title { margin: 0; }
.yt-page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.yt-search-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}
.yt-search-filters label {
  display: grid;
  gap: 5px;
  color: var(--yt-text-dim);
  font-size: 11px;
}
.yt-search-filters label[hidden] {
  display: none;
}
.yt-search-filters .yt-select {
  min-width: 140px;
}
.yt-filter-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -10px 0 18px;
  align-items: flex-start;
}
.yt-filter-stats[hidden] { display: none; }
.yt-filter-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid var(--yt-border);
  border-radius: 999px;
  background: var(--yt-surface);
  color: var(--yt-text-dim);
  font-size: 13px;
}
.yt-filter-stat-pill i,
.yt-filter-stat-pill strong {
  color: var(--yt-text);
}
.yt-filter-proof {
  flex-basis: 100%;
  border: 1px solid var(--yt-border);
  border-radius: 10px;
  background: var(--yt-surface);
  color: var(--yt-text-dim);
  font-size: 13px;
  overflow: hidden;
}
.yt-filter-proof summary {
  cursor: pointer;
  padding: 9px 12px;
  color: var(--yt-text);
  font-weight: 600;
}
.yt-filter-proof-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--yt-border);
}
.yt-filter-proof-row {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border-top: 1px solid var(--yt-border);
}
.yt-filter-proof-row:first-child {
  border-top: none;
}
.yt-filter-proof-row strong {
  color: var(--yt-text);
  font-weight: 600;
}
.yt-filter-proof-row small {
  color: var(--yt-text-dim);
}

/* ============ Grid de vidéos ============ */
.yt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.yt-infinite-sentinel {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--yt-text-dim);
  font-size: 14px;
}
.yt-infinite-sentinel[hidden] { display: none; }

.yt-feed-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--yt-text-dim);
  font-size: 14px;
}
.yt-feed-progress[hidden] { display: none; }

.yt-filter-note {
  color: var(--yt-text-dim);
  font-size: 13px;
  margin: 14px 0 4px;
}
.yt-filter-note[hidden] { display: none; }

.yt-card {
  background: transparent;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: opacity 0.15s;
}
.yt-card:hover { opacity: .96; }

.yt-card-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--yt-surface-2);
  border-radius: 12px;
  overflow: hidden;
}
.yt-card-thumb-link {
  position: absolute;
  inset: 0;
  display: block;
  color: inherit;
}
.yt-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  /* Empêche Edge d'afficher son bouton "recherche visuelle" au survol :
     l'image n'est plus la cible du pointeur, c'est le lien parent. */
  pointer-events: none;
}
.yt-card-duration {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(0,0,0,0.85);
  color: #fff;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 500;
}
.yt-card-actions {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.yt-card-edit {
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: rgba(0,0,0,0.78);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.yt-card-edit:hover {
  background: var(--yt-accent);
  color: var(--yt-accent-text);
}
.yt-card-remove:hover { background: #d93025; }

.yt-card-info { display: flex; flex-direction: column; gap: 4px; padding: 0 4px; }
.yt-recent-progress {
  padding: 2px 4px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 8px;
  align-items: center;
}
.yt-recent-progress-bar {
  grid-column: 1 / -1;
  display: block;
  width: 100%;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
}
.yt-recent-progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #ff2d55;
}
.yt-recent-progress-text {
  display: block;
  margin-top: 7px;
  color: var(--yt-muted);
  font-size: 12px;
  font-weight: 700;
}
.yt-recent-remove {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--yt-muted);
  cursor: pointer;
}
.yt-recent-remove:hover {
  background: rgba(255,255,255,.08);
  color: var(--yt-accent);
}
.yt-card-title {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.35;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.yt-card-channel {
  background: transparent;
  border: none;
  color: var(--yt-text-dim);
  font-size: 13px;
  padding: 0;
  cursor: pointer;
  text-align: left;
}
.yt-card-channel:hover { color: var(--yt-text); }
.yt-card-meta { font-size: 13px; color: var(--yt-text-dim); }
/* Carte video : la ligne "vues · date" est completee apres coup par
   l'hydratation des statistiques. On lui reserve sa hauteur et on interdit le
   retour a la ligne, sinon la carte grandit et decale la grille sous le
   curseur. (Cible le <div> des cartes video, pas les <p class="yt-card-meta">
   des panneaux de profils qui, eux, doivent pouvoir s'etaler.) */
div.yt-card-meta {
  min-height: 18px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.yt-keyword-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.yt-keyword-row span {
  background: var(--yt-surface-2);
  color: var(--yt-text-dim);
  font-size: 12px;
  padding: 3px 7px;
  border-radius: 999px;
}

.yt-ai-note {
  color: var(--yt-text-dim);
  background: var(--yt-surface);
  border: 1px solid var(--yt-border);
  border-radius: 10px;
  padding: 12px 14px;
  margin: -8px 0 20px;
  font-size: 14px;
}
.yt-section-title {
  margin: 28px 0 16px;
  font-size: 18px;
}
.yt-subtabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 14px;
}
.yt-subtab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--yt-border);
  background: var(--yt-surface);
  color: var(--yt-text);
  border-radius: 999px;
  padding: 9px 14px;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.yt-subtab span {
  min-width: 24px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: var(--yt-surface-2);
  color: var(--yt-text-dim);
  font-size: 12px;
  font-weight: 700;
}
.yt-subtab:hover {
  background: var(--yt-surface-2);
}
.yt-subtab.active {
  background: var(--yt-accent);
  border-color: var(--yt-accent);
  color: var(--yt-accent-text);
}
.yt-subtab.active span {
  background: var(--yt-accent-text);
  color: var(--yt-accent);
}
.yt-section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.yt-section-header h2 {
  margin: 0;
  font-size: 18px;
}
.yt-section-header p {
  margin: 5px 0 0;
  color: var(--yt-text-dim);
  font-size: 13px;
  line-height: 1.4;
}
.yt-blocked-panel {
  background: var(--yt-surface);
  border: 1px solid var(--yt-border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 22px;
  overflow-anchor: none;
}
.yt-block-form {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}
.yt-block-form input {
  flex: 1;
  min-width: 180px;
  background: var(--yt-bg);
  color: var(--yt-text);
  border: 1px solid var(--yt-border);
  border-radius: 10px;
  padding: 10px 12px;
}
.yt-blocked-channel-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--yt-border);
  overflow-anchor: none;
}
.yt-blocked-channel-row.is-locked {
  background: color-mix(in srgb, var(--yt-accent) 4%, transparent);
}
.yt-blocked-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--yt-accent);
  color: var(--yt-accent-text);
  display: grid;
  place-items: center;
  font-weight: 800;
}
.yt-blocked-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.yt-blocked-info span {
  color: var(--yt-text-dim);
  font-size: 12px;
}
.yt-vipro-options-panel {
  display: grid;
  gap: 12px;
}
.yt-vipro-influence-panel {
  display: grid;
  gap: 12px;
}
.yt-option-toggle {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--yt-border);
  border-radius: 10px;
  background: var(--yt-surface-2);
}
.yt-option-toggle input {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  accent-color: var(--yt-accent);
}
.yt-option-toggle span {
  display: grid;
  gap: 4px;
}
.yt-option-toggle small,
.yt-comments-gate {
  color: var(--yt-text-dim);
}
.yt-schedule-form {
  display: grid;
  gap: 16px;
}
.yt-schedule-times {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.yt-schedule-times label {
  display: grid;
  gap: 6px;
  color: var(--yt-text-dim);
  font-size: 13px;
}
.yt-schedule-times input {
  min-width: 150px;
  height: 40px;
  border: 1px solid var(--yt-border);
  border-radius: 8px;
  background: var(--yt-bg);
  color: var(--yt-text);
  padding: 0 10px;
}
.yt-schedule-blocknow {
  display: grid;
  gap: 12px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--yt-border);
}
.yt-schedule-blocknow-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
}
.yt-schedule-blocknow-controls label {
  display: grid;
  gap: 6px;
  color: var(--yt-text-dim);
  font-size: 13px;
}
/* Un label en display:grid ignore l'attribut hidden : il faut le dire. */
.yt-schedule-blocknow-controls label[hidden] { display: none; }

.yt-schedule-blocknow-controls .yt-select { height: 40px; }

.yt-schedule-blocknow-controls input {
  width: 130px;
  height: 40px;
  border: 1px solid var(--yt-border);
  border-radius: 8px;
  background: var(--yt-bg);
  color: var(--yt-text);
  padding: 0 10px;
}
.yt-schedule-days {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border: 0;
  padding: 0;
  margin: 0;
}
.yt-schedule-days legend {
  width: 100%;
  margin-bottom: 8px;
  color: var(--yt-text-dim);
  font-size: 13px;
}
.yt-schedule-days input {
  position: absolute;
  opacity: 0;
}
.yt-schedule-days span {
  display: grid;
  place-items: center;
  width: 48px;
  height: 38px;
  border: 1px solid var(--yt-border);
  border-radius: 8px;
  background: var(--yt-bg);
  cursor: pointer;
}
.yt-schedule-days input:checked + span {
  border-color: var(--yt-accent);
  background: var(--yt-accent);
  color: var(--yt-accent-text);
}
.yt-schedule-blocked {
  min-height: calc(100vh - 120px);
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  text-align: center;
}
.yt-schedule-blocked > i {
  font-size: 56px;
}
.yt-schedule-blocked h1,
.yt-schedule-blocked p {
  margin: 0;
}
.yt-comments-gate {
  display: grid;
  gap: 12px;
  justify-items: start;
  padding: 16px;
  border: 1px dashed var(--yt-border);
  border-radius: 12px;
  background: var(--yt-surface);
}
.yt-comments-gate p {
  margin: 0;
}
.yt-removal-lock-panel {
  display: grid;
  grid-template-columns: minmax(230px, 1fr) minmax(210px, auto) minmax(260px, auto) auto;
  align-items: stretch;
  gap: 10px;
  padding: 14px;
  margin: 0 0 14px;
  border: 1px solid var(--yt-border);
  border-left: 4px solid var(--yt-accent);
  border-radius: 12px;
  background: var(--yt-bg);
}
.yt-removal-lock-copy {
  display: grid;
  gap: 5px;
  min-width: 220px;
}
.yt-removal-lock-copy strong {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
}
.yt-removal-lock-copy span {
  color: var(--yt-text-dim);
  font-size: 12px;
  line-height: 1.35;
}
.yt-removal-lock-copy em {
  color: var(--yt-text);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}
.yt-lock-presets {
  display: grid;
  grid-template-columns: repeat(3, minmax(58px, 1fr));
  gap: 6px;
  align-content: start;
}
.yt-lock-presets button {
  min-height: 32px;
  border: 1px solid var(--yt-border);
  border-radius: 8px;
  background: var(--yt-surface);
  color: var(--yt-text);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
}
.yt-lock-presets button:hover {
  background: var(--yt-surface-2);
  border-color: var(--yt-accent);
}
.yt-removal-lock-fields {
  display: grid;
  gap: 8px;
}
.yt-removal-lock-field {
  display: grid;
  grid-template-columns: 64px minmax(70px, 1fr) minmax(86px, auto);
  align-items: center;
  gap: 7px;
  color: var(--yt-text-dim);
  font-size: 13px;
}
.yt-removal-lock-field input,
.yt-removal-lock-field select {
  height: 36px;
  border: 1px solid var(--yt-border);
  border-radius: 8px;
  background: var(--yt-surface);
  color: var(--yt-text);
  padding: 0 10px;
}
.yt-removal-lock-field input {
  width: 82px;
}
.yt-removal-lock-calendar-field {
  position: relative;
  grid-template-columns: 64px minmax(210px, 1fr);
}
.yt-removal-lock-calendar-field input[type="hidden"] {
  display: none;
}
.yt-calendar-trigger {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  border: 1px solid var(--yt-border);
  border-radius: 8px;
  background: var(--yt-surface);
  color: var(--yt-text);
  cursor: pointer;
  font: inherit;
  padding: 0 10px;
  text-align: left;
}
.yt-calendar-trigger:hover {
  background: var(--yt-surface-2);
  border-color: var(--yt-accent);
}
.yt-lock-calendar {
  position: absolute;
  z-index: 40;
  top: calc(100% + 8px);
  right: 0;
  width: 292px;
  padding: 12px;
  border: 1px solid var(--yt-border);
  border-radius: 12px;
  background: var(--yt-surface);
  box-shadow: 0 18px 40px rgba(0,0,0,0.45);
}
.yt-lock-calendar[hidden] {
  display: none;
}
.yt-lock-calendar-head {
  display: grid;
  grid-template-columns: 32px 1fr 32px;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.yt-lock-calendar-head strong {
  text-align: center;
  text-transform: capitalize;
}
.yt-lock-calendar-head button,
.yt-lock-calendar-grid button {
  border: 1px solid var(--yt-border);
  border-radius: 8px;
  background: var(--yt-bg);
  color: var(--yt-text);
  cursor: pointer;
}
.yt-lock-calendar-head button {
  height: 32px;
}
.yt-lock-calendar-weekdays,
.yt-lock-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}
.yt-lock-calendar-weekdays {
  margin-bottom: 5px;
  color: var(--yt-text-dim);
  font-size: 11px;
  text-align: center;
}
.yt-lock-calendar-grid button,
.yt-lock-calendar-grid span {
  height: 32px;
}
.yt-lock-calendar-grid button:hover {
  background: var(--yt-surface-2);
  border-color: var(--yt-accent);
}
.yt-lock-calendar-grid button.is-selected {
  background: var(--yt-accent);
  color: var(--yt-accent-text);
  border-color: var(--yt-accent);
}
.yt-lock-calendar-grid button:disabled {
  opacity: .35;
  cursor: not-allowed;
}
.yt-lock-calendar-time {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}
.yt-lock-calendar-time label {
  display: grid;
  gap: 5px;
  color: var(--yt-text-dim);
  font-size: 12px;
}
.yt-lock-calendar-time input {
  width: 100%;
  height: 34px;
  border: 1px solid var(--yt-border);
  border-radius: 8px;
  background: var(--yt-bg);
  color: var(--yt-text);
  padding: 0 8px;
}
.yt-lock-calendar-footer {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
}
.yt-removal-lock-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
}
.yt-lock-select,
.yt-lock-row-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: 0 0 20px;
  scroll-margin: 0;
}
.yt-lock-select {
  position: absolute;
  z-index: 3;
  top: 9px;
  left: 9px;
}
.yt-lock-select input,
.yt-lock-row-check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.yt-lock-select span,
.yt-lock-row-check span {
  width: 20px;
  height: 20px;
  border: 1px solid var(--yt-border);
  border-radius: 6px;
  background: rgba(0,0,0,0.72);
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}
.yt-lock-row-check span {
  background: var(--yt-bg);
}
.yt-lock-select input:checked + span,
.yt-lock-row-check input:checked + span {
  border-color: var(--yt-accent);
  background: var(--yt-accent);
}
.yt-lock-select input:checked + span::after,
.yt-lock-row-check input:checked + span::after {
  content: "\f00c";
  display: grid;
  place-items: center;
  height: 100%;
  color: var(--yt-accent-text);
  font-family: "Font Awesome 6 Free";
  font-size: 11px;
  font-weight: 900;
}
.yt-lock-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 6px;
  color: var(--yt-text);
  font-size: 12px;
  white-space: normal;
}
.yt-btn:disabled,
.yt-card-edit:disabled,
.yt-similar-video-remove:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
.yt-card-edit:disabled:hover,
.yt-similar-video-remove:disabled:hover {
  background: rgba(0,0,0,0.78);
  color: #fff;
}
@media (max-width: 980px) {
  .yt-removal-lock-panel {
    grid-template-columns: 1fr;
  }
  .yt-lock-presets {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .yt-removal-lock-field,
  .yt-removal-lock-field input,
  .yt-removal-lock-field select,
  .yt-calendar-trigger {
    width: 100%;
  }
  .yt-removal-lock-field,
  .yt-removal-lock-calendar-field {
    grid-template-columns: 1fr;
  }
  .yt-lock-calendar {
    left: 0;
    right: auto;
    width: min(292px, 100%);
  }
  .yt-removal-lock-actions {
    flex-direction: row;
  }
}
.yt-ai-profiles-panel .yt-grid {
  margin-top: 0;
}
.yt-preference-profile {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--yt-border);
  border-radius: 10px;
  background: var(--yt-bg);
}
.yt-preference-profile-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.yt-preference-profile h3 {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
}
.yt-preference-profile p {
  margin: 5px 0 0;
  color: var(--yt-text-dim);
  font-size: 13px;
  line-height: 1.4;
}
.yt-preference-profile textarea {
  width: 100%;
  box-sizing: border-box;
  resize: vertical;
  min-height: 118px;
  border: 1px solid var(--yt-border);
  border-radius: 8px;
  background: var(--yt-surface);
  color: var(--yt-text);
  padding: 10px 12px;
  font: inherit;
  font-size: 13px;
  line-height: 1.45;
}
.yt-preference-profile textarea:focus {
  outline: 2px solid rgba(255, 0, 0, 0.22);
  border-color: var(--yt-accent);
}
.yt-preference-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.yt-similar-empty {
  margin: 10px 0 0;
  color: var(--yt-text-dim);
  font-size: 12px;
}
.yt-similar-evidence {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--yt-border);
}
.yt-similar-evidence-title {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--yt-text);
  font-size: 12px;
  font-weight: 700;
}
.yt-similar-video-row {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--yt-border);
  border-radius: 8px;
  background: var(--yt-bg);
  color: var(--yt-text);
  padding: 6px;
  text-align: left;
}
.yt-similar-video-row:hover {
  background: var(--yt-surface-2);
}
.yt-similar-video-open {
  min-width: 0;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  text-align: left;
  cursor: pointer;
}
.yt-similar-video-remove {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--yt-text-dim);
  cursor: pointer;
}
.yt-similar-video-remove:hover {
  border-color: var(--yt-border);
  background: var(--yt-surface);
  color: var(--yt-text);
}
.yt-similar-video-row img,
.yt-similar-video-thumb {
  width: 56px;
  height: 36px;
  border-radius: 6px;
  object-fit: cover;
  background: var(--yt-surface-2);
}
.yt-similar-video-thumb {
  display: grid;
  place-items: center;
  color: var(--yt-text-dim);
}
.yt-similar-video-info {
  min-width: 0;
  display: grid;
  gap: 3px;
}
.yt-similar-video-info strong {
  overflow: hidden;
  color: var(--yt-text);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.yt-similar-video-info small {
  overflow: hidden;
  color: var(--yt-text-dim);
  font-size: 11px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 680px) {
  .yt-section-header {
    flex-direction: column;
  }
  .yt-section-header .yt-page-actions {
    width: 100%;
  }
}
.yt-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 700;
  background: var(--yt-surface);
  color: var(--yt-text);
  border: 1px solid var(--yt-border);
  border-left: 4px solid var(--yt-accent);
  border-radius: 10px;
  padding: 10px 14px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}

/* Skeleton */
.yt-card--skeleton .yt-card-thumb {
  background: linear-gradient(90deg, var(--yt-surface) 25%, var(--yt-surface-2) 50%, var(--yt-surface) 75%);
  background-size: 200% 100%;
  animation: yt-skeleton 1.5s infinite;
}
.yt-card--skeleton .sk-line {
  height: 12px;
  border-radius: 4px;
  background: var(--yt-surface-2);
  animation: yt-skeleton 1.5s infinite;
}
.yt-card--skeleton .sk-line-1 { width: 90%; height: 16px; }
.yt-card--skeleton .sk-line-2 { width: 60%; }
@keyframes yt-skeleton {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ============ Empty / Error ============ */
.yt-empty, .yt-error {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--yt-text-dim);
}
.yt-empty i, .yt-error i { font-size: 48px; margin-bottom: 16px; opacity: 0.5; }
.yt-error { color: #ff8080; }
.yt-empty-inline { color: var(--yt-text-dim); padding: 20px; }
.yt-loading { color: var(--yt-text-dim); padding: 16px 0; }

/* ============ CTA Sign-in ============ */
.yt-cta-signin {
  max-width: 480px;
  margin: 80px auto;
  padding: 40px;
  text-align: center;
  background: var(--yt-surface);
  border-radius: 16px;
  border: 1px solid var(--yt-border);
}
.yt-cta-signin > i { font-size: 64px; color: var(--yt-accent); margin-bottom: 16px; }
.yt-cta-signin h2 { margin: 0 0 12px; font-size: 22px; }
.yt-cta-signin p { color: var(--yt-text-dim); margin: 0 0 24px; }
.yt-auth-help {
  max-width: 560px;
  margin: 0 auto 20px;
  padding: 12px 14px;
  border: 1px solid var(--yt-border);
  border-left: 4px solid var(--yt-accent);
  border-radius: 8px;
  background: var(--yt-surface);
  color: var(--yt-text-dim);
  text-align: left;
  font-size: 13px;
}
.yt-auth-help strong {
  display: block;
  margin-bottom: 6px;
  color: var(--yt-text);
}
.yt-auth-help p {
  margin: 4px 0;
  color: var(--yt-text-dim);
}
.yt-auth-help code {
  color: var(--yt-text);
  overflow-wrap: anywhere;
}
.yt-auth-help-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.yt-auth-help-actions .yt-btn {
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 12px;
}

/* ============ Boutons ============ */
.yt-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}
.yt-btn-primary { background: var(--yt-accent); color: var(--yt-accent-text); }
.yt-btn-primary:hover { background: var(--yt-accent-2); }
.yt-btn-ghost { background: var(--yt-surface-2); color: var(--yt-text); }
.yt-btn-ghost:hover { background: var(--yt-border); }
.yt-btn:active { transform: scale(0.98); }
.yt-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.yt-subscription-slot {
  display: inline-flex;
  align-items: center;
}
.yt-subscription-action span {
  white-space: nowrap;
}
.yt-subscription-action.is-subscribed {
  background: var(--yt-surface-2);
  color: var(--yt-text);
}
.yt-subscription-action.is-subscribed:hover:not(:disabled) {
  background: var(--yt-border);
}
.yt-icon-btn {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--yt-text);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.yt-icon-btn:hover { background: var(--yt-surface-2); }
.yt-link-btn {
  background: transparent;
  border: none;
  color: var(--yt-accent);
  cursor: pointer;
  font-size: 14px;
  padding: 4px 8px;
}

.yt-select {
  background: var(--yt-surface);
  color: var(--yt-text);
  border: 1px solid var(--yt-border);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 14px;
  cursor: pointer;
}
.yt-subscriptions-controls label {
  display: grid;
  gap: 5px;
  color: var(--yt-text-dim);
  font-size: 11px;
}
.yt-subscriptions-summary {
  margin: -12px 0 18px;
  color: var(--yt-text-dim);
  font-size: 13px;
}

/* ============ Channels grid ============ */
.yt-channels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
}
.yt-channel-tile {
  background: var(--yt-surface);
  border: 1px solid var(--yt-border);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  color: var(--yt-text);
  text-align: center;
  font-size: 13px;
  transition: background 0.2s;
}
.yt-channel-tile:hover { background: var(--yt-surface-2); }
.yt-channel-tile img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
}
.yt-channel-tile span {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.yt-channel-tile-main {
  background: transparent;
  border: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  width: 100%;
  min-height: 120px;
}
.yt-channel-sub-date {
  color: var(--yt-text-dim);
  font-size: 11px;
  line-height: 1.25;
}
.yt-channel-tile-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}
.yt-mini-action {
  width: 34px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid var(--yt-border);
  background: var(--yt-surface-2);
  color: var(--yt-text);
  cursor: pointer;
}
.yt-mini-action:hover {
  background: var(--yt-accent);
  color: var(--yt-accent-text);
}

.yt-channel-card {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: var(--yt-surface);
  border-radius: 12px;
  border: 1px solid var(--yt-border);
  cursor: pointer;
}
.yt-channel-card:hover { background: var(--yt-surface-2); }
.yt-channel-card-thumb { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.yt-channel-card h3 { margin: 0 0 4px; font-size: 16px; }
.yt-channel-card p {
  margin: 0;
  color: var(--yt-text-dim);
  font-size: 13px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============ Channel page ============ */
.yt-channel-banner {
  width: 100%;
  height: 180px;
  background-size: cover;
  background-position: center;
  border-radius: 12px;
  margin-bottom: 16px;
}
.yt-channel-info {
  display: flex;
  gap: 20px;
  align-items: center;
  margin-bottom: 32px;
}
.yt-channel-main-info { flex: 1; min-width: 220px; }
.yt-channel-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.yt-channel-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
}
.yt-channel-info h1 { margin: 0 0 6px; font-size: 24px; }
.yt-channel-meta { margin: 0 0 8px; color: var(--yt-text-dim); font-size: 14px; }
.yt-channel-meta span + span { margin-left: 4px; }
.yt-channel-desc { color: var(--yt-text-dim); font-size: 14px; margin: 0; }

/* ============ Watch view ============ */
.yt-watch {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(120px, clamp(120px, var(--yt-watch-sidebar-width, 360px), 42vw));
  gap: 24px;
  align-items: start;
}
.yt-watch.is-sidebar-hidden {
  grid-template-columns: minmax(0, 1fr) !important;
}
.yt-watch.is-sidebar-hidden .yt-watch-sidebar {
  display: none;
}
.yt-watch-sidebar-toggle {
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 12;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--yt-border);
  border-radius: 50%;
  background: var(--yt-surface-2);
  color: var(--yt-text);
  cursor: pointer;
}
.yt-watch-sidebar-toggle:hover {
  background: var(--yt-accent);
  color: var(--yt-accent-text);
}
.yt-watch:not(.is-sidebar-hidden) .yt-watch-tabs {
  padding-right: 42px;
}
.yt-watch-main { min-width: 0; }
.yt-watch-sidebar {
  position: relative;
  min-width: 0;
}
.yt-watch-resize-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: -16px;
  z-index: 4;
  width: 16px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: ew-resize;
}
.yt-watch-resize-handle::after {
  content: "";
  position: absolute;
  top: 18px;
  bottom: 18px;
  left: 7px;
  width: 2px;
  border-radius: 999px;
  background: transparent;
  transition: background .12s ease, box-shadow .12s ease;
}
.yt-watch-resize-handle:hover::after,
.yt-resizing-watch-sidebar .yt-watch-resize-handle::after {
  background: var(--yt-accent);
  box-shadow: 0 0 0 3px rgba(255,45,85,.16);
}
.yt-resizing-watch-sidebar {
  cursor: ew-resize;
  user-select: none;
}
.yt-watch-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 12px;
  padding: 4px;
  border: 1px solid var(--yt-border);
  border-radius: 12px;
  background: var(--yt-surface);
}
.yt-watch-tab {
  min-height: 34px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--yt-text-dim);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
.yt-watch-tab.is-active {
  background: var(--yt-surface-2);
  color: var(--yt-text);
}
.yt-watch-panel[hidden] {
  display: none;
}
.yt-watch-transcript {
  min-width: 0;
  max-height: calc(100vh - 142px);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--yt-border);
  border-radius: 12px;
  background: var(--yt-surface);
  overflow: hidden;
}
.yt-transcript-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid var(--yt-border);
}
.yt-transcript-head h3 {
  margin: 0;
  font-size: 15px;
}
.yt-transcript-head-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}
.yt-translation-toggle {
  width: auto;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.yt-translation-toggle.is-active {
  border-color: var(--yt-accent);
  background: var(--yt-accent);
  color: var(--yt-accent-text);
}
.yt-translation-language select {
  height: 30px;
  padding: 0 7px;
  border: 1px solid var(--yt-border);
  border-radius: 999px;
  outline: 0;
  background: var(--yt-surface-2);
  color: var(--yt-text);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.yt-word-translation-result {
  position: relative;
  margin: 10px 10px 0;
  padding: 10px 38px 10px 12px;
  border: 1px solid rgba(56, 189, 248, .36);
  border-radius: 10px;
  background: rgba(56, 189, 248, .1);
  color: var(--yt-text);
}
.yt-word-translation-result[hidden] {
  display: none;
}
.yt-word-translation-main {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 7px;
  font-size: 14px;
}
.yt-word-translation-main > span {
  color: var(--yt-text-dim);
}
.yt-word-translation-main > i {
  color: var(--yt-accent);
  font-size: 11px;
}
.yt-word-translation-main > strong {
  color: var(--yt-text);
  font-size: 16px;
}
.yt-word-translation-main > small {
  color: var(--yt-text-dim);
  font-size: 10px;
  text-transform: uppercase;
}
.yt-word-translation-result p {
  margin: 5px 0 0;
  color: var(--yt-text-dim);
  font-size: 11px;
  line-height: 1.35;
}
.yt-word-translation-result > button {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--yt-text-dim);
  cursor: pointer;
}
.yt-word-translation-result > button:hover {
  background: rgba(255,255,255,.08);
  color: var(--yt-text);
}
.yt-word-translation-loading,
.yt-word-translation-error {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--yt-text-dim);
  font-size: 12px;
}
.yt-word-translation-error {
  color: #fb7185;
}
.yt-transcript-body {
  min-height: 160px;
  overflow-y: auto;
  padding: 10px;
}
.yt-transcript-chapter {
  position: sticky;
  top: 0;
  z-index: 1;
  margin: 10px 0 6px;
  padding: 7px 9px;
  border-radius: 8px;
  background: var(--yt-surface-2);
  color: var(--yt-text);
  font-size: 12px;
  font-weight: 800;
}
.yt-transcript-line {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px;
  padding: 8px;
  border-radius: 8px;
}
.yt-transcript-line:hover {
  background: var(--yt-surface-2);
}
.yt-transcript-line.is-read {
  background: rgba(56, 189, 248, .08);
}
.yt-transcript-line.is-read .yt-transcript-text,
.yt-transcript-line.is-read .yt-transcript-time {
  color: var(--yt-text-dim);
}
.yt-transcript-line.is-current {
  background: rgba(255, 45, 85, .18);
  box-shadow: inset 3px 0 0 #ff2d55;
}
.yt-transcript-line.is-current .yt-transcript-text {
  color: var(--yt-text);
  font-weight: 800;
}
.yt-transcript-line.is-current .yt-transcript-time {
  color: #ff6f8f;
}
.yt-transcript-word {
  border-radius: 4px;
  padding: 0 1px;
  transition: background .08s ease, color .08s ease;
  cursor: pointer;
}
.yt-transcript-word:hover {
  background: rgba(255, 45, 85, .22);
  color: var(--yt-text);
}
.yt-transcript-word.is-word-read {
  color: var(--yt-text-dim);
}
.yt-transcript-word.is-word-current {
  background: #ff2d55;
  color: #fff;
  box-shadow: 0 0 0 2px rgba(255,45,85,.18);
}
.yt-watch-transcript.is-translation-mode .yt-transcript-word {
  text-decoration: underline dotted rgba(56, 189, 248, .75);
  text-underline-offset: 3px;
}
.yt-watch-transcript.is-translation-mode .yt-transcript-word:hover,
.yt-transcript-word.is-translation-selected {
  background: rgba(56, 189, 248, .24);
  color: var(--yt-text);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, .16);
}
/* Actions d'une ligne de sous-titre : traduire + copier, dans la 3e colonne
   de la grille pour ne pas casser la mise en page existante. */
.yt-transcript-actions {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.yt-transcript-time,
.yt-transcript-translate,
.yt-transcript-copy {
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--yt-text-dim);
  cursor: pointer;
  /* L'horodatage ne doit pas entrer dans la sélection de texte : on
     sélectionne les sous-titres sans embarquer les "4:34". */
  -webkit-user-select: none;
  user-select: none;
}
.yt-transcript-time {
  padding: 2px 0;
  font-size: 12px;
  font-weight: 800;
}
.yt-transcript-translate,
.yt-transcript-copy {
  width: 28px;
  height: 28px;
}
.yt-transcript-time:hover,
.yt-transcript-translate:hover,
.yt-transcript-copy:hover {
  color: var(--yt-accent);
  background: rgba(255,255,255,.08);
}
.yt-transcript-translate:hover {
  color: #38bdf8;
}

/* Bouton flottant « Traduire la selection », pose sous la selection. */
.yt-transcript-selection-btn {
  position: fixed;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border: 1px solid rgba(56, 189, 248, .5);
  border-radius: 999px;
  background: #0b2333;
  color: #e6f6ff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(0,0,0,.45);
}
.yt-transcript-selection-btn:hover {
  background: #10344a;
  border-color: rgba(56, 189, 248, .9);
}
.yt-transcript-selection-btn[hidden] {
  display: none;
}

/* Resultat d'une traduction de passage entier. */
.yt-passage-translation {
  display: grid;
  gap: 6px;
  font-size: 14px;
}
.yt-passage-translation-source {
  margin: 0;
  color: var(--yt-text-dim);
  font-size: 13px;
  font-style: italic;
}
.yt-passage-translation-target {
  margin: 0;
  color: var(--yt-text);
  line-height: 1.45;
}
.yt-passage-translation > small {
  color: var(--yt-text-dim);
}
.yt-transcript-text {
  margin: 0;
  color: var(--yt-text);
  font-size: 13px;
  line-height: 1.45;
  user-select: text;
}
.yt-transcript-error {
  display: grid;
  gap: 12px;
  justify-items: start;
  padding: 10px;
  color: var(--yt-text-dim);
}
.yt-transcript-error p {
  margin: 0;
  white-space: pre-wrap;
}

.yt-player {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
}
.yt-player-stage,
.yt-player iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  pointer-events: none !important;
  user-select: none;
  transform-origin: center;
}
.yt-player-click-layer {
  position: absolute;
  inset: 0;
  z-index: 5;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.yt-player-click-layer:focus { outline: none; }
.yt-player-timeline {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 64px;
  z-index: 8;
  display: grid;
  grid-template-columns: auto minmax(80px, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 12px;
  background: rgba(10,10,10,.72);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity .16s ease, transform .16s ease;
}
.yt-player.is-controls-visible .yt-player-timeline {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.yt-player-timeline input[type="range"] {
  appearance: none;
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(
    to right,
    #ff2d55 0,
    #ff2d55 var(--yt-player-progress, 0%),
    rgba(255,255,255,.34) var(--yt-player-progress, 0%),
    rgba(255,255,255,.34) 100%
  );
  width: 100%;
  cursor: pointer;
}
.yt-player-timeline input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(0,0,0,.45);
}
.yt-player-timeline input[type="range"]::-moz-range-thumb {
  width: 13px;
  height: 13px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(0,0,0,.45);
}
.yt-player:fullscreen,
.yt-player:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  max-height: none;
  border-radius: 0;
}
.yt-player-progress-wrap {
  position: relative;
  display: block;
  min-width: 80px;
}
.yt-player-progress-wrap input[type="range"] {
  position: relative;
  z-index: 2;
}
.yt-player-chapter-track {
  position: absolute;
  left: 8px;
  right: 8px;
  top: 50%;
  height: 18px;
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 3;
}
.yt-player-chapter-marker {
  position: absolute;
  top: 50%;
  width: 7px;
  height: 18px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(0,0,0,.55);
  transform: translate(-50%, -50%);
  cursor: pointer;
  pointer-events: auto;
}
.yt-player-chapter-marker:hover,
.yt-player-chapter-marker:focus-visible {
  background: #ff2d55;
}
.yt-player-chapter-marker span {
  position: absolute;
  left: 50%;
  bottom: 24px;
  min-width: 120px;
  max-width: 240px;
  padding: 7px 9px;
  border-radius: 8px;
  background: rgba(0,0,0,.88);
  color: #fff;
  font-size: 12px;
  line-height: 1.25;
  text-align: center;
  transform: translateX(-50%);
  opacity: 0;
  pointer-events: none;
  transition: opacity .12s ease;
}
.yt-player-chapter-marker:hover span,
.yt-player-chapter-marker:focus-visible span {
  opacity: 1;
}
.yt-player-controls {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 8;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 14px;
  background: rgba(10,10,10,.72);
  backdrop-filter: blur(10px);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity .16s ease, transform .16s ease;
}
.yt-player.is-controls-visible .yt-player-controls {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.yt-player-clip-panel {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 112px;
  z-index: 12;
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 8px;
  background: rgba(12,12,12,.94);
  color: #fff;
  box-shadow: 0 12px 32px rgba(0,0,0,.42);
}
.yt-player-clip-panel[hidden] {
  display: none;
}
.yt-player-clip-times {
  display: grid;
  grid-template-columns: minmax(90px, 1fr) auto minmax(90px, 1fr) auto;
  gap: 8px;
  align-items: end;
}
.yt-player-clip-times label {
  display: grid;
  gap: 4px;
  color: rgba(255,255,255,.72);
  font-size: 11px;
}
.yt-player-clip-times input {
  min-width: 0;
  padding: 8px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 6px;
  outline: 0;
  background: rgba(255,255,255,.1);
  color: #fff;
  font: inherit;
}
.yt-player-clip-mark,
.yt-player-clip-actions button {
  min-height: 34px;
  padding: 7px 10px;
  border: 0;
  border-radius: 6px;
  background: rgba(255,255,255,.14);
  color: #fff;
  cursor: pointer;
}
.yt-player-clip-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.yt-player-clip-actions button:first-child {
  background: #ff2d55;
}
.yt-player-clip-actions button:disabled {
  opacity: .42;
  cursor: not-allowed;
}
.yt-player-clip-summary {
  font-size: 13px;
  font-weight: 800;
}
.yt-player-clip-summary.is-invalid,
.yt-player-clip-panel p {
  color: rgba(255,255,255,.62);
}
.yt-player-clip-panel p {
  margin: 0;
  font-size: 11px;
}
@media (max-width: 700px) {
  .yt-player-clip-times {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .yt-player-clip-panel {
    bottom: 108px;
    max-height: calc(100% - 120px);
    overflow-y: auto;
  }
}
.yt-player-control,
.yt-player-quality {
  min-width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 0;
  border-radius: 10px;
  background: rgba(255,255,255,.12);
  color: #fff;
  font: inherit;
  font-size: 13px;
}
.yt-player-control {
  cursor: pointer;
}
.yt-player-control:hover,
.yt-player-control.is-active,
.yt-player-quality:hover {
  background: rgba(255,255,255,.24);
}
.yt-player-volume {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 112px;
}
.yt-player-volume input[type="range"] {
  appearance: none;
  width: clamp(58px, 8vw, 100px);
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(
    to right,
    #fff 0,
    #fff var(--yt-player-volume, 100%),
    rgba(255,255,255,.34) var(--yt-player-volume, 100%),
    rgba(255,255,255,.34) 100%
  );
  cursor: pointer;
}
.yt-player-volume input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(0,0,0,.45);
}
.yt-player-volume input[type="range"]::-moz-range-thumb {
  width: 13px;
  height: 13px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(0,0,0,.45);
}
.yt-player-quality {
  padding: 0 8px;
}
/* Vitesse différente de 1× : le sélecteur reste en surbrillance. */
.yt-player-quality.is-active {
  background: rgba(255,255,255,.24);
}
.yt-player-speed select {
  max-width: 58px;
}
.yt-player-quality select {
  max-width: 82px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  font-weight: 700;
}
.yt-player-quality option {
  background: #181818;
  color: #fff;
}
.yt-watch[data-player-scale="wide"] {
  grid-template-columns: minmax(0, 1fr) minmax(120px, clamp(120px, var(--yt-watch-sidebar-width, 320px), 38vw));
}
.yt-watch[data-player-scale="wide"] .yt-player {
  max-height: calc(100vh - 112px);
}
.yt-watch[data-player-scale="cinema"] {
  grid-template-columns: 1fr;
}
.yt-watch[data-player-scale="cinema"] .yt-watch-sidebar {
  display: none;
}
.yt-watch[data-player-scale="cinema"] .yt-player {
  max-height: calc(100vh - 92px);
}

.yt-video-title {
  font-size: 20px;
  font-weight: 600;
  margin: 16px 0 12px;
  line-height: 1.3;
}

.yt-video-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}
.yt-pill {
  background: var(--yt-surface-2);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  color: var(--yt-text-dim);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.yt-video-desc {
  background: var(--yt-surface);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 24px;
}
.yt-video-summary-panel {
  display: grid;
  gap: 14px;
  margin: 0 0 16px;
  padding: 14px 16px;
  border: 1px solid var(--yt-border);
  border-left: 4px solid var(--yt-accent);
  border-radius: 12px;
  background: var(--yt-surface);
  color: var(--yt-text);
}
.yt-video-summary-panel[hidden] {
  display: none;
}
.yt-video-summary-panel.is-loading,
.yt-video-summary-panel.is-error {
  color: var(--yt-text-dim);
}
.yt-video-summary-panel.is-error {
  border-left-color: #ff8080;
}
.yt-video-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.yt-video-summary-head strong {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
}
.yt-video-summary-head span {
  color: var(--yt-text-dim);
  font-size: 12px;
}
.yt-video-summary-lead {
  margin: 0;
  color: var(--yt-text);
  line-height: 1.55;
}
.yt-video-summary-section {
  display: grid;
  gap: 8px;
}
.yt-video-summary-section h3 {
  margin: 0;
  font-size: 13px;
  color: var(--yt-text);
}
.yt-video-summary-section p,
.yt-video-summary-section ul {
  margin: 0;
  color: var(--yt-text-dim);
  font-size: 14px;
  line-height: 1.55;
}
.yt-video-summary-section ul {
  padding-left: 18px;
}
.yt-video-summary-timeline {
  display: grid;
  gap: 8px;
}
.yt-video-summary-timeline div {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 3px 10px;
  padding: 8px;
  border-radius: 8px;
  background: var(--yt-surface-2);
}
.yt-video-summary-timeline span {
  grid-row: span 2;
  color: var(--yt-accent);
  font-size: 12px;
  font-weight: 800;
}
.yt-video-summary-timeline strong {
  font-size: 13px;
}
.yt-video-summary-timeline p {
  margin: 0;
  color: var(--yt-text-dim);
  font-size: 13px;
  line-height: 1.45;
}
.yt-video-desc summary { cursor: pointer; font-weight: 500; }
.yt-video-desc pre {
  white-space: pre-wrap;
  word-wrap: break-word;
  font-family: inherit;
  font-size: 14px;
  margin: 12px 0 0;
  color: var(--yt-text-dim);
  line-height: 1.5;
}

.yt-comments h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 18px;
  margin: 24px 0 16px;
}

.yt-comment {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}
.yt-comment-avatar { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; }
.yt-comment-body { flex: 1; min-width: 0; }
.yt-comment-author { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.yt-comment-author span { color: var(--yt-text-dim); font-weight: 400; }
.yt-comment-text {
  font-size: 14px;
  line-height: 1.4;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.yt-comment-time {
  display: inline;
  padding: 0 2px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: #4da3ff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.yt-comment-time:hover,
.yt-comment-time:focus-visible {
  background: rgba(77,163,255,.15);
  color: #79bbff;
  text-decoration: underline;
}
.yt-comment-stats { font-size: 12px; color: var(--yt-text-dim); margin-top: 6px; }

/* Sidebar suggestions = cartes plus compactes */
.yt-watch-sidebar .yt-card {
  flex-direction: row;
  gap: 8px;
}
.yt-watch-sidebar .yt-card-thumb {
  width: 168px;
  flex-shrink: 0;
  aspect-ratio: 16 / 9;
}
.yt-watch-sidebar .yt-card-info { padding: 0; }
.yt-watch-sidebar .yt-card-title { font-size: 13px; }

/* ============ Responsive ============ */
@media (max-width: 1360px) {
  .yt-watch {
    grid-template-columns: minmax(300px, 1fr) minmax(120px, clamp(120px, var(--yt-watch-sidebar-width, 300px), 42vw));
    gap: 16px;
  }
  .yt-watch-main {
    min-width: 0;
  }
  .yt-watch-resize-handle { display: block; }
  .yt-watch-transcript {
    max-height: calc(100vh - 142px);
  }
  .yt-watch-sidebar .yt-card-thumb {
    width: 132px;
  }
}

@media (max-width: 900px) {
  .yt-watch {
    grid-template-columns: minmax(260px, 1fr) minmax(110px, clamp(110px, var(--yt-watch-sidebar-width, 240px), 40vw));
    gap: 12px;
  }
  .yt-watch-sidebar .yt-card-thumb {
    width: 110px;
  }
}

@media (max-width: 768px) {
  .yt-app {
    grid-template-columns: 1fr;
    grid-template-areas:
      "header"
      "main";
  }
  .yt-sidebar { display: none; }
  .yt-main { padding: 16px; }
  #yt-search-form { max-width: none; margin: 0; }
  .yt-logo span { display: none; }
  .yt-search-filters {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .yt-search-filters .yt-select {
    width: 100%;
    min-width: 0;
  }
  .yt-player-controls {
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .yt-player-controls::-webkit-scrollbar { display: none; }
  .yt-player-volume { min-width: 100px; }
  .yt-player-volume input[type="range"] { width: 58px; }
}

/* ============ Override : settings.css (panneau ⚙) compat ============ */
.pf-settings-btn--floating {
  z-index: 200;
}

/* ============ Player fallback ============ */
.yt-player-loading,
.yt-player-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: var(--yt-text-secondary, #aaa);
  background: #000;
  text-align: center;
  padding: 24px;
}

.yt-player-fallback i.fa-circle-info {
  font-size: 32px;
  color: var(--yt-accent);
}

.yt-player-fallback p {
  font-size: 15px;
  max-width: 400px;
  margin: 0;
}

.yt-fallback-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--yt-accent);
  color: var(--yt-accent-text);
  border-radius: 20px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: transform 0.2s, background 0.2s;
}

.yt-fallback-btn:hover {
  transform: scale(1.05);
  background: var(--yt-accent-2);
}

.yt-fallback-btn i {
  font-size: 18px;
}

/* Les deux boutons du fallback (Réessayer + Ouvrir sur YouTube) */
.yt-fallback-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.yt-fallback-retry {
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: transparent;
  color: #fff;
  cursor: pointer;
  font-family: inherit;
}

.yt-fallback-retry:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* Bandeau discret pendant un remontage automatique du lecteur */
.yt-player-retry-note {
  position: absolute;
  left: 50%;
  bottom: 64px;
  transform: translateX(-50%);
  z-index: 5;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 13px;
  pointer-events: none;
}

/* Lien YouTube dans la barre meta */
.yt-pill-link {
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s;
}

.yt-pill-link:hover {
  background: var(--yt-accent) !important;
  color: var(--yt-accent-text) !important;
}

.yt-pill-link i {
  color: var(--yt-accent);
}

.yt-pill-link:hover i {
  color: var(--yt-accent-text);
}

/* ============================================================
   Onglets page chaîne (Vidéos récentes / Populaires / Anciennes / Playlists / Recherche)
   ============================================================ */
.yt-channel-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px 0 16px;
  border-bottom: 1px solid var(--pf-border, rgba(255, 255, 255, 0.08));
  margin-bottom: 20px;
}

.yt-tab {
  background: transparent;
  border: 1px solid var(--pf-border, rgba(255, 255, 255, 0.12));
  color: var(--pf-text, #e8eaed);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  white-space: nowrap;
}

.yt-tab:hover {
  background: var(--pf-bg-elev, rgba(255, 255, 255, 0.05));
}

.yt-tab.active {
  background: var(--yt-accent);
  border-color: var(--yt-accent);
  color: var(--yt-accent-text);
}

/* Formulaire de recherche sur une chaîne */
.yt-channel-search {
  display: flex;
  gap: 8px;
  margin: 8px 0 20px;
  max-width: 520px;
}

.yt-channel-search input[type="text"],
.yt-channel-search input[type="search"] {
  flex: 1;
  background: var(--pf-bg-elev, rgba(255, 255, 255, 0.05));
  border: 1px solid var(--pf-border, rgba(255, 255, 255, 0.12));
  color: var(--pf-text, #e8eaed);
  padding: 10px 14px;
  border-radius: 24px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}

.yt-channel-search input:focus {
  border-color: var(--yt-accent);
  background: var(--pf-bg, #0f0f10);
}

.yt-channel-search button {
  background: var(--yt-accent);
  color: var(--yt-accent-text);
  border: none;
  padding: 10px 18px;
  border-radius: 24px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, background 0.2s;
}

.yt-channel-search button:hover {
  background: var(--yt-accent-2);
  transform: translateY(-1px);
}

/* ============================================================
   Bouton Like (action pill)
   ============================================================ */
.yt-pill-action {
  cursor: pointer;
  border: 1px solid var(--pf-border, rgba(255, 255, 255, 0.12));
  background: var(--pf-bg-elev, rgba(255, 255, 255, 0.05));
  color: var(--pf-text, #e8eaed);
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.1s;
}

.yt-pill-action:hover:not(:disabled) {
  background: var(--pf-bg-hover, rgba(255, 255, 255, 0.1));
  transform: translateY(-1px);
}

.yt-pill-action:active:not(:disabled) {
  transform: translateY(0);
}

.yt-pill-action:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.yt-pill-action.yt-pill-active {
  background: var(--yt-accent);
  border-color: var(--yt-accent);
  color: var(--yt-accent-text);
}

.yt-pill-action.yt-pill-active i {
  color: var(--yt-accent-text);
}

.yt-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.72);
  z-index: 500;
  display: grid;
  place-items: center;
  padding: 20px;
}
.yt-modal {
  width: min(520px, 100%);
  background: var(--yt-surface);
  border: 1px solid var(--yt-border);
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 18px 70px rgba(0,0,0,0.45);
}
.yt-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}
.yt-modal-header h2 {
  margin: 0;
  font-size: 20px;
}
.yt-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--yt-text-dim);
  font-size: 13px;
}
.yt-field input,
.yt-field textarea,
.yt-field select {
  width: 100%;
  background: var(--yt-bg);
  color: var(--yt-text);
  border: 1px solid var(--yt-border);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
}
.yt-field textarea { resize: vertical; }
.yt-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}
.yt-modal-error {
  color: #ff8080;
  margin: 8px 0 0;
  font-size: 13px;
}

/* ============================================================
   Page Playlist (header + cover)
   ============================================================ */
.yt-playlist-header {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 16px 0 24px;
  border-bottom: 1px solid var(--pf-border, rgba(255, 255, 255, 0.08));
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.yt-playlist-cover {
  flex: 0 0 280px;
  max-width: 280px;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.yt-playlist-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.yt-playlist-info {
  flex: 1;
  min-width: 240px;
}

.yt-playlist-info h1 {
  margin: 0 0 8px;
  font-size: 22px;
  line-height: 1.3;
}

.yt-playlist-info .yt-playlist-meta {
  color: var(--pf-text-muted, #9aa0a6);
  font-size: 13px;
  margin-bottom: 12px;
}

.yt-playlist-info .yt-playlist-desc {
  color: var(--pf-text-muted, #b8bcc4);
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
}

/* ============================================================
   Carte playlist : cliquable
   ============================================================ */
.yt-card--playlist {
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.yt-card--playlist:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* ============================================================
   Indicateur de chargement progressif (accueil)
   ============================================================ */
.yt-feed-loading-more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px;
  color: var(--pf-text-muted, #9aa0a6);
  font-size: 13px;
}

.yt-feed-loading-more::before {
  content: "";
  width: 14px;
  height: 14px;
  border: 2px solid var(--pf-border, rgba(255, 255, 255, 0.15));
  border-top-color: var(--yt-accent);
  border-radius: 50%;
  animation: yt-spin 0.8s linear infinite;
}

@keyframes yt-spin {
  to { transform: rotate(360deg); }
}

/* Bouton "Rafraîchir" sur l'accueil */
#yt-refresh-feed {
  background: transparent;
  border: 1px solid var(--pf-border, rgba(255, 255, 255, 0.12));
  color: var(--pf-text, #e8eaed);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

#yt-refresh-feed:hover {
  background: var(--pf-bg-elev, rgba(255, 255, 255, 0.05));
  border-color: var(--yt-accent);
}

#yt-refresh-feed i {
  margin-right: 6px;
}


/* ============ Sections volontairement coupees (mode recherche seule) ============ */
.yt-section-blocked {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 64px 20px;
  text-align: center;
  color: var(--yt-text-dim);
}
.yt-section-blocked i {
  font-size: 42px;
  color: var(--yt-accent);
}
.yt-section-blocked h1 {
  margin: 0;
  font-size: 22px;
  color: var(--yt-text);
}
.yt-section-blocked p {
  margin: 0;
  max-width: 460px;
}
.yt-section-blocked-hint {
  font-size: 13px;
  opacity: .8;
}
.yt-section-blocked-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}

/* Entree de navigation dont la section est coupee */
.yt-nav-item.is-section-blocked {
  opacity: .55;
}
.yt-nav-item.is-section-blocked::after {
  content: "\f04c";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  margin-left: auto;
  font-size: 11px;
}

/* Bloc « Sections autorisees » du panneau Planning Vipro */
.yt-schedule-sections {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--yt-border, rgba(255,255,255,.1));
}

/* ==========================================================================
   Carnet de vocabulaire (2026-09-07)
   ========================================================================== */
.yt-vocab-intro {
  margin: 0 0 18px;
  max-width: 760px;
  color: var(--yt-text-dim);
  font-size: 14px;
  line-height: 1.6;
}

.yt-vocab-search { min-width: 200px; }

/* display:flex ignore l'attribut hidden : il faut le dire explicitement. */
.yt-vocab-selection[hidden] { display: none; }

.yt-vocab-selection {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
  margin-bottom: 14px;
  border: 1px solid var(--yt-border);
  border-radius: 12px;
  background: var(--yt-bg-soft, rgba(128, 128, 128, 0.08));
  font-size: 14px;
  font-weight: 600;
}
.yt-vocab-selection button { margin-left: 0; }

.yt-vocab-list { display: flex; flex-direction: column; gap: 10px; }

.yt-vocab-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--yt-border);
  border-radius: 12px;
  background: var(--yt-card, transparent);
}
.yt-vocab-row.is-archived { opacity: 0.55; }

.yt-vocab-pick { flex: 0 0 auto; padding-top: 2px; cursor: pointer; }
.yt-vocab-pick input { width: 17px; height: 17px; cursor: pointer; }

.yt-vocab-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }

.yt-vocab-term { margin: 0; font-size: 15px; font-weight: 700; line-height: 1.4; }
.yt-vocab-kind {
  display: inline-block;
  margin-right: 8px;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--yt-border);
  color: var(--yt-text-dim);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  vertical-align: middle;
}
.yt-vocab-translation { margin: 0; font-size: 14px; color: var(--yt-accent); font-weight: 600; }
.yt-vocab-context { margin: 0; font-size: 13px; color: var(--yt-text-dim); font-style: italic; }
.yt-vocab-source { font-size: 12px; color: var(--yt-text-dim); text-decoration: none; }
.yt-vocab-source:hover { text-decoration: underline; }

.yt-vocab-meta {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--yt-text-dim);
}
.yt-vocab-due { white-space: nowrap; font-weight: 600; }
.yt-vocab-progress {
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--yt-border);
  font-variant-numeric: tabular-nums;
}
.yt-vocab-remove {
  border: 0;
  background: transparent;
  color: var(--yt-text-dim);
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  font-size: 14px;
}
.yt-vocab-remove:hover { color: #ff4d4f; background: rgba(255, 77, 79, 0.12); }

/* Confirmation posée sous la traduction, dans le panneau des sous-titres */
.yt-vocab-saved {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--yt-border);
  font-size: 12px;
  color: var(--yt-text-dim);
}
.yt-vocab-saved button {
  margin-left: auto;
  border: 1px solid var(--yt-border);
  background: transparent;
  color: inherit;
  cursor: pointer;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
}
.yt-vocab-saved button:hover { color: #ff4d4f; border-color: #ff4d4f; }

/* ==========================================================================
   Définition dans les sous-titres (2026-09-08)
   ========================================================================== */
.yt-lookup-definition { display: flex; flex-direction: column; gap: 6px; }
.yt-lookup-term { font-size: 15px; font-weight: 700; }
.yt-lookup-pos {
  align-self: flex-start;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--yt-border);
  color: var(--yt-text-dim);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.yt-lookup-text { margin: 0; font-size: 14px; line-height: 1.55; }
.yt-lookup-example { margin: 0; font-size: 13px; font-style: italic; color: var(--yt-text-dim); }

/* Bouton « Définition » posé sous une traduction. */
.yt-lookup-define {
  align-self: flex-start;
  margin-top: 10px;
  padding: 6px 14px;
  border: 1px solid var(--yt-border);
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.yt-lookup-define:hover:not(:disabled) { border-color: var(--yt-accent); color: var(--yt-accent); }
.yt-lookup-define:disabled { opacity: 0.6; cursor: default; }

.yt-vocab-definition {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--yt-text);
  opacity: 0.85;
}
