import React from 'react';
import { useScrollEffects } from '@/lib/hooks/useScrollEffects';
import { useTranslation } from '@/lib/hooks/useTranslation';
import { ArrowUp } from 'lucide-react';

export const ScrollToTopButton: React.FC = () => {
  const { isVisible, scrollToTop } = useScrollEffects();
  const { t } = useTranslation();

  return (
    <button
      onClick={scrollToTop}
      className={`fixed bottom-6 right-6 z-50 w-12 h-12 sm:w-14 sm:h-14 bg-gradient-to-r from-blue-600 to-blue-500 text-white rounded-full shadow-lg hover:shadow-xl transition-all duration-300 flex items-center justify-center group border border-blue-400/30 backdrop-blur-sm ${
        isVisible 
          ? 'opacity-100 translate-y-0 scale-100' 
          : 'opacity-0 translate-y-4 scale-95 pointer-events-none'
      }`}
      aria-label={t.common.backToTop}
    >
      <ArrowUp 
        className="w-5 h-5 sm:w-6 sm:h-6 transition-transform duration-300 group-hover:-translate-y-0.5" 
        strokeWidth={2.5}
      />
      
      {/* Effet de lueur au hover */}
      <div className="absolute inset-0 bg-gradient-to-r from-blue-500 to-blue-600 rounded-full opacity-0 group-hover:opacity-75 transition-opacity duration-300 blur-sm"></div>
    </button>
  );
};
