/* command-detail.css — Détail d’une commande (thème clair vert/blanc) */

.command-detail {
  max-width: 900px;
  margin: 2rem auto;
  padding: 1.5rem;
  background: #ffffff;
  border: 1px solid #dce5dd;     /* bord vert très clair */
  border-radius: 12px;
  font-family: system-ui, sans-serif;
  color: #1b1b1b;
}

/* Titres */
.command-detail h2 {
  font-size: clamp(1.5rem, 1.1rem + 1vw, 2rem);
  margin-bottom: .25rem;
  color: #2e7d32;                /* vert forêt */
}
.command-detail h3 {
  margin: 1.25rem 0 .75rem;
  font-size: 1.25rem;
  color: #2e7d32;
}

/* Adresse */
.command-detail > div > p {
  margin: 0 0 1rem;
  color: #5f6f64;                /* gris-vert doux */
}

/* Liste des produits */
.command-detail ul {
  list-style: none;
  padding: 0;
  margin: 0;
  border: 1px solid #dce5dd;
  border-radius: 10px;
}
.command-detail li {
  padding: .8rem 1rem;
  border-bottom: 1px solid #dce5dd;
  display: grid;
  gap: .25rem;
}
.command-detail li:last-child { border-bottom: 0; }

/* Mise en valeur des infos dans la ligne :
   Producteur (nom + adresse) en doux, produit + quantité plus lisible */
.command-detail li {
  font-variant-numeric: tabular-nums;
}
.command-detail li::marker { content: ""; } /* (sécurité si liste convertie) */

.command-detail li .producer,
.command-detail li .from {
  color: #5f6f64;
  font-weight: 500;
}
.command-detail li .product {
  color: #1b1b1b;
  font-weight: 600;
}

/* Bouton “Prendre la commande” */
.command-detail button {
  margin-top: 1rem;
  padding: .7rem 1.1rem;
  border: 1px solid #2e7d32;
  border-radius: 10px;
  background: #2e7d32;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, transform .1s ease, opacity .2s ease;
}
.command-detail button:hover {
  background: #4caf50;
  border-color: #4caf50;
  transform: translateY(-1px);
}
.command-detail button:active { transform: translateY(0); }
.command-detail button:disabled {
  background: #dce5dd;
  border-color: #dce5dd;
  color: #5f6f64;
  cursor: not-allowed;
  transform: none;
}

/* Focus visibles (accessibilité) */
.command-detail button:focus-visible {
  outline: 3px solid rgba(76,175,80,.35);
  outline-offset: 2px;
}

/* Impression (optionnel) : simplifie le rendu papier */
@media print {
  .command-detail {
    border: 0;
    padding: 0;
    box-shadow: none;
  }
  .command-detail button { display: none; }
}
