* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family:
    Inter,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background: linear-gradient(135deg, #f1f5f9, #f8fafc);
  color: #0f172a;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(1400px, 92%);
  margin: 0 auto;
}

.header {
  background: white;
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-content {
  height: 72px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Aligne le petit logo et le texte sur la même ligne */
.logo {
  font-size: 1.4rem;
  font-weight: 800;
  color: #0f766e; /* On ajoute ces deux lignes pour aligner le petit logo image et le texte */
  display: flex;
  align-items: center;
  gap: 10px; /* Espace de 10px entre l'image et le texte */
}

.nav-list {
  list-style: none;
  display: flex;
  gap: 24px;
}

.nav-list a {
  font-weight: 600;
  color: #475569;
  transition: color 0.2s ease;
}

.nav-list a:hover {
  color: #0f766e;
}

.hero {
  padding: 120px 0;
  text-align: center;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  color: #1e293b;
  margin-bottom: 20px;
  line-height: 1.2;
}

.hero p {
  font-size: 1.2rem;
  color: #475569;
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.btn {
  border: none;
  cursor: pointer;
  display: inline-block;
  background: #0f766e;
  color: white;
  padding: 14px 28px;
  border-radius: 12px;
  font-weight: 700;
  transition: background 0.2s ease;
}

.btn:hover {
  background: #115e59;
}

.catalogue-page {
  padding: 40px 0;
}

.catalogue-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 40px;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 24px;
}

.catalogue-header h1 {
  font-size: 2rem;
  color: #1e293b;
  margin-bottom: 8px;
}

.catalogue-header p {
  color: #64748b;
}

.select {
  padding: 12px 20px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: white;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  outline: none;
}

.select:focus {
  border-color: #0f766e;
}

.layout {
  width: 100%;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
}

.product-card {
  background: white;
  border-radius: 20px;
  padding: 16px;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.product-image {
  height: 220px;
  width: 100%;
  object-fit: cover;
  border-radius: 14px;
}

.product-category {
  font-size: 0.8rem;
  color: #0f766e;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.product-title {
  font-size: 1.15rem;
  color: #1e293b;
  font-weight: 700;
  line-height: 1.3;
}

#loadingMessage {
  color: #64748b;
  text-align: center;
  font-size: 1.1rem;
}

/* --- LIGHTBOX STYLES (MODALE PLEIN ÉCRAN) --- */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.95); /* Fond ardoise très sombre */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  padding: 20px;
}

.lightbox-content {
  position: relative;
  max-width: 900px;
  width: 100%;
  background: #1e293b;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.lightbox-content img {
  width: 100%;
  max-height: 75vh;
  object-fit: cover; /* <- On passe en cover pour garder le piqué ultra-net */
  background: #0f172a;
  display: block;
  /* Cette ligne force le navigateur à optimiser la netteté et les contrastes */
  image-rendering: -webkit-optimize-contrast;
}

.lightbox-close {
  position: absolute;
  top: 15px;
  right: 20px;
  color: white;
  font-size: 2.5rem;
  font-weight: 300;
  cursor: pointer;
  z-index: 1010;
  transition: color 0.2s;
}

.lightbox-close:hover {
  color: #cbd5e1;
}

.lightbox-caption {
  padding: 20px;
  color: white;
  background: #1e293b;
}

.lightbox-caption h3 {
  font-size: 1.3rem;
  margin-bottom: 6px;
  color: #f8fafc;
}

.lightbox-caption p {
  font-size: 0.95rem;
  color: #94a3b8;
  line-height: 1.5;
}

@media (max-width: 768px) {
  /* CORRECTIF MENU : On empile le logo et la navigation sur mobile */
  .header-content {
    height: auto !important; /* Supprime la hauteur fixe de 72px */
    flex-direction: column; /* Aligne le logo et le menu l'un sous l'autre */
    padding: 15px 0; /* Donne de l'air en haut et en bas */
    gap: 12px; /* Crée un espace propre entre le logo et le menu */
  }

  .logo {
    font-size: 1.15rem; /* Réduit légèrement le texte pour qu'il tienne sur les petits écrans */
    text-align: center;
    justify-content: center;
  }

  .nav-list {
    gap: 20px; /* Rapproche un poil Accueil et La Visite sur mobile */
  }

  /* --- Votre code existant inchangé --- */
  .catalogue-header {
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
  }

  .select {
    width: 100%;
  }

  .lightbox-content img {
    max-height: 55vh;
  }
}

/* Contrôle de la taille de ton petit logo dans la barre du haut */
.logo-img {
  height: 32px; /* Ajuste cette hauteur si tu veux le logo plus grand ou plus petit */
  width: auto; /* Garde les proportions de ton image */
  object-fit: contain;
}

/* --- STYLE RESPONSIVE POUR LE DRAPEAU CORSE (Vertical) --- */
.Drapeau_Corse {
  display: block; /* Obligatoire pour le centrage automatique */

  /* 1. Le Centrage parfait */
  margin-top: 30px; /* Espace avec le texte du haut */
  margin-bottom: 40px; /* Espace avec le bouton du bas */
  margin-left: auto; /* Calcule automatiquement l'espace à gauche */
  margin-right: auto; /* Calcule automatiquement l'espace à droite pour centrer */

  /* 2. La Responsivité (Adaptation) */
  max-width: 100%; /* L'image ne dépassera JAMAIS de la largeur de l'écran */
  width: auto; /* Elle conserve ses proportions verticales d'origine */

  /* 3. La gestion de la hauteur (Le secret du responsive vertical) */
  height: 60vh; /* Elle prendra toujours 60% de la hauteur de l'écran visible */
  object-fit: contain; /* Elle s'adapte dans ce cadre sans être coupée ni déformée */

  /* 4. La finition */
  border-radius: 12px; /* De jolis bords légèrement arrondis */
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15); /* Une ombre plus marquée pour lui donner du relief */
}
