import React from 'react';
import { ServiceCard } from '@/components/common/ServiceCard';
import { SectionHeader } from '@/components/ui/SectionHeader';
import { useTranslation } from '@/lib/hooks/useTranslation';
import type { Service } from '@/types/service';

interface ServicesSectionProps {
  services: Service[];
  onServiceClick: (service: Service) => void;
  translations: {
    discoverFeatures: string;
  };
}

export const ServicesSection: React.FC<ServicesSectionProps> = ({ 
  services, 
  onServiceClick,
  translations
}) => {
  const { t } = useTranslation();
  
  return (
    <section 
      id="services" 
      className="py-24 md:py-32 px-4 sm:px-6 lg:px-8 bg-gradient-to-br from-white via-blue-50/30 to-gray-50"
    >
      <div className="max-w-7xl mx-auto">
        {/* Header de section moderne avec forte hiérarchie - factorisation */}
        <SectionHeader 
          title={t.sections.ourServices}
          subtitle={translations.discoverFeatures}
        />
        
        {/* Grille de services avec espacement généreux */}
        <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8 lg:gap-12">
          {services.map((service) => (
            <ServiceCard
              key={service.name}
              service={service}
              onServiceClick={onServiceClick}
            />
          ))}
        </div>
      </div>
    </section>
  );
};
