﻿/* GED-WEB-2E1 — Centre de circulation documentaire */

.circulation-content {
  max-width: 1540px;
  margin: 0 auto;
}

.circ-head,
.circ-workspace {
  border: 1px solid #dfe6ef;
  border-radius: 14px;
  background: #fff;
}

.circ-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  margin-bottom: 12px;
}

.circ-head h1 {
  margin: 2px 0 4px;
  font-size: 22px;
}

.circ-head p {
  max-width: 820px;
  margin: 0;
  color: #6b778c;
  font-size: 12px;
  line-height: 1.5;
}

.circ-head-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.circ-head-actions .btn,
.circ-head-actions .btn-secondary {
  min-height: 34px;
  padding: 7px 11px;
  font-size: 11px;
}

.circ-kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.circ-kpis button,
.circ-kpis article {
  display: grid;
  gap: 2px;
  min-height: 82px;
  border: 1px solid #e0e7f0;
  border-radius: 11px;
  background: #fff;
  padding: 11px 12px;
  color: #263850;
  text-align: left;
}

.circ-kpis button {
  cursor: pointer;
}

.circ-kpis button:hover {
  border-color: #adc3e2;
  background: #fafcff;
}

.circ-kpis span {
  color: #66758c;
  font-size: 10px;
  font-weight: 800;
}

.circ-kpis strong {
  font-size: 21px;
  line-height: 1;
}

.circ-kpis small {
  color: #8a96a7;
  font-size: 9px;
}

.circ-workspace {
  overflow: hidden;
}

.circ-tabs {
  display: flex;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.circ-tabs button {
  display: grid;
  gap: 1px;
  min-width: 190px;
  border: 0;
  border-right: 1px solid #e3e9f1;
  border-bottom: 2px solid transparent;
  background: transparent;
  padding: 10px 14px 9px;
  color: #526078;
  text-align: left;
  cursor: pointer;
}

.circ-tabs button span {
  font-size: 12px;
  font-weight: 800;
}

.circ-tabs button small {
  color: #8792a3;
  font-size: 9px;
}

.circ-tabs button.is-active {
  border-bottom-color: #245fbd;
  background: #fff;
  color: #163d78;
}

.circ-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 46px;
  padding: 8px 12px;
  border-bottom: 1px solid #edf1f5;
}

.circ-current-view {
  display: grid;
  gap: 1px;
}

.circ-current-view strong {
  font-size: 12px;
}

.circ-current-view span {
  color: #7b8798;
  font-size: 9px;
}

.circ-filter-toggle {
  display: none;
  border: 1px solid #d1dbe8;
  border-radius: 8px;
  background: #fff;
  padding: 7px 10px;
  color: #33445c;
  font: inherit;
  font-size: 10px;
  font-weight: 800;
}

.circ-filters {
  display: grid;
  grid-template-columns:
    minmax(230px, 1.45fr)
    repeat(7, minmax(105px, .72fr))
    90px
    auto;
  gap: 8px;
  align-items: end;
  padding: 11px 12px;
  border-bottom: 1px solid #e6ebf2;
}

.circ-field {
  min-width: 0;
}

.circ-field > span {
  display: block;
  margin-bottom: 3px;
  color: #66758c;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .025em;
}

.circ-field input,
.circ-field select {
  width: 100%;
  height: 34px;
  border: 1px solid #d1dbe8;
  border-radius: 8px;
  background: #fff;
  padding: 6px 8px;
  color: #263850;
  font: inherit;
  font-size: 11px;
}

.circ-field input:focus,
.circ-field select:focus {
  border-color: #7ea4d8;
  outline: 2px solid rgba(36, 95, 189, .10);
}

.circ-filter-actions {
  display: flex;
  gap: 5px;
}

.circ-filter-actions .btn,
.circ-filter-actions .btn-secondary {
  height: 34px;
  padding: 6px 10px;
  font-size: 10px;
}

.circ-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 48px;
  padding: 8px 12px;
  border-bottom: 1px solid #edf1f5;
}

.circ-status > div {
  display: grid;
  gap: 2px;
}

.circ-status strong {
  font-size: 13px;
}

.circ-status span {
  color: #758298;
  font-size: 10px;
}

.circ-loading {
  height: 2px;
  overflow: hidden;
}

.circ-loading.is-visible::before {
  content: "";
  display: block;
  width: 35%;
  height: 100%;
  background: #2467c7;
  animation: circ-load 1s linear infinite alternate;
}

@keyframes circ-load {
  from { transform: translateX(0); }
  to { transform: translateX(190%); }
}

.circ-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  min-height: 430px;
}

.circ-results {
  min-width: 0;
  border-right: 1px solid #e7ecf2;
}

.circ-table-wrap {
  overflow-x: auto;
}

.circ-table {
  width: 100%;
  min-width: 1060px;
  border-collapse: collapse;
}

.circ-table th {
  padding: 8px 10px;
  border-bottom: 1px solid #dfe6ef;
  background: #fbfcfe;
  color: #647188;
  font-size: 9px;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: .035em;
}

.circ-table td {
  padding: 9px 10px;
  border-bottom: 1px solid #edf1f5;
  color: #34445b;
  font-size: 11px;
  vertical-align: middle;
}

.circ-table tbody tr {
  cursor: pointer;
}

.circ-table tbody tr:hover,
.circ-table tbody tr.is-selected {
  background: #f7faff;
}

.circ-table tbody tr.is-selected {
  box-shadow: inset 3px 0 0 #245fbd;
}

.circ-primary,
.circ-stack {
  display: grid;
  gap: 2px;
}

.circ-primary strong,
.circ-stack strong {
  color: #273a54;
  font-size: 11px;
}

.circ-primary span,
.circ-stack span,
.circ-table small {
  color: #7b8798;
  font-size: 9px;
}

.circ-substate {
  display: block;
  margin-top: 3px;
}

.circ-late {
  display: block;
  margin-top: 2px;
  color: #b63f3f !important;
  font-weight: 800;
}

.circ-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border: 1px solid #dbe3ec;
  border-radius: 999px;
  background: #f8fafc;
  padding: 3px 7px;
  color: #536177;
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.circ-badge.is-warning {
  border-color: #efd49d;
  background: #fff8e8;
  color: #8a5a00;
}

.circ-badge.is-info {
  border-color: #bdd4ee;
  background: #eef6ff;
  color: #275f99;
}

.circ-badge.is-success {
  border-color: #b9dfc8;
  background: #effaf3;
  color: #277049;
}

.circ-badge.is-danger {
  border-color: #efc1c1;
  background: #fff0f0;
  color: #a23333;
}

.circ-row-open {
  border: 0;
  background: transparent;
  color: #245fbd;
  font: inherit;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.circ-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 52px;
  padding: 8px 12px;
  border-top: 1px solid #edf1f5;
}

.circ-pagination span {
  color: #657289;
  font-size: 10px;
}

.circ-detail {
  min-width: 0;
  background: #fbfcfe;
}

.circ-detail-empty {
  display: grid;
  gap: 5px;
  align-content: center;
  min-height: 430px;
  padding: 28px;
  color: #7c8899;
  text-align: center;
}

.circ-detail-empty strong {
  color: #40516a;
  font-size: 13px;
}

.circ-detail-empty span {
  font-size: 10px;
  line-height: 1.5;
}

.circ-detail-content {
  padding: 15px;
}

.circ-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e5eaf1;
}

.circ-detail-head h2 {
  margin: 2px 0 2px;
  color: #263850;
  font-size: 16px;
  line-height: 1.25;
}

.circ-detail-head p {
  margin: 0;
  color: #7a8799;
  font-size: 10px;
}

.circ-detail-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin: 12px 0;
  overflow: hidden;
  border: 1px solid #e2e8ef;
  border-radius: 10px;
  background: #e2e8ef;
}

.circ-detail-fields > div {
  display: grid;
  gap: 2px;
  min-width: 0;
  background: #fff;
  padding: 9px;
}

.circ-detail-fields span,
.circ-detail-text span {
  color: #7d899a;
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .03em;
}

.circ-detail-fields strong {
  overflow-wrap: anywhere;
  color: #34445a;
  font-size: 10px;
}

.circ-detail-fields strong.is-emphasis {
  color: #a23333;
}

.circ-detail-text {
  display: grid;
  gap: 8px;
}

.circ-detail-text > div {
  border: 1px solid #e4eaf1;
  border-radius: 10px;
  background: #fff;
  padding: 10px;
}

.circ-detail-text p {
  min-height: 20px;
  margin: 4px 0 0;
  color: #4b5a6f;
  font-size: 10px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.circ-detail-actions {
  display: flex;
  margin-top: 12px;
}

.circ-detail-actions .btn {
  width: 100%;
  justify-content: center;
}

.circ-mobile-list {
  display: none;
}

.circ-mobile-card {
  border-bottom: 1px solid #e8edf3;
  padding: 12px;
}

.circ-mobile-card.is-selected {
  background: #f7faff;
}

.circ-mobile-card-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.circ-mobile-card dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 0 0 10px;
}

.circ-mobile-card dl > div {
  min-width: 0;
}

.circ-mobile-card dt {
  color: #8691a1;
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
}

.circ-mobile-card dd {
  margin: 2px 0 0;
  color: #3f4f66;
  font-size: 10px;
  overflow-wrap: anywhere;
}

.circ-empty {
  padding: 28px 16px;
  color: #788598;
  font-size: 11px;
  text-align: center;
}

[hidden] {
  display: none !important;
}

@media (max-width: 1320px) {
  .circ-kpis {
    grid-template-columns: repeat(3, minmax(130px, 1fr));
  }

  .circ-filters {
    grid-template-columns:
      minmax(230px, 1.5fr)
      repeat(4, minmax(115px, 1fr))
      auto;
  }
}

@media (max-width: 1050px) {
  .circ-main-grid {
    grid-template-columns: 1fr;
  }

  .circ-results {
    border-right: 0;
  }

  .circ-detail {
    border-top: 1px solid #e7ecf2;
  }

  .circ-detail-empty {
    min-height: 180px;
  }
}

@media (max-width: 760px) {
  .circulation-content {
    padding-left: 10px;
    padding-right: 10px;
  }

  .circ-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .circ-head-actions {
    width: 100%;
  }

  .circ-head-actions > * {
    flex: 1 1 auto;
  }

  .circ-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .circ-tabs button {
    min-width: 0;
    flex: 1 1 0;
  }

  .circ-toolbar {
    align-items: flex-start;
  }

  .circ-filter-toggle {
    display: inline-flex;
  }

  .circ-filters {
    display: none;
    grid-template-columns: 1fr 1fr;
  }

  .circ-filters.is-open {
    display: grid;
  }

  .circ-search,
  .circ-filter-actions {
    grid-column: 1 / -1;
  }

  .circ-filter-actions > * {
    flex: 1 1 0;
  }

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

  .circ-mobile-list {
    display: block;
  }

  .circ-pagination {
    position: sticky;
    bottom: 0;
    background: #fff;
  }
}

@media (max-width: 480px) {
  .circ-kpis {
    grid-template-columns: 1fr;
  }

  .circ-filters {
    grid-template-columns: 1fr;
  }

  .circ-search,
  .circ-filter-actions {
    grid-column: auto;
  }

  .circ-mobile-card dl,
  .circ-detail-fields {
    grid-template-columns: 1fr;
  }
}
