/* Boutons de scroll vers le haut et le bas */

.scroll-button {
    position: fixed;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    z-index: 1000;
    opacity: 0;
    transform: scale(0.8);
}

.scroll-button.show {
    display: flex;
    opacity: 1;
    transform: scale(1);
    animation: fadeInScale 0.3s ease;
}

.scroll-button:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
    transform: scale(1.1);
}

.scroll-button:active {
    transform: scale(0.95);
}

/* Bouton scroll to top */
#scrollToTop {
    bottom: 90px;
}

/* Bouton scroll to bottom */
#scrollToBottom {
    bottom: 30px;
}

/* Animation d'apparition */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Animation de pulsation pour attirer l'attention */
.scroll-button.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    }
    50% {
        box-shadow: 0 4px 25px rgba(102, 126, 234, 0.7);
    }
    100% {
        box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    }
}

/* Responsive - Ajustement pour mobile */
@media (max-width: 768px) {
    .scroll-button {
        right: 15px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    
    #scrollToTop {
        bottom: 75px;
    }
    
    #scrollToBottom {
        bottom: 20px;
    }
}

/* Variante avec icônes Font Awesome */
.scroll-button i {
    pointer-events: none;
}

/* Tooltip au survol */
.scroll-button::before {
    content: attr(data-tooltip);
    position: absolute;
    right: 60px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.scroll-button:hover::before {
    opacity: 1;
}

/* Flèche après le tooltip */
.scroll-button::after {
    content: '';
    position: absolute;
    right: 52px;
    border: 6px solid transparent;
    border-left-color: rgba(0, 0, 0, 0.8);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.scroll-button:hover::after {
    opacity: 1;
}
