.spin360 {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #f4f5f7;
  cursor: grab;
  touch-action: none;          /* indispensable : sinon le scroll mobile vole le drag */
  user-select: none;
  -webkit-user-select: none;
  outline-offset: 2px;
}
.spin360.is-dragging { cursor: grabbing; }

.spin360__frame {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  pointer-events: none;
  -webkit-user-drag: none;
}

/* barre de prechargement */
.spin360__progress {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: rgba(0, 0, 0, .08);
  transition: opacity .3s;
}
.spin360__progress span {
  display: block;
  height: 100%;
  width: 0;
  background: #d32f2f;
  transition: width .15s linear;
}
.spin360__progress.is-done { opacity: 0; }

/* indication "glissez pour tourner" */
.spin360__hint {
  position: absolute;
  left: 50%; bottom: 14px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .62);
  color: #fff;
  font: 500 13px/1 system-ui, -apple-system, "Segoe UI", sans-serif;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity .35s;
}
.spin360.is-ready .spin360__hint { opacity: 1; }
.spin360 .spin360__hint.is-hidden { opacity: 0; }
.spin360.is-spinning .spin360__hint { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  .spin360__progress span { transition: none; }
}
