/* La Table Gourmande — design culinaire chaleureux et responsive. */
:root {
  --creme: #faf6ef;
  --papier: #ffffff;
  --terre: #c96f4a;
  --terre-fonce: #a3522f;
  --brun: #4a2c2a;
  --vert: #4f7d5b;
  --gris: #6b625a;
  --ombre: 0 8px 24px rgba(74, 44, 42, .12);
  --rayon: 14px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Georgia, 'Times New Roman', serif;
  background: var(--creme);
  color: var(--brun);
  line-height: 1.6;
}
h1, h2, h3 { font-weight: normal; letter-spacing: .3px; }
h1 em, .logo em { color: var(--terre); font-style: italic; }
a { color: var(--terre-fonce); }
.conteneur { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.principal { padding: 30px 20px 60px; min-height: 60vh; }
.petit { color: var(--gris); font-size: .9rem; }
.centre { text-align: center; }
.etroit { max-width: 420px; margin: 40px auto; }
.erreur { color: #a33; background: #fdeeee; padding: 10px; border-radius: 8px; }

/* En-tête et navigation */
.entete { background: var(--papier); box-shadow: var(--ombre); position: sticky; top: 0; z-index: 10; }
.nav { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; }
.logo { font-size: 1.3rem; text-decoration: none; color: var(--brun); }
.menu { display: flex; gap: 22px; list-style: none; margin: 0; padding: 0; }
.menu a { text-decoration: none; color: var(--brun); padding: 6px 2px; border-bottom: 2px solid transparent; }
.menu a:hover { border-color: var(--terre); color: var(--terre-fonce); }
.burger { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; }

/* Héros */
.heros { display: flex; align-items: center; gap: 40px; padding: 40px 0; }
.heros-texte h1 { font-size: 2.4rem; margin: 0 0 12px; }
.heros-visuel {
  font-size: 9rem; background: linear-gradient(135deg, #f3e2cf, #e8c9a8);
  border-radius: 50%; width: 220px; height: 220px; display: flex;
  align-items: center; justify-content: center; flex-shrink: 0; box-shadow: var(--ombre);
}
.heros-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }

/* Boutons */
.bouton {
  display: inline-block; background: var(--terre); color: #fff; border: none;
  padding: 11px 22px; border-radius: 999px; text-decoration: none; cursor: pointer;
  font-family: inherit; font-size: 1rem; transition: background .2s, transform .15s;
}
.bouton:hover { background: var(--terre-fonce); transform: translateY(-1px); }
.bouton.fantome { background: transparent; color: var(--terre-fonce); border: 1.5px solid var(--terre); }
.bouton.fantome:hover { background: #f6e7dc; }
.bouton-mini {
  background: #f0e6da; border: none; border-radius: 8px; padding: 6px 12px;
  cursor: pointer; font-size: 1rem; font-family: inherit;
}
.bouton-mini:hover { background: #e4d5c2; }
.bouton-mini.danger { color: #a33; }
.bouton-favori.actif { background: #f6e7dc; }

/* Cartes et grilles */
.grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 22px; margin: 20px 0; }
.carte-recette {
  background: var(--papier); border-radius: var(--rayon); overflow: hidden;
  text-decoration: none; color: var(--brun); box-shadow: var(--ombre);
  transition: transform .2s, box-shadow .2s; display: block;
}
.carte-recette:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(74,44,42,.18); }
.vignette {
  height: 130px; display: flex; align-items: center; justify-content: center;
  font-size: 3.4rem; color: rgba(255,255,255,.9);
}
.vignette.grand { height: 160px; width: 220px; border-radius: var(--rayon); font-size: 5rem; }
.carte-corps { padding: 14px 16px 18px; }
.carte-corps h3 { margin: 0 0 6px; }
.meta { color: var(--gris); font-size: .88rem; margin: 0; }
.note { color: #b8860b; margin: 4px 0; }
.carte { background: var(--papier); border-radius: var(--rayon); padding: 22px; box-shadow: var(--ombre); margin: 18px 0; }
.masque { opacity: .5; }

/* Étiquettes catégories */
.etiquettes { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0; }
.etiquette {
  background: var(--papier); border: 1.5px solid #e4d5c2; padding: 8px 18px;
  border-radius: 999px; text-decoration: none; color: var(--brun); transition: all .2s;
}
.etiquette:hover { border-color: var(--terre); color: var(--terre-fonce); }

/* Filtres */
.filtres { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0; }
.filtres input, .filtres select {
  padding: 10px 14px; border: 1.5px solid #e4d5c2; border-radius: 999px;
  font-family: inherit; font-size: .95rem; background: var(--papier);
}
.filtres input[type=search] { flex: 1; min-width: 200px; }

/* Fiche recette */
.fiche-entete { display: flex; gap: 28px; align-items: flex-start; margin-bottom: 26px; }
.deux-colonnes { display: grid; grid-template-columns: 1fr 1.4fr; gap: 34px; }
.portions { display: flex; align-items: center; gap: 10px; margin: 12px 0; }
.ingredients { list-style: none; padding: 0; }
.ingredients li { padding: 8px 0; border-bottom: 1px dashed #e4d5c2; }
.etapes li { margin-bottom: 14px; padding-left: 6px; }
.ajout-courses { margin-top: 16px; }
.avis { background: var(--papier); border-radius: var(--rayon); padding: 14px 18px; margin: 12px 0; box-shadow: var(--ombre); }

/* Formulaires */
.formulaire label { display: block; margin-bottom: 14px; }
.formulaire input, .formulaire textarea, .formulaire select {
  width: 100%; padding: 10px 14px; margin-top: 5px; border: 1.5px solid #e4d5c2;
  border-radius: 10px; font-family: inherit; font-size: 1rem; background: var(--papier);
}
.formulaire input:focus, .formulaire textarea:focus { outline: 2px solid var(--terre); border-color: var(--terre); }

/* Tableaux (liste de courses, admin) */
.tableau { width: 100%; border-collapse: collapse; background: var(--papier); border-radius: var(--rayon); overflow: hidden; box-shadow: var(--ombre); margin: 16px 0; }
.tableau th, .tableau td { padding: 12px 14px; text-align: left; border-bottom: 1px solid #f0e6da; }
.tableau th { background: #f6efe4; }
.tableau tr.fait td { opacity: .45; text-decoration: line-through; }
.actions-tableau { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* Forum */
.sujet-ligne { display: flex; justify-content: space-between; align-items: center; text-decoration: none; color: var(--brun); }
.fleche { font-size: 1.4rem; color: var(--terre); }
.message { margin: 10px 0; }

/* Admin */
.stats { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.menu-admin { display: flex; gap: 12px; flex-wrap: wrap; margin: 20px 0; }
.message-admin { border-top: 1px dashed #e4d5c2; padding: 8px 0; display: flex; justify-content: space-between; gap: 10px; align-items: center; }

/* Pied de page */
.pied { background: var(--brun); color: #f3e8dc; padding: 30px 0; margin-top: 40px; }
.pied a { color: #f3e8dc; }

/* Bulle de chat */
.chat-bulle { position: fixed; bottom: 22px; right: 22px; z-index: 50; }
.chat-bouton {
  width: 58px; height: 58px; border-radius: 50%; border: none; background: var(--terre);
  color: #fff; font-size: 1.6rem; cursor: pointer; box-shadow: var(--ombre); transition: transform .2s;
}
.chat-bouton:hover { transform: scale(1.08); }
.chat-panneau {
  position: absolute; bottom: 70px; right: 0; width: 300px; background: var(--papier);
  border-radius: var(--rayon); box-shadow: 0 12px 34px rgba(74,44,42,.25); overflow: hidden;
}
.chat-tete { background: var(--terre); color: #fff; padding: 10px 14px; display: flex; justify-content: space-between; }
.chat-tete button { background: none; border: none; color: #fff; font-size: 1.1rem; cursor: pointer; }
.chat-messages { height: 220px; overflow-y: auto; padding: 12px; font-size: .92rem; }
.chat-msg { margin-bottom: 8px; padding: 8px 12px; border-radius: 12px; max-width: 85%; }
.chat-msg.moi { background: #f0e6da; margin-left: auto; }
.chat-msg.bot { background: #f6efe4; }
.chat-form, #chat-form { display: flex; border-top: 1px solid #f0e6da; }
#chat-champ { flex: 1; border: none; padding: 10px; font-family: inherit; }
#chat-form button { border: none; background: var(--terre); color: #fff; padding: 0 16px; cursor: pointer; }

/* Responsive */
@media (max-width: 800px) {
  .heros { flex-direction: column; text-align: center; }
  .heros-actions { justify-content: center; }
  .deux-colonnes { grid-template-columns: 1fr; }
  .fiche-entete { flex-direction: column; }
  .burger { display: block; }
  .menu {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--papier); flex-direction: column; padding: 14px 20px; box-shadow: var(--ombre);
  }
  .menu.ouvert { display: flex; }
}
