
.vis {
  --vis-lin: #f3ecdc; --vis-lin-2: rgba(243, 236, 220, .78); --vis-miel: #e3b06a; --vis-trait: rgba(243, 236, 220, .18);
  --vis-ease: cubic-bezier(.22, .8, .24, 1);
  position: fixed; inset: 0; z-index: 400; display: grid; grid-template-rows: auto 1fr auto;
  background: rgba(8, 15, 11, .94); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  color: var(--vis-lin); font-family: "Manrope", "Segoe UI", system-ui, sans-serif;
  opacity: 0; transition: opacity .32s ease;
}
.vis[hidden] { display: none; }
.vis--ouverte { opacity: 1; }
html.vis-ouverte, html.vis-ouverte body { overflow: hidden; }

.vis__haut { display: flex; align-items: center; gap: 18px; padding: 16px clamp(16px, 3vw, 32px); }
.vis__titre { margin: 0; font-family: "Fraunces", Georgia, serif; font-size: clamp(1.05rem, 1.6vw, 1.35rem); font-weight: 400; }
.vis__compte { margin: 0 0 0 auto; font-size: .78rem; letter-spacing: .16em; font-weight: 700; color: var(--vis-lin-2); font-variant-numeric: tabular-nums; }
.vis__fermer, .vis__fleche { display: grid; place-items: center; border: 0; padding: 0; cursor: pointer; color: var(--vis-lin);
  background: rgba(243, 236, 220, .1); box-shadow: inset 0 0 0 1px var(--vis-trait); border-radius: 50%; transition: background .3s, box-shadow .3s, transform .4s var(--vis-ease); }
.vis__fermer { width: 44px; height: 44px; }
.vis__fermer:hover, .vis__fleche:hover { background: rgba(243, 236, 220, .18); box-shadow: inset 0 0 0 1px var(--vis-miel); }
.vis svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.vis__scene { position: relative; overflow: hidden; touch-action: pan-y; }
.vis__img { position: absolute; inset: 0; margin: auto; max-width: calc(100% - 160px); max-height: calc(100% - 12px); width: auto; height: auto;
  border-radius: 10px; box-shadow: 0 30px 90px -30px rgba(0, 0, 0, .8); user-select: none; -webkit-user-drag: none;
  transition: opacity .45s ease, transform .6s var(--vis-ease); }
.vis__img--entre, .vis__img--sort { opacity: 0; transform: translateX(var(--dx, 0)); }

.vis__fleche { position: absolute; top: 50%; width: 56px; height: 56px; transform: translateY(-50%); }
.vis__fleche--prec { left: clamp(12px, 2.4vw, 28px); }
.vis__fleche--suiv { right: clamp(12px, 2.4vw, 28px); }
.vis__fleche--prec:hover { transform: translateY(-50%) translateX(-2px); }
.vis__fleche--suiv:hover { transform: translateY(-50%) translateX(2px); }
.vis--seule .vis__fleche, .vis--seule .vis__vignettes { display: none; }

.vis__vignettes { display: flex; gap: 8px; justify-content: safe center; overflow-x: auto; padding: 14px clamp(16px, 3vw, 32px) calc(18px + env(safe-area-inset-bottom)); scrollbar-width: none; }
.vis__vignettes::-webkit-scrollbar { display: none; }
.vis__vignettes button { flex: 0 0 auto; width: 92px; aspect-ratio: 3 / 2; padding: 0; border: 0; border-radius: 8px; overflow: hidden; cursor: pointer; opacity: .5; background: none; transition: opacity .3s, box-shadow .3s; }
.vis__vignettes button img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vis__vignettes button:hover { opacity: .85; }
.vis__vignettes button.actif { opacity: 1; box-shadow: 0 0 0 2px var(--vis-miel); }
.vis :focus-visible { outline: 2px solid var(--vis-miel); outline-offset: 3px; }

@media (max-width: 760px) {
  .vis__img { max-width: 100%; border-radius: 0; }
  .vis__fleche { width: 44px; height: 44px; background: rgba(8, 15, 11, .55); }
  .vis__fleche--prec { left: 8px; } .vis__fleche--suiv { right: 8px; }
  .vis__vignettes button { width: 64px; }
}
@media (prefers-reduced-motion: reduce) { .vis, .vis__img { transition: none; } }

[data-visionneuse] img, .nid__vue { cursor: zoom-in; }
