/* Bouton retour en haut — public + admin + mobile */
.gab-back-to-top {
    position: fixed;
    right: max(1rem, env(safe-area-inset-right, 0px));
    bottom: max(1rem, env(safe-area-inset-bottom, 0px));
    z-index: 1040;
    width: 3rem;
    height: 3rem;
    min-width: 48px;
    min-height: 48px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    display: grid;
    place-items: center;
    cursor: pointer;
    color: #0a1628;
    background: linear-gradient(135deg, #d4a012, #e8b82a);
    box-shadow: 0 4px 20px rgba(212, 160, 18, 0.45);
    opacity: 0;
    visibility: hidden;
    transform: translateY(0.75rem) scale(0.92);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease, box-shadow 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.gab-back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.gab-back-to-top:hover,
.gab-back-to-top:focus-visible {
    box-shadow: 0 6px 28px rgba(212, 160, 18, 0.55);
    outline: none;
}

.gab-back-to-top:active {
    transform: translateY(0) scale(0.96);
}

.gab-back-to-top svg {
    width: 1.25rem;
    height: 1.25rem;
    display: block;
}

body.gab-future .gab-back-to-top {
    color: #0a1628;
}

body:not(.gab-future) .gab-back-to-top {
    color: #0d2142;
}

@media (max-width: 479px) {
    .gab-back-to-top {
        right: max(0.85rem, env(safe-area-inset-right, 0px));
        bottom: max(0.85rem, env(safe-area-inset-bottom, 0px));
    }
}
