/* APS — admin/manifests/manifests.css — 2026-07-30
   Palette alignée sur les autres écrans Administration. */

:root {
  --adm-bg:      #0f1011;
  --adm-surface: #151718;
  --adm-surface2:#1a1d1f;
  --adm-border:  #262a2e;
  --adm-text:    #eef0f1;
  --adm-dim:     #a6b0b8;
  --adm-accent:  #d6d233;
  --adm-danger:  #e74c3c;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--adm-bg);
  color: var(--adm-text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

.aps-header .breadcrumb { color: var(--adm-dim); font-size: 12.5px; }
.aps-header .breadcrumb a { color: var(--adm-dim); text-decoration: none; }
.aps-header .breadcrumb a:hover { color: var(--adm-text); }

.mf-main { max-width: 1440px; margin: 0 auto; padding: 24px 20px 60px; }
.mf-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.mf-title { font-size: 20px; font-weight: 600; margin: 0; }
.mf-intro { color: var(--adm-dim); font-size: 13px; margin: 0 0 20px; max-width: 720px; }
.mf-intro strong { color: var(--adm-text); font-weight: 600; }

/* Boutons */
.mf-btn {
  background: var(--adm-surface2); color: var(--adm-text);
  border: 1px solid var(--adm-border); border-radius: 7px;
  padding: 7px 14px; font-size: 13px; cursor: pointer;
}
.mf-btn:hover { border-color: #3a4147; }
.mf-btn-accent { background: rgba(214,210,51,.14); border-color: rgba(214,210,51,.4); color: var(--adm-accent); }
.mf-btn-danger { background: rgba(231,76,60,.10); border-color: rgba(231,76,60,.35); color: #e88; }

/* Layout : liste + éditeur */
.mf-layout { display: grid; grid-template-columns: 260px 1fr; gap: 18px; }
.mf-liste {
  background: var(--adm-surface); border: 1px solid var(--adm-border);
  border-radius: 10px; padding: 8px; align-self: start;
  /* Reste visible pendant qu'on défile un éditeur long (beaucoup d'essences)
     — sinon il faut remonter en haut de page pour choisir un autre manifeste. */
  position: sticky; top: 24px;
}
.mf-liste-item {
  display: block; width: 100%; text-align: left;
  background: transparent; border: none; border-radius: 7px;
  padding: 10px 12px; cursor: pointer; color: var(--adm-text);
}
.mf-liste-item:hover { background: var(--adm-surface2); }
.mf-liste-item-actif { background: var(--adm-surface2); box-shadow: inset 2px 0 0 var(--adm-accent); }
.mf-liste-nom { font-size: 13.5px; font-weight: 500; }
.mf-liste-meta { font-size: 11px; color: var(--adm-dim); margin-top: 2px; }
.mf-liste-vide { padding: 16px; text-align: center; color: var(--adm-dim); font-size: 13px; }

/* Éditeur */
.mf-editeur, .mf-vide {
  background: var(--adm-surface); border: 1px solid var(--adm-border);
  border-radius: 10px; padding: 20px;
}
.mf-vide { color: var(--adm-dim); font-size: 13.5px; display: flex; align-items: center; justify-content: center; min-height: 200px; }

.mf-champ-ligne { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.mf-label { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--adm-dim); }
.mf-input {
  background: #101213; color: var(--adm-text);
  border: 1px solid var(--adm-border); border-radius: 7px;
  padding: 8px 10px; font-size: 13.5px; font: inherit;
}
.mf-input:focus { outline: none; border-color: var(--adm-accent); }
select.mf-input { cursor: pointer; }

.mf-essences-tete { display: flex; align-items: center; justify-content: space-between; margin: 18px 0 8px; }
.mf-sous-titre { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--adm-dim); margin: 0; }

/* Bloc d'essence : ligne principale + ligne de vérification secondaire */
.mf-essence-bloc { margin-bottom: 8px; }

/* Ligne d'essence */
.mf-essence {
  display: grid;
  grid-template-columns: 110px 1fr 130px 60px 1fr 140px 28px;
  gap: 8px; align-items: center;
}
.mf-essence input, .mf-essence select {
  background: #101213; color: var(--adm-text);
  border: 1px solid var(--adm-border); border-radius: 6px;
  padding: 6px 8px; font-size: 12.5px; font: inherit; width: 100%;
}
.mf-essence input:focus, .mf-essence select:focus { outline: none; border-color: var(--adm-accent); }

/* Colonnes épinglées explicitement — sans ça, cacher `N` (au_plus_n
   seulement, `display:none`) décale tous les champs suivants d'une colonne
   en placement implicite (sortie hérite de la case étroite de N, niveaux de
   la case large de sortie). */
.mf-essence-role    { grid-column: 1; }
.mf-essence-reco    { grid-column: 2; }
.mf-essence-card    { grid-column: 3; }
.mf-essence-n       { grid-column: 4; }
.mf-essence-sortie  { grid-column: 5; }
.mf-essence-niveaux { grid-column: 6; }
.mf-essence-suppr   { grid-column: 7; }
.mf-essence-n[hidden] { display: none; }

/* Ligne de vérification (secondaire, sous chaque essence) — pour Verify */
.mf-essence-verify {
  display: grid;
  grid-template-columns: 110px 1fr 1fr;
  gap: 8px; align-items: center; margin-top: 4px;
}
.mf-essence-verify-label {
  font-size: 10.5px; color: var(--adm-dim); text-transform: uppercase; letter-spacing: .03em;
}
.mf-essence-verify input {
  background: #101213; color: var(--adm-text);
  border: 1px solid var(--adm-border); border-radius: 6px;
  padding: 5px 8px; font-size: 12px; font: inherit; width: 100%;
}
.mf-essence-verify input:focus { outline: none; border-color: var(--adm-accent); }

/* Niveaux d'applicabilité — chips à cocher (Sé/Sa/Ép/Un) */
.mf-essence-niveaux { display: flex; gap: 4px; }
.mf-niveau-chip {
  display: flex; align-items: center; gap: 3px;
  background: #101213; border: 1px solid var(--adm-border); border-radius: 6px;
  padding: 4px 6px; font-size: 11px; color: var(--adm-dim); cursor: pointer;
}
.mf-niveau-chip input { width: auto; padding: 0; margin: 0; cursor: pointer; }
.mf-niveau-chip:has(input:checked) { color: var(--adm-text); border-color: rgba(214,210,51,.4); }
.mf-essence-suppr {
  background: transparent; border: none; color: var(--adm-dim);
  font-size: 18px; cursor: pointer; line-height: 1; padding: 0;
}
.mf-essence-suppr:hover { color: var(--adm-danger); }

/* Résumé narratif */
.mf-resume {
  margin: 16px 0; padding: 12px 14px;
  background: var(--adm-surface2); border-left: 2px solid var(--adm-accent);
  border-radius: 6px; font-size: 13.5px; color: var(--adm-text); min-height: 20px;
}
.mf-resume:empty { display: none; }

.mf-actions { display: flex; align-items: center; gap: 10px; margin-top: 18px; }
.mf-feedback { font-size: 12.5px; color: #79d093; }
.mf-feedback-erreur { color: #e88; }
