:root {
  --bg: #1a1a1a;
  --panel: #242424;
  --border: #3a3a3a;
  --in: #2e7d32;
  --out: #c62828;
  --text: #f0f0f0;
  --muted: #9a9a9a;
  --accent: #c9922a;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  padding-bottom: 40px;
}
header {
  padding: 14px 16px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
header h1 { font-size: 16px; margin: 0 0 8px; font-weight: 600; }
nav { display: flex; flex-wrap: wrap; gap: 4px 14px; }
nav a { color: var(--muted); text-decoration: none; font-size: 12.5px; }
nav a.active { color: var(--accent); font-weight: 600; }

.container { padding: 14px 16px; }

.btn {
  display: inline-block;
  padding: 11px 16px;
  background: var(--accent);
  color: #1a1a1a;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
}
.btn.secondary { background: #333; color: var(--text); }
.btn.danger { background: var(--out); color: white; }
.btn-row { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
}
.panel label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; margin-top: 10px; }
.panel label:first-child { margin-top: 0; }
.panel input, .panel select, .panel textarea {
  width: 100%;
  padding: 10px;
  background: #161616;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
}
.panel textarea { resize: vertical; min-height: 60px; }

.list-item {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 8px;
}
.list-item .title { font-weight: 600; font-size: 14px; }
.list-item .meta { font-size: 12px; color: var(--muted); margin-top: 3px; }
.list-item .actions { display: flex; gap: 8px; margin-top: 8px; }
.list-item .actions a, .list-item .actions button {
  font-size: 12px; padding: 6px 10px; border-radius: 6px; border: 1px solid var(--border);
  background: #161616; color: var(--muted); text-decoration: none; cursor: pointer;
}

.search-box { margin-bottom: 12px; }
.search-box input {
  width: 100%; padding: 10px; background: var(--panel); border: 1px solid var(--border);
  border-radius: 8px; color: var(--text); font-size: 14px;
}

.badge { padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 700; }
.badge.gamme { background: rgba(201,146,42,0.2); color: var(--accent); }
.badge.low { background: rgba(198,40,40,0.25); color: #ef5350; }
.badge.ok { background: rgba(46,125,50,0.2); color: #66bb6a; }
.badge.statut { background: #333; color: var(--muted); }

.empty-state { color: var(--muted); text-align: center; padding: 30px 10px; font-size: 13px; }

.fab {
  position: fixed;
  bottom: 20px; right: 20px;
  width: 54px; height: 54px;
  border-radius: 50%;
  background: var(--accent);
  color: #1a1a1a;
  font-size: 26px;
  display: flex; align-items: center; justify-content: center;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  z-index: 20;
}

.ligne-commande {
  background: #1e1e1e;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 8px;
  position: relative;
}
.ligne-commande .remove-ligne {
  position: absolute; top: 8px; right: 8px;
  background: none; border: none; color: var(--out);
  font-size: 18px; cursor: pointer; padding: 2px 6px;
}
.ligne-commande select, .ligne-commande input {
  width: 100%; padding: 9px; margin-top: 6px;
  background: #161616; border: 1px solid var(--border); border-radius: 7px;
  color: var(--text); font-size: 13px;
}
.ligne-row { display: flex; gap: 8px; }
.ligne-row > * { flex: 1; }

.dashboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: 12px;
  padding: 16px; text-align: center;
}
.stat-card .num { font-size: 28px; font-weight: 800; color: var(--accent); }
.stat-card .label { font-size: 12px; color: var(--muted); margin-top: 4px; }

.alert-box {
  background: rgba(198,40,40,0.12); border: 1px solid var(--out);
  border-radius: 10px; padding: 12px; margin-top: 12px; font-size: 13px;
}
.alert-box h4 { margin: 0 0 8px; font-size: 13px; color: #ef5350; }
