/* --- Style général --- */
body {
  font-family: 'Segoe UI', sans-serif;
  margin: 0;
  background: #f4f4f9;
  color: #333;
}

header {
  background: #1E8449;
  color: white;
  padding: 2rem;
  text-align: center;
}

header h1 {
  margin-bottom: 0.5rem;
}

footer {
  text-align: center;
  padding: 2rem;
  background: #eee;
  font-size: 0.9rem;
}

/* --- Page d'accueil : catégories --- */
.categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  padding: 2rem;
}

.cat-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  text-decoration: none;
  color: #12330c;
  font-weight: bold;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* --- Galerie d'images --- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  padding: 2rem;
}

.image-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  text-align: center;
  padding-bottom: 1rem;
}

.image-card img {
  width: 100%;
  border-radius: 8px;
  height: auto;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.image-card img:hover {
  transform: scale(1.03);
}

.image-card h3 {
  margin: 0.8rem 0 0.5rem;
  color: #2e3b55;
}

.image-card p {
  margin: 0;
  padding: 0 1rem;
  font-size: 0.9rem;
  color: #555;
}

/* --- Effet de zoom sur image --- */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.overlay img.zoomed {
  max-width: 90%;
  max-height: 90%;
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(255,255,255,0.3);
  transition: transform 0.2s ease;
}

.filter-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem 0;
}

.filter-bar label {
  font-weight: bold;
  color: #2e3b55;
}

.search-section {
  text-align: center;
  padding: 1rem;
}

#searchInput {
  width: 60%;
  max-width: 400px;
  padding: 0.6rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 8px;
}

#searchResults {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.search-result {
  background: #f8f8f8;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  width: 80%;
  max-width: 500px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
