/* cart.css — Thème clair écologique */

/* ===== Variables ===== */
.command {
  --bg: #ffffff;
  --text: #1b1b1b;
  --muted: #5f6f64;
  --border: #dce5dd;
  --accent: #2e7d32;       /* vert forêt */
  --accent-light: #4caf50; /* vert clair */
  --danger: #b23c17;       /* terre cuite */
  --radius: 10px;
  --shadow: none; /* thème plat */
}

/* ===== Container ===== */
.command {
  color: var(--text);
  background: var(--bg);
  max-width: 960px;
  margin: 2rem auto;
  padding: 1.25rem;
  font-family: system-ui, sans-serif;
}

/* Titres */
.command h2 {
  font-size: clamp(1.4rem, 1.1rem + 1vw, 2rem);
  margin-bottom: 1rem;
  color: var(--accent);
  margin-top: 1rem;
}
.command h3 {
  font-size: clamp(1.05rem, 1rem + .3vw, 1.25rem);
  margin-bottom: .25rem;
  color: var(--accent);
}

/* Paragraphes */
.command p { margin: .5rem 0; }
.command .muted { color: var(--muted); }

/* ===== Panier ===== */
.command ul {
  list-style: none;
  padding: 0;
  margin: 0 0 .75rem 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
}
.command ul li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .9rem 1rem;
  border-bottom: 1px solid var(--border);
}
.command ul li:last-child { border-bottom: 0; }
.command ul li p { margin: 0; font-variant-numeric: tabular-nums; }

/* Total */
.command > ul + p {
  margin-top: .75rem;
  font-weight: 600;
  text-align: right;
  color: var(--accent);
}

/* ===== Boutons ===== */
.command button {
  appearance: none;
  border-radius: var(--radius);
  font-weight: 600;
  padding: .55rem 1rem;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, border .2s ease;
}

/* Primaire (valider) */
.command > button,
.command button:not(li button) {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
}
.command > button:hover,
.command button:not(li button):hover {
  background: var(--accent-light);
  border-color: var(--accent-light);
}
.command > button:disabled {
  background: var(--border);
  border-color: var(--border);
  color: var(--muted);
  cursor: not-allowed;
}

/* Danger (supprimer) */
.command li button {
  border: 1px solid var(--danger);
  background: transparent;
  color: var(--danger);
}
.command li button:hover {
  background: var(--danger);
  color: #fff;
}

/* ===== Commandes payées / livraisons ===== */
.command h2 + div {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1rem;
}
.command h2 + div > div {
  grid-column: span 6;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  padding: 1rem;
}
@media (max-width: 800px) {
  .command h2 + div > div { grid-column: span 12; }
}
.command h2 + div > div p { color: var(--muted); }
.command h2 + div > div ul {
  background: transparent;
  border: 0;
  margin-top: .5rem;
}
.command h2 + div > div ul li {
  padding: .5rem 0;
  border-bottom: 1px dashed var(--border);
}
.command h2 + div > div ul li:last-child { border-bottom: 0; }
