/* ==========================================================================
   Pratinium Newsroom Docs — Starlight / Pratinium-Docs Wiki Stylesheet
   Conforme WCAG 2.1 AA, content-visibility: auto & <dialog closedby="any">
   ========================================================================== */

:root,
html[data-theme='dark'] {
  --wiki-bg: #0b1120;
  --wiki-bg-elevated: #0f172a;
  --wiki-bg-card: #131c31;
  --wiki-bg-hover: #1e293b;
  --wiki-border: #1e293b;
  --wiki-border-strong: #334155;
  --wiki-text: #f1f5f9;
  --wiki-text-secondary: #cbd5e1;
  --wiki-text-muted: #94a3b8;
  --wiki-accent: #10b981;
  --wiki-accent-strong: #34d399;
  --wiki-accent-soft: rgba(16, 185, 129, 0.14);
  --wiki-indigo: #818cf8;
  --wiki-indigo-soft: rgba(99, 102, 241, 0.15);
  --wiki-amber: #fbbf24;
  --wiki-amber-soft: rgba(245, 158, 11, 0.14);
  --wiki-sky: #38bdf8;
  --wiki-sky-soft: rgba(56, 189, 248, 0.14);
  --wiki-shadow: 0 12px 32px rgba(2, 6, 23, 0.45);
  --wiki-code-bg: #1e293b;
}

html[data-theme='light'] {
  --wiki-bg: #f8fafc;
  --wiki-bg-elevated: #ffffff;
  --wiki-bg-card: #ffffff;
  --wiki-bg-hover: #f1f5f9;
  --wiki-border: #e2e8f0;
  --wiki-border-strong: #cbd5e1;
  --wiki-text: #0f172a;
  --wiki-text-secondary: #1e293b;
  --wiki-text-muted: #475569;
  --wiki-accent: #047857;
  --wiki-accent-strong: #065f46;
  --wiki-accent-soft: rgba(4, 120, 87, 0.1);
  --wiki-indigo: #4338ca;
  --wiki-indigo-soft: rgba(67, 56, 202, 0.09);
  --wiki-amber: #b45309;
  --wiki-amber-soft: rgba(180, 83, 9, 0.1);
  --wiki-sky: #0369a1;
  --wiki-sky-soft: rgba(3, 105, 161, 0.1);
  --wiki-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
  --wiki-code-bg: #e2e8f0;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, sans-serif;
  background: var(--wiki-bg);
  color: var(--wiki-text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  background: var(--wiki-accent);
  color: #022c22;
  font-weight: 800;
  padding: 8px 16px;
  border-radius: 8px;
  z-index: 9999;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

/* --------------------------------------------------------------------------
   Topbar Starlight
   -------------------------------------------------------------------------- */
.wiki-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 62px;
  padding: 8px 24px;
  background: var(--wiki-bg-elevated);
  border-bottom: 1px solid var(--wiki-border);
}

.wiki-topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.wiki-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--wiki-text);
}

.wiki-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #022c22;
  font-weight: 900;
  font-size: 18px;
}

.wiki-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.wiki-brand-text strong {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.wiki-brand-text span {
  font-size: 11.5px;
  color: var(--wiki-text-muted);
}

.wiki-version-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--wiki-accent-soft);
  color: var(--wiki-accent-strong);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.wiki-topbar-center {
  flex: 1;
  max-width: 480px;
}

.wiki-search-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid var(--wiki-border-strong);
  background: var(--wiki-bg-card);
  color: var(--wiki-text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.wiki-search-trigger:hover,
.wiki-search-trigger:focus-visible {
  border-color: var(--wiki-accent-strong);
  outline: none;
}

.wiki-search-placeholder {
  flex: 1;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wiki-kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--wiki-bg-hover);
  border: 1px solid var(--wiki-border-strong);
  color: var(--wiki-text);
}

.wiki-topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.wiki-mode-switch {
  display: inline-flex;
  background: var(--wiki-bg-card);
  border: 1px solid var(--wiki-border-strong);
  border-radius: 8px;
  padding: 2px;
}

.wiki-mode-btn {
  border: none;
  background: transparent;
  color: var(--wiki-text-secondary);
  font-size: 11.5px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
}

.wiki-mode-btn.active {
  background: var(--wiki-accent-soft);
  color: var(--wiki-accent-strong);
}

.wiki-icon-btn {
  border: 1px solid var(--wiki-border-strong);
  background: var(--wiki-bg-card);
  color: var(--wiki-text);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 11px;
  border-radius: 8px;
  cursor: pointer;
}

.wiki-back-app-btn {
  display: inline-flex;
  align-items: center;
  padding: 6px 13px;
  border-radius: 8px;
  background: #10b981;
  color: #022c22;
  font-size: 12.5px;
  font-weight: 800;
  text-decoration: none;
}

.wiki-back-app-btn:hover {
  background: #34d399;
}

/* --------------------------------------------------------------------------
   Barre de filtre par Audience
   -------------------------------------------------------------------------- */
.wiki-audience-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 24px;
  background: var(--wiki-bg-card);
  border-bottom: 1px solid var(--wiki-border);
  overflow-x: auto;
}

.wiki-audience-label {
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--wiki-text-muted);
  white-space: nowrap;
}

.wiki-audience-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.audience-pill {
  border: 1px solid var(--wiki-border-strong);
  background: var(--wiki-bg-elevated);
  color: var(--wiki-text-secondary);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  cursor: pointer;
}

.audience-pill:hover {
  border-color: var(--wiki-accent-strong);
}

.audience-pill.active {
  background: var(--wiki-indigo-soft);
  border-color: var(--wiki-indigo);
  color: var(--wiki-text);
}

/* --------------------------------------------------------------------------
   Grille 3 Colonnes Starlight
   -------------------------------------------------------------------------- */
.wiki-shell {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr) 250px;
  max-width: 1680px;
  margin: 0 auto;
  min-height: calc(100vh - 108px);
}

/* Colonne Gauche */
.wiki-sidebar-left {
  border-right: 1px solid var(--wiki-border);
  background: var(--wiki-bg-elevated);
  padding: 18px 14px 40px;
  position: sticky;
  top: 62px;
  height: calc(100vh - 62px);
  overflow-y: auto;
}

.wiki-cat-group {
  margin-bottom: 16px;
}

.wiki-cat-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--wiki-text);
  padding: 7px 10px;
  border-radius: 7px;
  cursor: pointer;
  user-select: none;
}

.wiki-cat-summary:hover {
  background: var(--wiki-bg-hover);
}

.wiki-cat-items {
  list-style: none;
  margin: 4px 0 0;
  padding: 0 0 0 8px;
  border-left: 1px solid var(--wiki-border-strong);
}

.wiki-nav-link {
  display: block;
  padding: 6px 10px;
  margin: 2px 0;
  border-radius: 6px;
  font-size: 12.8px;
  color: var(--wiki-text-secondary);
  text-decoration: none;
  line-height: 1.35;
}

.wiki-nav-link:hover {
  background: var(--wiki-bg-hover);
  color: var(--wiki-text);
}

.wiki-nav-link.active {
  background: var(--wiki-accent-soft);
  color: var(--wiki-accent-strong);
  font-weight: 800;
  border-left: 3px solid var(--wiki-accent-strong);
}

/* Colonne Centrale */
.wiki-main {
  padding: 28px 40px 64px;
  min-width: 0;
}

/* En-tête Frontmatter Pratinium-Docs */
.wiki-frontmatter-card {
  background: var(--wiki-bg-card);
  border: 1px solid var(--wiki-border-strong);
  border-radius: 14px;
  padding: 18px 22px;
  margin-bottom: 24px;
  box-shadow: var(--wiki-shadow);
}

.wiki-fm-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.wiki-fm-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.wiki-badge {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 9px;
  border-radius: 999px;
}

.wiki-badge-verified {
  background: var(--wiki-accent-soft);
  color: var(--wiki-accent-strong);
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.wiki-badge-public {
  background: var(--wiki-sky-soft);
  color: var(--wiki-sky);
}

.wiki-badge-internal {
  background: var(--wiki-amber-soft);
  color: var(--wiki-amber);
}

.wiki-fm-meta {
  font-size: 11.5px;
  color: var(--wiki-text-muted);
}

.wiki-article-title {
  margin: 0 0 10px;
  font-size: 27px;
  font-weight: 900;
  letter-spacing: -0.025em;
  line-height: 1.22;
  color: var(--wiki-text);
}

.wiki-fm-audiences {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 11.5px;
  color: var(--wiki-text-muted);
}

.wiki-aud-tag {
  background: var(--wiki-bg-hover);
  color: var(--wiki-text-secondary);
  padding: 2px 8px;
  border-radius: 5px;
  font-weight: 600;
}

/* Contenu Markdown */
.wiki-article-body h2 {
  margin-top: 32px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--wiki-border);
  font-size: 20px;
  font-weight: 800;
  color: var(--wiki-text);
  scroll-margin-top: 84px;
}

.wiki-article-body h3 {
  margin-top: 22px;
  margin-bottom: 8px;
  font-size: 16.5px;
  font-weight: 800;
  color: var(--wiki-text);
  scroll-margin-top: 84px;
}

.wiki-article-body p,
.wiki-article-body li {
  font-size: 15px;
  color: var(--wiki-text-secondary);
}

.wiki-article-body ul,
.wiki-article-body ol {
  padding-left: 22px;
}

.wiki-article-body li {
  margin-bottom: 6px;
}

.wiki-article-body strong {
  color: var(--wiki-text);
  font-weight: 700;
}

.wiki-article-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
  background: var(--wiki-code-bg);
  color: var(--wiki-accent-strong);
  padding: 2px 6px;
  border-radius: 5px;
}

.wiki-article-body pre {
  background: #090d16;
  border: 1px solid var(--wiki-border-strong);
  border-radius: 10px;
  padding: 14px 18px;
  overflow-x: auto;
}

.wiki-article-body pre code {
  background: transparent;
  padding: 0;
  color: #e2e8f0;
  font-size: 13px;
}

.wiki-article-body a {
  color: var(--wiki-accent-strong);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 600;
}

.wiki-article-body hr {
  border: none;
  border-top: 1px solid var(--wiki-border);
  margin: 28px 0;
}

/* Callouts GitHub / Starlight */
.wiki-callout {
  border-left: 4px solid var(--wiki-accent);
  background: var(--wiki-bg-card);
  border-radius: 0 10px 10px 0;
  padding: 14px 18px;
  margin: 18px 0;
}

.wiki-callout-title {
  font-size: 12.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.wiki-callout-note {
  border-left-color: var(--wiki-sky);
  background: var(--wiki-sky-soft);
}
.wiki-callout-tip {
  border-left-color: var(--wiki-accent);
  background: var(--wiki-accent-soft);
}
.wiki-callout-important {
  border-left-color: var(--wiki-indigo);
  background: var(--wiki-indigo-soft);
}
.wiki-callout-warning {
  border-left-color: var(--wiki-amber);
  background: var(--wiki-amber-soft);
}

/* Tableaux */
.wiki-table-wrap {
  overflow-x: auto;
  margin: 16px 0;
  border: 1px solid var(--wiki-border-strong);
  border-radius: 10px;
}

.wiki-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.8px;
}

.wiki-table th,
.wiki-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--wiki-border);
}

.wiki-table th {
  background: var(--wiki-bg-card);
  font-weight: 800;
  color: var(--wiki-text);
}

.wiki-table tr:last-child td {
  border-bottom: none;
}

/* Figures & Fresques PNG Zoomables */
.wiki-figure {
  margin: 20px 0;
  background: var(--wiki-bg-card);
  border: 1px solid var(--wiki-border-strong);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--wiki-shadow);
}

.wiki-figure-img-btn {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: #060a14;
  cursor: zoom-in;
  position: relative;
}

.wiki-figure-img-btn img {
  display: block;
  width: 100%;
  height: auto;
}

.wiki-figure-zoom-hint {
  position: absolute;
  bottom: 10px;
  right: 12px;
  background: rgba(15, 23, 42, 0.88);
  color: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.4);
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}

.wiki-figure figcaption {
  padding: 10px 16px;
  font-size: 12.5px;
  color: var(--wiki-text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--wiki-border);
}

/* Modern Web Guidance: defer-rendering-heavy-content
   Appliqué UNIQUEMENT aux sections situées sous la ligne de flottaison initiale */
.wiki-deferred-section {
  content-visibility: auto;
  contain-intrinsic-size: auto none auto 380px;
}

/* Navigation Précédent / Suivant */
.wiki-prev-next {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--wiki-border);
}

.wiki-pn-card {
  display: flex;
  flex-direction: column;
  padding: 14px 18px;
  border-radius: 10px;
  border: 1px solid var(--wiki-border-strong);
  background: var(--wiki-bg-card);
  text-decoration: none;
  color: var(--wiki-text);
  transition: border-color 0.15s ease;
}

.wiki-pn-card:hover {
  border-color: var(--wiki-accent-strong);
}

.wiki-pn-card.next {
  text-align: right;
}

.wiki-pn-dir {
  font-size: 11.5px;
  color: var(--wiki-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
}

.wiki-pn-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--wiki-accent-strong);
  margin-top: 4px;
}

/* Colonne Droite : Sur cette page (TOC) */
.wiki-sidebar-right {
  border-left: 1px solid var(--wiki-border);
  padding: 22px 16px;
  position: sticky;
  top: 62px;
  height: calc(100vh - 62px);
  overflow-y: auto;
}

.wiki-toc-heading {
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--wiki-text);
  margin: 0 0 10px;
}

.wiki-toc-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.wiki-toc-link {
  font-size: 12.5px;
  color: var(--wiki-text-muted);
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 5px;
  line-height: 1.35;
}

.wiki-toc-link:hover {
  color: var(--wiki-text);
  background: var(--wiki-bg-hover);
}

.wiki-toc-link.toc-h3 {
  padding-left: 18px;
  font-size: 12px;
}

.wiki-toc-divider {
  border: none;
  border-top: 1px solid var(--wiki-border);
  margin: 16px 0;
}

.wiki-quick-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wiki-action-btn {
  width: 100%;
  text-align: left;
  padding: 8px 11px;
  border-radius: 8px;
  border: 1px solid var(--wiki-border-strong);
  background: var(--wiki-bg-card);
  color: var(--wiki-text-secondary);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.wiki-action-btn:hover {
  border-color: var(--wiki-accent-strong);
  color: var(--wiki-text);
}

/* --------------------------------------------------------------------------
   Modales <dialog closedby="any"> (Recherche ⌘K & Lightbox Fresques HD)
   -------------------------------------------------------------------------- */
dialog.wiki-dialog {
  border: 1px solid var(--wiki-border-strong);
  border-radius: 14px;
  background: var(--wiki-bg-elevated);
  color: var(--wiki-text);
  padding: 0;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7);
}

dialog.wiki-dialog::backdrop {
  background-color: rgba(2, 6, 23, 0.75);
  backdrop-filter: blur(4px);
}

.wiki-search-dialog {
  width: min(680px, 92vw);
  max-height: 80vh;
}

.wiki-search-modal-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--wiki-border);
}

.wiki-search-modal-input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--wiki-text);
  font-size: 15px;
  outline: none;
}

.wiki-dialog-close {
  border: 1px solid var(--wiki-border-strong);
  background: var(--wiki-bg-card);
  color: var(--wiki-text-secondary);
  border-radius: 6px;
  padding: 4px 9px;
  font-size: 11.5px;
  cursor: pointer;
}

.wiki-search-results {
  padding: 12px 16px;
  max-height: 60vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wiki-search-hit {
  display: block;
  padding: 10px 14px;
  border-radius: 9px;
  border: 1px solid var(--wiki-border);
  background: var(--wiki-bg-card);
  text-decoration: none;
  color: var(--wiki-text);
}

.wiki-search-hit:hover {
  border-color: var(--wiki-accent-strong);
}

.wiki-search-hit-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--wiki-accent-strong);
}

.wiki-search-hit-snippet {
  font-size: 12.5px;
  color: var(--wiki-text-secondary);
  margin-top: 3px;
}

/* Lightbox Haute Définition */
.wiki-lightbox-dialog {
  width: min(1560px, 96vw);
  max-height: 94vh;
}

/* --------------------------------------------------------------------------
   ScreenWeaver Video Studio — Lecteur Vidéo Commenté 1080p, Chapitres & Transcription
   -------------------------------------------------------------------------- */
.video-tutorial-container {
  margin: 22px 0;
  border-radius: 14px;
  border: 1.5px solid rgba(16, 185, 129, 0.45);
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.92), rgba(6, 78, 59, 0.22));
  overflow: hidden;
  box-shadow: 0 18px 42px rgba(2, 6, 23, 0.45);
}

[data-theme="light"] .video-tutorial-container {
  background: linear-gradient(145deg, #f8fafc, #ecfdf5);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.wiki-video-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--wiki-border);
  background: rgba(2, 6, 23, 0.35);
}

[data-theme="light"] .wiki-video-header {
  background: rgba(16, 185, 129, 0.08);
}

.wiki-video-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #34d399;
}

[data-theme="light"] .wiki-video-badge {
  color: #047857;
}

.wiki-video-specs {
  font-size: 11.5px;
  color: var(--wiki-text-muted);
  font-family: var(--wiki-mono);
}

.wiki-video-stage {
  padding: 14px 16px 10px;
  background: #020617;
}

.wiki-video-stage video {
  width: 100%;
  display: block;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: #020617;
  aspect-ratio: 16 / 9;
}

.wiki-video-chapters {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 12px 16px;
  border-top: 1px solid var(--wiki-border);
  background: rgba(15, 23, 42, 0.55);
}

[data-theme="light"] .wiki-video-chapters {
  background: rgba(241, 245, 249, 0.85);
}

.wiki-video-chapter-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 7px;
  border: 1px solid var(--wiki-border-strong);
  background: var(--wiki-bg-card);
  color: var(--wiki-text-secondary);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
}

.wiki-video-chapter-btn:hover {
  border-color: var(--wiki-accent-strong);
  color: var(--wiki-text);
  transform: translateY(-1px);
}

.wiki-video-chapter-time {
  font-family: var(--wiki-mono);
  font-size: 11px;
  color: var(--wiki-accent-strong);
}

.wiki-video-assets-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 16px;
  border-top: 1px solid var(--wiki-border);
  font-size: 12px;
  color: var(--wiki-text-muted);
}

.wiki-video-asset-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.wiki-video-asset-links a {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--wiki-accent-strong);
  text-decoration: none;
}

.wiki-video-asset-links a:hover {
  text-decoration: underline;
}

details.wiki-video-transcript {
  margin: 12px 0 26px;
  border-radius: 10px;
  border: 1px solid var(--wiki-border-strong);
  background: var(--wiki-bg-card);
  overflow: hidden;
}

details.wiki-video-transcript > summary {
  padding: 11px 16px;
  font-size: 13px;
  font-weight: 800;
  color: var(--wiki-accent-strong);
  cursor: pointer;
  user-select: none;
  background: rgba(16, 185, 129, 0.08);
}

details.wiki-video-transcript > .wiki-details-body {
  padding: 14px 18px;
  border-top: 1px solid var(--wiki-border);
}

.wiki-lightbox-inner {
  display: flex;
  flex-direction: column;
  max-height: 94vh;
}

.wiki-lightbox-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 1px solid var(--wiki-border);
  background: var(--wiki-bg-card);
}

.wiki-lightbox-caption {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
}

.wiki-lightbox-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.wiki-lightbox-btn,
.wiki-lightbox-close {
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 7px;
  border: 1px solid var(--wiki-border-strong);
  background: var(--wiki-bg-elevated);
  color: var(--wiki-text);
  text-decoration: none;
  cursor: pointer;
}

.wiki-lightbox-body {
  padding: 14px;
  overflow: auto;
  background: #050811;
  text-align: center;
}

.wiki-lightbox-body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

/* Responsive & Print */
@media (max-width: 1180px) {
  .wiki-shell {
    grid-template-columns: 260px minmax(0, 1fr);
  }
  .wiki-sidebar-right {
    display: none;
  }
}

@media (max-width: 820px) {
  .wiki-shell {
    grid-template-columns: 1fr;
  }
  .wiki-sidebar-left {
    position: static;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--wiki-border);
  }
  .wiki-main {
    padding: 20px 18px 48px;
  }
}

@media print {
  .wiki-topbar,
  .wiki-audience-bar,
  .wiki-sidebar-left,
  .wiki-sidebar-right,
  .wiki-prev-next {
    display: none !important;
  }
  .wiki-shell {
    display: block;
  }
  .wiki-deferred-section {
    content-visibility: visible !important;
  }
}

