/* ══════════════════════════════════════════════════════════════════════════
   akasha-videotheque.css — AKASHA · LA VIDÉOTHÈQUE SACRÉE (04/11/2026, refonte du 05/11)
   En-tête (titre, onglets, recherche) · scène (lecteur AETHER VISION dans son portail + fiche
   d'archive) · section « Les archives visuelles » · suggestions et séries. Préfixe vth-.
   Bureau (1360 px et plus) : deux colonnes, lecteur 71 %, fiche 29 %. Tablette : fiche sous le
   lecteur, en deux parties. Téléphone : une colonne, décor retiré.
   AKASHA a html { zoom: 1.15 } : 100vh vaut 1,15 écran, d'où les « 100vh / 1.15 » ci-dessous.
   Performance : aucun flou (backdrop-filter) ; les seules animations permanentes (halo, énergie
   du contour) n'animent qu'opacity / transform / stroke-dashoffset et S'ARRÊTENT pendant la
   lecture ; tout s'arrête en mouvement réduit.
   ══════════════════════════════════════════════════════════════════════════ */
#panelVideos {
  --vth-abyss: #050316; --vth-night: #100822; --vth-surface: #17102b; --vth-raise: #211535; --vth-ame: #2b1845; --vth-ame-l: #8755d7;
  --vth-gold: #c9a45b; --vth-gold-l: #f0d895; --vth-text: #f4eff9; --vth-text2: #b8abc9;
  --vth-glass: rgba(255, 255, 255, .08); --vth-halo: rgba(135, 85, 215, .22); --vth-line: rgba(201, 164, 91, .2);
}
#panelVideos.vth-on { overflow-x: clip; }
.vth-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: 0; }

/* L'ancienne galerie de cartes est remplacée par la liste ; elle reste dans la page (recherche, thèmes) */
#panelVideos.vth-on .akb-gal-wrap,
#panelVideos.vth-on #videosGrid { display: none !important; }

/* ════════════════ En-tête ════════════════ */
#panelVideos.vth-on > .subtab-bar, #panelVideos.vth-on > .ens-search-row { position: relative; z-index: 2; }
#panelVideos.vth-on > .ens-search-row { max-width: 560px; margin: 0 auto 6px; flex-wrap: nowrap; }
#panelVideos.vth-on > .ens-search-row input { flex: 1; width: 100%; min-width: 0; max-width: none; padding-right: 122px !important; }
.vth-jump {
  position: absolute; right: 7px; top: 50%; transform: translateY(-50%); min-height: 34px; padding: 0 12px; cursor: pointer; white-space: nowrap;
  font: 600 11px/1 "Cinzel", "Cinzel Fallback", serif; letter-spacing: .05em; color: var(--vth-gold-l);
  background: rgba(135, 85, 215, .2); border: 1px solid rgba(201, 164, 91, .4); border-radius: 999px;
}
.vth-jump:hover { border-color: var(--vth-gold-l); }
.vth-jump[hidden] { display: none; }

/* ════════════════ La scène ════════════════ */
.vth { position: relative; display: block; margin: 16px 0 26px; }
.vth-info, .vth-eps { position: relative; z-index: 1; }

/* lecteur : le cadre rend sa place à l'image (hors cinéma et plein écran, qui ont leurs propres règles) */
.vth-portal .av:not(.is-cinema):not(.is-fs) { padding: 6px 10px 10px; border-radius: 18px; transition: border-color .25s ease, box-shadow .25s ease; }
.vth-portal .av:not(.is-cinema):not(.is-fs) .av-head { min-height: 40px; padding-bottom: 4px; }
.vth-portal .av:not(.is-cinema):not(.is-fs) .av-crystal { padding: 10px 10px 6px; }
.vth-portal .av:not(.is-cinema):not(.is-fs).is-embed .av-crystal { padding-bottom: 10px; }
.vth-portal[data-state="PORTAL_IDLE"]:not(.is-empty):hover .av { border-color: rgba(240, 216, 149, .5); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 26px 70px -28px #000, 0 0 48px -14px rgba(135, 85, 215, .75); }

/* ── le portail ── */
.vth-portal {
  position: relative; isolation: isolate; min-width: 0;
}
.vth-halo {
  position: absolute; inset: -7% -5%; z-index: -2; pointer-events: none; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(135, 85, 215, .30), rgba(135, 85, 215, .12) 55%, transparent 76%);
  animation: vthBreath 3.4s ease-in-out infinite alternate;
}
.vth-rings {
  position: absolute; left: 50%; top: 50%; z-index: -1; pointer-events: none;
  width: 116%; height: auto; transform: translate(-50%, -50%); overflow: visible; clip-path: inset(8% -10%);
}
.vth-rings ellipse, .vth-rings path { fill: none; vector-effect: non-scaling-stroke; }
.vth-r0 { stroke: rgba(201, 164, 91, .28); stroke-width: 1; }
.vth-r1 { stroke: url(#vthGold); stroke-width: 1.6; opacity: .78; }
.vth-r2 { stroke: rgba(201, 164, 91, .45); stroke-width: 1; stroke-dasharray: 1 9; }
.vth-flow { stroke: #f0d895; stroke-width: 2.2; stroke-linecap: round; stroke-dasharray: 90 3400; opacity: 0; }
.vth-hex path { stroke: rgba(135, 85, 215, .26); stroke-width: 1; }
.vth-card path { fill: #c9a45b; stroke: #f0d895; stroke-width: .8; opacity: .85; }
.vth-runes { font: 600 15px/1 "Cinzel", "Cinzel Fallback", serif; letter-spacing: .32em; fill: rgba(240, 216, 149, .42); }

.vth-host { position: relative; }

/* portail en veille (posé dans l'emplacement du lecteur) */
.vth-over-b { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; max-width: 100%; }
.vth-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 18px; text-align: center; }
.vth-empty::before {   /* le sceau assombri, en veille */
  content: ""; width: clamp(64px, 9vw, 96px); aspect-ratio: 1; margin-bottom: 4px; opacity: .8;
  background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke-width='1.2'%3E%3Ccircle cx='60' cy='60' r='56' stroke='%23c9a45b' stroke-opacity='.55'/%3E%3Ccircle cx='60' cy='60' r='46' stroke='%23f0d895' stroke-opacity='.25' stroke-dasharray='2 5'/%3E%3Cpath d='M60 14 L100 83 L20 83 Z M60 106 L20 37 L100 37 Z' stroke='%238755d7' stroke-opacity='.6'/%3E%3Cpath d='M60 44a16 16 0 1 0 0 32a12 12 0 1 1 0-32z' fill='%23c9a45b' fill-opacity='.5' stroke='none'/%3E%3C/g%3E%3C/svg%3E");
  animation: vthBreath 3.8s ease-in-out infinite alternate;
}
.vth-empty-t { margin: 0; max-width: 30ch; font: 600 clamp(15px, 1.8vw, 21px)/1.35 "Cinzel", "Cinzel Fallback", serif; letter-spacing: .06em; color: var(--vth-text); }
.vth-empty-s { margin: 0 0 6px; max-width: 42ch; font: italic clamp(15px, 1.5vw, 18px)/1.45 "Cormorant Garamond", serif; color: var(--vth-text2); }

/* la fenêtre de lecture : le lecteur tient à la vue, et son ✕ ne couvre pas le bouton cinéma */
#contentModal .modal-box:has(#akModalVision) { max-width: min(1040px, max(420px, calc((100vh - 155px) * 1.25))); max-height: 80vh; }   /* zoom 1.15 : 92vh dépassait de l’écran et cachait le ✕ */
#akModalVision .av { border-radius: 18px 18px 0 0; border-width: 0 0 1px; }
#akModalVision .av-head { padding-right: 40px; }

/* ════════════════ États du portail (ceux du lecteur) ════════════════ */
.vth-rings { transition: opacity .3s ease; }
/* activation et chargement : l'énergie circule sur le contour, tant que c'est vrai */
.vth-portal[data-state="PORTAL_ACTIVATING"] .vth-flow, .vth-portal[data-state="LOADING"] .vth-flow { opacity: .95; animation: vthFlow 1.6s linear infinite; }
/* lecture : le décor s'efface, rien ne bouge autour de la vidéo */
.vth-portal[data-state="PLAYING"] .vth-halo, .vth-portal[data-state="BUFFERING"] .vth-halo { animation: none; opacity: .25; }
.vth-portal[data-state="PLAYING"] .vth-rings, .vth-portal[data-state="BUFFERING"] .vth-rings { opacity: .22; }
.vth-portal[data-state="PAUSED"] .vth-halo, .vth-portal[data-state="ENDED"] .vth-halo { animation: none; opacity: .5; }
/* veille : portail assombri */
.vth-portal.is-empty .vth-rings { opacity: .55; }
.vth-portal.is-empty .vth-r1 { stroke: rgba(135, 85, 215, .5); }
.vth-portal.is-empty .vth-halo { opacity: .55; }

/* ════════════════ La fiche d'archive ════════════════ */
.vth-info {
  display: flex; flex-direction: column; gap: 14px; min-width: 0; margin: 14px 0 0; padding: 20px 22px 16px; border-radius: 18px; color: var(--vth-text);
  background: linear-gradient(170deg, var(--vth-raise), var(--vth-surface) 38%, var(--vth-night));
  border: 1px solid rgba(201, 164, 91, .26); box-shadow: inset 0 1px 0 rgba(240, 216, 149, .12), 0 26px 60px -34px #000;
}
.vth-info-t { display: flex; flex-direction: column; min-width: 0; }
.vth-eye { display: flex; align-items: center; gap: 8px; margin: 0 0 9px; font: 600 11px/1.3 "Cinzel", "Cinzel Fallback", serif; letter-spacing: .2em; text-transform: uppercase; color: var(--vth-gold); }
.vth-eye-g { font-size: 15px; letter-spacing: 0; color: var(--vth-gold-l); }
.vth-title { margin: 0 0 10px; font: 600 clamp(21px, 1.75vw, 29px)/1.2 "Cinzel", "Cinzel Fallback", serif; letter-spacing: .02em; color: var(--vth-gold-l); overflow-wrap: anywhere; }
.vth-desc { margin: 0; font: 17px/1.42 "Cormorant Garamond", serif; color: var(--vth-text); white-space: pre-line;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.vth-desc.is-none { font-style: italic; color: var(--vth-text2); }
.vth-info.is-open .vth-desc { -webkit-line-clamp: unset; display: block; }
.vth-more { margin: 4px 0 0; padding: 4px 0; border: 0; background: none; cursor: pointer; font: italic 16px/1.2 "Cormorant Garamond", serif; color: var(--vth-gold-l); text-decoration: underline; text-underline-offset: 3px; }

/* les faits : libellé discret, valeur lisible */
.vth-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; margin: 12px 0 0; padding: 12px 0 0; border-top: 1px solid var(--vth-line); }
.vth-facts:empty { display: none; }
.vth-facts .is-wide { grid-column: 1 / -1; }
.vth-facts dt { margin: 0 0 2px; font: 600 9.5px/1.3 "Cinzel", "Cinzel Fallback", serif; letter-spacing: .18em; text-transform: uppercase; color: var(--vth-text2); }
.vth-facts dd { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 6px; margin: 0; font: 500 16.5px/1.25 "Cormorant Garamond", serif; font-variant-numeric: lining-nums; color: var(--vth-text); }
.vth-src { font-style: italic; color: var(--vth-text2); }
.vth-plan { color: var(--vth-gold-l); border: 1px solid rgba(201, 164, 91, .45); border-radius: 999px; padding: 0 8px; font: 600 11px/1.6 "Cinzel", serif; letter-spacing: .1em; }
.vth-tag { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font: 600 10.5px/1.3 "Cinzel", "Cinzel Fallback", serif; letter-spacing: .05em; color: #e9dcff; background: rgba(135, 85, 215, .18); border: 1px solid rgba(135, 85, 215, .45); }
.vth-tag i { font-style: normal; color: var(--vth-gold-l); }

/* état de lecture */
.vth-prog { margin: 12px 0 0; }
.vth-prog[hidden] { display: none; }
.vth-prog-t { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0 0 6px; }
.vth-prog-t span { font: 600 9.5px/1.3 "Cinzel", "Cinzel Fallback", serif; letter-spacing: .18em; text-transform: uppercase; color: var(--vth-text2); }
.vth-prog-t b { font: 600 15.5px/1.2 "Cormorant Garamond", serif; font-variant-numeric: lining-nums; color: var(--vth-gold-l); text-align: right; }
.vth-prog-r { height: 3px; overflow: hidden; border-radius: 3px; background: rgba(135, 85, 215, .32); }
.vth-prog-r i { display: block; width: 0; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--vth-gold), var(--vth-gold-l)); }

/* actions : une principale, les autres en grille */
.vth-acts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: auto; }
.vth-acts .vth-btn { flex-direction: column; justify-content: center; gap: 5px; min-width: 0; min-height: 58px; padding: 7px 4px; text-align: center; font-size: 10px; letter-spacing: .03em; }
.vth-acts .vth-main, .vth-acts .vth-wide, .vth-acts [data-act="quiz"] { grid-column: 1 / -1; flex-direction: row; gap: 8px; min-height: 44px; font-size: 11.5px; }
.vth-acts .vth-main { min-height: 50px; font-size: 13.5px; letter-spacing: .08em; }
.vth-acts[hidden], .vth-keysd[hidden], .vth-more[hidden] { display: none; }
.vth-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 9px 15px;
  font: 600 11.5px/1.15 "Cinzel", "Cinzel Fallback", serif; letter-spacing: .05em; color: #e6daf7;
  background: rgba(16, 8, 34, .72); border: 1px solid rgba(201, 164, 91, .34); border-radius: 12px; cursor: pointer;
  transition: border-color .15s ease, color .15s ease, background .15s ease, box-shadow .15s ease;
}
.vth-btn[hidden] { display: none; }
.vth-btn svg { flex: none; width: 17px; height: 17px; fill: currentColor; stroke: none; }
.vth-btn svg .o { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.vth-btn:hover { color: var(--vth-gold-l); border-color: rgba(240, 216, 149, .65); background: rgba(43, 24, 69, .8); }
.vth-btn-gold { color: #1b0f05; background: linear-gradient(180deg, #f0d895, #c9a45b); border-color: #f0d895; }
.vth-btn-gold:hover { color: #1b0f05; background: linear-gradient(180deg, #fff1c4, #d8b56a); box-shadow: 0 8px 24px -10px rgba(240, 216, 149, .7); }
.vth-btn:disabled { opacity: .6; cursor: default; }
.vth-keysd summary { cursor: pointer; font: italic 15px/1.3 "Cormorant Garamond", serif; color: var(--vth-text2); }
.vth-keysd summary:hover { color: var(--vth-gold-l); }
.vth-keys { margin: 6px 0 0; font: 14.5px/1.7 "Cormorant Garamond", serif; color: var(--vth-text2); }
.vth-keys kbd { display: inline-block; min-width: 20px; padding: 0 5px; margin: 0 1px; border-radius: 5px; text-align: center; font: 600 11px/18px system-ui, sans-serif; color: var(--vth-text); background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .16); }

/* ════════════════ Les archives visuelles ════════════════ */
.vth-arch {
  position: relative; z-index: 1; margin: 0 0 28px; padding: 22px clamp(14px, 2.2vw, 34px) 30px; border-radius: 22px;
  background: linear-gradient(180deg, rgba(33, 21, 53, .94), rgba(16, 8, 34, .95) 180px, rgba(8, 5, 24, .95));
  border: 1px solid var(--vth-line); box-shadow: inset 0 1px 0 rgba(240, 216, 149, .14), 0 30px 70px -40px #000;
}
.vth-arch[hidden] { display: none; }
.vth-arch-head { text-align: center; margin: 0 0 16px; }
.vth-arch-head[hidden], .vth-list[hidden] { display: none; }
.vth-rule { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 0 0 12px; color: var(--vth-gold); font-size: 12px; letter-spacing: .3em; }
.vth-rule i { flex: 0 1 240px; height: 1px; background: linear-gradient(90deg, transparent, rgba(201, 164, 91, .75)); }
.vth-rule i:last-child { transform: scaleX(-1); }
.vth-arch-t { margin: 0; font: 600 clamp(21px, 2.1vw, 32px)/1.2 "Cinzel", "Cinzel Fallback", serif; letter-spacing: .14em; text-transform: uppercase; color: var(--vth-gold-l); }
.vth-cat-head { text-align: center; margin: 4px 0 12px; }
.vth-cat-t { margin: 0; font: 600 clamp(15px, 1.6vw, 19px)/1.3 "Cinzel", "Cinzel Fallback", serif; letter-spacing: .22em; text-transform: uppercase; color: var(--vth-gold-l); }
.vth-cat-t span { font-size: .7em; color: var(--vth-gold); }
.vth-cat-s { margin: 6px 0 0; font: italic 17.5px/1.4 "Cormorant Garamond", serif; color: var(--vth-text2); }

/* thèmes et tri : une barre, à part de la galerie */
#panelVideos.vth-on .ens-filters { max-width: none; margin: 0 0 20px; padding: 10px 0; border-top: 1px solid var(--vth-line); border-bottom: 1px solid var(--vth-line); }
#panelVideos.vth-on .ens-explore { display: none; }
#panelVideos.vth-on .ens-empty { margin: 8px auto 0; }

.vth-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 20px; }
.vth-li { min-width: 0; }
.vth-li[hidden] { display: none; }
.vth-item {
  position: relative; display: flex; flex-direction: column; width: 100%; height: 100%; padding: 0; overflow: hidden; text-align: left; cursor: pointer; color: var(--vth-text);
  background: linear-gradient(170deg, var(--vth-raise), var(--vth-night) 62%);
  border: 1px solid rgba(201, 164, 91, .24); border-radius: 16px;
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.vth-item:focus-visible { outline: 2px solid var(--vth-gold-l); outline-offset: 3px; }
.vth-li.is-cur .vth-item { border-color: rgba(240, 216, 149, .85); box-shadow: 0 0 0 1px rgba(240, 216, 149, .25), 0 0 30px -8px rgba(135, 85, 215, .75); }
.vth-thumb {
  position: relative; display: block; flex: none; aspect-ratio: 16 / 9; overflow: hidden;
  background: radial-gradient(100% 100% at 50% 40%, #2c1a52, #0b0620); border-bottom: 1px solid rgba(201, 164, 91, .22);
}
.vth-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.vth-thumb-g { position: absolute; inset: 0; display: grid; place-items: center; }
.vth-thumb-g svg { width: 30%; height: auto; }
.vth-thumb-g .s0 { fill: none; stroke: rgba(240, 216, 149, .55); stroke-width: 2; }
.vth-thumb-g .s1, .vth-thumb-g .s2 { fill: none; stroke: rgba(135, 85, 215, .6); stroke-width: 1.5; }
.vth-thumb-g .s3 { fill: rgba(240, 216, 149, .85); }
.vth-dur { position: absolute; right: 8px; bottom: 8px; padding: 3px 7px; border-radius: 6px; font: 600 12.5px/1.3 system-ui, sans-serif; font-variant-numeric: tabular-nums; color: #fff; background: rgba(5, 3, 22, .86); }
.vth-dur[hidden] { display: none; }
.vth-seen { position: absolute; left: 0; bottom: 0; height: 3px; width: var(--seen, 0%); background: linear-gradient(90deg, #c9a45b, #f0d895); }
.vth-it { display: flex; flex-direction: column; flex: 1; gap: 6px; min-width: 0; padding: 13px 16px 15px; }
.vth-it-k { font: 600 10.5px/1.3 "Cinzel", "Cinzel Fallback", serif; letter-spacing: .13em; text-transform: uppercase; color: var(--vth-gold); }
.vth-it-k i, .vth-it-k em { font-style: normal; } .vth-it-k i { margin-right: 4px; color: var(--vth-gold-l); }
.vth-it-t { font: 600 17px/1.28 "Cinzel", "Cinzel Fallback", serif; letter-spacing: .015em; color: #fffaf0; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.vth-it-d { margin-bottom: 6px; font: 16.5px/1.36 "Cormorant Garamond", serif; color: var(--vth-text2); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.vth-it-go {
  display: inline-flex; align-items: center; gap: 7px; align-self: flex-start; margin-top: auto; min-height: 36px; padding: 0 14px 0 11px; border-radius: 10px;
  font: 600 11px/1 "Cinzel", "Cinzel Fallback", serif; letter-spacing: .08em; color: var(--vth-gold-l); border: 1px solid rgba(201, 164, 91, .45); background: rgba(5, 3, 22, .5);
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.vth-it-go svg { width: 15px; height: 15px; fill: currentColor; }
.vth-li.is-cur .vth-it-go { color: #1b0f05; background: linear-gradient(180deg, #f0d895, #c9a45b); border-color: #f0d895; }
@media (hover: hover) {
  .vth-item:hover { border-color: rgba(240, 216, 149, .65); transform: translateY(-3px); box-shadow: 0 18px 34px -20px #000, 0 0 30px -12px rgba(135, 85, 215, .8); }
  .vth-item:hover .vth-thumb img { transform: scale(1.035); }
  .vth-item:hover .vth-it-go { color: #1b0f05; background: linear-gradient(180deg, #f0d895, #c9a45b); border-color: #f0d895; }
}

/* aucune archive : ni recherche ni thèmes (rien à chercher), le portail en veille suffit */
#panelVideos.vth-void .ens-search-row, #panelVideos.vth-void #ensFiltersVideos, #panelVideos.vth-void .ens-empty { display: none !important; }
#panelVideos.vth-void .vth-desc { display: block; -webkit-line-clamp: unset; }

/* ════════════════ Épisodes, suggestions, séries ════════════════ */
.vth-eps { min-width: 0; margin: 16px 0 0; }
.vth-eps-t { margin: 0 0 10px; font: 600 12px/1.3 "Cinzel", "Cinzel Fallback", serif; letter-spacing: .14em; text-transform: uppercase; color: var(--vth-gold-l); }
.vth-eps[hidden], .vth-reco[hidden], .vth-ser[hidden], .vth-extra[hidden], .vth-rail[hidden] { display: none; }
.vth-eps-l, .vth-rail { display: flex; gap: 12px; margin: 0; padding: 2px 2px 10px; list-style: none; overflow-x: auto; scrollbar-width: thin; scrollbar-color: rgba(201, 164, 91, .4) transparent; }
.vth-eps-l { position: relative; }
.vth-rail { justify-content: safe center; }
.vth-eps-l > li, .vth-rail > li { flex: 0 0 auto; width: 250px; }
.vth-extra { margin: 0 auto 26px; }
.vth-reco, .vth-ser { margin-bottom: 22px; }
.vth-ep, .vth-rc, .vth-card-s {
  display: grid; gap: 4px; width: 100%; height: 100%; align-content: start; padding: 8px; border-radius: 10px; cursor: pointer; text-align: left; color: var(--vth-text);
  background: var(--vth-glass); border: 1px solid rgba(240, 216, 149, .16);
}
.vth-ep:hover, .vth-rc:hover, .vth-card-s:hover { border-color: rgba(240, 216, 149, .55); }
.vth-ep:focus-visible, .vth-rc:focus-visible, .vth-card-s:focus-visible, .vth-pcd summary:focus-visible { outline: 2px solid var(--vth-gold-l); outline-offset: 2px; }
.vth-ep.is-cur { border-color: var(--vth-gold-l); background: rgba(135, 85, 215, .2); }
.vth-ep-p { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 6px; background: var(--vth-night); margin-bottom: 3px; }
.vth-ep-p img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vth-ep-p i { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--vth-gold-l); }
.vth-ep-p .vth-thumb-g { position: absolute; inset: 18%; display: block; }
.vth-ep small, .vth-rc small, .vth-card-s small { font: 13.5px/1.3 "Cormorant Garamond", serif; color: var(--vth-text2); }
.vth-ep b, .vth-rc b, .vth-card-s b { font: 600 16px/1.22 "Cormorant Garamond", serif; color: var(--vth-text); overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.vth-rc small { overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.vth-card-s em { font: 600 11px/1.3 "Cinzel", "Cinzel Fallback", serif; letter-spacing: .06em; font-style: normal; color: var(--vth-gold-l); margin-top: 3px; }
.vth-pc { text-align: center; }
.vth-pcd { margin-top: 6px; text-align: left; }
.vth-pcd summary { cursor: pointer; text-align: center; padding: 8px; font: 15.5px/1.3 "Cormorant Garamond", serif; color: var(--vth-gold-l); }
.vth-pc-n { margin: 4px 0 0; text-align: center; font: 14px/1.4 "Cormorant Garamond", serif; color: var(--vth-text2); }
.vth-pc-n a { color: var(--vth-gold-l); }

/* focus visibles partout */
.vth-btn:focus-visible, .vth-more:focus-visible, .vth-jump:focus-visible, .vth-keysd summary:focus-visible { outline: 2px solid var(--vth-gold-l); outline-offset: 2px; box-shadow: 0 0 0 5px rgba(135, 85, 215, .35); }

/* ════════════════ Bureau : la grande scène ════════════════ */
@media (min-width: 1360px) {
  /* la largeur suit l'écran, et la hauteur : le lecteur et ses commandes tiennent ensemble à la vue */
  #akashaApp #panelCodex:has(> #panelVideos.active.vth-on) {
    max-width: min(2160px, max(1000px, calc((100vh / 1.15 - 242px) * 2.5 + 82px)));
    padding-left: clamp(16px, 1.8vw, 36px); padding-right: clamp(16px, 1.8vw, 36px);
  }
  #akashaApp.akb-wings #panelCodex:has(> #panelVideos.active.vth-on) { padding-top: 4px; }
  /* en-tête : le titre à gauche, la navigation et la recherche à droite ; une seule bande, sous elle la scène */
  #panelVideos.vth-on.active { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 32px; align-items: center; }
  #panelVideos.vth-on.active > * { grid-column: 1 / -1; min-width: 0; }
  #panelVideos.vth-on.active::before {
    content: ""; grid-column: 1 / -1; grid-row: 3; height: 1px; margin-top: 8px;
    background: linear-gradient(90deg, rgba(201, 164, 91, .7), rgba(201, 164, 91, .22) 62%, transparent);
  }
  #akashaApp #panelVideos.vth-on > .section-header {
    grid-column: 1; grid-row: 1 / span 2; display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 16px; align-items: center; margin: 0; padding: 0; text-align: left;
  }
  #panelVideos.vth-on > .section-header::before { display: none; }
  #akashaApp #panelVideos.vth-on > .section-header .akb-emblem { grid-row: 1 / span 3; width: 66px; height: 66px; margin: 0; }
  #akashaApp #panelVideos.vth-on > .section-header .akb-emblem svg { width: 40px; height: 40px; }
  #akashaApp #panelVideos.vth-on > .section-header .section-eyebrow { margin: 0 0 3px; letter-spacing: .34em; }
  #akashaApp #panelVideos.vth-on > .section-header .section-title { margin: 0; font-size: clamp(28px, 2.7vw, 42px); line-height: 1.12; letter-spacing: .06em; }
  #akashaApp #panelVideos.vth-on > .section-header .section-desc { margin: 0; }
  #panelVideos.vth-on.active > .subtab-bar { grid-column: 2; grid-row: 1; justify-content: flex-end; margin: 0 0 6px; }
  #panelVideos.vth-on.active > .ens-search-row { grid-column: 2; grid-row: 2; width: 100%; max-width: none; margin: 0; }

  .vth { display: grid; grid-template-columns: minmax(0, 71fr) minmax(320px, 29fr); gap: 16px 20px; align-items: stretch; margin-top: 12px; }
  .vth-portal { grid-column: 1; grid-row: 1; align-self: start; }
  .vth-info { grid-column: 2; grid-row: 1; margin: 0; }
  .vth:has(> .vth-eps:not([hidden])) .vth-info { grid-row: 1 / span 2; }
  .vth-eps { grid-column: 1; grid-row: 2; margin: 0; }

  #panelVideos.vth-on .ens-filters { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 24px; }
  #panelVideos.vth-on .ens-rowwrap { justify-content: flex-start; min-width: 0; }
  #panelVideos.vth-on .ens-bar { margin: 0; flex-wrap: nowrap; white-space: nowrap; }
}

/* écran bas : la fiche reste à la hauteur du lecteur */
@media (min-width: 1360px) and (max-height: 820px) {
  .vth-info { gap: 10px; padding: 16px 18px 12px; }
  .vth-desc { -webkit-line-clamp: 2; }
  .vth-facts { margin-top: 8px; padding-top: 9px; gap: 6px 14px; }
  .vth-keysd { display: none; }
}

/* ════════════════ Tablette : le lecteur en pleine largeur, la fiche en deux parties ════════════════ */
@media (min-width: 681px) and (max-width: 1359px) {
  #akashaApp #panelCodex:has(> #panelVideos.active.vth-on) { padding-left: 18px; padding-right: 18px; }
  .vth-portal { max-width: max(520px, calc((100vh / 1.15 - 232px) * 1.778 + 44px)); margin: 0 auto; }
  .vth-info { display: grid; grid-template-columns: minmax(0, 1fr) 236px; gap: 10px 24px; }
  .vth-info-t { grid-row: 1 / span 2; }
  .vth-acts { align-content: start; margin-top: 0; }
  .vth-keysd { grid-column: 2; }
  .vth-list { grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: 16px; }
}

/* la rangée de thèmes défile dans la section : le premier ne se colle pas au bord */
@media (max-width: 900px) {
  #panelVideos.vth-on .ens-chips { margin: 0 -12px; width: calc(100% + 24px); padding-left: 12px; padding-right: 12px; scroll-padding-left: 12px; }
}

/* ════════════════ Téléphone : une vraie adaptation ════════════════ */
@media (max-width: 680px) {
  .vth { margin: 10px 0 20px; }
  .vth-rings, .vth-halo { display: none; }   /* au téléphone, toute la largeur va à la vidéo */
  #panelVideos.vth-on > .ens-search-row { margin-bottom: 4px; }
  /* 05/11 : les 122 px à droite sont pour « Aller à… » ; caché, ils coupaient « Rechercher une vidéo… » */
  #panelVideos.vth-on > .ens-search-row:not(:has(.vth-jump:not([hidden]))) input { padding-right: 14px !important; }
  #panelVideos.vth-on > .subtab-bar { justify-content: center; }
  .vth-portal .av:not(.is-cinema):not(.is-fs) { padding: 6px 6px 8px; border-radius: 14px; }
  .vth-portal .av:not(.is-cinema):not(.is-fs) .av-crystal { padding: 8px 8px 5px; }
  .vth-empty { gap: 8px; padding: 12px; }
  .vth-empty .vth-btn { min-height: 42px; padding: 8px 12px; font-size: 11.5px; }
  .vth-empty::before { width: 52px; }
  .vth-empty-s { font-size: 14.5px; }
  .vth-info { margin: 12px 0 0; padding: 16px 14px 14px; border-radius: 16px; }
  .vth-title { font-size: 21px; }
  .vth-keysd { display: none; }
  .vth-arch { margin-left: -4px; margin-right: -4px; padding: 18px 12px 18px; border-radius: 16px; }
  .vth-rule i { flex-basis: 70px; }
  .vth-arch-t { letter-spacing: .1em; }
  #panelVideos.vth-on .ens-filters { margin-bottom: 14px; }
  .vth-list { gap: 14px; }
  .vth-it { padding: 11px 13px 13px; }
  .vth-it-t { font-size: 16px; }
  .vth-it-d { font-size: 15.5px; }
  .vth-it-go { min-height: 40px; }
  .vth-eps-l > li, .vth-rail > li { width: 176px; }
}

/* ════════════════ Apparitions et animations ════════════════ */
#panelVideos.active .vth-info { animation: vthRise .42s ease-out .05s backwards; }
#panelVideos.active .vth-arch { animation: vthRise .42s ease-out .12s backwards; }
.vth-info-t.is-in { animation: vthSwap .32s ease-out; }
@keyframes vthBreath { from { opacity: .7; transform: scale(.985); } to { opacity: 1; transform: scale(1.015); } }
@keyframes vthFlow { to { stroke-dashoffset: -3490; } }
@keyframes vthRise { from { opacity: 0; transform: translateY(12px); } }
@keyframes vthSwap { from { opacity: 0; transform: translateY(6px); } }

@media (prefers-reduced-motion: reduce) {
  .vth-halo, .vth-empty::before, .vth-portal .vth-flow, #panelVideos.active .vth-info, #panelVideos.active .vth-arch, .vth-info-t.is-in { animation: none !important; }
  .vth-item, .vth-rings, .vth-thumb img, .vth-btn, .vth-it-go, .vth-portal .av:not(.is-cinema):not(.is-fs) { transition: none; }
  .vth-item:hover { transform: none; }
  .vth-item:hover .vth-thumb img { transform: none; }
}
