/* ══════════════════════════════════════════════════════════════════════════
   aether-vision.css — AETHER VISION 1.0 · le lecteur vidéo de POLARISTAR (04/11/2026)
   Préfixe av-. Hors plein écran, les commandes sont SOUS l'image : rien ne recouvre la vidéo.
   Performance : aucun flou, aucun filtre, aucun clip-path sur un parent de la vidéo. Les facettes
   du cadre sont une couche à côté (.av-facet), sous l'image. Les seules animations permanentes
   (halo) n'animent qu'opacity / transform et s'arrêtent dès que la vidéo joue.
   ══════════════════════════════════════════════════════════════════════════ */
.av {
  --av-bg: #080516; --av-surface: #170f2a; --av-raise: #241738; --av-ame: #8755d7;
  --av-gold: #c9a45b; --av-gold-l: #f0d895; --av-text: #f4eff9; --av-text2: #b8abc9;
  --av-cut: 16px;
  --av-cuts: polygon(var(--av-cut) 0, calc(100% - var(--av-cut)) 0, 100% var(--av-cut), 100% calc(100% - var(--av-cut)), calc(100% - var(--av-cut)) 100%, var(--av-cut) 100%, 0 calc(100% - var(--av-cut)), 0 var(--av-cut));
  position: relative; display: block; box-sizing: border-box; width: 100%; padding: 12px 14px 14px; color: var(--av-text); text-align: left;
  border: 1px solid rgba(201, 164, 91, .26); border-radius: 20px;
  background: linear-gradient(175deg, var(--av-surface), var(--av-bg) 70%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 26px 70px -28px #000;
}
.av *, .av *::before, .av *::after { box-sizing: border-box; }
.av [hidden] { display: none !important; }
.av-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: 0; }

/* ── en-tête ── */
.av-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 0 2px 8px; }
.av-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.av-logo { display: block; width: 30px; height: 30px; flex: none; color: var(--av-gold-l); }
.av-logo svg { display: block; width: 100%; height: 100%; }
.av-brand > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.av-brand b { font: 600 14px/1.1 "Cinzel", "Cinzel Fallback", serif; letter-spacing: .2em; color: var(--av-gold-l); white-space: nowrap; }
.av-brand small { font: italic 14px/1.15 "Cormorant Garamond", serif; color: var(--av-text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.av-head-b { display: flex; align-items: center; gap: 2px; flex: none; }

/* ── le cristal : cadre facetté AUTOUR de l'image et de ses commandes ── */
.av-crystal { position: relative; isolation: isolate; padding: 13px 13px 8px; }
.av-halo {
  position: absolute; inset: -14px; z-index: -3; pointer-events: none; border-radius: 30px; opacity: .55;
  background: radial-gradient(closest-side, rgba(135, 85, 215, .34), rgba(135, 85, 215, .1) 70%, transparent);
}
.av-facet {
  position: absolute; inset: 0; z-index: -2; pointer-events: none; clip-path: var(--av-cuts);
  background: conic-gradient(from 200deg at 50% 50%, #3a2363, #8755d7 9%, #2c1a4c 17%, #6e45b4 29%, #24153f 41%, #8755d7 52%, #33205a 63%, #7a4fc4 76%, #281846 88%, #3a2363);
}
.av-facet::before {   /* filet d'or ancien */
  content: ""; position: absolute; inset: 5px; clip-path: var(--av-cuts);
  background: linear-gradient(135deg, var(--av-gold-l), var(--av-gold) 30%, #7d6333 52%, var(--av-gold) 72%, var(--av-gold-l));
}
.av-facet::after {    /* le fond du cristal, avec des gravures très fines sur les bords */
  content: ""; position: absolute; inset: 6px; clip-path: var(--av-cuts);
  background:
    repeating-linear-gradient(90deg, rgba(240, 216, 149, .3) 0 1px, transparent 1px 13px) 0 1px / 100% 3px no-repeat,
    repeating-linear-gradient(90deg, rgba(240, 216, 149, .3) 0 1px, transparent 1px 13px) 0 calc(100% - 1px) / 100% 3px no-repeat,
    linear-gradient(180deg, #0b0620, #120a24);
}
.av-fili { position: absolute; z-index: -1; display: block; width: 58px; height: 58px; color: var(--av-gold-l); pointer-events: none; }
.av-fili svg { display: block; width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1; opacity: .75; }
.av-fili circle { fill: currentColor; stroke: none; }
.av-fili.tl { left: 2px; top: 2px; } .av-fili.tr { right: 2px; top: 2px; transform: scaleX(-1); }
.av-fili.bl { left: 2px; bottom: 2px; transform: scaleY(-1); } .av-fili.br { right: 2px; bottom: 2px; transform: scale(-1); }

/* ── l'image ── */
.av-stage {
  position: relative; overflow: hidden; aspect-ratio: 16 / 9; outline: none; background: #000;
  box-shadow: 0 0 0 1px rgba(240, 216, 149, .34); -webkit-tap-highlight-color: transparent; contain: layout paint; cursor: pointer;
}
.av-stage:focus-visible { box-shadow: 0 0 0 2px var(--av-gold-l); }
.av.is-empty .av-stage { cursor: default; background: radial-gradient(110% 100% at 50% 40%, #120a26, #07041a 62%, #030210); }
.av-poster, .av-video { position: absolute; inset: 0; width: 100%; height: 100%; display: block; border: 0; object-fit: contain; }
.av-poster { transition: opacity .25s ease; }
.av-poster.is-off { opacity: 0; }
.av-media:empty { display: none; }
.av.is-idle .av-media { opacity: 0; }
.av-video::cue { font: 500 1em/1.35 system-ui, sans-serif; color: #fff; background: rgba(8, 5, 22, .78); }

/* voile cristallin : seulement au repos, jamais sur une vidéo en lecture */
.av-veil {
  position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .25s ease;
  background: radial-gradient(80% 70% at 50% 46%, transparent 40%, rgba(8, 5, 22, .6) 100%), linear-gradient(125deg, rgba(255, 255, 255, .1), transparent 30%, rgba(135, 85, 215, .1) 55%, rgba(240, 216, 149, .08) 78%, transparent);
}
.av.is-idle .av-veil { opacity: 1; }

/* sceau de lecture */
.av-sigil {
  position: absolute; left: 50%; top: 50%; z-index: 3; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 0; border: 0; background: none; cursor: pointer; color: var(--av-gold-l);
}
.av-sigil svg { display: block; width: clamp(72px, 11vw, 112px); height: auto; overflow: visible; transition: transform .16s ease; }
.av-sigil .s0 { fill: rgba(8, 5, 22, .62); stroke: rgba(240, 216, 149, .85); stroke-width: 1.4; }
.av-sigil .s1 { fill: none; stroke: rgba(240, 216, 149, .35); stroke-width: 1; stroke-dasharray: 2 5; }
.av-sigil .s2 { fill: none; stroke: rgba(201, 164, 91, .4); stroke-width: 1; }
.av-sigil .s3 { fill: var(--av-gold-l); stroke: #fff6d9; stroke-width: .8; stroke-linejoin: round; }
.av-sigil-t {
  font: 600 12px/1 "Cinzel", "Cinzel Fallback", serif; letter-spacing: .18em; text-transform: uppercase; white-space: nowrap;
  padding: 7px 12px; border-radius: 999px; background: rgba(8, 5, 22, .78); border: 1px solid rgba(201, 164, 91, .4);
}
.av-sigil-t:empty { display: none; }
.av-sigil:hover svg, .av-sigil:focus-visible svg { transform: scale(1.06); }
.av-sigil:focus-visible { outline: none; }
.av-sigil:focus-visible .s0 { stroke: #fff; stroke-width: 2.5; }
.av[data-state="PAUSED"] .av-sigil svg { width: clamp(56px, 7vw, 76px); }

/* attente réelle (chargement, mémoire tampon) */
.av-wait { position: absolute; inset: 0; z-index: 2; display: none; place-content: center; justify-items: center; gap: 12px; pointer-events: none; }
.av-slow { display: none; max-width: 30ch; padding: 6px 12px; border-radius: 10px; text-align: center; font: italic 16px/1.3 "Cormorant Garamond", serif; color: var(--av-text); background: rgba(8, 5, 22, .78); }
.av.is-slow .av-slow { display: block; }
.av-wait i { width: 60px; height: 60px; border-radius: 50%; border: 2px solid rgba(240, 216, 149, .16); border-top-color: var(--av-gold-l); border-right-color: var(--av-ame); animation: avSpin .9s linear infinite; }
.av[data-state="PORTAL_ACTIVATING"] .av-wait, .av[data-state="LOADING"] .av-wait, .av[data-state="BUFFERING"] .av-wait { display: grid; }

.av-flash {
  position: absolute; top: 50%; z-index: 4; transform: translateY(-50%); opacity: 0; pointer-events: none;
  font: 600 15px/1 "Cinzel", "Cinzel Fallback", serif; letter-spacing: .08em; color: #fff6d9;
  padding: 12px 16px; border-radius: 999px; background: rgba(8, 5, 22, .74); border: 1px solid rgba(240, 216, 149, .35);
}
.av-flash[data-side="l"] { left: 9%; } .av-flash[data-side="r"] { right: 9%; }
.av-flash.on { animation: avFlash .55s ease-out; }

/* panneaux : fin, erreur ; emplacement du portail en veille */
.av-over, .av-slot { position: absolute; inset: 0; z-index: 5; cursor: default; }
.av-over {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 18px; text-align: center;
  background: radial-gradient(90% 90% at 50% 50%, rgba(23, 15, 42, .84), rgba(8, 5, 22, .96));
}
.av-over-k { margin: 0; font: 600 clamp(13px, 1.4vw, 16px)/1.3 "Cinzel", "Cinzel Fallback", serif; letter-spacing: .18em; text-transform: uppercase; color: var(--av-gold-l); }
.av-over-b { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; max-width: 100%; }
/* fin d'épisode : la suite, le compte à rebours, les suggestions */
.av-end { overflow-y: auto; justify-content: safe center; }
.av-up { display: flex; align-items: center; gap: 14px; max-width: min(100%, 520px); text-align: left; }
.av-up[hidden] { display: none; }
.av-up-p { flex: none; width: clamp(96px, 24%, 170px); aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; border: 1px solid rgba(240, 216, 149, .35); }
.av-up-x { display: grid; gap: 3px; min-width: 0; }
.av-up-k { font: 600 11px/1.3 "Cinzel", "Cinzel Fallback", serif; letter-spacing: .12em; text-transform: uppercase; color: var(--av-gold); }
.av-up-n { font: 600 19px/1.25 "Cormorant Garamond", serif; color: var(--av-text); overflow-wrap: anywhere; }
.av-up-c { font: 14px/1.3 "Cormorant Garamond", serif; color: var(--av-gold-l); }
.av-up-c i { font-style: normal; font-variant-numeric: tabular-nums; }
.av-sugs { width: 100%; max-width: 760px; }
.av-sugs-k { margin: 6px 0 8px; font: 600 11px/1.3 "Cinzel", "Cinzel Fallback", serif; letter-spacing: .14em; text-transform: uppercase; color: var(--av-gold); }
.av-sugs-l { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 10px; }
.av-sug {
  display: grid; gap: 6px; align-content: start; min-width: 0; padding: 7px; border-radius: 8px; cursor: pointer; text-align: left; color: var(--av-text);
  background: rgba(255, 255, 255, .05); border: 1px solid rgba(240, 216, 149, .2);
}
.av-sug:hover { border-color: rgba(240, 216, 149, .6); }
.av-sug:focus-visible { outline: 2px solid var(--av-gold-l); outline-offset: 1px; }
.av-sug img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 5px; display: block; }
.av-sug span { display: grid; gap: 2px; min-width: 0; }
.av-sug b { font: 600 15px/1.2 "Cormorant Garamond", serif; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.av-sug small { font: 13px/1.25 "Cormorant Garamond", serif; color: #b8abc9; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.av-err-t { margin: 0; max-width: 46ch; font: 17px/1.45 "Cormorant Garamond", serif; color: var(--av-text); }
.av-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; max-width: 100%; padding: 9px 15px; cursor: pointer;
  font: 600 12.5px/1.1 "Cinzel", "Cinzel Fallback", serif; letter-spacing: .07em; color: #e6daf7;
  background: rgba(23, 15, 42, .8); border: 1px solid rgba(201, 164, 91, .34); border-radius: 999px;
}
.av-btn svg { width: 18px; height: 18px; flex: none; fill: currentColor; }
.av-btn svg .o { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.av-btn span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.av-btn:hover { color: var(--av-gold-l); border-color: rgba(240, 216, 149, .65); }
.av-gold { color: #1b0f05; background: linear-gradient(180deg, var(--av-gold-l), var(--av-gold)); border-color: var(--av-gold-l); }
.av-gold:hover { color: #1b0f05; background: linear-gradient(180deg, #fff1c4, #d8b56a); }

/* ── commandes, sous l'image ── */
.av-bar { position: relative; padding: 7px 2px 0; }
.av-tl { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.av-tc, .av-td { min-width: 44px; font: 600 14px/1 "Cinzel", "Cinzel Fallback", serif; font-variant-numeric: tabular-nums; letter-spacing: .03em; white-space: nowrap; }
.av-tc { color: var(--av-gold-l); } .av-td { color: var(--av-text2); text-align: right; }

/* frise temporelle : rail améthyste, portions chargées, progression dorée, curseur lumineux */
.av-rail { position: relative; height: 26px; }
.av-rail::before, .av-buf { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 6px; margin-top: -3px; border-radius: 6px; pointer-events: none; }
.av-rail::before { background: rgba(135, 85, 215, .4); box-shadow: 0 0 0 1px rgba(135, 85, 215, .16); }
.av-pos, .av-volr {
  -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 26px; margin: 0; padding: 0; background: transparent; cursor: pointer; --p: 0%;
}
.av-pos { position: absolute; inset: 0; }
.av-pos:disabled { cursor: default; }
.av-pos::-webkit-slider-runnable-track { height: 6px; border-radius: 6px; background: linear-gradient(90deg, var(--av-gold), var(--av-gold-l)) 0 0 / var(--p) 100% no-repeat; }
.av-pos::-moz-range-track { height: 6px; background: transparent; }
.av-pos::-moz-range-progress { height: 6px; border-radius: 6px; background: var(--av-gold-l); }
.av-pos::-webkit-slider-thumb, .av-volr::-webkit-slider-thumb {
  -webkit-appearance: none; width: 16px; height: 16px; margin-top: -5px; border: 0; border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #fff6d9, var(--av-gold)); box-shadow: 0 0 0 3px rgba(135, 85, 215, .45), 0 0 10px rgba(240, 216, 149, .6); transition: transform .1s ease;
}
.av-pos::-moz-range-thumb, .av-volr::-moz-range-thumb { width: 16px; height: 16px; border: 0; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #fff6d9, var(--av-gold)); box-shadow: 0 0 0 3px rgba(135, 85, 215, .45); }
.av-pos:disabled::-webkit-slider-thumb { opacity: 0; }
.av-pos:disabled::-moz-range-thumb { opacity: 0; }
.av-pos:not(:disabled):hover::-webkit-slider-thumb, .av-pos:focus-visible::-webkit-slider-thumb { transform: scale(1.25); }
.av-pos:focus-visible, .av-volr:focus-visible { outline: 2px solid var(--av-gold-l); outline-offset: 1px; border-radius: 6px; }
.av.no-seek .av-rail { opacity: .5; }
.av-tip {
  position: absolute; bottom: calc(100% + 2px); transform: translateX(-50%); padding: 4px 8px; border-radius: 7px; pointer-events: none; z-index: 7;
  font: 600 12px/1 system-ui, sans-serif; font-variant-numeric: tabular-nums; color: var(--av-text); background: var(--av-raise); border: 1px solid rgba(201, 164, 91, .45);
}

.av-row { display: flex; align-items: center; gap: 4px; padding-top: 2px; }
.av-sp { flex: 1; }
.av-ib {
  display: inline-grid; place-items: center; flex: none; width: 42px; height: 42px; padding: 0; cursor: pointer;
  border: 1px solid transparent; border-radius: 12px; background: none; color: var(--av-text); transition: background .14s ease, border-color .14s ease, color .14s ease;
}
.av-ib svg { width: 22px; height: 22px; fill: currentColor; }
.av-ib svg .o { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.av-ib svg text { font: 700 6.4px/1 system-ui, sans-serif; fill: currentColor; text-anchor: middle; }
.av-ib:hover:not(:disabled) { color: var(--av-gold-l); background: rgba(255, 255, 255, .06); border-color: rgba(201, 164, 91, .35); }
.av-ib:disabled { opacity: .4; cursor: default; }
.av-ib[aria-pressed="true"], .av-ib[aria-expanded="true"] { color: var(--av-gold-l); border-color: rgba(240, 216, 149, .55); }
.av-txt { width: auto; min-width: 46px; padding: 0 8px; font: 600 14px/1 "Cinzel", "Cinzel Fallback", serif; letter-spacing: .04em; }
.av-main {
  width: 54px; height: 54px; margin: 0 4px; border-radius: 50%; color: #fff;
  background: radial-gradient(circle at 35% 28%, #a97cec, var(--av-ame) 55%, #5a33a3);
  border: 1px solid rgba(240, 216, 149, .6); box-shadow: 0 0 0 3px rgba(135, 85, 215, .2), 0 6px 18px -6px rgba(135, 85, 215, .8);
}
.av-main svg { width: 26px; height: 26px; }
.av-main:hover:not(:disabled) { color: #fff; background: radial-gradient(circle at 35% 28%, #bb95f2, #9465e0 55%, #6438b4); border-color: var(--av-gold-l); }
.av-vol { display: flex; align-items: center; margin-left: 4px; }
.av-volr { width: 84px; height: 22px; margin-left: 2px; }
.av-volr::-webkit-slider-runnable-track { height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--av-gold-l) 0 var(--p), rgba(135, 85, 215, .45) var(--p)); }
.av-volr::-moz-range-track { height: 3px; border-radius: 3px; background: rgba(135, 85, 215, .45); }
.av-volr::-moz-range-progress { height: 3px; border-radius: 3px; background: var(--av-gold-l); }
.av-volr::-webkit-slider-thumb { width: 12px; height: 12px; margin-top: -4.5px; }

/* ── panneau d'options ── */
.av-panel {
  position: absolute; right: 2px; bottom: calc(100% + 8px); z-index: 8; width: min(310px, 100%); max-height: min(60vh, 440px); overflow: auto; padding: 8px;
  border-radius: 14px; background: var(--av-surface); border: 1px solid rgba(201, 164, 91, .45); box-shadow: 0 18px 40px rgba(0, 0, 0, .65);
}
.av-panel section + section { margin-top: 6px; padding-top: 6px; border-top: 1px solid rgba(201, 164, 91, .16); }
.av-panel h4 { margin: 2px 8px 5px; font: 600 10.5px/1.2 "Cinzel", "Cinzel Fallback", serif; letter-spacing: .2em; text-transform: uppercase; color: var(--av-gold); }
.av-speeds { display: flex; flex-wrap: wrap; gap: 4px; padding: 0 4px 4px; }
.av-chip {
  min-width: 52px; min-height: 36px; padding: 0 6px; cursor: pointer; border: 1px solid rgba(135, 85, 215, .4); border-radius: 9px; background: var(--av-raise); color: var(--av-text);
  font: 600 13px/1 "Cinzel", "Cinzel Fallback", serif;
}
.av-chip:hover { border-color: var(--av-gold-l); }
.av-chip[aria-pressed="true"] { color: #1b0f05; background: linear-gradient(180deg, var(--av-gold-l), var(--av-gold)); border-color: var(--av-gold-l); }
.av-pi {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 40px; padding: 8px 10px; cursor: pointer; text-align: left; text-decoration: none;
  border: 0; border-radius: 9px; background: none; color: var(--av-text); font: 16.5px/1.15 "Cormorant Garamond", serif;
}
.av-pi:hover { background: var(--av-raise); color: var(--av-gold-l); }
.av-pi em { font: 600 11px/1 system-ui, sans-serif; color: var(--av-text2); padding: 3px 6px; border-radius: 5px; border: 1px solid rgba(255, 255, 255, .15); }
.av-pi[aria-pressed="true"] { color: var(--av-gold-l); }
.av-pi[aria-pressed="true"]::after { content: "✦"; font-size: 12px; }
.av-note { margin: 0 10px 6px; font: 16px/1.3 "Cormorant Garamond", serif; color: var(--av-text2); }
.av-ib:focus-visible, .av-btn:focus-visible, .av-chip:focus-visible, .av-pi:focus-visible { outline: 2px solid var(--av-gold-l); outline-offset: 1px; }

/* ── états ── */
.av-halo { transition: opacity .3s ease; }
.av.is-idle .av-halo { animation: avBreath 3.6s ease-in-out infinite alternate; }
.av[data-state="PORTAL_ACTIVATING"] .av-halo, .av[data-state="LOADING"] .av-halo { opacity: 1; }
.av[data-state="PLAYING"] .av-halo { opacity: .18; }
.av[data-state="PLAYING"] .av-fili { opacity: .45; }
.av.is-empty .av-bar, .av.is-empty .av-head-b { display: none; }
.av.is-empty { padding-bottom: 12px; }
.av.is-empty .av-crystal { padding-bottom: 13px; }
.av.is-embed .av-bar { display: none; }   /* YouTube / Vimeo gardent leurs propres commandes */
.av.is-embed .av-crystal { padding-bottom: 13px; }
.av.is-idle [data-act="close"] { display: none; }
.av-stage.is-shift::after {
  content: ""; position: absolute; inset: 0; z-index: 7; pointer-events: none;
  background: radial-gradient(60% 60% at 50% 50%, rgba(240, 216, 149, .3), rgba(135, 85, 215, .3) 50%, rgba(8, 5, 22, .9));
  animation: avFade .36s ease-out forwards;
}

/* ── mode cinéma : la page s'efface, la vidéo entière, sans plein écran ── */
/* mini-lecteur : la vidéo continue quand la page change d'onglet (html a zoom 1.15 sur AKASHA : tailles en px rendues plus grandes) */
.av.is-mini:not(.is-fs) {
  position: fixed; left: 12px; bottom: calc(92px + env(safe-area-inset-bottom)); z-index: 9500; width: min(250px, 62vw); margin: 0; padding: 6px 8px 8px;
  border-radius: 14px; background: var(--av-bg); box-shadow: 0 10px 34px rgba(0, 0, 0, .6);
}
.av.is-mini:not(.is-fs) .av-halo, .av.is-mini:not(.is-fs) .av-facet, .av.is-mini:not(.is-fs) .av-fili, .av.is-mini:not(.is-fs) .av-brand small,
.av.is-mini:not(.is-fs) .av-logo, .av.is-mini:not(.is-fs) [data-act="cinema"], .av.is-mini:not(.is-fs) .av-volr, .av.is-mini:not(.is-fs) .av-txt,
.av.is-mini:not(.is-fs) [data-act="panel"], .av.is-mini:not(.is-fs) .av-pipb, .av.is-mini:not(.is-fs) [data-act="cc"],
.av.is-mini:not(.is-fs) [data-act="back"], .av.is-mini:not(.is-fs) [data-act="fwd"], .av.is-mini:not(.is-fs) .av-sugs, .av.is-mini:not(.is-fs) .av-up-p,
.av.is-mini:not(.is-fs) .av-tl { display: none; }
.av.is-mini:not(.is-fs) .av-head { min-height: 0; padding: 0 0 4px; }
.av.is-mini:not(.is-fs) .av-brand b { font-size: 10px; letter-spacing: .12em; }
.av.is-mini:not(.is-fs) .av-crystal { padding: 0; border: 0; background: none; box-shadow: none; clip-path: none; }
.av.is-mini:not(.is-fs) .av-bar { padding: 4px 0 0; }
.av.is-mini:not(.is-fs) .av-ib { width: 34px; height: 34px; min-width: 34px; min-height: 34px; }
.av.is-mini:not(.is-fs) .av-ib.av-main { width: 38px; height: 38px; }
.av.is-mini:not(.is-fs) .av-over { gap: 4px; padding: 6px; }
.av.is-mini:not(.is-fs) .av-over-k { font-size: 10px; }
.av.is-mini:not(.is-fs) .av-btn { min-height: 30px; padding: 3px 9px; font-size: 10.5px; }
.av.is-mini:not(.is-fs) .av-up-n { font-size: 13px; }
/* crédit d'une vidéo : cartouche gravé, à part de la description */
.av-cr { margin: 14px 0 0; padding: 11px 14px 12px; border: 1px solid rgba(201, 164, 91, .42); border-radius: 4px 14px 4px 14px; background: linear-gradient(135deg, rgba(135, 85, 215, .13), rgba(201, 164, 91, .06)); }
.av-cr-k { display: block; margin: 0 0 6px; font: 600 10.5px/1.4 "Cinzel", "Cinzel Fallback", serif; letter-spacing: .16em; text-transform: uppercase; color: var(--av-gold-l); }
.av-cr-t { margin: 0 0 9px; font: italic 500 16.5px/1.35 "Cormorant Garamond", serif; color: var(--av-text); overflow-wrap: anywhere; white-space: pre-line; }
.av-cr-t:last-child { margin-bottom: 0; }
.av-cr-l { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.av-cr-l svg { width: 19px; height: 19px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.av-cr-s, .av-cr-w { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; color: var(--av-gold-l); text-decoration: none; border: 1px solid rgba(201, 164, 91, .5); background: rgba(8, 5, 22, .55); transition: color .15s, border-color .15s, background .15s; }
.av-cr-s { width: 40px; border-radius: 50%; }
.av-cr-w { gap: 7px; max-width: 100%; padding: 0 14px 0 11px; border-radius: 999px; font: 600 11.5px/1.2 "Cinzel", "Cinzel Fallback", serif; letter-spacing: .05em; }
.av-cr-w span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.av-cr-s:hover, .av-cr-w:hover { color: #fff; border-color: var(--av-gold-l); background: rgba(135, 85, 215, .32); }
.av-cr-s:focus-visible, .av-cr-w:focus-visible { outline: 2px solid var(--av-gold-l); outline-offset: 2px; }
/* colonne à côté du lecteur : la fiche reste à la hauteur de la vidéo, le crédit se fait compact */
@media (min-width: 1360px) {
  .vth-info:has(.av-cr) .vth-keysd { display: none; }
  .vth-info:has(.av-cr) .vth-desc { -webkit-line-clamp: 2; }
  .vth-credit .av-cr { margin-top: 10px; padding: 8px 11px 9px; }
  .vth-credit .av-cr-k { margin-bottom: 3px; font-size: 9.5px; }
  .vth-info:has(.av-cr) .vth-acts { gap: 6px; }
  .vth-info:has(.av-cr) .vth-acts .vth-btn { min-height: 46px; }
  .vth-info:has(.av-cr) .vth-acts .vth-wide { min-height: 38px; }
  .vth-info:has(.av-cr) .vth-acts .vth-main { min-height: 44px; }
  .vth-credit .av-cr-t { margin-bottom: 6px; font-size: 15.5px; line-height: 1.25; }
  .vth-credit .av-cr-l { flex-wrap: nowrap; gap: 6px; }
  .vth-credit .av-cr-l:has(.av-cr-s:nth-child(6)) { flex-wrap: wrap; }
  .vth-credit .av-cr-l svg { width: 16px; height: 16px; }
  .vth-credit .av-cr-s { flex: none; width: 32px; min-height: 32px; }
  .vth-credit .av-cr-w { flex: 0 1 auto; min-width: 32px; min-height: 32px; padding: 0 11px 0 8px; font-size: 10px; }
}
/* écran bas : le type, la durée, la date et les vues tiennent sur une ligne */
@media (min-width: 1360px) and (max-height: 820px) {
  .vth-info:has(.av-cr) .vth-facts { grid-template-columns: repeat(4, auto); justify-content: space-between; margin-top: 6px; padding-top: 7px; gap: 4px 10px; }
  .vth-info:has(.av-cr) .vth-facts > :nth-child(n+5) { grid-column: 1 / -1; }
  .vth-info:has(.av-cr) .vth-title { margin-bottom: 4px; }
  .vth-info:has(.av-cr) .vth-acts .vth-btn:not(.vth-main):not(.vth-wide) { min-height: 40px; }
}
.av.is-cinema, .av[popover].is-cinema {
  position: fixed; inset: 0; z-index: 2147483000; display: flex; flex-direction: column; width: auto; height: auto; max-width: none; max-height: none; margin: 0; overflow: hidden;
  padding: max(6px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
  border: 0; border-radius: 0; background: #030209; box-shadow: none;
}
.av[popover]::backdrop { background: #030209; }
.av.is-cinema .av-halo, .av.is-cinema .av-facet, .av.is-cinema .av-fili { display: none; }
.av.is-cinema .av-crystal { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 0; }
.av.is-cinema .av-stage { flex: 1; min-height: 0; aspect-ratio: auto; box-shadow: none; }
.av.is-cinema .av-panel { max-height: 60vh; }
.av.is-cinema .av-head { padding-bottom: 4px; min-height: 40px; }
html.av-cinema-on { overflow: hidden; }

/* ── plein écran : l'image remplit tout, les commandes passent dessus et se masquent ── */
.av:fullscreen, .av:-webkit-full-screen { width: 100%; height: 100%; max-width: none; padding: 0; border: 0; border-radius: 0; background: #000; box-shadow: none; }
.av.is-fs .av-head, .av.is-fs .av-halo, .av.is-fs .av-facet, .av.is-fs .av-fili { display: none; }
.av.is-fs .av-crystal { position: absolute; inset: 0; padding: 0; }
.av.is-fs .av-stage { position: absolute; inset: 0; aspect-ratio: auto; box-shadow: none; }
.av.is-fs .av-bar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 6;
  padding: 44px max(22px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(22px, env(safe-area-inset-left));
  background: linear-gradient(180deg, transparent, rgba(8, 5, 22, .7) 45%, rgba(8, 5, 22, .94)); transition: opacity .18s ease;
}
.av.is-fs .av-panel { right: 22px; bottom: calc(100% - 40px); }
.av.is-fs.ctl-off .av-bar { opacity: 0; pointer-events: none; }
.av.is-fs.ctl-off .av-stage { cursor: none; }

/* ── téléphone ── */
@media (max-width: 680px) {
  /* 05/11 : AKASHA a un zoom de 1,15 : à 360 px, six boutons fixes débordaient du cadre. Ils rétrécissent ensemble,
     et restent à 44 px réels ou presque. */
  .av:not(.is-cinema):not(.is-fs) .av-bar { padding-left: 5px; padding-right: 5px; }
  .av-row > .av-ib { flex: 0 1 44px; width: auto; min-width: 0; }
  .av-row > .av-main { flex: 0 1 52px; height: auto; aspect-ratio: 1; }
  .av { --av-cut: 10px; padding: 8px 8px 10px; border-radius: 16px; }
  .av-head { min-height: 40px; padding-bottom: 6px; }
  .av-logo { width: 26px; height: 26px; }
  .av-brand b { font-size: 12.5px; letter-spacing: .16em; }
  .av-brand small { font-size: 13px; }
  .av-crystal { padding: 9px 9px 6px; }
  .av-facet::before { inset: 3px; } .av-facet::after { inset: 4px; }
  .av-fili { width: 40px; height: 40px; }
  .av-tl { gap: 8px; } .av-tc, .av-td { min-width: 36px; font-size: 12px; }
  .av-row { justify-content: space-between; gap: 0; }
  .av-sp { display: none; }
  .av-ib { width: 44px; height: 44px; }
  .av-main { width: 52px; height: 52px; margin: 0; }
  .av-volr { display: none; }   /* le volume se règle avec les boutons de l'appareil */
  .av-vol { margin: 0; }
  .av-txt { min-width: 44px; padding: 0 2px; font-size: 13px; }
  .av-pipb { display: none; }
  /* feuille posée en bas de l'écran : l'image et les commandes restent visibles au-dessus */
  .av-panel { position: fixed; inset: auto 8px max(8px, env(safe-area-inset-bottom)); margin: 0; width: auto; max-height: 40dvh; color: inherit; overscroll-behavior: contain; }
  .av.is-fs .av-panel { position: absolute; right: 8px; left: 8px; width: auto; bottom: calc(100% - 40px); max-height: 60vh; }
  .av-sigil svg { width: 70px; }
  .av-sigil-t { font-size: 10.5px; letter-spacing: .13em; padding: 6px 10px; }
  .av-over { gap: 8px; padding: 10px; }
  .av-btn { min-height: 42px; padding: 8px 12px; font-size: 11.5px; }
  .av-err-t { font-size: 15.5px; }
  .av-up-n { font-size: 16px; line-height: 1.15; }
  .av-up-p { width: 72px; }
  /* décompte au téléphone : tout tient sans défiler, Lancer et Annuler toujours visibles */
  .av-end:has(.av-up:not([hidden])) .av-end-k { display: none; }
  .av-end:has([data-act="cancel-auto"]:not([hidden])) [data-act="replay"] { display: none; }
  .av-end:has([data-act="cancel-auto"]:not([hidden])) .av-btn { min-height: 38px; padding: 6px 14px; }
  .av-sugs-l { grid-auto-flow: row; grid-auto-columns: auto; gap: 6px; }
  .av-sug { padding: 6px 8px; }
  .av-sug img { display: none; }
  .av.is-empty .av-stage { aspect-ratio: 4 / 5; }
}
@media (max-width: 440px) {
  .av-txt, .av-vol { display: none; }   /* vitesse dans les options, volume sur l'appareil */
  .av.has-eps [data-act="back"], .av.has-eps [data-act="fwd"] { display: none; }   /* ±10 s : double toucher sur l'image */
}
@media (hover: none) { .av-volr { display: none; } }
@media (orientation: landscape) and (max-height: 520px) {
  .av:not(.is-fs):not(.is-cinema) .av-head { display: none; }
  .av.is-cinema .av-head { min-height: 0; padding: 0; position: absolute; right: 6px; top: 4px; z-index: 9; }
  .av.is-cinema .av-brand { display: none; }
  /* tout le lecteur tient sous l'en-tête d'AKASHA (dvh ne suit pas le zoom 1.15 de la page) ; au repos, le miroir suffit : il lance la lecture */
  .av:not(.is-fs):not(.is-cinema):not(.is-mini) .av-stage { max-height: calc(100dvh / 1.15 - 198px); margin-inline: auto; }
  .av.is-idle:not(.is-fs):not(.is-cinema):not(.is-mini) .av-stage { max-height: calc(100dvh / 1.15 - 107px); }
  .av.is-idle:not(.is-fs):not(.is-cinema):not(.is-mini) .av-bar { display: none; }
  .av.is-cinema .av-panel { max-height: 56dvh; }
  /* 05/11 : téléphone en paysage : l'image prend tout l'écran, comme en plein écran (commandes par-dessus, qui s'effacent) */
  .av.is-cinema { padding: 0; }
  .av.is-cinema .av-crystal { position: absolute; inset: 0; padding: 0; }
  .av.is-cinema .av-stage { position: absolute; inset: 0; }
  .av.is-cinema .av-bar {
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 6;
    padding: 30px max(16px, env(safe-area-inset-right)) max(6px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
    background: linear-gradient(180deg, transparent, rgba(8, 5, 22, .7) 45%, rgba(8, 5, 22, .94)); transition: opacity .18s ease;
  }
  .av.is-cinema.ctl-off .av-bar, .av.is-cinema.ctl-off .av-head { opacity: 0; pointer-events: none; }
  .av.is-cinema .av-head { transition: opacity .18s ease; }
}

/* 05/11 : raccourci installé, resté en portrait : le lecteur se tourne lui-même (is-turned, aether-vision.js cssTurn).
   Zoom de 1,15 d'AKASHA : 100dvh vaut 1,15 écran, d'où la division. */
@media (orientation: portrait) {
  .av.is-cinema.is-turned, .av[popover].is-cinema.is-turned {
    --av-z: 1.15; inset: auto; top: 0; left: 0; display: block; padding: 0; transform-origin: 0 0;
    width: calc(100dvh / var(--av-z)); height: calc(100dvw / var(--av-z));
  }
  .av.is-turned[data-turn="r"] { transform: translateX(calc(100dvw / var(--av-z))) rotate(90deg); }
  .av.is-turned[data-turn="l"] { transform: translateY(calc(100dvh / var(--av-z))) rotate(-90deg); }
  .av.is-turned .av-crystal, .av.is-turned .av-stage { position: absolute; inset: 0; padding: 0; }
  .av.is-turned .av-head { min-height: 0; padding: 0; position: absolute; right: 6px; top: 4px; z-index: 9; transition: opacity .18s ease; }
  .av.is-turned .av-brand { display: none; }
  .av.is-turned .av-bar {
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 6; padding: 30px 16px 6px;
    background: linear-gradient(180deg, transparent, rgba(8, 5, 22, .7) 45%, rgba(8, 5, 22, .94)); transition: opacity .18s ease;
  }
  .av.is-turned.ctl-off .av-bar, .av.is-turned.ctl-off .av-head { opacity: 0; pointer-events: none; }
}

@keyframes avSpin { to { transform: rotate(360deg); } }
@keyframes avBreath { from { opacity: .42; transform: scale(.99); } to { opacity: .8; transform: scale(1.01); } }
@keyframes avFade { from { opacity: 1; } to { opacity: 0; } }
@keyframes avFlash { 0% { opacity: 0; } 25% { opacity: 1; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .av.is-idle .av-halo, .av-stage.is-shift::after, .av-flash.on { animation: none; }
  .av-wait i { animation-duration: 2.4s; }
  .av-poster, .av-halo, .av-veil, .av-ib, .av.is-fs .av-bar { transition: none; }
}
