/* Aide et Vous — bureau de gestion. Local system fonts: no third-party requests. */
:root {
  --font-ui: "Avenir Next", Avenir, "Segoe UI", Arial, sans-serif;
  --ink: #24343b;
  --muted: #52646d;
  --green: #205d50;
  --green2: #236354;
  --mint: #eaf2ee;
  --soft: #eaf2ee;
  --cream: #f4f6f7;
  --paper: #fff;
  --line: #d4dde0;
  --control-border: #7c8c94;
  --shadow: none;
}
html { font-family: var(--font-ui); color: var(--ink); background: var(--cream); }
body { font-family: var(--font-ui); font-size: 15px; line-height: 1.55; }
button, input, select, textarea { font-family: inherit; }
button, .button { min-height: 44px; border-radius: 6px; font-weight: 600; line-height: 1.4; }
button:not(.primary):not(.link-button), .button:not(.primary) { border-color: var(--control-border); }
button:hover, .button:hover { background: var(--mint); }
.primary:hover { background: #17483c; color: #fff; }
a { text-underline-offset: 3px; }
main :is(p, li, dd) { overflow-wrap: anywhere; }
main :is(a:not(.button):not(.mini-card), summary):hover { text-decoration: underline; }
:is(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
  scroll-margin-block: 100px 30px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--green); outline-offset: 2px; border-color: var(--green); }
input, select, textarea { border-color: var(--control-border); border-radius: 6px; min-width: 0; min-height: 44px; font-size: 16px; }
input[type="checkbox"], input[type="radio"] { min-height: 0; accent-color: var(--green); }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 100; padding: 12px 18px; background: var(--green); color: white; border-radius: 4px; }
.skip-link:focus { top: 12px; outline-color: var(--ink); }
.shell { padding: 32px 32px 64px; min-width: 0; }
.page-heading { gap: 20px; margin-bottom: 24px; align-items: flex-start; }
.page-heading h1, .login-card h1, .print-header h1, .error-page h1,
.onboarding-story h1, .page-title h1, h1 {
  font-family: var(--font-ui);
  font-size: 30px;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -.025em;
  margin: 0 0 10px;
}
.panel-heading h2, .panel h2, .mini-card h2, .recruitment-public-card h2, h2 {
  font-family: var(--font-ui);
  font-size: 20px;
  font-weight: 650;
  line-height: 1.35;
  letter-spacing: -.015em;
}
h3 { font-size: 16px; line-height: 1.4; }
.page-heading p { max-width: 80ch; line-height: 1.55; }
.eyebrow, .step-label { font-size: 12px; font-weight: 600; letter-spacing: .025em; text-transform: none; color: var(--green); }
.brand-mark, .brand-symbol { font-family: var(--font-ui); border-radius: 7px; font-size: 16px; font-weight: 700; letter-spacing: -.06em; }
.brand { font-size: 17px; font-weight: 650; }
.brand small { color: var(--muted); font-size: 12px; }
.stats-grid, .cards-grid { gap: 16px; }
.stat, .panel, .mini-card, .visit, .summary-grid article, .surface, .onboarding-card, .feature-card, .visit-card {
  border-radius: 8px;
  box-shadow: none;
  border: 1px solid var(--line);
  background: var(--paper);
}
.panel { padding: 24px; margin-bottom: 24px; }
.stat { padding: 18px 20px; border-top: 2px solid var(--green); }
.stat.accent { border-top-color: var(--green); }
.stat.warning { border-top-color: #a58034; }
.error-page > span { font-family: var(--font-ui); }
.stat strong, .summary-grid strong { font-family: var(--font-ui); font-size: 30px; font-weight: 600; letter-spacing: -.02em; }
.stat span { font-size: 13px; }
.stat strong, td, input[type="number"], output { font-variant-numeric: tabular-nums; }
.mini-card:hover { box-shadow: none; border-color: var(--green); }
.mini-card h2 { margin-bottom: 8px; }
.panel h2:first-child { margin-top: 0; }
.table-wrap { border: 1px solid var(--line); border-radius: 6px; }
table { font-size: 14px; }
th { font-size: 12px; text-transform: none; letter-spacing: 0; font-weight: 650; background: #f4f6f7; color: var(--muted); line-height: 1.4; }
th, td { padding: 13px 14px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #f8faf9; }
.badge { border-radius: 4px; font-size: 12px; font-weight: 600; line-height: 1.4; }
.actions, .form-actions { gap: 10px; flex-wrap: wrap; }
.form-grid label { color: var(--ink); font-weight: 600; font-size: 13px; }
.form-grid, .detail-grid { gap: 20px; }
.payroll-intro { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.payroll-intro .panel { display: flex; flex-direction: column; align-items: flex-start; }
.payroll-intro .button { margin-top: auto; }
.page-heading .actions { width: auto; }
.detail-grid dt { text-transform: none; letter-spacing: 0; font-size: 12px; }
.notice { border-radius: 6px; line-height: 1.5; }
.construction-notice { color: #624d22; background: #faf5e8; border-color: #ddcca3; border-left: 3px solid #a58034; font-size: 13px; }
.tabs { gap: 4px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.tabs a { border-radius: 5px; min-height: 44px; display: inline-flex; align-items: center; }
.tabs a.active { background: var(--mint); color: var(--green); box-shadow: inset 0 -2px var(--green); }
.status-filters a { border-radius: 5px; }
.calendar-day, .calendar-event, .document-card, .integration-card, .integration-edit, .readiness-item { border-radius: 6px; box-shadow: none; }
.calendar-day { padding: 12px; }
.calendar-event { border-left: 2px solid var(--green); }
.topbar { background: var(--paper); backdrop-filter: none; }
.app-sidebar nav a { color: var(--muted); font-weight: 500; border-radius: 5px; line-height: 1.4; }
.app-sidebar nav a:hover { background: #f0f4f3; color: var(--green); }
.app-sidebar nav a[aria-current="page"] { background: var(--mint); color: var(--green); font-weight: 650; box-shadow: inset 3px 0 var(--green); }
.login-shell { background: var(--cream); padding: 28px 16px; }
.login-card { border-radius: 10px; box-shadow: 0 4px 20px #24343b0a; border: 1px solid var(--line); padding: 32px; }
.login-card h1 { font-size: 28px; }
.login-card p { color: var(--muted); }
.login-brand { margin-bottom: 28px; }
/* Keep the public client/employee walkthrough visually consistent. */
.onboarding-story h1 { font-size: 38px; }
.feature-card:after { display: none; }
.feature-card, .onboarding-card { padding: 28px; }
.role-pill, .status-pill, .date-tile { border-radius: 6px; }
.demo-header { background: var(--paper); }
.demo-brand { font-size: 18px; }
.summary-grid article > span { font-size: 13px; }
.summary-grid .small-value { font-size: 18px; }
.summary-grid small { font-size: 12px; }
@media (min-width: 1100px) {
  body.app-layout { padding-left: 232px; }
  .app-layout > .shell { max-width: 1360px; }
  .topbar.app-sidebar {
    position: fixed; inset: 0 auto 0 0; width: 232px; height: 100dvh;
    display: flex; flex-direction: column; flex-wrap: nowrap; align-items: stretch;
    gap: 24px; padding: 26px 14px 18px;
    border-bottom: 0; border-right: 1px solid var(--line);
  }
  .app-sidebar .brand { padding: 0 6px 22px; border-bottom: 1px solid var(--line); gap: 10px; }
  .app-sidebar .brand-mark { width: 38px; height: 38px; flex-shrink: 0; }
  .app-sidebar .menu-button { display: none; }
  .topbar.app-sidebar nav { display: flex; order: 0; flex: 1 1 0; min-height: 0; overflow-y: auto; flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 3px; }
  .app-sidebar nav a { display: flex; align-items: center; min-height: 42px; padding: 10px 14px; font-size: 14px; }
  .app-sidebar nav .mobile-account-link { display: none; }
  .topbar.app-sidebar .account { margin: 0; border-top: 1px solid var(--line); padding: 16px 8px 0; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; text-align: left; }
  .app-sidebar .account small { font-size: 11px; }
  .app-sidebar .account .link-button { padding: 8px 0; min-height: 40px; color: var(--muted); font-weight: 500; }
  .app-layout :is(.anchor-section, .demo-result, .billing-error) { scroll-margin-top: 24px; }
}
@media (max-width: 1099px) {
  .topbar.app-sidebar { padding: 12px 20px; gap: 12px; flex-wrap: wrap; align-items: center; }
  .app-sidebar .menu-button { display: inline-flex; align-items: center; justify-content: center; margin-left: auto; min-width: 64px; }
  .topbar.app-sidebar nav { display: none; order: 3; flex-basis: 100%; flex-direction: column; flex-wrap: nowrap; gap: 4px; max-height: calc(100dvh - 94px); overflow-y: auto; }
  .topbar.app-sidebar nav.open { display: flex; }
  .app-sidebar nav a { padding: 12px 14px; min-height: 44px; }
  .app-sidebar nav .mobile-account-link { display: block; border-top: 1px solid var(--line); margin-top: 8px; }
  .topbar.app-sidebar .account { display: none; }
  .shell { padding: 28px 24px 56px; }
}
@media (max-width: 650px) {
  body { font-size: 15px; }
  .topbar.app-sidebar { padding: 10px 16px; }
  .shell { padding: 24px 16px 48px; }
  .page-heading h1, .page-title h1, .login-card h1, h1 { font-size: 26px; }
  .onboarding-story h1 { font-size: 30px; }
  .panel h2, .mini-card h2, h2 { font-size: 19px; }
  .panel { padding: 18px; margin-bottom: 18px; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat { padding: 14px; }
  .stat strong { font-size: 26px; }
  .stat span { font-size: 12px; }
  input, select, textarea { font-size: 16px; max-width: 100%; }
  .actions { justify-content: flex-start; width: 100%; }
  .actions .button, .form-actions .button, .form-actions button { max-width: 100%; white-space: normal; }
  .page-heading .actions { margin-top: 4px; }
  .form-grid > *, .cards-grid > *, .stats-grid > * { min-width: 0; }
  .payroll-intro { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .login-card { padding: 24px; }
  .feature-card, .onboarding-card { padding: 20px; }
  .summary-grid article > span { font-size: 12px; }
  .summary-grid .small-value { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  body.app-layout { padding-left: 0; background: white; }
  .topbar.app-sidebar, .skip-link { display: none; }
  .app-layout > .shell { max-width: none; padding: 0; }
  .stat, .panel { break-inside: avoid; box-shadow: none; }
}

/* Identité « Clarté » — demande d’Audrey, 10 octobre 2026.
   Inspiration Apple : typographie système, surfaces blanches, actions bleues.
   Les parcours métier et leurs contrôles restent ceux de l’ERP. */
:root {
  --font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --font-title: var(--font-ui);
  /* Surfaces neutres et contraste stable. */
  --cream: #f5f5f7;
  --paper: #ffffff;
  --surface-2: #fafafa;
  --side: #f5f5f7;
  --ink: #1d1d1f;
  --muted: #626267;
  --line: #dedee3;
  --control-border: #86868b;
  /* Bleu réservé aux actions et à la sélection. */
  --green: #0066cc;
  --green2: #0059b3;
  --accent: #0066cc;
  --accent-strong: #0059b3;
  --mint: #eaf3ff;
  --soft: #eaf3ff;
  /* États, toujours doublés d'un texte : la couleur ne porte jamais seule l'information. */
  --ok: #3f6e58; --ok-soft: #e1ece5;
  --warn: #8a6420; --warn-soft: #f3ebda;
  --alert: #9a3f38; --alert-soft: #f4e2df;
  --orange: #8a6420;
  --red: #9a3f38;
  --radius-s: 6px;
  --radius-m: 10px;
}
html { background: var(--cream); }
body { font-size: 16px; line-height: 1.55; font-feature-settings: "kern"; }
.primary, button.primary, .button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.primary:hover, button.primary:hover, .button.primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); color: #fff; }
button:hover, .button:hover { background: var(--mint); }
a { color: var(--accent-strong); }

/* Une seule famille pour les titres, les formulaires et les données. */
.page-heading h1, .login-card h1, .print-header h1, .error-page h1, .onboarding-story h1, .page-title h1, h1 {
  font-family: var(--font-title); font-weight: 600; letter-spacing: -.035em; font-size: 36px; line-height: 1.15;
}
.panel-heading h2, .panel h2, .mini-card h2, h2 { font-family: var(--font-ui); font-weight: 700; letter-spacing: 0; }
.eyebrow, .step-label { color: var(--muted); font-weight: 600; }
.stat strong, .summary-grid strong { font-family: var(--font-title); font-weight: 600; }

/* Surfaces */
.panel, .stat, .mini-card, .surface, .summary-grid article { border-color: var(--line); border-radius: var(--radius-m); }
.stat { border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.stat.accent { border-left-color: var(--accent); border-top-color: var(--line); }
.stat.warning { border-left-color: var(--warn); border-top-color: var(--line); }
th { background: var(--surface-2); }
tbody tr:hover { background: var(--surface-2); }
.badge { border-radius: 999px; padding: 2px 10px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.construction-notice { background: var(--warn-soft); border-color: #e2d3b2; border-left-color: var(--warn); color: #5d4415; }
.notice.success { background: var(--ok-soft); border-color: #c4d8cc; color: #2c4f3f; }
.notice.danger, .notice.error { background: var(--alert-soft); border-color: #e3c3be; color: #6e2c27; }
.tabs a.active { background: var(--mint); color: var(--accent-strong); box-shadow: inset 0 -2px var(--accent); }
.calendar-event { border-left-color: var(--accent); }
:is(a, button, input, select, textarea, summary, [tabindex]):focus-visible { outline-color: var(--accent); }
input:focus, select:focus, textarea:focus { outline-color: var(--accent); border-color: var(--accent); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); }

/* Menu latéral groupé : quatre familles au lieu d'une longue liste. */
.brand-mark { font-family: var(--font-title); font-weight: 600; letter-spacing: 0; background: var(--accent); color: #fff; }
.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-group + .nav-group { margin-top: 14px; }
.nav-title { margin: 0 0 4px; padding: 0 14px; font-size: 13px; font-weight: 600; color: var(--muted); }
.app-sidebar nav a { justify-content: space-between; gap: 8px; color: var(--ink); font-weight: 500; }
.app-sidebar nav a:hover { background: var(--paper); color: var(--ink); }
.app-sidebar nav a[aria-current="page"] { background: var(--paper); color: var(--ink); font-weight: 700; box-shadow: inset 3px 0 var(--accent); }
.nav-count { min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; text-align: center; }
.nav-external { color: var(--muted); font-size: 13px; }
@media (min-width: 1100px) {
  body.app-layout { padding-left: 248px; }
  .topbar.app-sidebar { width: 248px; background: var(--side); border-right-color: var(--line); }
  .app-sidebar .brand { border-bottom-color: #dedee3; }
  .topbar.app-sidebar nav { gap: 0; }
  .app-sidebar nav a { min-height: 38px; padding: 7px 14px; font-size: 15px; }
  .topbar.app-sidebar .account { border-top-color: #dedee3; }
}
@media (max-width: 1099px) {
  .topbar.app-sidebar { background: var(--side); }
  .nav-group + .nav-group { margin-top: 10px; }
}

/* Tableau de bord : la journée d'abord, puis ce qu'il reste à faire. */
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.dashboard-grid .panel { margin-bottom: 0; }
.dashboard-side { display: grid; gap: 24px; }
.visit-list { list-style: none; margin: 0; padding: 0; }
.visit-row { display: grid; grid-template-columns: 112px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.visit-row:first-child { border-top: 0; }
.visit-row time { font-weight: 700; font-variant-numeric: tabular-nums; }
.visit-row time small { display: block; font-weight: 400; color: var(--muted); font-size: 13px; }
.visit-row b { display: block; }
.visit-row .visit-meta { color: var(--muted); font-size: 14px; }
.state { font-size: 13px; font-weight: 600; padding: 3px 10px; border-radius: 999px; white-space: nowrap; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.state.alert { background: var(--alert-soft); color: var(--alert); border-color: transparent; }
.state.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.todo-list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 10px; }
.todo-list a { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--line); border-left: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface-2); color: var(--ink); text-decoration: none; }
.todo-list a:hover { border-color: var(--accent); text-decoration: none; }
.todo-list .todo-count { font-family: var(--font-title); font-size: 22px; text-align: center; }
.todo-list b { display: block; }
.todo-list small { display: block; color: var(--muted); font-size: 14px; }
.todo-list .is-alert a { border-left-color: var(--alert); }
.todo-list .is-warn a { border-left-color: var(--warn); }
.todo-list .is-calm a { border-left-color: var(--ok); }
.figures { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 12px 0 0; }
.figures dt { font-size: 14px; color: var(--muted); }
.figures dd { margin: 0; font-family: var(--font-title); font-size: 28px; }
@media (max-width: 900px) {
  .dashboard-grid { grid-template-columns: minmax(0, 1fr); }
  .visit-row { grid-template-columns: 88px minmax(0, 1fr); }
  .visit-row .state { grid-column: 2; justify-self: start; }
}
.dashboard-after { margin-top: 24px; }
/* Menu compact : les quatre familles tiennent sans défilement sur un écran de portable. */
@media (min-width: 1100px) {
  .topbar.app-sidebar { gap: 14px; padding: 20px 12px 14px; }
  .app-sidebar .brand { padding: 0 6px 14px; }
  .app-sidebar nav a { min-height: 32px; padding: 5px 12px; font-size: 15px; }
  .nav-title { padding: 0 12px; margin-bottom: 2px; }
  .nav-group + .nav-group { margin-top: 10px; }
  .topbar.app-sidebar .account { padding-top: 10px; gap: 0; }
  .app-sidebar .account .link-button { min-height: 32px; padding: 4px 0; }
}
/* Calendrier : une carte par passage, lisible même à sept colonnes. */
.personal-calendar { gap: 8px; }
.calendar-day { background: var(--paper); border-color: var(--line); border-radius: var(--radius-s); min-height: 120px; }
.calendar-day.is-empty { background: var(--surface-2); }
.calendar-day h3 { font-size: 14px; font-weight: 700; color: var(--ink); margin-bottom: 8px; }
.calendar-event { display: flex; flex-direction: column; gap: 1px; margin: 0 0 6px; padding: 6px 8px; background: var(--mint); border: 0; border-left: 3px solid var(--accent); border-radius: 4px; font-size: 13px; line-height: 1.35; color: var(--ink); }
.calendar-event strong { font-variant-numeric: tabular-nums; font-size: 12px; }
.calendar-event .calendar-who { font-weight: 700; }
.calendar-event .calendar-what { color: var(--muted); }
.calendar-event small { color: var(--muted); font-size: 12px; }
.calendar-event.status-realisee, .calendar-event.status-validee { background: var(--ok-soft); border-left-color: var(--ok); }
.calendar-event.status-annulee { background: var(--surface-2); border-left-color: var(--line); text-decoration: line-through; }
/* Connexion : calme, sans halo décoratif. */
.login-shell { background: var(--cream); }
.login-card { border-radius: 20px; box-shadow: 0 8px 32px #1d1d1f08; border: 1px solid var(--line); }
.login-card h1 { font-family: var(--font-title); font-weight: 600; font-size: 34px; }
.login-card .stack label { font-weight: 600; }
/* Chiffres en Atkinson : les chiffres elzéviriens de Young Serif font passer 0 pour « o ». */
.stat strong, .summary-grid strong, .figures dd, .todo-list .todo-count { font-family: var(--font-ui); font-weight: 700; font-variant-numeric: lining-nums tabular-nums; }
.figures dd { font-size: 26px; }
.notice.warning { background: var(--warn-soft); border-color: #e2d3b2; border-left: 1px solid var(--warn); color: #5d4415; }
.contract-preparation fieldset { border: 1px solid var(--border, #c7cec7); padding: 1.2rem; border-radius: 10px; margin: 0; min-width: 0; }
.contract-preparation legend { padding: 0 .4rem; font-weight: 700; }
.contract-preparation [hidden] { display: none !important; }
.dossier-pieces > details { padding: 1rem 0; border-bottom: 1px solid var(--border, #c7cec7); }
.dossier-pieces summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.dossier-pieces .stack { margin-top: 1rem; }

/* Fiche client (C3, 8 octobre 2026) : un seul bouton principal, le reste rangé dans « Autres actions ». */
.more-actions { position: relative; }
.more-actions > summary { list-style: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--control-border); border-radius: var(--radius-s); background: var(--paper); font-weight: 600; cursor: pointer; }
.more-actions > summary::-webkit-details-marker { display: none; }
.more-actions > summary::after { content: ""; width: 7px; height: 7px; margin-left: 10px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); }
.more-actions[open] > summary::after { transform: translateY(2px) rotate(-135deg); }
.more-actions > ul { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 240px; margin: 0; padding: 6px; list-style: none; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-m); }
.more-actions li a { display: block; padding: 10px 12px; border-radius: var(--radius-s); color: var(--ink); text-decoration: none; }
.more-actions li a:hover { background: var(--mint); text-decoration: none; }

/* Étapes du dossier : une suite réelle, faite dans cet ordre ; l'état est toujours écrit, jamais porté par la seule couleur. */
.dossier-steps ol { list-style: none; margin: 16px 0 0; padding: 0; counter-reset: step; }
.dossier-steps li { counter-increment: step; position: relative; display: grid; grid-template-columns: 32px 92px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.dossier-steps li:first-child { border-top: 0; }
.dossier-steps li::before { content: counter(step); display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; font-family: var(--font-title); font-size: 15px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.dossier-steps .is-done::before { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.dossier-steps .step-text { font-size: 15px; }
.dossier-steps .is-next .step-text { font-weight: 700; }
.dossier-steps .is-next::before { background: var(--accent); color: #fff; border-color: transparent; }
.dossier-steps .is-done .step-text { color: var(--muted); }
.step-state { justify-self: start; font-size: 13px; font-weight: 600; padding: 2px 10px; border-radius: 999px; }
.is-done .step-state { background: var(--ok-soft); color: var(--ok); }
.is-todo .step-state { background: var(--warn-soft); color: var(--warn); }
.dossier-counts { margin: 16px 0 0; color: var(--muted); }
.is-locked .step-state { background: var(--surface-2); color: var(--muted); }
.dossier-steps .is-locked .step-text { color: var(--muted); }
.pay-summary dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px 24px; margin: 12px 0 0; }
.pay-summary dl > div { margin: 0; }
.pay-summary dt { color: var(--muted); font-size: 14px; }
.pay-summary dd { margin: 2px 0 0; font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.pay-summary .pay-summary-main { grid-column: 1 / -1; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.pay-summary .pay-summary-main dd:first-of-type { font-family: var(--font-title); font-size: 34px; font-weight: 400; color: var(--accent-strong); }
.pay-summary .pay-summary-main dd.muted { font-size: 15px; font-weight: 400; }
.pay-summary > p { margin: 14px 0 0; }
@media (max-width: 640px) {
  .dossier-steps li { grid-template-columns: 28px minmax(0, 1fr); row-gap: 4px; }
  .dossier-steps li::before { grid-row: span 2; }
  .dossier-steps li > a { grid-column: 2; justify-self: start; }
  .more-actions > ul { right: auto; left: 0; }
}

/* Recrutement (C3) : les étapes forment une suite, lue de gauche à droite ; une étape vide s'efface. */
.recruitment-flow ol { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: var(--radius-m); overflow: hidden; }
.recruitment-flow li + li { border-left: 1px solid var(--line); }
.recruitment-flow li a { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 14px 12px; color: var(--ink); text-decoration: none; }
.recruitment-flow li a:hover { background: var(--mint); text-decoration: none; }
.recruitment-flow strong { font-family: var(--font-title); font-weight: 600; font-size: 26px; line-height: 1.1; }
.recruitment-flow span { font-size: 14px; line-height: 1.3; }
.recruitment-flow small { margin-top: auto; padding-top: 6px; font-weight: 700; color: var(--accent-strong); }
.recruitment-flow .is-empty strong, .recruitment-flow .is-empty span { color: var(--muted); }
.recruitment-flow .has-items { background: var(--surface-2); box-shadow: inset 0 3px var(--accent); }
@media (max-width: 900px) {
  .recruitment-flow ol { grid-template-columns: 1fr; }
  .recruitment-flow li + li { border-left: 0; border-top: 1px solid var(--line); }
  .recruitment-flow li a { flex-direction: row; align-items: baseline; gap: 12px; }
  .recruitment-flow strong { min-width: 32px; font-size: 22px; }
  .recruitment-flow small { margin: 0 0 0 auto; padding: 0; }
}
.filter-panel > summary { display: flex; align-items: center; gap: 12px; cursor: pointer; list-style: none; }
.filter-panel > summary::-webkit-details-marker { display: none; }
.filter-panel > summary h2 { margin: 0; }
.filter-panel > summary::after { content: ""; width: 8px; height: 8px; margin-left: auto; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); }
.filter-panel[open] > summary::after { transform: rotate(-135deg); }
.filter-panel[open] > summary { margin-bottom: 12px; }

/* Rythme du bureau : navigation discrète, contenu et actions prioritaires. */
:root { --radius-s: 8px; --radius-m: 16px; --border: var(--line); }
body { -webkit-font-smoothing: antialiased; }
::selection { background: #cce4ff; color: var(--ink); }
input, textarea { caret-color: var(--accent); }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
.eyebrow, .step-label { display: none; }
.page-heading { margin-bottom: 32px; gap: 24px; }
.page-heading p { max-width: 72ch; font-size: 16px; }
.page-heading h1 { margin-bottom: 12px; }
.panel { padding: 28px; }
.panel h2, .panel-heading h2 { font-size: 21px; font-weight: 600; letter-spacing: -.02em; }
.panel-heading { align-items: baseline; gap: 16px; flex-wrap: wrap; }
button, .button { border-radius: 999px; padding: 10px 18px; font-weight: 500; }
button:not(.primary):not(.link-button), .button:not(.primary) { border-color: var(--line); background: var(--paper); }
button:not(.primary):not(.link-button):hover, .button:not(.primary):hover { background: var(--surface-2); border-color: var(--control-border); }
button:active, .button:active { filter: brightness(.96); }
button:disabled, .button[aria-disabled="true"] { cursor: not-allowed; opacity: .6; }
.brand-mark { background: var(--ink); font-family: var(--font-ui); font-weight: 600; border-radius: 50%; }
.brand { letter-spacing: -.025em; }
.nav-title { font-size: 12px; font-weight: 500; }
.app-sidebar nav a { border-radius: 8px; }
.app-sidebar nav a[aria-current="page"] { background: var(--paper); color: var(--accent-strong); box-shadow: none; font-weight: 600; }
.app-sidebar .brand, .topbar.app-sidebar .account { border-color: var(--line); }
.nav-group + .nav-group { margin-top: 18px; }
.stat { border: 1px solid var(--line); padding: 24px; }
.stat strong, .summary-grid strong { font-weight: 600; letter-spacing: -.035em; }
.stat.accent, .stat.warning { border-color: var(--line); }
.table-wrap { border-color: var(--line); border-radius: 12px; }
th { background: var(--surface-2); color: var(--muted); font-size: 13px; font-weight: 500; }
th, td { padding: 16px; }
input, select, textarea { border-radius: 10px; border-color: var(--control-border); }
label, .form-grid label, .stack label { font-weight: 500; }
.notice { padding: 14px 18px; border-radius: 12px; }
.construction-notice { background: var(--paper); border: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.construction-notice strong { color: var(--ink); font-weight: 600; }
.todo-list a { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; padding: 14px 0; }
.todo-list .is-alert a, .todo-list .is-warn a, .todo-list .is-calm a { border-left: 0; }
.todo-list a:hover { background: var(--surface-2); }
.todo-list .todo-count { border-radius: 50%; background: var(--surface-2); font-weight: 600; }
.todo-list .is-alert .todo-count { color: var(--alert); background: var(--alert-soft); }
.todo-list .is-warn .todo-count { color: var(--warn); background: var(--warn-soft); }
.visit-row { padding: 18px 0; }
.visit-row time { font-weight: 600; }
.figures dd { font-size: 32px; font-weight: 600; letter-spacing: -.035em; }
.integration-summary, .integration-card, .connection-item, .demo-result { border-top-width: 1px; border-top-color: var(--line); }
.integration-summary { border-radius: 12px; }
.integration-form + .integration-form, .integration-footer { background: var(--surface-2); }
.integration-header h2 { font-family: var(--font-ui); font-weight: 600; }
.safety-note { border-left-width: 1px; }
.login-shell { background: var(--cream); }
.login-card { width: min(460px, 100%); padding: 40px; }
.login-card h1 { font-family: var(--font-ui); font-size: 32px; font-weight: 600; letter-spacing: -.035em; }
.login-card > .muted { font-size: 15px; }
.login-card .stack { gap: 20px; }
.pay-summary .pay-summary-main dd:first-of-type { font-family: var(--font-ui); font-weight: 600; }
@media (min-width: 1100px) {
  body.app-layout { padding-left: 240px; }
  .topbar.app-sidebar { width: 240px; padding: 24px 16px 18px; gap: 22px; box-shadow: none; }
  .app-layout > .shell { max-width: 1480px; padding: 44px 40px 72px; }
  .app-sidebar .brand { padding-bottom: 22px; }
  .app-sidebar nav a { min-height: 36px; padding: 8px 12px; font-size: 14px; }
  .topbar.app-sidebar .account { padding-top: 16px; }
}
@media (max-width: 1099px) {
  .topbar.app-sidebar { background: var(--paper); box-shadow: none; }
  .app-sidebar nav a[aria-current="page"] { background: var(--mint); }
  .nav-group + .nav-group { margin-top: 14px; }
}
@media (max-width: 650px) {
  .shell { padding: 28px 16px 48px; }
  .page-heading h1, .page-title h1, h1 { font-size: 28px; }
  .page-heading { margin-bottom: 24px; }
  .page-heading .actions { gap: 8px; }
  .panel { padding: 20px; }
  .panel h2, .panel-heading h2 { font-size: 19px; }
  .stat { padding: 18px; }
  .login-card { padding: 28px; }
  .login-card h1 { font-size: 28px; }
  .visit-row { gap: 12px; }
  .figures dd { font-size: 28px; }
}
@media print {
  .panel, .stat { border-color: #ccc; border-radius: 0; box-shadow: none; }
}
/* Les pastilles gardent la casse de leur libellé (« À préparer », « Partiellement payée ») : l'ancienne feuille mettait une capitale à chaque mot. */
.badge { text-transform: none; }
