﻿/* =====================================================================
   GED-PRO 1.0 — A01-R2
   HARMONISATION VISUELLE & LISIBILITE CLIENT
   ---------------------------------------------------------------------
   Cette couche complète A01-R1 sans modifier la logique métier.
   ===================================================================== */

/* ============================================================
   1. CONNEXION — meilleure tenue sur 1366 x 768
   ============================================================ */
@media (min-width: 901px) and (max-height: 820px) {
  .login-panel {
    padding: 24px 34px;
  }

  .login-card {
    width: min(100%, 468px);
    padding: 26px 30px;
    border-radius: 24px;
  }

  .login-card .brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 12px;
  }

  .login-title {
    margin: 22px 0 7px;
    font-size: clamp(27px, 3vw, 32px);
  }

  .login-subtitle {
    margin-bottom: 18px;
    line-height: 1.5;
  }

  .form-grid {
    gap: 12px;
  }

  .field {
    gap: 6px;
  }

  .field input {
    height: 44px;
  }

  .server-chip {
    margin-top: 13px;
  }

  .login-showcase {
    padding: 38px 52px;
  }

  .showcase-title {
    margin: 16px 0 12px;
    font-size: clamp(36px, 4.35vw, 58px);
    line-height: 1.02;
  }

  .showcase-copy {
    font-size: 15px;
    line-height: 1.55;
  }

  .showcase-grid {
    margin-top: 20px;
    gap: 10px;
  }

  .showcase-item {
    min-height: 88px;
    padding: 14px 16px;
    border-radius: 15px;
  }

  .showcase-item strong {
    margin-bottom: 5px;
  }
}

/* ============================================================
   2. DOCUMENTS — tenir dans la largeur utile
   ============================================================ */
body[data-page="documents"] .document-table-wrap {
  overflow-x: hidden;
}

body[data-page="documents"] .document-table {
  width: 100%;
  min-width: 0 !important;
  table-layout: fixed;
}

body[data-page="documents"] .document-table th,
body[data-page="documents"] .document-table td {
  overflow: hidden;
}

body[data-page="documents"] .document-table th:nth-child(1),
body[data-page="documents"] .document-table td:nth-child(1) { width: 34%; }

body[data-page="documents"] .document-table th:nth-child(2),
body[data-page="documents"] .document-table td:nth-child(2) { width: 14%; }

body[data-page="documents"] .document-table th:nth-child(3),
body[data-page="documents"] .document-table td:nth-child(3) { width: 12%; }

body[data-page="documents"] .document-table th:nth-child(4),
body[data-page="documents"] .document-table td:nth-child(4) { width: 13%; }

body[data-page="documents"] .document-table th:nth-child(5),
body[data-page="documents"] .document-table td:nth-child(5) { width: 11%; }

body[data-page="documents"] .document-table th:nth-child(6),
body[data-page="documents"] .document-table td:nth-child(6) { width: 11%; }

body[data-page="documents"] .document-table th:nth-child(7),
body[data-page="documents"] .document-table td:nth-child(7) { width: 82px; }

body[data-page="documents"] .doc-row-action {
  white-space: nowrap;
}

body[data-page="documents"] .document-kpis article:last-child strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ============================================================
   3. CENTRE COURRIERS — filtres sans débordement à 1366 px
   ============================================================ */
.ops-filters {
  grid-template-columns:
    minmax(235px, 1.7fr)
    repeat(4, minmax(96px, .72fr))
    minmax(86px, .58fr)
    minmax(84px, .55fr);
}

.ops-filter-actions {
  grid-column: span 2;
  justify-content: flex-end;
}

.ops-table {
  min-width: 960px;
}

.ops-table th,
.ops-table td {
  padding-left: 8px;
  padding-right: 8px;
}

@media (max-width: 1180px) {
  .ops-filters {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .ops-search {
    grid-column: span 2;
  }

  .ops-filter-actions {
    grid-column: span 2;
  }
}

/* ============================================================
   4. CIRCULATION — filtres sur deux lignes plutôt que coupés
   ============================================================ */
body[data-page="circulation"] .circ-filters {
  grid-template-columns:
    minmax(235px, 1.7fr)
    repeat(5, minmax(95px, .72fr));
}

body[data-page="circulation"] .circ-filter-actions {
  grid-column: span 2;
  justify-content: flex-end;
}

body[data-page="circulation"] .circ-table-wrap {
  overflow-x: auto;
}

@media (max-width: 1180px) {
  body[data-page="circulation"] .circ-filters {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  body[data-page="circulation"] .circ-search {
    grid-column: span 2;
  }

  body[data-page="circulation"] .circ-filter-actions {
    grid-column: span 2;
  }
}

/* ============================================================
   5. ARCHIVES — réduire la hauteur avant la zone de travail
   ============================================================ */
body[data-page="archives"] .archive-transfer-page > .page-hero {
  padding: 18px 20px;
  border-radius: 15px;
}

body[data-page="archives"] .archive-transfer-page > .page-hero h1 {
  margin-top: 4px;
  font-size: clamp(24px, 2.6vw, 32px);
}

body[data-page="archives"] .archive-transfer-page > .page-hero p {
  max-width: 900px;
  line-height: 1.5;
}

body[data-page="archives"] .archive-ops {
  gap: 12px;
  margin-top: 12px;
  margin-bottom: 18px;
}

body[data-page="archives"] .archive-ops-head {
  padding: 14px 18px;
  border-radius: 14px;
}

body[data-page="archives"] .archive-ops-head h2 {
  margin: 2px 0 4px;
  font-size: 20px;
}

body[data-page="archives"] .archive-ops-head p {
  line-height: 1.45;
}

body[data-page="archives"] .archive-ops-card {
  padding: 15px;
  border-radius: 14px;
}

body[data-page="archives"] .archive-transfer-section-title {
  margin-top: 20px;
}

/* ============================================================
   6. MODELES — légère homogénéisation avec le shell
   ============================================================ */
.gmod-hero {
  padding: 20px 22px;
  border-radius: 17px;
}

.gmod-hero h1 {
  font-size: clamp(1.75rem, 2.25vw, 2.25rem);
}

.gmod-stats article,
.gmod-catalog,
.gmod-workbench {
  border-radius: 14px;
}

/* ============================================================
   7. PARAMETRAGE — corriger les textes devenus trop petits
   ============================================================ */
body[data-page="parametrage"] .p6a1-head p {
  font-size: 10.5px;
}

body[data-page="parametrage"] .p6a1-status {
  font-size: 8.5px;
}

body[data-page="parametrage"] .p6a1-org-main > span,
body[data-page="parametrage"] .p6a1-section > header span {
  font-size: 8px;
}

body[data-page="parametrage"] .p6a1-org-main p {
  font-size: 9px;
}

body[data-page="parametrage"] .p6a1-org-facts span {
  font-size: 7.5px;
}

body[data-page="parametrage"] .p6a1-org-facts strong {
  font-size: 8.5px;
}

body[data-page="parametrage"] .p6a1-section > header h2 {
  font-size: 12px;
}

body[data-page="parametrage"] .p6a1-section > header small,
body[data-page="parametrage"] .p6a1-perm-count {
  font-size: 8.5px;
}

body[data-page="parametrage"] .p6a1-kpi span {
  font-size: 7.8px;
}

body[data-page="parametrage"] .p6a1-kpi small {
  font-size: 7.3px;
}

body[data-page="parametrage"] .p6a1-domain h3 {
  font-size: 10px;
}

body[data-page="parametrage"] .p6a1-domain p {
  font-size: 8px;
}

body[data-page="parametrage"] .p6a1-domain-open,
body[data-page="parametrage"] .p6a1-domain-state strong {
  font-size: 7.5px;
}

/* ============================================================
   8. Petits écrans
   ============================================================ */
@media (max-width: 760px) {
  body[data-page="documents"] .document-table-wrap {
    display: none !important;
  }

  .ops-table-wrap {
    display: none;
  }

  body[data-page="archives"] .archive-transfer-page > .page-hero {
    padding: 15px;
  }
}
