* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", Verdana, sans-serif;
  background: #f4efe6;
  color: #2c2c2c;
}
header {
  background: #14532d;
  color: #fff;
  padding: 18px 24px;
  text-align: center;
}
header h1 { margin: 0; font-size: 1.6rem; }
.sous-titre { margin: 4px 0 0; opacity: 0.85; }
main { max-width: 900px; margin: 24px auto; padding: 0 16px; }
.carte {
  background: #fff;
  border: 1px solid #e2d9c8;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}
.cache { display: none; }
.erreur { color: #b91c1c; font-weight: 600; min-height: 1.2em; }
.avertissement { color: #b45309; font-weight: 600; background: #fffbeb; border: 1px solid #fcd34d; border-radius: 8px; padding: 8px 12px; }
#id-manuel { font-family: "Consolas", monospace; font-size: 1.3rem; letter-spacing: 2px; max-width: 220px; }
.aide { color: #666; font-size: 0.9rem; }
.ligne-saisie { display: flex; gap: 10px; flex-wrap: wrap; }
input[type="email"], input[type="password"], input[type="text"] {
  flex: 1;
  min-width: 220px;
  padding: 12px;
  font-size: 1rem;
  border: 1px solid #cbbfa8;
  border-radius: 8px;
}
.mail-saisie {
  flex: 1;
  min-width: 260px;
  display: flex;
  align-items: stretch;
  border: 1px solid #cbbfa8;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.mail-saisie input { border: none; border-radius: 0; min-width: 0; }
.mail-saisie input:focus { outline: 2px solid #14532d; outline-offset: -2px; }
.mail-saisie .domaine {
  display: flex;
  align-items: center;
  padding: 0 14px;
  background: #f4efe6;
  color: #14532d;
  font-weight: 700;
  white-space: nowrap;
  border-left: 1px solid #e2d9c8;
}
.bouton {
  padding: 12px 20px;
  font-size: 1rem;
  border: 1px solid #14532d;
  background: #fff;
  color: #14532d;
  border-radius: 8px;
  cursor: pointer;
}
.bouton.primaire { background: #14532d; color: #fff; }
.bouton.primaire:disabled { background: #9ca3af; border-color: #9ca3af; cursor: not-allowed; }
.bouton.grand { font-size: 1.2rem; padding: 14px 28px; width: 100%; margin-top: 12px; }
.grille {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.carte-etiquette {
  background: #fff;
  border: 1px solid #e2d9c8;
  border-radius: 12px;
  padding: 12px;
  text-align: center;
}
.carte-etiquette img { width: 100%; max-width: 150px; height: auto; }
.carte-etiquette .nom { font-weight: 600; margin: 8px 0 2px; }
.carte-etiquette .prix { color: #14532d; font-weight: 600; margin-bottom: 8px; }
.btn-plus {
  width: 44px; height: 44px;
  font-size: 1.5rem; font-weight: bold;
  border-radius: 50%;
  border: none;
  background: #b91c1c;
  color: #fff;
  cursor: pointer;
}
.btn-plus:hover { background: #991b1b; }
.ligne-panier {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  border: 1px solid #e2d9c8;
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 10px;
  background: #fffdf8;
}
.badge {
  background: #14532d;
  color: #fff;
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 0.85rem;
  white-space: nowrap;
}
.ligne-panier input[type="text"] { min-width: 140px; flex: 1; padding: 8px; }
.stepper { display: flex; align-items: center; gap: 8px; }
.stepper button {
  width: 34px; height: 34px;
  font-size: 1.1rem;
  border-radius: 8px;
  border: 1px solid #14532d;
  background: #fff;
  color: #14532d;
  cursor: pointer;
}
.stepper .nombre { min-width: 28px; text-align: center; font-weight: 700; font-size: 1.1rem; }
.prix-ligne { font-weight: 600; color: #14532d; min-width: 70px; text-align: right; }
.btn-suppr {
  border: 1px solid #b91c1c;
  background: #fff;
  color: #b91c1c;
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
}
.total-ligne {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.3rem;
  font-weight: 700;
  padding: 12px 4px;
}
.total { color: #b91c1c; }
.id-commande { font-size: 1.3rem; }
.mail { color: #444; }
.prix-grand {
  font-size: 3rem;
  font-weight: 800;
  color: #b91c1c;
  margin: 8px 0 16px;
}
.qr { display: block; margin: 0 auto; width: 260px; height: 260px; border: 1px solid #ddd; border-radius: 8px; }
.onglets { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.onglet {
  padding: 10px 16px;
  border: 1px solid #cbbfa8;
  background: #fff;
  border-radius: 8px;
  cursor: pointer;
}
.onglet.actif { background: #14532d; color: #fff; border-color: #14532d; }
.mode video {
  width: 100%;
  max-width: 480px;
  border-radius: 10px;
  background: #000;
}
#resultat.valide { border: 3px solid #14532d; }
#resultat.deja { border: 3px solid #b45309; }
#resultat.attente { border: 3px solid #1d4ed8; }
#resultat.erreur-res { border: 3px solid #b91c1c; }
#res-titre.valide { color: #14532d; }
#res-titre.deja { color: #b45309; }
#res-titre.attente { color: #1d4ed8; }
#res-titre.erreur-res { color: #b91c1c; }
#zone-paiement {
  margin: 14px 0;
  padding: 14px;
  border: 1px dashed #1d4ed8;
  border-radius: 10px;
  background: #eff6ff;
}
#zone-paiement label { display: block; margin-bottom: 8px; }
#montant-paye { max-width: 180px; font-size: 1.2rem; font-weight: 700; }
