/* APS — admin/organisations/organisations.css — 2026-07-29
   Palette alignée sur les autres écrans Administration. Vue org au sommet. */

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

* { 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;
}

/* Breadcrumb sobre (cohérent avec les autres écrans) */
.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); }

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

/* Cartes organisation */
.org-list { display: flex; flex-direction: column; gap: 10px; }
.org-card {
  background: var(--adm-surface);
  border: 1px solid var(--adm-border);
  border-radius: 10px;
  overflow: hidden;
}
.org-card-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px; cursor: pointer;
}
.org-card-head:hover { background: var(--adm-surface2); }
.org-card-name { font-size: 15px; font-weight: 600; }
.org-card-meta { font-size: 12px; color: var(--adm-dim); margin-top: 2px; }
.org-chevron { color: var(--adm-dim); transition: transform .15s ease; }
.org-open .org-chevron { transform: rotate(180deg); }

/* Corps déplié */
.org-card-body { display: none; padding: 0 18px 16px; }
.org-open .org-card-body { display: block; }
.org-empty { color: var(--adm-dim); font-size: 13px; padding: 10px 0; }

/* Lignes plateforme */
.plat-row {
  border-top: 1px solid var(--adm-border);
  padding: 12px 0;
}
.plat-row-head { display: flex; align-items: center; gap: 10px; }
.plat-row-name { font-weight: 500; font-size: 14px; }
.plat-row-type {
  font-size: 11px; color: var(--adm-dim);
  border: 1px solid var(--adm-border); border-radius: 10px; padding: 1px 8px;
}
.plat-badge-active, .plat-badge-inactive {
  font-size: 11px; border-radius: 10px; padding: 1px 8px; margin-left: auto;
}
.plat-badge-active   { color: #79d093; border: 1px solid rgba(121,208,147,.35); }
.plat-badge-inactive { color: var(--adm-dim); border: 1px solid var(--adm-border); }

/* Chips environnement */
.plat-envs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.env-chip {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .03em;
  border-radius: 5px; padding: 2px 8px;
  border: 1px solid var(--adm-border); color: var(--adm-dim);
}
.env-prod { color: #79d093; border-color: rgba(121,208,147,.35); }
.env-qa   { color: #e0c04c; border-color: rgba(224,192,76,.35); }
.env-dev  { color: #6ea8ff; border-color: rgba(110,168,255,.35); }
.env-missing { color: #c98; border-color: rgba(204,153,136,.3); }

/* États */
.adm-loading, .adm-empty, .adm-error { padding: 24px; text-align: center; color: var(--adm-dim); font-size: 13.5px; }
.adm-error { color: #e08a8a; }

/* Titres de section dans le corps déplié (Plateformes / Connexions / Ressources) */
.org-section-titre {
  font-size: 11px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--adm-dim); margin: 16px 0 6px; padding-top: 12px;
  border-top: 1px solid var(--adm-border);
}
.org-card-body > .org-section-titre:first-child { border-top: none; padding-top: 4px; }

/* Lignes connexion */
.conn-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.conn-name { font-weight: 500; font-size: 13.5px; }
.conn-type { font-size: 11px; color: var(--adm-dim); }
.conn-badge-active, .conn-badge-inactive {
  font-size: 11px; border-radius: 10px; padding: 1px 8px; margin-left: auto;
}
.conn-badge-active   { color: #79d093; border: 1px solid rgba(121,208,147,.35); }
.conn-badge-inactive { color: var(--adm-dim); border: 1px solid var(--adm-border); }

/* Bloc ressources : familles avec compteur */
.res-bloc { display: flex; gap: 10px; flex-wrap: wrap; padding: 4px 0; }
.res-famille {
  display: flex; align-items: center; gap: 8px;
  background: var(--adm-surface2); border: 1px solid var(--adm-border);
  border-radius: 8px; padding: 8px 12px;
}
.res-famille-label { font-size: 13px; }
.res-famille-count {
  font-size: 12px; font-weight: 600; color: var(--adm-accent);
  background: rgba(214,210,51,.12); border-radius: 10px; padding: 1px 8px;
}
