:root {
  --gn-blue: #2d78c8;
  --gn-dark: #1f4f86;
  --sidebar: #ffffff;
  --page: #eeeeef;
  --text: #333333;
  --muted: #8d91a1;
  --line: #d7d9df;
  --red: #ff3f35;
  --blue-soft: #4b8fd3;
  --success: #2f8f5b;
  --danger: #c94949;
  --warning: #d89b22;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: #ffffff;
  color: var(--text);
}

button,
input,
select {
  font-family: inherit;
}

.hidden {
  display: none !important;
}

.alert {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 3000;
  max-width: 430px;
  background: #f2dede;
  border: 1px solid #d99;
  color: #8a1f1f;
  padding: 12px 16px;
  border-radius: 4px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

/* =========================
   CONNEXION VALIDÉE
========================= */

.auth-page {
  min-height: 100vh;
  background: #ffffff;
  padding: 0 28px 28px;
}

.auth-header {
  height: 145px;
  display: flex;
  align-items: flex-start;
  gap: 26px;
  padding-top: 4px;
  position: relative;
  border-bottom: 1px solid #eeeeee;
}

.ministry-block {
  width: 96px;
  min-width: 96px;
  border: 1px solid #bfc7d1;
  background: #ffffff;
}

.rf-flag {
  width: 54px;
  height: 21px;
  margin: 7px auto 5px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  border: 1px solid #d6d6d6;
}

.rf-flag span:nth-child(1) {
  background: #1b4f9c;
}

.rf-flag span:nth-child(2) {
  background: #ffffff;
}

.rf-flag span:nth-child(3) {
  background: #d0121b;
}

.rf-title {
  color: #222;
  text-align: center;
  font-size: 7px;
  font-weight: 700;
  padding-bottom: 6px;
  border-bottom: 1px solid #bfc7d1;
}

.ministry-name {
  background: #244f8e;
  color: #ffffff;
  text-align: center;
  font-weight: 700;
  letter-spacing: 4px;
  font-size: 10px;
  line-height: 1.55;
  padding: 10px 3px 11px;
}

.brand-title {
  padding-top: 36px;
}

.brand-title h1 {
  margin: 0;
  color: #294f86;
  font-size: 44px;
  font-weight: 400;
  letter-spacing: 0.3px;
  line-height: 1;
}

.brand-title p {
  margin: 7px 0 0;
  color: #222;
  font-size: 15px;
  letter-spacing: 0.3px;
}

.brand-logo-image {
  margin-left: auto;
  padding-top: 14px;
  width: 295px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.brand-logo-image img {
  display: block;
  max-width: 295px;
  max-height: 112px;
  object-fit: contain;
}

.auth-container {
  width: min(900px, 100%);
  margin: 34px auto 0;
}

.auth-card {
  width: min(860px, 100%);
  margin: 0 auto;
  border: 1px solid #d8d8d8;
  border-radius: 4px;
  background: #ffffff;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.08);
  padding: 26px 34px 30px;
}

.warning-box {
  width: 100%;
  margin: 0 auto 26px;
  background: #fff6cf;
  border: 1px solid #f1df94;
  color: #8a6d2d;
  padding: 12px 16px;
  border-radius: 4px;
  font-size: 18px;
}

.auth-panel h2 {
  font-size: 29px;
  font-weight: 400;
  color: #222;
  margin: 0 0 20px;
  padding-bottom: 6px;
  border-bottom: 1px solid #e5e5e5;
}

.auth-form {
  width: 740px;
  max-width: 100%;
  margin: 0 auto;
}

.auth-row {
  display: grid;
  grid-template-columns: 285px 1fr;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
}

.auth-row label {
  text-align: right;
  font-size: 18px;
  font-weight: 700;
  color: #333;
}

.input-group {
  display: grid;
  grid-template-columns: 50px minmax(420px, 1fr);
  height: 46px;
}

.input-icon {
  background: #eeeeee;
  border: 1px solid #d4d4d4;
  border-right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #555;
  font-size: 18px;
  font-weight: 700;
  border-radius: 5px 0 0 5px;
}

.input-group input {
  height: 46px;
  border: 1px solid #d4d4d4;
  border-radius: 0 5px 5px 0;
  padding: 0 14px;
  font-size: 18px;
  outline: none;
  color: #222;
  width: 100%;
}

.input-group input:focus {
  border-color: #66afe9;
  box-shadow: 0 0 7px rgba(102, 175, 233, 0.65);
}

.auth-options {
  margin-left: 353px;
  margin-top: 2px;
  margin-bottom: 24px;
}

.checkbox-line {
  font-size: 18px;
  font-weight: 700;
  color: #333;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 380px;
  line-height: 1.15;
  user-select: none;
}

.checkbox-line input {
  width: 18px;
  height: 18px;
  margin: 0;
}

.auth-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 26px;
}

.btn {
  border: 0;
  cursor: pointer;
  font-weight: 400;
  border-radius: 4px;
  height: 44px;
  padding: 0 16px;
  font-size: 17px;
}

.btn-cancel {
  background: #eeeeee;
  color: #444444;
}

.btn-login {
  background: #3f78c2;
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 1px 4px rgba(0,0,0,.25);
}

.auth-links {
  display: grid;
  justify-content: center;
  gap: 12px;
  text-align: left;
  font-size: 20px;
}

.auth-links a {
  color: #347ab7;
  text-decoration: none;
}

/* =========================
   PORTAIL STYLE INTRANET
========================= */

.portal {
  min-height: 100vh;
  background: var(--page);
  display: grid;
  grid-template-columns: 286px 1fr;
  grid-template-rows: 72px 1fr;
}

.portal-topbar {
  grid-column: 1 / -1;
  background: var(--gn-blue);
  height: 72px;
  display: flex;
  align-items: center;
  color: #ffffff;
  z-index: 5;
}

.portal-brand {
  width: 286px;
  padding-left: 12px;
  font-size: 34px;
  font-weight: 300;
  letter-spacing: -1px;
}

.portal-brand span {
  font-weight: 700;
  font-style: italic;
  opacity: 0.85;
}

.portal-search {
  width: 420px;
  height: 42px;
  background: #ffffff;
  border-radius: 22px;
  display: flex;
  align-items: center;
  overflow: hidden;
  margin-left: 220px;
}

.portal-search input {
  flex: 1;
  border: 0;
  height: 100%;
  outline: none;
  padding: 0 16px;
  color: #777;
  font-style: italic;
  font-size: 15px;
}

.portal-search button {
  width: 52px;
  height: 100%;
  border: 0;
  background: #ffffff;
  color: #1b70b9;
  font-size: 33px;
  cursor: pointer;
}

.top-user {
  min-width: 245px;
  height: 72px;
  background: #347bc5;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  margin-left: auto;
}

.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #ffffff;
  color: var(--gn-blue);
  display: grid;
  place-items: center;
  font-weight: 700;
}

.top-user strong {
  display: block;
  font-size: 14px;
}

.top-user span {
  display: block;
  font-size: 12px;
  opacity: 0.85;
}

/* Sidebar */

.portal-sidebar {
  grid-row: 2;
  background: #ffffff;
  border-right: 1px solid #dedede;
  min-height: calc(100vh - 72px);
  overflow-y: auto;
}

.sidebar-profile {
  text-align: center;
  padding: 36px 20px 26px;
}

.sidebar-logo {
  width: 84px;
  height: 84px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: #efefef;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-logo img {
  width: 120%;
  height: 120%;
  object-fit: contain;
}

.sidebar-profile strong {
  display: block;
  color: #2b70ad;
  font-size: 15px;
  margin-bottom: 4px;
}

.sidebar-profile span {
  color: #8d91a1;
  font-size: 13px;
}

.side-section {
  border-top: 1px solid #d8d8d8;
  margin: 0 34px;
  padding: 14px 0;
}

.side-section.spaces-only {
  margin-top: 8px;
}

.space-link {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 10px 0;
  color: #9a9cab;
  font-size: 15px;
  cursor: pointer;
}

.space-link.active,
.space-link:hover {
  color: #2b70ad;
  font-weight: 700;
}

.side-section p {
  color: #9a9cab;
  margin: 0 0 8px;
  font-size: 12px;
  text-transform: uppercase;
}

.side-user {
  border-top: 1px solid #d8d8d8;
  margin: 18px 34px;
  padding-top: 16px;
  color: #8d91a1;
}

.side-user span,
.side-user small {
  display: block;
  font-size: 12px;
}

.side-user strong {
  display: block;
  color: #2b70ad;
  margin: 4px 0;
}

.logout-button {
  margin-top: 12px;
  width: 100%;
  border: 1px solid #cfd3dc;
  background: #ffffff;
  color: #777;
  height: 34px;
  cursor: pointer;
}

/* Main */

.portal-main {
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
}

.module-strip {
  min-height: 190px;
  background: #f2f2f4;
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  align-items: center;
  gap: 22px;
  padding: 26px 70px 0;
  border-bottom: 1px solid #e2e2e2;
}

.module-bubble {
  border: 0;
  background: transparent;
  text-align: center;
  cursor: pointer;
  color: #999aaa;
  height: 164px;
  position: relative;
}

.module-bubble::after {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  bottom: 0;
  height: 3px;
  background: transparent;
}

.module-bubble.active::after {
  background: var(--red);
}

.circle {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: 0 auto 16px;
  font-size: 34px;
  background: transparent;
  border: 3px solid currentColor;
}

.circle.red {
  background: var(--red);
  color: #ffffff;
  border-color: var(--red);
}

.circle.blue {
  color: var(--blue-soft);
}

.module-bubble strong {
  display: block;
  font-size: 14px;
  font-weight: 400;
}

.module-bubble.active strong {
  color: var(--red);
}

.page-heading {
  background: #eeeeef;
  padding: 22px 34px 0;
}

.space-label {
  display: inline-block;
  color: #9a9cab;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.8px;
  margin-bottom: 8px;
}

.page-heading h1 {
  color: #2b70ad;
  margin: 0 0 6px;
  font-size: 22px;
}

.page-heading p {
  margin: 0;
  color: #8d91a1;
}

.page-content {
  padding: 24px 34px 38px;
}

.feed-card {
  background: #ffffff;
  border: 1px solid #dddddd;
  padding: 24px;
  margin-bottom: 18px;
}

.feed-author {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.feed-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #e9edf2;
  display: grid;
  place-items: center;
  color: #2b70ad;
  font-weight: 700;
}

.feed-author strong {
  display: block;
  color: #2b70ad;
}

.feed-author span {
  color: #8d91a1;
  font-size: 13px;
}

.document-preview {
  border: 1px solid #e0e0e0;
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.document-thumb {
  width: 88px;
  height: 62px;
  background: #9d9d9d;
  color: #ffffff;
  display: grid;
  place-items: center;
  font-weight: 700;
}

.document-preview strong {
  display: block;
}

.document-preview span {
  color: #8d91a1;
  font-size: 14px;
}

/* Badge certification */

.pj-pill.certified-label {
  color: #ffffff;
  background: #2f8f5b;
  border-color: #2f8f5b;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* =========================
   PANEL ADMIN
========================= */

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) 420px;
  gap: 22px;
  align-items: start;
}

.admin-card {
  background: #ffffff;
  border: 1px solid #d9dce3;
  padding: 22px;
}

.admin-card h2 {
  margin: 0 0 8px;
  color: #2b70ad;
  font-size: 21px;
  font-weight: 700;
}

.admin-card p {
  margin: 0 0 18px;
  color: #8d91a1;
  line-height: 1.45;
}

.admin-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.admin-button {
  border: 0;
  background: #2d78c8;
  color: #ffffff;
  padding: 9px 12px;
  cursor: pointer;
  border-radius: 4px;
}

.admin-button.secondary {
  background: #eef2f7;
  color: #2b70ad;
  border: 1px solid #d4dce7;
}

.admin-form {
  display: grid;
  gap: 13px;
}

.admin-form label {
  display: grid;
  gap: 6px;
  color: #444;
  font-weight: 700;
  font-size: 13px;
}

.admin-form input,
.admin-form select {
  height: 38px;
  border: 1px solid #cfd3dc;
  padding: 0 10px;
  outline: none;
  color: #333;
  background: #ffffff;
}

.admin-form input:focus,
.admin-form select:focus {
  border-color: #2d78c8;
  box-shadow: 0 0 0 2px rgba(45, 120, 200, 0.12);
}

.admin-form-actions {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.admin-table-wrap {
  overflow: auto;
  border: 1px solid #e2e4e9;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 820px;
}

.admin-table th,
.admin-table td {
  padding: 11px 12px;
  border-bottom: 1px solid #e6e8ed;
  text-align: left;
  vertical-align: top;
  font-size: 13px;
}

.admin-table th {
  background: #f5f7fa;
  color: #657082;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.5px;
}

.admin-table td {
  color: #333;
}

.status-pill {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.status-pill.active {
  color: #23724b;
  background: #e5f5ed;
}

.status-pill.suspended {
  color: #9a3d3d;
  background: #f9e5e5;
}

.role-pill {
  display: inline-block;
  padding: 4px 8px;
  border: 1px solid #d8dde8;
  color: #2b70ad;
  background: #f7f9fc;
  border-radius: 4px;
  font-size: 12px;
}

.small-action {
  border: 0;
  background: #eef2f7;
  color: #2b70ad;
  padding: 6px 9px;
  border-radius: 4px;
  cursor: pointer;
}

.admin-empty {
  padding: 18px;
  color: #8d91a1;
  background: #ffffff;
  border: 1px dashed #d9dce3;
}

.access-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.access-card {
  background: #ffffff;
  border: 1px solid #d9dce3;
  padding: 18px;
}

.access-card strong {
  display: block;
  color: #2b70ad;
  margin-bottom: 8px;
}

.access-card span {
  color: #8d91a1;
  line-height: 1.4;
}

/* Anciennes classes maintenues pour compatibilité */

.intro-grid,
.modules-grid,
.card,
.empty,
.activity-card,
.side-menu,
.side-link {
  display: none;
}

@media (max-width: 1200px) {
  .portal-search {
    margin-left: 40px;
  }

  .module-strip {
    grid-template-columns: repeat(2, minmax(130px, 1fr));
    min-height: auto;
  }

  .module-bubble {
    height: 145px;
  }

  .admin-grid {
    grid-template-columns: 1fr;
  }

  .access-cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .portal {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto 1fr;
  }

  .portal-topbar {
    height: auto;
    flex-wrap: wrap;
    padding: 10px;
  }

  .portal-brand {
    width: auto;
  }

  .portal-search {
    order: 3;
    width: 100%;
    margin: 10px 0 0;
  }

  .portal-sidebar {
    grid-column: 1;
    grid-row: 2;
    min-height: auto;
  }

  .portal-main {
    grid-column: 1;
    grid-row: 3;
  }
}


/* =========================
   SYSTÈME DOCUMENTAIRE PJ
========================= */

.pj-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.pj-toolbar h2 {
  margin: 0;
  color: #2b70ad;
  font-size: 21px;
}

.pj-toolbar p {
  margin: 4px 0 0;
  color: #8d91a1;
}

.pj-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pj-button {
  border: 0;
  background: #2d78c8;
  color: #ffffff;
  padding: 9px 13px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}

.pj-button.secondary {
  background: #eef2f7;
  color: #2b70ad;
  border: 1px solid #d4dce7;
}

.pj-button.danger {
  background: #c94949;
  color: #ffffff;
}

.pj-button.success {
  background: #2f8f5b;
  color: #ffffff;
}

.pj-button.warning {
  background: #d89b22;
  color: #ffffff;
}

.pj-layout {
  display: grid;
  gap: 18px;
}

.pj-doc-list {
  display: grid;
  gap: 14px;
}

.pj-doc-card {
  background: #ffffff;
  border: 1px solid #dddddd;
  padding: 18px;
}

.pj-doc-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.pj-doc-title {
  margin: 0 0 8px;
  color: #2b70ad;
  font-size: 18px;
}

.pj-doc-summary {
  color: #8d91a1;
  margin: 10px 0 0;
  line-height: 1.45;
}

.pj-meta {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.pj-pill {
  display: inline-block;
  border: 1px solid #d8dde8;
  background: #f7f9fc;
  color: #647082;
  padding: 4px 8px;
  font-size: 12px;
  border-radius: 999px;
}

.pj-pill.pending {
  color: #9a6a17;
  background: #fff4d9;
  border-color: #f2d28a;
}

.pj-pill.published,
.pj-pill.certified {
  color: #23724b;
  background: #e5f5ed;
  border-color: #b9e2cd;
}

.pj-pill.rejected {
  color: #9a3d3d;
  background: #f9e5e5;
  border-color: #efbcbc;
}

.pj-pill.draft {
  color: #637084;
  background: #eef2f7;
}

.pj-doc-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.pj-empty {
  background: #ffffff;
  border: 1px dashed #d9dce3;
  color: #8d91a1;
  padding: 24px;
  text-align: center;
}

.pj-form-card {
  background: #ffffff;
  border: 1px solid #d9dce3;
  padding: 22px;
  margin-bottom: 18px;
}

.pj-form-card h2 {
  margin: 0 0 8px;
  color: #2b70ad;
  font-size: 21px;
}

.pj-form-card p {
  margin: 0 0 18px;
  color: #8d91a1;
}

.pj-form {
  display: grid;
  gap: 14px;
}

.pj-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.pj-form label {
  display: grid;
  gap: 6px;
  color: #444;
  font-weight: 700;
  font-size: 13px;
}

.pj-form input,
.pj-form select,
.pj-form textarea {
  border: 1px solid #cfd3dc;
  padding: 10px;
  outline: none;
  color: #333;
  background: #ffffff;
  font-size: 14px;
}

.pj-form input,
.pj-form select {
  height: 40px;
}

.pj-form textarea {
  min-height: 320px;
  resize: vertical;
  line-height: 1.55;
  font-family: Arial, Helvetica, sans-serif;
}

.pj-form input:focus,
.pj-form select:focus,
.pj-form textarea:focus {
  border-color: #2d78c8;
  box-shadow: 0 0 0 2px rgba(45, 120, 200, 0.12);
}

.pj-form .wide {
  grid-column: 1 / -1;
}

.pj-viewer {
  background: #ffffff;
  border: 1px solid #d9dce3;
  padding: 24px;
}

.pj-viewer-head {
  border-bottom: 1px solid #e0e3e8;
  margin-bottom: 18px;
  padding-bottom: 14px;
}

.pj-viewer-head h2 {
  margin: 0 0 8px;
  color: #2b70ad;
}

.pj-template-content {
  white-space: pre-wrap;
  background: #fbfbfc;
  border: 1px solid #e1e4ea;
  padding: 18px;
  line-height: 1.6;
  color: #333;
}

@media (max-width: 900px) {
  .pj-doc-head,
  .pj-toolbar {
    flex-direction: column;
  }

  .pj-doc-actions {
    justify-content: flex-start;
  }

  .pj-form-grid {
    grid-template-columns: 1fr;
  }

  .pj-form .wide {
    grid-column: auto;
  }
}


/* =========================
   RENDU DOCUMENT OFFICIEL
========================= */

.pj-viewer.official-view {
  background: transparent;
  border: 0;
  padding: 0;
}

.official-document-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.official-document-toolbar .pj-actions {
  margin: 0;
}

.official-sheet {
  width: min(980px, 100%);
  margin: 0 auto;
  background: #ffffff;
  border: 1px solid #cfd3dc;
  box-shadow: 0 10px 28px rgba(31, 79, 134, 0.10);
  padding: 42px 48px;
  color: #1f2933;
}

.official-sheet-header {
  border-bottom: 2px solid #244f8e;
  padding-bottom: 20px;
  margin-bottom: 24px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: start;
}

.official-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.official-emblem {
  width: 58px;
  height: 58px;
  border: 2px solid #244f8e;
  display: grid;
  place-items: center;
  color: #244f8e;
  font-weight: 800;
  letter-spacing: 1px;
}

.official-brand-text strong {
  display: block;
  color: #244f8e;
  text-transform: uppercase;
  font-size: 17px;
  letter-spacing: 0.8px;
}

.official-brand-text span {
  display: block;
  color: #6f7887;
  font-size: 13px;
  margin-top: 4px;
}

.official-status-box {
  text-align: right;
}

.official-status-box .pj-pill {
  margin-bottom: 8px;
}

.official-status-box small {
  display: block;
  color: #7a8392;
  font-size: 12px;
}

.official-title-block {
  text-align: center;
  margin: 28px 0 26px;
}

.official-title-block h2 {
  margin: 0;
  color: #111827;
  text-transform: uppercase;
  font-size: 24px;
  letter-spacing: 0.6px;
}

.official-title-block p {
  margin: 10px auto 0;
  color: #6f7887;
  max-width: 680px;
  line-height: 1.45;
}

.official-meta-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 28px;
  border: 1px solid #d9dde5;
}

.official-meta-table th,
.official-meta-table td {
  border: 1px solid #d9dde5;
  padding: 10px 12px;
  text-align: left;
  font-size: 13px;
  vertical-align: top;
}

.official-meta-table th {
  width: 190px;
  background: #f4f6f9;
  color: #4b5563;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  font-size: 11px;
}

.official-body {
  border-top: 1px solid #e1e5ec;
  padding-top: 12px;
}

.official-section {
  margin: 22px 0;
}

.official-section-title {
  color: #244f8e;
  text-transform: uppercase;
  font-size: 15px;
  letter-spacing: 0.7px;
  margin: 0 0 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid #d9dde5;
}

.official-line {
  margin: 7px 0;
  line-height: 1.55;
  color: #26313d;
  white-space: pre-wrap;
}

.official-field-line {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 10px;
  border-bottom: 1px dotted #d5dae3;
  padding: 6px 0;
  line-height: 1.45;
}

.official-field-label {
  color: #4b5563;
  font-weight: 700;
}

.official-field-value {
  color: #26313d;
}

.official-bullet-line {
  margin: 6px 0 6px 18px;
  line-height: 1.5;
}

.official-signature-zone {
  margin-top: 36px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.signature-box {
  border-top: 1px solid #7b8493;
  padding-top: 10px;
  color: #4b5563;
  font-size: 13px;
  min-height: 60px;
}

.official-footer-note {
  margin-top: 30px;
  padding-top: 12px;
  border-top: 1px solid #e1e5ec;
  color: #7a8392;
  font-size: 12px;
  text-align: center;
}

@media print {
  .portal-topbar,
  .portal-sidebar,
  .module-strip,
  .page-heading,
  .official-document-toolbar {
    display: none !important;
  }

  .portal {
    display: block;
    background: #ffffff;
  }

  .portal-main,
  .page-content {
    padding: 0;
  }

  .official-sheet {
    box-shadow: none;
    border: none;
    width: 100%;
    padding: 0;
  }
}

@media (max-width: 760px) {
  .official-sheet {
    padding: 26px 22px;
  }

  .official-sheet-header {
    grid-template-columns: 1fr;
  }

  .official-status-box {
    text-align: left;
  }

  .official-field-line {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .official-signature-zone {
    grid-template-columns: 1fr;
  }
}


/* =========================
   FORMULAIRE GÉNÉRATEUR PJ
========================= */

.document-builder-info {
  background: #f4f7fb;
  border: 1px solid #d7e2f0;
  color: #526071;
  padding: 14px 16px;
  margin-bottom: 18px;
  line-height: 1.45;
}

.document-builder-section {
  border: 1px solid #d9dce3;
  background: #ffffff;
  margin-bottom: 16px;
}

.document-builder-section h3 {
  margin: 0;
  padding: 13px 16px;
  background: #f5f7fa;
  color: #244f8e;
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 0.7px;
  border-bottom: 1px solid #d9dce3;
}

.document-builder-fields {
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.document-builder-fields .wide {
  grid-column: 1 / -1;
}

.document-builder-fields label {
  display: grid;
  gap: 6px;
  color: #444;
  font-weight: 700;
  font-size: 13px;
}

.document-builder-fields input,
.document-builder-fields textarea,
.document-builder-fields select {
  border: 1px solid #cfd3dc;
  padding: 10px;
  outline: none;
  color: #333;
  background: #ffffff;
  font-size: 14px;
}

.document-builder-fields input,
.document-builder-fields select {
  height: 40px;
}

.document-builder-fields textarea {
  min-height: 105px;
  resize: vertical;
  line-height: 1.45;
  font-family: Arial, Helvetica, sans-serif;
}

.document-builder-fields input:focus,
.document-builder-fields textarea:focus,
.document-builder-fields select:focus {
  border-color: #2d78c8;
  box-shadow: 0 0 0 2px rgba(45, 120, 200, 0.12);
}

.generated-preview-note {
  margin-top: 8px;
  color: #8d91a1;
  font-size: 13px;
}

/* En-tête document avec image Gendarmerie */

.official-sheet-header.official-image-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  border-bottom: 2px solid #244f8e;
}

.official-header-picture {
  display: flex;
  align-items: center;
}

.official-header-picture img {
  max-width: 430px;
  width: 100%;
  max-height: 150px;
  object-fit: contain;
  object-position: left center;
}

@media (max-width: 760px) {
  .document-builder-fields {
    grid-template-columns: 1fr;
  }

  .document-builder-fields .wide {
    grid-column: auto;
  }

  .official-sheet-header.official-image-header {
    grid-template-columns: 1fr;
  }

  .official-header-picture img {
    max-width: 100%;
  }
}


/* =========================
   CRÉATION COMPTE ADMIN
========================= */

.create-account-block {
  border: 1px solid #d9dce3;
  background: #ffffff;
  padding: 18px;
  margin-bottom: 18px;
}

.create-account-block h3 {
  margin: 0 0 8px;
  color: #2b70ad;
  font-size: 18px;
}

.create-account-block p {
  margin: 0 0 16px;
  color: #8d91a1;
  line-height: 1.45;
}

.create-account-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}

.create-account-grid label {
  display: grid;
  gap: 6px;
  color: #444;
  font-weight: 700;
  font-size: 13px;
}

.create-account-grid input,
.create-account-grid select {
  height: 38px;
  border: 1px solid #cfd3dc;
  padding: 0 10px;
  outline: none;
  color: #333;
  background: #ffffff;
}

.create-account-grid input:focus,
.create-account-grid select:focus {
  border-color: #2d78c8;
  box-shadow: 0 0 0 2px rgba(45, 120, 200, 0.12);
}

.create-account-grid .wide {
  grid-column: 1 / -1;
}

.create-account-note {
  margin-top: 12px;
  color: #8d91a1;
  font-size: 12px;
  line-height: 1.45;
}

@media (max-width: 900px) {
  .create-account-grid {
    grid-template-columns: 1fr;
  }

  .create-account-grid .wide {
    grid-column: auto;
  }
}


/* =========================
   DEMANDE DE COMPTE CONNEXION
========================= */

.request-account-link {
  border: 0;
  background: transparent;
  color: #347ab7;
  font-size: 20px;
  cursor: pointer;
  padding: 0;
  text-align: left;
}

.request-account-link:hover {
  text-decoration: underline;
}

.access-request-box {
  margin-top: 22px;
  border: 1px solid #d8d8d8;
  background: #ffffff;
  padding: 18px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.access-request-box h3 {
  margin: 0 0 8px;
  color: #294f86;
  font-size: 20px;
}

.access-request-box p {
  margin: 0 0 12px;
  color: #666;
  line-height: 1.45;
}

.request-warning {
  margin-bottom: 14px;
  padding: 10px 12px;
  background: #fff6cf;
  border: 1px solid #f1df94;
  color: #8a6d2d;
  font-size: 13px;
}

.request-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.request-form-grid label {
  display: grid;
  gap: 6px;
  color: #333;
  font-weight: 700;
  font-size: 13px;
}

.request-form-grid input {
  height: 38px;
  border: 1px solid #cfd3dc;
  padding: 0 10px;
  outline: none;
  color: #333;
}

.request-form-grid input:focus {
  border-color: #66afe9;
  box-shadow: 0 0 7px rgba(102, 175, 233, 0.45);
}

.request-password-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #444;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 14px;
}

.request-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* =========================
   DEMANDES D'ACCÈS ADMIN
========================= */

.access-requests-block {
  border: 1px solid #d9dce3;
  background: #ffffff;
  padding: 18px;
  margin-bottom: 18px;
}

.access-requests-block h3 {
  margin: 0 0 8px;
  color: #2b70ad;
  font-size: 18px;
}

.access-requests-block p {
  margin: 0 0 16px;
  color: #8d91a1;
  line-height: 1.45;
}

.request-table-wrap {
  overflow: auto;
  border: 1px solid #e2e4e9;
}

.request-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.request-table th,
.request-table td {
  padding: 11px 12px;
  border-bottom: 1px solid #e6e8ed;
  text-align: left;
  vertical-align: top;
  font-size: 13px;
}

.request-table th {
  background: #f5f7fa;
  color: #657082;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.5px;
}

.request-table td {
  color: #333;
}

.request-actions-admin {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.status-pill.pending {
  color: #9a6a17;
  background: #fff4d9;
}

@media (max-width: 760px) {
  .request-form-grid {
    grid-template-columns: 1fr;
  }

  .request-actions {
    justify-content: flex-start;
  }
}


/* =========================
   ADMIN SUPPRESSION + GRADES
========================= */

.small-action.danger-action {
  background: #c94949;
  color: #ffffff;
}

.small-action.danger-action:hover {
  background: #a93636;
}

.admin-form select,
.create-account-grid select {
  height: 38px;
  border: 1px solid #cfd3dc;
  padding: 0 10px;
  outline: none;
  color: #333;
  background: #ffffff;
}

.admin-form select:focus,
.create-account-grid select:focus {
  border-color: #2d78c8;
  box-shadow: 0 0 0 2px rgba(45, 120, 200, 0.12);
}


/* =========================
   CORRECTION V10.1
========================= */

.pj-toolbar.compact-toolbar {
  justify-content: flex-end;
  margin-bottom: 18px;
}

.pj-toolbar.compact-toolbar > div:first-child {
  display: none;
}


/* =========================
   LOGO OPJ SITE
========================= */

.sidebar-logo.opj-logo {
  width: 104px;
  height: 104px;
  background: transparent;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.10);
}

.sidebar-logo.opj-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}


/* =========================
   ICÔNE GARDE À VUE
========================= */




/* =========================
   ICÔNE GARDE À VUE PROPRE
========================= */

.gav-icon-circle {
  background: #ff3f35;
  border-color: #ff3f35;
  overflow: hidden;
}

.gav-icon-circle img {
  width: 46px;
  height: 46px;
  object-fit: contain;
  display: block;
}






/* =========================
   ICÔNE AUDITION IMAGE EXACTE
========================= */

.audition-icon-circle {
  background: #2d78c8;
  border-color: #2d78c8;
  overflow: hidden;
}

.audition-icon-circle img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  display: block;
}

/* Audition actif : bleu, pas rouge */
.module-bubble[data-page="audition"].active::after {
  background: #2d78c8;
}

.module-bubble[data-page="audition"].active strong {
  color: #2d78c8;
}


/* =========================
   ICÔNE PERQUISITION VERTE
========================= */

.perquisition-icon-circle {
  background: #2f8f5b;
  border-color: #2f8f5b;
  overflow: hidden;
}

.perquisition-icon-circle img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  display: block;
}

/* Perquisition actif : vert */
.module-bubble[data-page="perquisition"].active::after {
  background: #2f8f5b;
}

.module-bubble[data-page="perquisition"].active strong {
  color: #2f8f5b;
}




/* =========================
   ICÔNE ENQUÊTES VIOLETTE CORRIGÉE
========================= */

.enquetes-icon-circle {
  background: #7b4bc4;
  border-color: #7b4bc4;
  overflow: hidden;
}

.enquetes-icon-circle img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  display: block;
}

/* Enquêtes actif : violet */
.module-bubble[data-page="enquetes"].active::after {
  background: #7b4bc4;
}

.module-bubble[data-page="enquetes"].active strong {
  color: #7b4bc4;
}


/* =========================
   BARRE DE RECHERCHE CENTRÉE
========================= */

.portal-topbar {
  position: relative;
}

.portal-search {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: min(780px, calc(100% - 620px));
  min-width: 520px;
  margin-left: 0;
}

.portal-search input {
  font-size: 15px;
  padding-left: 20px;
}

@media (max-width: 1100px) {
  .portal-search {
    width: min(620px, calc(100% - 560px));
    min-width: 380px;
  }
}

@media (max-width: 900px) {
  .portal-search {
    position: static;
    transform: none;
    width: 100%;
    min-width: 0;
    margin: 10px 0 0;
  }
}


/* =========================
   LOGO TOPBAR PCS
========================= */

.portal-brand.portal-brand-image {
  width: 286px;
  height: 72px;
  padding-left: 12px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.portal-brand.portal-brand-image img {
  max-width: 260px;
  max-height: 58px;
  object-fit: contain;
  object-position: left center;
  display: block;
}

@media (max-width: 900px) {
  .portal-brand.portal-brand-image {
    width: auto;
    height: auto;
    min-height: 52px;
    padding-left: 0;
  }

  .portal-brand.portal-brand-image img {
    max-width: 220px;
    max-height: 52px;
  }
}


/* =========================
   LOGO TOPBAR AGRANDI
========================= */

.portal-brand.portal-brand-image {
  width: 360px;
  height: 72px;
  padding-left: 14px;
}

.portal-brand.portal-brand-image img {
  max-width: 340px;
  max-height: 68px;
}

@media (max-width: 1200px) {
  .portal-brand.portal-brand-image {
    width: 320px;
  }

  .portal-brand.portal-brand-image img {
    max-width: 300px;
    max-height: 64px;
  }
}

@media (max-width: 900px) {
  .portal-brand.portal-brand-image {
    width: auto;
    min-height: 58px;
  }

  .portal-brand.portal-brand-image img {
    max-width: 260px;
    max-height: 56px;
  }
}


/* =========================================================
   V10.9 - RELOOK PAGE DE CONNEXION
   Refonte visuelle uniquement, sans toucher à Firebase
========================================================= */

.auth-page {
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(36, 79, 142, 0.06), rgba(255, 255, 255, 0.88)),
    #f4f6f9;
  padding: 0;
}

/* En-tête propre et moins massif */
.auth-header {
  height: 118px;
  padding: 14px 38px;
  background: #ffffff;
  border-bottom: 1px solid #dfe4ec;
  box-shadow: 0 2px 12px rgba(31, 79, 134, 0.08);
  display: flex;
  align-items: center;
  gap: 24px;
}

/* Bloc ministère plus propre */
.ministry-block {
  width: 88px;
  min-width: 88px;
  border: 1px solid #b7c1d0;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(31, 79, 134, 0.08);
}

.rf-flag {
  width: 50px;
  height: 18px;
  margin: 6px auto 4px;
}

.rf-title {
  font-size: 6.5px;
  padding-bottom: 5px;
}

.ministry-name {
  font-size: 9px;
  letter-spacing: 3.5px;
  line-height: 1.45;
  padding: 8px 3px 9px;
  background: #244f8e;
}

/* Titre principal mieux calibré */
.brand-title {
  padding-top: 0;
  min-width: 0;
}

.brand-title h1 {
  margin: 0;
  color: #244f8e;
  font-size: clamp(34px, 4vw, 54px);
  font-weight: 400;
  letter-spacing: 0.4px;
  line-height: 0.95;
}

.brand-title p {
  margin: 10px 0 0;
  color: #1f2933;
  font-size: clamp(13px, 1.3vw, 18px);
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

/* Logo à droite mieux cadré */
.brand-logo-image {
  margin-left: auto;
  padding-top: 0;
  width: 260px;
  min-width: 210px;
  height: 92px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.brand-logo-image img {
  max-width: 250px;
  max-height: 88px;
  object-fit: contain;
  object-position: right center;
}

/* Zone de connexion */
.auth-container {
  width: min(920px, calc(100% - 40px));
  margin: 54px auto 0;
}

.auth-card {
  width: min(820px, 100%);
  margin: 0 auto;
  border: 1px solid #d7dde7;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 18px 45px rgba(31, 79, 134, 0.14);
  padding: 28px 34px 34px;
}

/* Message jaune plus propre */
.warning-box {
  width: 100%;
  margin: 0 auto 24px;
  background: #fff7db;
  border: 1px solid #efd891;
  color: #806026;
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 16px;
}

/* Bloc connexion */
.auth-panel h2 {
  font-size: 28px;
  font-weight: 500;
  color: #1f2933;
  margin: 0 0 24px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e4e8ef;
}

.auth-form {
  width: min(720px, 100%);
  margin: 0 auto;
}

.auth-row {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
}

.auth-row label {
  text-align: right;
  font-size: 16px;
  font-weight: 700;
  color: #253244;
}

.input-group {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  height: 46px;
}

.input-icon {
  background: #eef2f7;
  border: 1px solid #cfd7e4;
  border-right: 0;
  color: #244f8e;
  font-size: 17px;
  font-weight: 700;
  border-radius: 7px 0 0 7px;
}

.input-group input {
  height: 46px;
  border: 1px solid #cfd7e4;
  border-radius: 0 7px 7px 0;
  padding: 0 14px;
  font-size: 16px;
  color: #1f2933;
  background: #ffffff;
}

.input-group input:focus {
  border-color: #2d78c8;
  box-shadow: 0 0 0 3px rgba(45, 120, 200, 0.16);
}

/* Afficher mot de passe */
.auth-options {
  margin-left: 248px;
  margin-top: 0;
  margin-bottom: 22px;
}

.checkbox-line {
  font-size: 15px;
  font-weight: 600;
  color: #3d4756;
}

/* Boutons */
.auth-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 24px;
}

.btn {
  border-radius: 6px;
  height: 42px;
  padding: 0 18px;
  font-size: 15px;
  font-weight: 600;
}

.btn-cancel {
  background: #eef2f7;
  color: #4b5563;
  border: 1px solid #d6dce6;
}

.btn-login {
  background: #2d78c8;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(45, 120, 200, 0.28);
}

.btn-login:hover {
  background: #256bb4;
}

/* Lien demande compte */
.auth-links {
  display: flex;
  justify-content: center;
  gap: 12px;
  text-align: center;
  font-size: 18px;
}

.request-account-link,
.auth-links a {
  color: #2d78c8;
  font-size: 18px;
  font-weight: 600;
  text-decoration: none;
}

.request-account-link:hover,
.auth-links a:hover {
  text-decoration: underline;
}

/* Formulaire demande d'accès */
.access-request-box {
  margin-top: 24px;
  border: 1px solid #d7dde7;
  background: #fbfcfe;
  padding: 20px;
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.access-request-box h3 {
  color: #244f8e;
  font-size: 20px;
}

.request-form-grid input {
  border-radius: 6px;
  border: 1px solid #cfd7e4;
}

.request-warning {
  border-radius: 6px;
}

/* Responsive */
@media (max-width: 900px) {
  .auth-header {
    height: auto;
    padding: 16px 20px;
    flex-wrap: wrap;
  }

  .ministry-block {
    width: 78px;
    min-width: 78px;
  }

  .brand-title h1 {
    font-size: 34px;
  }

  .brand-logo-image {
    width: 100%;
    min-width: 0;
    height: 70px;
    justify-content: flex-start;
    margin-left: 102px;
  }

  .brand-logo-image img {
    max-height: 64px;
    max-width: 240px;
  }

  .auth-container {
    margin-top: 28px;
  }

  .auth-card {
    padding: 22px 18px 26px;
  }

  .auth-row {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .auth-row label {
    text-align: left;
  }

  .auth-options {
    margin-left: 0;
  }

  .auth-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

@media (max-width: 560px) {
  .auth-header {
    gap: 14px;
  }

  .brand-title h1 {
    font-size: 28px;
  }

  .brand-title p {
    font-size: 12px;
  }

  .brand-logo-image {
    margin-left: 0;
  }

  .auth-container {
    width: calc(100% - 24px);
  }
}


/* =========================================================
   V10.9.1 - FINITIONS LOGIN
   Ministère non coupé + message propre + crédit PCS
========================================================= */

/* Correction du bloc ministère : le R de L'INTÉRIEUR ne doit plus être coupé */
.auth-header .ministry-block {
  width: 118px;
  min-width: 118px;
}

.auth-header .ministry-name {
  font-size: 8.8px;
  letter-spacing: 2.8px;
  line-height: 1.5;
  padding: 9px 4px 10px;
  overflow: visible;
  white-space: normal;
}

/* Message d'accès plus propre que "Veuillez vous authentifier" */
.warning-box.auth-notice {
  display: grid;
  gap: 5px;
  background: #fff7db;
  border: 1px solid #efd891;
  color: #77591f;
  border-left: 5px solid #244f8e;
  padding: 14px 17px;
}

.warning-box.auth-notice strong {
  display: block;
  color: #244f8e;
  font-size: 17px;
  font-weight: 700;
}

.warning-box.auth-notice span {
  display: block;
  color: #6f5a28;
  font-size: 14px;
  line-height: 1.45;
}

/* Crédit bas de page */
.login-footer-credit {
  width: min(820px, calc(100% - 40px));
  margin: 22px auto 0;
  text-align: center;
  color: #7a8392;
  font-size: 13px;
  padding-bottom: 24px;
}

.login-footer-credit strong {
  color: #244f8e;
  font-weight: 700;
}

@media (max-width: 900px) {
  .auth-header .ministry-block {
    width: 102px;
    min-width: 102px;
  }

  .auth-header .ministry-name {
    font-size: 7.8px;
    letter-spacing: 2.3px;
  }
}

@media (max-width: 560px) {
  .auth-header .ministry-block {
    width: 96px;
    min-width: 96px;
  }

  .auth-header .ministry-name {
    font-size: 7.3px;
    letter-spacing: 2px;
  }
}


/* =========================================================
   V10.9.2 - LOGO LOGIN + CRÉDIT RP
========================================================= */

/* Logo Gendarmerie PCS sur la page de connexion */
.auth-header .brand-logo-image {
  width: 330px;
  min-width: 280px;
  height: 104px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.auth-header .brand-logo-image img {
  max-width: 320px;
  max-height: 100px;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: right center;
}

/* Crédit page connexion */
.login-footer-credit {
  width: min(920px, calc(100% - 40px));
  margin: 22px auto 0;
  text-align: center;
  color: #6f7887;
  font-size: 14px;
  line-height: 1.5;
  padding-bottom: 26px;
}

.login-footer-credit strong {
  color: #244f8e;
  font-weight: 700;
}

/* Crédit dans le portail connecté */
.portal-fiction-credit {
  margin: 14px 26px 18px;
  padding-top: 14px;
  border-top: 1px solid #e1e5ec;
  color: #8d91a1;
  font-size: 11.5px;
  line-height: 1.45;
  text-align: center;
}

.portal-fiction-credit strong {
  color: #244f8e;
  font-weight: 700;
}

@media (max-width: 900px) {
  .auth-header .brand-logo-image {
    width: 100%;
    min-width: 0;
    height: 82px;
    justify-content: flex-start;
    margin-left: 102px;
  }

  .auth-header .brand-logo-image img {
    max-width: 300px;
    max-height: 78px;
    object-position: left center;
  }
}

@media (max-width: 560px) {
  .auth-header .brand-logo-image {
    margin-left: 0;
  }

  .auth-header .brand-logo-image img {
    max-width: 260px;
    max-height: 72px;
  }
}


/* =========================================================
   V10.13.1 - Catégorie Plainte corrigée
========================================================= */

.plainte-icon-circle {
  background: #f2b705;
  border-color: #f2b705;
  color: #ffffff;
  overflow: hidden;
}

.plainte-icon-circle svg {
  width: 54px;
  height: 54px;
  display: block;
}

.module-bubble[data-page="plainte"].active::after {
  background: #f2b705;
}

.module-bubble[data-page="plainte"].active strong {
  color: #d39a00;
}

.module-bubble[data-page="plainte"]:hover .plainte-icon-circle {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(242, 183, 5, 0.32);
}


/* =========================================================
   V10.16 - Bouton création coloré selon la catégorie
========================================================= */

.pj-button#createDocumentBtn {
  border: none;
  color: #ffffff;
  font-weight: 700;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.pj-button#createDocumentBtn:hover {
  transform: translateY(-1px);
  filter: brightness(0.96);
}

.pj-button#createDocumentBtn:active {
  transform: translateY(0);
}

#createDocumentBtn.create-document-gav {
  background: #ff3b38;
  box-shadow: 0 8px 18px rgba(255, 59, 56, 0.24);
}

#createDocumentBtn.create-document-audition {
  background: #2d78c8;
  box-shadow: 0 8px 18px rgba(45, 120, 200, 0.24);
}

#createDocumentBtn.create-document-perquisition {
  background: #2f9460;
  box-shadow: 0 8px 18px rgba(47, 148, 96, 0.24);
}

#createDocumentBtn.create-document-plainte {
  background: #f2b705;
  box-shadow: 0 8px 18px rgba(242, 183, 5, 0.28);
  color: #ffffff;
}

#createDocumentBtn.create-document-enquetes {
  background: #7647c7;
  box-shadow: 0 8px 18px rgba(118, 71, 199, 0.24);
}


/* =========================================================
   V10.20.2 - Cachet dans Visa / certification GAV
========================================================= */

.signature-box-authority {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-height: 190px;
}

.signature-box-authority span {
  display: block;
}

.authority-stamp-img {
  width: 175px;
  max-width: 90%;
  height: auto;
  object-fit: contain;
  opacity: 0.96;
  margin-top: 4px;
}

@media print {
  .signature-box-authority {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .authority-stamp-img {
    width: 165px;
  }
}


/* =========================================================
   V10.20.3 - Cachet OPJ sous signature autorité rédactrice
========================================================= */

.opj-stamp-img {
  width: 175px;
  max-width: 90%;
  height: auto;
  object-fit: contain;
  opacity: 0.96;
  margin-top: 4px;
}

@media print {
  .opj-stamp-img {
    width: 165px;
  }
}


/* =========================================================
   V10.22 - Rendu GAV façon ancien procès-verbal
   Uniquement .official-sheet-gav-pv
========================================================= */

.official-sheet-gav-pv {
  max-width: 980px;
  padding: 0;
  border: 1px solid #1f2933;
  box-shadow: 0 16px 45px rgba(17, 24, 39, 0.15);
  display: grid;
  grid-template-columns: 280px 1fr;
  background: #ffffff;
  color: #111111;
  font-family: "Times New Roman", Times, serif;
}

/* Colonne gauche façon PV ancien */
.gav-pv-sidebar {
  border-right: 3px solid #1f2933;
  padding: 28px 18px;
  min-height: 1040px;
  display: flex;
  flex-direction: column;
  gap: 34px;
  text-align: center;
}

.gav-pv-republic {
  display: grid;
  gap: 8px;
  font-size: 16px;
  line-height: 1.2;
  text-transform: uppercase;
}

.gav-pv-republic strong {
  font-size: 17px;
}

.gav-pv-republic span,
.gav-pv-republic small {
  font-weight: 700;
}

.gav-pv-number {
  margin-top: 18px;
  display: grid;
  gap: 8px;
  font-size: 22px;
  font-weight: 700;
}

.gav-pv-side-section {
  margin-top: 8px;
}

.gav-pv-side-section h4 {
  font-size: 18px;
  text-decoration: underline;
  margin: 0 0 16px;
  font-weight: 800;
  color: #111111;
}

.gav-pv-side-section p {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 600;
}

.gav-pv-status {
  margin-top: auto;
  font-size: 13px;
}

.gav-pv-status p {
  font-size: 13px;
  font-weight: 400;
  margin: 8px 0;
}

/* Zone principale */
.gav-pv-main {
  padding: 34px 34px 28px;
  min-width: 0;
}

.gav-pv-main-header {
  text-align: left;
  margin-bottom: 26px;
}

.gav-pv-main-header h1 {
  text-align: center;
  font-size: 44px;
  line-height: 1;
  margin: 0 0 30px;
  letter-spacing: 0.5px;
  color: #000000;
  font-weight: 900;
}

.gav-pv-date-line,
.gav-pv-agent-line {
  font-size: 18px;
  line-height: 1.35;
  margin: 8px 0;
}

.gav-pv-title {
  border-top: 1px solid #111111;
  border-bottom: 1px solid #111111;
  padding: 14px 0 12px;
  margin: 18px 0 18px;
  text-align: center;
}

.gav-pv-title h2 {
  color: #000000;
  font-size: 22px;
  margin: 0 0 6px;
  letter-spacing: 0.2px;
}

.gav-pv-title p {
  color: #333333;
  font-size: 14px;
  margin: 0;
}

/* Infos rapides, sans supprimer les données */
.gav-pv-meta-strip {
  border: 1px solid #9ca3af;
  background: #fafafa;
  padding: 10px 12px;
  margin: 18px 0 26px;
  display: grid;
  gap: 6px;
  font-family: Arial, sans-serif;
  font-size: 12px;
}

.gav-pv-meta-strip span {
  display: block;
}

/* Corps du PV : même contenu, style plus administratif ancien */
.gav-pv-content {
  font-size: 16px;
  line-height: 1.45;
}

.gav-pv-content .official-section {
  margin: 20px 0 24px;
}

.gav-pv-content .official-section-title {
  color: #000000;
  background: transparent;
  border: none;
  padding: 0;
  margin: 0 0 14px;
  font-family: "Times New Roman", Times, serif;
  font-size: 18px;
  font-weight: 800;
  text-decoration: underline;
  letter-spacing: 0;
}

.gav-pv-content .official-section-title::before {
  content: "--- ";
}

.gav-pv-content .official-section-title::after {
  content: " ---";
}

.gav-pv-content .official-field-line {
  grid-template-columns: 210px 1fr;
  border-bottom: 1px dotted #777777;
  padding: 6px 0;
  font-family: "Times New Roman", Times, serif;
  font-size: 16px;
}

.gav-pv-content .official-field-label {
  color: #000000;
  font-weight: 800;
}

.gav-pv-content .official-field-value {
  color: #000000;
}

.gav-pv-content .official-line,
.gav-pv-content .official-bullet-line {
  color: #000000;
  font-family: "Times New Roman", Times, serif;
  font-size: 16px;
}

.gav-pv-content .official-bullet-line {
  margin-left: 14px;
}

/* Signatures/cachets conservés */
.gav-pv-signature-zone {
  margin-top: 42px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  font-family: Arial, sans-serif;
}

.gav-pv-signature-zone .signature-box {
  min-height: 190px;
  border: none;
  border-top: 2px solid #1f2933;
  background: transparent;
  padding: 10px;
  text-align: center;
}

.gav-pv-signature-zone .signature-box span {
  font-size: 11px;
  color: #1f2933;
}

.gav-pv-signature-zone .opj-stamp-img,
.gav-pv-signature-zone .authority-stamp-img {
  width: 170px;
  max-width: 92%;
  margin-top: 14px;
}

/* Footer */
.official-sheet-gav-pv .official-footer-note {
  border-top: 1px solid #d1d5db;
  margin-top: 28px;
  padding-top: 10px;
  text-align: center;
  font-family: Arial, sans-serif;
  font-size: 10px;
  color: #6b7280;
}

/* Impression */
@media print {
  .official-sheet-gav-pv {
    max-width: none;
    border: none;
    box-shadow: none;
    grid-template-columns: 250px 1fr;
  }

  .gav-pv-sidebar {
    min-height: auto;
    border-right: 2px solid #000000;
  }

  .gav-pv-main {
    padding: 22px 24px;
  }

  .gav-pv-main-header h1 {
    font-size: 40px;
  }

  .gav-pv-content .official-field-line,
  .gav-pv-content .official-section,
  .gav-pv-signature-zone {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}

@media (max-width: 900px) {
  .official-sheet-gav-pv {
    grid-template-columns: 1fr;
  }

  .gav-pv-sidebar {
    min-height: auto;
    border-right: none;
    border-bottom: 3px solid #1f2933;
  }

  .gav-pv-main-header h1 {
    font-size: 34px;
  }

  .gav-pv-content .official-field-line {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .gav-pv-signature-zone {
    grid-template-columns: 1fr;
  }
}


/* =========================================================
   V10.22.1 - Ajustement sobre du design GAV
   Corrige le côté trop chargé / bizarre du style ancien
========================================================= */

.official-sheet-gav-pv {
  max-width: 980px;
  grid-template-columns: 225px 1fr;
  border: 1px solid #c7ced8;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.10);
  font-family: Arial, Helvetica, sans-serif;
}

/* Colonne gauche plus discrète et moins vide */
.gav-pv-sidebar {
  min-height: auto;
  border-right: 2px solid #26384f;
  padding: 24px 16px;
  gap: 22px;
  background: #fbfcfe;
}

.gav-pv-republic {
  font-size: 12px;
  gap: 5px;
  letter-spacing: 0.2px;
}

.gav-pv-republic strong {
  font-size: 13px;
}

.gav-pv-republic span,
.gav-pv-republic small {
  font-size: 11px;
}

.gav-pv-number {
  margin-top: 8px;
  gap: 5px;
  font-size: 15px;
  padding: 10px;
  border: 1px solid #d7dee9;
  background: #ffffff;
}

.gav-pv-side-section {
  margin-top: 0;
  padding: 12px 10px;
  border: 1px solid #dbe2ec;
  background: #ffffff;
}

.gav-pv-side-section h4 {
  font-size: 12px;
  margin: 0 0 9px;
  color: #244f8e;
  text-decoration: none;
  letter-spacing: 0.7px;
  text-transform: uppercase;
}

.gav-pv-side-section p {
  font-size: 12px;
  line-height: 1.35;
  font-weight: 600;
  color: #1f2937;
}

.gav-pv-status {
  margin-top: 0;
}

.gav-pv-status p {
  font-size: 11px;
}

/* Partie principale plus moderne et plus lisible */
.gav-pv-main {
  padding: 28px 34px 26px;
}

.gav-pv-main-header h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 36px;
  color: #111827;
  margin-bottom: 22px;
  letter-spacing: 1px;
}

.gav-pv-date-line,
.gav-pv-agent-line {
  font-size: 14px;
  line-height: 1.45;
  color: #111827;
}

.gav-pv-title {
  margin: 18px 0;
  padding: 14px 18px;
  border: 1px solid #d7dee9;
  border-left: 5px solid #244f8e;
  background: #f8fafc;
  text-align: left;
}

.gav-pv-title h2 {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 20px;
  color: #244f8e;
  margin-bottom: 5px;
}

.gav-pv-title p {
  font-size: 13px;
  color: #667085;
}

/* Bloc infos conservé mais moins agressif */
.gav-pv-meta-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 16px;
  border: 1px solid #dbe2ec;
  background: #ffffff;
  padding: 12px 14px;
  margin: 16px 0 24px;
  font-size: 11px;
  color: #344054;
}

/* Corps du document : fini le côté trop vieux / trop lourd */
.gav-pv-content {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  line-height: 1.52;
  color: #111827;
}

.gav-pv-content .official-section {
  margin: 18px 0 22px;
}

.gav-pv-content .official-section-title {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: #244f8e;
  border-bottom: 1px solid #d7dee9;
  padding-bottom: 6px;
  margin-bottom: 10px;
}

.gav-pv-content .official-section-title::before,
.gav-pv-content .official-section-title::after {
  content: "";
}

.gav-pv-content .official-field-line {
  grid-template-columns: 230px 1fr;
  border-bottom: 1px dotted #c4cdd8;
  padding: 6px 0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
}

.gav-pv-content .official-field-label {
  font-weight: 700;
  color: #26384f;
}

.gav-pv-content .official-field-value {
  color: #111827;
}

.gav-pv-content .official-line,
.gav-pv-content .official-bullet-line {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  color: #111827;
}

.gav-pv-content .official-bullet-line {
  margin-left: 10px;
}

/* Signatures/cachets mieux posés */
.gav-pv-signature-zone {
  margin-top: 34px;
  gap: 24px;
}

.gav-pv-signature-zone .signature-box {
  min-height: 165px;
  border-top: 1.5px solid #26384f;
  padding: 9px 8px 12px;
}

.gav-pv-signature-zone .signature-box span {
  font-size: 10.5px;
  font-weight: 600;
  color: #344054;
}

.gav-pv-signature-zone .opj-stamp-img,
.gav-pv-signature-zone .authority-stamp-img {
  width: 145px;
  max-width: 88%;
  margin-top: 10px;
}

.official-sheet-gav-pv .official-footer-note {
  margin-top: 24px;
  font-size: 9.5px;
}

/* Impression propre */
@media print {
  .official-sheet-gav-pv {
    grid-template-columns: 205px 1fr;
    border: none;
    box-shadow: none;
  }

  .gav-pv-sidebar {
    border-right: 1.5px solid #000;
    background: #ffffff;
    padding: 18px 12px;
    gap: 16px;
  }

  .gav-pv-main {
    padding: 18px 24px;
  }

  .gav-pv-main-header h1 {
    font-size: 32px;
  }

  .gav-pv-title,
  .gav-pv-meta-strip,
  .gav-pv-side-section,
  .gav-pv-number {
    background: #ffffff;
  }

  .gav-pv-content .official-field-line {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}


/* =========================================================
   V10.22.2 - Nettoyage visuel du corps GAV
========================================================= */

.gav-pv-content .official-section:first-child {
  margin-top: 4px;
}

.gav-pv-content .official-section-title {
  font-size: 12.5px;
  letter-spacing: 0.45px;
  padding-bottom: 5px;
  margin-bottom: 8px;
}

.gav-pv-content .official-field-line {
  padding: 5px 0;
}

.gav-pv-content .official-line,
.gav-pv-content .official-bullet-line,
.gav-pv-content .official-field-line {
  line-height: 1.42;
}


/* =========================================================
   V10.23 - Rendu final Dépôt de plainte façon procès-verbal
   Uniquement .official-sheet-plainte-pv
========================================================= */

.official-sheet-plainte-pv {
  max-width: 980px;
  padding: 0;
  border: 1px solid #c7ced8;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.10);
  display: grid;
  grid-template-columns: 225px 1fr;
  background: #ffffff;
  color: #111827;
  font-family: Arial, Helvetica, sans-serif;
}

.plainte-pv-sidebar {
  border-right: 2px solid #1f2937;
  padding: 24px 16px;
  background: #fffdf6;
  display: flex;
  flex-direction: column;
  gap: 22px;
  text-align: center;
}

.plainte-pv-republic {
  display: grid;
  gap: 5px;
  font-size: 12px;
  letter-spacing: 0.2px;
  line-height: 1.25;
  text-transform: uppercase;
}

.plainte-pv-republic strong {
  font-size: 13px;
}

.plainte-pv-republic span,
.plainte-pv-republic small {
  font-size: 11px;
  font-weight: 700;
}

.plainte-pv-number {
  display: grid;
  gap: 5px;
  font-size: 15px;
  font-weight: 800;
  padding: 10px;
  border: 1px solid #e5d08a;
  background: #ffffff;
}

.plainte-pv-side-section {
  padding: 12px 10px;
  border: 1px solid #eadba5;
  background: #ffffff;
}

.plainte-pv-side-section h4 {
  font-size: 12px;
  margin: 0 0 9px;
  color: #b88600;
  text-decoration: none;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  font-weight: 800;
}

.plainte-pv-side-section p {
  margin: 0;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 600;
  color: #1f2937;
}

.plainte-pv-status {
  margin-top: auto;
}

.plainte-pv-status p {
  font-size: 11px;
  font-weight: 400;
  margin: 7px 0;
}

.plainte-pv-main {
  padding: 28px 34px 26px;
  min-width: 0;
}

.plainte-pv-main-header {
  margin-bottom: 22px;
}

.plainte-pv-main-header h1 {
  text-align: center;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 38px;
  color: #111827;
  margin: 0 0 6px;
  letter-spacing: 1px;
  font-weight: 900;
}

.plainte-pv-number-line {
  text-align: center;
  font-size: 15px;
  font-weight: 800;
  margin: 0 0 28px;
  color: #1f2937;
}

.plainte-pv-date-line,
.plainte-pv-agent-line {
  font-size: 14px;
  line-height: 1.45;
  color: #111827;
  margin: 8px 0;
}

.plainte-pv-title {
  margin: 18px 0;
  padding: 14px 18px;
  border: 1px solid #eadba5;
  border-left: 5px solid #f2b705;
  background: #fffdf6;
  text-align: left;
}

.plainte-pv-title h2 {
  font-size: 20px;
  color: #8a6500;
  margin: 0 0 5px;
}

.plainte-pv-title p {
  font-size: 13px;
  color: #667085;
  margin: 0;
}

.plainte-pv-meta-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 16px;
  border: 1px solid #e7d89d;
  background: #ffffff;
  padding: 12px 14px;
  margin: 16px 0 24px;
  font-size: 11px;
  color: #344054;
}

.plainte-pv-content {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  line-height: 1.52;
  color: #111827;
}

.plainte-pv-content .official-section {
  margin: 18px 0 22px;
}

.plainte-pv-content .official-section-title {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: #8a6500;
  border-bottom: 1px solid #eadba5;
  padding-bottom: 6px;
  margin-bottom: 10px;
}

.plainte-pv-content .official-section-title::before {
  content: "--- ";
}

.plainte-pv-content .official-section-title::after {
  content: " ---";
}

.plainte-pv-content .official-field-line {
  grid-template-columns: 230px 1fr;
  border-bottom: 1px dotted #c4cdd8;
  padding: 6px 0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
}

.plainte-pv-content .official-field-label {
  font-weight: 700;
  color: #26384f;
}

.plainte-pv-content .official-field-value {
  color: #111827;
}

.plainte-pv-content .official-line,
.plainte-pv-content .official-bullet-line {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  color: #111827;
}

.plainte-pv-signature-zone {
  margin-top: 34px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.plainte-pv-signature-zone .signature-box {
  min-height: 165px;
  border: none;
  border-top: 1.5px solid #1f2937;
  background: transparent;
  padding: 9px 8px 12px;
  text-align: center;
}

.plainte-pv-signature-zone .signature-box span {
  font-size: 10.5px;
  font-weight: 600;
  color: #344054;
}

.plainte-pv-signature-zone .opj-stamp-img,
.plainte-pv-signature-zone .authority-stamp-img {
  width: 145px;
  max-width: 88%;
  margin-top: 10px;
}

.official-sheet-plainte-pv .official-footer-note {
  border-top: 1px solid #d1d5db;
  margin-top: 24px;
  padding-top: 10px;
  text-align: center;
  font-size: 9.5px;
  color: #6b7280;
}

@media print {
  .official-sheet-plainte-pv {
    max-width: none;
    border: none;
    box-shadow: none;
    grid-template-columns: 205px 1fr;
  }

  .plainte-pv-sidebar {
    border-right: 1.5px solid #000;
    background: #ffffff;
    padding: 18px 12px;
    gap: 16px;
  }

  .plainte-pv-main {
    padding: 18px 24px;
  }

  .plainte-pv-main-header h1 {
    font-size: 34px;
  }

  .plainte-pv-title,
  .plainte-pv-meta-strip,
  .plainte-pv-side-section,
  .plainte-pv-number {
    background: #ffffff;
  }

  .plainte-pv-content .official-field-line,
  .plainte-pv-content .official-section,
  .plainte-pv-signature-zone {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}

@media (max-width: 900px) {
  .official-sheet-plainte-pv {
    grid-template-columns: 1fr;
  }

  .plainte-pv-sidebar {
    border-right: none;
    border-bottom: 2px solid #1f2937;
  }

  .plainte-pv-main-header h1 {
    font-size: 32px;
  }

  .plainte-pv-content .official-field-line {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .plainte-pv-signature-zone {
    grid-template-columns: 1fr;
  }
}


/* =========================================================
   V10.25 - Dossiers d'enquête
========================================================= */

.create-document-enquetes {
  background: #7647c7;
  box-shadow: 0 8px 18px rgba(118, 71, 199, 0.24);
}

.document-builder-section h3 {
  display: flex;
  align-items: center;
  gap: 8px;
}

.official-view .official-sheet .official-title-block h2:has(+ p) {
  overflow-wrap: anywhere;
}

/* Petit accent visuel pour les dossiers d'enquête dans le rendu générique */
.pj-doc-card .pj-pill:nth-child(4) {
  white-space: nowrap;
}


/* =========================================================
   V10.26 - Documents liés dans les dossiers d'enquête
========================================================= */

.linked-documents-builder {
  border-color: #ded5f5;
}

.linked-documents-help {
  margin: 0 0 14px;
  color: #6b7280;
  font-size: 13px;
}

.linked-documents-list {
  display: grid;
  gap: 10px;
}

.linked-document-choice {
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid #d8def0;
  background: #ffffff;
  cursor: pointer;
}

.linked-document-choice:hover {
  border-color: #7647c7;
  background: #fbf9ff;
}

.linked-document-choice input {
  margin-top: 2px;
}

.linked-document-choice strong {
  display: block;
  color: #244f8e;
  font-size: 13px;
}

.linked-document-choice small {
  display: block;
  margin-top: 4px;
  color: #6b7280;
  font-size: 11.5px;
}

.linked-documents-empty {
  padding: 14px;
  border: 1px dashed #c8ceda;
  color: #6b7280;
  background: #ffffff;
}

.official-linked-documents {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 2px solid #ded5f5;
}

.official-linked-documents h3 {
  color: #5b36a3;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  margin: 0 0 14px;
}

.official-linked-documents p {
  color: #6b7280;
  margin: 0;
}

.official-linked-documents-grid {
  display: grid;
  gap: 10px;
}

.official-linked-document-card {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid #d8def0;
  background: #fbfaff;
}

.official-linked-document-card strong {
  display: block;
  color: #244f8e;
  font-size: 13px;
}

.official-linked-document-card small {
  display: block;
  margin-top: 4px;
  color: #6b7280;
  font-size: 11.5px;
}

@media (max-width: 700px) {
  .official-linked-document-card {
    grid-template-columns: 1fr;
  }
}

@media print {
  .linked-document-open-btn {
    display: none !important;
  }

  .official-linked-document-card {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}


/* =========================================================
   V10.27 - Rendu final dossier d'enquête IRL
========================================================= */

.investigation-dossier-view {
  --folder-purple: #5b36a3;
  --folder-purple-dark: #341d69;
  --folder-purple-soft: #f4f0ff;
  --folder-border: #d9d2ef;
  --folder-text: #172033;
}

.investigation-folder-sheet {
  max-width: 1080px;
  margin: 0 auto;
  background: #ffffff;
  border: 1px solid #cfd7e6;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.13);
  color: var(--folder-text);
  overflow: hidden;
}

.investigation-folder-cover {
  display: grid;
  grid-template-columns: 190px 1fr;
  min-height: 210px;
  border-bottom: 1px solid var(--folder-border);
}

.investigation-folder-band {
  background: linear-gradient(180deg, var(--folder-purple-dark), var(--folder-purple));
  color: #ffffff;
  padding: 28px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.investigation-folder-band span {
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.investigation-folder-band strong {
  font-size: 18px;
  font-weight: 900;
}

.investigation-folder-title {
  padding: 34px 40px 28px;
  background:
    linear-gradient(135deg, rgba(91, 54, 163, 0.08), rgba(255, 255, 255, 0) 55%),
    #ffffff;
}

.folder-kicker {
  margin: 0 0 10px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--folder-purple);
  font-weight: 900;
}

.investigation-folder-title h1 {
  margin: 0;
  font-size: 38px;
  letter-spacing: 1px;
  color: #121826;
  font-weight: 900;
}

.investigation-folder-title h2 {
  margin: 12px 0 18px;
  color: #244f8e;
  font-size: 22px;
  line-height: 1.25;
}

.folder-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.folder-badges span {
  padding: 7px 11px;
  border-radius: 999px;
  background: var(--folder-purple-soft);
  border: 1px solid var(--folder-border);
  color: var(--folder-purple-dark);
  font-size: 12px;
  font-weight: 800;
}

.investigation-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--folder-border);
  background: #fbfaff;
}

.dossier-info {
  padding: 16px 18px;
  border-right: 1px solid var(--folder-border);
  border-bottom: 1px solid var(--folder-border);
}

.dossier-info span {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.75px;
  color: #667085;
  font-weight: 900;
  margin-bottom: 6px;
}

.dossier-info strong {
  display: block;
  font-size: 14px;
  color: #111827;
  line-height: 1.35;
}

.investigation-object-card {
  margin: 24px 30px 8px;
  padding: 18px 20px;
  border: 1px solid var(--folder-border);
  border-left: 6px solid var(--folder-purple);
  background: #ffffff;
}

.investigation-object-card span {
  display: block;
  color: var(--folder-purple);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  font-weight: 900;
  margin-bottom: 8px;
}

.investigation-object-card p {
  margin: 0;
  color: #111827;
  line-height: 1.55;
}

.investigation-folder-layout {
  display: grid;
  grid-template-columns: 245px 1fr;
  gap: 0;
  padding: 28px 30px 32px;
}

.investigation-folder-sidebar {
  border-right: 1px solid var(--folder-border);
  padding-right: 22px;
}

.investigation-folder-sidebar h3 {
  margin: 0 0 14px;
  color: var(--folder-purple-dark);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.investigation-folder-sidebar ol {
  margin: 0;
  padding-left: 18px;
  color: #344054;
  display: grid;
  gap: 9px;
  font-size: 13px;
  line-height: 1.25;
}

.folder-side-note {
  margin-top: 26px;
  padding: 14px;
  border: 1px solid var(--folder-border);
  background: var(--folder-purple-soft);
  display: grid;
  gap: 5px;
}

.folder-side-note strong {
  color: var(--folder-purple-dark);
  font-size: 12px;
  text-transform: uppercase;
}

.folder-side-note span {
  color: #111827;
  font-size: 13px;
  font-weight: 800;
}

.folder-side-note small {
  color: #667085;
}

.investigation-folder-content {
  padding-left: 28px;
  display: grid;
  gap: 18px;
}

.dossier-investigation-block {
  border: 1px solid #dfe5f0;
  background: #ffffff;
}

.dossier-investigation-block h3 {
  margin: 0;
  padding: 12px 16px;
  background: #f7f4ff;
  border-bottom: 1px solid var(--folder-border);
  color: var(--folder-purple-dark);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 900;
}

.dossier-investigation-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dossier-investigation-field {
  padding: 14px 16px;
  border-right: 1px solid #e5eaf3;
  border-bottom: 1px solid #e5eaf3;
}

.dossier-investigation-field.wide {
  grid-column: 1 / -1;
}

.dossier-investigation-field span {
  display: block;
  color: #344054;
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 8px;
}

.dossier-investigation-field p {
  margin: 0;
  color: #111827;
  line-height: 1.55;
  font-size: 13px;
  white-space: normal;
}

.dossier-empty {
  color: #98a2b3;
  font-style: italic;
}

.dossier-linked-list {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.dossier-linked-piece {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid #ded5f5;
  background: #fbfaff;
}

.piece-rank {
  color: var(--folder-purple);
  font-weight: 900;
  font-size: 12px;
  text-transform: uppercase;
}

.piece-content strong {
  display: block;
  color: #244f8e;
  font-size: 13px;
}

.piece-content small {
  display: block;
  color: #667085;
  font-size: 11.5px;
  margin-top: 4px;
}

.investigation-folder-footer {
  border-top: 1px solid #d9d2ef;
  padding: 12px 30px;
  color: #667085;
  font-size: 10px;
  text-align: center;
}

@media print {
  .investigation-folder-sheet {
    max-width: none;
    border: none;
    box-shadow: none;
  }

  .official-document-toolbar {
    display: none !important;
  }

  .investigation-folder-cover,
  .investigation-summary-grid,
  .investigation-folder-layout {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .dossier-investigation-block,
  .dossier-linked-piece {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .linked-document-open-btn {
    display: none !important;
  }
}

@media (max-width: 920px) {
  .investigation-folder-cover,
  .investigation-folder-layout {
    grid-template-columns: 1fr;
  }

  .investigation-folder-sidebar {
    border-right: none;
    border-bottom: 1px solid var(--folder-border);
    padding-right: 0;
    padding-bottom: 20px;
    margin-bottom: 20px;
  }

  .investigation-folder-content {
    padding-left: 0;
  }

  .investigation-summary-grid,
  .dossier-investigation-fields {
    grid-template-columns: 1fr;
  }

  .dossier-linked-piece {
    grid-template-columns: 1fr;
  }
}


/* =========================================================
   V10.27.1 - Logo dans l'en-tête du dossier d'enquête
========================================================= */

.investigation-folder-logo-panel {
  background: #ffffff;
  border-right: 1px solid #d9d2ef;
  padding: 20px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.investigation-folder-logo-panel img {
  width: 155px;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}

@media print {
  .investigation-folder-logo-panel {
    background: #ffffff;
    border-right: 1px solid #000000;
  }

  .investigation-folder-logo-panel img {
    width: 140px;
  }
}

@media (max-width: 920px) {
  .investigation-folder-logo-panel {
    border-right: none;
    border-bottom: 1px solid #d9d2ef;
  }

  .investigation-folder-logo-panel img {
    width: 180px;
  }
}


/* =========================================================
   V10.27.2 - Recherche documents liés dossier d'enquête
========================================================= */

.linked-documents-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  margin: 0 0 14px;
}

.linked-documents-search input {
  width: 100%;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  padding: 11px 13px;
  font-size: 13px;
  outline: none;
}

.linked-documents-search input:focus {
  border-color: #7647c7;
  box-shadow: 0 0 0 3px rgba(118, 71, 199, 0.12);
}

.linked-documents-search span {
  color: #6b7280;
  font-size: 12px;
  white-space: nowrap;
  padding: 0 4px;
}

.linked-document-choice[hidden] {
  display: none !important;
}

@media (max-width: 700px) {
  .linked-documents-search {
    grid-template-columns: 1fr;
  }

  .linked-documents-search span {
    white-space: normal;
  }
}


/* =========================================================
   V10.28 - Formulaire + design final Rapport de perquisition
========================================================= */

.perquisition-report-view {
  --perq-green: #2f9460;
  --perq-green-dark: #1f6f47;
  --perq-green-soft: #effaf4;
  --perq-border: #cfe8dc;
  --perq-text: #122033;
}

.perquisition-report-sheet {
  max-width: 1040px;
  margin: 0 auto;
  background: #ffffff;
  border: 1px solid #cfd7e6;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.13);
  overflow: hidden;
  color: var(--perq-text);
}

.perquisition-report-header {
  display: grid;
  grid-template-columns: 210px 1fr;
  border-bottom: 1px solid var(--perq-border);
  min-height: 190px;
}

.perquisition-report-logo {
  background: #ffffff;
  border-right: 1px solid var(--perq-border);
  padding: 22px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.perquisition-report-logo img {
  width: 165px;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.perquisition-report-title {
  padding: 30px 38px;
  background:
    linear-gradient(135deg, rgba(47, 148, 96, 0.10), rgba(255,255,255,0) 58%),
    #ffffff;
}

.perquisition-report-title p {
  margin: 0 0 8px;
  color: var(--perq-green-dark);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.perquisition-report-title h1 {
  margin: 0;
  color: #111827;
  font-size: 34px;
  font-weight: 900;
  letter-spacing: 0.8px;
}

.perquisition-report-title h2 {
  margin: 12px 0 18px;
  color: #244f8e;
  font-size: 20px;
  line-height: 1.25;
}

.perquisition-report-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.perquisition-report-badges span {
  padding: 7px 11px;
  border-radius: 999px;
  background: var(--perq-green-soft);
  border: 1px solid var(--perq-border);
  color: var(--perq-green-dark);
  font-size: 12px;
  font-weight: 800;
}

.perquisition-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: #fbfffd;
  border-bottom: 1px solid var(--perq-border);
}

.perquisition-info {
  padding: 15px 18px;
  border-right: 1px solid var(--perq-border);
  border-bottom: 1px solid var(--perq-border);
}

.perquisition-info span {
  display: block;
  color: #667085;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.75px;
  margin-bottom: 6px;
}

.perquisition-info strong {
  display: block;
  color: #111827;
  font-size: 13px;
  line-height: 1.35;
}

.perquisition-object-card {
  margin: 22px 30px 0;
  padding: 16px 18px;
  border: 1px solid var(--perq-border);
  border-left: 6px solid var(--perq-green);
  background: #ffffff;
}

.perquisition-object-card.green {
  background: #fbfffd;
}

.perquisition-object-card span {
  display: block;
  color: var(--perq-green-dark);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  font-weight: 900;
  margin-bottom: 8px;
}

.perquisition-object-card p {
  margin: 0;
  color: #111827;
  line-height: 1.55;
  font-size: 13px;
}

.perquisition-report-content {
  padding: 28px 30px 22px;
  display: grid;
  gap: 18px;
}

.perquisition-report-block {
  border: 1px solid #dfe5f0;
  background: #ffffff;
}

.perquisition-report-block h3 {
  margin: 0;
  padding: 12px 16px;
  background: var(--perq-green-soft);
  border-bottom: 1px solid var(--perq-border);
  color: var(--perq-green-dark);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 900;
}

.perquisition-report-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.perquisition-report-field {
  padding: 14px 16px;
  border-right: 1px solid #e5eaf3;
  border-bottom: 1px solid #e5eaf3;
}

.perquisition-report-field.wide {
  grid-column: 1 / -1;
}

.perquisition-report-field span {
  display: block;
  color: #26384f;
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 8px;
}

.perquisition-report-field p {
  margin: 0;
  color: #111827;
  line-height: 1.55;
  font-size: 13px;
}

.perquisition-empty {
  color: #98a2b3;
  font-style: italic;
}

.perquisition-signature-zone {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin: 8px 30px 28px;
}

.perquisition-signature-box {
  min-height: 165px;
  border-top: 2px solid var(--perq-green-dark);
  text-align: center;
  padding: 10px;
}

.perquisition-signature-box span {
  display: block;
  color: #344054;
  font-size: 11px;
  font-weight: 700;
}

.perquisition-signature-box .opj-stamp-img,
.perquisition-signature-box .authority-stamp-img {
  width: 145px;
  max-width: 86%;
  margin-top: 10px;
}

.perquisition-report-footer {
  border-top: 1px solid #d1d5db;
  padding: 12px 30px;
  color: #667085;
  font-size: 10px;
  text-align: center;
}

@media print {
  .perquisition-report-sheet {
    max-width: none;
    border: none;
    box-shadow: none;
  }

  .perquisition-report-header,
  .perquisition-summary-grid,
  .perquisition-report-block,
  .perquisition-signature-zone {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .perquisition-report-logo img {
    width: 140px;
  }
}

@media (max-width: 900px) {
  .perquisition-report-header,
  .perquisition-summary-grid,
  .perquisition-report-fields,
  .perquisition-signature-zone {
    grid-template-columns: 1fr;
  }

  .perquisition-report-logo {
    border-right: none;
    border-bottom: 1px solid var(--perq-border);
  }
}


/* =========================================================
   V10.29 - Formulaire + design final Procès-verbal d'audition
========================================================= */

.audition-pv-view {
  --audition-blue: #2d78c8;
  --audition-blue-dark: #1d5b9f;
  --audition-blue-soft: #eef6ff;
  --audition-border: #cfe0f5;
  --audition-text: #122033;
}

.audition-pv-sheet {
  max-width: 1040px;
  margin: 0 auto;
  background: #ffffff;
  border: 1px solid #cfd7e6;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.13);
  overflow: hidden;
  color: var(--audition-text);
}

.audition-pv-header {
  display: grid;
  grid-template-columns: 210px 1fr;
  border-bottom: 1px solid var(--audition-border);
  min-height: 190px;
}

.audition-pv-logo {
  background: #ffffff;
  border-right: 1px solid var(--audition-border);
  padding: 22px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.audition-pv-logo img {
  width: 165px;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.audition-pv-title {
  padding: 30px 38px;
  background:
    linear-gradient(135deg, rgba(45, 120, 200, 0.10), rgba(255,255,255,0) 58%),
    #ffffff;
}

.audition-pv-title p {
  margin: 0 0 8px;
  color: var(--audition-blue-dark);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.audition-pv-title h1 {
  margin: 0;
  color: #111827;
  font-size: 34px;
  font-weight: 900;
  letter-spacing: 0.8px;
}

.audition-pv-title h2 {
  margin: 12px 0 18px;
  color: #244f8e;
  font-size: 20px;
  line-height: 1.25;
}

.audition-pv-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.audition-pv-badges span {
  padding: 7px 11px;
  border-radius: 999px;
  background: var(--audition-blue-soft);
  border: 1px solid var(--audition-border);
  color: var(--audition-blue-dark);
  font-size: 12px;
  font-weight: 800;
}

.audition-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: #f8fbff;
  border-bottom: 1px solid var(--audition-border);
}

.audition-info {
  padding: 15px 18px;
  border-right: 1px solid var(--audition-border);
  border-bottom: 1px solid var(--audition-border);
}

.audition-info span {
  display: block;
  color: #667085;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.75px;
  margin-bottom: 6px;
}

.audition-info strong {
  display: block;
  color: #111827;
  font-size: 13px;
  line-height: 1.35;
}

.audition-person-card,
.audition-object-card {
  margin: 22px 30px 0;
  padding: 16px 18px;
  border: 1px solid var(--audition-border);
  border-left: 6px solid var(--audition-blue);
  background: #ffffff;
}

.audition-object-card {
  background: #f8fbff;
}

.audition-person-card span,
.audition-object-card span {
  display: block;
  color: var(--audition-blue-dark);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  font-weight: 900;
  margin-bottom: 8px;
}

.audition-person-card p,
.audition-object-card p {
  margin: 0;
  color: #111827;
  line-height: 1.55;
  font-size: 13px;
}

.audition-pv-content {
  padding: 28px 30px 22px;
  display: grid;
  gap: 18px;
}

.audition-pv-block {
  border: 1px solid #dfe5f0;
  background: #ffffff;
}

.audition-pv-block h3 {
  margin: 0;
  padding: 12px 16px;
  background: var(--audition-blue-soft);
  border-bottom: 1px solid var(--audition-border);
  color: var(--audition-blue-dark);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 900;
}

.audition-pv-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.audition-pv-field {
  padding: 14px 16px;
  border-right: 1px solid #e5eaf3;
  border-bottom: 1px solid #e5eaf3;
}

.audition-pv-field.wide {
  grid-column: 1 / -1;
}

.audition-pv-field span {
  display: block;
  color: #26384f;
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 8px;
}

.audition-pv-field p {
  margin: 0;
  color: #111827;
  line-height: 1.55;
  font-size: 13px;
}

.audition-empty {
  color: #98a2b3;
  font-style: italic;
}

.audition-signature-zone {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin: 8px 30px 28px;
}

.audition-signature-box {
  min-height: 165px;
  border-top: 2px solid var(--audition-blue-dark);
  text-align: center;
  padding: 10px;
}

.audition-signature-box span {
  display: block;
  color: #344054;
  font-size: 11px;
  font-weight: 700;
}

.audition-signature-box .opj-stamp-img,
.audition-signature-box .authority-stamp-img {
  width: 145px;
  max-width: 86%;
  margin-top: 10px;
}

.audition-pv-footer {
  border-top: 1px solid #d1d5db;
  padding: 12px 30px;
  color: #667085;
  font-size: 10px;
  text-align: center;
}

@media print {
  .audition-pv-sheet {
    max-width: none;
    border: none;
    box-shadow: none;
  }

  .audition-pv-header,
  .audition-summary-grid,
  .audition-pv-block,
  .audition-signature-zone {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .audition-pv-logo img {
    width: 140px;
  }
}

@media (max-width: 900px) {
  .audition-pv-header,
  .audition-summary-grid,
  .audition-pv-fields,
  .audition-signature-zone {
    grid-template-columns: 1fr;
  }

  .audition-pv-logo {
    border-right: none;
    border-bottom: 1px solid var(--audition-border);
  }
}


/* =========================================================
   V10.30 - Espace rédaction de compte rendu
========================================================= */

.cr-space,
.cr-form-layout,
.cr-viewer {
  display: grid;
  gap: 18px;
}

.cr-toolbar,
.cr-form-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  background: #ffffff;
  border: 1px solid #dbe2ec;
  padding: 18px;
}

.cr-toolbar h2,
.cr-form-header h2 {
  margin: 0 0 6px;
  color: #244f8e;
}

.cr-toolbar p,
.cr-form-header p {
  margin: 0;
  color: #6b7280;
}

.cr-list {
  display: grid;
  gap: 12px;
}

.cr-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  background: #ffffff;
  border: 1px solid #dbe2ec;
  padding: 16px 18px;
}

.cr-card h3 {
  margin: 0 0 8px;
  color: #244f8e;
  font-size: 17px;
}

.cr-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.cr-card-meta span {
  padding: 4px 8px;
  border: 1px solid #d6deeb;
  background: #f8fafc;
  border-radius: 999px;
  color: #667085;
  font-size: 11px;
  font-weight: 700;
}

.cr-card p {
  margin: 0;
  color: #6b7280;
}

.cr-empty {
  background: #ffffff;
  border: 1px dashed #cbd5e1;
  padding: 18px;
  color: #6b7280;
}

.cr-form {
  display: grid;
  gap: 16px;
}

.cr-form-section {
  background: #ffffff;
  border: 1px solid #dbe2ec;
}

.cr-form-section h3 {
  margin: 0;
  padding: 13px 16px;
  background: #f3f6fb;
  border-bottom: 1px solid #dbe2ec;
  color: #244f8e;
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 0.7px;
}

.cr-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 16px;
}

.cr-form-grid label {
  display: grid;
  gap: 6px;
  font-weight: 700;
  color: #26384f;
  font-size: 13px;
}

.cr-form-grid label.wide {
  grid-column: 1 / -1;
}

.cr-form-grid input,
.cr-form-grid textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  padding: 11px 12px;
  font-size: 13px;
  outline: none;
}

.cr-form-grid textarea {
  min-height: 120px;
  resize: vertical;
}

.cr-form-grid input:focus,
.cr-form-grid textarea:focus {
  border-color: #244f8e;
  box-shadow: 0 0 0 3px rgba(36, 79, 142, 0.12);
}

.cr-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.cr-preview {
  margin-top: 12px;
}

.cr-official-sheet {
  max-width: 920px;
  margin: 0 auto;
  background: #ffffff;
  border: 1px solid #cfd7e6;
  box-shadow: 0 14px 38px rgba(15, 23, 42, 0.12);
  overflow: hidden;
}

.cr-official-header {
  display: grid;
  grid-template-columns: 190px 1fr;
  border-bottom: 1px solid #dbe2ec;
  background: #ffffff;
}

.cr-official-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  border-right: 1px solid #dbe2ec;
}

.cr-official-logo img {
  width: 145px;
  max-width: 100%;
  height: auto;
}

.cr-official-header > div:last-child {
  padding: 28px 32px;
  background: linear-gradient(135deg, rgba(36,79,142,.08), rgba(255,255,255,0) 58%);
}

.cr-official-header p {
  margin: 0 0 8px;
  color: #244f8e;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  font-weight: 900;
}

.cr-official-header h2 {
  margin: 0;
  color: #111827;
  font-size: 30px;
  text-transform: uppercase;
}

.cr-official-header h1 {
  margin: 12px 0 0;
  color: #244f8e;
  font-size: 20px;
}

.cr-official-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  background: #fbfcff;
  border-bottom: 1px solid #dbe2ec;
}

.cr-render-field {
  padding: 14px 16px;
  border-right: 1px solid #e5eaf3;
  border-bottom: 1px solid #e5eaf3;
}

.cr-render-field.wide {
  grid-column: 1 / -1;
}

.cr-render-field span {
  display: block;
  color: #667085;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  font-weight: 900;
  margin-bottom: 6px;
}

.cr-render-field p,
.cr-render-field strong {
  margin: 0;
  color: #111827;
  line-height: 1.45;
}

.cr-official-body {
  padding: 26px 30px;
  display: grid;
  gap: 16px;
}

.cr-official-body section {
  border: 1px solid #dfe5f0;
  background: #ffffff;
}

.cr-official-body h3 {
  margin: 0;
  padding: 11px 14px;
  background: #f3f6fb;
  border-bottom: 1px solid #dfe5f0;
  color: #244f8e;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.7px;
}

.cr-official-body p {
  margin: 0;
  padding: 14px;
  color: #111827;
  line-height: 1.55;
}

.cr-signature-zone {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  padding: 0 30px 28px;
}

.cr-signature-zone div {
  border-top: 2px solid #244f8e;
  padding-top: 10px;
  text-align: center;
}

.cr-signature-zone span {
  display: block;
  color: #667085;
  font-size: 11px;
  margin-bottom: 8px;
}

.cr-signature-zone strong {
  color: #111827;
}

.cr-official-sheet footer {
  border-top: 1px solid #dbe2ec;
  padding: 10px 30px;
  text-align: center;
  color: #667085;
  font-size: 10px;
}

@media print {
  .cr-toolbar,
  .cr-form,
  .official-document-toolbar {
    display: none !important;
  }

  .cr-official-sheet {
    max-width: none;
    border: none;
    box-shadow: none;
  }

  .cr-official-body section,
  .cr-signature-zone {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}

@media (max-width: 800px) {
  .cr-toolbar,
  .cr-form-header,
  .cr-card {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .cr-form-grid,
  .cr-official-header,
  .cr-official-meta,
  .cr-signature-zone {
    grid-template-columns: 1fr;
  }

  .cr-render-field.wide,
  .cr-form-grid label.wide {
    grid-column: auto;
  }
}


/* =========================================================
   V10.30.1 - Compte rendu style courrier simplifié
========================================================= */

.cr-form-letter .cr-form-grid textarea#crBody {
  min-height: 260px;
  line-height: 1.55;
}

.cr-letter-sheet {
  width: 794px;
  min-height: 1123px;
  margin: 0 auto;
  background: #ffffff;
  color: #111111;
  border: 1px solid #d6dbe5;
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.12);
  padding: 34px 58px 70px;
  position: relative;
  font-family: Arial, Helvetica, sans-serif;
}

.cr-letter-header {
  display: grid;
  grid-template-columns: 1fr 210px;
  align-items: start;
  margin-bottom: 58px;
}

.cr-letter-ministry {
  display: grid;
  gap: 4px;
  text-transform: uppercase;
  color: #111111;
  font-size: 13px;
  line-height: 1.2;
}

.cr-letter-ministry strong {
  font-size: 14px;
  letter-spacing: 0.3px;
}

.cr-letter-ministry span {
  font-weight: 800;
}

.cr-letter-ministry small {
  margin-top: 4px;
  text-transform: none;
  font-style: italic;
  color: #555;
}

.cr-letter-logo {
  display: flex;
  justify-content: flex-end;
}

.cr-letter-logo img {
  width: 185px;
  height: auto;
  object-fit: contain;
}

.cr-letter-recipient {
  text-align: center;
  margin: 0 0 54px;
  font-style: italic;
}

.cr-letter-recipient p {
  margin: 0;
}

.cr-letter-sender {
  margin-left: 36px;
  margin-bottom: 34px;
}

.cr-letter-sender p {
  margin: 0;
  line-height: 1.35;
}

.cr-letter-object {
  margin-left: 36px;
  margin-bottom: 34px;
}

.cr-letter-object p {
  margin: 0;
}

.cr-letter-object strong {
  text-decoration: underline;
}

.cr-letter-body {
  margin: 0 36px;
  line-height: 1.45;
  font-size: 14px;
}

.cr-letter-body p {
  margin: 0;
  white-space: normal;
}

.cr-letter-signature {
  margin: 32px 36px 0;
  line-height: 1.35;
}

.cr-letter-signature p {
  margin: 0 0 10px;
}

.cr-letter-footer {
  position: absolute;
  left: 58px;
  right: 58px;
  bottom: 28px;
  text-align: center;
  display: grid;
  gap: 2px;
  color: #111111;
  font-size: 9px;
  font-style: italic;
}

@media print {
  .cr-letter-sheet {
    width: auto;
    min-height: auto;
    margin: 0;
    border: none;
    box-shadow: none;
    padding: 26mm 22mm 26mm;
  }

  .cr-letter-footer {
    position: fixed;
    bottom: 12mm;
    left: 22mm;
    right: 22mm;
  }
}

@media (max-width: 850px) {
  .cr-letter-sheet {
    width: 100%;
    min-height: auto;
    padding: 28px 24px 70px;
  }

  .cr-letter-header {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .cr-letter-logo {
    justify-content: flex-start;
  }

  .cr-letter-sender,
  .cr-letter-object,
  .cr-letter-body,
  .cr-letter-signature {
    margin-left: 0;
    margin-right: 0;
  }
}


/* =========================================================
   V10.30.2 - CR sans unité + suppression Officier/Admin
========================================================= */

.cr-card-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.pj-button.danger {
  background: #cf3f3f;
  border-color: #cf3f3f;
  color: #ffffff;
}

.pj-button.danger:hover {
  background: #b83232;
  border-color: #b83232;
}


/* =========================================================
   V10.30.3 - Animations hover catégories
========================================================= */

/* Carte catégorie */
.module-bubble {
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}

.module-bubble:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.12);
}

/* Icônes catégorie */
.gav-icon-circle,
.audition-icon-circle,
.perquisition-icon-circle,
.plainte-icon-circle,
.enquetes-icon-circle {
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    filter 0.22s ease;
}

.module-bubble:hover .gav-icon-circle,
.module-bubble:hover .audition-icon-circle,
.module-bubble:hover .perquisition-icon-circle,
.module-bubble:hover .plainte-icon-circle,
.module-bubble:hover .enquetes-icon-circle {
  transform: translateY(-3px) scale(1.06);
  filter: brightness(1.04);
}

/* Couleurs par catégorie */
.module-bubble[data-page="gav"]:hover .gav-icon-circle {
  box-shadow: 0 15px 32px rgba(210, 53, 53, 0.34);
}

.module-bubble[data-page="audition"]:hover .audition-icon-circle {
  box-shadow: 0 15px 32px rgba(45, 120, 200, 0.34);
}

.module-bubble[data-page="perquisition"]:hover .perquisition-icon-circle {
  box-shadow: 0 15px 32px rgba(47, 148, 96, 0.34);
}

.module-bubble[data-page="plainte"]:hover .plainte-icon-circle {
  box-shadow: 0 15px 32px rgba(242, 183, 5, 0.36);
}

.module-bubble[data-page="enquetes"]:hover .enquetes-icon-circle {
  box-shadow: 0 15px 32px rgba(118, 71, 199, 0.34);
}

/* Petit effet sur le titre */
.module-bubble strong {
  transition: color 0.18s ease, transform 0.18s ease;
}

.module-bubble:hover strong {
  transform: translateX(2px);
}

/* Respect des préférences accessibilité */
@media (prefers-reduced-motion: reduce) {
  .module-bubble,
  .gav-icon-circle,
  .audition-icon-circle,
  .perquisition-icon-circle,
  .plainte-icon-circle,
  .enquetes-icon-circle,
  .module-bubble strong {
    transition: none !important;
  }

  .module-bubble:hover,
  .module-bubble:hover .gav-icon-circle,
  .module-bubble:hover .audition-icon-circle,
  .module-bubble:hover .perquisition-icon-circle,
  .module-bubble:hover .plainte-icon-circle,
  .module-bubble:hover .enquetes-icon-circle,
  .module-bubble:hover strong {
    transform: none !important;
  }
}


/* =========================================================
   V10.30.4 - Menu profil haut droit
========================================================= */

.profile-menu {
  position: relative;
  margin-left: auto;
  height: 72px;
  display: flex;
  align-items: stretch;
}

.profile-menu-toggle {
  border: 0;
  cursor: pointer;
  color: #ffffff;
  font-family: inherit;
  text-align: left;
}

.profile-menu .top-user {
  margin-left: 0;
  min-width: 285px;
  padding-right: 16px;
  transition: background 0.18s ease, box-shadow 0.18s ease;
}

.profile-menu .top-user:hover,
.profile-menu .top-user.open {
  background: #2c6fb4;
  box-shadow: inset 0 -3px 0 rgba(255, 255, 255, 0.22);
}

.profile-top-text {
  flex: 1;
  min-width: 0;
}

.profile-top-text strong,
.profile-top-text span {
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-chevron {
  margin-left: auto;
  font-size: 14px;
  opacity: 0.9;
  transition: transform 0.18s ease;
}

.profile-menu-toggle.open .profile-chevron {
  transform: rotate(180deg);
}

.profile-dropdown {
  position: absolute;
  top: 78px;
  right: 12px;
  width: 390px;
  background: #ffffff;
  color: #1f2937;
  border: 1px solid #d6deeb;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
  z-index: 2500;
  overflow: hidden;
}

.profile-dropdown::before {
  content: "";
  position: absolute;
  top: -8px;
  right: 26px;
  width: 16px;
  height: 16px;
  background: #ffffff;
  border-left: 1px solid #d6deeb;
  border-top: 1px solid #d6deeb;
  transform: rotate(45deg);
}

.profile-card-header {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 18px 18px 14px;
  background: linear-gradient(135deg, rgba(45, 120, 200, 0.12), rgba(255,255,255,0));
  border-bottom: 1px solid #e5eaf3;
}

.profile-card-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #2d78c8;
  color: #ffffff;
  display: grid;
  place-items: center;
  font-weight: 900;
  letter-spacing: 0.5px;
}

.profile-card-header h3 {
  margin: 0 0 4px;
  color: #244f8e;
  font-size: 18px;
}

.profile-card-header p {
  margin: 0;
  color: #667085;
  font-size: 13px;
}

.profile-status-line {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-bottom: 1px solid #e5eaf3;
  background: #fbfcff;
}

.profile-status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #2f8f5b;
  box-shadow: 0 0 0 4px rgba(47, 143, 91, 0.12);
}

.profile-status-line strong {
  color: #2f8f5b;
  font-size: 13px;
}

.profile-status-line em {
  margin-left: auto;
  color: #244f8e;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  background: #eef6ff;
  border: 1px solid #cfe0f5;
  padding: 4px 8px;
}

.profile-info-grid {
  display: grid;
}

.profile-info-row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 12px;
  padding: 11px 18px;
  border-bottom: 1px solid #edf1f7;
}

.profile-info-row span {
  color: #667085;
  font-size: 12px;
  font-weight: 800;
}

.profile-info-row strong {
  color: #111827;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.profile-access-box {
  padding: 14px 18px 18px;
}

.profile-access-box > span {
  display: block;
  color: #667085;
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.profile-access-box div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.profile-access-box strong {
  display: inline-flex;
  padding: 6px 9px;
  border-radius: 999px;
  background: #f3f6fb;
  border: 1px solid #dbe2ec;
  color: #244f8e;
  font-size: 12px;
}

@media (max-width: 900px) {
  .profile-menu .top-user {
    min-width: auto;
  }

  .profile-top-text {
    display: none;
  }

  .profile-dropdown {
    right: 8px;
    width: min(360px, calc(100vw - 20px));
  }
}


/* =========================================================
   V10.30.5 - Demandes grade / OPJ depuis le profil
========================================================= */

.profile-request-entry {
  padding: 0 18px 18px;
}

.profile-request-entry .pj-button {
  width: 100%;
  justify-content: center;
}

.profile-request-status {
  margin: 14px 18px;
  padding: 10px 12px;
  border: 1px solid #f3d38b;
  background: #fff8e8;
}

.profile-request-status span {
  display: block;
  color: #9a6700;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 5px;
}

.profile-request-status strong {
  color: #111827;
  font-size: 12px;
}

.profile-request-panel {
  background: #ffffff;
}

.profile-request-head {
  padding: 18px;
  border-bottom: 1px solid #e5eaf3;
  background: linear-gradient(135deg, rgba(45, 120, 200, 0.10), rgba(255,255,255,0));
}

.profile-request-head h3 {
  margin: 8px 0 5px;
  color: #244f8e;
}

.profile-request-head p {
  margin: 0;
  color: #667085;
  font-size: 13px;
}

.profile-request-back {
  border: 0;
  background: transparent;
  color: #244f8e;
  font-weight: 800;
  cursor: pointer;
  padding: 0;
}

.profile-request-form {
  display: grid;
  gap: 13px;
  padding: 16px 18px 18px;
}

.profile-request-form label {
  display: grid;
  gap: 6px;
  color: #26384f;
  font-size: 13px;
  font-weight: 800;
}

.profile-request-form select,
.profile-request-form textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  padding: 10px 11px;
  font-size: 13px;
  background: #ffffff;
}

.profile-request-form textarea {
  min-height: 105px;
  resize: vertical;
}

.profile-request-note {
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid #dbe2ec;
  color: #667085;
  font-size: 12px;
  line-height: 1.55;
}

.profile-request-note strong {
  color: #111827;
}

.profile-request-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.profile-requests-block {
  border-left: 4px solid #2d78c8;
}

.profile-requests-block .request-table td {
  vertical-align: top;
}

.profile-requests-block .request-table td:nth-child(4) {
  max-width: 280px;
  white-space: normal;
}

@media (max-width: 900px) {
  .profile-request-actions {
    flex-direction: column;
  }

  .profile-request-actions .pj-button {
    width: 100%;
    justify-content: center;
  }
}


/* =========================================================
   V10.30.7 - Sidebar : garder uniquement Déconnexion
========================================================= */

.connected-user {
  padding: 16px 12px;
  border-top: 1px solid rgba(36, 79, 142, 0.12);
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Masque les infos "Personnel connecté", nom, grade/unité */
.connected-user > :not(#logoutBtn),
.connected-user div:not(:has(#logoutBtn)),
.connected-user strong,
.connected-user span,
.connected-user small,
.connected-user p {
  display: none !important;
}

/* Bouton déconnexion rouge pétant */
#logoutBtn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  border: 2px solid #ff1f1f !important;
  background: #ff1f1f !important;
  color: #ffffff !important;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(255, 31, 31, 0.28);
  transition:
    transform 0.16s ease,
    background 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

#logoutBtn:hover {
  background: #d90000 !important;
  border-color: #d90000 !important;
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(217, 0, 0, 0.34);
}

#logoutBtn:active {
  transform: translateY(0);
  box-shadow: 0 8px 18px rgba(217, 0, 0, 0.25);
}


/* =========================================================
   V10.30.8 - Correctif réel sidebar : uniquement Déconnexion
   La zone du site s'appelle .side-user, pas .connected-user
========================================================= */

.side-user {
  padding: 16px 12px !important;
  border-top: 1px solid rgba(36, 79, 142, 0.12);
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
}

/* Masque vraiment les infos du compte en bas à gauche */
.side-user > span,
.side-user > strong,
.side-user > small,
#userName,
#userInfo {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  height: 0 !important;
  max-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

/* Bouton Déconnexion rouge vif */
.side-user #logoutBtn,
#logoutBtn.logout-button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  min-height: 46px !important;
  border: 2px solid #ff1f1f !important;
  background: #ff1f1f !important;
  color: #ffffff !important;
  font-weight: 900 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.6px !important;
  cursor: pointer !important;
  box-shadow: 0 10px 24px rgba(255, 31, 31, 0.30) !important;
}

.side-user #logoutBtn:hover,
#logoutBtn.logout-button:hover {
  background: #d90000 !important;
  border-color: #d90000 !important;
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(217, 0, 0, 0.36) !important;
}


/* =========================================================
   V10.30.9.7 - Sécurité numéro automatique document
========================================================= */

.document-number-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: stretch;
}

.document-number-row .pj-button {
  min-width: 150px;
  white-space: nowrap;
}

.document-number-warning {
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid #f2bd5b;
  background: #fff7e6;
  color: #9a5c00;
  font-size: 13px;
  line-height: 1.45;
}

.document-number-warning button {
  margin-left: 8px;
  border: 1px solid #244f8e;
  background: #244f8e;
  color: #ffffff;
  padding: 5px 8px;
  cursor: pointer;
  font-weight: 700;
}

.document-number-error {
  border-color: #d92d20 !important;
  box-shadow: 0 0 0 3px rgba(217, 45, 32, 0.12) !important;
}

@media (max-width: 780px) {
  .document-number-row {
    grid-template-columns: 1fr;
  }

  .document-number-row .pj-button {
    width: 100%;
  }
}


/* =========================================================
   V10.30.9.8 - Fix tri + badge doublon numéro PV
========================================================= */

.duplicate-number-pill {
  background: #fff0f0 !important;
  border-color: #ffb3b3 !important;
  color: #c62828 !important;
  font-weight: 900 !important;
}


/* =========================================================
   V10.30.9.10 - Plus de brouillons + tri PV propre
========================================================= */

button[data-status="draft"],
button[data-action="draft"],
.draft-button,
.save-draft-button {
  display: none !important;
}


/* =========================================================
   V10.30.9.11 - PV visibles uniquement si certifiés/publiés
========================================================= */

/* Sécurité : plus de validation visible */
button[data-status="draft"],
button[data-status="pending"],
button[data-status="rejected"],
button[data-action="draft"],
button[data-action="pending"],
button[data-action="reject"],
button[data-action="certify"],
.draft-button,
.save-draft-button,
.validate-button,
.certify-button,
.reject-button {
  display: none !important;
}


/* =========================================================
   V10.30.9.12 - Numéro PV personnalisable
========================================================= */

#documentNumber {
  font-weight: 800;
  color: #244f8e;
  background: #ffffff !important;
  cursor: text !important;
}

.document-number-help {
  margin-top: 7px;
  color: #667085;
  font-size: 12px;
  font-style: italic;
}

.document-number-row {
  align-items: center;
}

.document-number-row input {
  min-height: 44px;
}


/* =========================================================
   V10.30.9.13 - Fix édition numéro PV
========================================================= */

#documentNumber.document-number-editable,
#documentNumber {
  pointer-events: auto !important;
  user-select: text !important;
  -webkit-user-select: text !important;
  opacity: 1 !important;
  background: #ffffff !important;
  color: #244f8e !important;
  cursor: text !important;
}

.document-number-row {
  grid-template-columns: 1fr auto auto;
}

#unlockDocumentNumberBtn {
  white-space: nowrap;
}

@media (max-width: 900px) {
  .document-number-row {
    grid-template-columns: 1fr;
  }
}


/* =========================================================
   V10.30.9.14 - Numéro PV libre / réorganisation manuelle
========================================================= */

#documentNumber {
  pointer-events: auto !important;
  user-select: text !important;
  -webkit-user-select: text !important;
  background: #ffffff !important;
  color: #244f8e !important;
  cursor: text !important;
  font-weight: 900 !important;
}

.document-number-warning-state {
  border-color: #f2bd5b !important;
  box-shadow: 0 0 0 3px rgba(242, 189, 91, 0.16) !important;
}

.document-number-warning {
  background: #fff8e8 !important;
  border-color: #f2bd5b !important;
  color: #8a5a00 !important;
}

.document-number-warning button {
  margin-left: 8px;
}


/* =========================================================
   V10.30.9.15 - Reset automatique des numéros PV
========================================================= */

.pj-button.warning {
  background: #f59e0b !important;
  border-color: #f59e0b !important;
  color: #ffffff !important;
  box-shadow: 0 10px 22px rgba(245, 158, 11, 0.25);
}

.pj-button.warning:hover {
  background: #d97706 !important;
  border-color: #d97706 !important;
}


/* =========================================================
   V10.30.9.17 - Champ numéro PV vraiment éditable
========================================================= */

#documentNumber,
#documentNumber.document-number-editable-force {
  pointer-events: auto !important;
  user-select: text !important;
  -webkit-user-select: text !important;
  cursor: text !important;
  opacity: 1 !important;
  background: #ffffff !important;
  color: #143f75 !important;
  font-weight: 900 !important;
}

.document-number-row {
  display: grid !important;
  grid-template-columns: 1fr auto auto !important;
  gap: 10px !important;
  align-items: stretch !important;
}

#unlockDocumentNumberBtn {
  white-space: nowrap !important;
}

@media (max-width: 900px) {
  .document-number-row {
    grid-template-columns: 1fr !important;
  }
}


/* =========================================================
   V10.30.9.18 - Renommer numéro PV depuis la liste
========================================================= */

.rename-pv-number-btn {
  margin-left: 8px;
  border-color: #244f8e !important;
  color: #244f8e !important;
  background: #eef6ff !important;
}

.rename-pv-number-btn:hover {
  background: #dbeafe !important;
}


/* =========================================================
   V10.30.9.20 - Bouton unique Enregistrer / publier
========================================================= */

/* Sécurité visuelle : on cache les anciens boutons d'enregistrement simple */
.save-document-btn:not(.publish-document-btn),
.simple-save-btn,
button[data-action="save"]:not([data-status="certified"]):not([data-status="published"]),
button[data-status="draft"],
button[data-status="pending"] {
  display: none !important;
}


/* =========================================================
   V10.30.9.21 - OPJ publication + tag créateur
========================================================= */

.creator-pill {
  background: #eef6ff !important;
  border-color: #b8d7ff !important;
  color: #244f8e !important;
  font-weight: 900 !important;
}


/* =========================================================
   V10.30.9.22 - Fix publication OPJ
========================================================= */


/* =========================================================
   V10.30.9.23 - Tags PV nettoyés + dates
========================================================= */

.date-pill {
  background: #f8fafc !important;
  border-color: #d6deeb !important;
  color: #475467 !important;
  font-weight: 800 !important;
}

.creator-pill {
  background: #eef6ff !important;
  border-color: #b8d7ff !important;
  color: #244f8e !important;
  font-weight: 900 !important;
}

.certified-label {
  text-transform: uppercase;
}


/* =========================================================
   V10.30.9.24 - Tags : publié en premier + dates avec heures
========================================================= */

.certified-label {
  order: -10;
  text-transform: uppercase;
  background: #219653 !important;
  color: #ffffff !important;
  border-color: #219653 !important;
  font-weight: 900 !important;
}

.date-pill {
  white-space: nowrap;
}


/* =========================================================
   ESPACE STATISTIQUES
========================================================= */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
  margin: 22px 0;
}

.stats-card {
  border: 1px solid rgba(28, 61, 116, 0.14);
  border-radius: 16px;
  padding: 18px;
  background: #ffffff;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.05);
}

.stats-card span {
  display: block;
  color: #6b7280;
  font-size: 0.92rem;
  margin-bottom: 8px;
}

.stats-card strong {
  display: block;
  color: #1f5fae;
  font-size: 2rem;
  line-height: 1;
}

.stats-section {
  margin-top: 26px;
}

.stats-section h2 {
  margin: 0 0 6px;
  color: #1e293b;
}

.stats-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid rgba(28, 61, 116, 0.14);
  border-radius: 16px;
  margin-top: 16px;
  background: #ffffff;
}

.stats-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 850px;
}

.stats-table th,
.stats-table td {
  padding: 13px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
  font-size: 0.94rem;
}

.stats-table th {
  color: #334155;
  background: rgba(31, 95, 174, 0.08);
  font-weight: 700;
}

.stats-table tr:last-child td {
  border-bottom: none;
}

.stats-loading {
  margin-top: 20px;
  padding: 18px;
  border-radius: 14px;
  background: rgba(31, 95, 174, 0.08);
  color: #1f5fae;
  font-weight: 600;
}


/* =========================================================
   Suppression champ Unité dans les formulaires PJ
========================================================= */

[data-document-field="unit"],
[data-field="unit"],
input[name="unit"],
textarea[name="unit"],
select[name="unit"] {
  display: none !important;
}

label:has([data-document-field="unit"]),
label:has([data-field="unit"]),
label:has(input[name="unit"]),
label:has(textarea[name="unit"]),
label:has(select[name="unit"]) {
  display: none !important;
}


/* =========================================================
   Suppression champ Version dans les formulaires PJ
========================================================= */

[data-document-field="version"],
[data-field="version"],
input[name="version"],
textarea[name="version"],
select[name="version"],
#version {
  display: none !important;
}

label:has([data-document-field="version"]),
label:has([data-field="version"]),
label:has(input[name="version"]),
label:has(textarea[name="version"]),
label:has(select[name="version"]),
.form-group:has([data-document-field="version"]),
.form-group:has([data-field="version"]),
.form-group:has(input[name="version"]),
.form-field:has([data-document-field="version"]),
.form-field:has([data-field="version"]),
.form-field:has(input[name="version"]),
.field:has([data-document-field="version"]),
.field:has([data-field="version"]),
.field:has(input[name="version"]),
.pj-field:has([data-document-field="version"]),
.pj-field:has([data-field="version"]),
.pj-field:has(input[name="version"]) {
  display: none !important;
}


/* =========================================================
   VALIDATION PROCÉDURE PROPRE
========================================================= */

.pending-validation-label {
  background: rgba(245, 158, 11, 0.14) !important;
  color: #b45309 !important;
}

.validation-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.validation-header h2 {
  margin: 0 0 6px;
  color: #1e293b;
}

.validation-list {
  display: grid;
  gap: 14px;
}

.validation-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid rgba(28, 61, 116, 0.14);
  border-radius: 16px;
  padding: 16px 18px;
  background: #ffffff;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.04);
}

.validation-card-main h3 {
  margin: 0 0 8px;
  color: #1f5fae;
  font-size: 1rem;
}

.validation-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #64748b;
  font-size: 0.88rem;
}

.validation-meta span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(31, 95, 174, 0.08);
  padding: 5px 9px;
}

.validation-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  font-weight: 800;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.validation-badge.pending {
  background: rgba(245, 158, 11, 0.14);
  color: #b45309;
}

.validation-card-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

@media (max-width: 900px) {
  .validation-card,
  .validation-header {
    flex-direction: column;
    align-items: stretch;
  }

  .validation-card-actions {
    flex-wrap: wrap;
  }
}
