/* Couleurs relevées sur entremesaveurs.com : crème, brun, caramel, or, sauge. */
:root { --creme: #F7F3EE; --brun: #5E3A22; --noir: #2B1A12; --caramel: #8A5A36; --or: #8B6A2B; --sauge: #C9B8AA; --blanc: #fff; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--creme); color: var(--noir); font: 17px/1.5 Georgia, "Times New Roman", serif; }
.haut { text-align: center; padding: 28px 16px 8px; }
.haut img { max-width: 70%; height: auto; }
main { max-width: 720px; margin: 0 auto; padding: 0 16px 40px; }
h1 { font-size: 1.9rem; text-align: center; margin: 12px 0 4px; color: var(--brun); font-weight: normal; text-transform: uppercase; letter-spacing: .12em; }
h2 { font-size: 1.3rem; margin: 36px 0 12px; color: var(--caramel); border-bottom: 1px solid var(--sauge); padding-bottom: 6px; font-weight: normal; }
h3 { font-size: 1.3rem; margin: 0 0 6px; color: var(--brun); font-weight: normal; text-transform: uppercase; letter-spacing: .1em; }
.sous-nom { display: block; font-size: .95rem; font-weight: bold; text-transform: none; letter-spacing: 0; color: var(--noir); }
.compo { margin: 0 0 10px; padding-left: 18px; font-size: .9rem; color: #5b4a44; }
.commande h3 { font-size: 1.1rem; text-transform: none; letter-spacing: 0; font-weight: bold; }
.chapo { text-align: center; color: var(--caramel); margin: 0 0 20px; }
.produit, .commande { background: var(--blanc); border-radius: 10px; padding: 16px; margin: 0 0 12px; box-shadow: 0 1px 3px rgba(51, 31, 33, .08); }
.produit { overflow: hidden; }
.photo { display: block; width: calc(100% + 32px); max-width: none; height: auto; margin: -16px -16px 14px; }
.desc { margin: 0 0 10px; font-size: .93rem; color: #5b4a44; }
.format { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--creme); }
.format .lib { flex: 1; }
.format .prix { color: var(--caramel); white-space: nowrap; }
input, textarea, button { font: inherit; }
input[type=number] { width: 4.6em; padding: 8px; text-align: center; border: 1px solid var(--sauge); border-radius: 8px; background: var(--creme); }
.total { text-align: right; font-size: 1.15rem; margin: 18px 0 0; }
.champs { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.champs label { display: block; font-size: .93rem; color: var(--brun); }
.champs .large { grid-column: 1 / -1; }
.champs input, .champs textarea { display: block; width: 100%; margin-top: 4px; padding: 10px; border: 1px solid var(--sauge); border-radius: 8px; background: var(--blanc); }
input:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 3px solid var(--caramel); outline-offset: 2px; }
button, .bouton { display: inline-block; background: var(--brun); color: var(--creme); border: 0; border-radius: 8px; padding: 14px 22px; cursor: pointer; text-decoration: none; font-size: 1.05rem; }
form > button[type=submit]:not(.petit) { width: 100%; margin-top: 8px; }
button:hover, .bouton:hover { background: var(--noir); }
.bouton.secondaire, button.petit { background: transparent; color: var(--brun); border: 1px solid var(--brun); padding: 8px 14px; font-size: .93rem; }
.info { background: #efe7df; border-left: 4px solid var(--sauge); padding: 12px 14px; border-radius: 6px; margin: 20px 0; }
.erreurs { background: #fbeaea; border-left: 4px solid #a33; padding: 10px 14px; border-radius: 6px; margin: 16px 0; color: #7a1f1f; }
.erreurs p { margin: 4px 0; }
.mention { font-size: .82rem; color: #6b5a54; margin-top: 14px; }
.piege { position: absolute; left: -9999px; }
.bas { text-align: center; font-size: .85rem; color: var(--noir); background: #C9B8AA; padding: 20px 16px 26px; }
/* Tableau des commandes */
.outils { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.defile { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: var(--blanc); border-radius: 10px; overflow: hidden; }
th, td { padding: 9px 10px; text-align: left; border-bottom: 1px solid var(--creme); font-size: .95rem; }
thead th { background: var(--brun); color: var(--creme); font-weight: normal; }
tr.cat th { background: #efe7df; color: var(--brun); }
td.n, thead th:nth-child(n+3) { text-align: center; }
.etat { float: right; font-size: .8rem; font-weight: normal; padding: 3px 10px; border-radius: 20px; background: #f3e6c8; color: #6b4c12; }
.statut-validee .etat { background: #dfe9d8; color: #2f5524; }
.statut-annulee { opacity: .6; }
.statut-terminee { background: #f1eeea; }
.statut-terminee .etat { background: #dcd6ee; color: #3b2f6b; }
button.petit.fort { background: var(--brun); color: var(--creme); }
button.petit.danger { margin-left: auto; background: #A3261F; color: #fff; border-color: #A3261F; font-weight: bold; }
button.petit.danger:hover { background: #7A1B16; }
.statut-annulee:has(button.danger) { opacity: 1; }
.statut-annulee:has(button.danger) > :not(form) { opacity: .6; }
.bouton.fort { font-size: 1.15rem; padding: 16px 28px; }
.produit.compact { padding: 12px 16px; margin-bottom: 8px; }
.produit.compact h3 { font-size: 1.05rem; margin: 0; }
.produit.compact .sous-nom { display: inline; font-size: .9rem; font-weight: normal; }
select { font: inherit; display: block; width: 100%; margin-top: 4px; padding: 10px; border: 1px solid var(--sauge); border-radius: 8px; background: var(--blanc); }
.choix input[type=checkbox] { flex: none; }
button.secondaire-plein { width: 100%; margin-top: 10px; background: transparent; color: var(--brun); border: 1px solid var(--brun); }
button.secondaire-plein:hover { background: var(--creme); }
.statut-annulee .etat { background: #eee; color: #555; }
.commande ul { margin: 6px 0; padding-left: 20px; }
.remarque { font-style: italic; }
/* Coffret retirable avant Noël : bandeau « Nouveau » en haut de la carte, disponibilité et calendrier de retrait */
.nouveaute { background: var(--blanc); border: 2px solid var(--caramel); border-radius: 12px; padding: 16px 18px 18px; margin: 0 0 24px; text-align: center; box-shadow: 0 2px 8px rgba(51, 31, 33, .08); }
.nouveaute p { margin: 0 0 10px; }
.nouveaute .etiquette { display: inline-block; background: var(--brun); color: var(--creme); border-radius: 20px; padding: 3px 14px; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; }
.nouveaute .accroche { font-size: 1.3rem; color: var(--brun); }
.nouveaute .bouton { margin-top: 4px; }
#coffret { scroll-margin-top: 16px; }
.dispo { background: #efe7df; border-radius: 6px; padding: 10px 12px; margin: 0 0 10px; font-size: .93rem; color: var(--brun); }
.dispo small { color: #6b5a54; font-size: .85rem; }
.cal { background: var(--blanc); border-radius: 10px; padding: 12px; box-shadow: 0 1px 3px rgba(51, 31, 33, .08); margin: 0 0 18px; }
.cal-titre { text-align: center; color: var(--brun); margin: 0 0 8px; font-size: 1.05rem; }
.cal-grille { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-grille .entete { text-align: center; font-size: .72rem; color: #6b5a54; }
.cal-grille .vide, .cal-grille .ferme { display: flex; align-items: center; justify-content: center; height: 44px; border-radius: 8px; font-size: .95rem; }
.cal-grille .ferme { background: #f2eee9; color: #a79a8e; text-decoration: line-through; }
.cal-grille label.ouvert { position: relative; display: flex; align-items: center; justify-content: center; height: 44px; border-radius: 8px;
  background: #efe7df; border: 1px solid var(--caramel); color: var(--brun); cursor: pointer; font-size: .95rem; }
.cal-grille label.ouvert input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cal-grille label.ouvert:has(input:checked) { background: var(--brun); color: var(--creme); }
.cal-grille label.ouvert:has(input:focus-visible) { outline: 3px solid var(--caramel); outline-offset: 2px; }
.cal-legende { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .78rem; color: #6b5a54; margin-top: 8px; }
.jours-reglage { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.jour-reglage { background: var(--blanc); border: 1px solid var(--sauge); border-radius: 8px; padding: 8px 10px; font-size: .9rem; }
.jour-reglage.est-ouvert { background: #eef3ea; border-color: #7e9a6e; }
.jour-reglage .nom { display: block; color: var(--brun); margin-bottom: 4px; }
.jour-reglage label { display: flex; align-items: center; gap: 6px; }
.jour-reglage select { display: inline-block; width: auto; margin: 0; padding: 4px; }
.heures { display: flex; gap: 6px; align-items: center; margin-top: 6px; flex-wrap: wrap; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
/* Espace Patron */
.chiffres { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 16px 0; }
@media (min-width: 760px) { .chiffres { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.chiffre { background: var(--blanc); border-radius: 10px; padding: 16px; box-shadow: 0 1px 3px rgba(51,31,33,.08); display: flex; flex-direction: column; gap: 4px; border-top: 4px solid var(--brun); }
.chiffre .grand { font-size: clamp(1.25rem, 5vw, 1.7rem); font-weight: bold; color: var(--brun); }
.chiffre.vert { border-top-color: #2E7D4F; } .chiffre.vert .grand { color: #2E7D4F; }
.chiffre.rouge { border-top-color: #A3261F; } .chiffre.rouge .grand { color: #A3261F; }
.chiffre small, .aide { color: #6B5A54; font-size: .88rem; }
th.n { text-align: center; }
tr.total td { font-weight: bold; border-top: 2px solid var(--sauge); }
.par-jour td:nth-child(2) { width: 55%; white-space: nowrap; }
.barre { display: inline-block; height: 14px; min-width: 3px; background: var(--caramel); border-radius: 3px; vertical-align: middle; max-width: calc(100% - 40px); }
@media (max-width: 520px) { .champs { grid-template-columns: 1fr; } h1 { font-size: 1.6rem; } }

/* Impression du tableau des commandes */
.date-impression, .retrait { display: none; }
.creneau { margin: 6px 0; }
.choix { border: 0; padding: 0; margin: 0 0 14px; }
.choix legend { font-weight: bold; color: var(--brun); padding: 0; margin-bottom: 6px; }
.choix label { display: flex; align-items: center; gap: 10px; background: var(--blanc); border: 1px solid var(--sauge); border-radius: 8px; padding: 12px 14px; margin-bottom: 8px; cursor: pointer; }
.choix input { width: 20px; height: 20px; accent-color: var(--brun); }
@media print {
  @page { margin: 14mm; }
  body { background: #fff; font-size: 12pt; }
  .haut { padding: 0; } .haut img { width: 150px; }
  main { max-width: none; padding: 0; }
  .outils, .actions, .bas, .info { display: none !important; }
  .date-impression { display: block; text-align: center; font-size: 10pt; color: #555; margin: 0 0 8px; }
  h1 { font-size: 18pt; margin: 4px 0; } h2 { margin: 12px 0 8px; }
  body[data-impression="production"] #bloc-commandes, body[data-impression="production"] #bloc-retraits,
  body[data-impression="retraits"] #bloc-commandes, body[data-impression="retraits"] #bloc-production,
  body[data-impression="commandes"] #bloc-production, body[data-impression="commandes"] #bloc-retraits,
  body[data-impression] #bloc-terminees, #bloc-paiement { display: none; }
  table, .commande { box-shadow: none; border: 1px solid #999; border-radius: 0; }
  th, td { border-bottom: 1px solid #bbb; padding: 7px 9px; font-size: 12pt; }
  thead th { background: #fff; color: #000; font-weight: bold; border-bottom: 2px solid #000; }
  tr.cat th { background: #eee; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .commande { break-inside: avoid; padding: 10px 12px; margin-bottom: 8px; }
  .commande.statut-annulee { display: none; }
  .commande a { color: inherit; text-decoration: none; }
  .etat { border: 1px solid #000; background: none !important; color: #000 !important; }
  .retrait { display: block; margin: 8px 0 0; }
}
