/* Pola — Restaurant ivoirien — design moderne */

:root {
  --primary: #f97316;          /* orange chaleureux */
  --primary-dark: #c2410c;
  --green: #16a34a;            /* vert ivoirien */
  --bg: #fff8f1;
  --surface: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #f1e7d8;
  --shadow: 0 4px 14px rgba(0,0,0,0.06);
  --radius: 14px;
}

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

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

/* ---- 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: 800; font-size: 1.4rem; color: var(--primary-dark);
  display: inline-flex; align-items: center; gap: 0.5rem;
}
.brand-dot {
  width: 14px; height: 14px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--green));
  display: inline-block;
}
.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;
}
.nav a:hover, .nav .link:hover { color: var(--primary-dark); 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;
}
.cart-btn:hover { background: var(--primary-dark); }
.badge {
  background: rgba(255,255,255,0.25); padding: 0.1rem 0.45rem; border-radius: 999px; font-size: 0.85rem;
}

/* ---- Hero ---- */
.hero {
  background: linear-gradient(135deg, #fff1e0, #fef3c7);
  padding: 3rem 0 2.5rem;
  border-bottom: 1px solid var(--border);
}
.hero h1 { font-size: 2.2rem; line-height: 1.15; margin-bottom: 0.6rem; }
.hero p { color: var(--muted); max-width: 600px; }

/* ---- Filtres ---- */
.filters {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  margin: 1.6rem 0 1rem;
}
.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;
  transition: all 0.15s;
}
.filter-btn:hover { border-color: var(--primary); }
.filter-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ---- Grid plats ---- */
.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.3rem; 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.15s, box-shadow 0.15s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(0,0,0,0.08); }
.card-img { position: relative; height: 200px; 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(0,0,0,0.6); color: #fff;
  padding: 0.2rem 0.7rem; border-radius: 999px;
  font-size: 0.78rem; font-weight: 500;
}
.card-body { padding: 1rem 1.1rem 1.1rem; display: flex; flex-direction: column; gap: 0.4rem; flex: 1; }
.card-body h3 { font-size: 1.05rem; margin-bottom: 0.1rem; }
.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-mini img { height: 130px; }

/* ---- Boutons ---- */
.btn {
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border);
  padding: 0.55rem 1rem; border-radius: 8px;
  font-size: 0.92rem; font-weight: 600; cursor: pointer;
  transition: all 0.15s;
}
.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.75rem; font-size: 0.85rem; }
.btn-block { width: 100%; display: block; margin-top: 0.6rem; }
.link {
  background: none; border: none; padding: 0; cursor: pointer;
  color: var(--text); font-size: inherit;
}
.link:hover { color: var(--primary-dark); }

.muted { color: var(--muted); font-size: 0.9rem; }
.small { font-size: 0.82rem; }
.erreur { color: #ef4444; }

/* ---- Drawer Panier ---- */
.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: 420px;
  background: var(--surface); z-index: 100;
  transform: translateX(100%); transition: transform 0.25s;
  display: flex; flex-direction: column;
  box-shadow: -4px 0 20px rgba(0,0,0,0.1);
}
.drawer.open { transform: translateX(0); }
.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.3rem; border-bottom: 1px solid var(--border);
}
.drawer-body { flex: 1; overflow-y: auto; padding: 1rem 1.3rem; }
.drawer-foot { padding: 1rem 1.3rem; border-top: 1px solid var(--border); background: #fafafa; }
.total-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 1.1rem; margin-bottom: 0.8rem;
}
.cart-line {
  display: grid; grid-template-columns: 60px 1fr auto; align-items: center;
  gap: 0.7rem; padding: 0.6rem 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.55rem 0.7rem; border: 1px solid var(--border);
  border-radius: 8px; font-size: 0.92rem; margin-bottom: 0.4rem;
  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, #fff1e0, #fef3c7);
}
.auth-card {
  background: var(--surface); padding: 2rem 2.2rem;
  border-radius: var(--radius); box-shadow: var(--shadow);
  width: 100%; max-width: 420px;
}
.auth-card h2 { margin: 1rem 0 1.2rem; }
.auth-card label {
  display: block; margin-bottom: 0.8rem; font-size: 0.9rem; color: var(--muted);
}
.auth-card input {
  width: 100%; padding: 0.6rem 0.85rem; 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.3rem; 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-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.7rem; }
.badge-statut {
  color: #fff; padding: 0.2rem 0.7rem; border-radius: 999px;
  font-size: 0.8rem; font-weight: 600;
}

/* ---- Formulaire propriétaire ---- */
.card-form {
  background: var(--surface); padding: 1rem 1.3rem;
  border-radius: var(--radius); box-shadow: var(--shadow);
  margin: 1.2rem 0;
}
.card-form summary { cursor: pointer; font-weight: 600; padding: 0.4rem 0; }
.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.55rem 0.7rem; border: 1px solid var(--border);
  border-radius: 8px; font-size: 0.92rem; font-family: inherit; background: #fff;
}

/* ---- 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;
}
.notif.show { transform: translateX(0); }
.notif-success { background: var(--green); }
.notif-error { background: #ef4444; }

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