.corpsMesIngredients {
  margin-top: 100px;
  padding: 0 15px;
}

/* === Zone moteur de recherche + panier === */
.contentMesIngredients {
  max-width: 600px;
  margin: 0 auto 40px auto;
}

/* Bloc moteur */
.moteurMesIngredients {
  position: relative;
  background-color: #121212;
  padding: 20px;
  border-radius: 12px;
  color: #fff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

/* Champ input */
.search-input {
  width: 100%;
  padding: 14px 16px;
  font-size: 1rem;
  background-color: #1e1e1e;
  border: 1px solid #333;
  color: #fff;
  border-radius: 8px;
  outline: none;
  transition: 0.2s border, 0.2s background-color;
}

.search-input:focus {
  border-color: #009688;
  background-color: #222;
}

.search-input::placeholder {
  color: #888;
}

/* Suggestions */
.suggestion-box {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #1a1a1a;
  border: 1px solid #333;
  border-top: none;
  border-radius: 0 0 8px 8px;
  margin-top: 2px;
  max-height: 220px;
  overflow-y: auto;
  z-index: 9999;
  width: 100%;
}

.suggestion-box ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.suggestion-box li {
  padding: 12px 16px;
  border-bottom: 1px solid #2b2b2b;
  cursor: pointer;
  font-size: 0.95rem;
  transition: background-color 0.2s ease;
}

.suggestion-box li:hover {
  background-color: #2c2c2c;
}

/* === Panier d’ingrédients === */
.ingredient-basket {
  margin-top: 25px;
  background-color: #1b1b1b;
  padding: 16px;
  border-radius: 10px;
  color: #fff;
  border: 1px solid #333;
}

.ingredient-basket h4 {
  margin-bottom: 14px;
  font-size: 1.15rem;
  font-weight: 600;
}

.ingredient-basket ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ingredient-basket li {
  background-color: #262626;
  padding: 8px 14px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.95rem;
  transition: background-color 0.2s, transform 0.1s;
}

.ingredient-basket li:hover {
  background-color: #333;
  transform: scale(1.03);
}

/* === Bouton envoyer === */
.post-button {
  margin-top: 20px;
  background-color: #6200ea;
  color: white;
  border: none;
  padding: 12px 20px;
  font-size: 1rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  width: 100%;
}

.post-button:hover {
  background-color: #4b00b5;
}

/* === Message & loading === */
#formMessage {
  text-align: center;
  margin-top: 1em;
  font-weight: bold;
}

#formMessage.loading::before {
  content: "⏳ Chargement...";
  color: #007bff;
}

#formMessage.error {
  color: red;
}

/* === Section des recettes === */
.recette-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  box-sizing: border-box;
}

.recette-titre {
  text-align: center;
  font-size: 1.8rem;
  margin-bottom: 30px;
  color: #fff;
}

/* Grille des cartes recettes */
.recette-grille {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  width: 70%;
  margin:auto;
  box-sizing: border-box;
}


/* Carte recette */
.recette-carte {
  background: #1e1e1e;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  max-width: 100%;
  transition: transform 0.2s ease;
}

.recette-carte:hover {
  transform: translateY(-5px);
}

.recette-carte img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.carte-contenu {
  padding: 16px;
  color: #f0f0f0;
}

.carte-contenu h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
  color: #fff;
}

.carte-contenu p {
  font-size: 0.9rem;
  margin-bottom: 12px;
  line-height: 1.4;
}

.carte-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: #aaa;
}

/* Message d'information */
.recette-message {
  text-align: center;
  font-size: 1.2rem;
  color: #ccc;
  margin: 30px auto;
}
/* === Tablettes (768px à 1024px) === */
@media (max-width: 1024px) {
  .recette-grille {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
  }

  .recette-section {
    padding: 30px 15px;
  }

  .carte-contenu h3 {
    font-size: 1rem;
  }
}

/* === Mobiles grands (600px à 768px) === */
@media (max-width: 768px) {
  .recette-grille {
    grid-template-columns: repeat(2, 1fr);
  }

  .moteurMesIngredients,
  .ingredient-basket {
    padding: 14px;
  }

  .recette-titre {
    font-size: 1.5rem;
  }
}

/* === Mobiles petits (moins de 600px) === */
@media (max-width: 600px) {
  .recette-grille {
    grid-template-columns: 1fr;
  }

  .carte-contenu p {
    font-size: 0.85rem;
  }

  .post-button {
    font-size: 0.95rem;
  }

  .ingredient-basket li {
    font-size: 0.9rem;
    padding: 6px 12px;
  }
}