/* L'Étal des Monts — démo Willos */
:root {
  --vert-profond: #2D5A3D;
  --vert-sauge: #7FA682;
  --vert-clair: #B8CFB4;
  --creme: #FAF7F2;
  --creme-fonce: #EFE9DD;
  --corail: #E15A4F;
  --corail-fonce: #B8483F;
  --terre: #5C4530;
  --texte: #3D352E;
  --gris: #8A8378;
  --ombre: 0 2px 8px rgba(60, 40, 20, 0.08);
  --ombre-fort: 0 8px 24px rgba(60, 40, 20, 0.12);
  --radius: 6px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Manrope', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--texte);
  background: var(--creme);
}

h1, h2, h3, h4, h5 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 700;
  color: var(--terre);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); margin-bottom: 1rem; }
h3 { font-size: 1.45rem; margin-bottom: 0.5rem; }
h4 { font-size: 1.15rem; }

a { color: var(--vert-profond); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--corail); }

p { margin-bottom: 1rem; }

img { max-width: 100%; height: auto; display: block; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 1.25rem; }
.container-narrow { max-width: 780px; margin: 0 auto; padding: 0 1.25rem; }

/* === NAV === */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 247, 242, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--creme-fonce);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.9rem 1.25rem; max-width: 1180px; margin: 0 auto;
}
.nav-logo { display: flex; align-items: center; gap: 0.6rem; font-family: 'Cormorant Garamond', serif; font-weight: 700; font-size: 1.4rem; color: var(--terre); }
.nav-logo svg { height: 32px; width: auto; }
.nav-links { display: flex; gap: 1.6rem; align-items: center; }
.nav-links a { color: var(--texte); font-weight: 500; font-size: 0.96rem; }
.nav-links a.active { color: var(--vert-profond); font-weight: 700; }
.nav-cta { background: var(--corail); color: white !important; padding: 0.55rem 1.1rem; border-radius: var(--radius); font-weight: 600; font-size: 0.92rem; }
.nav-cta:hover { background: var(--corail-fonce); color: white !important; }
.nav-toggle { display: none; background: none; border: none; font-size: 1.5rem; color: var(--terre); cursor: pointer; }

@media (max-width: 860px) {
  .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--creme); flex-direction: column; padding: 1rem 1.25rem; gap: 1rem; box-shadow: var(--ombre); }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
}

/* === HERO === */
.hero {
  padding: 4rem 1.25rem 3rem;
  background: linear-gradient(135deg, var(--creme) 0%, var(--creme-fonce) 100%);
  position: relative;
  overflow: hidden;
}
.hero-inner { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 3rem; align-items: center; }
@media (max-width: 860px) { .hero-inner { grid-template-columns: 1fr; gap: 2rem; } }
.hero h1 { color: var(--terre); margin-bottom: 1.2rem; }
.hero .accroche { font-size: 1.2rem; color: var(--gris); margin-bottom: 1.8rem; }
.hero .badge { display: inline-block; background: var(--vert-clair); color: var(--vert-profond); padding: 0.35rem 0.85rem; border-radius: 100px; font-size: 0.85rem; font-weight: 600; margin-bottom: 1.2rem; }
.hero-img { border-radius: 12px; box-shadow: var(--ombre-fort); aspect-ratio: 4/3; object-fit: cover; }

/* === BOUTONS === */
.btn { display: inline-block; padding: 0.85rem 1.6rem; border-radius: var(--radius); font-weight: 600; font-size: 1rem; transition: all 0.15s; cursor: pointer; border: none; text-align: center; }
.btn-primary { background: var(--corail); color: white; }
.btn-primary:hover { background: var(--corail-fonce); color: white; transform: translateY(-1px); }
.btn-secondary { background: var(--vert-profond); color: white; }
.btn-secondary:hover { background: #1f4029; color: white; }
.btn-outline { background: transparent; color: var(--vert-profond); border: 2px solid var(--vert-profond); }
.btn-outline:hover { background: var(--vert-profond); color: white; }
.btn-ghost { background: var(--creme-fonce); color: var(--texte); }
.btn-ghost:hover { background: var(--vert-clair); }
.btn-row { display: flex; gap: 0.8rem; flex-wrap: wrap; }

/* === SECTIONS === */
.section { padding: 4rem 0; }
.section-creme { background: var(--creme-fonce); }
.section-titre { text-align: center; margin-bottom: 2.5rem; }
.section-titre .surtitre { display: block; color: var(--corail); font-size: 0.9rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 0.6rem; }

/* === GRID === */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
@media (max-width: 860px) { .grid-3, .grid-4 { grid-template-columns: 1fr; } }
@media (min-width: 600px) and (max-width: 860px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }

/* === CARTES PRODUITS === */
.produit-card {
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--ombre);
  transition: transform 0.15s, box-shadow 0.15s;
  display: flex; flex-direction: column;
}
.produit-card:hover { transform: translateY(-2px); box-shadow: var(--ombre-fort); }
.produit-card .photo { aspect-ratio: 4/3; object-fit: cover; background: var(--creme-fonce); width: 100%; }
.produit-card .corps { padding: 1rem 1.1rem 1.25rem; display: flex; flex-direction: column; flex: 1; }
.produit-card h3 { font-size: 1.2rem; margin-bottom: 0.25rem; }
.produit-card .categorie { font-size: 0.8rem; color: var(--gris); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 0.4rem; }
.produit-card .prix { color: var(--corail); font-weight: 700; font-size: 1.15rem; margin-top: auto; }
.produit-card .prix .unite { color: var(--gris); font-size: 0.85rem; font-weight: 500; }
.produit-card .stock { display: inline-block; font-size: 0.78rem; padding: 0.15rem 0.55rem; border-radius: 100px; margin-top: 0.4rem; font-weight: 600; }
.produit-card .stock.dispo { background: #E8F1E5; color: var(--vert-profond); }
.produit-card .stock.rupture { background: #FCE5E3; color: var(--corail-fonce); }

/* === PANIERS === */
.panier-card {
  background: white;
  border-radius: var(--radius);
  padding: 1.8rem 1.5rem;
  box-shadow: var(--ombre);
  border-top: 4px solid var(--vert-sauge);
  position: relative;
}
.panier-card.vedette { border-top-color: var(--corail); transform: scale(1.03); }
.panier-card.vedette::before { content: 'POPULAIRE'; position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--corail); color: white; padding: 0.25rem 0.8rem; border-radius: 100px; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; }
.panier-card h3 { font-size: 1.55rem; margin-bottom: 0.5rem; }
.panier-card .prix-grand { font-family: 'Cormorant Garamond', serif; font-size: 2.6rem; font-weight: 700; color: var(--corail); line-height: 1; margin-bottom: 0.3rem; }
.panier-card .pers { color: var(--gris); font-size: 0.95rem; margin-bottom: 1.2rem; }
.panier-card ul { list-style: none; margin: 1.2rem 0 1.6rem; }
.panier-card li { padding: 0.45rem 0; border-bottom: 1px dotted var(--creme-fonce); font-size: 0.95rem; }
.panier-card li::before { content: '🌿'; margin-right: 0.5rem; }

/* === RECETTES === */
.recette-card {
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--ombre);
  display: flex; flex-direction: column;
}
.recette-card .photo { aspect-ratio: 16/10; object-fit: cover; }
.recette-card .corps { padding: 1.1rem 1.25rem 1.35rem; flex: 1; display: flex; flex-direction: column; }
.recette-card h3 { font-size: 1.25rem; margin-bottom: 0.4rem; }
.recette-card .meta { font-size: 0.85rem; color: var(--gris); margin-bottom: 0.7rem; display: flex; gap: 0.8rem; flex-wrap: wrap; }
.recette-card .meta span::before { content: '· '; color: var(--vert-sauge); }
.recette-card .meta span:first-child::before { content: ''; }
.recette-card .ingredients-mini { font-size: 0.88rem; color: var(--texte); margin-bottom: 0.8rem; }
.recette-card .badge-match { display: inline-block; padding: 0.25rem 0.7rem; border-radius: 100px; font-size: 0.78rem; font-weight: 700; margin-top: auto; align-self: flex-start; }
.recette-card .badge-match.full { background: #E8F1E5; color: var(--vert-profond); }
.recette-card .badge-match.partial { background: #FFF4E0; color: #8C6914; }
.recette-card .manquants { font-size: 0.82rem; color: var(--gris); margin-top: 0.4rem; }

/* === ADMIN === */
.admin-shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.admin-side { background: var(--terre); color: var(--creme); padding: 1.5rem 1.25rem; }
.admin-side h2 { color: var(--creme); font-size: 1.4rem; margin-bottom: 1.5rem; }
.admin-side a { display: block; padding: 0.5rem 0.7rem; color: var(--vert-clair); border-radius: var(--radius); margin-bottom: 0.25rem; font-size: 0.95rem; }
.admin-side a:hover, .admin-side a.active { background: rgba(255,255,255,0.1); color: white; }
.admin-main { padding: 2rem; background: var(--creme); }
.admin-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; flex-wrap: wrap; gap: 1rem; }

.admin-table { width: 100%; background: white; border-radius: var(--radius); overflow: hidden; box-shadow: var(--ombre); border-collapse: collapse; }
.admin-table th { background: var(--creme-fonce); padding: 0.85rem 1rem; text-align: left; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--terre); border-bottom: 2px solid var(--creme); }
.admin-table td { padding: 0.85rem 1rem; border-bottom: 1px solid var(--creme-fonce); vertical-align: middle; font-size: 0.95rem; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table input, .admin-table select { width: 100%; padding: 0.4rem 0.6rem; border: 1px solid var(--creme-fonce); border-radius: 4px; font: inherit; }
.admin-table input:focus, .admin-table select:focus { outline: none; border-color: var(--vert-sauge); }

.btn-icon { background: transparent; border: none; cursor: pointer; padding: 0.35rem; color: var(--gris); font-size: 1.1rem; transition: color 0.15s; }
.btn-icon:hover { color: var(--corail); }
.btn-icon.save:hover { color: var(--vert-profond); }

@media (max-width: 860px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side { padding: 1rem; }
}

/* === FORM === */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.form-group { display: flex; flex-direction: column; gap: 0.3rem; }
.form-group label { font-size: 0.85rem; font-weight: 600; color: var(--terre); }
.form-group input, .form-group select, .form-group textarea {
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--creme-fonce);
  border-radius: var(--radius);
  font: inherit;
  background: white;
}
.form-group input:focus, .form-group select:focus { outline: none; border-color: var(--vert-sauge); box-shadow: 0 0 0 3px rgba(127, 166, 130, 0.15); }

/* === AUDIT IA === */
.audit-card { background: white; border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--ombre); display: flex; gap: 1rem; align-items: flex-start; }
.audit-card .pill { padding: 0.25rem 0.65rem; border-radius: 100px; font-size: 0.78rem; font-weight: 700; flex-shrink: 0; }
.audit-card .pill.ok { background: #E8F1E5; color: var(--vert-profond); }
.audit-card .pill.warn { background: #FFF4E0; color: #8C6914; }
.audit-card .pill.ko { background: #FCE5E3; color: var(--corail-fonce); }
.audit-card h4 { font-size: 1.05rem; margin-bottom: 0.25rem; }
.audit-card p { font-size: 0.92rem; color: var(--gris); margin: 0; }

/* === FOOTER === */
.footer { background: var(--terre); color: var(--creme); padding: 3rem 0 1.5rem; margin-top: 4rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem; margin-bottom: 2.5rem; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .footer-grid { grid-template-columns: 1fr; } }
.footer h4 { color: var(--creme); font-size: 1.05rem; margin-bottom: 0.9rem; }
.footer a { color: var(--vert-clair); display: block; padding: 0.2rem 0; font-size: 0.92rem; }
.footer a:hover { color: white; }
.footer-bas { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 1.5rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; font-size: 0.85rem; color: var(--vert-clair); }
.footer-demo-warning { background: var(--corail); color: white; padding: 0.6rem 1rem; text-align: center; font-size: 0.85rem; font-weight: 600; }

/* === UTILS === */
.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }
.muted { color: var(--gris); font-size: 0.92rem; }
.tag { display: inline-block; background: var(--creme-fonce); padding: 0.2rem 0.6rem; border-radius: 100px; font-size: 0.78rem; font-weight: 600; color: var(--terre); margin: 0.1rem 0.2rem 0.1rem 0; }

/* === ALERTES === */
.alert { padding: 1rem 1.25rem; border-radius: var(--radius); margin: 1rem 0; }
.alert-info { background: #E8F0FA; color: #1F4F8B; border-left: 4px solid #1F4F8B; }
.alert-success { background: #E8F1E5; color: var(--vert-profond); border-left: 4px solid var(--vert-profond); }
.alert-warn { background: #FFF4E0; color: #8C6914; border-left: 4px solid #C9A03C; }
