/* CataFlow · tableau de bord inspiré de la maquette de comparaison. */
:root {
  --tc-accent: #009bae;
  --tc-accent-hover: #007e91;
  --tc-accent-ink: #00586d;
  --tc-soft: #eaf6f8;
  --tc-chip: #dff3f6;
  --tc-page: #f6fafc;
  --tc-fg: #102443;
  --tc-muted: #587185;
  --tc-line: #dbe7ee;
  --tc-header-h: 72px;
  --tc-header: linear-gradient(110deg, #00b6c4, #008799);
  --dashboard-sidebar: 268px;
}
body {
  background: radial-gradient(ellipse at top right, #eaf1ff, transparent 65%), var(--tc-page);
}
.app-header {
  padding: 0 24px 0 0;
  gap: 24px;
  background: #ffffffed;
  backdrop-filter: blur(16px);
  border-color: var(--tc-line);
}
.app-header .brand {
  flex: 0 0 var(--dashboard-sidebar);
  height: 100%;
  padding: 10px 20px;
  gap: 10px;
  background: #fff;
  color: #00566c;
}
.app-header .brand-logo {
  width: 46px;
  height: 46px;
  flex-basis: 46px;
}
.app-header .brand-name {
  font-size: 27px;
  font-style: italic;
  letter-spacing: -0.8px;
}
.app-header .brand-cata {
  color: #00566c;
}
.app-header .brand-flow {
  color: #ff9c00;
}
.app-header .brand-sub {
  color: #17445e;
  font-size: 11px;
  letter-spacing: 0;
  font-weight: 400;
}
.header-search {
  margin: 0 auto 0 8px;
  flex: 1 1 440px;
  max-width: 640px;
  min-height: 42px;
  background: #f8faff;
  border-color: #c8d7f4;
  color: #172e64;
}
.header-search input {
  font-size: 13px;
}
.header-search kbd {
  flex-shrink: 0;
  padding: 3px 7px;
  border-radius: 5px;
  background: #eaf0fd;
  color: #344a77;
  font:
    11px 'Segoe UI',
    sans-serif;
}
.header-pill {
  background: #eaf6f8;
  color: #00586d;
  padding: 10px 14px;
}
#header-cost {
  background: #e6f8ed;
  color: #0b5b36;
}
.mobile-nav-toggle {
  display: none;
}
.ui-icon {
  display: inline-block;
  flex: 0 0 auto;
  vertical-align: middle;
}
.sidebar {
  background: linear-gradient(145deg, #fff 10%, #f6fafc 85%);
  color: #102443;
  width: var(--dashboard-sidebar);
  padding: 22px 16px 16px;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: #dcecf2 transparent;
  isolation: isolate;
}
.sidebar::before {
  content: '';
  position: absolute;
  z-index: -1;
  pointer-events: none;
  left: 0;
  right: 0;
  bottom: 70px;
  height: 180px;
  background: url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22300%22%20height%3D%22180%22%20viewBox%3D%220%200%20300%20180%22%3E%3Cpath%20d%3D%22M-30%20108C42%2049%2078%2035%20134%2063s102%2019%20196-54v171H-30Z%22%20fill%3D%22%23e1f5fa%22%2F%3E%3Cpath%20d%3D%22M-30%20111C55%2064%2071%20143%20161%20112s90-87%20169-86v154H-30Z%22%20fill%3D%22%23bcebf3%22%20opacity%3D%22.72%22%2F%3E%3Cpath%20d%3D%22M-30%20144C61%20177%20144%20110%20330%2056v124H-30Z%22%20fill%3D%22%23d3eff5%22%20opacity%3D%22.85%22%2F%3E%3C%2Fsvg%3E')
    bottom center / cover no-repeat;
}
.sidebar > * {
  flex-shrink: 0;
}
.side-top {
  position: absolute;
  right: 8px;
  top: 8px;
  padding: 0;
}
.side-top-label {
  display: none;
}
.side-collapse {
  border: 0;
  width: 24px;
  height: 24px;
  color: #7495a5;
  background: transparent;
  opacity: 0.7;
}
.side-section {
  color: #174761;
  font-size: 11px;
  padding: 24px 10px 12px;
  margin-top: 14px;
  border-top: 1px solid #e2edf2;
}
.side-link,
.side-tool {
  min-height: 48px;
  padding: 10px 12px;
  gap: 14px;
  color: #112d4e;
  border-radius: 12px;
  white-space: nowrap;
  font-size: 14px;
}
.side-link .ui-icon,
.side-tool .ui-icon {
  width: 24px;
  height: 24px;
  color: #00627a;
}
.side-link:hover,
.side-tool:hover {
  background: #eaf6f9;
  color: #102443;
}
.side-link.active {
  background: #f0f8fb;
  box-shadow: none;
  color: #00566c;
}
.side-tool.active {
  background: #d5f1f7;
  box-shadow: none;
  color: #102443;
  font-weight: 700;
  border-radius: 12px 12px 0 0;
}
.side-tile,
.side-tile.soft,
.side-tile.orange,
.side-tile.violet {
  background: transparent;
  color: #00627a;
  width: 26px;
  height: 26px;
  flex-basis: 26px;
}
.side-tile svg {
  width: 24px;
  height: 24px;
  stroke-width: 1.8;
}
.side-chev {
  color: #153c54;
  font-size: 22px;
}
.side-sub {
  border-left: 0;
  margin: 0 0 14px;
  padding: 6px 4px 8px 12px;
  background: linear-gradient(#e9f8fb, #eaf4f8);
  border-radius: 0 0 12px 12px;
}
.sidebar .side-sub .op-steps {
  padding: 0;
}
.sidebar .side-sub .op-step button,
.sidebar .side-sub .op-step-row,
.side-sub .tool-foot button {
  color: #143852;
  min-height: 36px;
  font-size: 12px;
  padding: 8px 10px;
  gap: 10px;
}
.sidebar .side-sub .op-step .ui-icon {
  width: 20px;
  height: 20px;
  color: #006c82;
}
.sidebar .side-sub .op-step.current button,
.sidebar .side-sub .op-step.current .op-step-row {
  background: linear-gradient(105deg, #00bac6, #0095a8);
  color: #fff;
  border-radius: 9px;
  box-shadow: 0 2px 3px #00859b15;
}
.sidebar .side-sub .op-step.current .ui-icon {
  color: #fff;
}
.sidebar .side-sub .op-step button:hover,
.side-sub .tool-foot button:hover {
  background: #d9eff4;
  color: #00566c;
}
.sidebar .side-sub .op-step.current button:hover {
  background: #008fa3;
  color: #fff;
}
.sidebar .op-step-dot {
  border-color: #80acba;
}
.side-sub .op-current {
  color: #143852;
}
.side-sub .op-current span,
.side-sub .op-current small,
.tool-step button small {
  color: #5f7f8e;
}
.side-settings {
  margin-top: 8px;
}
.side-profile {
  border-top-color: #dcebf1;
  min-height: 66px;
  padding: 18px 0 0;
  margin-top: auto;
}
.side-profile-text {
  font-size: 12px;
}
.side-profile-text small {
  color: #315d74;
  font-size: 10px;
}
.side-avatar {
  width: 38px;
  height: 38px;
  flex-basis: 38px;
  background: #d4f1f7;
  color: #00566c;
  box-shadow: 0 2px 3px #00566c14;
}
.side-profile .icon-button {
  color: #255872;
  border-color: #cddfe8;
  background: #ffffff9c;
  width: 24px;
  flex-basis: 24px;
}
body:not(.no-sidebar):not(.review-mode) .app {
  margin-left: var(--dashboard-sidebar);
}
body.side-collapsed:not(.no-sidebar):not(.review-mode) .app {
  margin-left: 64px;
}
main {
  padding: 12px 24px 24px;
}
.topbar {
  min-height: 34px;
  padding: 10px 24px 0;
  font-size: 12px;
}
h1,
h2,
h3 {
  color: var(--tc-fg);
}
.panel,
.op-card,
.bento-card {
  border-color: var(--tc-line);
  box-shadow: 0 2px 3px #1f54a006;
}
.primary {
  background: linear-gradient(100deg, #00b5c2, #00889a);
  border-color: #009bae;
  box-shadow: 0 3px 7px #009bae12;
}
.secondary {
  border-color: #d0ddf5;
  color: #172d60;
  background: linear-gradient(#fff, #f4f7ff);
  box-shadow: 0 2px 3px #244e9f0a;
}
button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid #4196ff;
  outline-offset: 3px;
}
button:disabled {
  cursor: default;
}
.processing-badge {
  background: #eef3ff;
  color: #304b80;
  font-variant-numeric: tabular-nums;
}
.processing-summary {
  margin: 0 0 14px;
  border: 1px solid var(--tc-line);
  background: #ffffffb3;
  border-radius: 12px;
  padding: 0 16px;
}
.processing-summary summary {
  display: flex;
  align-items: center;
  gap: 20px;
  justify-content: space-between;
  cursor: pointer;
  min-height: 38px;
  color: #52688d;
  font-size: 12px;
}
.processing-summary summary strong {
  color: #173c76;
  font-variant-numeric: tabular-nums;
}
.processing-summary dl {
  margin: 0 0 14px;
}
.processing-summary dl > div {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 12px;
}
.processing-summary dt {
  overflow-wrap: anywhere;
}
.processing-summary dd {
  margin: 0;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.run-time {
  display: flex;
  justify-content: space-between;
  padding-top: 16px;
  margin-top: 16px;
  border-top: 1px solid var(--tc-line);
  color: var(--tc-muted);
}
.run-time strong {
  color: var(--tc-accent-ink);
  font-variant-numeric: tabular-nums;
}
/* Comparaison : les données et les validations sont celles de l'opération. */
.cmp-r4-head {
  gap: 16px;
  margin-bottom: 16px;
}
.cmp-title {
  display: flex;
  gap: 14px;
  align-items: center;
  flex: 1 1 360px;
  min-width: 0;
}
.cmp-title > div {
  min-width: 0;
}
.cmp-title-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 48px;
  flex: 0 0 44px;
  font-size: 38px;
  line-height: 1;
  color: #009bb2;
}
.cmp-title .eyebrow {
  font-size: 10px;
  letter-spacing: 1.2px;
  color: #5c76a2;
  margin-bottom: 3px;
}
.cmp-title h1 {
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: -0.6px;
  overflow-wrap: anywhere;
}
.cmp-title p {
  color: #415c8a;
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.cmp-kpis {
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.cmp-kpi {
  padding: 9px 14px;
  min-width: 88px;
  border-radius: 15px;
  box-shadow: 0 2px 2px #173b7110;
  background: #f8faff;
}
.cmp-kpi small {
  color: #2e426d;
  font-size: 11px;
}
.cmp-kpi strong {
  font-size: 21px;
  line-height: 1.25;
}
.cmp-kpi.pages {
  background: #fff1f8;
  border-color: #f9cce4;
}
.cmp-kpi.products {
  background: #f5f6ff;
  border-color: #dce0fb;
}
.cmp-kpi.ok {
  background: #effcff;
  border-color: #b8e7f4;
}
.cmp-kpi.ok strong {
  color: #102443;
}
.cmp-kpi.warn {
  background: #fff8ef;
  border-color: #ffdfb5;
}
.cmp-kpi.warn strong {
  color: #102443;
}
.cmp-rate {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: #294772;
}
.cmp-rate-ring {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: conic-gradient(#00a8bb var(--rate), #e2eaff 0);
  position: relative;
}
.cmp-rate-ring::before {
  content: '';
  position: absolute;
  inset: 7px;
  background: var(--tc-page);
  border-radius: 50%;
}
.cmp-rate-ring b {
  position: relative;
  font-size: 14px;
  color: #142c5c;
}
.cmp-strip {
  border-radius: 18px;
  gap: 12px;
  padding: 10px 18px;
  background: #ffffffd9;
  scrollbar-width: thin;
  scrollbar-color: #c4d8fc transparent;
}
.cmp-strip button {
  flex-basis: 82px;
  padding: 6px;
  position: relative;
  border-radius: 12px;
  color: #233960;
}
.cmp-strip img {
  height: 86px;
  border-radius: 4px;
  object-fit: contain;
  background: #f1f5ff;
}
.cmp-strip button.active {
  border-color: #0075ff;
  background: #f0f6ff;
  box-shadow: 0 0 0 2px #009bae12;
}
.cmp-strip button.active span {
  color: #004ae0;
}
.cmp-strip button.active::after {
  content: '✓';
  position: absolute;
  top: 0;
  right: 0;
  width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  background: #009bae;
  border: 2px solid #fff;
  border-radius: 50%;
  color: #fff;
}
.cmp-r4 {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(300px, 0.88fr);
  gap: 12px;
  align-items: stretch;
}
.cmp-r4 > .panel {
  border-radius: 18px;
  background: #ffffffd9;
  overflow: hidden;
}
.cmp-r4 .compare-document {
  padding: 0;
}
.cmp-r4 .compare-document .preview-top {
  padding: 14px;
  border-bottom: 1px solid var(--tc-line);
  background: linear-gradient(110deg, #fff, #f2f6ff);
  gap: 8px;
  flex-wrap: nowrap;
}
.cmp-r4 .compare-document .preview-top h3 {
  flex: 1 1 0;
  min-width: 0;
  margin: 0;
  font-size: 14px;
}
.cmp-r4 .compare-document .preview-top h3 small {
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.cmp-zoom {
  gap: 3px;
}
.cmp-zoom .small-btn,
.cmp-fullscreen {
  border-radius: 50%;
  border: 1px solid #dce5f8;
  background: #fff;
  color: #152c5a;
  box-shadow: 0 2px 3px #1c438513;
  width: 28px;
  height: 28px;
  padding: 0;
}
.cmp-zoom-value {
  min-width: 44px;
  padding: 0;
  color: #142a55;
}
.cmp-r4 .compare-document .controls {
  font-size: 10px;
  gap: 4px;
  margin: 0;
}
.cmp-r4 .compare-document .controls .small-btn {
  width: 24px;
  height: 24px;
  padding: 0;
}
.cmp-r4 .compare-image-scroll {
  margin: 12px;
  padding: 12px;
  background: #edf2fa;
  border-radius: 12px;
}
.cmp-r4 .compare-image-scroll:not(.zoomed) .compare-image {
  width: fit-content !important;
  max-width: 100%;
}
.cmp-r4 .compare-image-scroll:not(.zoomed) .compare-image img {
  width: auto;
  max-width: 100%;
  max-height: clamp(180px, calc(100dvh - 455px), 720px);
  height: auto;
}
.cmp-r4 .compare-image {
  box-shadow: 0 3px 10px #183e7712;
}
.cmp-r4 .compare-document > .note {
  padding: 0 16px;
  font-size: 10px;
  line-height: 1.45;
  margin: 10px 0 14px;
}
.compare-document:fullscreen {
  background: #edf2fa;
  overflow: auto;
  padding: 24px;
}
.compare-document:fullscreen .compare-image {
  max-width: 850px;
}
.cmp-side {
  grid-column: auto;
  top: 84px;
  padding: 14px;
  position: static;
  max-height: none;
  overflow: visible;
  gap: 12px;
}
.cmp-side-head {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cmp-side-head strong {
  font-size: 14px;
  flex: 1;
}
.cmp-side-head small {
  font-size: 12px;
  font-weight: 400;
}
.cmp-page-count {
  font-size: 12px;
  font-weight: 600;
}
.cmp-side #cmp-search {
  font-size: 11px;
  min-height: 34px;
  padding: 7px 12px;
  border-color: var(--tc-line);
  background: #fff;
}
.cmp-side-list {
  min-height: 60px;
  max-height: 166px;
  flex: 0 1 auto;
  gap: 5px;
}
.cmp-row {
  padding: 6px;
  border-color: #e7edf9;
  gap: 7px;
  color: var(--tc-fg);
  border-radius: 10px;
  background: #fff;
}
.cmp-row:hover {
  background: #f2f6ff;
  border-color: #c0d6ff;
}
.cmp-row.active {
  background: #eaf8ed;
  border-color: #c9ebd2;
}
.cmp-row-thumb {
  display: block;
  width: 38px;
  height: 42px;
  flex: 0 0 38px;
  border-radius: 5px;
  background-color: #eef2f8;
  background-repeat: no-repeat;
  border: 1px solid #e1e8f5;
}
.cmp-row-text strong {
  font-size: 11px;
}
.cmp-row-text small {
  font-size: 11px;
}
.cmp-row-page {
  flex-basis: 28px;
  font-size: 10px;
  color: #253f6e;
}
.cmp-row .chip {
  font-size: 10px;
  padding: 4px 7px;
  white-space: nowrap;
}
.chip-fluo {
  background: color-mix(in srgb, var(--fluo) 30%, #fff);
  color: #392344;
}
.cmp-proposal {
  padding: 14px 12px;
  background: linear-gradient(120deg, #fffaf2, #fff3e1);
  border-color: #ffd6a3;
  gap: 10px;
  font-size: 12px;
  line-height: 1.4;
  border-radius: 14px;
}
.cmp-proposal b {
  font-size: 16px;
  color: #883a13;
}
.cmp-proposal div {
  gap: 8px;
  flex-wrap: nowrap;
}
.cmp-proposal div > button {
  flex: 1;
  padding: 9px 7px;
  font-size: 11px;
  border-radius: 999px;
}
#cmp-manual-fluo {
  padding: 9px 10px;
  font-size: 11px;
  border-radius: 999px;
  white-space: normal;
}
.cmp-detail {
  border: 1px solid var(--tc-line);
  border-radius: 12px;
  padding: 12px;
  background: #ffffffb3;
  gap: 9px;
}
.cmp-detail > label {
  color: #284773;
  font-size: 11px;
}
.cmp-detail select {
  border-radius: 9px;
  border-color: var(--tc-line);
  padding-left: 10px;
  font-size: 11px;
}
.cmp-mark {
  font-size: 11px;
  line-height: 1.4;
}
.cmp-footer {
  position: static;
  z-index: 2;
  bottom: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px -24px -24px;
  padding: 14px 24px;
  border-top: 1px solid var(--tc-line);
  background: #f7faffed;
  backdrop-filter: blur(16px);
}
.cmp-page-nav,
.cmp-footer-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.cmp-footer-actions {
  margin-left: auto;
}
.cmp-footer button {
  font-size: 11px;
  min-height: 40px;
  padding: 9px 12px;
  border-radius: 13px;
  white-space: nowrap;
}
.cmp-checked-count {
  font-size: 10px;
  color: var(--tc-muted);
}
@media (min-width: 1600px) {
  .cmp-r4 {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(340px, 0.92fr);
  }
  .cmp-title h1 {
    font-size: 27px;
  }
  .cmp-kpi {
    min-width: 100px;
  }
  .cmp-side {
    padding: 18px;
  }
  .cmp-row-text strong,
  .cmp-row-text small,
  .cmp-proposal,
  .cmp-detail > label {
    font-size: 12px;
  }
}
@media (max-width: 1199px) {
  .cmp-r4 .compare-image-scroll:not(.zoomed) .compare-image img {
    max-height: none;
  }
  .cmp-r4 {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .cmp-side {
    position: static;
    grid-column: 1 / -1;
    max-height: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
  .cmp-side-head,
  .cmp-side #cmp-search {
    grid-column: 1 / -1;
  }
  .cmp-side-list {
    grid-column: 1;
    grid-row: span 2;
    max-height: 320px;
  }
  .cmp-proposal,
  .cmp-detail {
    grid-column: 2;
  }
  .cmp-kpis {
    margin-left: 0;
  }
  .header-right {
    gap: 6px;
  }
  .header-pill {
    font-size: 10px;
    padding: 9px 10px;
  }
  .cmp-footer-actions {
    margin-left: 0;
  }
}
@media (max-width: 900px) {
  .app-header {
    padding-right: 12px;
    gap: 12px;
  }
  .app-header .brand {
    flex-basis: 210px;
    padding: 10px 14px;
  }
  .header-search {
    margin-left: 0;
  }
  .header-search kbd {
    display: none;
  }
  .header-local {
    display: none;
  }
  .mobile-nav-toggle {
    display: block;
    flex-shrink: 0;
    border: 1px solid var(--tc-line);
    border-radius: 9px;
    width: 34px;
    height: 34px;
    background: #fff;
    color: var(--tc-accent-ink);
  }
  body.nav-open .sidebar {
    display: flex !important;
    width: 248px;
    box-shadow: 12px 0 30px #061d5233;
  }
  body.nav-open .sidebar .side-label-text,
  body.nav-open .sidebar .side-section,
  body.nav-open .sidebar .side-profile-text {
    display: block !important;
  }
  body.nav-open .sidebar .side-sub:not([hidden]) {
    display: block !important;
  }
  main {
    padding: 12px 18px 18px;
  }
  .topbar {
    padding-left: 18px;
    padding-right: 18px;
  }
  .cmp-footer {
    margin: 14px -18px -18px;
    padding: 12px 18px;
    position: static;
  }
}
@media (max-width: 600px) {
  :root {
    --tc-header-h: 64px;
  }
  .app-header .brand {
    flex: 1;
    max-width: 230px;
    background: transparent;
    padding-left: 14px;
  }
  .app-header {
    background: #fff;
  }
  .app-header .brand-logo {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }
  .app-header .brand-name {
    font-size: 23px;
  }
  .app-header .brand-sub {
    font-size: 9px;
  }
  .mobile-nav-toggle {
    margin-left: auto;
    background: #eaf6f9;
    border-color: #cddfe8;
    color: #00566c;
  }
  .header-search,
  .header-right {
    display: none;
  }
  .cmp-title {
    flex-basis: 100%;
  }
  .cmp-title-icon {
    width: 32px;
    flex-basis: 32px;
  }
  .cmp-title h1 {
    font-size: 22px;
  }
  .cmp-kpis {
    gap: 8px;
    width: 100%;
  }
  .cmp-kpi {
    min-width: 0;
    flex: 1 1 calc(50% - 8px);
  }
  .cmp-rate {
    margin: 4px 0;
  }
  .cmp-rate-ring {
    width: 46px;
    height: 46px;
  }
  .cmp-r4 {
    grid-template-columns: minmax(0, 1fr);
  }
  .cmp-side {
    display: flex;
    grid-column: auto;
  }
  .cmp-side-list {
    width: 100%;
    max-height: 240px;
  }
  .cmp-footer,
  .cmp-page-nav,
  .cmp-footer-actions {
    width: auto;
  }
  .cmp-footer-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }
  .cmp-footer #compare-check-page {
    grid-column: 1 / -1;
  }
  .cmp-footer button {
    white-space: normal;
  }
  .processing-summary {
    padding: 0 12px;
  }
}

/* Navigation et correspondances · maquette claire. */
.cmp-kpi {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
}
.cmp-kpi > span:last-child {
  display: grid;
}
.cmp-kpi-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 34px;
  border-radius: 8px;
  color: #28546d;
  background: #ffffff90;
}
.cmp-kpi-icon .ui-icon {
  width: 23px;
  height: 23px;
}
.cmp-kpi.pages .cmp-kpi-icon {
  color: #a9004f;
  background: #ffe3ef;
}
.cmp-kpi.ok .cmp-kpi-icon {
  color: #00818a;
  background: #d4f6f7;
}
.cmp-kpi.warn .cmp-kpi-icon {
  color: #ef7b00;
  background: #fff2de;
}
.cmp-title-icon .ui-icon {
  width: 38px;
  height: 38px;
}
.cmp-title .eyebrow {
  display: none;
}
.cmp-pdf-icon {
  width: 34px;
  height: 38px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: #ffeded;
  color: #ed1629;
}
.cmp-pdf-icon .ui-icon {
  width: 27px;
  height: 30px;
}
.cmp-zoom {
  flex: 0 0 auto;
  margin-left: 0;
}
.cmp-fullscreen .ui-icon {
  width: 17px;
  height: 17px;
}
.cmp-document-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 2px 12px 8px;
  font-size: 11px;
  color: #47677e;
}
.cmp-document-pagination label {
  display: flex;
  align-items: center;
  gap: 6px;
}
.cmp-document-pagination input {
  appearance: textfield;
  width: 44px;
  min-width: 0;
  height: 26px;
  border: 1px solid #dce7ee;
  border-radius: 7px;
  background: #fff;
  padding: 2px;
  text-align: center;
  color: #143852;
}
.cmp-document-pagination input::-webkit-inner-spin-button {
  appearance: none;
}
.cmp-document-pagination .small-btn {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  padding: 0;
  background: #fff;
  border: 1px solid #dce7ee;
}
.cmp-document-pagination .ui-icon {
  width: 14px;
  height: 14px;
}
.cmp-strip-shell {
  position: relative;
  margin: 0 0 14px;
  padding: 0 42px;
  border-radius: 18px;
  background: #ffffffd9;
}
.cmp-strip-shell .cmp-strip {
  position: relative;
  border: 0;
  border-radius: 0;
  margin: 0;
  padding: 10px 4px;
  background: transparent;
  scrollbar-width: none;
}
.cmp-strip::-webkit-scrollbar {
  display: none;
}
.cmp-strip-arrow {
  position: absolute;
  top: calc(50% - 17px);
  width: 32px;
  height: 32px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid #deebf1;
  background: #fff;
  color: #1b4961;
  box-shadow: 0 2px 4px #133e5b17;
}
.cmp-strip-arrow.prev {
  left: 9px;
}
.cmp-strip-arrow.next {
  right: 9px;
}
.cmp-strip-arrow .ui-icon {
  width: 17px;
  height: 17px;
}
.cmp-side-head > .ui-icon {
  width: 24px;
  height: 26px;
  color: #0097af;
}
.cmp-side-head strong {
  font-size: 13px;
  white-space: normal;
  line-height: 1.3;
  min-width: 0;
}
.cmp-side-head {
  gap: 7px;
}
.cmp-side-head .chip {
  padding: 5px 9px;
}
.cmp-search-toggle {
  padding: 0;
  background: transparent;
  border: 0;
  color: #5e7b8d;
  width: 22px;
  height: 26px;
}
.cmp-search-toggle .ui-icon {
  width: 17px;
  height: 17px;
}
.cmp-side #cmp-search[hidden] {
  display: none;
}
.cmp-search-context {
  margin: 0;
  font-size: 11px;
  color: #587185;
}
.cmp-side-list {
  max-height: 165px;
  min-height: 54px;
  scrollbar-width: thin;
  scrollbar-color: #d2e6ec transparent;
}
.cmp-row {
  min-height: 49px;
  padding: 5px 6px;
  gap: 7px;
}
.cmp-row-thumb {
  width: 42px;
  height: 39px;
  flex-basis: 42px;
  background-color: #fff;
  border-color: #dce7ec;
}
.cmp-row-text strong {
  font-size: 11px;
}
.cmp-row-text small {
  color: #253e54;
}
.cmp-row-selected {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  display: grid;
  place-items: center;
  border: 1.5px solid #acc3d4;
  border-radius: 4px;
  background: #fff;
}
.cmp-row-selected.checked {
  background: #00a440;
  border-color: #00a440;
  color: #fff;
}
.cmp-row-selected .ui-icon {
  width: 14px;
  height: 14px;
  stroke-width: 2.5;
}
.cmp-proposal b {
  display: flex;
  align-items: center;
  gap: 7px;
}
.cmp-proposal b .ui-icon {
  color: #f58c00;
  width: 22px;
  height: 22px;
}
.cmp-proposal button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.cmp-proposal button .ui-icon {
  width: 17px;
  height: 17px;
}
.cmp-proposal div > button {
  flex: 1 1 auto;
  font-size: 11px;
}
.cmp-proposal #cmp-manual-fluo {
  font-size: 10px;
  line-height: 1.3;
}
.cmp-reference-picker {
  border: 1px solid #dce7ee;
  border-radius: 12px;
  background: linear-gradient(#fff, #f8fbfd);
  padding: 0;
  font-size: 12px;
}
.cmp-reference-picker > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 48px;
  padding: 11px 12px;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
}
.cmp-reference-picker > summary::-webkit-details-marker {
  display: none;
}
.cmp-reference-picker > summary .ui-icon {
  width: 15px;
  height: 15px;
  transform: rotate(90deg);
}
.cmp-reference-picker[open] > summary .ui-icon {
  transform: rotate(-90deg);
}
.cmp-reference-content {
  display: grid;
  gap: 8px;
  padding: 0 12px 12px;
}
.cmp-reference-content select {
  width: 100%;
  min-height: 38px;
  font-size: 11px;
  border: 1px solid #cddfe8;
  border-radius: 8px;
  padding: 6px;
  background: #fff;
  color: #16354c;
}
.cmp-reference-content label {
  font-size: 11px;
  color: #44677b;
}
.cmp-reference-candidates {
  display: grid;
  gap: 6px;
  max-height: 155px;
  overflow-y: auto;
}
.cmp-reference-card {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #dce7ed;
  border-radius: 9px;
  padding: 6px;
  background: #fff;
  color: #143852;
  text-align: left;
}
.cmp-reference-card.selected {
  background: #eaf8f5;
  border-color: #82d5c8;
}
.cmp-reference-card > span:not(.cmp-row-thumb) {
  display: grid;
  gap: 3px;
  flex: 1;
  min-width: 0;
}
.cmp-reference-card strong {
  font-size: 11px;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.cmp-reference-card small {
  font-size: 10px;
  color: #47677e;
}
.cmp-reference-card > .ui-icon {
  width: 17px;
  height: 17px;
  color: #009e75;
}
.cmp-reference-selected {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 0;
  color: #007f70;
  font-size: 11px;
}
.cmp-reference-selected .ui-icon {
  width: 15px;
  height: 15px;
}
.cmp-side .cmp-detail {
  padding: 6px 0 0;
  border: 0;
  background: transparent;
}
.cmp-footer button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
.cmp-footer button .ui-icon {
  width: 18px;
  height: 18px;
}
.settings-panel {
  max-width: 650px;
  padding: 24px;
}
@media (min-width: 1200px) {
  .cmp-r4 .compare-document .preview-top {
    min-height: 70px;
    padding: 12px;
    gap: 8px;
  }
  .cmp-r4 .compare-image-scroll {
    margin: 10px 12px 4px;
    padding: 10px;
  }
  .cmp-r4 .compare-document > .note {
    margin: 4px 0 9px;
  }
}
@media (max-width: 1199px) {
  .cmp-side {
    display: flex;
    gap: 12px;
  }
  .cmp-side-list {
    max-height: 210px;
  }
}
@media (max-width: 600px) {
  .cmp-title-icon .ui-icon {
    width: 30px;
    height: 30px;
  }
  .cmp-side-head strong {
    font-size: 12px;
  }
  .cmp-kpi {
    min-width: 0;
  }
}

.side-settings.active {
  border-radius: 12px;
}

/* Accueil · opération à reprendre, indicateurs et actions rapides. */
body.home-dashboard-view .topbar {
  display: none;
}
.home-dashboard {
  color: #102443;
}
.home-welcome {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 128px;
  margin: -12px -24px 0;
  padding: 24px 330px 24px 28px;
  overflow: hidden;
  background: linear-gradient(105deg, #ffffff9c, #f0f6ff);
  border-bottom: 1px solid #e3edf4;
}
.home-welcome::after {
  content: '';
  position: absolute;
  pointer-events: none;
  right: -90px;
  bottom: -94px;
  width: 650px;
  height: 150px;
  border-radius: 50%;
  transform: rotate(-9deg);
  background: #c8eff5;
  box-shadow:
    -80px -12px 0 #e0f4f9,
    80px -8px 0 #a4dfe9;
  opacity: 0.9;
}
.home-welcome > div:first-child {
  position: relative;
  z-index: 1;
}
.home-welcome h1 {
  margin: 0 0 9px;
  font-size: clamp(25px, 2.2vw, 36px);
  line-height: 1.18;
  letter-spacing: -0.9px;
  font-weight: 750;
}
.home-welcome h1 > span {
  display: inline-block;
  margin-left: 8px;
  font-size: 0.9em;
}
.home-welcome p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: #28445d;
}
.home-workflow-art {
  position: absolute;
  z-index: 1;
  right: 52px;
  top: 27px;
  display: flex;
  align-items: center;
  gap: 26px;
  color: #006b7c;
}
.home-workflow-pages {
  display: grid;
  place-items: center;
  width: 67px;
  height: 76px;
  border: 4px solid #fff;
  border-radius: 7px;
  background: linear-gradient(135deg, #e7f9fd, #a9deeb);
  transform: rotate(-10deg);
  box-shadow:
    7px 5px 0 #cbe8f4,
    13px 9px 0 #a1d4eb,
    0 6px 12px #1a6b8d20;
}
.home-workflow-pages .ui-icon {
  width: 46px;
  height: 46px;
}
.home-workflow-arrow {
  font-size: 44px;
  font-weight: 500;
  line-height: 1;
}
.home-excel-mark {
  position: relative;
  width: 57px;
  height: 61px;
  border-radius: 5px;
  background: linear-gradient(90deg, #118850, #006a3b);
  box-shadow: 7px 3px 0 #d3e7df;
}
.home-excel-mark b {
  position: absolute;
  top: 8px;
  left: -13px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 45px;
  background: #08773f;
  border-radius: 3px;
  color: #fff;
  font-size: 29px;
  box-shadow: 2px 3px 5px #003e3d30;
}
.home-excel-mark i {
  position: absolute;
  inset: 10px 7px 10px 33px;
  background: repeating-linear-gradient(0deg, transparent 0 8px, #ffffff38 8px 10px);
  border-left: 1px solid #ffffff38;
}
.home-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: auto auto auto;
  align-items: stretch;
  gap: 20px;
  padding-top: 20px;
}
.home-layout > * {
  min-width: 0;
}
.home-resume {
  grid-column: 1;
  grid-row: 1 / 3;
  position: relative;
  overflow: hidden;
  padding: 24px;
  border-radius: 22px;
  color: #fff;
  background:
    radial-gradient(ellipse at top right, #00a9b8, transparent 58%),
    linear-gradient(130deg, #005e86, #007b8b 65%, #004a50);
  box-shadow: 0 2px 3px #0a5a751c;
  border: 1px solid #007a9120;
}
.home-resume-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  letter-spacing: 0.35px;
  font-weight: 650;
  color: #d5f3fb;
}
.home-section-icon {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 11px;
}
.home-section-icon .ui-icon {
  width: 23px;
  height: 23px;
}
.home-resume-top .home-section-icon {
  background: #ffffff16;
  color: #d4f5ff;
}
.home-resume-title {
  position: relative;
  z-index: 1;
  padding-right: 175px;
  min-height: 112px;
}
.home-resume-title h2 {
  margin: 14px 0 12px;
  color: #fff;
  font-size: clamp(26px, 2.1vw, 36px);
  line-height: 1.12;
  letter-spacing: -0.5px;
  overflow-wrap: anywhere;
}
.home-resume-title p {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  color: #e6f7ff;
  font-size: 12px;
  line-height: 1.55;
  margin: 0;
}
.home-resume-title p .ui-icon {
  width: 19px;
  height: 19px;
  margin-top: 1px;
}
.home-cover-stack {
  position: absolute;
  width: 169px;
  height: 190px;
  right: 34px;
  top: 29px;
  transform: rotate(8deg);
  pointer-events: none;
  mask-image: linear-gradient(#000 0%, #000 64%, transparent 99%);
}
.home-cover-back,
.home-cover-front {
  position: absolute;
  display: block;
  inset: 10px 10px 0 0;
  border: 5px solid #fff;
  border-radius: 5px;
  background: #c4ecf1;
  box-shadow: 0 5px 13px #003b5540;
}
.home-cover-back.back-two {
  transform: rotate(13deg) translate(17px, 6px);
  background: repeating-linear-gradient(0deg, #d3eff4 0 17px, #f7ffff 18px 23px);
}
.home-cover-back.back-one {
  transform: rotate(6deg) translate(8px, 2px);
  background: repeating-linear-gradient(0deg, #70bbcf 0 17px, #f7ffff 18px 23px);
}
.home-cover-front {
  overflow: hidden;
  transform: rotate(-14deg);
  background: #fff;
}
.home-cover-front img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}
.home-cover-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
  padding: 8px;
  background: #fff;
}
.home-cover-placeholder .ui-icon {
  grid-column: 1 / -1;
  color: #168ca5;
  width: 100%;
  height: 32px;
}
.home-cover-placeholder i {
  border-radius: 3px;
  background: linear-gradient(140deg, #f9d692, #eab66a);
}
.home-cover-placeholder i:nth-of-type(2n) {
  background: linear-gradient(140deg, #a3e3d9, #5cbfbd);
}
.home-cover-placeholder i:nth-of-type(3n) {
  background: linear-gradient(140deg, #bce0f4, #8dbfdf);
}
.home-resume-progress {
  position: relative;
  z-index: 1;
  margin-top: 13px;
}
.home-resume-progress > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 8px;
  font-size: 12px;
}
.home-resume-progress strong {
  font-variant-numeric: tabular-nums;
}
.home-progress-track {
  height: 10px;
  border-radius: 100px;
  overflow: hidden;
  background: #ffffff32;
}
.home-progress-track > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #22d76b, #43e563);
  border-radius: inherit;
}
.home-resume-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 20px 0 18px;
  position: relative;
  z-index: 1;
}
.home-resume-stat {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 14px 12px;
  border-radius: 14px;
  background: #ffffff1d;
  min-width: 0;
}
.home-resume-stat > span {
  display: grid;
  place-items: center;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  background: #ffffff13;
  color: #d4ffed;
}
.home-resume-stat:nth-child(2) > span {
  color: #ffd365;
}
.home-resume-stat .ui-icon {
  width: 23px;
  height: 23px;
}
.home-resume-stat > div {
  display: grid;
  gap: 5px;
  min-width: 0;
}
.home-resume-stat small {
  font-size: 11px;
  line-height: 1.2;
}
.home-resume-stat strong {
  font-size: 19px;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.home-resume-stat:last-child strong {
  font-size: 16px;
}
.home-resume-bottom {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}
.home-resume-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 11px 20px;
  border: 0;
  border-radius: 100px;
  background: #fff;
  color: #123b50;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 2px 3px #004c5c10;
}
.home-resume-button:hover {
  background: #e6f8fc;
}
.home-resume-button .ui-icon {
  width: 18px;
  height: 18px;
}
.home-resume-time {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  color: #d5f3fb;
}
.home-resume-time .ui-icon {
  width: 15px;
  height: 15px;
}
.home-metrics {
  grid-column: 2;
  grid-row: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
  padding-top: 10px;
}
.home-metric {
  border: 1px solid #dfe8f4;
  border-radius: 18px;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  background: #f4f7fd;
  box-shadow: 0 2px 3px #143e6810;
}
.home-metric-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 11px;
  background: #ffffff86;
}
.home-metric-icon .ui-icon {
  width: 24px;
  height: 24px;
}
.home-metric-label {
  font-size: 11px;
  color: #23415b;
  line-height: 1.3;
}
.home-metric strong {
  max-width: 100%;
  overflow-wrap: anywhere;
  color: #102443;
  font-size: clamp(22px, 1.8vw, 31px);
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.5px;
  margin-top: auto;
}
#home-cost {
  font-size: clamp(19px, 1.6vw, 28px);
  white-space: normal;
}
.home-metric.lavender {
  background: #f2efff;
  border-color: #e1dcff;
}
.home-metric.sky {
  background: #ecf7ff;
  border-color: #d3eafa;
}
.home-metric.mint {
  background: #edf9f5;
  border-color: #d6efe8;
}
.home-metric.green {
  background: #edfcef;
  border-color: #d8eedf;
}
.home-metric.lavender .home-metric-icon {
  color: #5835df;
  background: #e9e1ff;
}
.home-metric.sky .home-metric-icon {
  color: #0877b1;
  background: #d7efff;
}
.home-metric.mint .home-metric-icon {
  color: #398000;
  background: #def3d8;
}
.home-metric.green .home-metric-icon {
  color: #00a243;
  background: #d7f7dc;
}
.home-dashboard-panel {
  border: 1px solid #e0e9f1;
  border-radius: 22px;
  padding: 18px;
  background: #ffffffed;
  box-shadow: 0 2px 3px #173d6410;
}
.home-quick {
  grid-column: 2;
  grid-row: 2;
}
.home-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.home-panel-head h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  line-height: 1.3;
  margin: 0;
  min-width: 0;
  font-weight: 700;
  letter-spacing: -0.25px;
}
.home-panel-head .home-section-icon {
  width: 31px;
  height: 31px;
  flex-basis: 31px;
}
.home-section-icon.teal {
  color: #008a9a;
  background: #e4f7f7;
}
.home-section-icon.amber {
  color: #f29100;
  background: #fff5e3;
}
.home-section-icon.lavender {
  color: #7951e6;
  background: #f1eaff;
}
.home-quick-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.home-quick-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 120px;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 16px;
  padding: 14px 8px;
  color: #153650;
  background: #eef6fa;
  transition:
    transform 0.15s,
    box-shadow 0.15s;
}
.home-quick-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px #13607412;
  border-color: #8bd6e2;
}
.home-quick-action > span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 13px;
}
.home-quick-action .ui-icon {
  width: 27px;
  height: 27px;
}
.home-quick-action strong {
  max-width: 105px;
  font-size: 12px;
  line-height: 1.5;
  font-weight: 650;
}
.home-quick-action.sky {
  background: #e6f5ff;
  color: #005c86;
}
.home-quick-action.sky > span {
  background: #d4eeff;
}
.home-quick-action.peach {
  background: #fff3e6;
}
.home-quick-action.peach > span {
  background: #ffe6cb;
  color: #e76d00;
}
.home-quick-action.lavender {
  background: #f1edff;
}
.home-quick-action.lavender > span {
  background: #e8e0ff;
  color: #5b31d5;
}
.home-quick-action.mint {
  background: #e4f7f2;
  color: #00536b;
}
.home-quick-action.mint > span {
  background: #cdf1e6;
  color: #008e85;
}
.home-recent {
  grid-column: 1;
  grid-row: 3;
}
.home-all-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 0;
  background: transparent;
  padding: 5px 0;
  color: #005689;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}
.home-all-link .ui-icon {
  width: 15px;
  height: 15px;
}
.home-all-link:hover {
  color: #0096a8;
}
.home-table-scroll {
  width: 100%;
  overflow-x: auto;
}
.home-operations-table {
  table-layout: fixed;
  border-collapse: collapse;
  width: 100%;
  text-align: left;
  margin: 0;
  font-size: 12px;
}
.home-operations-table th {
  color: #66839b;
  font-size: 10px;
  font-weight: 500;
  background: #f4f8fb;
  padding: 9px 8px;
}
.home-operations-table th:first-child {
  border-radius: 10px 0 0 10px;
  width: 36%;
}
.home-operations-table th:nth-child(2) {
  width: 25%;
}
.home-operations-table th:nth-child(3) {
  width: 23%;
}
.home-operations-table th:last-child {
  border-radius: 0 10px 10px 0;
  text-align: right;
  width: 16%;
}
.home-operations-table td {
  height: 48px;
  padding: 8px;
  border-bottom: 1px solid #edf2f6;
  vertical-align: middle;
}
.home-operations-table tr:last-child td {
  border-bottom: 0;
}
.home-operation-link {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 0;
  background: none;
  padding: 4px 0;
  color: #102443;
  text-align: left;
  font: inherit;
  font-weight: 600;
}
.home-operation-link .ui-icon {
  width: 20px;
  height: 22px;
  color: #008397;
}
.home-operation-link > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.home-operation-link:hover {
  color: #008a9a;
}
.home-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 7px;
  font-size: 9px;
  font-weight: 600;
  border-radius: 100px;
  line-height: 1.3;
  color: #0065a6;
  background: #e6f5ff;
}
.home-status i {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
  background: currentColor;
}
.home-status.ready {
  color: #008e3c;
  background: #e2f9eb;
}
.home-status.running {
  color: #b86d00;
  background: #fff3dc;
}
.home-status.empty {
  color: #657d8e;
  background: #f0f4f6;
}
.home-table-progress-value {
  display: block;
  color: #335f7b;
  font-size: 10px;
  font-weight: 650;
  margin-bottom: 5px;
  font-variant-numeric: tabular-nums;
}
.home-table-progress {
  display: block;
  background: #eaf0f4;
  border-radius: 100px;
  height: 7px;
  overflow: hidden;
}
.home-table-progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #09bd60, #35d45f);
}
.home-table-cost {
  text-align: right;
  font-size: 10px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.home-decoupe {
  grid-column: 2;
  grid-row: 3;
}
.home-panel-subtitle {
  display: inline;
  font-size: 14px;
}
.home-decoupe .home-panel-head h2 {
  flex-wrap: wrap;
  gap: 7px;
  font-size: 15px;
}
.home-decoupe-stats {
  display: flex;
  align-items: center;
  gap: 24px;
  border: 1px solid #e7eef3;
  border-radius: 15px;
  padding: 16px;
}
.home-donut {
  position: relative;
  width: 112px;
  height: 112px;
  flex: 0 0 112px;
}
.home-donut > svg {
  width: 100%;
  height: 100%;
}
.home-donut circle {
  fill: none;
  stroke-width: 12px;
}
.home-donut-track {
  stroke: #dfedf1;
}
.home-donut-fill {
  stroke: #18bba8;
  stroke-linecap: round;
}
.home-donut > span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #08a99c;
}
.home-donut > span .ui-icon {
  width: 34px;
  height: 34px;
}
.home-decoupe-stats dl {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: 100%;
}
.home-decoupe-stats dl > div {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 0 12px;
  text-align: center;
  border-left: 1px solid #dae7ef;
}
.home-decoupe-stats dl > div:first-child {
  border-left: 0;
}
.home-decoupe-stats dd {
  margin: 0;
  color: #102443;
  font-size: 29px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.home-decoupe-stats dt {
  font-size: 11px;
  line-height: 1.4;
}
.home-decoupe-caption {
  color: #678195;
  font-size: 10px;
  margin: 10px 0 0;
}
.home-dashboard-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #6c8496;
  font-size: 10px;
  padding: 15px 2px 0;
  flex-wrap: wrap;
}
.home-dashboard-footer .link-button {
  border: 0;
  background: none;
  color: inherit;
  padding: 0;
  font: inherit;
  text-decoration: underline;
}
.home-empty-steps {
  display: flex;
  gap: 12px;
  margin: 24px 0;
  color: #d7f5fa;
  font-size: 12px;
}
.home-empty-steps > span {
  border: 1px solid #ffffff40;
  border-radius: 100px;
  padding: 8px 12px;
}
.home-resume-empty .home-resume-title {
  min-height: 145px;
}
.home-empty-list {
  text-align: center;
  color: #668298;
  padding: 20px 12px;
}
.home-empty-list > .ui-icon {
  width: 30px;
  height: 30px;
  color: #7baeb9;
}
.home-empty-list p {
  font-size: 12px;
  margin: 10px 0 6px;
}
.home-empty-list small {
  font-size: 11px;
}
@media (prefers-reduced-motion: reduce) {
  .home-quick-action {
    transition: none;
  }
}
@media (max-width: 1400px) and (min-width: 1200px) {
  .home-metrics {
    gap: 8px;
  }
  .home-metric {
    padding: 12px 10px;
  }
  .home-metric strong {
    font-size: 24px;
  }
  #home-cost {
    font-size: 20px;
  }
  .home-quick-grid {
    gap: 9px;
  }
  .home-resume-stat {
    padding: 12px 9px;
    gap: 6px;
  }
  .home-resume-stat > span {
    display: none;
  }
  .home-panel-subtitle {
    display: none;
  }
  .home-decoupe-stats {
    gap: 10px;
    padding: 14px 10px;
  }
  .home-donut {
    width: 90px;
    height: 90px;
    flex-basis: 90px;
  }
  .home-decoupe-stats dl > div {
    padding: 0 7px;
  }
}
@media (max-width: 1199px) {
  .home-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .home-resume,
  .home-metrics,
  .home-quick,
  .home-recent,
  .home-decoupe {
    grid-column: auto;
    grid-row: auto;
  }
  .home-metrics {
    padding-top: 0;
  }
  .home-resume-title {
    min-height: 95px;
  }
  .home-resume-title h2 {
    max-width: 500px;
  }
  .home-cover-stack {
    right: 40px;
  }
  .home-welcome {
    padding-right: 210px;
  }
  .home-workflow-art {
    right: 28px;
    gap: 18px;
    transform: scale(0.75);
    transform-origin: right center;
  }
}
@media (max-width: 900px) {
  .home-welcome {
    margin-left: -18px;
    margin-right: -18px;
    padding-left: 20px;
  }
}
@media (max-width: 600px) {
  .home-welcome {
    min-height: 130px;
    padding: 22px 18px;
  }
  .home-welcome h1 {
    font-size: 25px;
    letter-spacing: -0.5px;
  }
  .home-welcome p {
    font-size: 12px;
    max-width: 340px;
  }
  .home-workflow-art {
    display: none;
  }
  .home-welcome::after {
    right: -390px;
    opacity: 0.55;
  }
  .home-layout {
    gap: 16px;
    padding-top: 16px;
  }
  .home-resume {
    padding: 20px;
    border-radius: 18px;
  }
  .home-resume-title {
    padding-right: 105px;
  }
  .home-resume-title h2 {
    font-size: 27px;
  }
  .home-cover-stack {
    width: 115px;
    height: 157px;
    right: 16px;
    top: 48px;
  }
  .home-resume-title p {
    font-size: 11px;
  }
  .home-resume-title p .ui-icon {
    display: none;
  }
  .home-resume-stats {
    gap: 8px;
    margin-top: 16px;
  }
  .home-resume-stat {
    padding: 12px 9px;
  }
  .home-resume-stat > span {
    display: none;
  }
  .home-resume-stat small {
    font-size: 10px;
  }
  .home-resume-stat strong {
    font-size: 16px;
  }
  .home-resume-stat:last-child strong {
    font-size: 14px;
  }
  .home-resume-top {
    font-size: 9px;
  }
  .home-resume-time {
    display: none;
  }
  .home-resume-bottom {
    justify-content: flex-start;
  }
  .home-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .home-metric {
    min-height: 136px;
    padding: 14px;
    gap: 8px;
  }
  .home-metric strong {
    font-size: 26px;
  }
  #home-cost {
    font-size: 23px;
  }
  .home-dashboard-panel {
    padding: 15px;
    border-radius: 18px;
  }
  .home-panel-head {
    gap: 8px;
  }
  .home-panel-head h2 {
    font-size: 14px;
    gap: 7px;
  }
  .home-quick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .home-quick-action {
    min-height: 112px;
  }
  .home-operations-table {
    min-width: 455px;
  }
  .home-panel-subtitle {
    display: none;
  }
  .home-all-link {
    font-size: 11px;
  }
  .home-decoupe-stats {
    flex-direction: column;
    gap: 20px;
    padding: 18px 8px;
  }
  .home-donut {
    width: 105px;
    height: 105px;
    flex-basis: 105px;
  }
  .home-decoupe-stats dl {
    width: 100%;
  }
  .home-decoupe-stats dl > div {
    padding: 0 6px;
  }
  .home-decoupe-stats dd {
    font-size: 27px;
  }
  .home-empty-steps {
    gap: 7px;
    font-size: 10px;
  }
  .home-empty-steps > span {
    padding: 7px 9px;
  }
}

/* Connexion et administration. Les autorisations sont aussi imposées par le serveur. */
body.signed-out .sidebar {
  display: none !important;
}
body.signed-out .app {
  margin-left: 0 !important;
}
body.signed-out .topbar,
body.signed-out .header-search,
body.signed-out .header-right,
body.signed-out .mobile-nav-toggle,
body.signed-out .session-controls {
  display: none !important;
}
body:not(.role-admin) #side-settings,
body:not(.role-admin) #side-users {
  display: none !important;
}
body:not(.signed-out) .session-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  order: 2;
}
.session-account {
  display: grid;
  gap: 2px;
  max-width: 160px;
  border: 0;
  background: transparent;
  text-align: right;
  color: #153e55;
  font-size: 12px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.session-account small {
  font-size: 10px;
  color: #648596;
  font-weight: 400;
}
.session-logout {
  font-size: 11px;
  padding: 8px 11px;
}
.auth-card {
  max-width: 460px;
  margin: 40px auto;
  padding: 32px;
  border: 1px solid #d9e9f0;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 12px 35px #12596d10;
}
.auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #00667b;
  font-size: 26px;
  font-weight: 750;
  margin-bottom: 22px;
}
.auth-brand > .ui-icon {
  width: 35px;
  height: 35px;
}
.auth-brand > span > span {
  color: #f39200;
}
.auth-card h1 {
  font-size: 24px;
  margin: 0 0 12px;
}
.auth-card > p {
  color: #587587;
  line-height: 1.6;
  font-size: 13px;
}
.auth-card form,
.access-form {
  display: grid;
  gap: 10px;
}
.auth-card label,
.access-form label,
.openai-settings form > label {
  color: #214c63;
  font-size: 12px;
  font-weight: 600;
  margin-top: 7px;
}
.auth-card input,
.access-form input:not([type='checkbox']),
.access-form select,
.openai-settings input,
.openai-settings select {
  min-height: 42px;
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #cedfe8;
  border-radius: 9px;
  background: #fcfeff;
  color: #153b52;
}
.auth-card small {
  color: #6b8496;
  font-size: 11px;
  line-height: 1.5;
}
.auth-card .primary {
  margin-top: 8px;
  min-height: 42px;
}
/* Connexion : une carte en deux volets, marque à gauche et formulaire à droite (empilés sur mobile). */
/* Toute la page reprend le bleu de la bannière de l'accueil (comme la connexion Toucan). */
body.signed-out {
  min-height: 100vh;
  background:
    radial-gradient(ellipse at top right, #00a9b8, transparent 58%),
    linear-gradient(130deg, #005e86, #007b8b 65%, #004a50) fixed;
}
body.signed-out .app-header {
  display: none !important;
}
/* Sans en-tête : ni place réservée ni marges de page autour de la carte. */
body.signed-out .app {
  padding-top: 0 !important;
}
body.signed-out main {
  max-width: none;
  padding: 0;
}
.cf-login {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 32px 16px;
  box-sizing: border-box;
}
.cf-login-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  width: 100%;
  max-width: 880px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 30px 70px rgba(0, 32, 46, 0.4), 0 2px 8px rgba(0, 32, 46, 0.15);
  overflow: hidden;
}
.cf-login-brand {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 24px;
  padding: 40px 36px;
  color: #fff;
  text-align: center;
  /* Mêmes couleurs que la bannière de l'accueil. */
  background:
    radial-gradient(ellipse at top left, rgba(255, 255, 255, 0.16), transparent 60%),
    linear-gradient(160deg, #0a87a8, #006f86 60%, #005a6e);
}
/* Logo détouré : un liseré blanc garde le texte foncé lisible sur le bleu. */
.cf-login-logo-tile {
  width: min(250px, 100%);
  filter: drop-shadow(0 0 1px #fff) drop-shadow(0 0 1px #fff) drop-shadow(0 12px 22px rgba(0, 30, 45, 0.35));
}
.cf-login-logo {
  display: block;
  width: 100%;
  height: auto;
}
.cf-login-brand .cf-login-tagline {
  margin: 0;
  max-width: 30ch;
  color: #fff;
  font-size: 1.05rem;
  line-height: 1.5;
  font-weight: 600;
  opacity: 0.95;
}
.cf-login-form {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 44px 40px 40px;
}
.cf-login-form label {
  margin: 18px 0 6px;
  color: #587587;
  font-size: 0.8125rem;
  font-weight: 600;
}
.cf-login-title {
  margin: 0 0 4px;
  color: #12324a;
  font-size: 1.6rem;
  font-weight: 700;
}
.cf-login-subtitle {
  margin: 0 0 10px;
  color: #587587;
}
.cf-login-note {
  margin: 8px 0 0;
  color: #34566a;
  line-height: 1.6;
  font-size: 0.9rem;
}
.cf-login-note code {
  font-size: 0.85em;
  color: #00667b;
  overflow-wrap: anywhere;
}
.cf-login-field {
  position: relative;
  display: flex;
  align-items: center;
}
.cf-login-field > svg:first-child {
  position: absolute;
  left: 0.95rem;
  color: #7a95a5;
  pointer-events: none;
}
.cf-login-field input {
  width: 100%;
  height: 46px;
  padding: 0 2.9rem 0 2.75rem;
  border: 1px solid #cedfe8;
  border-radius: 10px;
  background: #fcfeff;
  color: #153b52;
  font-size: 1rem;
}
.cf-login-field input:focus {
  outline: none;
  border-color: #00809e;
  box-shadow: 0 0 0 3px rgba(0, 128, 158, 0.18);
}
.cf-password-eye {
  position: absolute;
  right: 6px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #6b8496;
  cursor: pointer;
}
.cf-password-eye:hover,
.cf-password-eye:focus-visible {
  color: #00809e;
  background: #e8f5f8;
}
.cf-login-error {
  min-height: 20px;
  margin-top: 12px;
  color: #c0392b;
  font-size: 0.875rem;
}
.cf-login-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 48px;
  margin-top: 12px;
  font-size: 1rem;
  border-radius: 10px;
  background: #00809e;
}
.cf-login-submit:hover:not(:disabled) {
  background: #006d87;
}
.cf-btn-spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-right-color: transparent;
  animation: cf-spin 0.8s linear infinite;
}
.cf-btn-spinner[hidden] {
  display: none;
}
@keyframes cf-spin {
  to {
    transform: rotate(360deg);
  }
}
@media (max-width: 767.98px) {
  .cf-login {
    min-height: 0;
    padding: 16px;
  }
  .cf-login-card {
    grid-template-columns: 1fr;
    border-radius: 16px;
  }
  .cf-login-brand {
    flex-direction: row;
    gap: 16px;
    padding: 20px;
    text-align: left;
  }
  .cf-login-logo-tile {
    flex: 0 0 104px;
    width: 104px;
  }
  .cf-login-brand .cf-login-tagline {
    font-size: 0.95rem;
  }
  .cf-login-form {
    padding: 28px 20px 24px;
  }
}
.users-panel {
  padding: 20px;
}
.user-table-scroll {
  overflow-x: auto;
}
.users-table {
  width: 100%;
  text-align: left;
  border-collapse: collapse;
  font-size: 13px;
}
.users-table th {
  background: #f2f8fb;
  color: #54748a;
  font-weight: 600;
}
.users-table th,
.users-table td {
  padding: 12px;
  border-bottom: 1px solid #e5eef3;
}
.users-table td:last-child {
  text-align: right;
}
.users-table small {
  color: #7792a1;
}
.users-table .secondary {
  font-size: 11px;
  padding: 7px 10px;
}
.access-form .primary {
  margin-top: 10px;
}
.openai-settings {
  max-width: 650px;
}
.openai-settings-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}
.openai-settings-heading > span {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  color: #008b9f;
  background: #e5f6f8;
  border-radius: 13px;
}
.openai-settings-heading h2 {
  font-size: 20px;
  margin: 0 0 6px;
}
.openai-settings-heading p {
  margin: 0;
  color: #587587;
  font-size: 12px;
}
.openai-settings form {
  display: grid;
  gap: 12px;
}
.openai-settings form .note {
  margin: 0;
  line-height: 1.6;
}
.openai-settings .primary {
  justify-self: start;
  padding: 11px 18px;
}
.success-text {
  color: #008759;
  font-size: 13px;
}
@media (max-width: 1100px) {
  .session-account {
    max-width: 100px;
  }
  .header-local {
    display: none;
  }
  .session-controls {
    gap: 5px;
  }
}
@media (max-width: 600px) {
  .auth-card {
    margin: 16px auto;
    padding: 24px 20px;
  }
  .session-account {
    max-width: 75px;
    font-size: 10px;
  }
  .session-account small {
    display: none;
  }
  .session-logout {
    padding: 7px;
    font-size: 10px;
  }
  .session-controls {
    margin-left: auto;
  }
  .users-table {
    min-width: 560px;
  }
}

.session-account {
  display: flex;
  align-items: center;
  gap: 7px;
}
.session-user-label {
  display: grid;
  gap: 3px;
}
.session-user-icon {
  display: none;
}
@media (max-width: 1250px) {
  body:not(.signed-out) .app-header .header-right {
    display: none;
  }
}
@media (max-width: 600px) {
  .session-user-label {
    display: none;
  }
  .session-user-icon {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    color: #00667b;
    background: #e5f6f8;
  }
  .session-user-icon .ui-icon {
    width: 18px;
    height: 18px;
  }
  .session-account {
    padding: 0;
  }
  body:not(.signed-out) .app-header .brand-sub {
    display: none;
  }
  body:not(.signed-out) .app-header .brand-logo {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
  }
  body:not(.signed-out) .app-header .brand-name {
    font-size: 21px;
  }
  .session-logout {
    font-size: 9px;
  }
}
@media (max-width: 380px) {
  body:not(.signed-out) .app-header .brand-logo {
    display: none;
  }
}

/* Droits d’accès : les mêmes permissions sont contrôlées par le serveur. */
.permission-hidden,
body.role-user .admin-only,
body.role-user #header-cost,
body.role-user #side-cost,
body.role-user .run-cost,
body.role-user .progress-cost {
  display: none !important;
}
.role-chooser { border: 1px solid #cedfe8; border-radius: 12px; padding: 14px; }
.role-chooser legend { color: #214c63; font-size: 13px; font-weight: 600; }
.role-chooser .checkbox-line { align-items: flex-start; margin: 10px 0; }
.role-chooser input { width: auto; min-height: 0; margin-top: 4px; }
.role-chooser small { display: block; color: #587587; font-size: 11px; margin-top: 4px; }
.home-graphic-layout { display: grid; gap: 22px; padding: 0 24px 24px; }
.home-graphic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
body.role-user .home-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 600px) {
  .home-graphic-layout { padding: 0 12px 16px; }
  .home-graphic-grid, body.role-user .home-metrics { grid-template-columns: 1fr; }
}

/* Header : navigation, recherche et compte regroupés sur une seule ligne. */
:root { --tc-header-h: 80px; }
.app-header {
  gap: 24px;
  padding: 0 24px;
  color: #12394d;
  background: linear-gradient(100deg, #fff 0%, #fcfdff 68%, #fff 100%);
  border: 1px solid #e0e9ef;
  border-bottom: 2px solid #009bae;
  border-radius: 0 0 15px 15px;
  box-shadow: 0 5px 18px #1246530b;
  z-index: 30;
}
.header-start {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 0 0 294px;
  min-width: 0;
  height: 46px;
  padding-right: 20px;
  border-right: 1px solid #e6edf2;
}
.app-header .brand {
  flex: 1 1 auto;
  min-width: 0;
  max-width: none;
  height: auto;
  padding: 0;
  gap: 10px;
  background: transparent;
}
body:not(.signed-out) .app-header .brand-logo,
.app-header .brand-logo {
  display: block;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  object-fit: contain;
}
body:not(.signed-out) .app-header .brand-name,
.app-header .brand-name { font-size: 28px; line-height: 1.05; letter-spacing: -1px; }
body:not(.signed-out) .app-header .brand-sub,
.app-header .brand-sub { display: block; margin-top: 3px; font-size: 10px; line-height: 1.3; white-space: nowrap; }
.header-icon-button,
.app-header .mobile-nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  padding: 0;
  margin: 0;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: #07506b;
  cursor: pointer;
  position: relative;
  transition: background .15s, border-color .15s, box-shadow .15s;
}
.header-icon-button:hover,
.app-header .mobile-nav-toggle:hover { background: #eef8fa; border-color: #d4e9ed; }
.header-icon-button:focus-visible,
.app-header .session-account:focus-visible,
.header-menu-action:focus-visible { outline: 3px solid #24b2c2; outline-offset: 3px; }
.header-icon-button[aria-expanded="true"] { background: #e8f6f8; color: #007b8f; }
.app-header .header-search {
  display: flex;
  flex: 1 1 480px;
  min-width: 180px;
  max-width: 680px;
  min-height: 43px;
  height: 43px;
  margin: 0 auto 0 0;
  padding: 0 16px 0 18px;
  gap: 11px;
  border: 1px solid #d1def3;
  background: linear-gradient(110deg, #f7faff, #edf3fb);
  color: #163855;
  box-shadow: inset 0 1px 1px #234f7c04, 0 1px 2px #234f7c06;
}
.app-header .header-search:focus-within { outline: 0; background: #fff; border-color: #28a9bc; box-shadow: 0 0 0 3px #00a1b512; }
.app-header .header-search input { width: 100%; font-size: 12px; color: #12394d; padding: 0; }
.app-header .header-search input::placeholder { color: #526d85; opacity: 1; }
.app-header .header-search kbd { display: block; padding: 3px 7px; border: 1px solid #dbe6f2; border-bottom-width: 2px; border-radius: 7px; font: 600 11px 'Segoe UI', sans-serif; background: #f8faff; color: #24455f; white-space: nowrap; }
body:not(.signed-out) .app-header .header-right { display: flex; align-items: center; gap: 12px; margin-left: auto; flex: 0 0 auto; }
.app-header .header-local { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 9px 16px; font-size: 12px; font-weight: 600; white-space: nowrap; background: #e8f8f3; color: #075368; border: 1px solid #e0f3ec; }
.header-popover-host { position: relative; }
.header-dropdown[hidden] { display: none !important; }
body:not(.signed-out) .session-controls { display: flex; order: 0; gap: 0; margin: 0 0 0 3px; padding-left: 20px; border-left: 1px solid #e6edf2; }
.app-header .session-account { display: flex; align-items: center; gap: 12px; max-width: 240px; min-height: 46px; padding: 2px 0 2px 8px; border: 0; border-radius: 12px; background: transparent; color: #12394d; text-align: right; cursor: pointer; }
.app-header .session-account:hover { background: #f3fafb; }
.app-header .session-user-label { display: grid; gap: 3px; max-width: 152px; min-width: 0; }
.app-header .session-user-label strong { font-size: 13px; line-height: 1.25; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-header .session-user-label small { display: block; color: #547184; font-size: 10px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.session-avatar { display: grid; place-items: center; flex: 0 0 40px; width: 40px; height: 40px; border: 1px solid #027d8e; border-radius: 50%; background: linear-gradient(135deg, #00899b, #00516c); box-shadow: 0 2px 4px #00586d15; color: #fff; font-size: 15px; font-weight: 600; letter-spacing: .5px; }
.session-chevron { display: inline-flex; color: #22495e; transition: transform .15s; }
.session-chevron .ui-icon { width: 16px; height: 16px; transform: rotate(90deg); }
.session-account[aria-expanded="true"] .session-chevron { transform: rotate(180deg); }
.header-dropdown { position: absolute; top: calc(100% + 16px); right: 0; width: 290px; max-width: calc(100vw - 24px); padding: 8px; border: 1px solid #dce9ef; border-radius: 16px; background: #fff; color: #153e55; box-shadow: 0 14px 45px #12394d26, 0 2px 6px #12394d06; z-index: 35; }
.header-dropdown-heading { display: grid; gap: 5px; padding: 12px 12px 14px; margin-bottom: 5px; border-bottom: 1px solid #edf2f5; overflow-wrap: anywhere; }
.header-dropdown-heading strong { font-size: 13px; font-weight: 650; }
.header-dropdown-heading span { color: #6a8292; font-size: 11px; }
.header-menu-action { display: flex; align-items: center; gap: 11px; width: 100%; min-height: 43px; padding: 11px 12px; background: transparent; border: 0; border-radius: 9px; color: #264b5e; text-align: left; font-size: 12px; cursor: pointer; }
.header-menu-action:hover { background: #edf8fa; }
.header-menu-action .ui-icon { width: 18px; height: 18px; color: #178295; }
.app-header .session-logout { font-size: 12px; padding: 11px 12px; color: #ac3c4b; border-top: 1px solid #edf2f5; border-radius: 0 0 9px 9px; margin-top: 5px; }
.app-header .session-logout .ui-icon { color: inherit; }
.app-header .session-logout:hover { background: #fff2f4; }
.app-header #header-cost.account-cost { margin: 8px 10px 4px; padding: 10px 12px; background: #eef9f3; border-radius: 9px; color: #24704d; font-size: 11px; line-height: 1.6; }
@media (max-width: 1200px) {
  .app-header { gap: 18px; padding: 0 18px; }
  .header-start { flex-basis: 264px; gap: 12px; padding-right: 14px; }
  body:not(.signed-out) .app-header .brand-name { font-size: 25px; }
  body:not(.signed-out) .app-header .brand-logo { width: 43px; height: 43px; flex-basis: 43px; }
  .app-header .session-user-label { max-width: 100px; }
  body:not(.signed-out) .app-header .brand-sub { font-size: 9px; }
  body:not(.signed-out) .app-header .header-right { gap: 7px; }
  body:not(.signed-out) .session-controls { padding-left: 10px; }
  .app-header .header-local { padding: 9px 12px; }
}
@media (max-width: 1000px) {
  .header-start { flex-basis: 242px; }
  body:not(.signed-out) .app-header .brand-sub { display: none; }
  .app-header .header-local { display: none; }
  .app-header .header-search kbd { display: none; }
}
@media (max-width: 900px) {
  .app-header .session-user-label { display: none; }
  .app-header .session-account { gap: 7px; }
}
@media (max-width: 760px) {
  .app-header { gap: 12px; padding: 0 12px; }
  .header-start { flex: 0 0 auto; border: 0; padding: 0; gap: 8px; }
  body:not(.signed-out) .app-header .brand-sub { display: none; }
  body:not(.signed-out) .app-header .brand-logo { width: 36px; height: 36px; flex-basis: 36px; }
  body:not(.signed-out) .app-header .brand-name { font-size: 23px; }
  .app-header .session-user-label { display: none; }
  .app-header .session-chevron { display: none; }
  .app-header .session-account { gap: 0; padding: 0; }
  body:not(.signed-out) .session-controls { border: 0; padding: 0; }
  .app-header .header-search { min-width: 100px; padding: 0 12px; }
}
@media (max-width: 600px) {
  :root { --tc-header-h: 68px; }
  .app-header { gap: 8px; }
  .app-header .header-search { display: none; }
  body:not(.signed-out) .app-header .header-right { gap: 4px; }
  .session-avatar { width: 36px; height: 36px; flex-basis: 36px; font-size: 13px; }
  .app-header .header-help { display: none; }
  .app-header .header-dropdown { position: fixed; top: calc(var(--tc-header-h) + 8px); right: 12px; }
}
@media (max-width: 380px) {
  body:not(.signed-out) .app-header .brand-name { font-size: 21px; }
  body:not(.signed-out) .app-header .brand-logo { width: 32px; height: 32px; flex-basis: 32px; }
  .app-header .brand { gap: 6px; }
  .header-icon-button, .app-header .mobile-nav-toggle { width: 34px; flex-basis: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  .header-icon-button, .session-chevron { transition: none; }
}

/* Navigation mobile accessible hors du header. */
.sidebar-launcher { display: none; }
@media (max-width: 900px) {
  .sidebar-launcher {
    display: inline-flex;
    position: fixed;
    bottom: 20px;
    left: 16px;
    z-index: 31;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    border: 1px solid #c9e4e9;
    border-radius: 13px;
    background: #fff;
    color: #00677c;
    box-shadow: 0 4px 16px #12465320;
  }
  .sidebar-launcher:focus-visible { outline: 3px solid #24b2c2; outline-offset: 3px; }
}

/* Statistiques (super administrateur) : une carte de paiement par membre de l'équipe. */
.spend-period {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: #587587;
  font-size: 0.8125rem;
  font-weight: 600;
}
.spend-period select {
  min-width: 220px;
  height: 40px;
  padding: 0 10px;
  border: 1px solid #cedfe8;
  border-radius: 10px;
  background: #fff;
  color: #153b52;
  font-size: 0.95rem;
}
.spend-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.spend-summary .panel {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px;
}
.spend-summary small {
  color: #587587;
  font-weight: 600;
}
.spend-summary strong {
  color: #12324a;
  font-size: 1.4rem;
}
.spend-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.spend-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.spend-card {
  position: relative;
  display: grid;
  grid-template-rows: auto auto 1fr auto auto;
  aspect-ratio: 1.5;
  padding: 16px 20px;
  overflow: hidden;
  border-radius: 18px;
  color: #fff;
  box-shadow: 0 18px 36px rgba(0, 40, 60, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  isolation: isolate;
}
/* Reflets décoratifs de la carte. */
.spend-card::before,
.spend-card::after {
  content: '';
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.09);
}
.spend-card::before {
  width: 260px;
  height: 260px;
  top: -130px;
  right: -70px;
}
.spend-card::after {
  width: 200px;
  height: 200px;
  bottom: -120px;
  left: -40px;
}
.spend-theme-0 { background: linear-gradient(130deg, #005e86, #007b8b 65%, #004a50); }
.spend-theme-1 { background: linear-gradient(130deg, #12324a, #1f5673 60%, #0b2233); }
.spend-theme-2 { background: linear-gradient(130deg, #0b7a5a, #11986e 60%, #075a43); }
.spend-theme-3 { background: linear-gradient(130deg, #e5671b, #f08a2a 55%, #b8480b); }
.spend-theme-4 { background: linear-gradient(130deg, #4b3a8c, #6a52b8 60%, #33266a); }
.spend-theme-5 { background: linear-gradient(130deg, #2c3a45, #4a5d6b 60%, #1b252d); }
.spend-card-off {
  filter: grayscale(0.85);
  opacity: 0.75;
}
.spend-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.spend-card-brand {
  font-size: 1.15rem;
  font-weight: 800;
  font-style: italic;
  letter-spacing: 0.02em;
}
.spend-card-role {
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 0.72rem;
  font-weight: 600;
}
.spend-card-chip {
  width: 36px;
  height: 27px;
  margin-top: 8px;
  border-radius: 7px;
  background:
    linear-gradient(90deg, transparent 45%, rgba(120, 85, 20, 0.35) 45% 55%, transparent 55%),
    linear-gradient(0deg, transparent 30%, rgba(120, 85, 20, 0.35) 30% 36%, transparent 36% 64%, rgba(120, 85, 20, 0.35) 64% 70%, transparent 70%),
    linear-gradient(135deg, #f6dd8f, #d9ad4a 60%, #f3d27a);
  box-shadow: inset 0 0 0 1px rgba(120, 85, 20, 0.35);
}
.spend-card-amount {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}
.spend-card-amount small,
.spend-card-bottom small {
  font-size: 0.68rem;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.spend-card-amount strong {
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.spend-card-number {
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  opacity: 0.9;
}
.spend-card-bottom {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
}
.spend-card-bottom > div {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.spend-card-bottom span {
  overflow: hidden;
  font-weight: 700;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
  letter-spacing: 0.05em;
}
.spend-card-bottom > div:last-child {
  text-align: right;
}
.spend-card-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 16px;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid #e3edf2;
  border-radius: 12px;
  background: #fff;
  font-size: 0.85rem;
}
.spend-card-facts div {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.spend-card-facts dt {
  color: #587587;
  font-size: 0.75rem;
}
.spend-card-facts dd {
  margin: 0;
  color: #12324a;
  font-weight: 600;
}
@media (max-width: 767.98px) {
  .spend-grid {
    grid-template-columns: 1fr;
  }
  .spend-card-amount strong {
    font-size: 1.5rem;
  }
}
