/**
 * Bouton Scroll to Top avec bordure progressive
 */

.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 0;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}


.scroll-to-top-inner {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Cercle de progression SVG */
.scroll-to-top .progress-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.scroll-to-top .progress-ring-bg {
    fill: none;
    stroke: #e5e7eb;
    stroke-width: 3;
}

.scroll-to-top .progress-ring-circle {
    fill: none;
    stroke: var(--aratice-primary, #163C79);
    stroke-width: 3;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.1s ease;
}

/* Cercle de fond avec l'icône */
.scroll-to-top .icon-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 38px;
    height: 38px;
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.scroll-to-top .arrow-icon {
    width: 20px;
    height: 20px;
}

.scroll-to-top .arrow-icon path {
    fill: var(--aratice-primary, #163C79);
    transition: fill 0.3s ease;
}

.scroll-to-top:hover .arrow-icon path {
    fill: #163C79;
}

/* Label "Retour en haut" */
.scroll-to-top-label {
    position: absolute;
    right: 60px;
    top: 50%;
    transform: translateY(-50%);
    white-space: nowrap;
    background: #ffffff;
    color: var(--aratice-primary, #163C79);
    font-size: 13px;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    cursor: pointer;
}

.scroll-to-top.show-label .scroll-to-top-label {
    opacity: 1;
    visibility: visible;
}

/* Responsive */
@media (max-width: 768px) {
    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 44px;
        height: 44px;
    }

    .scroll-to-top .icon-container {
        width: 32px;
        height: 32px;
    }

    .scroll-to-top .arrow-icon {
        width: 16px;
        height: 16px;
    }
    
    /* Cacher le label sur mobile */
    .scroll-to-top-label {
        display: none;
    }
}