.title-p {
  padding: 20px 60px;
  text-align: center;
}

/* Conteneur */
.all-recipes {
  display: flex !important;
  justify-content: center !important;
  width: 100% !important;
  padding: 0 !important;
  margin-top: 30px !important;
}

/* Grille 3 colonnes */
.list-recipes {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  width: 90% !important;
  max-width: 1100px !important;
  gap: 25px !important;
}

/* Carte générique */
.photo-card {
  position: relative;
  width: 100%;
  aspect-ratio: 1/1;
  background: #f4f4f4;
  border-radius: 20px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Zone d'actions */
.actions {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: flex;
  gap: 8px;
}

.actions button {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background-color: #2563eb;
  color: white;
  border: none;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s ease;
}

/* Bouton édition */
.actions .edit-btn {
  background-color: #2563eb;
}

.actions .edit-btn:hover {
  background-color: #1d4ed8;
}

/* Bouton suppression */
.actions .delete-btn {
  background-color: #dc2626;
}

.actions .delete-btn:hover {
  background-color: #b91c1c;
}

/* Icônes */
.actions i {
  font-size: 1rem;
}

/* Carte vide - ajouter photo */
.photo-card.empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #cfcfcf;
  border: 3px dashed #9b9b9b;
  cursor: pointer;
  transition: 0.2s;
}

.photo-card.empty:hover {
  background: #bdbdbd;
  transform: scale(1.02);
}

.photo-card.empty i {
  color: white;
  font-size: 4.375rem;
}


/* Bannière de préférences */
.banner-preferences {
  margin-top: 30px !important;
  padding: 60px !important;
  text-align: center;
}

/* Conteneur */
.all-recipes {
  display: flex !important;
  justify-content: center !important;
  width: 100% !important;
  padding: 0 !important;
  margin-top: 30px !important;
}

/* Grille 3 colonnes */
.list-recipes {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  width: 90% !important;
  max-width: 1100px !important;
  gap: 25px !important;
}

/* Carte générique */
.photo-card {
  position: relative;
  width: 100%;
  aspect-ratio: 1/1;
  background: #f4f4f4;
  border-radius: 20px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Zone d'actions */
.actions {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: flex;
  gap: 8px;
}

.actions button {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background-color: #2563eb;
  color: white;
  border: none;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s ease;
}

/* Bouton édition */
.actions .edit-btn {
  background-color: #2563eb;
}

.actions .edit-btn:hover {
  background-color: #1d4ed8;
}

/* Bouton suppression */
.actions .delete-btn {
  background-color: #dc2626;
}

.actions .delete-btn:hover {
  background-color: #b91c1c;
}

/* Icônes */
.actions i {
  font-size: 1rem;
}

/* Carte vide - ajouter photo */
.photo-card.empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #cfcfcf;
  border: 3px dashed #9b9b9b;
  cursor: pointer;
  transition: 0.2s;
}

.photo-card.empty:hover {
  background: #bdbdbd;
  transform: scale(1.02);
}

.photo-card.empty i {
  color: white;
  font-size: 4.375rem;
}


/* ================= RESPONSIVE ================= */

/* Tablettes et écrans moyens */
@media (max-width: 1024px) {
  .banner-preferences {
    padding: 40px !important;
    margin-top: 20px !important;
  }

  .list-recipes {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 20px !important;
    width: 60% !important;
  }

  .photo-card {
    border-radius: 16px;
  }

  .actions button {
    padding: 5px 12px;
    font-size: 0.8rem;
  }
}

/* Petits écrans / tablettes compactes */
@media (max-width: 768px) {
  .banner-preferences {
    padding: 30px !important;
    margin-top: 15px !important;
    font-size: 0.8rem;
  }

  .list-recipes {
    grid-template-columns: 1fr !important; /* 1 colonne */
    width: 60% !important;
    gap: 15px !important;
  }

  .photo-card {
    aspect-ratio: 1/1;
  }

  .actions {
    flex-direction: column;
    bottom: 8px;
    right: 8px;
  }

  .actions button {
    padding: 5px 10px;
    font-size: 0.75rem;
  }
}

/* Très petits écrans / mobiles */
@media (max-width: 480px) {
  .banner-preferences {
    padding: 20px !important;
    margin-top: 10px !important;
    text-align: center;
    font-size: 0.6;
  }

  .list-recipes {
    grid-template-columns: 1fr !important; /* une seule colonne */
    gap: 10px !important;
    width: 60% !important;
    padding: 0 10px;
  }

  .photo-card {
    border-radius: 12px;
  }

  .photo-card.empty i {
    font-size: 3rem;
  }

  .actions {
    flex-direction: column;
    gap: 4px;
    bottom: 6px;
    right: 6px;
  }

  .actions button {
    padding: 4px 8px;
    font-size: 0.7rem;
  }
}
