:root {
  --seed-green: #1f5a3c;
  --seed-sage: #dcebdd;
  --seed-beige: #f4efe5;
  --seed-border: #d9ded7;
  --seed-muted: #667066;
  --seed-danger: #a43b32;
}

.seed-network {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--seed-border);
}

.seed-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.seed-heading h3,
.seed-loading h3 {
  margin: 0 0 5px;
  color: var(--seed-green);
  font-size: 20px;
}

.seed-heading p,
.seed-loading p {
  margin: 0;
  color: var(--seed-muted);
  font-size: 14px;
  line-height: 1.45;
}

.seed-source-status {
  flex: 0 0 auto;
  border: 1px solid var(--seed-border);
  border-radius: 7px;
  padding: 4px 7px;
  color: var(--seed-muted);
  font-size: 11px;
}

.seed-list {
  overflow: hidden;
  border: 1px solid var(--seed-border);
  border-radius: 12px;
  background: #fff;
}

.seed-row {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) 1.5fr auto;
  align-items: center;
  gap: 14px;
  padding: 14px;
}

.seed-row + .seed-row {
  border-top: 1px solid var(--seed-border);
}

.seed-variety {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.seed-variety strong {
  font-size: 15px;
  color: #1d271f;
}

.seed-variety span {
  font-size: 12px;
}

.is-available { color: var(--seed-green); }
.is-unavailable { color: var(--seed-muted); }

.seed-facts {
  display: grid;
  grid-template-columns: 1.15fr 1.35fr .6fr;
  gap: 10px;
  margin: 0;
}

.seed-facts div {
  min-width: 0;
}

.seed-facts dt {
  color: var(--seed-muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.seed-facts dd {
  margin: 3px 0 0;
  font-size: 12px;
  font-weight: 650;
}

.seed-actions {
  display: flex;
  gap: 7px;
}

.seed-details,
.seed-request,
.request-cancel,
.request-submit {
  border-radius: 9px;
  padding: 9px 11px;
  font: inherit;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}

.seed-details,
.request-cancel {
  border: 1px solid var(--seed-green);
  background: #fff;
  color: var(--seed-green);
}

.seed-request,
.request-submit {
  border: 1px solid var(--seed-green);
  background: var(--seed-green);
  color: #fff;
}

.seed-request:disabled,
.request-submit:disabled {
  border-color: var(--seed-border);
  background: #eef0ed;
  color: var(--seed-muted);
  cursor: not-allowed;
}

.seed-disclaimer {
  margin: 10px 0 0;
  color: var(--seed-muted);
  font-size: 11px;
}

.partner-fallback {
  background: transparent !important;
  color: var(--seed-green) !important;
  border: 1px solid var(--seed-green);
}

.seed-empty {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 18px;
  color: var(--seed-muted);
  font-size: 13px;
}

.lineage-panel {
  position: fixed;
  z-index: 130;
  top: 0;
  right: 0;
  width: min(430px, 92vw);
  height: 100vh;
  overflow-y: auto;
  box-sizing: border-box;
  padding: 28px;
  border-left: 1px solid var(--seed-border);
  background: #fff;
  box-shadow: -16px 0 40px rgba(27, 50, 34, .16);
  transform: translateX(100%);
  transition: transform 180ms ease;
}

.lineage-panel.open { transform: translateX(0); }

.lineage-close,
.request-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: #f1f4f0;
  color: #223126;
  font-size: 21px;
  cursor: pointer;
}

.lineage-kicker,
.request-context {
  margin: 0 0 5px;
  color: var(--seed-muted);
  font-size: 12px;
}

.lineage-panel > h3 {
  margin: 0;
  color: #18231b;
  font-size: 26px;
}

.lineage-section {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--seed-border);
}

.lineage-section h4 {
  margin: 0 0 10px;
  color: var(--seed-green);
}

.lineage-section p,
.lineage-section li,
.lineage-section a {
  font-size: 13px;
  line-height: 1.5;
}

.lineage-tree {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lineage-tree li {
  margin-left: calc(var(--generation) * 24px);
  border-left: 3px solid var(--seed-sage);
  padding: 8px 10px;
  background: #f7faf7;
}

.seed-request-overlay {
  position: fixed;
  z-index: 150;
  inset: 0;
  display: grid;
  place-items: center;
  overflow-y: auto;
  padding: 20px;
  background: rgba(20, 30, 18, .58);
}

.seed-request-form {
  position: relative;
  width: min(520px, 100%);
  box-sizing: border-box;
  padding: 28px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(20, 35, 24, .25);
}

.seed-request-form h2 {
  margin: 0;
  color: #18231b;
  font-size: 26px;
}

.request-variety {
  margin: 4px 0 22px;
  color: var(--seed-green);
  font-weight: 750;
}

.seed-request-form > label:not(.protocol-check) {
  display: block;
  margin: 16px 0 7px;
  font-size: 13px;
  font-weight: 750;
}

.seed-request-form textarea,
.seed-request-form select {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #bfc7be;
  border-radius: 9px;
  background: #fff;
  padding: 11px 12px;
  color: #1d271f;
  font: inherit;
  font-size: 14px;
}

.seed-request-form textarea:focus,
.seed-request-form select:focus {
  outline: 3px solid rgba(31, 90, 60, .16);
  border-color: var(--seed-green);
}

.field-meta {
  display: block;
  margin-top: 4px;
  color: var(--seed-muted);
  font-size: 11px;
  text-align: right;
}

.field-error {
  min-height: 15px;
  margin: 4px 0 0;
  color: var(--seed-danger);
  font-size: 12px;
}

.protocol-check {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 14px;
  font-size: 13px;
}

.protocol-check input {
  margin-top: 2px;
  accent-color: var(--seed-green);
}

.protocol-check a,
.lineage-section a {
  color: var(--seed-green);
}

.request-notice {
  min-height: 20px;
  margin-top: 10px;
  color: var(--seed-green);
  font-size: 13px;
  line-height: 1.4;
}

.request-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

@media (max-width: 760px) {
  .seed-heading { flex-direction: column; }
  .seed-row { grid-template-columns: 1fr; }
  .seed-facts { grid-template-columns: repeat(3, 1fr); }
  .seed-actions { justify-content: stretch; }
  .seed-actions button { flex: 1; }
  .seed-request-form { padding: 24px 18px; }
}

@media (max-width: 440px) {
  .seed-facts { grid-template-columns: 1fr 1fr; }
  .seed-actions { flex-direction: column; }
  .request-actions { flex-direction: column-reverse; }
  .request-actions button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .lineage-panel { transition: none; }
}

/* ---------- Prévision porte-graines (pont suivi de culture ↔ réseau) ---------- */
.seed-timing {
  display: flex; flex-direction: column; gap: 4px;
  margin: 0 0 14px; padding: 12px 14px;
  border: 1px solid #cfe3d4; border-left: 3px solid #2f7d47;
  border-radius: 10px; background: #f4faf5;
  font-size: 14px; line-height: 1.45;
}
.seed-timing strong { font-size: 15px; }
.seed-timing-note { font-size: 12px; color: #5f6b58; }
.seed-timing-vide {
  margin: 0 0 14px; padding: 10px 14px;
  border: 1px dashed #cfd8ce; border-radius: 10px;
  font-size: 13px; color: #5f6b58; background: #fbfcfa;
}
