/* ============================================================
 * Pull-to-Refresh — Phase 10 Sprint 5 (2026-05-09)
 *
 * CSS d'accompagnement du `pull_to_refresh_controller.js`.
 * L'indicateur (.ptr-indicator) part hors écran, glisse vers le bas
 * pendant le pull, et change de couleur/icône au franchissement
 * du seuil (.ptr-ready).
 *
 * Désactivé sur >= lg.
 * ============================================================ */

.ptr-indicator {
  position: fixed;
  top: 56px; /* under topbar */
  left: 50%;
  transform: translate(-50%, -100%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-surface);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
  border: 1px solid var(--border-default);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  z-index: 60;
  pointer-events: none;
  opacity: 0;
}

.ptr-indicator svg {
  width: 22px;
  height: 22px;
  transition: transform 0.2s ease;
}

.ptr-indicator.ptr-ready {
  background: var(--accent);
  color: var(--accent-contrast);
  border-color: var(--accent);
}

.ptr-indicator.ptr-ready svg {
  transform: rotate(180deg);
}

body.ptr-active {
  /* Prevent text selection during pull */
  user-select: none;
  -webkit-user-select: none;
}

/* Hide on desktop entirely */
@media (min-width: 1024px) {
  .ptr-indicator {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ptr-indicator,
  .ptr-indicator svg {
    transition: none;
  }
}
