﻿/* GED-WEB-2E4 — Historique et responsabilité */

html.circ-2e4-open,
html.circ-2e4-open body {
  overflow: hidden;
}

.circ-2e4-open-button {
  flex: 1 1 auto;
}

.circ-2e4-modal {
  position: fixed;
  inset: 0;
  z-index: 1600;
  display: grid;
  place-items: center;
  background: rgba(16, 30, 50, .46);
  padding: 14px;
}

.circ-2e4-dialog {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  width: min(1180px, 100%);
  height: min(830px, calc(100vh - 28px));
  overflow: hidden;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(10, 24, 45, .28);
}

.circ-2e4-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  border-bottom: 1px solid #e4eaf1;
  padding: 13px 15px;
}

.circ-2e4-head-main {
  min-width: 0;
}

.circ-2e4-head-main > span {
  color: #5a7ead;
  font-size: 8px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.circ-2e4-head-main h2 {
  margin: 3px 0 2px;
  overflow: hidden;
  color: #2d4058;
  font-size: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.circ-2e4-head-main p {
  margin: 0;
  color: #7d899a;
  font-size: 9px;
}

.circ-2e4-head-actions {
  display: flex;
  gap: 6px;
  flex: 0 0 auto;
}

.circ-2e4-head-actions .btn,
.circ-2e4-head-actions .btn-secondary {
  min-height: 31px;
  padding: 6px 9px;
  font-size: 9px;
}

.circ-2e4-close {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border: 1px solid #e0e6ed;
  border-radius: 8px;
  background: #fff;
  color: #6d7b8f;
  font: inherit;
  font-size: 16px;
  cursor: pointer;
}

.circ-2e4-state {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  border-bottom: 1px solid #e4eaf1;
  background: #e3e9f0;
}

.circ-2e4-state article {
  display: grid;
  gap: 3px;
  min-height: 83px;
  background: #fbfcfe;
  padding: 10px 12px;
}

.circ-2e4-state article.is-current {
  background: #f2f7ff;
}

.circ-2e4-state article.is-good {
  background: #f2faf5;
}

.circ-2e4-state article.is-alert,
.circ-2e4-state article.is-warning {
  background: #fff8e9;
}

.circ-2e4-state span {
  color: #7e8a9b;
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
}

.circ-2e4-state strong {
  color: #34475e;
  font-size: 12px;
}

.circ-2e4-state small {
  color: #8792a2;
  font-size: 8px;
  line-height: 1.35;
}

.circ-2e4-content {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
}

.circ-2e4-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  border-bottom: 1px solid #e6ebf2;
  background: #fafbfd;
  padding: 8px 12px;
}

.circ-2e4-tabs {
  display: flex;
  gap: 3px;
}

.circ-2e4-tabs button {
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  padding: 6px 10px;
  color: #65748a;
  font: inherit;
  font-size: 9px;
  font-weight: 800;
  cursor: pointer;
}

.circ-2e4-tabs button.is-active {
  border-color: #cddbeb;
  background: #fff;
  color: #245fbd;
}

.circ-2e4-filters {
  display: flex;
  gap: 6px;
  align-items: center;
}

.circ-2e4-filters select {
  min-height: 31px;
  border: 1px solid #d2dbe6;
  border-radius: 8px;
  background: #fff;
  padding: 5px 8px;
  color: #42536a;
  font: inherit;
  font-size: 9px;
}

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

.circ-2e4-loading.is-visible::before {
  content: "";
  display: block;
  width: 30%;
  height: 100%;
  background: #2467c7;
  animation: circ2e4load .8s linear infinite alternate;
}

@keyframes circ2e4load {
  from { transform: translateX(0); }
  to { transform: translateX(230%); }
}

.circ-2e4-panel {
  min-height: 0;
  overflow: auto;
  padding: 13px;
}

.circ-2e4-timeline {
  position: relative;
  max-width: 920px;
  margin: 0 auto;
}

.circ-2e4-timeline::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 12px;
  width: 1px;
  background: #dbe3ec;
}

.circ-2e4-event {
  position: relative;
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr);
  gap: 8px;
  margin-bottom: 8px;
}

.circ-2e4-event-marker {
  position: relative;
  z-index: 1;
  width: 9px;
  height: 9px;
  margin: 13px 0 0 8px;
  border: 2px solid #6c8bb0;
  border-radius: 999px;
  background: #fff;
}

.circ-2e4-event.is-success .circ-2e4-event-marker {
  border-color: #4f956a;
}

.circ-2e4-event.is-warning .circ-2e4-event-marker {
  border-color: #b27b28;
}

.circ-2e4-event.is-danger .circ-2e4-event-marker {
  border-color: #bd4f4f;
}

.circ-2e4-event.is-supervision .circ-2e4-event-marker {
  border-color: #7a58b5;
}

.circ-2e4-event.is-responsibility .circ-2e4-event-marker {
  border-color: #346f9e;
}

.circ-2e4-event-body {
  min-width: 0;
  border: 1px solid #e1e7ef;
  border-radius: 10px;
  background: #fff;
  padding: 9px 10px;
}

.circ-2e4-event-body header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.circ-2e4-event-body header > div {
  display: grid;
  gap: 1px;
}

.circ-2e4-event-body header span {
  color: #7f8b9c;
  font-size: 7px;
  font-weight: 900;
  text-transform: uppercase;
}

.circ-2e4-event-body header strong {
  color: #34475f;
  font-size: 10px;
}

.circ-2e4-event-body time {
  color: #7e8a9a;
  font-size: 8px;
  white-space: nowrap;
}

.circ-2e4-event-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 12px;
  margin-top: 7px;
}

.circ-2e4-event-meta span {
  color: #596b82;
  font-size: 8px;
}

.circ-2e4-event-meta b {
  margin-right: 3px;
  color: #8a96a6;
  font-size: 7px;
  text-transform: uppercase;
}

.circ-2e4-event-motive,
.circ-2e4-event-detail {
  margin: 7px 0 0;
  color: #4b5c72;
  font-size: 9px;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.circ-2e4-event-detail {
  color: #788597;
}

.circ-2e4-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 9px;
  min-height: 47px;
  margin-top: 10px;
}

.circ-2e4-pagination span {
  color: #718095;
  font-size: 8px;
}

.circ-2e4-responsibility-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 12px;
  max-width: 1050px;
  margin: 0 auto;
}

.circ-2e4-resp-history {
  display: grid;
  gap: 6px;
}

.circ-2e4-resp-row {
  display: grid;
  grid-template-columns: minmax(180px, .8fr) minmax(160px, .6fr) minmax(0, 1.3fr);
  gap: 10px;
  align-items: center;
  border: 1px solid #e1e7ef;
  border-radius: 10px;
  background: #fff;
  padding: 9px 10px;
}

.circ-2e4-resp-row.is-current {
  border-color: #a9c7e7;
  background: #f6faff;
}

.circ-2e4-resp-period {
  display: grid;
  gap: 2px;
}

.circ-2e4-resp-period strong {
  color: #354860;
  font-size: 10px;
}

.circ-2e4-resp-period span {
  color: #8290a1;
  font-size: 8px;
}

.circ-2e4-origin,
.circ-2e4-current-badge {
  display: inline-flex;
  border-radius: 999px;
  padding: 4px 7px;
  background: #f0f3f7;
  color: #607187;
  font-size: 7px;
  font-weight: 800;
}

.circ-2e4-current-badge {
  margin-left: 4px;
  background: #e8f3ff;
  color: #245fbd;
}

.circ-2e4-resp-meta {
  display: grid;
  gap: 3px;
}

.circ-2e4-resp-meta span {
  color: #596b81;
  font-size: 8px;
  line-height: 1.4;
}

.circ-2e4-resp-meta b {
  color: #8a96a6;
  font-size: 7px;
  text-transform: uppercase;
}

.circ-2e4-supervision {
  align-self: start;
  border: 1px solid #e1e7ef;
  border-radius: 11px;
  background: #fbfcfe;
  padding: 11px;
}

.circ-2e4-supervision h3 {
  margin: 0 0 3px;
  color: #354860;
  font-size: 11px;
}

.circ-2e4-supervision > p {
  margin: 0 0 10px;
  color: #7d899a;
  font-size: 8px;
  line-height: 1.45;
}

.circ-2e4-supervision-actions {
  display: grid;
  gap: 6px;
}

.circ-2e4-supervision-actions button {
  width: 100%;
}

.circ-2e4-supervision-message {
  border: 1px solid #e1e7ef;
  border-radius: 8px;
  background: #fff;
  padding: 9px;
  color: #788698;
  font-size: 8px;
  line-height: 1.45;
}

.circ-2e4-admin-panel {
  margin-top: 10px;
  border-top: 1px solid #e2e8ef;
  padding-top: 10px;
}

.circ-2e4-admin-panel h4 {
  margin: 0 0 3px;
  color: #34475f;
  font-size: 10px;
}

.circ-2e4-admin-warning {
  margin: 0 0 9px;
  border: 1px solid #ecd09d;
  border-radius: 8px;
  background: #fff9ec;
  padding: 7px 8px;
  color: #805a20;
  font-size: 8px;
  line-height: 1.4;
}

.circ-2e4-admin-panel label {
  display: grid;
  gap: 4px;
  margin-bottom: 8px;
}

.circ-2e4-admin-panel label > span {
  color: #6c798d;
  font-size: 7px;
  font-weight: 900;
  text-transform: uppercase;
}

.circ-2e4-admin-panel select,
.circ-2e4-admin-panel textarea {
  width: 100%;
  border: 1px solid #d0d9e5;
  border-radius: 8px;
  background: #fff;
  padding: 7px 8px;
  color: #34475f;
  font: inherit;
  font-size: 9px;
}

.circ-2e4-admin-panel textarea {
  min-height: 90px;
  resize: vertical;
}

.circ-2e4-admin-error {
  margin-bottom: 8px;
  border: 1px solid #edbbbb;
  border-radius: 8px;
  background: #fff1f1;
  padding: 7px 8px;
  color: #a03939;
}

.circ-2e4-admin-error strong,
.circ-2e4-admin-error small {
  display: block;
}

.circ-2e4-admin-error strong {
  font-size: 8px;
}

.circ-2e4-admin-error small {
  margin-top: 2px;
  font-size: 7px;
}

.circ-2e4-admin-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.circ-2e4-empty {
  padding: 25px 12px;
  color: #7b8899;
  font-size: 9px;
  text-align: center;
}

@media (max-width: 900px) {
  .circ-2e4-state {
    grid-template-columns: 1fr 1fr;
  }

  .circ-2e4-responsibility-layout {
    grid-template-columns: 1fr;
  }

  .circ-2e4-resp-row {
    grid-template-columns: 1fr 1fr;
  }

  .circ-2e4-resp-meta {
    grid-column: 1 / -1;
  }
}

@media (max-width: 650px) {
  .circ-2e4-modal {
    padding: 0;
  }

  .circ-2e4-dialog {
    width: 100%;
    height: 100vh;
    border-radius: 0;
  }

  .circ-2e4-head {
    align-items: flex-start;
  }

  .circ-2e4-head-actions {
    display: grid;
    grid-template-columns: auto auto;
  }

  .circ-2e4-head-actions .btn-secondary {
    display: none;
  }

  .circ-2e4-state {
    grid-template-columns: 1fr 1fr;
  }

  .circ-2e4-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .circ-2e4-tabs,
  .circ-2e4-filters {
    width: 100%;
  }

  .circ-2e4-tabs button,
  .circ-2e4-filters select {
    flex: 1 1 0;
    min-width: 0;
  }

  .circ-2e4-event-body header {
    flex-direction: column;
    gap: 3px;
  }

  .circ-2e4-resp-row {
    grid-template-columns: 1fr;
  }

  .circ-2e4-resp-meta {
    grid-column: auto;
  }

  .circ-2e4-admin-buttons > * {
    flex: 1 1 0;
  }
}

[hidden] {
  display: none !important;
}
