:root {
  --navy-950: #071b2e;
  --navy-900: #0b2845;
  --navy-800: #123b61;
  --blue-600: #1570b8;
  --blue-500: #1d82d2;
  --blue-100: #dceefe;
  --ink-900: #152334;
  --ink-700: #415065;
  --ink-500: #68758a;
  --line: #dfe5ec;
  --canvas: #f4f7fa;
  --white: #fff;
  --green: #16825d;
  --green-soft: #e4f6ef;
  --orange: #c96b12;
  --orange-soft: #fff1df;
  --red: #c33b3b;
  --red-soft: #fde9e8;
  --purple: #7254ba;
  --purple-soft: #f0ebfc;
  --shadow-sm: 0 1px 2px rgba(12, 31, 51, 0.06), 0 2px 8px rgba(12, 31, 51, 0.04);
  --shadow-lg: 0 22px 55px rgba(6, 28, 49, 0.22);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: var(--ink-900);
  background: var(--canvas);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--canvas); }
button, input, select, textarea { font: inherit; }

/* Composant commun des listes déroulantes utilisées dans les filtres QIM Connect. */
.workspace .qim-select,
.workspace .kpi-filters select,
.workspace .action-plan-filter-grid select,
.workspace .planning-filters select,
.workspace .context-admin-field select {
  min-height: 42px;
  padding: 0 38px 0 12px;
  border: 1px solid #ccd8e1;
  border-radius: 9px;
  outline: 0;
  color: var(--ink-800);
  background-color: #fff;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.2;
  transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}
.workspace .qim-select:hover,
.workspace .kpi-filters select:hover,
.workspace .action-plan-filter-grid select:hover,
.workspace .planning-filters select:hover,
.workspace .context-admin-field select:hover { border-color: #9eb9ca; background-color: #fbfdfe; }
.workspace .qim-select:focus,
.workspace .kpi-filters select:focus,
.workspace .action-plan-filter-grid select:focus,
.workspace .planning-filters select:focus,
.workspace .context-admin-field select:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(40,111,158,.12);
}
button { cursor: pointer; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 264px 1fr; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: 264px; z-index: 30;
  display: flex; flex-direction: column; overflow: hidden;
  background: linear-gradient(180deg, var(--navy-950), var(--navy-900)); color: #dbe7f2;
}
.brand { width: 100%; height: 78px; display: flex; align-items: center; gap: 12px; padding: 0 22px; border: 0; border-bottom: 1px solid rgba(255,255,255,.08); background: transparent; color: inherit; text-align: left; }
.sidebar-close { display: none; position: absolute; top: 17px; right: 12px; z-index: 2; width: 38px; height: 38px; border: 0; border-radius: 8px; color: #fff; background: rgba(255,255,255,.08); font-size: 26px; line-height: 1; }
#main-navigation { flex: 1; min-height: 0; overflow-y: auto; padding: 9px 0 14px; scrollbar-color: rgba(169,197,219,.35) transparent; scrollbar-width: thin; }
.nav-home { margin-top: 2px; }
.brand-button:hover { background: rgba(255,255,255,.035); }
.brand-mark { width: 42px; height: 42px; flex: 0 0 42px; display: grid; place-items: center; }
.brand-mark img { width: 100%; height: 100%; display: block; object-fit: contain; }
.brand > div:last-child { display: flex; flex-direction: column; letter-spacing: .04em; }
.brand strong { color: #fff; font-size: 19px; line-height: 1; }
.brand > div:last-child span { color: #a9c5db; font-size: 10px; letter-spacing: .22em; margin-top: 5px; }
.nav-section { margin-top: 4px; }
.nav-section-title { padding: 0 21px 7px; color: #6f8ca5; font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.nav-section-toggle { width: calc(100% - 20px); min-height: 42px; margin: 0 10px 2px; padding: 0 11px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border: 0; border-radius: 8px; color: #a9bfd0; background: transparent; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; text-align: left; }
.nav-section-toggle:hover, .nav-section-toggle:focus-visible { color: #fff; background: rgba(255,255,255,.05); outline: 2px solid rgba(101,184,243,.45); outline-offset: 1px; }
.nav-section-toggle svg { width: 14px; height: 14px; flex: 0 0 auto; }
.nav-group-label { min-width: 0; display: flex; align-items: center; gap: 10px; }
.nav-group-label > svg { width: 18px; height: 18px; color: #78add2; }
.nav-submenu[hidden] { display: none; }
.nav-submenu:not([hidden]) { animation: nav-submenu-open .16s ease-out; }
@keyframes nav-submenu-open { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
.nav-item { width: calc(100% - 20px); min-height: 42px; margin: 2px 10px; padding: 8px 11px; display: flex; align-items: center; gap: 11px; border: 0; border-radius: 8px; background: transparent; color: #bdd0df; text-align: left; font-size: 13px; }
.nav-item svg { width: 18px; height: 18px; flex: 0 0 auto; opacity: .84; }
.nav-item:hover { background: rgba(255,255,255,.055); color: #fff; }
.nav-item.active { background: linear-gradient(90deg, rgba(29,130,210,.33), rgba(29,130,210,.15)); color: #fff; box-shadow: inset 3px 0 var(--blue-500); }
.nav-item.active svg { color: #65b8f3; opacity: 1; }
.nav-item.is-future { opacity: .65; }
.nav-subitem { min-height: 36px; margin-top: 0; margin-bottom: 0; padding-left: 39px; font-size: 12px; }
.sidebar-footer { margin-top: auto; padding: 18px 20px 20px; border-top: 1px solid rgba(255,255,255,.08); color: #7894aa; font-size: 10px; }
.sidebar-footer p { margin: 8px 0 0; }
.certification-line { color: #a8bdce; }
.certification-line span { display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: #45c496; box-shadow: 0 0 0 3px rgba(69,196,150,.11); }

.workspace { grid-column: 2; min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 20; height: 78px; display: flex; align-items: center; gap: 20px; padding: 0 30px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); backdrop-filter: blur(12px); }
.global-search { width: min(510px, 48vw); height: 42px; display: flex; align-items: center; gap: 9px; padding: 0 12px; border: 1px solid #d8e0e8; border-radius: 9px; background: #f8fafc; color: var(--ink-500); transition: .18s; }
.global-search:focus-within { border-color: #76b7e8; background: #fff; box-shadow: 0 0 0 3px rgba(29,130,210,.1); }
.global-search svg { width: 18px; }
.global-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink-900); font-size: 13px; }
kbd { padding: 3px 6px; border: 1px solid #d8e0e8; border-bottom-width: 2px; border-radius: 4px; color: #8090a3; background: #fff; font: 10px/1.2 "Segoe UI", sans-serif; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 9px; }
.next-leave { min-width: 196px; height: 45px; display: flex; align-items: center; gap: 9px; padding: 6px 11px; border: 1px solid #dce5df; border-radius: 10px; color: var(--ink-700); background: #f8fbf9; text-align: left; }
.next-leave:hover { border-color: #b9cec0; background: #f1f7f3; }
.next-leave-icon { width: 30px; height: 30px; flex: 0 0 30px; display: grid; place-items: center; border-radius: 8px; color: #2f7650; background: #e3f1e8; }
.next-leave-icon svg { width: 17px; height: 17px; }
.next-leave-copy { min-width: 0; display: flex; flex-direction: column; }
.next-leave-copy strong { font-size: 10px; line-height: 1.2; }
.next-leave-copy small { max-width: 145px; margin-top: 2px; overflow: hidden; color: var(--ink-500); font-size: 9px; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.primary-button, .secondary-button, .ghost-button { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border-radius: 8px; padding: 0 15px; font-weight: 650; font-size: 12px; }
.primary-button { border: 1px solid var(--blue-600); color: #fff; background: var(--blue-600); box-shadow: 0 2px 6px rgba(21,112,184,.2); }
.primary-button:hover { background: #115f9e; }
.secondary-button { border: 1px solid #ccd7e2; color: var(--ink-700); background: #fff; }
.secondary-button:hover { background: #f7f9fb; }
.ghost-button { border: 0; color: var(--blue-600); background: transparent; }
.compact { min-height: 37px; padding-inline: 13px; }
.primary-button svg, .secondary-button svg { width: 16px; height: 16px; }
.icon-button { width: 39px; height: 39px; display: grid; place-items: center; border: 1px solid #dce3ea; border-radius: 9px; color: var(--ink-700); background: #fff; }
.icon-button:hover { background: #f7f9fb; }
.icon-button svg { width: 18px; height: 18px; }
.profile-switcher { position: relative; height: 43px; display: flex; align-items: center; gap: 9px; padding-left: 6px; }
.avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: linear-gradient(135deg, var(--navy-800), var(--blue-500)); font-size: 11px; font-weight: 750; }
.profile-copy { display: flex; flex-direction: column; min-width: 110px; }
.profile-copy small { color: var(--ink-500); font-size: 9px; }
.profile-copy strong { margin-top: 1px; color: var(--ink-900); font-size: 11px; max-width: 138px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-switcher select { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }
.logout-button { height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: 7px; color: var(--ink-500); background: #fff; font-size: 9px; font-weight: 750; }
.logout-button:hover { color: var(--navy-800); border-color: #aebdcc; }
.users-toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.users-table td { vertical-align: middle; }
.access-badge { display: inline-flex; padding: 4px 8px; border-radius: 99px; background: var(--blue-100); color: var(--blue-600); font-size: 9px; font-weight: 800; }
.access-badge.disabled { background: #fbeaec; color: #9b2f39; }.access-badge.pending { background: #fff4d8; color: #8a6500; }
.similar-document-warning { margin-top: 18px; padding: 16px; border: 1px solid #e7c66a; border-radius: 10px; background: #fff9e8; color: var(--ink-900); }
.similar-document-warning p { margin: 6px 0 12px; color: var(--ink-500); }
.similar-document-warning > div { display: flex; flex-wrap: wrap; gap: 8px; }
.permission-matrix { display: grid; gap: 7px; max-height: 360px; overflow: auto; padding-right: 5px; }
.permission-row { display: grid; grid-template-columns: minmax(170px,1fr) 150px; align-items: center; gap: 12px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; }
.permission-row label { font-size: 10px; font-weight: 700; }.permission-row select { height: 34px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.mobile-menu { display: none; }

#main-content { min-height: calc(100vh - 78px); padding: 30px; outline: 0; }
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 22px; margin-bottom: 23px; }
.eyebrow { margin: 0 0 7px; color: var(--blue-600); font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.page-header h1 { margin: 0; color: var(--ink-900); font-size: 27px; line-height: 1.15; letter-spacing: -.025em; }
.page-header p { max-width: 700px; margin: 7px 0 0; color: var(--ink-500); font-size: 13px; line-height: 1.5; }
.quality-policy-page { display:grid; grid-template-rows:auto minmax(560px,calc(100vh - 190px)); gap:16px; min-height:calc(100vh - 130px); }
.quality-policy-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.quality-policy-heading h1,.quality-policy-page>h1 { margin:0; color:var(--ink-900); font-size:27px; letter-spacing:-.025em; }
.quality-policy-actions { display:flex; flex-wrap:wrap; gap:8px; }
.quality-policy-preview { width:100%; height:100%; min-height:560px; border:1px solid var(--line); border-radius:12px; background:#edf0f3; box-shadow:var(--shadow-sm); }
.orgchart-page { display:grid; grid-template-rows:auto minmax(560px,calc(100vh - 210px)); gap:16px; min-height:calc(100vh - 130px); }
.orgchart-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:18px; }
.orgchart-heading h1 { margin:0; color:var(--ink-900); font-size:27px; letter-spacing:-.025em; }
.orgchart-heading p:not(.eyebrow) { margin:7px 0 0; color:var(--ink-500); font-size:12px; }
.orgchart-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:8px; }
.orgchart-actions button[title] { min-width:38px; padding:0 10px; font-size:18px; }
.orgchart-viewer { min-height:560px; overflow:hidden; border:1px solid var(--line); border-radius:12px; background:#edf0f3; box-shadow:var(--shadow-sm); }
.orgchart-viewer:fullscreen { width:100vw; height:100vh; border:0; border-radius:0; }
.orgchart-viewer iframe { width:100%; height:100%; min-height:560px; border:0; background:#edf0f3; }
.policy-preview-fallback { display:grid; place-items:center; align-content:center; gap:12px; min-height:420px; padding:32px; border:1px solid var(--line); border-radius:12px; background:#fff; text-align:center; }
.job-description-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:14px; }
.job-description-card { display:flex; min-height:210px; flex-direction:column; align-items:flex-start; gap:10px; padding:20px; border:1px solid var(--job-border); border-top:3px solid var(--job-color); border-radius:12px; background:linear-gradient(155deg,var(--job-bg),#fff 58%); box-shadow:var(--shadow-sm); }
.job-description-card h2 { flex:1; margin:0; color:var(--ink-900); font-size:16px; line-height:1.35; }
.job-description-card small { color:var(--ink-500); font-size:10px; }
.job-description-icon { display:grid; width:42px; height:42px; place-items:center; border-radius:50%; color:var(--job-color); background:var(--job-bg); }
.job-description-icon svg { width:23px; height:23px; }
.job-process-badge { padding:4px 8px; border:1px solid var(--job-border); border-radius:999px; color:var(--job-color); background:#fff; font-size:9px; font-weight:850; letter-spacing:.08em; }
.modal.job-description-modal { display:grid; grid-template-rows:auto minmax(0,1fr) auto; width:min(960px,calc(100vw - 28px)); height:min(88vh,900px); overflow:hidden; }
.job-description-modal .modal-body { padding:0; overflow:hidden; background:#edf0f3; }
.job-description-modal iframe { width:100%; height:100%; border:0; }
.modal.document-detail-modal { display:grid; grid-template-rows:auto minmax(0,1fr) auto; width:min(1040px,calc(100vw - 28px)); height:min(85vh,920px); overflow:hidden; }
.document-detail-modal .modal-header,.document-detail-modal .modal-footer { position:relative; z-index:1; background:#fff; }
.document-detail-modal .modal-body { overflow-y:auto; }
.document-detail-modal .modal-footer { flex-wrap:wrap; }
.document-pdf-section { margin-top:18px; }
.document-pdf-section h3 { margin:0 0 10px; color:var(--ink-900); font-size:14px; }
.document-pdf-section iframe { width:100%; min-height:480px; height:55vh; border:1px solid var(--line); border-radius:10px; background:#edf0f3; }
.document-file-missing { display:grid; justify-items:center; gap:12px; margin-top:18px; padding:28px; border:1px dashed #b8c5d0; border-radius:10px; background:#f8fafc; text-align:center; }
.document-file-missing p { margin:0; color:var(--ink-700); }
.danger-button { display:inline-flex; align-items:center; gap:7px; min-height:36px; padding:0 14px; border:0; border-radius:8px; color:#fff; background:#b43c45; font-weight:750; cursor:pointer; }.danger-button svg { width:16px; height:16px; }
.delete-warning { padding:14px; border:1px solid #efd2d5; border-radius:9px; color:#7d3038; background:#fff7f7; }.delete-warning p { margin:7px 0 0; line-height:1.5; }.delete-warning.strong { border-width:2px; background:#fff1f2; }.confirm-checkbox { display:flex; align-items:flex-start; gap:9px; margin-top:14px; color:#7d3038; font-weight:700; }
.header-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.date-context { color: var(--ink-500); font-size: 12px; }
.date-context strong { display: block; margin-top: 2px; color: var(--ink-900); font-size: 14px; }

/* Bandeau transversal de toutes les pages QIM Connect. */
.page-header.app-page-header {
  min-height: 78px;
  margin: 0 0 14px;
  padding: 11px 15px;
  align-items: center;
  gap: 16px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, #0d3657, #154f76);
  box-shadow: 0 9px 24px #123b6118;
}
.app-page-header-copy {
  min-width: 250px;
  flex: 1 1 390px;
}
.app-page-header .eyebrow {
  margin: 0 0 2px;
  color: #cfe2ef;
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .12em;
  line-height: 1.2;
  text-transform: uppercase;
}
.page-header.app-page-header h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.4rem, 1.9vw, 1.72rem);
  font-weight: 750;
  line-height: 1.12;
  letter-spacing: -.025em;
}
.page-header.app-page-header p:not(.eyebrow) {
  max-width: 680px;
  margin: 3px 0 0;
  color: #d8e7f1;
  font-size: .78rem;
  font-weight: 450;
  line-height: 1.35;
}
.app-page-header-actions {
  display: flex;
  flex: 0 1 auto;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}
.app-page-header-actions > .header-actions {
  display: contents;
}
.app-page-header-actions label,
.app-page-header-field {
  display: grid;
  gap: 2px;
  color: #d8e7f1;
  font-size: .66rem;
  font-weight: 700;
  line-height: 1.2;
}
.app-page-header-actions select,
.app-page-header-actions input[type="search"],
.app-page-header-actions input[type="text"],
.app-page-header-actions input[type="number"],
.app-page-header-field select {
  min-width: 96px;
  height: 34px;
  padding: 6px 9px;
  border: 1px solid #ffffff55;
  border-radius: 8px;
  outline: 0;
  color: #17334d;
  background: #fff;
  font-size: .76rem;
}
.app-page-header .primary-button,
.app-page-header .secondary-button,
.app-page-header .export-button,
.app-page-header .context-primary-action {
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 8px;
  white-space: nowrap;
  font-size: .76rem;
}
.app-page-header .secondary-button,
.app-page-header .export-button {
  border-color: #fff;
  color: #123b61;
  background: #fff;
  box-shadow: none;
}
.app-page-header .context-primary-action {
  border-color: #fff;
  color: #123b61;
  background: #fff;
  box-shadow: none;
}
.app-page-header .secondary-button:hover,
.app-page-header .export-button:hover,
.app-page-header .context-primary-action:hover {
  border-color: #d8e7f1;
  color: #0d3657;
  background: #f5f9fc;
}
.app-page-header .planning-year-nav strong {
  color: #fff;
  font-size: .9rem;
}
.app-page-header .date-context {
  padding: 5px 9px;
  border: 1px solid #ffffff45;
  border-radius: 8px;
  color: #cfe2ef;
  font-size: .66rem;
  line-height: 1.2;
}
.app-page-header .date-context strong {
  margin-top: 2px;
  color: #fff;
  font-size: .82rem;
}
.app-page-header .header-info-chip {
  display: flex;
  min-height: 34px;
  align-items: center;
  gap: 7px;
  padding: 5px 9px;
  border: 1px solid #ffffff45;
  border-radius: 8px;
  color: #fff;
}
.app-page-header .header-info-chip svg {
  width: 16px;
  height: 16px;
}
.app-page-header .header-info-chip small,
.app-page-header .header-info-chip strong {
  display: block;
}
.app-page-header .header-info-chip small {
  color: #cfe2ef;
  font-size: .63rem;
}
.app-page-header .header-info-chip strong {
  font-size: .75rem;
}
.context-header-sync {
  min-width: 245px;
}
.context-header-sync-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #42d684;
  box-shadow: 0 0 0 4px rgba(66, 214, 132, .16);
}
.pilotage-page > .app-page-header,
.swot-page > .app-page-header,
.context-page > .app-page-header,
.ppi-page > .app-page-header,
.change-management-page > .app-page-header,
.apsad-page > .app-page-header,
.quality-policy-page > .app-page-header,
.orgchart-page > .app-page-header {
  margin-bottom: 0;
}
@media (max-width: 1180px) {
  .app-page-header {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
  }
  .app-page-header-actions {
    width: 100%;
    justify-content: flex-start;
  }
}
@media (max-width: 700px) {
  .app-page-header {
    padding: 12px 13px;
  }
  .app-page-header-copy {
    min-width: 0;
  }
  .app-page-header-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
  .app-page-header-actions > .header-actions {
    display: contents;
  }
  .app-page-header-actions button,
  .app-page-header-actions a,
  .app-page-header-actions label,
  .app-page-header-actions select,
  .app-page-header-actions .header-info-chip,
  .app-page-header-actions .date-context {
    width: 100%;
  }
}

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 15px; margin-bottom: 20px; }
.stat-card { position: relative; min-height: 132px; padding: 19px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: var(--shadow-sm); }
.stat-card::after { content: ""; position: absolute; right: -24px; bottom: -32px; width: 95px; height: 95px; border-radius: 50%; background: var(--tint, #eff6fb); }
.stat-top { display: flex; align-items: center; justify-content: space-between; }
.stat-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 9px; color: var(--accent, var(--blue-600)); background: var(--tint, var(--blue-100)); }
.stat-icon svg { width: 18px; height: 18px; }
.trend { color: var(--green); font-size: 10px; font-weight: 700; }
.trend.warning { color: var(--orange); }
.stat-value { position: relative; z-index: 1; margin-top: 14px; font-size: 25px; font-weight: 750; letter-spacing: -.03em; }
.stat-label { position: relative; z-index: 1; margin-top: 2px; color: var(--ink-500); font-size: 11px; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0,1.65fr) minmax(300px,.8fr); gap: 18px; }
.stack { display: grid; gap: 18px; align-content: start; }
.panel { border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: var(--shadow-sm); }
.panel-header { min-height: 61px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 18px; border-bottom: 1px solid #e7ebf0; }
.panel-title h2 { margin: 0; font-size: 14px; }
.panel-title p { margin: 4px 0 0; color: var(--ink-500); font-size: 10px; }
.panel-body { padding: 17px 18px; }
.activity-list { display: grid; }
.activity-item { display: grid; grid-template-columns: 34px 1fr auto; gap: 11px; align-items: start; padding: 12px 0; border-bottom: 1px solid #edf0f3; }
.activity-item:last-child { border-bottom: 0; }
.activity-dot { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; color: var(--blue-600); background: var(--blue-100); }
.activity-dot svg { width: 15px; height: 15px; }
.activity-copy strong { display: block; font-size: 11px; }
.activity-copy span { display: block; margin-top: 3px; color: var(--ink-500); font-size: 10px; line-height: 1.35; }
.activity-time { color: #8b97a7; font-size: 9px; white-space: nowrap; }
.deadline-list { display: grid; gap: 10px; }
.deadline { display: grid; grid-template-columns: 46px 1fr; gap: 11px; align-items: center; padding: 10px; border: 1px solid #e6ebf0; border-radius: 9px; }
.deadline-date { padding: 7px 5px; border-radius: 7px; color: var(--blue-600); background: #eef6fc; text-align: center; }
.deadline-date strong { display: block; font-size: 16px; line-height: 1; }
.deadline-date span { font-size: 8px; font-weight: 700; text-transform: uppercase; }
.deadline-copy strong { display: block; font-size: 10px; }
.deadline-copy span { display: block; margin-top: 3px; color: var(--ink-500); font-size: 9px; }
.progress-line { height: 6px; margin-top: 7px; overflow: hidden; border-radius: 4px; background: #e9eef3; }
.progress-line span { display: block; height: 100%; border-radius: inherit; background: var(--blue-500); }

.toolbar { display: flex; align-items: center; gap: 9px; padding: 14px 16px; border: 1px solid var(--line); border-bottom: 0; border-radius: 12px 12px 0 0; background: #fff; }
.toolbar-search { min-width: 230px; flex: 1; height: 38px; display: flex; align-items: center; gap: 7px; padding: 0 11px; border: 1px solid #dce3ea; border-radius: 8px; background: #fafbfc; color: var(--ink-500); }
.toolbar-search svg { width: 16px; }
.toolbar-search input { width: 100%; border: 0; outline: 0; background: transparent; font-size: 11px; }
.filter-select { height: 38px; min-width: 135px; padding: 0 30px 0 11px; border: 1px solid #dce3ea; border-radius: 8px; color: var(--ink-700); background: #fff; font-size: 11px; }
.document-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 0 0 12px 12px; background: #fff; box-shadow: var(--shadow-sm); }
.document-table { width: 100%; min-width: 910px; border-collapse: collapse; }
.document-table th { height: 42px; padding: 0 13px; border-bottom: 1px solid var(--line); color: #748196; background: #f8fafc; font-size: 9px; letter-spacing: .06em; text-align: left; text-transform: uppercase; }
.document-table td { padding: 13px; border-bottom: 1px solid #edf0f3; color: var(--ink-700); font-size: 10px; vertical-align: middle; }
.document-table tbody tr { transition: .15s; }
.document-table tbody tr:hover { background: #f7fbfe; }
.document-table tbody tr:last-child td { border-bottom: 0; }
.document-name { display: flex; align-items: center; gap: 10px; min-width: 250px; }
.file-icon { width: 32px; height: 36px; display: grid; place-items: center; border-radius: 6px; color: var(--blue-600); background: var(--blue-100); font-size: 8px; font-weight: 800; }
.document-name button { padding: 0; border: 0; color: var(--ink-900); background: transparent; font-size: 11px; font-weight: 650; text-align: left; }
.document-name small { display: block; margin-top: 3px; color: #8491a2; font-size: 9px; }
.code { font-family: "Cascadia Mono", Consolas, monospace; color: var(--blue-600); font-size: 9px; font-weight: 700; }
.status { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 12px; font-size: 9px; font-weight: 700; white-space: nowrap; }
.status::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status.validated,.status.applicable { color: var(--green); background: var(--green-soft); }
.status.review { color: var(--orange); background: var(--orange-soft); }
.status.draft { color: var(--purple); background: var(--purple-soft); }
.status.archived { color: #667385; background: #edf0f3; }
.status.overdue { color: var(--red); background: var(--red-soft); }
.table-actions { display: flex; justify-content: flex-end; gap: 4px; }
.table-action { width: 29px; height: 29px; display: grid; place-items: center; border: 0; border-radius: 6px; color: #657388; background: transparent; }
.table-action:hover { color: var(--blue-600); background: var(--blue-100); }
.table-action.danger { color:#b43c45; }.table-action.danger:hover { color:#fff; background:#b43c45; }
.table-action svg { width: 15px; height: 15px; }
.table-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; color: var(--ink-500); font-size: 10px; }

.empty-state { padding: 52px 20px; text-align: center; }
.empty-icon { width: 52px; height: 52px; display: grid; place-items: center; margin: 0 auto 13px; border-radius: 50%; color: var(--blue-600); background: var(--blue-100); }
.empty-icon svg { width: 23px; }
.empty-state h3 { margin: 0; font-size: 14px; }
.empty-state p { max-width: 430px; margin: 7px auto 0; color: var(--ink-500); font-size: 11px; line-height: 1.5; }

.sync-hero { display: grid; grid-template-columns: 1fr 240px; gap: 22px; align-items: center; padding: 24px; }
.sync-hero h2 { margin: 0 0 7px; font-size: 18px; }
.sync-hero p { margin: 0; color: var(--ink-500); font-size: 12px; line-height: 1.55; }
.sync-visual { position: relative; height: 130px; display: grid; place-items: center; }
.sync-ring { width: 98px; height: 98px; display: grid; place-items: center; border: 10px solid #dfebf4; border-right-color: var(--blue-500); border-radius: 50%; color: var(--blue-600); font-size: 16px; font-weight: 750; transform: rotate(-18deg); }
.sync-ring span { transform: rotate(18deg); }
.sync-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.info-card { padding: 17px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.info-card small { color: var(--ink-500); font-size: 9px; text-transform: uppercase; letter-spacing: .05em; }
.info-card strong { display: block; margin-top: 7px; font-size: 13px; }
.info-card p { margin: 6px 0 0; color: var(--ink-500); font-size: 10px; line-height: 1.45; }

.role-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; }
.role-card { min-height: 190px; padding: 18px; border: 1px solid var(--line); border-radius: 11px; background: #fff; box-shadow: var(--shadow-sm); }
.role-card.active { border-color: #7fbee9; box-shadow: 0 0 0 3px rgba(29,130,210,.08); }
.role-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 9px; color: var(--blue-600); background: var(--blue-100); }
.role-icon svg { width: 18px; }
.role-card h3 { margin: 14px 0 6px; font-size: 13px; }
.role-card p { margin: 0; color: var(--ink-500); font-size: 10px; line-height: 1.5; }
.role-card button { margin-top: 14px; padding: 0; border: 0; color: var(--blue-600); background: transparent; font-size: 10px; font-weight: 700; }

.module-banner { min-height: 360px; display: grid; place-items: center; padding: 42px; border: 1px solid var(--line); border-radius: 12px; background: radial-gradient(circle at 80% 20%, #e5f3fc, transparent 32%), #fff; text-align: center; box-shadow: var(--shadow-sm); }
.module-banner .large-icon { width: 66px; height: 66px; display: grid; place-items: center; margin: 0 auto 18px; border-radius: 18px; color: var(--blue-600); background: var(--blue-100); }
.module-banner svg { width: 30px; }
.module-banner h2 { margin: 0; font-size: 21px; }
.module-banner p { max-width: 540px; margin: 9px auto 0; color: var(--ink-500); font-size: 12px; line-height: 1.6; }
.roadmap-pill { display: inline-block; margin-top: 17px; padding: 7px 10px; border-radius: 14px; color: var(--orange); background: var(--orange-soft); font-size: 9px; font-weight: 750; }

.modal-layer { position: fixed; inset: 0; z-index: 100; pointer-events: none; }
.modal-layer.open { pointer-events: auto; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(5, 22, 38, .48); backdrop-filter: blur(3px); }
.modal { position: absolute; top: 50%; left: 50%; width: min(680px, calc(100vw - 32px)); max-height: calc(100vh - 42px); overflow: auto; transform: translate(-50%,-50%); border-radius: 14px; background: #fff; box-shadow: var(--shadow-lg); }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding: 21px 22px 17px; border-bottom: 1px solid var(--line); }
.modal-header h2 { margin: 0; font-size: 17px; }
.modal-header p { margin: 5px 0 0; color: var(--ink-500); font-size: 10px; }
.modal-body { padding: 21px 22px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 15px 22px; border-top: 1px solid var(--line); background: #f8fafc; }
.close-button { width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 7px; color: var(--ink-500); background: #f2f5f7; font-size: 18px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.field { display: grid; gap: 6px; }
.field.full { grid-column: 1/-1; }
.field label { color: var(--ink-700); font-size: 10px; font-weight: 700; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid #d7e0e8; border-radius: 8px; padding: 10px 11px; outline: 0; color: var(--ink-900); background: #fff; font-size: 11px; }
.field textarea { min-height: 82px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: #72b4e4; box-shadow: 0 0 0 3px rgba(29,130,210,.09); }
.detail-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.detail-cell { padding: 12px; border-radius: 8px; background: #f6f8fa; }
.detail-cell small { color: var(--ink-500); font-size: 8px; text-transform: uppercase; }
.detail-cell strong { display: block; margin-top: 5px; font-size: 11px; }
.version-timeline { margin-top: 19px; }
.version-timeline h3 { margin: 0 0 10px; font-size: 12px; }
.version-row { display: grid; grid-template-columns: 64px 1fr auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid #edf0f3; font-size: 10px; }
.version-row:last-child { border-bottom: 0; }
.version-row span { color: var(--ink-500); }
.toast-stack { position: fixed; right: 22px; bottom: 22px; z-index: 150; display: grid; gap: 8px; }
.toast { min-width: 280px; max-width: 390px; display: flex; align-items: center; gap: 10px; padding: 13px 15px; border: 1px solid #cfe6dc; border-radius: 10px; color: #155f45; background: #f2fbf7; box-shadow: 0 12px 28px rgba(14,44,66,.16); font-size: 11px; animation: toast-in .22s ease-out; }
.toast::before { content: "✓"; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--green); font-weight: 800; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
.mobile-backdrop { display: none; }

/* Page d'accueil */
.home-welcome { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 23px; }
.home-welcome h1 { margin: 0; color: var(--ink-900); font-size: 29px; line-height: 1.1; letter-spacing: -.03em; }
.home-welcome > div:first-child > p:last-child { margin: 7px 0 0; color: var(--ink-500); font-size: 13px; }
.home-welcome-actions { display: flex; align-items: center; gap: 13px; }
.home-welcome-actions time { color: var(--ink-700); font-size: 12px; font-weight: 650; text-align: right; }
.home-top-grid { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(285px, .75fr); gap: 18px; margin-bottom: 18px; }
.home-bottom-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(320px, .8fr); gap: 18px; align-items: start; }
.home-side-stack { display: grid; gap: 18px; }
.home-card { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: #fff; box-shadow: var(--shadow-sm); }
.home-card-label { display: flex; align-items: center; gap: 8px; color: var(--blue-600); font-size: 9px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.home-card-label > span:first-child { white-space: nowrap; }
.headline-card { min-height: 340px; display: grid; grid-template-columns: minmax(0, 1fr) 235px; background: linear-gradient(135deg, #fff 0%, #fff 58%, #eef7fd 100%); }
.headline-content { position: relative; z-index: 2; display: flex; flex-direction: column; justify-content: center; padding: 37px 12px 34px 34px; }
.headline-content h2 { max-width: 580px; margin: 18px 0 13px; color: var(--ink-900); font-size: clamp(23px, 2.4vw, 32px); line-height: 1.15; letter-spacing: -.035em; }
.headline-content > p { max-width: 600px; margin: 0; color: var(--ink-500); font-size: 12px; line-height: 1.65; }
.headline-footer { display: flex; align-items: center; gap: 16px; margin-top: 26px; }
.headline-footer time { color: var(--ink-700); font-size: 10px; font-weight: 700; }
.headline-art { position: relative; min-width: 0; overflow: hidden; background: linear-gradient(145deg, var(--navy-800), var(--blue-600)); }
.headline-art::before, .headline-art::after { content: ""; position: absolute; border-radius: 50%; border: 1px solid rgba(255,255,255,.15); }
.headline-art::before { width: 280px; height: 280px; left: -35px; top: 35px; }
.headline-art::after { width: 190px; height: 190px; left: 10px; top: 80px; }
.headline-art > span { position: absolute; z-index: 2; left: 50%; top: 50%; width: 78px; height: 78px; display: grid; place-items: center; transform: translate(-50%,-50%); border: 1px solid rgba(255,255,255,.3); border-radius: 22px; color: #fff; background: rgba(255,255,255,.12); backdrop-filter: blur(4px); }
.headline-art svg { width: 35px; height: 35px; }
.headline-art i { position: absolute; width: 9px; height: 9px; border-radius: 50%; background: #72c4f4; box-shadow: 0 0 0 6px rgba(114,196,244,.12); }
.headline-art i:nth-of-type(1) { right: 32px; top: 39px; }
.headline-art i:nth-of-type(2) { left: 29px; bottom: 48px; background: #ffb74f; }
.headline-art i:nth-of-type(3) { right: 50px; bottom: 34px; background: #fff; }
.headline-image { min-height: 260px; }
.headline-image img { width: 100%; height: 100%; object-fit: cover; }

.recommendation-card { min-height: 340px; display: flex; flex-direction: column; padding: 25px; border: 0; color: #fff; background: linear-gradient(145deg, #174d35, #2d7652); }
.recommendation-card.is-hygiene { background: linear-gradient(145deg, #1c573f, #398363); }
.recommendation-card.is-securite { background: linear-gradient(145deg, #164833, #286d4d); }
.recommendation-card.is-environnement { background: linear-gradient(145deg, #245337, #49805a); }
.recommendation-card::after { content: ""; position: absolute; width: 210px; height: 210px; right: -105px; bottom: -100px; border-radius: 50%; background: rgba(255,255,255,.07); }
.recommendation-card .home-card-label { color: rgba(255,255,255,.79); }
.recommendation-icon { width: 43px; height: 43px; display: grid; place-items: center; margin-bottom: 17px; border: 1px solid rgba(255,255,255,.25); border-radius: 12px; background: rgba(255,255,255,.12); }
.recommendation-icon svg { width: 21px; }
.recommendation-category { align-self: flex-start; margin-top: 11px; padding: 4px 8px; border: 1px solid rgba(255,255,255,.19); border-radius: 10px; color: rgba(255,255,255,.9); background: rgba(255,255,255,.1); font-size: 8px; font-weight: 750; }
.recommendation-card h2 { margin: 11px 0 8px; font-size: 18px; line-height: 1.25; letter-spacing: -.02em; }
.recommendation-card > p { margin: 0; color: rgba(255,255,255,.88); font-size: 10px; line-height: 1.55; }
.recommendation-illustration { position: relative; z-index: 2; height: 82px; margin-top: 15px; overflow: hidden; border: 1px solid rgba(255,255,255,.18); border-radius: 10px; background: rgba(5,35,24,.18); }
.recommendation-illustration img { width: 100%; height: 100%; display: block; object-fit: cover; }
.recommendation-illustration.is-fallback { display: flex; align-items: center; justify-content: center; gap: 8px; color: rgba(255,255,255,.75); }
.recommendation-illustration.is-fallback svg { width: 24px; }
.recommendation-illustration.is-fallback span { font-size: 10px; font-weight: 800; letter-spacing: .12em; }
.recommendation-card footer { position: relative; z-index: 2; margin-top: auto; padding-top: 15px; color: rgba(255,255,255,.86); font-size: 8px; font-weight: 650; line-height: 1.45; }

.qhse-illustration {
  height: auto;
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.qhse-illustration img {
  display: block;
  width: min(76%, 260px);
  height: auto;
  max-height: 190px;
  object-fit: contain;
  object-position: center;
}

.journal-card {
  padding: 27px 29px 25px;
  border-color: rgba(40, 111, 158, .28);
  background: linear-gradient(180deg, rgba(222, 239, 249, .78) 0%, rgba(241, 248, 252, .88) 24%, rgba(255, 255, 255, .96) 68%);
  box-shadow: 0 8px 24px rgba(18, 59, 97, .07);
}
.journal-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding-bottom: 19px; border-bottom: 1px solid rgba(40, 111, 158, .17); }
.journal-card > header h2 { display: flex; align-items: center; gap: 7px; margin: 9px 0 0; font-size: 21px; letter-spacing: -.025em; }
.journal-mark { display: flex; align-items: flex-end; gap: 5px; color: var(--navy-800); font-size: 17px; font-weight: 850; }
.journal-mark > span { padding-bottom: 2px; color: var(--blue-600); font-size: 7px; letter-spacing: .1em; }
.home-card-label.has-title-icon { gap: 6px; }
.home-title-icon { display: inline-grid; width: 17px; height: 17px; flex: 0 0 17px; place-items: center; color: var(--blue-600); }
.home-title-icon svg { width: 17px; height: 17px; }
.home-title-icon + span { white-space: nowrap; }
.home-title-icon.is-birthday { color: var(--blue-600); }
.journal-season-icon { display: inline-grid; width: 18px; height: 18px; flex: 0 0 18px; place-items: center; color: #d6982e; }
.journal-season-icon svg { width: 18px; height: 18px; }
.journal-season-icon.is-month-2,
.journal-season-icon.is-month-10 { color: #d7784c; }
.journal-season-icon.is-month-3,
.journal-season-icon.is-month-5,
.journal-season-icon.is-month-12 { color: #4e8a64; }
.journal-season-icon.is-month-4,
.journal-season-icon.is-month-9,
.journal-season-icon.is-month-11 { color: #4e7fa2; }
.journal-card h3 { margin: 22px 0 9px; font-size: 16px; }
.journal-intro { margin: 0; color: var(--ink-500); font-size: 11px; line-height: 1.55; }
.journal-card ul { display: grid; gap: 11px; margin: 20px 0; padding: 0; list-style: none; }
.journal-card li { display: grid; grid-template-columns: 22px 1fr; gap: 9px; align-items: start; color: var(--ink-700); font-size: 10px; line-height: 1.45; }
.journal-card li svg { width: 18px; height: 18px; padding: 4px; border-radius: 50%; color: var(--green); background: var(--green-soft); }
.journal-reminder { padding: 14px 16px; border-left: 3px solid var(--blue-500); border-radius: 0 8px 8px 0; background: rgba(218, 236, 247, .72); }
.journal-reminder strong { color: var(--blue-600); font-size: 9px; text-transform: uppercase; letter-spacing: .06em; }
.journal-reminder p { margin: 5px 0 0; color: var(--ink-700); font-size: 10px; line-height: 1.45; }
.journal-card > footer { display: flex; justify-content: flex-end; margin-top: 18px; }
.future-pdf { color: var(--ink-500); font-size: 9px; font-style: italic; }

.birthday-card, .events-card { padding: 20px; }
.events-card { min-height: 0; height: fit-content; align-self: start; }
.birthday-card > header, .events-card > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 13px; }
.demo-label { padding: 4px 6px; border-radius: 5px; color: #827044; background: #fff5d9; font-size: 7px; font-weight: 750; text-transform: uppercase; letter-spacing: .05em; }
.birthday-list { display: grid; gap: 5px; }
.birthday-row { min-height: 52px; display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; padding: 7px 8px; border-radius: 8px; }
.birthday-row.is-today { background: linear-gradient(90deg, var(--orange-soft), #fff9f0); box-shadow: inset 3px 0 #e08a37; }
.birthday-avatar { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; color: var(--blue-600); background: var(--blue-100); font-size: 9px; font-weight: 800; }
.birthday-row strong { display: block; font-size: 10px; }
.birthday-row div span { display: block; margin-top: 3px; color: var(--ink-500); font-size: 8px; }
.birthday-row i { color: var(--orange); }
.birthday-row i svg { width: 17px; }
.birthday-card > footer, .events-card > footer { margin-top: 13px; padding-top: 11px; border-top: 1px solid #edf0f3; color: var(--ink-500); font-size: 8px; line-height: 1.4; }
.home-event-list { display: grid; }
.home-event { display: grid; grid-template-columns: 45px 1fr; gap: 11px; align-items: center; padding: 10px 0; border-bottom: 1px solid #edf0f3; }
.home-event:last-child { border-bottom: 0; }
.home-event > time { min-height: 43px; display: grid; place-content: center; border-radius: 8px; color: var(--blue-600); background: #edf6fc; text-align: center; }
.home-event > time strong { font-size: 14px; line-height: 1; }
.home-event > time span { margin-top: 3px; font-size: 7px; font-weight: 750; text-transform: uppercase; }
.home-event > div > strong { display: block; margin-top: 3px; font-size: 10px; line-height: 1.3; }
.home-event small { display: block; margin-top: 3px; color: var(--ink-500); font-size: 8px; }
.event-type { color: var(--blue-600); font-size: 7px; font-weight: 750; text-transform: uppercase; letter-spacing: .05em; }
.home-empty-inline { min-height: 92px; display: flex; align-items: center; justify-content: center; gap: 9px; color: var(--ink-500); text-align: center; }
.home-empty-inline svg { width: 21px; color: var(--blue-500); }
.home-empty-inline p { max-width: 210px; margin: 0; font-size: 10px; }
.home-empty-card { min-height: 250px; display: flex; align-items: center; justify-content: center; gap: 14px; padding: 25px; color: var(--ink-500); }
.home-empty-card > span { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 12px; color: var(--blue-600); background: var(--blue-100); }
.home-empty-card svg { width: 22px; }
.home-empty-card p { margin: 8px 0 0; font-size: 10px; }
.preview-banner { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin: -8px 0 20px; padding: 11px 14px; border: 1px solid #e7d59e; border-radius: 9px; color: #725b1c; background: #fff8e4; font-size: 10px; font-weight: 650; }
.preview-banner span { display: flex; align-items: center; gap: 8px; }
.preview-banner svg { width: 16px; }
.preview-banner button { border: 0; color: #725b1c; background: transparent; font-size: 9px; font-weight: 750; }
.home-status { display: inline-flex; align-items: center; gap: 4px; padding: 4px 7px; border-radius: 10px; font-size: 7px; font-weight: 800; letter-spacing: 0; text-transform: none; }
.home-status::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.home-status.published { color: var(--green); background: var(--green-soft); }
.home-status.draft { color: var(--purple); background: var(--purple-soft); }
.home-status.scheduled { color: var(--orange); background: var(--orange-soft); }
.home-status.archived { color: #667385; background: #edf0f3; }

/* Administration de l'accueil */
.admin-demo-notice { display: flex; align-items: center; gap: 9px; margin-bottom: 16px; padding: 11px 14px; border: 1px solid #d9e7f1; border-radius: 9px; color: var(--ink-700); background: #f1f7fb; font-size: 10px; }
.admin-demo-notice svg { width: 17px; color: var(--blue-600); }
.home-admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 17px; align-items: start; }
.home-admin-card .panel-body > h3 { margin: 0 0 8px; font-size: 14px; }
.home-admin-card .panel-body > p { margin: 0; color: var(--ink-500); font-size: 10px; line-height: 1.5; }
.admin-list { display: grid; padding-block: 7px; }
.admin-row { min-height: 73px; display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 11px 0; border-bottom: 1px solid #edf0f3; }
.admin-row:last-child { border-bottom: 0; }
.admin-row-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; color: var(--blue-600); font-size: 8px; font-weight: 750; text-transform: uppercase; }
.admin-row > div:first-child > strong { display: block; margin-top: 5px; color: var(--ink-900); font-size: 10px; }
.admin-row > div:first-child > small { display: block; margin-top: 4px; color: var(--ink-500); font-size: 8px; }
.admin-row-actions { display: flex; align-items: center; gap: 2px; }
.active-state { padding: 3px 6px; border-radius: 8px; font-size: 7px; }
.active-state.on { color: var(--green); background: var(--green-soft); }
.active-state.off { color: #657388; background: #edf0f3; }
.admin-actions { display: flex; justify-content: flex-end; margin-top: 15px; }
.audit-summary { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin: 15px 0 0; }
.audit-summary div { padding: 9px; border-radius: 7px; background: #f6f8fa; }
.audit-summary dt { color: var(--ink-500); font-size: 7px; text-transform: uppercase; }
.audit-summary dd { margin: 4px 0 0; color: var(--ink-700); font-size: 8px; line-height: 1.35; }
.field small { color: var(--ink-500); font-size: 8px; line-height: 1.4; }
.toggle-field { min-height: 42px; display: flex; align-items: center; gap: 9px; color: var(--ink-700); font-size: 10px; font-weight: 650; }
.toggle-field input { position: absolute; opacity: 0; }
.toggle-field span { position: relative; width: 34px; height: 19px; border-radius: 10px; background: #cdd6df; transition: .16s; }
.toggle-field span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 13px; height: 13px; border-radius: 50%; background: #fff; transition: .16s; box-shadow: 0 1px 2px rgba(0,0,0,.18); }
.toggle-field input:checked + span { background: var(--green); }
.toggle-field input:checked + span::after { transform: translateX(15px); }
.headline-detail-copy { margin: 0 0 17px; color: var(--ink-700); font-size: 12px; line-height: 1.65; }
.headline-summary { display: -webkit-box; max-width: 600px; margin: 0; overflow: hidden; color: var(--ink-500); font-size: 12px; line-height: 1.65; -webkit-box-orient: vertical; -webkit-line-clamp: 5; }
.headline-rich-content { color: var(--ink-700); font-size: 12px; line-height: 1.7; }
.headline-rich-content h2 { margin: 18px 0 8px; font-size: 19px; }.headline-rich-content h3 { margin: 15px 0 7px; font-size: 15px; }.headline-rich-content p { margin: 0 0 11px; }.headline-rich-content ul,.headline-rich-content ol { padding-left: 24px; }.headline-rich-content a { color: var(--blue-600); text-decoration: underline; }
.rich-text-field { grid-column: 1 / -1; }
.rich-text-editor { overflow: visible; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.rich-toolbar { display: flex; flex-wrap: nowrap; align-items: center; gap: 5px; overflow-x: auto; overflow-y: visible; padding: 8px; border-bottom: 1px solid var(--line); background: #f7f9fb; }
.rich-toolbar button,.rich-toolbar select { flex: 0 0 auto; min-height: 31px; padding: 0 8px; border: 1px solid #d7e0e8; border-radius: 6px; color: var(--ink-700); background: #fff; font-size: 10px; }
.rich-toolbar button:hover,.rich-toolbar button:focus-visible,.rich-toolbar select:focus-visible { border-color: var(--blue-500); outline: 2px solid rgba(40,111,158,.12); }
.rich-palette-control { position: relative; flex: 0 0 auto; }
.rich-palette-trigger { display: inline-flex; align-items: center; gap: 4px; min-width: 39px; justify-content: center; }
.rich-palette-trigger svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.rich-color-letter { position: relative; display: inline-flex; justify-content: center; min-width: 15px; padding-bottom: 4px; font-size: 15px; font-weight: 700; line-height: 16px; }
.rich-color-letter i { position: absolute; right: 0; bottom: 0; left: 0; height: 3px; border-radius: 2px; background: var(--active-color, #182638); }
.rich-palette { position: fixed; z-index: 180; display: grid; grid-template-columns: repeat(4, 27px); gap: 6px; padding: 9px; border: 1px solid #cdd8e2; border-radius: 9px; background: #fff; box-shadow: 0 10px 30px rgba(12,35,55,.18); }
.rich-palette[hidden] { display: none; }
.rich-swatch { position: relative; width: 27px; min-height: 27px !important; padding: 3px !important; border-radius: 5px !important; }
.rich-swatch span { display: block; width: 100%; height: 100%; min-height: 19px; border: 1px solid rgba(15,35,55,.18); border-radius: 3px; background: var(--swatch); }
.rich-swatch.is-none span { background: linear-gradient(135deg, transparent 45%, #b43c45 46%, #b43c45 54%, transparent 55%); }
.rich-swatch.is-active { border-color: var(--blue-500) !important; box-shadow: inset 0 0 0 1px var(--blue-500); }
.rich-swatch.is-active::after { position: absolute; right: 1px; bottom: -1px; content: "✓"; color: var(--blue-700); font-size: 10px; font-weight: 800; }
.rich-editor-area { min-height: 220px; max-height: 430px; overflow: auto; padding: 15px; color: var(--ink-900); font-size: 12px; line-height: 1.65; }
.rich-editor-area:focus { outline: 3px solid rgba(40,111,158,.12); }.rich-editor-area h2 { font-size: 20px; }.rich-editor-area h3 { font-size: 15px; }.rich-editor-area p { margin: 0 0 10px; }
.modal.headline-detail-modal { display: grid; grid-template-rows: auto minmax(0,1fr) auto; width: min(820px, calc(100vw - 32px)); max-height: 85vh; overflow: hidden; }
.headline-detail-modal .modal-header,.headline-detail-modal .modal-footer { position: relative; z-index: 1; background: #fff; }
.headline-detail-modal .modal-body { overflow-y: auto; }
.headline-rich-content { color: var(--ink-800); font-size: 13px; line-height: 1.7; }
.headline-rich-content p { margin: 0 0 13px; }.headline-rich-content h2 { margin: 18px 0 10px; font-size: 21px; }.headline-rich-content h3 { margin: 16px 0 8px; font-size: 16px; }
.headline-rich-content ul,.headline-rich-content ol { margin: 0 0 14px; padding-left: 25px; }.headline-rich-content li { margin: 5px 0; }.headline-rich-content a { color: var(--blue-600); text-decoration: underline; }
@media (max-width: 640px) { .modal.headline-detail-modal { width: calc(100vw - 16px); max-height: 83vh; }.headline-detail-modal .modal-header,.headline-detail-modal .modal-body,.headline-detail-modal .modal-footer { padding-left: 16px; padding-right: 16px; }.rich-toolbar { padding: 6px; }.rich-toolbar button,.rich-toolbar select { min-height: 34px; } }
@media (max-width: 640px) { .quality-policy-heading { align-items:flex-start; flex-direction:column; }.quality-policy-page { grid-template-rows:auto minmax(480px,calc(100vh - 220px)); }.quality-policy-preview { min-height:480px; } }
@media (max-width: 640px) { .orgchart-page { grid-template-rows:auto minmax(460px,calc(100vh - 280px)); }.orgchart-heading { align-items:flex-start; flex-direction:column; }.orgchart-actions { justify-content:flex-start; }.orgchart-viewer,.orgchart-viewer iframe { min-height:460px; } }
@media (max-width: 640px) { .job-description-grid { grid-template-columns:1fr; }.modal.job-description-modal { width:calc(100vw - 12px); height:92vh; }.job-description-card { min-height:145px; } }
@media (max-width: 640px) { .modal.document-detail-modal { width:calc(100vw - 12px); height:92vh; }.document-detail-modal .modal-header,.document-detail-modal .modal-body,.document-detail-modal .modal-footer { padding-left:14px; padding-right:14px; }.document-detail-modal .modal-footer { justify-content:flex-start; }.document-pdf-section iframe { min-height:430px; height:58vh; } }

@media (max-width: 1180px) {
  .stat-grid { grid-template-columns: repeat(2,1fr); }
  .role-grid { grid-template-columns: repeat(2,1fr); }
  .profile-copy { display: none; }
  .profile-switcher { padding-left: 0; }
  .headline-card { grid-template-columns: minmax(0,1fr) 190px; }
}

@media (max-width: 900px) {
  html, body { width: 100%; overflow-x: hidden; }
  .app-shell { display: block; width: 100%; }
  .workspace { width: 100%; min-width: 0; }
  .sidebar { transform: translateX(-100%); transition: transform .22s ease; box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-close { display: grid; place-items: center; }
  .brand { padding-right: 54px; }
  .mobile-backdrop { position: fixed; inset: 0; z-index: 25; background: rgba(5,22,38,.4); }
  .mobile-backdrop.open { display: block; }
  .mobile-menu { display: grid; flex: 0 0 auto; }
  .topbar { width: 100%; padding: 0 18px; }
  .global-search { width: auto; min-width: 0; flex: 1; }
  .global-search kbd { display: none; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .sync-grid { grid-template-columns: 1fr; }
  #main-content, .home-top-grid, .home-bottom-grid, .home-admin-grid, .home-side-stack, .home-card { width: 100%; min-width: 0; }
  .home-top-grid, .home-bottom-grid, .home-admin-grid { grid-template-columns: minmax(0, 1fr); }
  .home-side-stack { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 650px) {
  #main-content { padding: 20px 15px 28px; }
  .topbar { height: 66px; gap: 9px; }
  .topbar-actions { gap: 6px; }
  .next-leave { width: 142px; min-width: 142px; height: 42px; padding: 5px 7px; }
  .next-leave-icon { width: 28px; height: 28px; flex-basis: 28px; }
  .next-leave-copy strong { font-size: 9px; }
  .next-leave-copy small { max-width: 92px; font-size: 8px; }
  .global-search input::placeholder { color: transparent; }
  .page-header { align-items: flex-start; flex-direction: column; }
  .page-header h1 { font-size: 23px; }
  .header-actions { width: 100%; }
  .header-actions button { flex: 1; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-card { min-height: 116px; padding: 14px; }
  .toolbar { flex-wrap: wrap; }
  .toolbar-search { flex-basis: 100%; }
  .filter-select { flex: 1; min-width: 0; }
  .sync-hero { grid-template-columns: 1fr; }
  .sync-visual { display: none; }
  .role-grid { grid-template-columns: 1fr; }
  .form-grid, .detail-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .modal { max-height: calc(100vh - 20px); }
  .home-welcome { align-items: flex-start; flex-direction: column; gap: 13px; }
  .home-welcome h1 { font-size: 24px; }
  .home-welcome-actions { width: 100%; align-items: stretch; flex-direction: column; }
  .home-welcome-actions time { text-align: left; }
  .home-welcome-actions button { width: 100%; }
  .home-side-stack { grid-template-columns: 1fr; }
  .headline-card { min-height: 0; grid-template-columns: 1fr; }
  .headline-content { padding: 26px 23px 25px; }
  .headline-content h2 { font-size: 23px; }
  .headline-art { min-height: 150px; grid-row: 1; }
  .headline-art::before { top: -48px; left: 35px; }
  .headline-art::after { top: -5px; left: 80px; }
  .headline-art > span { width: 62px; height: 62px; }
  .headline-image { min-height: 190px; grid-row: 1; }
  .headline-footer { align-items: flex-start; flex-direction: column; }
  .headline-footer .primary-button { width: 100%; }
  .recommendation-card { min-height: 330px; padding: 22px; }
  .recommendation-illustration { height: 76px; }
  .journal-card { padding: 23px 20px; }
  .journal-card > header { align-items: flex-start; flex-direction: column; }
  .audit-summary { grid-template-columns: 1fr; }
  .admin-row { align-items: flex-start; grid-template-columns: 1fr; }
  .admin-row-actions { justify-content: flex-end; }
  .preview-banner { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 430px) {
  .topbar { padding-inline: 12px; gap: 7px; }
  .topbar-actions { gap: 5px; }
  .next-leave { width: 118px; min-width: 118px; }
  .next-leave-copy strong { font-size: 8px; }
  .next-leave-copy small { max-width: 72px; }
}

@media (max-width: 768px) {
  .qhse-illustration {
    height: auto;
    min-height: 145px;
  }

  .qhse-illustration img {
    width: min(72%, 210px);
    max-height: 150px;
  }
}

/* Harmonisation compacte QIM Connect — juillet 2026 */
:root {
  --qim-section-gap: 22px;
  --qim-card-padding: 18px;
  --qim-small-card-padding: 14px;
  --qim-control-height: 40px;
  --qim-card-radius: 12px;
}

.app-shell { grid-template-columns: 228px minmax(0, 1fr); }
.sidebar { width: 228px; }
.brand { height: 68px; gap: 10px; padding: 0 16px; }
.brand-mark { width: 36px; height: 36px; flex-basis: 36px; }
.brand strong { font-size: 17px; }
.nav-section { margin-top: 2px; }
.nav-section-toggle { width: calc(100% - 14px); min-height: 42px; margin: 0 7px 1px; padding: 0 9px; font-size: 11px; }
.nav-group-label { gap: 8px; }
.nav-group-label > svg { width: 16px; height: 16px; }
.nav-item { width: calc(100% - 14px); min-height: 38px; margin: 1px 7px; padding: 7px 9px; gap: 9px; font-size: 13px; line-height: 1.2; }
.nav-item svg { width: 16px; height: 16px; }
.nav-subitem { min-height: 36px; padding: 7px 9px 7px 32px; font-size: 13px; white-space: normal; }
.sidebar-footer { padding: 12px 14px 14px; }

.topbar { height: 68px; gap: 16px; padding: 0 22px; }
.global-search { height: 40px; }
#main-content { min-height: calc(100vh - 68px); padding: 22px; }
.page-header { gap: 20px; margin-bottom: 20px; }
.page-header h1 { font-size: clamp(26px, 2.25vw, 32px); }
.page-header p { font-size: 14px; }
.panel, .content-card, .home-card { border-radius: var(--qim-card-radius); }
.primary-button, .secondary-button, .ghost-button { min-height: var(--qim-control-height); padding-inline: 14px; font-size: 13px; }
.compact { min-height: 36px; }
.filter-select { height: var(--qim-control-height); font-size: 12px; }

.home-top-grid { grid-template-columns: minmax(0, 1.62fr) minmax(280px, .72fr); gap: 16px; margin-bottom: 16px; align-items: start; }
.home-bottom-grid { gap: 16px; }
.headline-card { min-height: 0; grid-template-columns: minmax(0, 1.3fr) minmax(285px, 1fr); align-self: start; }
.headline-image { min-height: 0; display: flex; align-items: center; justify-content: center; padding: 0; background: #eef5f9; }
.headline-image img { width: 100%; height: auto; max-height: 300px; display: block; object-fit: contain; object-position: center; }
.headline-art { min-height: 250px; }
.headline-content { padding: 22px 22px 20px; }
.headline-content h2 { margin: 12px 0 9px; font-size: clamp(19px, 1.7vw, 24px); }
.headline-summary { font-size: 13px; line-height: 1.52; -webkit-line-clamp: 6; }
.headline-footer { gap: 12px; margin-top: 16px; }
.headline-footer time { font-size: 11px; }
.recommendation-card { min-height: 270px; padding: 20px; }
.recommendation-icon { width: 36px; height: 36px; margin-bottom: 10px; }
.recommendation-card h2 { margin: 8px 0 6px; font-size: 17px; }
.recommendation-card > p { font-size: 11px; line-height: 1.45; }
.recommendation-illustration { height: 68px; margin-top: 10px; }
.recommendation-card footer { padding-top: 10px; font-size: 9px; }

.shared-source-label { padding: 4px 7px; border: 1px solid #cae1f0; border-radius: 10px; color: var(--blue-600); background: #eef7fc; font-size: 8px; font-weight: 800; }
.home-event { width: 100%; color: inherit; background: transparent; text-align: left; cursor: pointer; border: 0; border-bottom: 1px solid #edf0f3; }
.home-event:hover, .home-event:focus-visible { background: color-mix(in srgb, var(--event-bg) 55%, #fff); outline: 0; }
.home-event > time { color: var(--event-color); background: var(--event-bg); box-shadow: inset 0 0 0 1px var(--event-border); }
.home-event-copy { min-width: 0; display: block; }
.home-event-copy > strong { display: block; margin-top: 3px; color: var(--ink-900); font-size: 10px; line-height: 1.3; }
.admin-demo-notice.is-warning { border-color: #f0d7a9; color: #79551c; background: #fff8e9; }
.admin-demo-notice.is-warning svg { color: #ad7419; }

.recommendation-archive-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.recommendation-archive-card { min-width: 0; display: grid; grid-template-columns: 150px minmax(0, 1fr); overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: var(--shadow-sm); }
.recommendation-archive-visual { min-height: 190px; display: grid; place-items: center; padding: 12px; background: linear-gradient(145deg, #edf4f7, #e3edf2); }
.recommendation-archive-visual img { width: 100%; height: 100%; max-height: 190px; display: block; object-fit: contain; }
.recommendation-archive-fallback { display: grid; place-items: center; gap: 8px; color: #47718a; }
.recommendation-archive-fallback svg { width: 34px; height: 34px; }
.recommendation-archive-fallback small { font-weight: 800; letter-spacing: .12em; }
.recommendation-archive-copy { min-width: 0; display: flex; flex-direction: column; padding: 16px; }
.recommendation-archive-copy > div:first-child { display: flex; align-items: center; gap: 8px; }
.recommendation-archive-copy > div:first-child small { color: var(--ink-500); font-size: 12px; font-weight: 700; }
.recommendation-archive-copy h2 { margin: 10px 0; font-size: 17px; line-height: 1.3; }
.recommendation-archive-copy dl { display: grid; gap: 6px; margin: 0; }
.recommendation-archive-copy dl div { display: grid; grid-template-columns: 125px 1fr; gap: 8px; }
.recommendation-archive-copy dt { color: var(--ink-500); font-size: 11px; }
.recommendation-archive-copy dd { margin: 0; color: var(--ink-700); font-size: 12px; }
.recommendation-archive-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 14px; }
.recommendation-archive-modal { width: min(680px, calc(100vw - 28px)); }
.recommendation-archive-detail-image { width: 100%; max-height: 280px; display: block; object-fit: contain; border-radius: 10px; background: #eef4f7; }
.recommendation-archive-detail-text { color: var(--ink-700); font-size: 14px; line-height: 1.6; }
.compact-empty { min-height: 150px; }

@media (max-width: 1180px) {
  .home-top-grid { grid-template-columns: minmax(0, 1.45fr) minmax(260px, .72fr); }
  .headline-card { grid-template-columns: minmax(0, 1.3fr) minmax(260px, 1fr); }
  .recommendation-archive-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .sidebar { width: min(300px, 86vw); }
  #main-content { padding: 20px; }
}

@media (max-width: 650px) {
  #main-content { padding: 16px 12px 24px; }
  .headline-card { grid-template-columns: 1fr; }
  .headline-image, .headline-art { min-height: 170px; grid-row: 1; }
  .headline-image img { max-height: 170px; }
  .recommendation-archive-card { grid-template-columns: 1fr; }
  .recommendation-archive-visual { min-height: 150px; }
  .recommendation-archive-copy dl div { grid-template-columns: 1fr; gap: 2px; }
  .recommendation-archive-actions { flex-direction: column; }
}

/* Accueil : deux colonnes égales et deux rangées parfaitement équilibrées. */
.home-top-grid,
.home-bottom-grid {
  grid-template-columns: minmax(0, 13fr) minmax(320px, 7fr);
  align-items: stretch;
}
.home-top-grid > .home-card,
.headline-card {
  height: 100%;
  align-self: stretch;
}
.headline-image {
  align-self: stretch;
}
.headline-image img {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: contain;
  object-position: center;
}
.home-side-stack {
  height: 100%;
  grid-template-rows: auto auto;
  align-content: stretch;
}
.home-side-stack > .home-card,
.events-card {
  height: auto;
  align-self: stretch;
}
@media (max-width: 1100px) {
  .home-top-grid,
  .home-bottom-grid,
  .home-side-stack {
    grid-template-columns: minmax(0, 1fr);
  }
  .home-side-stack {
    height: auto;
    grid-template-rows: none;
  }
}
@media (max-width: 650px) {
  .headline-image img {
    height: auto;
    max-height: 170px;
  }
}
