// hifi-photos.jsx — Real Unsplash photos to replace cheap emoji icons.
// Each photo is curated for the shop/category. Uses Unsplash CDN with fixed crop params.

const PHOTOS = {
  // Boulangerie / pain
  'Boulangerie Fabre':    'https://images.unsplash.com/photo-1568254183919-78a4f43a2877?w=800&h=800&fit=crop&q=80',
  'Boulangerie':          'https://images.unsplash.com/photo-1509440159596-0249088772ff?w=800&h=800&fit=crop&q=80',
  // Fleurs
  'Fleurs de Camille':    'https://images.unsplash.com/photo-1561181286-d3fee7d55364?w=800&h=800&fit=crop&q=80',
  'Fleuriste':            'https://images.unsplash.com/photo-1487530811176-3780de880c2d?w=800&h=800&fit=crop&q=80',
  // Vins
  'Cave des Vignerons':   'https://images.unsplash.com/photo-1506377247377-2a5b3b417ebb?w=800&h=800&fit=crop&q=80',
  'Cave & Vins':          'https://images.unsplash.com/photo-1547595628-c61a29f496f0?w=800&h=800&fit=crop&q=80',
  // Boucherie
  'Boucherie du Marché':  'https://images.unsplash.com/photo-1607623814075-e51df1bdc82f?w=800&h=800&fit=crop&q=80',
  'Boucherie':            'https://images.unsplash.com/photo-1588347818111-a5c182b6ce99?w=800&h=800&fit=crop&q=80',
  // Fromagerie
  'Fromagerie Bernard':   'https://images.unsplash.com/photo-1452195100486-9cc805987862?w=800&h=800&fit=crop&q=80',
  'Fromagerie':           'https://images.unsplash.com/photo-1486297678162-eb2a19b0a32d?w=800&h=800&fit=crop&q=80',
  // Herboristerie
  'Herboristerie Roux':   'https://images.unsplash.com/photo-1471943311424-646960669fbc?w=800&h=800&fit=crop&q=80',
  'Herboristerie':        'https://images.unsplash.com/photo-1556228720-195a672e8a03?w=800&h=800&fit=crop&q=80',
  // Artisanat / céramique
  'Atelier Céramique':    'https://images.unsplash.com/photo-1565193566173-7a0ee3dbe261?w=800&h=800&fit=crop&q=80',
  'Artisanat':            'https://images.unsplash.com/photo-1610701596007-11502861dcfa?w=800&h=800&fit=crop&q=80',
  // Poissonnerie
  'Poissonnerie du Port': 'https://images.unsplash.com/photo-1534177616072-ef7dc120449d?w=800&h=800&fit=crop&q=80',
  'Poissonnerie':         'https://images.unsplash.com/photo-1535596089779-aa9fb78c8b85?w=800&h=800&fit=crop&q=80',
  // Épicerie
  'Épicerie fine':        'https://images.unsplash.com/photo-1550989460-0adf9ea622e2?w=800&h=800&fit=crop&q=80',
  // Cosmétiques
  'Cosmétiques':          'https://images.unsplash.com/photo-1556228720-195a672e8a03?w=800&h=800&fit=crop&q=80',

  // People — portraits for testimonials
  'Marc Fabre':           'https://images.unsplash.com/photo-1560250097-0b93528c311a?w=400&h=400&fit=crop&q=80',
  'Sophie Durant':        'https://images.unsplash.com/photo-1573496359142-b8d87734a5a2?w=400&h=400&fit=crop&q=80',
  'Pierre Arnaud':        'https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?w=400&h=400&fit=crop&q=80',
  'Jean-Pierre Morel':    'https://images.unsplash.com/photo-1463453091185-61582044d556?w=400&h=400&fit=crop&q=80',
  'Élise Bernard':        'https://images.unsplash.com/photo-1544005313-94ddf0286df2?w=400&h=400&fit=crop&q=80',
  'Camille Roux':         'https://images.unsplash.com/photo-1494790108377-be9c29b29330?w=400&h=400&fit=crop&q=80',
  'Pierre & Sophie':      'https://images.unsplash.com/photo-1521119989659-a83eee488004?w=400&h=400&fit=crop&q=80',
  'Léa Mathieu':          'https://images.unsplash.com/photo-1438761681033-6461ffad8d80?w=400&h=400&fit=crop&q=80',
  'Antoine Petit':        'https://images.unsplash.com/photo-1500648767791-00dcc994a43e?w=400&h=400&fit=crop&q=80',
  'Émilie Lambert':       'https://images.unsplash.com/photo-1487412720507-e7ab37603c6f?w=400&h=400&fit=crop&q=80',

  // Team
  'Léa Marchand':         'https://images.unsplash.com/photo-1580489944761-15a19d654956?w=400&h=400&fit=crop&q=80',
  'Hugo Lefèvre':         'https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?w=400&h=400&fit=crop&q=80',
  'Aïcha Benali':         'https://images.unsplash.com/photo-1531123897727-8f129e1688ce?w=400&h=400&fit=crop&q=80',
  'Tom Garnier':          'https://images.unsplash.com/photo-1519085360753-af0119f7cbe7?w=400&h=400&fit=crop&q=80',
  'Sara Dupont':          'https://images.unsplash.com/photo-1534528741775-53994a69daeb?w=400&h=400&fit=crop&q=80',
  'Yann Morel':           'https://images.unsplash.com/photo-1506794778202-cad84cf45f1d?w=400&h=400&fit=crop&q=80',
};

function Photo({ name, alt, style, className, ratio = '1/1' }) {
  const url = PHOTOS[name];
  if (!url) {
    // Fallback: warm placeholder
    return <div className={className} style={{ background: 'var(--bg-sunken)', aspectRatio: ratio, ...style }} />;
  }
  return (
    <img
      className={className}
      src={url}
      alt={alt || name}
      loading="lazy"
      style={{ width: '100%', height: '100%', objectFit: 'cover', display: 'block', aspectRatio: ratio, ...style }}
    />
  );
}

window.PHOTOS = PHOTOS;
window.Photo = Photo;
