@charset "UTF-8";
/* Espace client BilanAI : mêmes couleurs et polices que bilanai.fr, densité d'outil de travail. */
:root {
  --navy: #102b43;
  --navy-deep: #0b2135;
  --ink: #16324a;
  --muted: #526575;
  --ivory: #f7f5ef;
  --paper: #fff;
  --blue: #496c91;
  --pale: #eaf0f5;
  --line: #d9e1e6;
  --ok: #2e6b4f;
  --ok-pale: #e5f1ea;
  --warn: #8a5a12;
  --warn-pale: #f8eedb;
  --err: #9f3025;
  --err-pale: #f9e7e4;
  --focus: #2d5a82;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: 'Segoe UI', system-ui, -apple-system, Roboto, Arial, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ivory); color: var(--ink); font: 1rem/1.6 var(--sans); }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.2; color: var(--navy); margin: 0 0 .5rem; }
h1 { font-size: clamp(1.75rem, 4vw, 2.4rem); }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1rem; }
a { color: var(--blue); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 1rem; top: -4rem; background: var(--paper); padding: .75rem 1rem; z-index: 10; }
.skip-link:focus { top: 1rem; }

.demo-band { background: var(--warn-pale); color: var(--warn); text-align: center; font-size: .875rem; padding: .4rem 1rem; }

/* En-tête */
.topbar { background: var(--paper); border-bottom: 1px solid var(--line); }
@media (min-width: 48rem) { .topbar { position: sticky; top: 0; z-index: 5; } }
.topbar-inner { max-width: 72rem; margin: 0 auto; padding: .9rem 1rem .5rem; display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.brand { text-decoration: none; color: var(--navy); display: flex; align-items: baseline; gap: .75rem; }
.wordmark { font: 1.5rem var(--serif); letter-spacing: -.01em; }
.wordmark span { color: var(--blue); }
.wordmark i { display: inline-block; width: .3rem; height: .3rem; border-radius: 50%; background: var(--blue); margin-left: .15rem; }
.brand-sub { font-size: .875rem; color: var(--muted); }
.company { margin: 0; font-size: .9375rem; color: var(--muted); }
.tabs { max-width: 72rem; margin: 0 auto; padding: 0 .5rem; display: flex; overflow-x: auto; scrollbar-width: none; }
.tabs a { flex: none; padding: .75rem .75rem; min-height: 44px; display: flex; align-items: center; color: var(--muted); text-decoration: none; border-bottom: 3px solid transparent; font-size: .9375rem; }
.tabs a[aria-current="page"] { color: var(--navy); border-bottom-color: var(--navy); font-weight: 600; }

main { max-width: 72rem; margin: 0 auto; padding: 2rem 1rem 3rem; }
main:focus { outline: none; }
.lead { font-size: 1.0625rem; color: var(--muted); max-width: 42rem; }

/* Boutons */
.button { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 44px; padding: .6rem 1.2rem; border-radius: 6px; border: 1px solid var(--navy); background: var(--navy); color: #fff; font: 600 .9375rem var(--sans); text-decoration: none; cursor: pointer; }
.button:hover { background: var(--navy-deep); }
.button-secondary { background: var(--paper); color: var(--navy); }
.button-secondary:hover { background: var(--pale); }
.button-quiet { background: transparent; color: var(--navy); border-color: var(--line); }
.button-link { background: none; border: 0; color: var(--blue); text-decoration: underline; padding: .5rem 0; min-height: 44px; font: inherit; cursor: pointer; }
.button-danger { background: var(--paper); color: var(--err); border-color: var(--err); }
.actions { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; margin-top: 1.5rem; }

/* Cartes */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 1.25rem; }
.grid { display: grid; gap: 1rem; }
@media (min-width: 48rem) { .grid-2 { grid-template-columns: 1fr 1fr; } .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.kicker { font-size: .875rem; color: var(--muted); margin-bottom: .25rem; }
.big { font: 2rem/1.1 var(--serif); color: var(--navy); margin: .25rem 0 .5rem; }

/* Badges d'état */
.badge { display: inline-block; padding: .15rem .55rem; border-radius: 999px; font-size: .8125rem; font-weight: 600; background: var(--pale); color: var(--ink); }
.badge.ok { background: var(--ok-pale); color: var(--ok); }
.badge.warn { background: var(--warn-pale); color: var(--warn); }
.badge.err { background: var(--err-pale); color: var(--err); }

/* Mois : le moment fort de l'interface */
.deadline { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; align-items: baseline; background: var(--navy); color: #fff; border-radius: 10px; padding: 1.25rem; margin-bottom: 1.5rem; }
.deadline h1 { color: #fff; margin: 0; }
.deadline p { margin: 0; color: #d3dfe8; }
.employee { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 1rem; overflow: hidden; }
.employee-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 1.25rem; flex-wrap: wrap; }
.employee-head h2 { font-size: 1.25rem; margin: 0; }
.employee-head p { margin: 0; color: var(--muted); font-size: .9375rem; }
.employee.open { border-color: var(--blue); }
.employee-body { border-top: 1px solid var(--line); padding: 1.25rem; background: #fbfcfd; }
.switch { display: inline-flex; align-items: center; gap: .75rem; cursor: pointer; min-height: 44px; font-weight: 600; }
.switch input { appearance: none; width: 3rem; height: 1.75rem; border-radius: 999px; background: var(--line); position: relative; margin: 0; cursor: pointer; flex: none; transition: background .15s; }
.switch input::after { content: ''; position: absolute; top: .2rem; left: .2rem; width: 1.35rem; height: 1.35rem; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(16, 43, 67, .3); transition: transform .15s; }
.switch input:checked { background: var(--ok); }
.switch input:checked::after { transform: translateX(1.25rem); }
@media (prefers-reduced-motion: reduce) { .switch input, .switch input::after { transition: none; } }

/* Formulaires */
fieldset { border: 0; padding: 0; margin: 0 0 1.25rem; }
legend { font: 1.05rem var(--serif); color: var(--navy); margin-bottom: .5rem; padding: 0; }
.field { display: flex; flex-direction: column; gap: .3rem; margin-bottom: 1rem; }
.field label, .field .label { font-weight: 600; font-size: .9375rem; }
.hint { font-size: .875rem; color: var(--muted); margin: 0; }
input[type="text"], input[type="email"], input[type="tel"], input[type="date"], input[type="number"], select, textarea {
  font: 1rem var(--sans); color: var(--ink); background: #fff; border: 1px solid #a9b6c0; border-radius: 6px; padding: .6rem .7rem; min-height: 44px; width: 100%; }
input[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--err); box-shadow: 0 0 0 1px var(--err); }
.error { color: var(--err); font-size: .875rem; margin: 0; }
.row { display: grid; gap: 0 1rem; }
@media (min-width: 40rem) { .row-2 { grid-template-columns: 1fr 1fr; } .row-3 { grid-template-columns: 1fr 1fr 1fr; } }
.check { display: flex; gap: .75rem; align-items: flex-start; min-height: 44px; padding: .5rem 0; cursor: pointer; }
.check input { width: 1.25rem; height: 1.25rem; margin-top: .2rem; flex: none; accent-color: var(--navy); }
.subitem { border: 1px solid var(--line); border-radius: 8px; padding: 1rem; margin-bottom: .75rem; background: #fff; }
.subitem-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }

.alert { border-radius: 8px; padding: 1rem 1.25rem; margin-bottom: 1.25rem; border: 1px solid; }
.alert.err { background: var(--err-pale); border-color: #e3b5ae; color: #6e2018; }
.alert.ok { background: var(--ok-pale); border-color: #b8d6c4; color: #1f4c37; }
.alert.info { background: var(--pale); border-color: var(--line); }
.alert ul { margin: .5rem 0 0; padding-left: 1.25rem; }
.alert h2 { font-size: 1.15rem; color: inherit; }

/* Assistant du dossier */
.wizard { display: grid; gap: 1.5rem; }
@media (min-width: 60rem) { .wizard { grid-template-columns: 16rem 1fr; align-items: start; } }
.steps { list-style: none; padding: 0; margin: 0; display: flex; gap: .25rem; overflow-x: auto; }
@media (min-width: 60rem) { .steps { flex-direction: column; position: sticky; top: 8rem; } }
.steps a { display: flex; gap: .6rem; align-items: center; padding: .6rem .75rem; min-height: 44px; border-radius: 8px; text-decoration: none; color: var(--ink); white-space: nowrap; }
.steps a[aria-current="step"] { background: var(--paper); border: 1px solid var(--line); font-weight: 600; }
.dot { width: 1.5rem; height: 1.5rem; border-radius: 50%; display: inline-grid; place-items: center; font-size: .75rem; font-weight: 700; flex: none; background: var(--line); color: var(--ink); }
.dot.ok { background: var(--ok); color: #fff; }
.progress { height: .5rem; background: var(--line); border-radius: 999px; overflow: hidden; margin: .5rem 0 1rem; }
.progress span { display: block; height: 100%; background: var(--ok); }

/* Frise du mois */
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { display: grid; grid-template-columns: 2rem 1fr; gap: .75rem; padding-bottom: 1.25rem; position: relative; }
.timeline li::before { content: ''; position: absolute; left: .95rem; top: 1.75rem; bottom: 0; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline .dot { width: 2rem; height: 2rem; }
.timeline .dot.now { background: var(--navy); color: #fff; }
.timeline strong { display: block; }
.timeline p { margin: 0; color: var(--muted); font-size: .9375rem; }

table.simple { width: 100%; border-collapse: collapse; font-size: .9375rem; }
table.simple th, table.simple td { text-align: left; padding: .6rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
table.simple th { font-weight: 600; color: var(--muted); font-size: .875rem; }

dialog { border: 0; border-radius: 10px; padding: 1.5rem; max-width: 32rem; width: calc(100% - 2rem); }
dialog::backdrop { background: rgba(11, 33, 53, .45); }

.demo-tools { max-width: 72rem; margin: 0 auto; padding: 1.5rem 1rem 3rem; border-top: 1px dashed var(--line); color: var(--muted); font-size: .9375rem; }
.demo-tools h2 { font: 600 .9375rem var(--sans); color: var(--muted); }
.demo-buttons { display: flex; gap: .5rem; flex-wrap: wrap; }
.plain-list { padding-left: 1.25rem; margin: 0 0 1rem; }
.plain-list li { margin: .25rem 0; }

.topbar-right { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
[hidden] { display: none !important; }
