/* ==========================================================================
   SCROLL TO TOP — bouton flottant retour en haut
   Partagé : fiches modules, outils, pages légales
   ========================================================================== */

#scroll-to-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--couleur-marine-profonde, #0B1E3F);
  color: var(--couleur-cuivre, #B8935A);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.25s ease, box-shadow 0.25s ease;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(11, 30, 63, 0.18);
}

#scroll-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

#scroll-to-top:hover,
#scroll-to-top:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(184, 147, 90, 0.35);
}

#scroll-to-top:focus-visible {
  outline: 2px solid var(--couleur-cuivre, #B8935A);
  outline-offset: 3px;
}

#scroll-to-top svg {
  width: 20px;
  height: 20px;
  display: block;
}

@media (prefers-reduced-motion: reduce) {
  #scroll-to-top { transition: opacity 0.3s ease; transform: none; }
  #scroll-to-top.is-visible { transform: none; }
  #scroll-to-top:hover,
  #scroll-to-top:focus-visible { transform: none; }
}

@media (max-width: 600px) {
  #scroll-to-top {
    bottom: 1rem;
    right: 1rem;
    width: 44px;
    height: 44px;
  }
}
