:root { --vert: #2f7d4f; --gris: #e6e6e6; --rouge: #b3261e; }
  body { font-family: system-ui, sans-serif; margin: 0; background: #f7f7f5; color: #222; }
  .page { max-width: 1200px; margin: 0 auto; padding: 16px; }
  h1 { color: var(--vert); font-size: 1.5rem; }
  h2 { font-size: 1.1rem; margin-top: 28px; }
  .aide { color: #555; font-size: 0.9rem; }
  .coordonnees { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px 16px; }
  .champ label { display: block; font-size: 0.85rem; color: #444; margin-bottom: 2px; }
  .champ input, .champ select { width: 100%; box-sizing: border-box; }
  input, select, button { font: inherit; padding: 5px 6px; border: 1px solid #bbb; border-radius: 4px; background: white; }
  table.lignes { width: 100%; border-collapse: collapse; margin-top: 8px; }
  table.lignes th { text-align: left; font-size: 0.8rem; color: #444; padding: 4px; border-bottom: 2px solid var(--gris); }
  table.lignes td { padding: 3px 4px; border-bottom: 1px solid var(--gris); vertical-align: middle; }
  table.lignes td input, table.lignes td select { width: 100%; box-sizing: border-box; }
  table.lignes td input.nombre { width: 70px; }
  table.lignes tr.erreur td { background: #fdecea; }
  .indice { font-size: 0.8rem; color: #666; white-space: nowrap; }
  td.plants { text-align: right; font-variant-numeric: tabular-nums; width: 60px; }
  td.outils { white-space: nowrap; width: 70px; }
  td.outils button { padding: 2px 6px; margin-right: 2px; cursor: pointer; }
  .actions { display: flex; gap: 12px; align-items: center; margin: 14px 0; flex-wrap: wrap; }
  .total { color: #444; }
  button.principal { background: var(--vert); color: white; border-color: var(--vert); padding: 10px 18px; cursor: pointer; }
  button.secondaire { cursor: pointer; }
  .erreurs { background: #fdecea; border: 1px solid var(--rouge); border-radius: 4px; padding: 8px 12px; }
  .erreurs p { margin: 4px 0; color: var(--rouge); }
  @media (max-width: 800px) {
    table.lignes, table.lignes thead, table.lignes tbody, table.lignes tr, table.lignes td { display: block; }
    table.lignes thead { display: none; }
    table.lignes tr { margin-bottom: 12px; border: 1px solid var(--gris); padding: 6px; background: white; }
    table.lignes td { border: none; }
  }
.messages p { margin: 2px 0; font-size: 0.9rem; color: #444; }


.onglets { display: flex; gap: 6px; margin: 10px 0 18px; }
.onglets .onglet { cursor: pointer; background: white; }
.onglets .onglet.actif { background: var(--vert); color: white; border-color: var(--vert); }
.compteur { margin-left: 6px; font-size: 0.8rem; opacity: 0.8; }
.erreurs button { margin-left: 8px; }

.etiquettes { background: white; border: 1px solid var(--gris); }
.etiquette { display: flex; align-items: center; height: 16mm; box-sizing: border-box; padding: 0 10mm 0 20mm; border-bottom: 1px dashed #ddd; font-size: 18pt; gap: 12mm; }
.etiquette-client { font-weight: 700; font-size: 22pt; min-width: 30mm; }
.etiquette-produit { flex: 1; }
.etiquette-semaine { font-weight: 600; }
@media print {
  @page { size: A4 portrait; margin: 0; }
  body { background: white; }
  .page { max-width: none; padding: 0; margin: 0; }
  h1, .onglets, .actions, .aide { display: none !important; }
  .etiquettes { border: none; }
  .etiquette { border-bottom: none; page-break-inside: avoid; }
}

.calendrier-cadre { overflow-x: auto; background: white; border: 1px solid var(--gris); }
table.calendrier { border-collapse: collapse; font-size: 0.78rem; }
table.calendrier th, table.calendrier td { border: 1px solid #eee; padding: 2px 4px; text-align: center; min-width: 34px; white-space: nowrap; }
table.calendrier th { position: sticky; top: 0; background: #fafafa; cursor: pointer; }
table.calendrier td.cal-espece, table.calendrier th:first-child { text-align: left; position: sticky; left: 0; background: #fafafa; min-width: 120px; }
table.calendrier td.cal-semis { background: #dff3e4; }
table.calendrier td.cal-livraison { background: #f0f0f0; }
table.calendrier .cal-courante { outline: 2px solid var(--vert); }
table.calendrier .cal-s { display: block; font-weight: 700; color: #1f5f3a; }
table.calendrier .cal-l { display: block; color: #777; }
table.calendrier tr.cal-total td { font-weight: 600; background: #fafafa; }

.depot { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; background: white; border: 1px dashed #bbb; border-radius: 6px; padding: 10px 12px; }
.depot-libelle { font-size: 0.9rem; color: #444; }
details.messages, details.fichiers { margin: 10px 0; font-size: 0.9rem; color: #444; }
details.fichiers { margin-top: 28px; }
details > summary { cursor: pointer; }
details.section { background: white; border: 1px solid var(--gris); border-radius: 6px; padding: 8px 14px; margin: 12px 0; }
details.section > summary { font-weight: 600; font-size: 1.05rem; padding: 4px 0; }

table.lignes td.choix select, table.lignes td.choix input { width: auto; max-width: 260px; display: inline-block; }

.demarrage { background: #fff8e6; border: 1px solid #e8d8a8; border-radius: 6px; padding: 8px 14px; margin-bottom: 14px; }
.demarrage h2 { margin: 6px 0 8px; }
.demarrage p { margin: 6px 0; }
.demarrage p.fait { color: #777; }
.demarrage .coche { display: inline-block; width: 1.2em; font-weight: 700; color: var(--vert); }
table.lignes tr.modifiee td { background: #fff3cd; }

button.danger { background: var(--rouge); color: white; border-color: var(--rouge); cursor: pointer; }
label.bouton-fichier { display: inline-block; padding: 5px 8px; border: 1px solid #bbb; border-radius: 4px; background: white; cursor: pointer; }
label.bouton-fichier input { display: none; }

button:disabled { opacity: 0.45; cursor: not-allowed; }
.retour-envoi { background: #e8f4ec; border: 1px solid #b7dcc3; border-radius: 4px; padding: 6px 10px; }
