:root {
  --green: #007d58;
  --green-strong: #005b42;
  --teal: #0b8589;
  --gold: #c49a43;
  --ink: #14212c;
  --muted: #5f6f7e;
  --line: #d8e1e7;
  --surface: #ffffff;
  --canvas: #f3f6f7;
  --danger: #a93636;
}

.questionnaire-readiness {
  margin: 0 0 20px;
  padding: 18px 20px;
  border: 1px solid #d5dee8;
  border-left: 4px solid #b7791f;
  background: #fff;
}
.questionnaire-readiness.is-ready { border-left-color: #15825f; }
.questionnaire-readiness.is-incomplete { border-left-color: #b84a4a; }
.readiness-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.readiness-heading small {
  display: block;
  margin-bottom: 3px;
  color: #667281;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}
.readiness-heading strong { font-size: 19px; }
.readiness-score {
  min-width: 58px;
  color: #0b735b;
  font-size: 22px;
  font-weight: 800;
  text-align: right;
}
.readiness-track {
  height: 8px;
  margin-top: 12px;
  overflow: hidden;
  background: #e7edf2;
  border-radius: 4px;
}
.readiness-track span {
  display: block;
  height: 100%;
  background: #16876d;
}
.is-warning .readiness-track span { background: #c39127; }
.is-incomplete .readiness-track span { background: #b84a4a; }
.readiness-list { margin-top: 14px; }
.readiness-list strong { font-size: 14px; }
.readiness-list ul {
  margin: 7px 0 0;
  padding-left: 20px;
  color: #5f6874;
}
.readiness-list.is-advisory { color: #7d5d17; }
.questionnaire-launch-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.questionnaire-launch-grid a {
  min-height: 126px;
  padding: 20px;
  border: 1px solid #d5dee8;
  border-left: 4px solid #128778;
  color: #172331;
  text-decoration: none;
}
.questionnaire-launch-grid a:hover {
  border-color: #128778;
  background: #f4fbf9;
}
.questionnaire-launch-grid strong,
.questionnaire-launch-grid span { display: block; }
.questionnaire-launch-grid strong { margin-bottom: 8px; font-size: 18px; }
.questionnaire-launch-grid span { color: #667281; line-height: 1.45; }
.readiness-pill {
  display: inline-block;
  min-width: 54px;
  padding: 5px 8px;
  border-radius: 4px;
  background: #f6e8cc;
  color: #805a12;
  font-weight: 800;
  text-align: center;
}
.readiness-pill.is-ready {
  background: #dcefe8;
  color: #10694f;
}
@media (max-width: 1050px) {
  .questionnaire-launch-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .questionnaire-launch-grid { grid-template-columns: 1fr; }
}

* { box-sizing: border-box; }
html { max-width: 100%; overflow-x: hidden; }
body { max-width: 100%; margin: 0; padding-top: 72px; overflow-x: hidden; background: var(--canvas); color: var(--ink); font: 16px/1.45 "Segoe UI", Arial, sans-serif; }
img, svg, video, canvas { max-width: 100%; }
a { color: inherit; }
button, input { font: inherit; }
select, textarea { font: inherit; }
.topbar { position: fixed; inset: 0 0 auto 0; z-index: 100; width: 100%; max-width: 100%; min-width: 0; min-height: 76px; padding: 10px clamp(18px, 4vw, 52px); display: flex; align-items: center; justify-content: space-between; gap: 24px; background: var(--surface); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-logo {
  width: 112px;
  height: 52px;
  flex: 0 0 auto;
  display: block;
  overflow: hidden;
  border-radius: 4px;
  background: #00684b;
}
.brand-logo img {
  width: 100%;
  height: 100%;
  max-width: none;
  display: block;
  object-fit: cover;
  transform: scale(1.55);
  transform-origin: center;
}
.brand-copy { display: grid; }
.brand strong { font-size: 18px; }
.brand small { color: var(--muted); }
.topbar nav { display: flex; align-items: center; gap: 18px; }
.topbar nav a, .topbar nav button { border: 0; background: none; color: var(--green-strong); cursor: pointer; font-weight: 700; text-decoration: none; }
.page-shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 42px 0 64px; }
.page-heading { margin-bottom: 28px; }
.page-heading.with-action { display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.eyebrow { margin: 0 0 5px; color: var(--green); font-size: 13px; font-weight: 800; text-transform: uppercase; }
h1, h2, p { letter-spacing: 0; }
h1 { margin: 0; font-size: clamp(28px, 4vw, 42px); line-height: 1.15; }
.module-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.module-card { min-height: 230px; padding: 28px; display: flex; flex-direction: column; border: 1px solid var(--line); border-top: 4px solid var(--green); border-radius: 6px; background: var(--surface); text-decoration: none; box-shadow: 0 8px 24px rgba(20, 33, 44, .06); }
.module-card:nth-child(2) { border-top-color: var(--teal); }
.module-card:hover { border-color: var(--green); transform: translateY(-2px); }
.module-mark { color: var(--gold); font-weight: 800; }
.module-card h2 { margin: 20px 0 6px; font-size: 25px; }
.module-card p { margin: 0; color: var(--muted); }
.module-card strong { margin-top: auto; color: var(--green); }
.summary-band { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); background: var(--surface); border-top: 4px solid var(--green); border-bottom: 1px solid var(--line); }
.summary-band.health-accent { border-top-color: var(--teal); }
.summary-band div { min-height: 130px; padding: 24px; border-right: 1px solid var(--line); display: grid; align-content: center; }
.summary-band div:last-child { border-right: 0; }
.summary-band span { color: var(--muted); }
.summary-band strong { margin-top: 7px; font-size: 22px; }
.login-layout { min-height: calc(100vh - 170px); display: grid; place-items: center; }
.login-panel { width: min(440px, 100%); padding: 34px; border: 1px solid var(--line); border-top: 4px solid var(--green); border-radius: 6px; background: var(--surface); box-shadow: 0 14px 38px rgba(20, 33, 44, .08); }
.login-panel h1 { margin-bottom: 24px; font-size: 32px; }
.login-panel label { display: block; margin: 15px 0 6px; font-weight: 700; }
.login-panel input { width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid #b9c6cf; border-radius: 5px; }
.password-visibility-control { position: relative; display: block; width: 100%; }
.password-visibility-control input { width: 100%; padding-right: 52px !important; }
.password-visibility-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  width: 40px;
  height: 40px;
  padding: 0;
  transform: translateY(-50%);
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--green-strong);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.password-visibility-toggle:hover,
.password-visibility-toggle:focus-visible { background: var(--green-pale); outline: 2px solid transparent; }
.password-visibility-toggle[aria-pressed="true"] { background: var(--green-pale); }
.primary-command, .secondary-command { min-height: 44px; padding: 10px 18px; border-radius: 5px; font-weight: 800; text-decoration: none; cursor: pointer; }
.primary-command { width: 100%; margin-top: 24px; border: 1px solid var(--green); background: var(--green); color: white; }
.secondary-command { border: 1px solid var(--line); background: var(--surface); color: var(--green-strong); }
.form-error { padding: 10px 12px; border-left: 4px solid var(--danger); background: #fff1f1; color: var(--danger); }
.lead, .muted { color: var(--muted); }
.primary-link { min-height: 44px; padding: 10px 18px; display: inline-flex; align-items: center; border: 1px solid var(--green); border-radius: 5px; background: var(--green); color: white; font-weight: 800; text-decoration: none; }
.message-stack { margin-bottom: 18px; }
.message { margin: 0 0 8px; padding: 12px 16px; border-left: 4px solid var(--green); background: #e9f7f1; }
.filter-bar { max-width: 100%; min-width: 0; margin-bottom: 18px; padding: 18px; display: flex; flex-wrap: wrap; align-items: end; gap: 14px; border: 1px solid var(--line); background: var(--surface); }
.filter-bar label { flex: 1; display: grid; gap: 5px; font-weight: 700; }
.filter-bar input, .filter-bar select, .account-form input, .account-form select { width: 100%; min-height: 44px; padding: 9px 11px; border: 1px solid #b9c6cf; border-radius: 5px; background: white; }
.table-shell {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  background: var(--surface);
}
.auto-table-shell { margin-bottom: 18px; border-radius: 6px; }
.auto-table-shell:focus-visible { outline: 3px solid rgba(0, 139, 105, .22); outline-offset: 2px; }
.auto-table-shell > table { margin: 0; }
.auto-table-shell.is-wide > table { min-width: 760px; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: 15px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.data-table th { color: var(--muted); font-size: 13px; text-transform: uppercase; }
.data-table td small { display: block; color: var(--muted); }
.tag { margin: 0 5px 5px 0; padding: 4px 7px; display: inline-block; border-radius: 4px; background: #e4f3ee; color: var(--green-strong); font-size: 13px; font-weight: 700; }
.row-action { color: var(--green-strong); font-weight: 800; }
.state-ok { color: var(--green); font-weight: 800; }
.state-off { color: var(--danger); font-weight: 800; }
.presence-dot { width: 9px; height: 9px; margin-right: 7px; display: inline-block; border-radius: 50%; background: #7c8b96; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.status-disponible { background: #16844f; }
.status-non-disponible, .status-hors-service { background: #b63e3e; }
.status-en-pause { background: #c88916; }
.status-en-reunion { background: #2977b8; }
.status-occupe { background: #d26332; }
.status-teletravail { background: #128b91; }
.account-form { width: 100%; max-width: 100%; min-width: 0; display: grid; gap: 18px; }
.plain-fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.form-section { min-width: 0; max-width: 100%; padding: 24px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.form-section h2 { margin: 0 0 14px; font-size: 23px; }
.form-grid { width: 100%; max-width: 100%; min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid label { display: grid; gap: 6px; font-weight: 700; }
.form-grid label small { color: var(--muted); font-weight: 400; }
.form-grid .check-field { align-content: end; grid-template-columns: auto 1fr; }
.form-grid .check-field input { width: 20px; min-height: 20px; }
.choice-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.choice-grid label, .module-permission-columns label { min-height: 44px; padding: 10px; display: flex; align-items: flex-start; gap: 9px; border: 1px solid var(--line); border-radius: 5px; }
.choice-grid input, .module-permission-columns input { width: 18px; height: 18px; margin-top: 2px; flex: 0 0 auto; }
.module-permission-columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.module-permission-columns fieldset { padding: 14px; display: grid; gap: 8px; border: 1px solid var(--line); }
.module-permission-columns legend { padding: 0 7px; font-weight: 800; }
.field-error { color: var(--danger) !important; }
.form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.permission-toolbar { margin-bottom: 14px; display: flex; align-items: end; gap: 12px; }
.permission-toolbar label { width: min(520px, 100%); display: grid; gap: 6px; font-weight: 700; }
.permission-toolbar input { width: 100%; min-height: 44px; padding: 9px 11px; border: 1px solid #b9c6cf; border-radius: 5px; }
.permission-fieldset-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.permission-fieldset-actions { display: flex; gap: 6px; }
.permission-fieldset-actions button { min-height: 34px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 4px; background: white; color: var(--green-strong); font-size: 12px; font-weight: 800; cursor: pointer; }
.account-form > .form-actions { position: sticky; bottom: 0; z-index: 5; padding: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, .96); box-shadow: 0 -6px 18px rgba(20, 39, 52, .06); }
.form-section-navigation {
  position: sticky;
  top: 76px;
  z-index: 7;
  margin-bottom: 14px;
  padding: 9px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 4px 14px rgba(20, 39, 52, .06);
  scrollbar-width: thin;
}
.form-section-navigation strong { flex: 0 0 auto; color: var(--muted); font-size: 12px; text-transform: uppercase; }
.form-section-navigation a { flex: 0 0 auto; padding: 7px 10px; border-radius: 4px; background: var(--green-pale); color: var(--green-strong); font-size: 13px; font-weight: 800; text-decoration: none; }
.form-section-navigation a:hover, .form-section-navigation a:focus-visible { background: #d7eee7; }
.form-section { scroll-margin-top: 138px; }
.invoice-decision-actions { display: grid; gap: 12px; }
.invoice-decision-actions form { width: 100%; }
.invoice-decision-actions .inline-invoice-form { display: grid; grid-template-columns: minmax(220px, 1fr) auto; gap: 10px; }
.invoice-decision-actions input { min-height: 44px; padding: 9px 11px; border: 1px solid #b9c6cf; border-radius: 5px; }
@media (max-width: 720px) {
  .invoice-decision-actions .inline-invoice-form { grid-template-columns: 1fr; }
}

/* Validation et erreurs communes */
.errorlist {
  margin: 6px 0 0;
  padding: 8px 12px 8px 30px;
  border-left: 3px solid var(--danger);
  border-radius: 4px;
  background: #fff4f4;
  color: var(--danger);
  font-size: 13px;
}
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] {
  border-color: var(--danger) !important;
  box-shadow: 0 0 0 3px rgba(169, 54, 54, .1);
}
.is-loading { cursor: wait !important; opacity: .72; }

.error-page {
  min-height: min(560px, calc(100vh - 180px));
  display: grid;
  grid-template-columns: minmax(150px, .42fr) minmax(0, 1fr);
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-top: 4px solid var(--green);
  border-radius: 7px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.error-code {
  height: 100%;
  display: grid;
  place-items: center;
  background: #edf7f3;
  color: var(--green-strong);
  font-size: clamp(58px, 9vw, 118px);
  font-weight: 900;
}
.error-page-copy { padding: clamp(28px, 5vw, 68px); }
.error-page-copy h1 { font-size: clamp(30px, 4vw, 46px); }
.error-detail { max-width: 760px; padding: 13px 15px; border-left: 4px solid var(--gold); background: #fff9ea; }
.error-page-actions { margin-top: 24px; }
.error-page-actions .primary-link, .error-page-actions .secondary-command { width: auto; margin-top: 0; }
.primary-command.compact { width: auto; margin: 0; }
.action-band { margin-top: 22px; padding: 24px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border: 1px solid var(--line); background: var(--surface); }
.dashboard-list { margin-top: 22px; }
.action-band h2, .section-heading h2 { margin: 0; }
.button-row { min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.button-row.wrap { flex-wrap: wrap; justify-content: flex-end; }
.kpi-strip { margin-bottom: 20px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border: 1px solid var(--line); border-top: 4px solid var(--green); background: var(--surface); }
.kpi-strip div { min-height: 100px; padding: 18px; display: grid; align-content: center; border-right: 1px solid var(--line); }
.kpi-strip div:last-child { border-right: 0; }
.kpi-strip span { color: var(--muted); font-size: 14px; }
.kpi-strip strong { margin-top: 4px; font-size: 21px; }
.section-heading { width: 100%; max-width: 100%; min-width: 0; margin-bottom: 15px; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.settings-grid-table { min-width: 1180px; }
.settings-grid-table input,
.settings-grid-table select { width: 100%; min-width: 130px; }
.settings-grid-table td:first-child input { min-width: 95px; }
.settings-grid-table input[type="checkbox"] { width: 20px; min-width: 20px; }
.settings-grid-table .errorlist { margin: 0 0 5px; padding: 0; color: #a62f2f; list-style: none; font-size: 12px; }
.sequence-settings-table { min-width: 1320px; }
.sequence-settings-table td { vertical-align: top; }
.sequence-inline-form { min-width: 330px; display: grid; grid-template-columns: repeat(2, minmax(135px, 1fr)); gap: 8px; }
.sequence-inline-form label { display: grid; gap: 4px; color: var(--muted); font-size: 12px; font-weight: 700; }
.sequence-inline-form input { width: 100%; min-height: 40px; }
.sequence-inline-form button { grid-column: 1 / -1; justify-self: start; }
.wide-section { width: 100%; max-width: 100%; margin-left: 0; transform: none; }
.guarantee-table { min-width: 1320px; }
.guarantee-table th, .guarantee-table td { padding: 10px; }
.guarantee-table input[type="number"], .guarantee-table input[type="text"] { width: 100%; min-width: 125px; min-height: 40px; padding: 7px 9px; border: 1px solid #b9c6cf; border-radius: 4px; }
.guarantee-table input[type="checkbox"] { width: 20px; height: 20px; }
.rd-proposal-form { width: 100%; min-width: 0; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.rd-proposal-form > * { min-width: 0; }
.rd-proposal-form .proposal-guarantees-section.wide-section { width: 100%; min-width: 0; margin-left: 0; transform: none; }
.rd-proposal-form .proposal-guarantees-section .table-shell { width: 100%; max-width: 100%; }
.proposal-risk-section[hidden], [data-usage-other][hidden], [data-iac-person][hidden], [data-iac-stage][hidden], .rc-standard-field[hidden] { display: none !important; }
.proposal-create-guarantees { min-width: 1240px; table-layout: fixed; }
.proposal-create-guarantees th:nth-child(1) { width: 70px; }
.proposal-create-guarantees th:nth-child(2) { width: 245px; }
.proposal-create-guarantees th:nth-child(3) { width: 285px; }
.proposal-create-guarantees th:nth-child(4),
.proposal-create-guarantees th:nth-child(6),
.proposal-create-guarantees th:nth-child(7) { width: 155px; }
.proposal-create-guarantees th:nth-child(5) { width: 190px; }
.proposal-create-guarantees th:nth-child(8) { width: 52px; }
.proposal-create-guarantees tr.excluded { opacity: .48; }
.proposal-create-guarantees .line-error td { padding: 5px 12px; color: var(--danger); background: #fff2f3; }
.proposal-create-guarantees .proposal-premium-footer th,
.proposal-create-guarantees .proposal-premium-footer td {
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  background: #fff;
  text-align: right;
  vertical-align: middle;
}
.proposal-create-guarantees .proposal-premium-footer th:first-child { text-align: left; }
.proposal-create-guarantees .proposal-premium-footer strong { color: var(--ink); white-space: nowrap; }
.proposal-create-guarantees .proposal-premium-footer .editable-premium-value {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}
.proposal-create-guarantees .proposal-premium-footer .editable-premium-value input[type="number"] {
  width: 120px;
  min-width: 0;
  text-align: right;
  font-weight: 800;
}
.proposal-create-guarantees .proposal-premium-total-row th,
.proposal-create-guarantees .proposal-premium-total-row td {
  color: var(--green-dark);
  background: var(--green-soft);
  font-size: 1rem;
}
.proposal-pricing-section { border-top: 4px solid var(--green); }
.rd-premium-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}
.rd-premium-summary > div {
  min-width: 0;
  padding: 18px;
  border-right: 1px solid var(--line);
}
.rd-premium-summary > div:last-child { border-right: 0; }
.rd-premium-summary span {
  display: block;
  color: var(--muted);
  font-size: 14px;
}
.rd-premium-summary strong {
  display: flex;
  gap: 5px;
  align-items: baseline;
  margin-top: 8px;
  color: var(--ink);
  font-size: 20px;
}
.rd-premium-summary strong span {
  color: inherit;
  font-size: inherit;
}
.rd-premium-summary .rd-premium-total {
  background: #e8f6f1;
}
.rd-premium-summary .rd-premium-total span,
.rd-premium-summary .rd-premium-total strong {
  color: var(--green-strong);
}
.free-extension-controls { display: flex; align-items: end; gap: 12px; margin-top: 14px; }
.free-extension-controls label { display: grid; min-width: 300px; gap: 6px; font-weight: 700; }
.free-extension-controls select { min-height: 42px; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 5px; background: white; }
.decision-section label { display: grid; gap: 6px; font-weight: 700; }
.decision-section textarea { width: 100%; padding: 10px; border: 1px solid #b9c6cf; border-radius: 5px; }
.danger-command { min-height: 44px; padding: 10px 18px; border: 1px solid var(--danger); border-radius: 5px; background: white; color: var(--danger); font-weight: 800; cursor: pointer; }
.status-approved { background: #d9f1e6; }
.status-rejected { background: #f8dede; color: var(--danger); }
.status-submitted { background: #fff1cf; color: #855f00; }
.filter-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.wide-table-shell { width: 100%; max-width: 100%; margin-left: 0; transform: none; }
.production-table { min-width: 1380px; }
.detail-grid { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); }
.detail-grid div { min-height: 84px; padding: 15px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.detail-grid dt { color: var(--muted); font-size: 13px; font-weight: 800; text-transform: uppercase; }
.detail-grid dd { margin: 6px 0 0; font-weight: 700; }
.pagination { margin-top: 18px; display: flex; align-items: center; justify-content: center; gap: 14px; }
.document-edit-section { margin-top: 20px; }
.document-meta-fields { grid-template-columns: 1fr; }
.document-meta-fields label { display: grid; gap: 6px; font-weight: 700; }
.document-meta-fields input[type="text"], .document-editor { width: 100%; padding: 12px; border: 1px solid #b9c6cf; border-radius: 5px; background: white; }
.document-editor { min-height: 520px; resize: vertical; font: 16px/1.65 "Segoe UI", Arial, sans-serif; }
.contract-document-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.contract-document-card {
  min-height: 190px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--teal);
  border-radius: 6px;
  background: #fff;
}
.contract-document-card > div:first-child {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.contract-document-card h3 { margin: 0; font-size: 18px; }
.contract-document-card p { margin: 0; color: var(--muted); }
.contract-document-card .button-row { margin-top: auto; }
.contract-preparation-form .one-column { grid-template-columns: 1fr; }
.contract-preparation-heading {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.print-toolbar { margin-bottom: 18px; display: flex; justify-content: flex-end; gap: 10px; }
.document-page { width: min(900px, 100%); min-height: 1120px; margin: 0 auto; padding: 58px 64px; border: 1px solid var(--line); background: white; box-shadow: 0 12px 34px rgba(20, 33, 44, .08); }

.endorsement-v1-form { display: grid; gap: 18px; }
.endorsement-v1-form .form-section { margin: 0; }
.endorsement-specifics [hidden], .endorsement-v1-form section[hidden] { display: none !important; }
.endorsement-actions { position: sticky; bottom: 0; z-index: 4; padding: 14px 16px; border: 1px solid var(--line); background: rgba(255, 255, 255, .96); }
.endorsement-preview-sheet { width: min(900px, 100%); margin: 0 auto; padding: 46px 54px; border: 1px solid var(--line); background: white; box-shadow: 0 12px 34px rgba(20, 33, 44, .08); }
.document-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 28px; padding-bottom: 18px; border-bottom: 3px solid var(--brand); }
.document-header h1 { margin: 4px 0 0; font-size: 28px; }
.document-reference { min-width: 180px; padding: 12px 14px; border: 1px solid var(--line); }
.document-reference span, .document-info-grid span { display: block; margin-bottom: 4px; color: var(--muted); font-size: 12px; text-transform: uppercase; }
.document-info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 22px 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.document-info-grid > div { min-height: 76px; padding: 13px 15px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.document-section { margin-top: 24px; }
.document-section h2 { margin: 0 0 10px; color: var(--brand); font-size: 18px; }
.document-table { width: 100%; border-collapse: collapse; }
.document-table th, .document-table td { padding: 9px 10px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.document-table th { background: #f0f5f4; }
.premium-preview-table { margin-left: auto; width: min(430px, 100%); }
.document-signature { margin-top: 34px; margin-left: auto; width: min(300px, 100%); text-align: center; }
.avoid-break { break-inside: avoid; page-break-inside: avoid; }
.document-letterhead { padding-bottom: 24px; display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; border-bottom: 4px solid var(--green); }
.document-letterhead h1 { max-width: 620px; font-size: 30px; text-transform: uppercase; }
.document-letterhead > strong { color: var(--green-strong); }
.document-identity { margin: 24px 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--line); }
.document-identity div { min-height: 74px; padding: 13px 16px; display: grid; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.document-identity span { color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.document-body { min-height: 360px; white-space: normal; line-height: 1.7; }
.document-guarantees { margin-top: 28px; page-break-inside: avoid; }
.document-guarantees table { width: 100%; border-collapse: collapse; }
.document-guarantees th, .document-guarantees td { padding: 10px; border: 1px solid var(--line); text-align: left; }
.document-signature { margin: 54px 0 0 auto; width: 280px; min-height: 120px; text-align: center; }
.status-ready { background: #fff1cf; color: #855f00; }
.status-archived { background: #e6edf2; color: #445463; }
.inline-command-form { display: flex; align-items: end; gap: 12px; }
.inline-command-form label, .statement-create-bar label { display: grid; gap: 5px; font-weight: 700; }
.inline-command-form input, .statement-create-bar input { min-height: 44px; padding: 9px 11px; border: 1px solid #b9c6cf; border-radius: 5px; }
.commission-filters { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.commission-entry-table { min-width: 1500px; }
.statement-create-bar { padding-top: 16px; display: flex; align-items: end; justify-content: flex-end; gap: 12px; }
.statement-create-bar label { width: min(520px, 100%); }
.commission-settlement { width: min(430px, 100%); margin: 34px 0 0 auto; padding: 18px 22px; border-top: 4px solid var(--green); background: #f2f8f5; }
.commission-settlement p { margin: 7px 0; display: flex; justify-content: space-between; gap: 20px; }
.commission-net { padding-top: 10px; border-top: 1px solid var(--line); font-size: 18px; }
.commission-state-page { width: min(1400px, 100%); margin-top: 24px; break-before: page; page-break-before: always; }
.commission-state-page .document-guarantees { overflow-x: auto; }
.commission-state-page .document-guarantees table { min-width: 1220px; font-size: 11px; }
.commission-state-page .document-guarantees th,
.commission-state-page .document-guarantees td { padding: 7px 6px; }
.claim-filters { display: grid; grid-template-columns: 1.5fr repeat(5, minmax(0, 1fr)) auto; }
.claim-table { min-width: 1450px; }
.reinsurance-filters { display: grid; grid-template-columns: 1.7fr repeat(3, minmax(0, 1fr)) auto; }
.reinsurance-table { min-width: 1500px; }
.reinsurance-rules { display: grid; gap: 20px; }
.reinsurance-rules .data-table { min-width: 1180px; }
.coinsurance-filters { display: grid; grid-template-columns: 1.7fr repeat(4, minmax(0, 1fr)) auto; }
.coinsurance-table { min-width: 1750px; }
.coinsurance-reference { display: grid; gap: 24px; }
.coinsurance-reference .data-table { min-width: 1180px; }
.policy-search-band { margin-bottom: 10px; padding: 18px; display: flex; align-items: end; gap: 12px; border: 1px solid var(--line); background: var(--surface); }
.policy-search-band label { width: min(680px, 100%); display: grid; gap: 6px; font-weight: 700; }
.policy-search-band input { width: 100%; min-height: 44px; padding: 9px 11px; border: 1px solid #b9c6cf; border-radius: 5px; }
.search-result-note { margin: 0 0 16px; color: var(--muted); }
.full-field { grid-column: 1 / -1; }
.claim-description { margin-top: 18px; padding: 18px; border-left: 4px solid var(--green); background: #f4f8f6; }
.claim-description p { margin-bottom: 0; }
details.form-section summary { cursor: pointer; font-size: 21px; }
.details-form { padding-top: 20px; }
.reject-claim-form { margin-top: 22px; padding-top: 20px; display: grid; gap: 14px; border-top: 1px solid var(--line); }
.reject-claim-form label { display: grid; gap: 6px; font-weight: 700; }
.reject-claim-form textarea { width: 100%; padding: 10px; border: 1px solid #b9c6cf; border-radius: 5px; }
.provider-request-editor { margin-top: 22px; }
.provider-request-table { min-width: 1900px; }
.provider-request-table input, .provider-request-table select, .provider-request-table textarea { width: 100%; min-width: 145px; padding: 8px; border: 1px solid #b9c6cf; border-radius: 4px; background: white; }
.provider-request-table textarea { min-height: 76px; resize: vertical; }
.provider-request-table ul.errorlist { margin: 5px 0; padding-left: 17px; color: var(--danger); font-size: 12px; }
.import-toolbar { margin: 18px 0; justify-content: space-between; }
.select-all-table-control {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  color: #075f4b;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: none;
  white-space: nowrap;
  cursor: pointer;
}
.select-all-table-control input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #00866a;
}
.import-control-table { min-width: 1900px; }
.import-control-table input[type="checkbox"] { width: 20px; height: 20px; }
.import-control-table th:first-child,
.import-control-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 3;
  min-width: 145px;
  background: #fff;
  border-right: 1px solid #cbd7de;
}
.import-control-table thead th:first-child {
  z-index: 5;
  background: #f2f6f7;
}
.danger-command.compact { min-height: 36px; padding: 6px 10px; }
.status-analyzed, .status-pending { background: #fff1cf; color: #855f00; }
.status-validated, .status-added { background: #d9f1e6; color: var(--green-strong); }
.status-duplicate, .status-ignored, .status-rejected { background: #e6edf2; color: #445463; }
.status-failed, .status-error { background: #f8dede; color: var(--danger); }

@media print {
  @page { size: A4 portrait; margin: 8mm 10mm; }
  body { background: white; }
  .topbar, .print-toolbar, .no-print { display: none !important; }
  .page-shell { width: 100%; padding: 0; }
  .document-page { width: 100%; min-height: auto; margin: 0; border: 0; box-shadow: none; }
  .commission-state-page { padding: 8mm; }
  .commission-state-page .document-guarantees { overflow: visible; }
  .commission-state-page .document-guarantees table { min-width: 0; font-size: 7px; }
  .commission-state-page .document-guarantees th,
  .commission-state-page .document-guarantees td { padding: 3px; }
  .endorsement-preview-sheet { width: 100%; margin: 0; padding: 8mm 10mm; border: 0; box-shadow: none; }
}

@media (max-width: 760px) {
  .topbar { align-items: flex-start; }
  .topbar nav { align-items: flex-end; flex-direction: column; gap: 5px; }
  .page-shell { width: min(100% - 22px, 1180px); padding-top: 26px; }
  .module-grid, .summary-band, .kpi-strip { grid-template-columns: 1fr; }
  .summary-band div { border-right: 0; border-bottom: 1px solid var(--line); }
  .page-heading.with-action { align-items: flex-start; flex-direction: column; }
  .filter-bar, .filter-grid, .form-grid, .choice-grid, .module-permission-columns, .detail-grid, .commission-filters { grid-template-columns: 1fr; }
  .filter-bar { align-items: stretch; flex-direction: column; }
  .action-band, .button-row { align-items: stretch; flex-direction: column; }
  .wide-section { width: 100%; margin-left: 0; transform: none; }
  .wide-table-shell { width: 100%; margin-left: 0; transform: none; }
  .document-page { min-height: 0; padding: 28px 20px; }
  .document-letterhead, .print-toolbar { align-items: flex-start; flex-direction: column; }
  .document-identity { grid-template-columns: 1fr; }
  .inline-command-form, .statement-create-bar { align-items: stretch; flex-direction: column; }
  .claim-filters, .reinsurance-filters, .coinsurance-filters { grid-template-columns: 1fr; }
  .policy-search-band { align-items: stretch; flex-direction: column; }
  .full-field { grid-column: auto; }
  .statement-create-bar label { width: 100%; }
}

/* Interface operationnelle V2 */
:root {
  --green: #00865f;
  --green-strong: #006348;
  --green-soft: #e7f4ef;
  --teal: #147a86;
  --blue: #315f8c;
  --gold: #b78324;
  --ink: #17232e;
  --muted: #61707e;
  --line: #d6dfe5;
  --line-strong: #bdcbd4;
  --surface: #ffffff;
  --surface-soft: #f7f9fa;
  --canvas: #eef2f4;
  --danger: #a93636;
  --warning: #a86505;
  --shadow: 0 8px 24px rgba(20, 39, 52, .07);
}

body { min-width: 320px; background: var(--canvas); }
h1 { font-size: 36px; }
h2 { font-size: 22px; }
button, input, select, textarea { color: var(--ink); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid rgba(20, 122, 134, .28); outline-offset: 2px; }

.topbar { z-index: 30; min-height: 72px; padding: 9px 22px; gap: 18px; box-shadow: 0 1px 0 var(--line); }
.brand strong { font-size: 17px; }
.module-context { margin-right: auto; padding: 7px 12px; border-left: 3px solid var(--green); color: var(--green-strong); font-size: 13px; font-weight: 800; text-transform: uppercase; }
.topbar nav { gap: 10px; }
.topbar nav form { margin: 0; }
.presence-control { min-height: 42px; padding: 5px 9px; display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 6px; background: white; }
.presence-control .presence-dot { flex: 0 0 auto; }
.presence-control select { width: auto; min-height: 30px; padding: 2px 24px 2px 2px; border: 0; background-color: transparent; font-weight: 800; }
.presence-control select:focus { outline: 0; }
.conversation-presence { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--muted); font-size: 12px; font-weight: 600; }
.conversation-presence span { display: inline-flex; align-items: center; }
.conversation-presence .presence-dot { margin-right: 5px; }
.account-chip { min-width: 145px; padding: 7px 11px; display: grid; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-soft); font-weight: 800; line-height: 1.2; }
.account-chip small { color: var(--muted); font-size: 10px; text-transform: uppercase; }
.notification-link { min-height: 42px; padding: 9px 12px; display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 6px; background: white !important; }
.notification-link strong, .workspace-card strong b { min-width: 24px; height: 24px; padding: 0 6px; display: inline-grid; place-items: center; border-radius: 12px; background: var(--danger); color: white; font-size: 12px; }

.app-frame { width: 100%; max-width: 100%; min-width: 0; display: grid; grid-template-columns: 248px minmax(0, 1fr); align-items: start; }
body:not(.has-sidebar) .app-frame { display: block; }
.sidebar { position: sticky; top: 72px; height: calc(100vh - 72px); padding: 18px 12px; overflow-y: auto; background: #103c35; color: #f3fbf8; border-right: 1px solid #0b302b; }
.sidebar-home { margin-bottom: 15px; padding: 10px; display: flex; align-items: center; gap: 10px; color: white; text-decoration: none; }
.sidebar-home span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 6px; background: white; color: var(--green-strong); font-weight: 900; }
.nav-group { margin: 0 0 6px; border-bottom: 1px solid rgba(255,255,255,.1); }
.nav-group summary { padding: 10px 9px; cursor: pointer; color: #d8ebe5; font-size: 12px; font-weight: 900; text-transform: uppercase; list-style-position: inside; }
.nav-group nav { padding: 0 0 8px; display: grid; gap: 2px; }
.nav-group nav a { padding: 8px 10px 8px 14px; border-left: 3px solid transparent; border-radius: 0 5px 5px 0; color: #f3fbf8; font-size: 14px; text-decoration: none; }
.nav-group nav a:hover { background: rgba(255,255,255,.08); }
.nav-group nav a.active { border-left-color: #e5b74f; background: rgba(255,255,255,.13); color: white; font-weight: 800; }
.module-switch { margin-top: 12px; padding: 10px; display: block; border: 1px solid rgba(255,255,255,.22); border-radius: 5px; color: white; text-align: center; text-decoration: none; font-size: 13px; font-weight: 800; }
.nav-subgroups { padding: 0 0 9px 9px; display: grid; gap: 6px; }
.nav-subgroup { border-bottom: 1px solid rgba(255,255,255,.08); }
.nav-subgroup:last-child { border-bottom: 0; }
.nav-subgroup > summary { margin: 0; padding: 9px 9px 9px 11px; border-radius: 5px; background: rgba(255,255,255,.07); color: #f4f8fa; font-size: 11px; font-weight: 900; line-height: 1.18; text-transform: uppercase; }
.nav-subgroup[open] > summary { background: #1b4b61; }
.nav-subgroup nav { padding: 5px 0 3px !important; }
.nav-subgroup nav a { padding-left: 13px !important; font-size: 13px !important; }
.sidebar-logout { margin-top: 8px; }
.sidebar-logout button { width: 100%; padding: 10px; border: 0; background: transparent; color: #f3fbf8; text-align: left; cursor: pointer; }
.sidebar-logout button:hover { background: rgba(255,255,255,.08); }

.page-shell { width: min(1480px, calc(100% - 40px)); max-width: 100%; min-width: 0; margin: 0 auto; padding: 30px 0 56px; }
.page-heading { margin-bottom: 22px; }
.page-heading .lead { margin: 7px 0 0; }
.eyebrow { color: var(--teal); }

.primary-command, .secondary-command, .primary-link, .danger-command { transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease; }
.primary-command, .primary-link { background: var(--green-strong); border-color: var(--green-strong); }
.primary-command:hover, .primary-link:hover { background: #004f3a; border-color: #004f3a; }
.secondary-command:hover { border-color: var(--green); background: var(--green-soft); }
.row-action { color: var(--teal); text-underline-offset: 3px; }

.workspace-section { margin: 0 0 20px; padding: 22px 0 4px; border-top: 1px solid var(--line-strong); }
.workspace-section:first-of-type { border-top: 4px solid var(--green); }
.workspace-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.workspace-card { min-height: 150px; padding: 18px; display: flex; flex-direction: column; border: 1px solid var(--line); border-left: 4px solid var(--teal); border-radius: 6px; background: var(--surface); color: var(--ink); text-decoration: none; box-shadow: 0 5px 14px rgba(20, 39, 52, .04); }
.workspace-card:hover { border-color: #9cbcb8; box-shadow: var(--shadow); transform: translateY(-2px); }
.workspace-card.featured { border-left-color: var(--green); }
.workspace-card.caution { border-left-color: var(--gold); }
.workspace-card.is-disabled { opacity: .72; cursor: not-allowed; box-shadow: none; }
.workspace-card.is-disabled:hover { border-color: var(--line); transform: none; }
.workspace-card > span { color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.workspace-card > strong { margin: 13px 0 5px; display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 18px; }
.workspace-card p { margin: auto 0 0; color: var(--muted); font-size: 14px; }
.recent-strip { margin: 0 0 20px; padding: 15px 0; display: grid; grid-template-columns: 190px minmax(0, 1fr); align-items: center; gap: 18px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.recent-strip h2 { margin: 0; font-size: 18px; }
.recent-links { display: flex; gap: 8px; overflow-x: auto; }
.recent-links a { min-width: 190px; padding: 10px 12px; display: grid; border-left: 3px solid var(--teal); background: white; color: var(--ink); text-decoration: none; }
.recent-links span { overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }

.content-section { width: 100%; max-width: 100%; min-width: 0; margin-bottom: 20px; padding: 22px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); box-shadow: 0 4px 16px rgba(20, 39, 52, .035); }
.action-notice { display: flex; align-items: center; justify-content: space-between; gap: 20px; border-left: 4px solid var(--green); background: #f1faf7; }
.action-notice p { margin: 5px 0 0; color: var(--muted); }
.collapsible-panel { padding: 0; overflow: hidden; }
.collapsible-panel > summary { padding: 18px 22px; cursor: pointer; border-bottom: 1px solid transparent; color: var(--ink); font-size: 18px; font-weight: 850; }
.collapsible-panel[open] > summary { border-bottom-color: var(--line); background: var(--surface-soft); }
.collapsible-panel > *:not(summary) { margin-left: 20px; margin-right: 20px; }
.collapsible-panel > *:last-child { margin-bottom: 20px; }

.metric-grid { margin-bottom: 20px; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.metric-grid article { min-height: 126px; padding: 17px; display: grid; align-content: center; border-top: 4px solid var(--teal); border-radius: 6px; background: white; box-shadow: 0 5px 16px rgba(20, 39, 52, .05); }
.metric-grid article:first-child, .metric-grid article:nth-child(2) { border-top-color: var(--green); }
.metric-grid span { color: var(--muted); font-size: 13px; }
.metric-grid strong { margin: 6px 0 2px; font-size: 22px; white-space: nowrap; }
.metric-grid small { color: var(--muted); }
.compact-filter label { display: grid; gap: 5px; color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.compact-filter select { min-width: 130px; min-height: 42px; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 5px; background: white; }
.analytics-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, .85fr); gap: 20px; }
.bar-chart { display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 46px minmax(100px, 1fr) 112px; align-items: center; gap: 10px; }
.branch-chart .bar-row { grid-template-columns: 110px minmax(70px, 1fr) 88px; }
.bar-row > span { overflow: hidden; color: var(--muted); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.bar-row > div { height: 14px; overflow: hidden; border-radius: 3px; background: #e8eef1; }
.bar-row i { height: 100%; display: block; border-radius: 3px; background: var(--teal); }
.branch-chart .bar-row i { background: var(--green); }
.bar-row strong { font-size: 13px; text-align: right; }

.validation-summary { margin-bottom: 18px; display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); background: white; }
.validation-summary span { padding: 16px; display: flex; align-items: baseline; gap: 8px; border-right: 1px solid var(--line); color: var(--muted); }
.validation-summary span:last-child { border-right: 0; }
.validation-summary strong { color: var(--ink); font-size: 24px; }
.notification-list { display: grid; gap: 10px; }
.notification-item { padding: 17px 18px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border: 1px solid var(--line); border-left: 5px solid var(--blue); border-radius: 6px; background: white; }
.notification-item.level-warning { border-left-color: var(--gold); }
.notification-item.level-critical { border-left-color: var(--danger); }
.notification-item.unread { background: #fbfdfc; box-shadow: 0 3px 12px rgba(20,39,52,.05); }
.notification-item h2 { margin: 3px 0; font-size: 18px; }
.notification-item p, .notification-item small { margin: 0; color: var(--muted); }
.notification-level { color: var(--teal); font-size: 11px; font-weight: 900; text-transform: uppercase; }
.empty-state { padding: 28px; border: 1px dashed var(--line-strong); color: var(--muted); text-align: center; }

.filter-bar { border-radius: 6px; box-shadow: 0 3px 12px rgba(20,39,52,.03); }
.filter-grid { grid-template-columns: 2fr 1.2fr 1.2fr auto; }
.check-filter { display: flex !important; align-items: center; flex-direction: row !important; gap: 9px !important; }
.check-filter input { width: 18px; height: 18px; }
.form-grid p { margin: 0; display: grid; gap: 6px; }
.form-grid p label { font-weight: 750; }
.form-grid p input:not([type="checkbox"]), .form-grid p select, .form-grid p textarea, .compact-form input:not([type="checkbox"]), .compact-form select, .compact-form textarea { width: 100%; min-height: 44px; padding: 9px 11px; border: 1px solid var(--line-strong); border-radius: 5px; background: white; }
.form-grid p textarea, .compact-form textarea { min-height: 82px; }
.form-grid p input[type="checkbox"] { width: 20px; height: 20px; }
.form-grid .helptext { color: var(--muted); font-size: 12px; }
.form-grid .errorlist { margin: 0; padding-left: 18px; color: var(--danger); }
.provider-search-control { position: relative; width: 100%; }
.provider-search-input { width: 100%; }
.provider-search-source { display: none; }
.provider-search-results {
  position: absolute;
  z-index: 60;
  top: calc(100% + 5px);
  right: 0;
  left: 0;
  max-height: 310px;
  overflow-y: auto;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: var(--surface);
  box-shadow: 0 14px 30px rgba(20, 39, 52, .16);
}
.provider-search-results button,
.provider-search-results p {
  width: 100%;
  margin: 0;
  padding: 11px 13px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  text-align: left;
}
.provider-search-results button { cursor: pointer; }
.provider-search-results button:hover,
.provider-search-results button:focus-visible { background: #edf8f4; color: var(--green-strong); }
.provider-search-results > :last-child { border-bottom: 0; }
.provider-search-results p { color: var(--muted); }
.compact-form { padding-top: 18px; }
.subform { margin-top: 18px !important; padding-top: 18px; border-top: 1px solid var(--line); }
.export-form { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.table-shell { border-radius: 6px; }
.data-table thead { position: sticky; top: 0; z-index: 1; background: #f2f6f7; }
.data-table th { color: #526370; font-size: 12px; }
.data-table tbody tr:hover { background: #f8fbfa; }
.tag { border: 1px solid #cfe1db; }
.message { border-radius: 5px; box-shadow: 0 3px 10px rgba(20,39,52,.04); }

@media (max-width: 1180px) {
  .module-permission-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topbar { padding-right: 14px; padding-left: 14px; gap: 10px; }
  .brand-copy { display: none; }
  .module-context { padding-left: 8px; }
  .topbar nav { min-width: 0; gap: 6px; }
  .topbar nav a, .topbar nav button { font-size: 13px; }
  .account-chip { min-width: 0; }
}

@media (max-width: 1280px) {
  .workspace-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
  .module-context { display: none; }
  .topbar nav > a:not(.notification-link) { display: none; }
  .app-frame { display: block; }
  .sidebar { position: sticky; top: 72px; z-index: 20; width: 100%; height: auto; padding: 7px 10px; display: flex; align-items: center; gap: 5px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
  .sidebar::-webkit-scrollbar { display: none; }
  .sidebar-home { margin: 0; padding: 6px; }
  .sidebar-home strong { display: none; }
  .sidebar-home span { width: 32px; height: 32px; }
  .nav-group { margin: 0; display: block; border: 0; }
  .nav-group summary { display: none; }
  .nav-group nav { padding: 0; display: flex; gap: 4px; }
  .nav-group nav a { padding: 8px 10px; border: 0; border-radius: 4px; white-space: nowrap; }
  .nav-subgroups { padding: 0; display: flex; gap: 4px; }
  .nav-subgroup { display: block; border: 0; }
  .nav-subgroup > summary { display: none; }
  .nav-subgroup nav { padding: 0 !important; display: flex; }
  .nav-subgroup nav a { padding: 8px 10px !important; font-size: 13px !important; }
  .module-switch { margin: 0 0 0 auto; white-space: nowrap; }
  .sidebar-logout { display: none; }
  .analytics-grid { grid-template-columns: 1fr; }
  .workspace-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-shell { width: min(100% - 28px, 1480px); }
}

@media (max-width: 720px) {
  h1 { font-size: 30px; }
  h2 { font-size: 20px; }
  .topbar { min-height: 64px; padding: 8px 12px; flex-wrap: wrap; }
  .brand-copy, .module-context, .account-chip small { display: none; }
  .brand-logo { width: 92px; height: 44px; }
  .topbar nav { margin-left: auto; flex-direction: row; align-items: center; gap: 5px; }
  .account-chip { min-width: 0; padding: 7px; font-size: 12px; }
  .notification-link { padding: 7px; font-size: 0; }
  .notification-link strong { font-size: 11px; }
  .topbar nav > a:not(.notification-link) { display: none; }
  .sidebar { top: 64px; }
  .page-shell { width: min(100% - 20px, 1480px); padding-top: 22px; }
  .workspace-grid, .metric-grid, .validation-summary, .export-form { grid-template-columns: 1fr; }
  .recent-strip { grid-template-columns: 1fr; }
  .workspace-card { min-height: 132px; }
  .page-heading.with-action, .notification-item { align-items: stretch; flex-direction: column; }
  .notification-item .button-row { flex-direction: row; }
  .section-heading, .action-band { align-items: stretch; flex-direction: column; }
  .form-actions { flex-wrap: wrap; }
  .form-section-navigation { position: static; }
  .free-extension-controls { align-items: stretch; flex-direction: column; }
  .free-extension-controls label { width: 100%; min-width: 0; }
  .bar-row, .branch-chart .bar-row { grid-template-columns: 82px minmax(70px, 1fr); }
  .bar-row strong { grid-column: 2; }
  .filter-grid { grid-template-columns: 1fr; }
  .content-section { padding: 17px; }
  .action-notice { align-items: stretch; flex-direction: column; }
  .collapsible-panel { padding: 0; }
  .error-page { min-height: 0; grid-template-columns: 1fr; }
  .error-code { min-height: 130px; }
  .error-page-copy { padding: 24px 18px; }
  .error-page-actions { align-items: stretch; flex-direction: column; }
  .error-page-actions .primary-link, .error-page-actions .secondary-command { width: 100%; justify-content: center; }
}

/* Espace Assurance Sante */
body.health-module .sidebar { background: #123b35; }
body.health-module .sidebar-home span { color: #007d58; }
body.health-module .workspace-section:first-of-type { border-top-color: #009e69; }
body.health-module .workspace-card { border-left-color: #009e69; }
.health-metrics article { border-top-color: #009e69; }
.health-metrics article:nth-child(3n) { border-top-color: #147a86; }
.fit-command { width: auto; margin-top: 0; }
.content-section > h2:first-child { margin-top: 0; }
.detail-grid > .content-section { margin: 0; border: 0; border-radius: 0; box-shadow: none; }
.detail-grid > .content-section + .content-section { border-left: 1px solid var(--line); }
.definition-grid { margin: 0; display: grid; grid-template-columns: minmax(130px, .7fr) minmax(0, 1.3fr); }
.definition-grid dt, .definition-grid dd { margin: 0; padding: 10px 0; border-bottom: 1px solid var(--line); }
.definition-grid dt { color: var(--muted); font-size: 13px; font-weight: 800; }
.definition-grid dd { overflow-wrap: anywhere; }
.compact-list { display: grid; }
.compact-list a { padding: 12px 0; display: grid; border-bottom: 1px solid var(--line); text-decoration: none; }
.compact-list span { color: var(--muted); font-size: 13px; }
.family-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.family-grid a { min-height: 86px; padding: 15px; display: grid; align-content: center; border-left: 4px solid var(--teal); background: var(--surface-soft); text-decoration: none; }
.family-grid span { color: var(--muted); font-size: 13px; }
.eligibility-panel { margin-bottom: 20px; padding: 24px; display: grid; gap: 5px; border-left: 6px solid var(--danger); background: white; }
.eligibility-panel strong { font-size: 24px; }
.eligibility-panel.is-allowed, .eligibility-state.is-allowed { border-color: var(--green); color: var(--green-strong); }
.eligibility-panel.is-denied, .eligibility-state.is-denied { border-color: var(--danger); color: var(--danger); }
.eligibility-state { padding: 12px; border-left: 4px solid; background: var(--surface-soft); font-weight: 800; }
.alert-critical { border-color: #e1b9b9; background: #fff0f0; color: var(--danger); }
.alert-warning, .alert-watch { border-color: #e9d4a6; background: #fff8e8; color: var(--warning); }

@media (max-width: 860px) {
  .family-grid { grid-template-columns: 1fr; }
  .detail-grid > .content-section + .content-section { border-left: 0; border-top: 1px solid var(--line); }
  .definition-grid { grid-template-columns: 1fr; }
  .definition-grid dt { padding-bottom: 2px; border-bottom: 0; }
  .definition-grid dd { padding-top: 2px; }
}

@media print {
  .sidebar, .module-context, .notification-link { display: none !important; }
  .app-frame { display: block; }
  .page-shell { width: 100%; }
}

/* Habillage de transition : reperes visuels de la version pilote RD. */
body.has-sidebar {
  --canvas: #f2f5f8;
  --surface-soft: #f7f9fb;
  --line: #d4dee6;
  --line-strong: #bdcad4;
  --ink: #102235;
  --muted: #607084;
  padding-top: 76px;
}

body.has-sidebar .topbar {
  min-height: 76px;
  background: #f5f7fa;
  border-bottom-color: #d1dbe4;
  box-shadow: none;
}

body.has-sidebar .module-context {
  color: #102235;
  border-left-color: #148487;
}

body.has-sidebar .app-frame {
  grid-template-columns: 278px minmax(0, 1fr);
}

body.has-sidebar .sidebar {
  top: 76px;
  height: calc(100vh - 76px);
  padding: 18px 10px;
  background: #11293b;
  border-right-color: #0a1d2c;
  color: #f4f8fb;
}

body.has-sidebar .sidebar-home {
  margin: 0 0 20px;
  padding: 4px 2px 16px;
  align-items: flex-start;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}

body.has-sidebar .sidebar-home span {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  background: #eef8f6;
  color: #0b7f83;
}

body.has-sidebar .sidebar-home strong {
  display: grid;
  color: #ffffff;
  font-size: 16px;
  line-height: 1.18;
}

body.has-sidebar .sidebar-home small {
  margin-top: 4px;
  color: #c7d7e1;
  font-size: 12px;
  font-weight: 400;
}

body.has-sidebar .nav-group {
  margin-bottom: 7px;
  border-bottom-color: rgba(255, 255, 255, .08);
}

body.has-sidebar .nav-group summary {
  padding: 11px 8px;
  color: #f6f9fb;
  font-size: 14px;
  text-transform: none;
}

body.has-sidebar .nav-group nav a {
  padding: 9px 10px 9px 16px;
  color: #e7f0f5;
}

body.has-sidebar .nav-group nav a:hover {
  background: #1b3c54;
}

body.has-sidebar .nav-group nav a.active {
  border-left-color: #18a3a4;
  background: #e4f2f2;
  color: #087d82;
}

body.has-sidebar .module-switch {
  border-color: #496274;
  background: #1a3447;
}

body.has-sidebar .page-shell {
  width: min(1540px, calc(100% - 42px));
  padding-top: 28px;
}

body.has-sidebar .workspace-section:first-of-type {
  border-top-color: #15868a;
}

body.has-sidebar .workspace-card {
  min-height: 142px;
  border-left-color: #15868a;
  box-shadow: none;
}

body.has-sidebar .workspace-card.featured {
  border-left-color: #087d58;
}

body.has-sidebar .workspace-card:hover {
  border-color: #98afb9;
  box-shadow: 0 5px 16px rgba(15, 37, 53, .08);
}

.health-proposal-form,
.provider-dispense-panel {
  display: grid;
  gap: 22px;
}

.health-form-band + .health-form-band {
  padding-top: 20px;
  border-top: 1px solid #d7e1e8;
}

.health-form-band h2,
.section-heading-row h2 {
  margin: 0 0 8px;
  font-size: 21px;
}

.section-note {
  margin: 0 0 14px;
  color: #5d6c7c;
}

.health-category-table {
  display: grid;
  gap: 8px;
}

.health-category-row {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 160px 160px;
  gap: 12px;
  align-items: center;
}

.health-category-row select,
.health-category-row input,
.dispense-line input {
  width: 100%;
}

.health-direct-proposal {
  display: grid;
  gap: 14px;
}

.health-proposal-heading {
  margin-bottom: 16px;
}

.health-proposal-section {
  min-width: 0;
  padding: 18px;
  border: 1px solid #cbd9e1;
  border-radius: 6px;
  background: #fff;
}

.health-section-heading {
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.health-section-heading.compact {
  margin: 0;
  padding: 14px 0 10px;
}

.health-section-heading h2,
.health-section-heading h3 {
  margin: 0;
  font-size: 19px;
}

.health-section-heading h3 {
  font-size: 17px;
}

.health-proposal-grid {
  gap: 10px 14px;
}

.health-proposal-grid label,
.health-block-field {
  display: grid;
  gap: 5px;
  color: #4f6275;
  font-size: 13px;
  font-weight: 750;
}

.health-proposal-grid input:not([type="checkbox"]),
.health-proposal-grid select,
.health-proposal-grid textarea,
.health-block-field textarea {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid #c5d2dc;
  border-radius: 5px;
  background: #fff;
}

.health-proposal-grid textarea,
.health-block-field textarea {
  resize: vertical;
}

.health-proposal-grid input[readonly],
.health-category-pricing-table input[readonly] {
  background: #f0f4f6;
  color: #5c6a77;
}

.health-checkbox-field {
  min-height: 40px;
  display: flex !important;
  align-items: center;
  gap: 9px !important;
  color: var(--ink) !important;
}

.health-checkbox-field input {
  width: 18px;
  height: 18px;
}

.locked-field {
  opacity: .62;
}

.health-category-editor {
  margin-top: 12px;
}

.health-category-pricing-table {
  min-width: 1280px;
  table-layout: fixed;
}

.health-category-pricing-table th,
.health-category-pricing-table td,
.health-guarantee-editor th,
.health-guarantee-editor td {
  padding: 9px 10px;
  vertical-align: middle;
}

.health-category-pricing-table input,
.health-guarantee-editor input,
.health-guarantee-editor textarea {
  width: 100%;
  min-height: 38px;
  padding: 7px 9px;
  border: 1px solid #c5d2dc;
  border-radius: 5px;
  background: white;
}

.health-guarantee-editor {
  min-width: 1220px;
  table-layout: fixed;
}

.health-guarantee-editor th:nth-child(1) { width: 23%; }
.health-guarantee-editor th:nth-child(2) { width: 23%; }
.health-guarantee-editor th:nth-child(3) { width: 22%; }
.health-guarantee-editor th:nth-child(4) { width: 25%; }
.health-guarantee-editor th:nth-child(5) { width: 7%; }

.health-guarantee-editor textarea {
  resize: vertical;
}

.health-table-actions {
  padding: 12px 0 14px;
  display: flex;
  justify-content: flex-end;
}

.compact-command,
.table-command {
  min-height: 34px;
  padding: 6px 10px;
  white-space: nowrap;
}

.table-command {
  font-size: 12px;
}

.health-premium-summary {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border: 1px solid #cbd9e1;
  background: #fff;
}

.health-premium-summary div {
  min-height: 66px;
  padding: 11px 13px;
  display: grid;
  align-content: center;
  border-right: 1px solid #d8e1e7;
  border-bottom: 1px solid #d8e1e7;
}

.health-premium-summary div:nth-child(5n) {
  border-right: 0;
}

.health-premium-summary div:nth-last-child(-n+5) {
  border-bottom: 0;
}

.health-premium-summary span {
  color: #526579;
  font-size: 12px;
}

.health-premium-summary strong {
  margin-top: 3px;
}

.health-premium-summary .health-premium-total {
  background: #e5f5ee;
  color: #006d4e;
}

.health-proposal-actions {
  margin-top: 16px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.health-proposal-actions .primary-command {
  width: auto;
  margin: 0;
}

.health-category-heading {
  padding: 0 10px;
  color: #526579;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.field-error,
.error-message {
  color: #9f2530;
}

.health-care-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.health-patient-search {
  display: grid;
  grid-template-columns: minmax(240px, .8fr) minmax(420px, 1.6fr);
  gap: 28px;
  align-items: center;
  margin-bottom: 20px;
  padding: 22px 24px;
  border-left: 4px solid #008b72;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(25, 42, 55, .06);
}

.health-patient-search h2,
.health-patient-search p { margin: 0; }
.health-patient-search h2 { margin-top: 3px; }
.health-patient-search p:last-child { margin-top: 7px; color: #667281; }

.health-patient-search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.health-patient-search-form input {
  width: 100%;
  min-height: 48px;
  font-size: 16px;
}

.health-priority-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid #dae1e9;
  border-left: 1px solid #dae1e9;
}

.health-priority-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 12px;
  min-height: 104px;
  padding: 16px 18px;
  color: #202a37;
  border-right: 1px solid #dae1e9;
  border-bottom: 1px solid #dae1e9;
  text-decoration: none;
}

.health-priority-item span { font-weight: 800; }
.health-priority-item strong { color: #667281; font-size: 24px; }
.health-priority-item small { grid-column: 1 / -1; color: #667281; line-height: 1.4; }
.health-priority-item.has-items { border-left: 4px solid #d49a00; }
.health-priority-item.has-items strong { color: #a66600; }
.health-priority-item:hover { background: #f4faf8; }

.health-beneficiary-metrics {
  margin: 16px 0 20px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.section-heading-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.dispense-grid {
  display: grid;
  gap: 10px;
}

.dispense-line {
  display: grid;
  grid-template-columns: minmax(260px, 1.4fr) 130px 160px 180px auto;
  gap: 12px;
  align-items: end;
  padding: 14px;
  border: 1px solid #d4e0e7;
  border-left: 4px solid #148487;
  border-radius: 6px;
  background: #f9fbfc;
}

.dispense-line label {
  display: grid;
  gap: 5px;
  color: #526579;
  font-size: 12px;
  font-weight: 700;
}

.dispense-description {
  display: grid;
  gap: 4px;
}

.dispense-description small,
.dispense-description span {
  color: #5d6c7c;
}

.inline-invoice-form {
  display: grid;
  min-width: 210px;
  gap: 6px;
}

.health-consultation-form,
.prescription-formset {
  display: grid;
  gap: 16px;
}

.doctor-consultation-form {
  display: grid;
  gap: 18px;
  max-width: 1560px;
  margin: 0 auto;
}

.doctor-page-heading {
  max-width: 1560px;
  margin-right: auto;
  margin-left: auto;
}

.doctor-lookup-section,
.doctor-section {
  margin: 0;
}

.doctor-lookup-section {
  border-top: 4px solid #008b69;
  background: #f8fbfa;
  box-shadow: 0 7px 22px rgba(15, 39, 52, .06);
}

.doctor-section {
  overflow: hidden;
  border-left: 4px solid #138a75;
  box-shadow: 0 7px 22px rgba(15, 39, 52, .055);
}

.doctor-section > .section-heading-row {
  margin: -22px -22px 20px;
  padding: 15px 20px;
  border-bottom: 1px solid #d8e2e8;
  background: #f4f7f9;
}

.doctor-section > .section-heading-row > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.doctor-section > .section-heading-row .eyebrow {
  min-width: 72px;
  margin: 0;
  padding: 6px 9px;
  border: 1px solid #b8ddcf;
  border-radius: 4px;
  background: #e6f5ef;
  color: #08745d;
  text-align: center;
  white-space: nowrap;
}

.doctor-section > .section-heading-row h2 {
  margin: 0;
  color: #14283a;
  font-size: 22px;
  line-height: 1.2;
}

.doctor-lookup-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1.2fr) minmax(260px, 1fr) minmax(220px, .8fr);
  gap: 14px;
  align-items: end;
}

.doctor-field {
  display: grid;
  min-width: 0;
  align-content: end;
}

.doctor-field > div,
.doctor-field > label {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.doctor-field .helptext {
  margin: 0;
  color: #647487;
  font-size: 11px;
  line-height: 1.35;
}

.doctor-field .errorlist {
  margin: 0;
  padding-left: 18px;
  color: #a62d2d;
  font-size: 12px;
}

.doctor-field label,
.doctor-search-field {
  color: #31485b !important;
  font-size: 12px !important;
  font-weight: 800 !important;
}

.doctor-field input,
.doctor-field select,
.doctor-field textarea,
.doctor-search-field input {
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #c6d3dc;
  border-radius: 5px;
  background: #fff;
  color: #172b3c;
  font-size: 14px;
  box-shadow: inset 0 1px 2px rgba(20, 43, 58, .025);
}

.doctor-field textarea {
  min-height: 88px;
  resize: vertical;
}

.doctor-field input:focus,
.doctor-field select:focus,
.doctor-field textarea:focus,
.doctor-search-field input:focus {
  outline: 3px solid rgba(0, 139, 105, .14);
  border-color: #008b69;
}

.doctor-field input:disabled,
.doctor-field input[readonly],
.doctor-field select:disabled,
.doctor-field textarea:disabled {
  opacity: 1;
  border-color: #d5dfe5;
  background: #eef3f5;
  color: #465b6b;
}

.doctor-lookup-grid label,
.doctor-four-column-grid label,
.doctor-two-column-grid label,
.doctor-three-column-grid label,
.doctor-prescription-row label,
.doctor-prescription-target label {
  display: grid;
  gap: 6px;
  color: #4e6072;
  font-size: 12px;
  font-weight: 750;
}

.doctor-lookup-grid input,
.doctor-lookup-grid select,
.doctor-section input,
.doctor-section select,
.doctor-section textarea {
  width: 100%;
}

.doctor-beneficiary-summary,
.doctor-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border: 1px solid #d5e0e7;
  border-top: 3px solid #1b8b77;
  background: #fbfcfd;
}

.doctor-beneficiary-summary > div,
.doctor-summary-grid > div {
  min-width: 0;
  min-height: 76px;
  padding: 14px 16px;
  border-right: 1px solid #d5e0e7;
  border-bottom: 1px solid #d5e0e7;
}

.doctor-beneficiary-summary > div:nth-child(5n),
.doctor-summary-grid > div:nth-child(5n) {
  border-right: 0;
}

.doctor-beneficiary-summary > div:nth-last-child(-n + 5),
.doctor-summary-grid > div:nth-last-child(-n + 5) {
  border-bottom: 0;
}

.doctor-beneficiary-summary span,
.doctor-summary-grid span {
  display: block;
  margin-bottom: 5px;
  color: #557083;
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
}

.doctor-beneficiary-summary strong,
.doctor-summary-grid strong {
  display: block;
  overflow-wrap: anywhere;
  color: #10283a;
  font-size: 15px;
}

.doctor-right-buttons {
  justify-content: flex-end;
  margin-top: 12px;
}

.doctor-information-panel {
  margin-top: 12px;
  padding: 14px 16px;
  border-left: 4px solid #148a72;
  background: #eef8f5;
}

.doctor-information-panel p {
  margin: 5px 0 0;
  color: #526579;
}

.doctor-four-column-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px 22px;
}

.doctor-two-column-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px 22px;
  margin-top: 17px;
}

.doctor-three-column-grid {
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 17px 22px;
  margin-bottom: 14px;
}

.doctor-tariff-summary {
  display: grid;
  grid-template-columns: 1fr 220px 1.2fr;
  gap: 0;
  margin-top: 17px;
  border: 1px solid #b8ddcf;
  border-left: 4px solid #008b69;
  background: #edf8f4;
}

.doctor-tariff-summary > div {
  min-width: 0;
  padding: 12px 15px;
  border-right: 1px solid #cce4db;
}

.doctor-tariff-summary > div:last-child {
  border-right: 0;
}

.doctor-tariff-summary span {
  display: block;
  margin-bottom: 4px;
  color: #567064;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.doctor-tariff-summary strong {
  color: #123d32;
  font-size: 13px;
}

.doctor-prescription-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  margin: 16px 0;
  padding-bottom: 1px;
  border-bottom: 1px solid #d5e0e7;
}

.doctor-tab {
  flex: 0 0 auto;
  padding: 11px 14px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: #53677a;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.doctor-tab span {
  display: inline-grid;
  min-width: 22px;
  height: 22px;
  margin-left: 5px;
  place-items: center;
  border-radius: 50%;
  background: #e5edf1;
  font-size: 11px;
}

.doctor-tab.is-active {
  border-bottom-color: #008b69;
  color: #007d58;
}

.doctor-tab.is-active span {
  background: #d9f1e8;
}

.doctor-prescription-rows {
  display: grid;
  gap: 0;
}

.doctor-prescription-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.7fr) minmax(130px, .85fr) minmax(150px, 1fr) minmax(110px, .7fr) 85px 100px 135px 76px;
  gap: 8px;
  align-items: center;
  min-width: 1120px;
  padding: 9px 10px;
  border: 1px solid #d6e0e6;
  border-top: 0;
  background: #fff;
}

.doctor-prescription-row[hidden],
.doctor-prescription-row.is-prescription-hidden {
  display: none !important;
}

.doctor-prescription-table {
  overflow-x: auto;
  border-top: 1px solid #d6e0e6;
}

.doctor-prescription-table-head {
  display: grid;
  grid-template-columns: minmax(220px, 1.7fr) minmax(130px, .85fr) minmax(150px, 1fr) minmax(110px, .7fr) 85px 100px 135px 76px;
  gap: 8px;
  min-width: 1120px;
  padding: 10px;
  background: #edf3f6;
  color: #40576a;
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.doctor-kind-field,
.doctor-hidden-prescription-fields,
.doctor-delete-field {
  display: none;
}

.doctor-table-field,
.doctor-agreement-field {
  min-width: 0;
}

.doctor-table-field input {
  min-height: 38px;
  padding: 7px 9px;
}

.doctor-agreement-field {
  display: grid;
  place-items: center;
}

.doctor-agreement-field input {
  width: 20px;
  min-height: 20px;
}

.doctor-line-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #dce5ea;
}

.icon-text-button {
  padding: 4px 7px;
  border: 0;
  background: transparent;
  color: #087e72;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.doctor-prescription-main {
  grid-template-columns: 180px minmax(250px, 1fr) 120px 150px;
}

.doctor-prescription-details {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  margin-top: 12px;
}

.doctor-prescription-controls {
  grid-template-columns: 190px minmax(260px, 1fr) 180px;
  align-items: end;
  margin-top: 12px;
}

.doctor-line-status {
  display: grid;
  min-height: 38px;
  padding: 6px 8px;
  place-items: center;
  border: 1px solid #add9c9;
  background: #e7f5ef;
  color: #167554;
  font-size: 12px;
  font-weight: 800;
}

.doctor-line-status.is-pending {
  border-color: #ead292;
  background: #fff5d9;
  color: #8b6411;
}

.doctor-add-line {
  margin-top: 12px;
}

.doctor-prescription-target {
  max-width: 480px;
  margin-top: 14px;
}

.doctor-alert-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 15px 17px;
  border-left: 4px solid #c99417;
  background: #fff9ea;
}

.doctor-alert-box p {
  margin: 4px 0 0;
  color: #586a7b;
}

#doctor-justification-wrap {
  margin-top: 14px;
}

.doctor-form-actions {
  gap: 10px;
  z-index: 20;
  border-left: 4px solid #008b69;
  box-shadow: 0 10px 28px rgba(17, 43, 59, .16);
}

.doctor-prescription-dialog {
  width: min(860px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
  padding: 0;
  border: 1px solid #cad8df;
  background: white;
  box-shadow: 0 22px 70px rgba(13, 35, 52, .24);
}

.doctor-prescription-dialog::backdrop {
  background: rgba(12, 31, 45, .55);
}

.doctor-dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid #d5e0e7;
}

.doctor-dialog-heading h2,
.doctor-dialog-heading p {
  margin: 0;
}

.doctor-prescription-paper {
  margin: 22px;
  padding: 28px;
  border: 1px solid #d5e0e7;
  color: #172434;
}

.doctor-prescription-paper header {
  padding-bottom: 15px;
  border-bottom: 3px solid #008b69;
}

.doctor-prescription-paper h3 {
  margin: 22px 0 8px;
  color: #007d58;
}

.doctor-prescription-paper li {
  margin: 10px 0;
}

.doctor-prescription-paper li span {
  display: block;
  margin-top: 3px;
  color: #607083;
}

.doctor-prescription-paper footer {
  margin-top: 36px;
  padding-top: 12px;
  border-top: 1px solid #d5e0e7;
  color: #68788a;
}

@media (max-width: 760px) {
  .doctor-tariff-summary {
    grid-template-columns: 1fr;
  }

  .doctor-tariff-summary > div {
    border-right: 0;
    border-bottom: 1px solid #cce4db;
  }

  .doctor-tariff-summary > div:last-child {
    border-bottom: 0;
  }
}

/* Parcours prestataires Sante : parite fonctionnelle V1 / V2 */
.provider-workspace-heading,
.provider-workspace-kpis,
.provider-filter-bar,
.provider-prescription-list,
.provider-patient-section,
.provider-clinical-section,
.provider-execution-panel,
.provider-invoice-section,
.provider-empty-state {
  max-width: 1560px;
  margin-right: auto;
  margin-left: auto;
}

.provider-workspace-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
  border: 1px solid #d3dfe6;
  border-top: 4px solid #008b69;
  background: #fff;
}

.provider-workspace-kpis article {
  min-width: 0;
  min-height: 112px;
  padding: 18px 20px;
  border-right: 1px solid #d3dfe6;
}

.provider-workspace-kpis article:last-child { border-right: 0; }
.provider-workspace-kpis span,
.provider-clinical-grid span,
.provider-transmit-form span {
  display: block;
  color: #5b6d7e;
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
}
.provider-workspace-kpis strong {
  display: block;
  margin: 7px 0 4px;
  color: #10283a;
  font-size: 25px;
}
.provider-workspace-kpis small { color: #657588; }
.provider-filter-bar { margin-bottom: 18px; }
.provider-prescription-list { margin-top: 0; }
.provider-work-table td { vertical-align: middle; }
.provider-work-table small { display: block; margin-top: 4px; color: #657588; }
.compact-command { padding: 8px 11px; white-space: nowrap; }

.provider-patient-section,
.provider-clinical-section,
.provider-execution-panel,
.provider-invoice-section {
  margin-bottom: 18px;
  overflow: hidden;
  border-left: 4px solid #138a75;
}

.provider-patient-section > .section-heading-row,
.provider-clinical-section > .section-heading-row,
.provider-execution-panel > .section-heading-row,
.provider-invoice-section > .section-heading-row {
  margin: -22px -22px 20px;
  padding: 15px 20px;
  border-bottom: 1px solid #d8e2e8;
  background: #f4f7f9;
}

.provider-beneficiary-summary {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.provider-beneficiary-summary > div:nth-child(n) {
  border-right: 1px solid #d5e0e7;
  border-bottom: 1px solid #d5e0e7;
}
.provider-beneficiary-summary > div:nth-child(5n) { border-right: 0; }
.provider-beneficiary-summary > div:nth-last-child(-n + 5) { border-bottom: 0; }

.provider-rights-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 14px;
  border: 1px solid #cfe1dd;
  background: #eef8f5;
}
.provider-rights-strip span { min-width: 0; padding: 13px 15px; border-right: 1px solid #cfe1dd; }
.provider-rights-strip span:last-child { border-right: 0; }
.provider-rights-strip small { display: block; margin-bottom: 4px; color: #557083; font-weight: 750; }
.provider-rights-strip strong { overflow-wrap: anywhere; color: #123a35; }

.provider-clinical-grid {
  display: grid;
  grid-template-columns: 150px 220px minmax(280px, 1fr) minmax(280px, 1fr);
  border: 1px solid #d7e1e7;
}
.provider-clinical-grid > div { min-width: 0; padding: 15px 17px; border-right: 1px solid #d7e1e7; }
.provider-clinical-grid > div:last-child { border-right: 0; }
.provider-clinical-grid strong { display: block; margin-top: 6px; overflow-wrap: anywhere; color: #172b3c; line-height: 1.45; }

.provider-report-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
  padding: 16px;
  border: 1px solid #cbd8d5;
  background: #f7fbfa;
}
.provider-report-fields legend { padding: 0 8px; color: #007d58; font-weight: 800; }
.provider-report-fields label { display: grid; gap: 6px; color: #334155; font-weight: 700; }
.provider-report-fields input,
.provider-report-fields select,
.provider-report-fields textarea {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid #b9c8d1;
  background: #fff;
  color: #172033;
  font: inherit;
}
.provider-report-wide { grid-column: 1 / -1; }

.provider-barcode-search {
  display: grid;
  max-width: 720px;
  gap: 7px;
  margin: 16px 0;
  color: #31485b;
  font-size: 13px;
  font-weight: 800;
}
.provider-barcode-search input {
  min-height: 48px;
  padding: 10px 13px;
  border: 1px solid #c6d3dc;
  border-radius: 5px;
  background: #fff;
  font: inherit;
}

.provider-execution-table-shell { max-height: min(58vh, 650px); overflow: auto; }
.provider-execution-table { min-width: 1380px; }
.provider-execution-table thead th { position: sticky; top: 0; z-index: 2; background: #edf3f5; }
.provider-execution-table tr.is-selected { background: #f0faf6; }
.provider-execution-table td { vertical-align: middle; }
.provider-execution-table td small { display: block; margin-top: 4px; color: #617286; }
.provider-execution-table input[type="checkbox"] { width: 19px; height: 19px; accent-color: #008b69; }
.compact-number-input,
.compact-text-input {
  width: 125px;
  min-height: 40px;
  padding: 7px 9px;
  border: 1px solid #bdccd5;
  border-radius: 4px;
  background: #fff;
  color: #172b3c;
  font: inherit;
}
.compact-text-input { width: 150px; }

.provider-execution-footer {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #d9e3e8;
}
.provider-billing-preview {
  display: grid;
  flex: 1;
  grid-template-columns: repeat(3, minmax(170px, 1fr));
  border: 1px solid #cfe1dd;
  background: #f4faf8;
}
.provider-billing-preview span { padding: 13px 15px; border-right: 1px solid #cfe1dd; }
.provider-billing-preview span:last-child { border-right: 0; }
.provider-billing-preview small { display: block; color: #5b6e7d; font-weight: 750; }
.provider-billing-preview strong { display: block; margin-top: 5px; color: #086d58; font-size: 18px; }

.provider-transmit-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(170px, .65fr)) repeat(2, minmax(230px, 1fr)) auto;
  gap: 14px;
  align-items: end;
  margin-top: 16px;
  padding: 17px;
  border-left: 4px solid #008b69;
  background: #eef8f5;
}
.provider-transmit-form > div,
.provider-transmit-form label { display: grid; gap: 6px; min-width: 0; }
.provider-transmit-form input { min-height: 44px; padding: 9px 11px; border: 1px solid #bfd0d8; border-radius: 4px; background: #fff; }
.provider-transmit-form strong { margin-top: 5px; color: #10372f; font-size: 18px; }

@media (max-width: 1180px) {
  .provider-workspace-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .provider-workspace-kpis article:nth-child(2) { border-right: 0; }
  .provider-workspace-kpis article:nth-child(-n + 2) { border-bottom: 1px solid #d3dfe6; }
  .provider-clinical-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .provider-clinical-grid > div:nth-child(2) { border-right: 0; }
  .provider-clinical-grid > div:nth-child(-n + 2) { border-bottom: 1px solid #d7e1e7; }
  .provider-transmit-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .provider-transmit-form button { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .provider-workspace-kpis,
  .provider-beneficiary-summary,
  .provider-rights-strip,
  .provider-clinical-grid,
  .provider-billing-preview,
  .provider-transmit-form { grid-template-columns: 1fr; }
  .provider-workspace-kpis article,
  .provider-beneficiary-summary > div:nth-child(n),
  .provider-rights-strip span,
  .provider-clinical-grid > div,
  .provider-billing-preview span { border-right: 0; border-bottom: 1px solid #d5e0e7; }
  .provider-execution-footer { align-items: stretch; flex-direction: column; }
  .provider-execution-footer .primary-command { width: 100%; }
  .provider-report-fields { grid-template-columns: 1fr; }
  .provider-report-wide { grid-column: auto; }
}

.prescription-form-row {
  margin: 0;
  padding: 15px;
  border: 1px solid #d4e0e7;
  border-radius: 6px;
  background: #f9fbfc;
}

.prescription-form-row legend {
  padding: 0 8px;
  color: #0b7f83;
  font-weight: 800;
}

.prescription-main-fields,
.prescription-detail-fields,
.prescription-control-fields {
  display: grid;
  gap: 12px;
  align-items: end;
}

.prescription-main-fields {
  grid-template-columns: 180px minmax(260px, 1fr) 120px 160px;
}

.prescription-detail-fields {
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  margin-top: 12px;
}

.prescription-control-fields {
  grid-template-columns: 180px minmax(260px, 1fr) 120px;
  margin-top: 12px;
}

.prescription-form-row label {
  display: grid;
  gap: 5px;
  color: #526579;
  font-size: 12px;
  font-weight: 700;
}

.prescription-form-row input,
.prescription-form-row select,
.prescription-form-row textarea {
  width: 100%;
}

.sticky-form-actions {
  position: sticky;
  bottom: 12px;
  display: flex;
  justify-content: flex-end;
  padding: 12px;
  border: 1px solid #d4e0e7;
  border-radius: 6px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 5px 18px rgba(15, 37, 53, .10);
}

@media (max-width: 980px) {
  body.has-sidebar .app-frame { display: block; }
  body.has-sidebar .sidebar {
    top: 76px;
    width: 100%;
    height: auto;
    padding: 7px 10px;
    display: flex;
  }
  body.has-sidebar .sidebar-home { margin: 0; padding: 5px; border: 0; }
  body.has-sidebar .sidebar-home strong { display: none; }
  .health-care-summary { grid-template-columns: 1fr; }
  .doctor-lookup-grid,
  .doctor-four-column-grid,
  .doctor-prescription-main,
  .doctor-prescription-details,
  .doctor-prescription-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .doctor-beneficiary-summary,
  .doctor-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .doctor-beneficiary-summary > div,
  .doctor-summary-grid > div { border-right: 1px solid #d5e0e7; border-bottom: 1px solid #d5e0e7; }
  .doctor-beneficiary-summary > div:nth-child(2n),
  .doctor-summary-grid > div:nth-child(2n) { border-right: 0; }
  .doctor-section > .section-heading-row { margin: -17px -17px 17px; }
  .health-patient-search { grid-template-columns: 1fr; }
  .health-priority-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .health-beneficiary-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .health-premium-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .health-premium-summary div,
  .health-premium-summary div:nth-child(5n),
  .health-premium-summary div:nth-last-child(-n+5) {
    border-right: 1px solid #d8e1e7;
    border-bottom: 1px solid #d8e1e7;
  }
  .health-premium-summary div:nth-child(2n) { border-right: 0; }
  .health-premium-summary div:nth-last-child(-n+2) { border-bottom: 0; }
  .rd-premium-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rd-premium-summary > div {
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }
  .rd-premium-summary > div:nth-child(2n) { border-right: 0; }
  .rd-premium-summary > div:last-child {
    grid-column: 1 / -1;
    border-right: 0;
    border-bottom: 0;
  }
  .dispense-line { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dispense-description { grid-column: 1 / -1; }
  .prescription-main-fields,
  .prescription-detail-fields,
  .prescription-control-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contract-document-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  body,
  body.has-sidebar { padding-top: 64px; }
  body.has-sidebar .topbar { min-height: 64px; }
  body.has-sidebar .sidebar { top: 64px; }
  body.has-sidebar .page-shell { width: min(100% - 20px, 1540px); }
  .health-proposal-section { padding: 14px; }
  .health-proposal-actions { align-items: stretch; flex-direction: column; }
  .health-proposal-actions .primary-command { width: 100%; }
  .health-premium-summary { grid-template-columns: 1fr; }
  .health-premium-summary div,
  .health-premium-summary div:nth-child(2n),
  .health-premium-summary div:nth-last-child(-n+2) {
    border-right: 0;
    border-bottom: 1px solid #d8e1e7;
  }
  .health-premium-summary div:last-child { border-bottom: 0; }
  .rd-premium-summary { grid-template-columns: 1fr; }
  .rd-premium-summary > div,
  .rd-premium-summary > div:nth-child(2n) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .rd-premium-summary > div:last-child { grid-column: auto; }
  .health-category-row,
  .dispense-line { grid-template-columns: 1fr; }
  .prescription-main-fields,
  .prescription-detail-fields,
  .prescription-control-fields { grid-template-columns: 1fr; }
  .health-category-heading { display: none; }
  .contract-document-grid { grid-template-columns: 1fr; }
  .health-patient-search-form,
  .health-priority-grid,
  .health-beneficiary-metrics { grid-template-columns: 1fr; }
  .doctor-section > .section-heading-row,
  .doctor-section > .section-heading-row > div { align-items: flex-start; }
  .doctor-section > .section-heading-row > div { flex-direction: column; gap: 7px; }
  .doctor-form-actions { align-items: stretch; flex-direction: column; }
  .doctor-form-actions .primary-command,
  .doctor-form-actions .secondary-command { width: 100%; }
}

/* Documents clients Sante */
.proposal-command-strip {
  margin-bottom: 20px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid #ccd9e0;
  border-radius: 7px;
  overflow: hidden;
  background: white;
}

.proposal-command-strip a,
.proposal-command-strip > form,
.proposal-command-strip > form button {
  min-height: 84px;
  padding: 16px 18px;
  display: grid;
  align-content: center;
  gap: 4px;
  border-right: 1px solid #d8e1e7;
  border-left: 4px solid #009e69;
  color: #202a37;
  text-decoration: none;
}

.proposal-command-strip > form { padding: 0; }
.proposal-command-strip > form button {
  width: 100%;
  border: 0;
  border-left: 4px solid #009e69;
  border-radius: 0;
  background: white;
  color: #202a37;
  text-align: left;
  cursor: pointer;
}

.proposal-command-strip a:last-child { border-right: 0; }
.proposal-command-strip a:hover,
.proposal-command-strip > form button:hover { background: #f3faf7; }
.proposal-command-strip span { color: #667281; font-size: 13px; }
.money-highlight { color: #007d58; font-size: 18px; }
.table-actions { justify-content: flex-start; }
.decision-layout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.stacked-form { display: grid; gap: 14px; }
.stacked-form label, .stacked-form p { display: grid; gap: 6px; font-weight: 700; }
.stacked-form input, .stacked-form textarea, .stacked-form select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #bdcad4;
  border-radius: 5px;
  background: white;
}

.document-channel-actions { margin: 0 auto 16px; width: min(960px, 100%); }
.whatsapp-command { border-color: #138a5c; color: #08764c; }
.health-client-document {
  width: min(960px, 100%);
  margin: 0 auto 26px;
  padding: 48px 52px;
  border: 1px solid #d6e0e6;
  background: white;
  color: #202a37;
  box-shadow: 0 12px 34px rgba(20, 39, 52, .09);
}

.health-document-header {
  padding-bottom: 18px;
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  border-bottom: 4px solid #009e69;
}

.health-document-header img { width: 84px; height: 58px; object-fit: contain; }
.health-document-header > div { display: grid; gap: 3px; }
.health-document-header > div > strong { color: #007d58; font-size: 21px; }
.health-document-header span { color: #667281; font-size: 12px; }
.health-document-reference { text-align: right; }
.health-document-reference strong { color: #202a37 !important; font-size: 15px !important; }
.health-client-document > h1 {
  margin: 26px 0 22px;
  color: #007d58;
  font-size: 28px;
  text-align: center;
  text-transform: uppercase;
}

.health-document-section { margin-top: 22px; }
.health-document-section h2 {
  margin: 0 0 10px;
  padding-bottom: 7px;
  border-bottom: 1px solid #bcd8cf;
  color: #007d58;
  font-size: 17px;
}

.health-document-facts {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid #dae1e9;
}

.health-document-facts div {
  min-height: 65px;
  padding: 10px 13px;
  border-right: 1px solid #dae1e9;
  border-bottom: 1px solid #dae1e9;
}

.health-document-facts div:nth-child(2n) { border-right: 0; }
.health-document-facts dt {
  color: #667281;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}
.health-document-facts dd { margin: 5px 0 0; font-weight: 700; }
.health-document-facts.compact { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.health-document-facts.compact div { border-bottom: 0; }
.health-document-facts.compact div:nth-child(2n) { border-right: 1px solid #dae1e9; }
.health-document-facts.compact div:last-child { border-right: 0; }
.health-document-table { overflow-x: auto; }
.health-document-table table, .health-premium-document table { width: 100%; border-collapse: collapse; }
.health-document-table th, .health-document-table td,
.health-premium-document th, .health-premium-document td {
  padding: 8px 9px;
  border: 1px solid #dae1e9;
  text-align: left;
  vertical-align: top;
  font-size: 12px;
}
.health-document-table thead th {
  background: #007d58;
  color: white;
  font-size: 11px;
  text-transform: uppercase;
}
.health-document-text { line-height: 1.65; }
.health-premium-document { break-inside: avoid; page-break-inside: avoid; }
.health-premium-document table { width: min(520px, 100%); margin-left: auto; }
.health-premium-document td { text-align: right; }
.health-premium-document .total { background: #e4f8f1; color: #007d58; font-size: 15px; }
.health-adjustment-clause {
  padding-top: 16px;
  break-before: page;
  page-break-before: always;
}
.health-adjustment-clause > p { line-height: 1.65; }
.health-document-table.adjustment { width: min(650px, 100%); margin: 18px auto; }
.health-document-closing { margin-top: 28px; }
.health-document-signature { min-height: 90px; margin: 32px 0 0 auto; width: 230px; text-align: center; }

.document-send-summary {
  margin-bottom: 20px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid #d4dee6;
}
.document-send-summary div { min-height: 70px; padding: 12px; display: grid; gap: 5px; border-right: 1px solid #d4dee6; }
.document-send-summary div:last-child { border-right: 0; }
.document-send-summary span { color: #667281; font-size: 12px; font-weight: 800; text-transform: uppercase; }

.public-document-page { margin: 0; background: #edf2f4; }
.public-document-topbar {
  min-height: 80px;
  padding: 10px max(18px, calc((100vw - 1100px) / 2));
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid #d4dee6;
  background: white;
}
.public-document-topbar img { width: 70px; height: 50px; object-fit: contain; }
.public-document-topbar > div:nth-child(2) { display: grid; }
.public-document-topbar > div:nth-child(2) span { color: #667281; font-size: 13px; }
.public-document-topbar .button-row { margin-left: auto; }
.public-document-shell { padding: 24px 16px; }
.public-document-notice {
  width: min(960px, 100%);
  margin: 0 auto 14px;
  padding: 12px 15px;
  border: 1px solid #bcd8cf;
  background: #e4f8f1;
  color: #145b46;
}

/* Documents clients Risques Divers */
.rd-client-document .health-document-table td:nth-child(3) { text-align: right; white-space: nowrap; }
.rd-contract-page {
  position: relative;
  width: min(900px, 100%);
  min-height: 1273px;
  margin: 0 auto 26px;
  padding: 48px 52px 70px;
  border: 1px solid #d6e0e6;
  background: white;
  color: #202a37;
  box-shadow: 0 12px 34px rgba(20, 39, 52, .09);
}
.rd-contract-header,
.rd-contract-running-header {
  padding-bottom: 16px;
  display: grid;
  grid-template-columns: 95px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  border-bottom: 4px solid #009e69;
}
.rd-contract-header img,
.rd-contract-running-header img { width: 84px; height: 58px; object-fit: contain; }
.rd-contract-header > div { display: grid; gap: 4px; text-align: center; }
.rd-contract-header > div strong { color: #007d58; font-size: 21px; }
.rd-contract-header > div span { color: #202a37; font-size: 16px; font-weight: 800; }
.rd-contract-header > b,
.rd-contract-running-header > span { color: #667281; font-size: 12px; text-align: right; }
.rd-contract-cover-title { margin: 95px 0 60px; text-align: center; }
.rd-contract-cover-title span { color: #ad8a3d; font-size: 15px; font-weight: 800; }
.rd-contract-cover-title h1 {
  margin: 12px auto 0;
  color: #007d58;
  font-size: 34px;
  text-transform: uppercase;
}
.rd-contract-cover-facts,
.rd-contract-info-grid {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid #dae1e9;
}
.rd-contract-cover-facts div,
.rd-contract-info-grid div {
  min-height: 72px;
  padding: 12px 14px;
  border-right: 1px solid #dae1e9;
  border-bottom: 1px solid #dae1e9;
}
.rd-contract-cover-facts div:nth-child(2n),
.rd-contract-info-grid div:nth-child(2n) { border-right: 0; }
.rd-contract-cover-facts dt,
.rd-contract-info-grid dt {
  color: #667281;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}
.rd-contract-cover-facts dd,
.rd-contract-info-grid dd { margin: 6px 0 0; font-weight: 700; }
.rd-contract-label {
  position: absolute;
  right: 52px;
  bottom: 80px;
  left: 52px;
  padding: 17px;
  background: #007d58;
  color: white;
  font-size: 17px;
  font-weight: 800;
  text-align: center;
}
.rd-contract-running-header { grid-template-columns: 76px minmax(0, 1fr) auto; }
.rd-contract-running-header img { width: 66px; height: 46px; }
.rd-contract-running-header strong { color: #007d58; text-transform: uppercase; }
.rd-contract-page > h1 {
  margin: 30px 0 22px;
  color: #007d58;
  font-size: 26px;
  text-align: center;
  text-transform: uppercase;
}
.rd-contract-premium { width: min(570px, 100%); margin: 34px 0 0 auto; }
.rd-contract-premium h2,
.rd-contract-guarantees h2 { color: #007d58; font-size: 18px; }
.rd-contract-premium table,
.rd-contract-guarantees table { width: 100%; border-collapse: collapse; }
.rd-contract-premium th,
.rd-contract-premium td,
.rd-contract-guarantees th,
.rd-contract-guarantees td {
  padding: 10px;
  border: 1px solid #dae1e9;
  text-align: left;
  vertical-align: top;
}
.rd-contract-premium td { text-align: right; }
.rd-contract-premium .total,
.rd-contract-guarantees thead { background: #007d58; color: white; }
.rd-contract-guarantees td:nth-child(2) { text-align: right; white-space: nowrap; }
.rd-contract-signatures {
  position: absolute;
  right: 52px;
  bottom: 70px;
  left: 52px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid #dae1e9;
}
.rd-contract-signatures div { min-height: 130px; padding: 14px; display: grid; align-content: space-between; text-align: center; }
.rd-contract-signatures div:first-child { border-right: 1px solid #dae1e9; }
.rd-contract-signatures strong { color: #007d58; }
.rd-contract-signatures span { color: #667281; font-size: 12px; }
.rd-contract-clauses { line-height: 1.65; text-align: justify; }
.rd-contract-clauses p { margin: 0 0 12px; }
.rd-contract-clauses p strong,
.rd-contract-clauses p:first-child { color: #007d58; }
.rd-contract-cover-compact { padding-top: 60px; }
.rd-contract-reference-header {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) 190px;
  align-items: center;
  gap: 18px;
  padding: 18px 14px;
  border: 1px solid #b9d8cf;
  border-top: 5px solid #007d58;
  background: #f3faf7;
}
.rd-contract-reference-header img { width: 170px; height: 116px; object-fit: contain; }
.rd-contract-reference-header > div:nth-child(2) { display: grid; gap: 5px; }
.rd-contract-reference-header > div:nth-child(2) strong { color: #007d58; font-size: 25px; line-height: 1.05; }
.rd-contract-reference-header > div:nth-child(2) span { color: #202a37; font-size: 14px; font-weight: 800; text-transform: uppercase; }
.rd-contract-reference-header > div:nth-child(2) small { color: #667281; }
.rd-contract-policy-box {
  min-height: 72px;
  display: grid;
  place-content: center;
  gap: 8px;
  border: 1px solid #b9d8cf;
  background: white;
  text-align: center;
}
.rd-contract-policy-box span { color: #007d58; font-size: 11px; font-weight: 800; }
.rd-contract-policy-box b { font-size: 18px; }
.rd-contract-reference-facts {
  margin: 14px 0 0;
  display: grid;
  grid-template-columns: 150px minmax(0, 1.25fr) 150px minmax(0, 1fr);
  border: 1px solid #b9d8cf;
  border-bottom: 0;
}
.rd-contract-reference-facts > div {
  min-height: 48px;
  padding: 11px 12px;
  border-right: 1px solid #b9d8cf;
  border-bottom: 1px solid #b9d8cf;
}
.rd-contract-reference-facts > div:nth-child(4n) { border-right: 0; }
.rd-contract-reference-facts .label { background: #e4f8f1; font-weight: 800; }
.rd-contract-reference-label {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #b9d8cf;
  background: #e4f8f1;
  color: #007d58;
  font-weight: 800;
  text-align: center;
}
.rd-contract-flow { line-height: 1.45; text-align: justify; }
.rd-contract-flow > p { margin: 0 0 12px; }
.rd-contract-premium-wide { width: 100%; margin: 22px 0 0; }
.rd-contract-premium-wide td:last-child { width: 70px; text-align: left; }
.rd-contract-clauses h2 {
  margin: 18px 0 7px;
  color: #007d58;
  font-size: 17px;
}
.rd-contract-made-at { margin-top: 24px !important; text-align: center; }
.rd-contract-signatures-flow {
  position: static;
  margin-top: 18px;
}
.rd-contract-verification {
  margin-top: 14px;
  padding: 11px 13px;
  border: 1px solid #007d58;
  background: #f3faf7;
  color: #667281;
  font-size: 12px;
}

.document-preview {
  display: grid;
  gap: 24px;
  max-width: 1040px;
  margin: 0 auto;
}

/* Aperçu client des contrats Transport */
.transport-contract-preview {
  display: grid;
  gap: 28px;
  width: min(100%, 980px);
  margin: 0 auto;
}
.transport-contract-page {
  position: relative;
  min-height: 1120px;
  padding: 54px 62px 72px;
  overflow: hidden;
  border: 1px solid #cedbd7;
  background: #fff;
  box-shadow: 0 14px 34px rgba(32, 42, 55, .09);
}
.transport-contract-cover {
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  background:
    linear-gradient(180deg, #e9f7f2 0, #fff 32%),
    #fff;
}
.transport-contract-cover::after {
  position: absolute;
  right: -110px;
  bottom: -170px;
  width: 410px;
  height: 410px;
  border: 38px solid rgba(0, 125, 88, .08);
  border-radius: 50%;
  content: "";
}
.transport-contract-cover-brand,
.transport-contract-running-header {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  padding-bottom: 18px;
  border-bottom: 3px solid var(--green);
}
.transport-contract-cover-brand { grid-template-columns: 150px minmax(0, 1fr); }
.transport-contract-cover-brand img,
.transport-contract-running-header img {
  width: 100%;
  height: 70px;
  object-fit: contain;
}
.transport-contract-cover-brand div,
.transport-contract-running-header div { display: grid; gap: 5px; }
.transport-contract-cover-brand strong { color: var(--green); font-size: 1.28rem; }
.transport-contract-cover-brand span,
.transport-contract-running-header span { color: var(--muted); font-size: .82rem; }
.transport-contract-cover-title {
  position: relative;
  z-index: 1;
  align-self: center;
  margin: 90px 0 64px;
  text-align: center;
}
.transport-contract-cover-title p {
  margin: 0 0 18px;
  color: var(--green);
  font-size: .9rem;
  font-weight: 900;
  letter-spacing: .08em;
}
.transport-contract-cover-title h1 {
  max-width: 720px;
  margin: 0 auto 14px;
  color: var(--ink);
  font-size: 2.35rem;
  line-height: 1.18;
}
.transport-contract-cover-title span { color: var(--muted); font-size: 1.12rem; }
.transport-contract-cover-facts,
.transport-contract-facts {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  border: 1px solid var(--line);
}
.transport-contract-cover-facts > div,
.transport-contract-facts > div {
  min-width: 0;
  padding: 15px 17px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.transport-contract-cover-facts > div:nth-child(2n),
.transport-contract-facts > div:nth-child(2n) { border-right: 0; }
.transport-contract-cover-facts dt,
.transport-contract-facts dt {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 900;
  text-transform: uppercase;
}
.transport-contract-cover-facts dd,
.transport-contract-facts dd { margin: 0; overflow-wrap: anywhere; font-weight: 800; }
.transport-contract-cover > footer {
  position: relative;
  z-index: 1;
  margin-top: 54px;
  padding: 15px;
  border: 1px solid #98cdbf;
  color: var(--green);
  font-weight: 900;
  text-align: center;
}
.transport-contract-running-header {
  grid-template-columns: 90px minmax(0, 1fr) auto;
  margin-bottom: 30px;
}
.transport-contract-running-header img { height: 50px; }
.transport-contract-running-header b { color: var(--green); white-space: nowrap; }
.transport-contract-section { margin-top: 30px; }
.transport-contract-section h2,
.contract-clause-chapter h2 {
  margin: 0 0 14px;
  padding-bottom: 9px;
  border-bottom: 2px solid #9acfc1;
  color: var(--green);
  font-size: 1.2rem;
}
.transport-premium-table { width: min(100%, 580px); margin-left: auto; border-collapse: collapse; }
.transport-premium-table th,
.transport-premium-table td { padding: 11px 14px; border: 1px solid var(--line); }
.transport-premium-table th { text-align: left; }
.transport-premium-table td { text-align: right; font-weight: 800; }
.transport-premium-table .total { color: #fff; background: var(--green); }
.transport-guarantee-table { table-layout: fixed; }
.transport-guarantee-table th:first-child { width: 55%; }
.transport-contract-clauses { font-size: .92rem; line-height: 1.62; }
.contract-clause-chapter { margin-top: 30px; }
.contract-clause-chapter:first-of-type { margin-top: 0; }
.contract-clause-article,
.contract-clause-text {
  break-inside: avoid;
  margin-top: 19px;
  padding-left: 16px;
  border-left: 3px solid #b8dcd2;
}
.contract-clause-article h3,
.contract-clause-text h3 { margin: 0 0 8px; color: var(--ink); font-size: .98rem; }
.contract-clause-chapter p,
.contract-clause-article p,
.contract-clause-text p { margin: 0; text-align: justify; }
.transport-contract-signature {
  width: 280px;
  min-height: 125px;
  margin: 48px 0 0 auto;
  display: grid;
  align-content: start;
  gap: 42px;
  text-align: center;
}
.transport-contract-signature strong { color: var(--green); }
.document-cover,
.document-page {
  min-height: 1120px;
  padding: 64px 72px;
  border: 1px solid #dae1e9;
  background: white;
  box-shadow: 0 14px 34px rgba(32, 42, 55, 0.08);
}
.document-cover {
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 18px;
  text-align: center;
}
.document-cover > img,
.document-logo {
  width: 220px;
  height: 124px;
  object-fit: contain;
}
.document-cover > h1,
.document-page > h1 {
  margin: 60px 0 0;
  color: #007d58;
  font-size: 34px;
}
.document-cover > h2,
.document-page > h2 { color: #007d58; }
.document-cover .definition-grid { width: min(680px, 100%); margin-top: 40px; text-align: left; }
.document-label {
  margin-top: auto;
  padding: 16px 34px;
  border: 1px solid #8bcbbb;
  color: #007d58;
}
.preserved-text { line-height: 1.65; white-space: normal; }
.signature-grid {
  margin-top: 80px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px;
  min-height: 160px;
  text-align: center;
}

.health-card-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}
.health-pvc-card {
  aspect-ratio: 856 / 540;
  min-width: 0;
  overflow: hidden;
  display: grid;
  grid-template-rows: 28% 1fr 10%;
  border: 1px solid #cbd8d4;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(32, 42, 55, 0.12);
}
.health-pvc-card > header {
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  background: #009e69;
  color: white;
}
.health-pvc-card > header img {
  width: 86px;
  height: 52px;
  object-fit: contain;
}
.health-pvc-card > header div { min-width: 0; display: flex; align-items: baseline; gap: 8px; }
.health-pvc-card > header strong { font-size: clamp(17px, 1.8vw, 28px); line-height: 1; }
.health-pvc-card > header span { font-size: clamp(8px, .8vw, 13px); font-weight: 800; }
.health-pvc-body {
  min-width: 0;
  padding: 18px 26px 12px;
  display: grid;
  grid-template-columns: 20% minmax(0, 1fr) 25%;
  align-items: center;
  gap: 18px;
}
.health-pvc-photo {
  aspect-ratio: .72;
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 1px solid #dae1e9;
  border-radius: 12px;
  background: #eef2f6;
  color: #667281;
}
.health-pvc-photo img { width: 100%; height: 100%; object-fit: cover; }
.health-pvc-identity { min-width: 0; display: grid; gap: 2px; }
.health-pvc-identity small { margin-top: 5px; color: #667281; font-size: clamp(7px, .65vw, 11px); }
.health-pvc-identity b { overflow-wrap: anywhere; color: #007d58; font-size: clamp(10px, 1vw, 16px); }
.health-card-name {
  overflow-wrap: anywhere;
  color: #202a37;
  font-size: clamp(13px, 1.45vw, 23px);
  line-height: 1.05;
}
.health-pvc-qr { width: 100%; max-height: 150px; object-fit: contain; }
.health-pvc-card > footer {
  padding: 7px 24px;
  background: #007d58;
  color: white;
  font-size: clamp(8px, .8vw, 13px);
  font-weight: 800;
  text-align: center;
}
.health-pvc-back { grid-template-rows: 25% 1fr 1fr 10%; }
.health-pvc-back > header strong { font-size: clamp(15px, 1.7vw, 27px); }
.health-pvc-check {
  margin: 12px 28px 0;
  padding: 12px 18px;
  border: 1px solid #b9d8cf;
  border-radius: 12px;
}
.health-pvc-check h3 { margin: 0 0 4px; color: #007d58; font-size: clamp(11px, 1.05vw, 17px); }
.health-pvc-check p { margin: 2px 0; font-size: clamp(8px, .78vw, 13px); line-height: 1.25; }

@media (max-width: 760px) {
  .proposal-command-strip, .decision-layout, .document-send-summary { grid-template-columns: 1fr; }
  .proposal-command-strip a, .document-send-summary div { border-right: 0; border-bottom: 1px solid #d8e1e7; }
  .health-client-document { padding: 24px 18px; }
  .health-document-header { grid-template-columns: 65px 1fr; }
  .health-document-header img { width: 60px; }
  .health-document-reference { grid-column: 1 / -1; text-align: left; }
  .health-client-document > h1 { font-size: 22px; }
  .health-document-facts, .health-document-facts.compact { grid-template-columns: 1fr; }
  .health-document-facts div, .health-document-facts.compact div:nth-child(2n) { border-right: 0; border-bottom: 1px solid #dae1e9; }
  .public-document-topbar { align-items: flex-start; flex-wrap: wrap; }
  .public-document-topbar .button-row { width: 100%; margin: 0; }
  .rd-contract-page { min-height: 0; padding: 24px 18px 38px; }
  .rd-contract-header,
  .rd-contract-running-header { grid-template-columns: 65px 1fr; }
  .rd-contract-header img,
  .rd-contract-running-header img { width: 60px; }
  .rd-contract-header > b,
  .rd-contract-running-header > span { grid-column: 1 / -1; text-align: left; }
  .rd-contract-cover-title { margin: 44px 0 30px; }
  .rd-contract-cover-title h1 { font-size: 24px; }
  .rd-contract-cover-facts,
  .rd-contract-info-grid,
  .rd-contract-signatures { grid-template-columns: 1fr; }
  .rd-contract-cover-facts div,
  .rd-contract-info-grid div { border-right: 0; }
  .rd-contract-label,
  .rd-contract-signatures { position: static; margin-top: 30px; }
  .rd-contract-signatures div:first-child { border-right: 0; border-bottom: 1px solid #dae1e9; }
  .rd-contract-reference-header { grid-template-columns: 80px minmax(0, 1fr); }
  .rd-contract-reference-header img { width: 78px; height: 58px; }
  .rd-contract-policy-box { grid-column: 1 / -1; }
  .rd-contract-reference-facts { grid-template-columns: 110px minmax(0, 1fr); }
  .rd-contract-reference-facts > div:nth-child(4n) { border-right: 1px solid #b9d8cf; }
  .rd-contract-reference-facts > div:nth-child(2n) { border-right: 0; }
  .document-cover, .document-page { min-height: 0; padding: 28px 20px; }
  .transport-contract-page { min-height: 0; padding: 28px 20px 40px; }
  .transport-contract-cover-brand,
  .transport-contract-running-header { grid-template-columns: 72px minmax(0, 1fr); }
  .transport-contract-cover-brand { grid-template-columns: 95px minmax(0, 1fr); }
  .transport-contract-running-header b { grid-column: 1 / -1; }
  .transport-contract-cover-title { margin: 56px 0 40px; }
  .transport-contract-cover-title h1 { font-size: 1.65rem; }
  .transport-contract-cover-facts,
  .transport-contract-facts { grid-template-columns: 1fr; }
  .transport-contract-cover-facts > div,
  .transport-contract-facts > div { border-right: 0; }
  .health-card-pair { grid-template-columns: 1fr; }
  .health-pvc-card > header { padding: 10px 14px; }
  .health-pvc-body { padding: 12px 14px 8px; gap: 10px; }
}

@media print {
  body.has-sidebar .sidebar, body.has-sidebar .topbar, .page-heading, .document-channel-actions, .message-stack, .proposal-command-strip {
    display: none !important;
  }
  body, .public-document-page { background: white; }
  .app-frame, .page-shell, .public-document-shell { width: 100%; margin: 0; padding: 0; display: block; }
  .health-client-document { width: 100%; margin: 0; padding: 8mm 10mm; border: 0; box-shadow: none; }
  .health-document-table { overflow: visible; }
  .transport-contract-preview { width: 100%; max-width: none; gap: 0; }
  .transport-contract-page {
    width: 100%;
    min-height: 0;
    margin: 0;
    padding: 12mm 14mm 16mm;
    overflow: visible;
    border: 0;
    box-shadow: none;
    break-after: page;
  }
  .transport-contract-page:last-child { break-after: auto; }
  .transport-contract-cover { min-height: 265mm; }
  .transport-contract-cover-title { margin: 42mm 0 28mm; }
  .transport-contract-cover::after { display: none; }
  .transport-contract-clauses { font-size: 9pt; }
  .contract-clause-chapter,
  .contract-clause-article,
  .contract-clause-text { break-inside: avoid; }
  .rd-proposal-print {
    width: 100%;
    padding: 0;
    font-size: 8.5pt;
    line-height: 1.25;
  }
  .rd-proposal-print .health-document-header {
    grid-template-columns: 22mm minmax(0, 1fr) auto;
    gap: 3mm;
    padding-bottom: 3mm;
    border-bottom-width: 1mm;
  }
  .rd-proposal-print .health-document-header img {
    width: 20mm;
    height: 13mm;
  }
  .rd-proposal-print .health-document-header > div > strong { font-size: 12pt; }
  .rd-proposal-print .health-document-header span { font-size: 7.5pt; }
  .rd-proposal-print .health-document-reference strong { font-size: 9pt !important; }
  .rd-proposal-print > h1 {
    margin: 4mm 0 3mm;
    font-size: 15pt;
  }
  .rd-proposal-print .health-document-section { margin-top: 3mm; }
  .rd-proposal-print .health-document-section h2 {
    margin-bottom: 2mm;
    padding-bottom: 1.5mm;
    font-size: 10.5pt;
  }
  .rd-proposal-print .health-document-facts div {
    min-height: 0;
    padding: 1.5mm 2mm;
  }
  .rd-proposal-print .health-document-facts {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  .rd-proposal-print .health-document-facts.compact {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
  .rd-proposal-print .health-document-facts div:nth-child(2n) {
    border-right: 0;
  }
  .rd-proposal-print .health-document-facts.compact div:nth-child(2n) {
    border-right: 1px solid #dae1e9;
  }
  .rd-proposal-print .health-document-facts.compact div:last-child {
    border-right: 0;
  }
  .rd-proposal-print .health-document-facts dt { font-size: 7pt; }
  .rd-proposal-print .health-document-facts dd {
    margin-top: 1mm;
    font-size: 8.5pt;
  }
  .rd-proposal-print .health-document-table th,
  .rd-proposal-print .health-document-table td,
  .rd-proposal-print .health-premium-document th,
  .rd-proposal-print .health-premium-document td {
    padding: 1.25mm 1.5mm;
    font-size: 7.5pt;
    line-height: 1.2;
  }
  .rd-proposal-print .health-document-table thead th { font-size: 7pt; }
  .rd-proposal-print .health-document-text { line-height: 1.3; }
  .rd-proposal-print .health-premium-document {
    break-inside: avoid-page !important;
    page-break-inside: avoid !important;
  }
  .rd-proposal-print .health-premium-document h2 {
    break-after: avoid-page;
    page-break-after: avoid;
  }
  .rd-proposal-print .health-document-signature {
    min-height: 0;
    margin-top: 4mm;
  }
  .rd-contract-page {
    width: 210mm;
    min-height: 297mm;
    margin: 0;
    padding: 12mm 14mm 18mm;
    border: 0;
    box-shadow: none;
    break-after: page;
    page-break-after: always;
  }
  .rd-contract-page:last-child { break-after: auto; page-break-after: auto; }
  .health-card-section > :not(.health-card-pair) { display: none !important; }
  .health-card-pair { display: block; }
  .health-pvc-card {
    width: 85.6mm;
    height: 54mm;
    margin: 0 auto 10mm;
    border-radius: 3mm;
    box-shadow: none;
    break-after: page;
    page-break-after: always;
  }
  .health-pvc-card:last-child { break-after: auto; page-break-after: auto; }
  .document-cover, .document-page {
    width: 210mm;
    min-height: 297mm;
    margin: 0;
    padding: 14mm 16mm;
    border: 0;
    box-shadow: none;
    break-after: page;
    page-break-after: always;
  }
}
/* Questionnaires clients */
.questionnaire-link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin: 8px 0 18px;
}
.questionnaire-link-row input { width: 100%; }
.public-questionnaire {
  margin: 0;
  background: #f3f6f8;
  color: #202a37;
}
.public-questionnaire-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto 60px;
}
.public-questionnaire-header {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 24px 0;
}
.public-questionnaire-header img,
.public-status-card img {
  width: 112px;
  height: 72px;
  object-fit: contain;
}
.public-questionnaire-header h1 { margin: 3px 0 8px; }
.public-form-grid > div { min-width: 0; }
.public-form-grid input,
.public-form-grid select,
.public-form-grid textarea { width: 100%; max-width: 100%; }
.public-form-grid ul {
  list-style: none;
  padding: 0;
  margin: 6px 0 0;
}
.public-form-grid ul label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}
.public-form-grid ul input { width: auto; }
.public-status-card {
  width: min(620px, calc(100% - 32px));
  margin: 12vh auto;
  padding: 42px;
  background: #fff;
  border-top: 4px solid #009e69;
  box-shadow: 0 16px 38px rgba(32, 42, 55, .1);
  text-align: center;
}
@media (max-width: 720px) {
  .questionnaire-link-row { grid-template-columns: 1fr; }
  .public-questionnaire-shell { width: min(100% - 20px, 1180px); margin-top: 10px; }
  .public-questionnaire-header { align-items: flex-start; gap: 14px; }
  .public-questionnaire-header img { width: 82px; height: 54px; }
  .public-questionnaire-header h1 { font-size: 24px; }
  .public-status-card { padding: 28px 20px; }
}
/* Administration des fonctionnalités */
.feature-admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.feature-admin-card { padding: 0; overflow: hidden; }
.feature-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 17px 20px;
  border-top: 1px solid #dae1e9;
}
.feature-toggle-row:first-child { border-top: 0; }
.feature-parent { border-top: 4px solid #007d58; }
.feature-toggle-row h2,
.feature-toggle-row h3 { margin: 0 0 4px; }
.feature-toggle-row h2 { font-size: 19px; }
.feature-toggle-row h3 { font-size: 15px; }
.feature-toggle-row p { margin: 0; color: #667281; font-size: 14px; }
.feature-children { background: #f7faf9; }
.switch-control {
  display: grid;
  grid-template-columns: 46px;
  justify-items: center;
  gap: 4px;
  flex: 0 0 76px;
  cursor: pointer;
}
.switch-control input { position: absolute; opacity: 0; pointer-events: none; }
.switch-control span {
  position: relative;
  width: 44px;
  height: 24px;
  border-radius: 12px;
  background: #aeb8c3;
  transition: background .2s ease;
}
.switch-control span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .22);
  transition: transform .2s ease;
}
.switch-control input:checked + span { background: #009e69; }
.switch-control input:checked + span::after { transform: translateX(20px); }
.switch-control strong { font-size: 11px; color: #667281; }
.sticky-form-actions {
  position: sticky;
  bottom: 0;
  z-index: 4;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
  padding: 14px;
  background: rgba(255, 255, 255, .96);
  border: 1px solid #dae1e9;
}
@media (max-width: 900px) {
  .feature-admin-grid { grid-template-columns: 1fr; }
}

/* Messagerie interne */
.messaging-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}
.messaging-inbox { padding: 0; overflow: hidden; }
.conversation-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 82px;
  padding: 14px 18px;
  color: #202a37;
  text-decoration: none;
  border-top: 1px solid #dae1e9;
}
.conversation-row:first-child { border-top: 0; }
.conversation-row:hover { background: #f4faf8; }
.conversation-row.unread { background: #edf8f4; }
.conversation-avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: #fff;
  background: #007d58;
  font-weight: 800;
}
.conversation-summary { min-width: 0; }
.conversation-summary strong,
.conversation-summary small { display: block; }
.conversation-summary small {
  margin-top: 5px;
  overflow: hidden;
  color: #667281;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.conversation-meta {
  display: grid;
  justify-items: end;
  gap: 8px;
  color: #667281;
  font-size: 12px;
}
.conversation-meta strong {
  display: grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  border-radius: 12px;
  color: #fff;
  background: #c44848;
}
.messaging-new-form { max-width: 980px; }
.messaging-new-form select[multiple] { min-height: 210px; }
.chat-shell {
  display: grid;
  grid-template-rows: auto minmax(360px, 1fr) auto;
  min-height: calc(100vh - 145px);
  max-width: 1180px;
  margin: 0 auto;
  overflow: hidden;
  background: #fff;
  border: 1px solid #dae1e9;
}
.chat-header {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px 20px;
  border-bottom: 1px solid #dae1e9;
}
.chat-header h1 { margin: 1px 0 3px; font-size: 23px; }
.chat-header small { color: #667281; }
.chat-thread {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  padding: 24px;
  background: #f3f6f8;
}
.chat-message { display: flex; justify-content: flex-start; }
.chat-message.mine { justify-content: flex-end; }
.chat-message > div {
  width: min(680px, 78%);
  padding: 11px 14px;
  background: #fff;
  border: 1px solid #dae1e9;
  border-radius: 7px;
}
.chat-message.mine > div {
  background: #e4f8f1;
  border-color: #b8e4d5;
}
.chat-message strong { display: block; color: #007d58; font-size: 13px; }
.chat-message p { margin: 6px 0; overflow-wrap: anywhere; }
.chat-message time { display: block; margin-top: 7px; color: #667281; font-size: 11px; text-align: right; }
.message-attachment {
  display: inline-block;
  margin-top: 7px;
  color: #007d58;
  font-weight: 700;
}
.chat-composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: end;
  gap: 12px;
  padding: 14px;
  border-top: 1px solid #dae1e9;
}
.chat-composer textarea { width: 100%; min-height: 68px; resize: vertical; }
.attachment-control { font-size: 13px; color: #667281; }
.attachment-control input { display: block; max-width: 220px; margin-top: 5px; }
@media (max-width: 760px) {
  .messaging-heading { align-items: stretch; flex-direction: column; }
  .conversation-row { grid-template-columns: 42px minmax(0, 1fr); }
  .conversation-meta { display: none; }
  .chat-shell { min-height: calc(100vh - 110px); }
  .chat-message > div { width: 92%; }
  .chat-composer { grid-template-columns: 1fr; }
}

/* Fenêtre de chat globale, inspirée des messageries de travail */
.floating-chat {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 120;
  display: grid;
  grid-template-rows: 58px minmax(0, 1fr);
  width: min(430px, calc(100vw - 28px));
  height: min(680px, calc(100vh - 96px));
  overflow: hidden;
  visibility: hidden;
  opacity: 0;
  transform: translateY(18px) scale(.98);
  background: #fff;
  border: 1px solid #cfd9e2;
  border-radius: 8px;
  box-shadow: 0 20px 52px rgba(19, 42, 55, .24);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.floating-chat.open {
  visibility: visible;
  opacity: 1;
  transform: translateY(0) scale(1);
}
.floating-chat > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  color: #fff;
  background: #007d58;
}
.floating-chat > header strong,
.floating-chat > header small { display: block; }
.floating-chat > header small { margin-top: 2px; color: #dff5ec; font-size: 11px; }
.floating-chat > header button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  color: #fff;
  background: transparent;
  border: 0;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}
.floating-chat iframe { width: 100%; height: 100%; border: 0; background: #f3f6f8; }
body.embedded-chat { min-width: 0; background: #f3f6f8; }
body.embedded-chat { padding-top: 0; }
body.embedded-chat > .topbar,
  body.embedded-chat .app-column > .topbar,
  body.embedded-chat > .floating-chat,
  body.embedded-chat > .app-frame > .sidebar { display: none !important; }
body.embedded-chat .app-frame { display: block; min-height: 100vh; }
body.embedded-chat .page-shell {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}
body.embedded-chat .page-heading {
  margin: 0;
  padding: 15px;
  background: #fff;
  border-bottom: 1px solid #dae1e9;
}
body.embedded-chat .page-heading h1 { font-size: 22px; }
body.embedded-chat .page-heading .lead { display: none; }
body.embedded-chat .content-card { margin: 0; border: 0; border-radius: 0; box-shadow: none; }
body.embedded-chat .conversation-row {
  grid-template-columns: 40px minmax(0, 1fr) auto;
  min-height: 70px;
  padding: 10px 12px;
}
body.embedded-chat .conversation-avatar { width: 38px; height: 38px; }
body.embedded-chat .chat-shell {
  min-height: 100vh;
  height: 100vh;
  border: 0;
}
body.embedded-chat .chat-header { padding: 10px 12px; }
body.embedded-chat .chat-header h1 { font-size: 18px; }
body.embedded-chat .chat-thread { padding: 14px 10px; }
body.embedded-chat .chat-message > div { width: 88%; }
body.embedded-chat .chat-composer {
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 10px;
}
body.embedded-chat .chat-composer .attachment-control {
  grid-column: 1 / -1;
  order: 3;
}
@media (max-width: 600px) {
  .floating-chat {
    inset: 0;
    width: 100vw;
    height: 100vh;
    max-width: none;
    border: 0;
    border-radius: 0;
  }
}

/* Expiration automatique des sessions */
.session-timeout-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 20px;
  visibility: hidden;
  opacity: 0;
  background: rgba(20, 35, 45, .58);
  transition: opacity .18s ease, visibility .18s;
}
.session-timeout-overlay.open {
  visibility: visible;
  opacity: 1;
}
.session-timeout-dialog {
  width: min(520px, 100%);
  padding: 28px;
  background: #fff;
  border: 1px solid #cfd9e2;
  border-top: 5px solid #007d58;
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(18, 38, 49, .28);
}
.session-timeout-dialog h2 {
  margin: 5px 0 12px;
  font-size: 28px;
}
.session-timeout-dialog p {
  margin: 9px 0;
  line-height: 1.55;
}
.session-timeout-dialog [data-session-countdown] {
  color: #b93636;
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}
.session-timeout-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}
.session-timeout-actions form { margin: 0; }
body.session-warning-open { overflow: hidden; }

/* Proposition Assurance Transport */
.transport-conditional[hidden] { display: none !important; }
.transport-proposal-form .section-heading { align-items: center; }
.transport-issued-document { width: min(900px, 100%); margin: 0 auto 28px; }
.transport-issued-page { min-height: 1120px; padding: 42px 48px; background: #fff; border: 1px solid var(--line); box-shadow: 0 12px 34px rgba(20,39,52,.09); }
.transport-issued-title { margin: 42px 0 28px; text-align: center; }
.transport-issued-title span { color: #667281; font-size: 12px; font-weight: 900; letter-spacing: .12em; }
.transport-issued-title h1 { margin: 8px 0 4px; color: #007d58; font-size: 28px; text-transform: uppercase; }
.transport-issued-title p { margin: 0; color: #667281; }
.transport-certificate-callout { margin: 28px 0; padding: 22px 26px; border-left: 6px solid #007d58; background: #e4f8f1; }
.transport-certificate-callout strong { color: #007d58; font-size: 17px; }
.transport-certificate-callout p { margin: 8px 0 0; line-height: 1.65; }
.transport-issued-statement { margin-top: 26px; padding-top: 18px; border-top: 1px solid #bcd8cf; }
.transport-issued-statement h2 { color: #007d58; font-size: 17px; }
.transport-issued-statement div { color: #344250; line-height: 1.65; }
.transport-issued-footer { margin-top: 46px; padding-top: 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 30px; border-top: 2px solid #007d58; }
.transport-issued-footer > div { display: grid; gap: 7px; }
.transport-issued-footer > div:last-child { text-align: center; }
.transport-issued-footer small, .transport-issued-footer span { color: #667281; }
@media print {
  .transport-issued-document { width: 100%; margin: 0; }
  .transport-issued-page { min-height: 277mm; padding: 10mm 12mm; border: 0; box-shadow: none; }
}
.transport-proposal-form .status-badge { white-space: nowrap; }

/* Tableau de bord Assurance Transport */
.transport-dashboard { display: grid; gap: 22px; }
.transport-dashboard-heading {
  margin-bottom: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}
.transport-dashboard-heading .lead { max-width: 720px; }
.transport-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.transport-kpi {
  position: relative;
  min-width: 0;
  min-height: 148px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-top: 4px solid var(--teal);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: 0 5px 16px rgba(15, 37, 53, .05);
}
.transport-kpi::after {
  content: "";
  position: absolute;
  top: 18px;
  right: 18px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--teal);
}
.transport-kpi.is-contract { border-top-color: var(--green); }
.transport-kpi.is-contract::after { background: var(--green); }
.transport-kpi.is-capital { border-top-color: #c1902f; }
.transport-kpi.is-capital::after { background: #c1902f; }
.transport-kpi.is-premium { border-top-color: #356bb0; }
.transport-kpi.is-premium::after { background: #356bb0; }
.transport-kpi span { color: var(--muted); font-size: 14px; font-weight: 700; }
.transport-kpi strong {
  margin-top: auto;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: clamp(24px, 2.2vw, 34px);
  line-height: 1.1;
}
.transport-kpi small { margin-top: 8px; color: var(--muted); }
.transport-dashboard-section {
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: 0 5px 16px rgba(15, 37, 53, .04);
}
.transport-dashboard-section .section-heading { align-items: center; }
.transport-dashboard-section .section-heading h2 { font-size: 22px; }
.transport-recent-table { min-width: 900px; }
.transport-recent-table td { vertical-align: middle; }
.transport-recent-table .status-badge {
  display: inline-flex;
  padding: 5px 8px;
  border-radius: 4px;
  background: #e4f3ee;
  color: var(--green-strong);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.transport-empty-state { padding: 34px !important; color: var(--muted); text-align: center !important; }
.contract-source-summary { margin-bottom: 20px; }
.contract-emission-form { padding-top: 20px; border-top: 1px solid var(--line); }
.transport-shortcut-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.transport-shortcut {
  min-height: 150px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-left: 4px solid var(--teal);
  border-radius: 6px;
  background: var(--surface-soft);
  color: var(--ink);
  text-decoration: none;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}
.transport-shortcut:hover {
  border-color: #8bb5b8;
  background: #f0f8f7;
  transform: translateY(-2px);
}
.transport-shortcut span { color: #b1832d; font-size: 13px; font-weight: 900; }
.transport-shortcut strong { margin-top: 18px; font-size: 17px; }
.transport-shortcut small { margin-top: 7px; color: var(--muted); line-height: 1.45; }

@media (min-width: 981px) {
  body.has-sidebar .sidebar {
    position: fixed;
    left: 0;
    width: 278px;
    overscroll-behavior: contain;
  }
  body.has-sidebar .page-shell { grid-column: 2; }
}

@media (max-width: 1180px) {
  .transport-kpi-grid,
  .transport-shortcut-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .transport-dashboard-heading { align-items: stretch; flex-direction: column; }
  .transport-dashboard-heading .primary-link { justify-content: center; }
  .transport-kpi-grid,
  .transport-shortcut-grid { grid-template-columns: 1fr; }
  .transport-dashboard-section { padding: 16px; }
}
.pre-line { white-space: pre-line; }
@media (max-width: 520px) {
  .session-timeout-dialog { padding: 22px; }
  .session-timeout-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }
  .session-timeout-actions button { width: 100%; }
}
/* Facturation Sante : decisions et reglements groupes */
.decision-note {
  display: block;
  max-width: 25rem;
  color: #7a2e2e;
  font-weight: 700;
  line-height: 1.4;
  white-space: normal;
}

.payment-batch-controls {
  margin-top: 1rem;
  border-left: 4px solid #007d58;
}

.payment-batch-form .data-table input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
}

.decision-panel {
  border-left: 4px solid #b54747;
  background: #fff8f7;
}

/* Référentiel central des calculs */
.calculation-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 0 20px;
  border-bottom: 1px solid var(--line);
}
.calculation-hero h1 { margin: 4px 0 8px; }
.calculation-hero p:last-child { max-width: 820px; margin: 0; color: var(--muted); }
.calculation-count {
  flex: 0 0 auto;
  min-width: 104px;
  padding: 12px 16px;
  border-left: 4px solid #c7962e;
  background: #fff8e8;
  color: #6b4c0b;
}
.calculation-count strong { display: block; font-size: 1.5rem; }
.calculation-hero-actions { display: flex; align-items: center; gap: 12px; }
.calculation-notice {
  display: grid;
  grid-template-columns: minmax(190px, auto) 1fr;
  gap: 18px;
  margin: 20px 0;
  padding: 14px 16px;
  border: 1px solid #c8d9e8;
  border-left: 4px solid #2f6fb0;
  border-radius: 6px;
  background: #f4f8fc;
}
.calculation-filters {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(220px, 320px) auto auto;
  align-items: end;
  gap: 12px;
  margin-bottom: 26px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}
.calculation-filters label span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 700;
  text-transform: uppercase;
}
.calculation-filters input,
.calculation-filters select { width: 100%; }
.calculation-filters > a { padding: 13px 4px; font-weight: 700; }
.calculation-group { margin: 0 0 30px; }
.calculation-group > header {
  display: flex;
  align-items: end;
  gap: 14px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 3px solid #00866a;
}
.calculation-group-health > header { border-bottom-color: #2f6fb0; }
.calculation-group-transport > header { border-bottom-color: #c7962e; }
.calculation-group-common > header { border-bottom-color: #667281; }
.calculation-group > header h2,
.calculation-group > header p { margin: 0; }
.calculation-group > header span { margin-left: auto; color: var(--muted); }
.calculation-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.calculation-rule {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}
.calculation-rule[open] { grid-column: 1 / -1; border-color: #8ebbae; }
.calculation-rule-inactive { opacity: .68; border-style: dashed; }
.calculation-rule summary {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 72px;
  padding: 12px 16px;
  cursor: pointer;
}
.calculation-rule summary::marker { color: #00866a; }
.calculation-rule summary small,
.calculation-rule summary strong { display: block; }
.calculation-rule summary small { margin-bottom: 3px; color: var(--muted); }
.calculation-rule-code,
.calculation-rule-nature { font-size: .78rem; font-weight: 800; text-transform: uppercase; }
.calculation-rule-code { color: #00785f; }
.calculation-rule-nature {
  padding: 5px 8px;
  border-radius: 4px;
  background: #e7f5ef;
  color: #176a50;
}
.calculation-rule-body { padding: 0 16px 16px; border-top: 1px solid var(--line); }
.calculation-formula {
  margin: 16px 0;
  padding: 14px 16px;
  border-left: 4px solid #00866a;
  background: #f2f8f6;
}
.calculation-formula small,
.calculation-formula strong { display: block; }
.calculation-formula small,
.calculation-explanation small {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: .76rem;
  font-weight: 800;
  text-transform: uppercase;
}
.calculation-formula strong { font-size: 1.05rem; }
.calculation-explanation { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.calculation-explanation p { margin: 0; }
.calculation-source {
  margin: 16px 0 0;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-size: .82rem;
  overflow-wrap: anywhere;
}
.calculation-rule-actions,
.calculation-editor-header,
.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}
.calculation-rule-actions { margin-top: 14px; }
.calculation-rule-actions form { margin: 0; }
.calculation-editor-header { justify-content: space-between; margin-bottom: 18px; }
.calculation-editor-header h1 { margin: 4px 0 6px; }
.calculation-editor-form { padding: 22px; }
.calculation-editor-form .form-grid { display: grid; gap: 18px; }
.calculation-editor-form .form-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.calculation-editor-form label > span { display: block; margin-bottom: 7px; font-weight: 800; }
.calculation-editor-form input:not([type="checkbox"]),
.calculation-editor-form select,
.calculation-editor-form textarea { width: 100%; }
.calculation-editor-form .form-field-wide { grid-column: 1 / -1; }
.calculation-editor-form .form-actions { margin-top: 22px; }
.field-error { display: block; margin-top: 5px; color: #b42318; }

.field-span-2 {
  grid-column: 1 / -1;
}

.invoice-total-preview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 24px;
  align-items: center;
  margin-top: 20px;
  padding: 18px 20px;
  border-left: 4px solid var(--brand, #00856a);
  background: #f2faf7;
}

.invoice-total-preview strong {
  font-size: 1.5rem;
}

.invoice-total-preview small {
  grid-column: 1 / -1;
  color: var(--muted, #607080);
}
@media (max-width: 900px) {
  .calculation-filters,
  .calculation-list,
  .calculation-explanation,
  .calculation-editor-form .form-grid-2 { grid-template-columns: 1fr; }
  .calculation-editor-form .form-field-wide { grid-column: auto; }
  .calculation-rule[open] { grid-column: auto; }
}
@media (max-width: 640px) {
  .calculation-hero,
  .calculation-notice { display: block; }
  .calculation-count { display: inline-block; margin-top: 14px; }
  .calculation-notice strong { display: block; margin-bottom: 6px; }
  .calculation-rule summary { grid-template-columns: 68px minmax(0, 1fr); }
  .calculation-rule-nature { grid-column: 2; justify-self: start; }
}
.editable-premium-value {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.editable-premium-value input {
  width: min(9rem, 100%);
  min-width: 0;
  padding: 0.45rem 0.55rem;
  font: inherit;
  font-weight: 700;
}

/* Espace de travail des factures Sante */
.invoice-workspace { display: grid; gap: 18px; }
.invoice-workspace > * { min-width: 0; }
.invoice-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-top: 4px solid var(--green);
  background: var(--surface);
}
.invoice-kpis article { min-height: 112px; padding: 20px; display: grid; align-content: center; border-right: 1px solid var(--line); }
.invoice-kpis article:last-child { border-right: 0; }
.invoice-kpis span, .invoice-kpis small { color: var(--muted); }
.invoice-kpis strong { margin: 5px 0 2px; font-size: 1.6rem; }
.invoice-status-nav { display: flex; min-width: 0; overflow-x: auto; border: 1px solid var(--line); background: var(--surface); }
.invoice-status-link {
  min-width: 138px;
  padding: 13px 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: var(--ink);
  border-right: 1px solid var(--line);
  text-decoration: none;
}
.invoice-status-link:last-child { border-right: 0; }
.invoice-status-link.active { color: var(--green); background: #eaf6f1; box-shadow: inset 0 -3px var(--green); }
.invoice-filter-panel { padding: 17px; border: 1px solid var(--line); background: var(--surface); }
.invoice-filter-primary { display: grid; grid-template-columns: minmax(260px, 2fr) minmax(170px, .8fr) minmax(190px, .9fr) auto; gap: 12px; align-items: end; }
.invoice-filter-primary label,
.invoice-filter-advanced-grid label,
.invoice-primary-form label,
.invoice-secondary-form label { display: grid; gap: 6px; font-weight: 700; }
.invoice-filter-panel input,
.invoice-filter-panel select,
.invoice-primary-form input,
.invoice-secondary-form input {
  width: 100%;
  min-height: 44px;
  padding: 9px 11px;
  border: 1px solid #b9c6cf;
  border-radius: 5px;
  background: #fff;
}
.invoice-advanced-filters { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.invoice-advanced-filters summary,
.invoice-secondary-decisions summary,
.invoice-fold > summary { color: var(--green); font-weight: 800; cursor: pointer; }
.invoice-filter-advanced-grid { margin-top: 13px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.invoice-table-shell { overflow: auto; }
.invoice-table { min-width: 1040px; }
.invoice-table td { vertical-align: middle; }
.invoice-table td > strong,
.invoice-table td > small { display: block; }
.invoice-table td > small { margin-top: 5px; color: var(--muted); }
.invoice-amount-stack { display: grid; grid-template-columns: repeat(3, minmax(72px, 1fr)); gap: 6px; }
.invoice-amount-stack span { display: grid; gap: 2px; }
.invoice-amount-stack small { color: var(--muted); font-size: .72rem; text-transform: uppercase; }
.invoice-action-column { width: 120px; text-align: right; white-space: nowrap; }
.invoice-empty-state { padding: 34px 16px; display: grid; gap: 7px; place-items: center; color: var(--muted); }
.invoice-empty-state strong { color: var(--ink); font-size: 1.1rem; }
.invoice-detail-status { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); background: var(--surface); }
.invoice-detail-status div { padding: 15px 18px; display: grid; gap: 5px; border-right: 1px solid var(--line); }
.invoice-detail-status div:last-child { border-right: 0; }
.invoice-detail-status span { color: var(--muted); font-size: .78rem; text-transform: uppercase; }
.invoice-financial-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.invoice-financial-summary div { min-height: 108px; padding: 18px; }
.invoice-financial-summary small { color: var(--muted); }
.invoice-next-action { display: grid; grid-template-columns: minmax(240px, .75fr) minmax(420px, 1.25fr); gap: 28px; align-items: center; border-left: 4px solid var(--green); }
.invoice-primary-form { display: grid; grid-template-columns: repeat(2, minmax(180px, 1fr)) auto; gap: 12px; align-items: end; }
.invoice-primary-form.compact-form { grid-template-columns: minmax(260px, 1fr) auto; }
.invoice-secondary-decisions { grid-column: 1 / -1; padding-top: 15px; border-top: 1px solid var(--line); }
.invoice-secondary-decision-grid { margin-top: 14px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.invoice-secondary-form { display: grid; grid-template-columns: minmax(220px, 1fr) auto; gap: 10px; align-items: end; }
.invoice-fold { padding: 0; overflow: hidden; }
.invoice-fold > summary { padding: 18px 20px; list-style-position: inside; }
.invoice-fold[open] > summary { border-bottom: 1px solid var(--line); background: #f6f9f8; }
.invoice-fold > .detail-grid { margin: 0; padding: 18px 20px 22px; }
.invoice-decision-note { border-left: 4px solid #c48800; }

@media (max-width: 1100px) {
  .invoice-kpis,
  .invoice-detail-status,
  .invoice-financial-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .invoice-kpis article:nth-child(2), .invoice-detail-status div:nth-child(2) { border-right: 0; }
  .invoice-kpis article:nth-child(-n+2), .invoice-detail-status div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .invoice-filter-primary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .invoice-next-action { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .invoice-kpis,
  .invoice-detail-status,
  .invoice-financial-summary,
  .invoice-filter-primary,
  .invoice-filter-advanced-grid,
  .invoice-primary-form,
  .invoice-primary-form.compact-form,
  .invoice-secondary-decision-grid,
  .invoice-secondary-form { grid-template-columns: 1fr; }
  .invoice-kpis article,
  .invoice-detail-status div { border-right: 0; border-bottom: 1px solid var(--line); }
  .invoice-kpis article:last-child,
  .invoice-detail-status div:last-child { border-bottom: 0; }
  .invoice-next-action { padding: 18px; }
}

.health-rights-panel {
  margin-top: 18px;
  padding: 20px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--green);
  border-radius: 6px;
  background: var(--surface);
}
.health-rights-group { margin-top: 14px; border-top: 1px solid var(--line); }
.health-rights-group > summary {
  padding: 15px 2px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
}
.health-rights-group > summary span { color: var(--green); }
.health-rights-table td span,
.health-rights-table td small { display: block; margin-top: 4px; color: var(--muted); }
.health-exclusion-list { display: grid; gap: 9px; }
.health-exclusion-row {
  padding: 13px 15px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  border: 1px solid var(--line);
  border-left: 4px solid #b33b3b;
  background: #fff;
}
.health-exclusion-row.is-bought-back { border-left-color: var(--green); background: #f2faf6; }
.health-exclusion-row strong,
.health-exclusion-row small,
.health-exclusion-row p { display: block; margin: 3px 0 0; }
.health-exclusion-row small,
.health-exclusion-row p { color: var(--muted); }
.health-exclusion-status { min-width: 170px; display: grid; justify-items: end; gap: 5px; }
.contract-rights-editor-list { display: grid; gap: 14px; }
.contract-rights-editor-row {
  margin: 0;
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--green);
  border-radius: 5px;
}
.contract-exclusion-editor-row { border-left-color: #b33b3b; }
.contract-rights-editor-row p { margin: 0; display: grid; gap: 5px; font-weight: 700; }
.contract-rights-editor-row input,
.contract-rights-editor-row select,
.contract-rights-editor-row textarea { width: 100%; }
.sticky-form-actions {
  position: sticky;
  bottom: 0;
  z-index: 5;
  padding: 14px 0;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: var(--page-bg, #f2f6f5);
}
@media (max-width: 850px) {
  .health-exclusion-row,
  .contract-rights-editor-row { grid-template-columns: 1fr; }
  .health-exclusion-status { min-width: 0; justify-items: start; }
}
.payment-attachments {
  margin-top: 0.75rem;
  padding: 0.75rem;
  border-left: 3px solid var(--brand, #00856a);
  background: #f3faf7;
}

.payment-attachments ul {
  display: grid;
  gap: 0.45rem;
  margin: 0.5rem 0 0;
  padding: 0;
  list-style: none;
}

.payment-attachments li {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  align-items: baseline;
}

.payment-attachments small,
.payment-attachments span {
  color: #5d6b7c;
}
