/* Visionneuse plein écran des vidéos du fil (static/js/commun/visionneuse-videos.js). Zone toujours sombre
   (.ix-garde-sombre) : au-dessus de l'en-tête, de la barre du bas et des boutons flottants, sous les fenêtres
   Commentaires et Partage (999999) qui s'ouvrent par-dessus. */
.ixv { position: fixed; inset: 0; z-index: 200000; background: var(--ixc-fond,#000); color: var(--ixc-texte,#fff); overflow: hidden; outline: none;
  -webkit-tap-highlight-color: transparent; font-family: inherit;
  /* Variables que .ix-garde-sombre ne remet pas à zéro : la visionneuse est la même dans les deux thèmes */
  --ixc-voile-rgb: initial; --ixc-v-ff4d67: initial; --ixc-v-ff4d67-rgb: initial; }
.ixv *, .ixv *::before, .ixv *::after { box-sizing: border-box; }
.ixv-piste { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; scroll-snap-type: y mandatory;
  overscroll-behavior: contain; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.ixv-piste::-webkit-scrollbar { display: none; }
.ixv-diapo { position: relative; height: 100%; display: flex; justify-content: center; scroll-snap-align: start; scroll-snap-stop: always; }
.ixv-cadre { position: relative; width: 100%; height: 100%; overflow: hidden; background: var(--ixc-fond,#000); }
.ixv-fond { position: absolute; inset: -40px; width: calc(100% + 80px); height: calc(100% + 80px); object-fit: cover; filter: blur(28px) brightness(.45); pointer-events: none; }
.ixv-cadre video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: transparent; display: block; }
/* Toute la vidéo est le bouton lecture / pause */
.ixv .ixv-zone { position: absolute; inset: 0; width: 100% !important; height: 100% !important; min-height: 0 !important; margin: 0; padding: 0 !important; border: 0; border-radius: 0;
  background: transparent; color: var(--ixc-texte,#fff); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.ixv-zone i { width: 76px; height: 76px; border-radius: 50%; background: rgba(0,0,0,0.55); font-size: 1.7rem; display: none; align-items: center; justify-content: center; padding-left: 5px; }
.ixv-diapo.pause .ixv-zone i { display: flex; }
.ixv-voile { position: absolute; left: 0; right: 0; bottom: 0; height: 46%; background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.78) 100%); pointer-events: none; }
.ixv-roue { position: absolute; top: 50%; left: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; border: 3px solid rgba(var(--ixc-encre-rgb,255,255,255),0.25); border-top-color: #FFD73A;
  animation: ixv-tour .8s linear infinite; pointer-events: none; display: none; }
.ixv-diapo.attente .ixv-roue, .ixv-chargement .ixv-roue { display: block; }
@keyframes ixv-tour { to { transform: rotate(360deg); } }
.ixv-chargement { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; pointer-events: none; }
.ixv-chargement .ixv-roue { position: static; margin: 0; }
.ixv-chargement span { font-size: .9rem; color: rgba(var(--ixc-encre-rgb,255,255,255),0.8); }
/* Vidéo illisible */
.ixv-erreur { position: absolute; inset: 0; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px 72px; text-align: center; background: rgba(0,0,0,0.6); }
.ixv-diapo.erreur .ixv-erreur { display: flex; }
.ixv-diapo.erreur .ixv-roue, .ixv-diapo.erreur .ixv-zone, .ixv-diapo.erreur .ixv-progres { display: none; }
.ixv-erreur i { font-size: 2rem; color: rgba(var(--ixc-encre-rgb,255,255,255),0.7); }
.ixv-erreur p { margin: 0; font-size: .95rem; line-height: 1.4; color: var(--ixc-texte,#fff); }
.ixv .ixv-lien-bouton { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border-radius: 10px; background: #FFD73A; color: #100c00 !important;
  font-size: .9rem; font-weight: 800; text-decoration: none !important; }
/* Auteur, titre, description */
.ixv-bas { position: absolute; left: 0; right: 76px; bottom: 0; padding: 0 0 calc(18px + env(safe-area-inset-bottom, 0px)) calc(14px + env(safe-area-inset-left, 0px)); display: flex; flex-direction: column; gap: 8px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.7); pointer-events: none; }
.ixv-bas > * { pointer-events: auto; }
.ixv-auteur { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ixv .ixv-auteur a.qui { display: flex; align-items: center; gap: 10px; min-width: 0; min-height: 44px; color: var(--ixc-texte,#fff) !important; text-decoration: none !important; }
.ixv-photo { flex: 0 0 40px; width: 40px; height: 40px; border-radius: 50%; overflow: hidden; background: var(--ixc-surface-2,#2a2e35); border: 2px solid rgba(var(--ixc-encre-rgb,255,255,255),0.85); display: flex; align-items: center; justify-content: center;
  font-size: 1rem; font-weight: 800; color: var(--ixc-accent-texte,#FFD73A); text-shadow: none; }
.ixv-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ixv-nom { min-width: 0; display: flex; align-items: center; gap: 5px; font-size: .95rem; font-weight: 800; }
.ixv-nom b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 800; }
.ixv-nom img { flex: 0 0 16px; width: 16px; height: 16px; border-radius: 50%; display: block; }
.ixv .ixv-suivre { flex: 0 0 auto; min-height: 44px !important; height: 44px !important; padding: 0 !important; border: 0; background: transparent; cursor: pointer; display: inline-flex; align-items: center; }
.ixv .ixv-suivre span { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; border-radius: 16px; background: #FFD73A; color: #100c00; font-size: .8rem; font-weight: 800; text-shadow: none; white-space: nowrap; }
.ixv .ixv-suivre.fait span { background: rgba(var(--ixc-encre-rgb,255,255,255),0.18); color: var(--ixc-texte,#fff); }
.ixv .ixv-suivre[disabled] { opacity: .6; cursor: default; }
.ixv-titre { margin: 0 !important; font-size: .95rem !important; line-height: 1.3 !important; font-weight: 800 !important; color: var(--ixc-texte,#fff) !important; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ixv-texte { margin: 0; font-size: .88rem; line-height: 1.35; color: rgba(var(--ixc-encre-rgb,255,255,255),0.92); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.ixv .ixv-voir { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin: -8px 0 -10px; font-size: .85rem; font-weight: 700; color: var(--ixc-accent-texte,#FFD73A) !important; text-decoration: none !important; }
/* Actions */
.ixv-actions { position: absolute; right: calc(8px + env(safe-area-inset-right, 0px)); bottom: calc(22px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.ixv .ixv-action { width: 56px !important; min-width: 56px !important; min-height: 56px !important; height: auto !important; margin: 0; padding: 0 !important; border: 0; background: transparent; color: var(--ixc-texte,#fff) !important; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 3px; text-decoration: none !important; }
.ixv-action i { width: 46px; height: 46px; border-radius: 50%; background: rgba(var(--ixc-voile-rgb,0,0,0),0.45); font-size: 1.25rem; display: flex; align-items: center; justify-content: center; }
.ixv-action span { font-size: .75rem; font-weight: 700; line-height: 1.1; text-shadow: 0 1px 3px rgba(0,0,0,0.8); }
.ixv-action.actif i { color: var(--ixc-v-ff4d67,#ff4d67); }
.ixv-action[disabled] { opacity: .6; cursor: default; }
/* Progression */
.ixv-progres { position: absolute; left: 0; right: 0; bottom: env(safe-area-inset-bottom, 0px); height: 3px; background: rgba(var(--ixc-encre-rgb,255,255,255),0.22); pointer-events: none; }
.ixv-progres span { display: block; width: 100%; height: 100%; background: #FFD73A; transform: scaleX(0); transform-origin: left center; }
/* Boutons fixes : fermer, son, précédente / suivante */
.ixv .ixv-rond { position: absolute; z-index: 3; width: 44px !important; height: 44px !important; min-width: 44px !important; min-height: 44px !important; margin: 0; padding: 0 !important; border: 0; border-radius: 50%;
  background: rgba(0,0,0,0.5); color: #fff !important; font-size: 1.1rem; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.ixv-fermer { top: calc(10px + env(safe-area-inset-top, 0px)); left: calc(10px + env(safe-area-inset-left, 0px)); }
.ixv-son { top: calc(10px + env(safe-area-inset-top, 0px)); right: calc(10px + env(safe-area-inset-right, 0px)); }
/* Son refusé par le navigateur : le bouton se signale */
.ixv .ixv-son.muet { width: auto !important; padding: 0 14px !important; border-radius: 22px; gap: 8px; background: #FFD73A; color: #100c00 !important; font-size: .85rem; font-weight: 800; }
.ixv-son b { display: none; font-weight: 800; }
.ixv-son.muet b { display: inline; }
.ixv .ixv-nav { display: none; right: 24px; background: rgba(var(--ixc-encre-rgb,255,255,255),0.14); }
.ixv-nav.haut { top: calc(50% - 52px); } .ixv-nav.bas { top: calc(50% + 8px); }
.ixv .ixv-nav[disabled] { opacity: .3; cursor: default; }
.ixv button:focus-visible, .ixv a:focus-visible { outline: 3px solid #FFD73A; outline-offset: 2px; }
.ixv .ixv-zone:focus-visible { outline-offset: -6px; }
/* Ordinateur : colonne centrée au format vertical, flèches à droite */
@media (min-width: 769px) {
  .ixv-cadre { width: auto; aspect-ratio: 9 / 16; max-width: 100%; border-radius: 0; }
  .ixv .ixv-nav { display: flex; }
  .ixv-fermer { top: 18px; left: 18px; }
  .ixv-son { right: 24px; top: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .ixv-roue { animation-duration: 2.4s; }
  .ixv-piste { scroll-behavior: auto; }
}
