﻿/* GED-PRO A06-FINAL-UI-01 — finition présentation + sécurité d'usage */

/* Les contrôles désactivés doivent être immédiatement compris comme non cliquables. */
body[data-page="documents"] button:disabled,
body[data-page="archives"] button:disabled,
body[data-page="documents"] select:disabled,
body[data-page="archives"] select:disabled,
body[data-page="documents"] input:disabled,
body[data-page="archives"] input:disabled,
body[data-page="documents"] textarea:disabled,
body[data-page="archives"] textarea:disabled {
  cursor: not-allowed !important;
  opacity: .58;
  box-shadow: none !important;
}

body[data-page="archives"] [data-dossier-create-button]:disabled,
body[data-page="archives"] [data-box-create-button]:disabled,
body[data-page="archives"] [data-box-commit-button]:disabled,
body[data-page="archives"] [data-location-commit-button]:disabled {
  background: #edf5ef;
  border-color: #b8d8c1;
  color: #286640;
  opacity: 1;
}

/* Documents : garantir que Fiche / Contenu ne soient plus rognés à droite. */
body[data-page="documents"] .document-table th:last-child,
body[data-page="documents"] .document-table td:last-child {
  min-width: 150px;
  width: 150px;
  white-space: nowrap;
}
body[data-page="documents"] .doc-row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: nowrap;
}

/* Fiche documentaire : rattachement physique structuré et lisible. */
.a06-archive-link-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #d9e3f1;
  border-radius: 14px;
  background: #fbfdff;
}
.a06-archive-link-card + .a06-archive-link-card { margin-top: 10px; }
.a06-archive-link-card > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.a06-archive-link-card > header > div { display: grid; gap: 3px; min-width: 0; }
.a06-archive-link-card > header span:first-child {
  color: #62728a;
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.a06-archive-link-card > header strong { overflow-wrap: anywhere; }
.a06-archive-link-badge {
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 999px;
  background: #eaf7ef;
  color: #147447;
  font-size: .72rem;
  font-weight: 900;
}
.a06-archive-path {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.a06-archive-path span {
  position: relative;
  padding: 6px 9px;
  border: 1px solid #dbe5f2;
  border-radius: 9px;
  background: #fff;
  color: #364a68;
  font-size: .74rem;
  font-weight: 700;
}
.a06-archive-path-empty { color: #74839a; font-size: .78rem; }
.a06-archive-link-card > footer {
  display: flex;
  justify-content: flex-end;
}

/* Archives : l'étape active reste le centre visuel, les détails secondaires sont plus discrets. */
body.a06-archive-ui.a06-transfer-engaged .archive-transfer-preparation-card {
  border-color: #dce5f1;
  background: #fbfdff;
}
body.a06-archive-ui .archive-transfer-flow-step.is-complete {
  opacity: .9;
}
body.a06-archive-ui .archive-transfer-flow-step.is-active {
  box-shadow: 0 0 0 2px rgba(31, 101, 216, .08);
}
body.a06-archive-ui .archive-dossier-result button:disabled,
body.a06-archive-ui .archive-box-result button:disabled,
body.a06-archive-ui .archive-location-result button:disabled {
  background: #edf5ef;
  border-color: #bedac7;
  color: #286640;
  opacity: 1;
}

/* Les informations d'habilitation sont explicatives, mais ne dominent pas le parcours. */
body.a06-archive-ui .archive-transfer-permission-grid .permission-chip strong {
  line-height: 1.2;
}

@media (max-width: 780px) {
  .a06-archive-link-card > header { flex-direction: column; }
  .a06-archive-link-card > footer { justify-content: stretch; }
  .a06-archive-link-card > footer .btn-soft { width: 100%; text-align: center; }
}
