/* Sweet Chocolate — design chaleureux thème cacao/or */

:root {
  --primary: #6f4e37;          /* chocolat */
  --primary-dark: #4a3322;
  --gold: #d4a574;             /* doré praliné */
  --green-wa: #25d366;         /* vert WhatsApp */
  --bg: #fdf6ec;
  --surface: #ffffff;
  --text: #2b1d12;
  --muted: #7a6759;
  --border: #efe1cd;
  --shadow: 0 4px 16px rgba(75, 47, 24, 0.08);
  --radius: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: "Georgia", "Cormorant Garamond", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}
a { color: var(--primary-dark); text-decoration: none; }
a:hover { color: var(--primary); text-decoration: underline; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 1.25rem; }
.center { text-align: center; }

/* ---- Topbar ---- */
.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
}
.topbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.9rem 1.25rem;
}
.brand {
  font-weight: 700; font-size: 1.4rem; color: var(--primary-dark);
  letter-spacing: 0.5px;
}
.brand span { color: var(--gold); }
.nav { display: flex; align-items: center; gap: 1.2rem; }
.nav a, .nav .link {
  color: var(--text); font-weight: 500; font-size: 0.95rem;
  background: none; border: none; cursor: pointer;
  font-family: inherit;
}
.nav a:hover, .nav .link:hover { color: var(--primary); text-decoration: none; }

.cart-btn {
  background: var(--primary); color: #fff; border: none;
  padding: 0.5rem 0.9rem; border-radius: 999px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 0.4rem; cursor: pointer;
  font-family: inherit;
}
.cart-btn:hover { background: var(--primary-dark); }
.badge {
  background: var(--gold); color: var(--primary-dark);
  padding: 0.1rem 0.5rem; border-radius: 999px; font-size: 0.8rem; font-weight: 700;
}

/* ---- Hero ---- */
.hero {
  background:
    linear-gradient(135deg, rgba(111,78,55,0.92), rgba(74,51,34,0.92)),
    url("https://images.unsplash.com/photo-1606312619070-d48b4c652a52?w=1600&h=900&fit=crop") center/cover;
  color: #fff;
  padding: 5rem 0 4rem;
}
.hero-eyebrow {
  display: inline-block; padding: 0.2rem 0.9rem;
  background: rgba(212,165,116,0.25); color: var(--gold);
  border-radius: 999px; font-size: 0.8rem; letter-spacing: 1px;
  text-transform: uppercase; margin-bottom: 1.2rem;
}
.hero h1 { font-size: 3rem; line-height: 1.1; margin-bottom: 0.8rem; font-weight: 700; }
.hero p { color: #f0dec5; max-width: 600px; margin-bottom: 1.6rem; font-size: 1.1rem; }
.btn-lg { padding: 0.9rem 2rem; font-size: 1rem; }

/* ---- Filtres ---- */
.filters {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  margin: 2rem 0 1.2rem;
}
.filter-btn {
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  padding: 0.45rem 1rem; border-radius: 999px; cursor: pointer;
  font-size: 0.9rem; font-weight: 500; font-family: inherit;
  transition: all 0.15s;
}
.filter-btn:hover { border-color: var(--primary); }
.filter-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ---- Grid produits ---- */
.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.4rem; padding-bottom: 3rem;
}
.grid-small { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }

.card {
  background: var(--surface); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  transition: transform 0.18s, box-shadow 0.18s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 14px 28px rgba(75,47,24,0.15); }
.card-img { position: relative; height: 220px; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cat-pill {
  position: absolute; top: 0.7rem; left: 0.7rem;
  background: rgba(255,255,255,0.92); color: var(--primary-dark);
  padding: 0.2rem 0.7rem; border-radius: 999px;
  font-size: 0.78rem; font-weight: 600;
}
.card-body { padding: 1.1rem 1.2rem 1.2rem; display: flex; flex-direction: column; gap: 0.45rem; flex: 1; }
.card-body h3 { font-size: 1.1rem; margin-bottom: 0.1rem; color: var(--primary-dark); }
.card-body h4 { font-size: 0.95rem; }
.card-foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: auto; padding-top: 0.7rem;
}
.card-foot strong { color: var(--primary-dark); font-size: 1.05rem; }
.card-mini img { height: 130px; }

/* ---- Boutons ---- */
.btn {
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border);
  padding: 0.55rem 1.1rem; border-radius: 8px;
  font-size: 0.92rem; font-weight: 600; cursor: pointer;
  transition: all 0.15s; font-family: inherit;
}
.btn:hover { border-color: var(--primary); }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-sm { padding: 0.35rem 0.8rem; font-size: 0.85rem; }
.btn-block { width: 100%; display: block; margin-top: 0.6rem; }
.btn-wa { background: var(--green-wa); border-color: var(--green-wa); }
.btn-wa:hover { background: #1ebe5a; border-color: #1ebe5a; }
.link {
  background: none; border: none; padding: 0; cursor: pointer;
  color: var(--text); font-size: inherit; font-family: inherit;
}
.link:hover { color: var(--primary); }

.muted { color: var(--muted); font-size: 0.92rem; }
.small { font-size: 0.82rem; }

/* ---- Drawer ---- */
.overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.4);
  z-index: 90; opacity: 0; pointer-events: none; transition: opacity 0.2s;
}
.overlay.show { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; height: 100%;
  width: 90%; max-width: 440px;
  background: var(--surface); z-index: 100;
  transform: translateX(100%); transition: transform 0.25s;
  display: flex; flex-direction: column;
  box-shadow: -4px 0 24px rgba(0,0,0,0.15);
}
.drawer.open { transform: translateX(0); }
.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.4rem; border-bottom: 1px solid var(--border);
}
.drawer-head h3 { color: var(--primary-dark); }
.drawer-body { flex: 1; overflow-y: auto; padding: 1rem 1.4rem; }
.drawer-foot { padding: 1.2rem 1.4rem; border-top: 1px solid var(--border); background: #fcf7ed; }
.total-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 1.15rem; margin-bottom: 0.9rem;
}
.total-row strong { color: var(--primary-dark); }
.cart-line {
  display: grid; grid-template-columns: 60px 1fr auto; align-items: center;
  gap: 0.7rem; padding: 0.7rem 0; border-bottom: 1px solid var(--border);
}
.cart-line img { width: 60px; height: 60px; border-radius: 10px; object-fit: cover; }
.cart-info { display: flex; flex-direction: column; }
.cart-qty { display: flex; align-items: center; gap: 0.6rem; }
.cart-qty .link {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--bg); display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border);
}
.form-mini input, .form-mini textarea {
  width: 100%; padding: 0.6rem 0.75rem; border: 1px solid var(--border);
  border-radius: 8px; font-size: 0.92rem; margin-bottom: 0.5rem;
  font-family: inherit; background: #fff;
}
.form-mini textarea { resize: vertical; }

/* ---- Auth ---- */
.auth-page {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; padding: 1rem;
  background: linear-gradient(135deg, #fef3e2, #f3d8b8);
}
.auth-card {
  background: var(--surface); padding: 2.2rem 2.4rem;
  border-radius: var(--radius); box-shadow: var(--shadow);
  width: 100%; max-width: 420px;
}
.auth-card h2 { margin: 1rem 0 1.2rem; color: var(--primary-dark); }
.auth-card label {
  display: block; margin-bottom: 0.9rem; font-size: 0.9rem; color: var(--muted);
}
.auth-card input {
  width: 100%; padding: 0.65rem 0.9rem; border: 1px solid var(--border);
  border-radius: 8px; font-size: 0.95rem; margin-top: 0.25rem;
  font-family: inherit; background: #fff;
}
.auth-card input:focus { outline: 2px solid var(--primary); outline-offset: -2px; border-color: var(--primary); }

/* ---- Listes ---- */
.list { display: flex; flex-direction: column; gap: 1rem; padding: 1rem 0 3rem; }
.card-cmd {
  background: var(--surface); border-radius: var(--radius);
  padding: 1.1rem 1.4rem; box-shadow: var(--shadow);
}
.card-cmd header {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.4rem;
}
.card-cmd ul { list-style: none; padding: 0.5rem 0; }
.card-cmd ul li { padding: 0.2rem 0; }
.card-cmd footer {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 0.6rem; border-top: 1px solid var(--border);
}
.card-cmd footer strong { color: var(--primary-dark); }
.card-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.7rem; }
.badge-statut {
  color: #fff; padding: 0.2rem 0.75rem; border-radius: 999px;
  font-size: 0.8rem; font-weight: 600;
}

/* ---- Form propriétaire ---- */
.card-form {
  background: var(--surface); padding: 1rem 1.4rem;
  border-radius: var(--radius); box-shadow: var(--shadow);
  margin: 1.2rem 0;
}
.card-form summary { cursor: pointer; font-weight: 600; padding: 0.4rem 0; color: var(--primary-dark); }
.grid-form {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.6rem;
  margin-top: 1rem;
}
.grid-form textarea, .grid-form button { grid-column: 1 / -1; }
.grid-form input, .grid-form textarea {
  width: 100%; padding: 0.6rem 0.75rem; border: 1px solid var(--border);
  border-radius: 8px; font-size: 0.92rem; font-family: inherit; background: #fff;
}

/* ---- Footer ---- */
.footer {
  background: var(--primary-dark); color: #f0dec5;
  padding: 2rem 0; margin-top: 4rem;
  text-align: center;
}
.footer p { margin: 0.3rem 0; }
.footer a { color: var(--gold); }

/* ---- Notifications ---- */
.notif-zone {
  position: fixed; top: 1.2rem; right: 1.2rem; z-index: 200;
  display: flex; flex-direction: column; gap: 0.5rem;
}
.notif {
  background: var(--text); color: #fff;
  padding: 0.8rem 1.2rem; border-radius: 10px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.15);
  font-size: 0.9rem; font-weight: 500;
  transform: translateX(120%); transition: transform 0.25s;
  min-width: 200px; font-family: inherit;
}
.notif.show { transform: translateX(0); }
.notif-success { background: var(--green-wa); }
.notif-error { background: #ef4444; }

/* ---- Responsive ---- */
@media (max-width: 600px) {
  .nav a:not([data-auth]) { display: none; }
  .hero { padding: 3rem 0 2.5rem; }
  .hero h1 { font-size: 2rem; }
  .grid-form { grid-template-columns: 1fr; }
}
