/* Bouton "remonter en haut" : fixe en bas à droite, apparaît après un peu de défilement.
   Couleurs branchées sur les variables du site : il suit le thème actif. */
.back-to-top {
  position: fixed; inset-block-end: 1.25rem; inset-inline-end: 1.25rem; z-index: 60;
  display: flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; padding: 0;
  color: var(--accent-strong); background: var(--surface); border: 1px solid var(--border);
  border-radius: 50%; box-shadow: var(--shadow); cursor: pointer;
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity .25s, transform .25s, visibility .25s, background-color .2s, border-color .2s;
}
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.back-to-top:hover { background: var(--bg-soft); border-color: var(--accent); }
.back-to-top:focus-visible { outline: 3px solid var(--accent-bright); outline-offset: 2px; }
.back-to-top svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
:root[data-theme="dark"] .back-to-top { color: var(--accent); }
@media (prefers-reduced-motion: reduce) { .back-to-top { transition: none; } }
