body {
    font-family: Arial;
    margin: 0;
    background: #fff;
}

header {
    position: relative;
    text-align: center;
    color: white;
    padding: 60px 20px;
    overflow: hidden;
}

/* IMAGE DE FOND */
header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("images/header.jpg") center/cover no-repeat;
    filter: brightness(0.6) blur(0px);
    z-index: 0;
}


header h1,
header p {
    position: relative;
    z-index: 1;
}

.filters {
    text-align: center;
    margin: 15px;
}

/* Boutons normaux de catégorie */
.filters button {
    padding: 10px 15px;
    border: none;
    border-radius: 20px;
    background: #e67e22; /* couleur normale des catégories */
    color: white;
    cursor: pointer;
    margin: 5px;
}

/* Bouton "Toutes" spécial */
.filters button[data-category="all"] {
    background: #2c3e50; /* couleur différente */
    color: white;
    font-weight: bold;
}

.grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr); /* 🔥 5 cartes par ligne */
    gap: 40px 40px; /* petit espace régulier */
    padding: 15px;
}

.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    text-align: center;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.card img {
    width: 100%;
    aspect-ratio: 1/1; /* carré parfait */
    object-fit: cover; /* 🔥 remplissage sans blanc */
    cursor: pointer;
    display: block;
}

.card-content {
    padding: 10px;
    flex: 1;
}

.card-content h3 {
    margin: 10px 0 15px 0; /* 🔥 espace entre le nom et l'image (top = 10px, bottom = 15px) */
}

.card-content button {
    margin-top: 15px; /* 🔥 espace sous le bouton */
}

button {
    margin-top: 10px;
    padding: 8px;
    border: none;
    background: #27ae60;
    color: white;
    border-radius: 8px;
    cursor: pointer;
}

/* Barre de recherche */
#searchContainer {
    text-align: center;
    margin: 15px 0;
}

#searchInput {
    width: 250px;          /* largeur du champ */
    padding: 8px 12px;     /* espace intérieur */
    border-radius: 20px;   /* arrondi */
    border: 1px solid #ccc;
    font-size: 16px;
    transition: 0.3s;
}

#searchInput:focus {
    outline: none;
    border-color: #e67e22; /* couleur de focus */
    box-shadow: 0 0 5px rgba(230,126,34,0.5);
}

/* MODAL */
#modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    justify-content: center;
    align-items: center;
}

#modal img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 10px;
}

footer {
    text-align: center;
    padding: 20px;
    background: #eee;
    margin-top: 20px;
}

/* Responsive */
@media (max-width: 1200px) {
    .grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1000px) {
    .grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 700px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 450px) {
    .grid {
        grid-template-columns: 1fr;
    }
}

#scrollTopBtn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: none;
  background: #007BFF;
  color: white;
  border: none;
  border-radius: 50%;
  padding: 15px;
  font-size: 24px;
  cursor: pointer;
  z-index: 9999;
  box-shadow: 0 4px 6px rgba(0,0,0,0.3);
  transition: transform 0.3s;
}

#scrollTopBtn:hover {
  transform: rotate(20deg);
}

#cmoilechef-link {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  display: block;
  border-radius: 12px;
  overflow: hidden;
  border: 4px solid white; /* bordure blanche autour */
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

#cmoilechef-img {
  display: block;
  width: 60px; /* taille de la toque */
  height: 60px;
  object-fit: contain;
  transition: transform 0.3s;
}

#cmoilechef-link:hover #cmoilechef-img {
  transform: rotate(-15deg) scale(1.1); /* petit effet fun au hover */
}