
/* ----- Structure de base ----- */
* {
    box-sizing: border-box;
  }
  
  body {
    font-family: "Poppins", Arial, sans-serif;
    background-color: #fffaf3;
    color: #333;
    margin: 0;
    padding: 0;
    line-height: 1.6;
  }
  
  /* ----- En-tête ----- */
  header {
    background-color: #ffb347;
    color: white;
    text-align: center;
    padding: 20px 0;
    margin-bottom: 30px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  }
  
  header h1 {
    margin: 0;
    font-size: 2rem;
  }
  
  /* ----- Conteneur principal ----- */
  .container {
    max-width: 950px;
    margin: 0 auto;
    background-color: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.08);
  }
  
  /* ----- Liens ----- */
  a {
    color: #e67e22;
    text-decoration: none;
    font-weight: 500;
  }
  
  a:hover {
    text-decoration: underline;
  }
  
  /* ----- Boutons ----- */
  button,
  input[type="submit"] {
    background-color: #e67e22;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 15px;
  }
  
  button:hover,
  input[type="submit"]:hover {
    background-color: #cf711f;
  }
  
  /* ----- Message de bienvenue et photo ----- */
  .welcome {
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: #fff3e0;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 20px;
  }
  
  .welcome img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
  }
  
  /* ----- Sections principales ----- */
  h2 {
    color: #d35400;
    border-bottom: 2px solid #ffe0b2;
    padding-bottom: 5px;
    margin-top: 40px;
  }
  
 /* ----- Grille des recettes sur la page d'accueil ----- */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  margin-top: 20px;
}

/* Ajustement visuel des cartes de recettes */
.post {
  background: #fffdf9;
  border: 1px solid #f3e2cf;
  border-radius: 8px;
  padding: 15px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.post img {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 10px;
}

.post h3 {
  color: #d35400;
  margin: 10px 0;
  font-size: 1.2rem;
}

  
  /* ----- Commentaires ----- */
  .commentaire {
    background-color: #fff8f0;
    border: 1px solid #f0dec0;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 12px;
  }
  
  .commentaire p {
    margin: 5px 0;
  }
  
  #commentaires {
    margin-top: 10px;
  }
  
  
  /* ----- Formulaires ----- */
  form {
    margin-top: 20px;
  }
  
  label {
    font-weight: bold;
    display: block;
    margin-top: 10px;
    margin-bottom: 5px;
  }
  
  input[type="text"],
  input[type="password"],
  input[type="file"],
  input[type="url"],
  textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 15px;
    font-size: 14px;
  }
  
  textarea {
    resize: vertical;
  }
  
  /* ----- Tableaux (admin) ----- */
  table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 15px;
  }
  
  th, td {
    border: 1px solid #f1e3d3;
    padding: 10px;
    text-align: left;
  }
  
  th {
    background-color: #fff3e0;
    color: #d35400;
  }
  
  tr:nth-child(even) {
    background-color: #fffaf3;
  }
  
  /* ----- Images utilisateur (admin, accueil) ----- */
  table img {
    border-radius: 50%;
    object-fit: cover;
  }
  
  /* ----- Messages d'erreur et de validation ----- */
  .error {
    color: red;
    background-color: #ffeaea;
    padding: 8px;
    border-radius: 5px;
    margin-bottom: 15px;
  }
  
  .success {
    color: green;
    background-color: #eaffea;
    padding: 8px;
    border-radius: 5px;
    margin-bottom: 15px;
  }
  
  /* ----- Pied de page ----- */
  footer {
    text-align: center;
    color: #777;
    font-size: 14px;
    margin: 40px 0 20px;
  }
  
  /* ----- Responsive ----- */
  @media (max-width: 700px) {
    body {
      font-size: 15px;
    }
  
    .container {
      width: 90%;
      padding: 15px;
    }
  
    .welcome {
      flex-direction: column;
      align-items: flex-start;
    }
  
    table {
      font-size: 13px;
    }
  
    .post img {
      max-width: 100%;
    }
  }
  