:root {
  --bg: #F2F4F8; --bg-2: #E6EAF1; --card: #FFFFFF; --ink: #1A2B3C; --ink-2: #3D4D60; --ink-3: #5A6878; --line: #D5DBE5; --line-2: #E8ECF2;
  --night: #0C177B; --night-2: #091160; --night-3: #4B57BE; --blue-soft: #E4E7F8; --acc: #F0A91B; --acc-2: #DB9608; --acc-soft: #FDF1D3; --acc-ink: #5A4100;
  --ok: #1A6B45; --ok-bg: #DFF0E6; --warn: #7F4E00; --warn-bg: #FBEBCB; --err: #AE2218; --err-bg: #FBE3E0;
  --sans: Barlow, system-ui, sans-serif; --cond: "Barlow Condensed", "Arial Narrow", sans-serif; --rib: 30px; --r: 12px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 500 15px/1.5 var(--sans); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--night-3); outline-offset: 2px; border-radius: 4px; }
.num { font-variant-numeric: tabular-nums; }
svg.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.hide { display: none !important; }
.arr { font-style: normal; color: var(--ink-3); margin: 0 .3em; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

.ribbon { position: sticky; top: 0; z-index: 80; height: var(--rib); display: flex; align-items: center; justify-content: center; gap: 8px; padding: 0 12px; background: #060B45; color: #CBD0F0; font-size: 12.5px; white-space: nowrap; overflow: hidden; }
.ribbon b { color: #F6C04D; font-weight: 700; letter-spacing: .02em; }
@media (max-width: 760px) { .ribbon .long { display: none; } }

/* Marque typographique. Pour passer au logo du client, remplacer les deux règles ci-dessous par :
   .logo { background: #fff url(assets/logo.png) center / contain no-repeat; } .logo::before { content: none; } */
.logo { display: grid; place-items: center; flex: none; width: 48px; height: 48px; border-radius: 10px; background: var(--night); color: #fff; font: 700 20px/1 var(--cond); letter-spacing: .05em; border: 1.5px solid rgba(255, 255, 255, .4); }
.logo::before { content: "EPS"; }

/* Boutons et champs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 8px; border: 0; background: var(--night); color: #fff; font-weight: 600; font-size: 14.5px; text-decoration: none; white-space: nowrap; transition: background .15s, transform .15s; }
.btn:hover { background: var(--night-2); }
.btn:active { transform: translateY(1px); }
.btn.o { background: #fff; color: var(--ink); border: 1.5px solid var(--line); }
.btn.o:hover { border-color: var(--ink-3); }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: 13.5px; }
.btn.ok { background: var(--ok); } .btn.ok:hover { background: #13543A; }
.btn.yl { background: var(--acc); color: #1B1400; } .btn.yl:hover { background: var(--acc-2); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.field { display: grid; gap: 6px; }
.field label { font-size: 12.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); }
.field input, .field select, .field textarea { min-height: 44px; border: 1.5px solid var(--line); border-radius: 8px; padding: 0 12px; background: #fff; font-weight: 500; width: 100%; }
.field textarea { padding: 10px 12px; min-height: 84px; resize: vertical; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--night-3); box-shadow: 0 0 0 3px var(--blue-soft); }

/* Connexion */
#login { min-height: calc(100dvh - var(--rib)); display: grid; grid-template-columns: 1fr 1.05fr; }
.lg-art { position: relative; background: var(--night); color: #fff; display: flex; flex-direction: column; justify-content: space-between; gap: 30px; padding: 48px; overflow: hidden; }
.lg-art::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 79px, rgba(255, 255, 255, .045) 79px 80px), repeating-linear-gradient(0deg, transparent 0 79px, rgba(255, 255, 255, .045) 79px 80px); }
.lg-art > * { position: relative; }
.lg-art .eyb { color: #F6C04D; margin-bottom: 14px; }
.lg-art h1 { font: 600 clamp(38px, 4.4vw, 60px)/1 var(--cond); text-transform: uppercase; letter-spacing: .01em; margin: 0 0 16px; }
.lg-art p { margin: 0; color: #D5D9F4; max-width: 470px; font-size: 16.5px; }
.lg-art ul { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 10px; color: #EEF0FB; }
.lg-art li { display: flex; gap: 10px; align-items: center; }
.lg-art li svg { color: #F6C04D; }
.lg-facts { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 13.5px; color: #C7CCF0; border-top: 1px solid rgba(255, 255, 255, .2); padding-top: 18px; }
.lg-facts b { color: #fff; font-weight: 600; }
.lg-form { display: grid; place-items: center; padding: 36px 22px; }
.lg-card { width: min(540px, 100%); }
.brandrow { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.brandrow b { font: 600 21px/1.1 var(--cond); text-transform: uppercase; letter-spacing: .03em; display: block; }
.brandrow small { color: var(--ink-3); font-weight: 500; font-size: 13px; }
.lg-card h2 { font: 600 32px/1.1 var(--cond); text-transform: uppercase; margin: 0 0 6px; }
.lg-card > p { color: var(--ink-2); margin: 0 0 16px; }
.profiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 6px 0 16px; }
.prof { display: flex; gap: 10px; align-items: center; text-align: left; min-height: 56px; padding: 8px 12px; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; min-width: 0; }
.prof[aria-pressed="true"] { border-color: var(--night); box-shadow: 0 0 0 3px var(--blue-soft); }
.prof b { display: block; font-size: 14px; font-weight: 600; }
.prof small { color: var(--ink-3); font-size: 12.5px; display: block; line-height: 1.3; }
.prof:last-child:nth-child(odd) { grid-column: 1 / -1; background: var(--acc-soft); border-color: #E7C977; }
.av { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; font: 700 14px var(--cond); letter-spacing: .03em; color: #fff; flex: none; }
.lg-card .two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.demo-note { margin-top: 14px; padding: 12px 14px; border-radius: 8px; background: var(--acc-soft); color: var(--acc-ink); font-size: 13.5px; }
.secure { display: flex; gap: 8px; align-items: center; color: var(--ok); font-size: 13.5px; font-weight: 600; margin: 12px 0 0; }
@media (max-width: 900px) { #login { grid-template-columns: 1fr; } .lg-art { padding: 26px 22px; gap: 18px; } .lg-art ul { display: none; } }
@media (max-width: 440px) { .profiles, .lg-card .two { grid-template-columns: 1fr; } }

/* Cadre */
#app { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: calc(100dvh - var(--rib)); }
aside.side { background: var(--night); color: #fff; padding: 16px 14px; position: sticky; top: var(--rib); height: calc(100dvh - var(--rib)); overflow: auto; display: flex; flex-direction: column; gap: 4px; }
.side .brandrow { margin: 0 2px 16px; }
.side .brandrow b { font-size: 18px; color: #fff; }
.side .brandrow small { color: #C3C9EE; }
.who { position: relative; }
.who > button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 56px; padding: 8px 10px; border: 1.5px solid rgba(255, 255, 255, .22); border-radius: 10px; background: rgba(255, 255, 255, .07); color: #fff; text-align: left; }
.who > button b { display: block; font-size: 14px; font-weight: 600; }
.who > button small { color: #C3C9EE; font-size: 12.5px; display: block; line-height: 1.35; }
.who > button svg { margin-left: auto; color: #C3C9EE; }
.who .menu { position: absolute; left: 0; right: 0; top: calc(100% + 6px); background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 24px 50px -20px rgba(6, 11, 69, .6); padding: 6px; z-index: 30; }
.who .menu button { display: flex; gap: 10px; align-items: center; width: 100%; min-height: 48px; padding: 6px 8px; border: 0; background: none; border-radius: 8px; text-align: left; }
.who .menu button:hover, .who .menu button[aria-current] { background: var(--bg); }
.who .menu b { display: block; font-size: 13.5px; font-weight: 600; }
.who .menu small { color: var(--ink-3); font-size: 12.5px; }
.grp { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #AEB5E8; padding: 16px 10px 6px; }
#nav { display: grid; gap: 2px; }
#nav button { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 42px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: #DADDF5; font-weight: 600; text-align: left; position: relative; }
#nav button:hover { background: rgba(255, 255, 255, .08); color: #fff; }
#nav button[aria-current="page"] { background: rgba(255, 255, 255, .14); color: #fff; }
#nav button[aria-current="page"]::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: var(--acc); }
#nav .badge { margin-left: auto; min-width: 24px; height: 22px; padding: 0 7px; border-radius: 6px; background: var(--acc); color: #1B1400; font-size: 12.5px; font-weight: 700; display: grid; place-items: center; }
#nav .badge.g { background: rgba(255, 255, 255, .2); color: #fff; }
.protect { margin-top: 16px; background: rgba(255, 255, 255, .08); color: #D5D9F4; border-radius: 10px; padding: 14px; font-size: 13px; }
.protect svg { color: #F6C04D; }
.protect b { color: #fff; display: block; margin: 8px 0 2px; font-weight: 600; }
.protect .btn { width: 100%; margin-top: 10px; background: rgba(255, 255, 255, .14); }
.side .lnk { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 10px; border-radius: 8px; color: #DADDF5; text-decoration: none; font-weight: 600; font-size: 14px; border: 0; background: none; width: 100%; text-align: left; flex: none; }
.side .lnk:hover { background: rgba(255, 255, 255, .08); }
.top { position: sticky; top: var(--rib); z-index: 40; display: flex; align-items: center; gap: 12px; padding: 12px 26px; background: rgba(242, 244, 248, .94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.crumb { display: flex; align-items: center; gap: 8px; font-weight: 700; white-space: nowrap; }
.crumb span { color: var(--ink-3); font-weight: 500; }
.gsearch { position: relative; margin-left: auto; width: min(360px, 30vw); }
.gsearch input { width: 100%; min-height: 44px; border: 1.5px solid var(--line); border-radius: 8px; padding: 0 64px 0 38px; background: #fff; }
.gsearch > svg { position: absolute; left: 12px; top: 13px; color: var(--ink-3); }
.gsearch kbd { position: absolute; right: 10px; top: 11px; font: 600 12px var(--sans); border: 1px solid var(--line); border-radius: 5px; padding: 2px 6px; color: var(--ink-3); background: var(--bg); }
.gres { position: absolute; left: 0; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 24px 50px -24px rgba(6, 11, 69, .5); padding: 6px; z-index: 50; max-height: 380px; overflow: auto; min-width: 270px; }
.gres button { display: grid; grid-template-columns: 1fr auto; gap: 8px; width: 100%; min-height: 48px; text-align: left; padding: 6px 10px; border: 0; background: none; border-radius: 8px; align-items: center; }
.gres button:hover, .gres button.on { background: var(--bg); }
.gres small { color: var(--ink-3); display: block; font-size: 12.5px; }
.chipb { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 8px; border: 1.5px solid var(--line); background: #fff; font-weight: 600; font-size: 13.5px; white-space: nowrap; }
.chipb b { color: var(--night); }
.iconb { position: relative; width: 44px; height: 44px; border-radius: 8px; border: 1.5px solid var(--line); background: #fff; display: grid; place-items: center; flex: none; }
.iconb .dot { position: absolute; right: 8px; top: 8px; width: 10px; height: 10px; border-radius: 50%; background: var(--err); border: 2px solid #fff; }
.notif { position: absolute; right: 0; top: calc(100% + 8px); width: 360px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 24px 50px -24px rgba(6, 11, 69, .5); padding: 8px; z-index: 50; }
.notif h4 { margin: 6px 8px 8px; font-size: 12.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); }
.notif button { display: grid; grid-template-columns: 36px 1fr; gap: 10px; width: 100%; min-height: 48px; text-align: left; padding: 6px 8px; border: 0; background: none; border-radius: 8px; align-items: center; }
.notif button:hover { background: var(--bg); }
.notif small { display: block; color: var(--ink-3); font-size: 12.5px; }
main { min-width: 0; }
.page { padding: 24px 26px 60px; max-width: 1500px; }
#menuBtn { display: none; }
@media (max-width: 1240px) { .chipb.hab { display: none; } }
@media (max-width: 900px) {
  #app { grid-template-columns: 1fr; }
  aside.side { position: fixed; left: 0; top: var(--rib); bottom: 0; z-index: 70; width: 290px; transform: translateX(-100%); visibility: hidden; transition: transform .25s, visibility .25s; height: auto; box-shadow: 30px 0 60px -30px rgba(0, 0, 0, .5); }
  aside.side.open { transform: none; visibility: visible; }
  #scrim { position: fixed; inset: 0; background: rgba(6, 11, 69, .5); z-index: 65; }
  #menuBtn { display: grid; }
  .top { padding: 10px 14px; gap: 8px; }
  .crumb span, .chipb.tourb span { display: none; }
  .gsearch { width: auto; flex: 1; min-width: 0; }
  .gsearch kbd { display: none; }
  .gsearch input { padding-right: 12px; }
  .page { padding: 16px 14px 50px; }
  .notif { width: min(360px, calc(100vw - 28px)); right: -50px; }
  .btn.sm, .period button { min-height: 44px; }
  #nav button, .side .lnk { min-height: 46px; }
}
@media (max-width: 560px) { .crumb { display: none; } .chipb.tourb { padding: 0; width: 44px; justify-content: center; } }

/* Contenu */
.hello { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.hello h1 { font: 600 34px/1.05 var(--cond); text-transform: uppercase; letter-spacing: .01em; margin: 0; }
.hello .upd { color: var(--ink-3); margin-top: 6px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.eyb { font-size: 12.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.period { display: inline-flex; padding: 3px; background: var(--bg-2); border-radius: 8px; flex: none; max-width: 100%; }
.period button { border: 0; background: none; padding: 0 12px; border-radius: 6px; font-weight: 600; font-size: 13.5px; color: var(--ink-2); min-height: 38px; white-space: nowrap; }
.period button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(6, 11, 69, .18); }
@media (max-width: 900px) { .period button { min-height: 44px; } }
.ex { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 5px; background: var(--bg-2); color: var(--ink-2); font: 600 12px var(--sans); letter-spacing: .03em; white-space: nowrap; vertical-align: middle; text-transform: none; }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.kpis.k5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.kpi { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 16px 14px; min-height: 132px; display: flex; flex-direction: column; overflow: hidden; text-align: left; }
button.kpi { cursor: pointer; transition: transform .2s, box-shadow .2s; }
button.kpi:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -22px rgba(6, 11, 69, .6); }
.kpi small { color: var(--ink-2); font-weight: 600; font-size: 13.5px; padding-right: 34px; line-height: 1.3; }
.kpi .go { position: absolute; right: 12px; top: 12px; width: 28px; height: 28px; border-radius: 6px; background: var(--bg); display: grid; place-items: center; }
.kpi b { display: block; font: 600 42px/1 var(--cond); margin: 10px 0 0; white-space: nowrap; }
.kpi b span { font: 600 14px var(--sans); margin-left: 4px; }
.kpi em { font-style: normal; font-size: 12.5px; color: var(--ink-3); margin-top: auto; padding-top: 8px; }
.kpi.hl { background: var(--night); color: #fff; border-color: var(--night); }
.kpi.hl small, .kpi.hl em { color: #CDD2F3; }
.kpi.hl .go { background: rgba(255, 255, 255, .16); }
.kpi.hl::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--acc); }
@media (max-width: 1280px) { .kpis.k5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1150px) { .kpis, .kpis.k5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .kpis.k5 > :last-child { grid-column: 1 / -1; } }
@media (max-width: 480px) { .kpi b { font-size: 34px; } .kpi { min-height: 118px; padding: 14px; } .kpis { gap: 10px; } }

.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; align-items: start; }
.col { display: grid; gap: 16px; min-width: 0; }
.c4 { grid-column: span 4; } .c5 { grid-column: span 5; } .c6 { grid-column: span 6; } .c7 { grid-column: span 7; } .c8 { grid-column: span 8; } .c12 { grid-column: span 12; }
@media (max-width: 1150px) { .c4, .c5, .c7, .c8 { grid-column: span 12; } }
@media (max-width: 900px) { .grid > * { grid-column: span 12 !important; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; min-width: 0; }
.card h3 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font: 600 21px/1.15 var(--cond); text-transform: uppercase; letter-spacing: .02em; margin: 0; }
.card .ch { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card .ch small, .muted { color: var(--ink-3); font-weight: 500; font-size: 13.5px; }
.card.new { border: 2px solid var(--acc); background: linear-gradient(180deg, var(--acc-soft), #fff 70%); }
.empty { color: var(--ink-3); padding: 12px 0; font-size: 14.5px; margin: 0; }
.rise { animation: rise .5s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--d, 0) * 50ms); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

/* Carte des blocages */
.block { padding: 0; overflow: hidden; margin-bottom: 16px; border-color: var(--night); }
.bk-h { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; padding: 18px 22px; background: var(--night); color: #fff; }
.bk-h .eyb { color: #F6C04D; }
.bk-h h2 { font: 600 28px/1.08 var(--cond); text-transform: uppercase; letter-spacing: .01em; margin: 4px 0 0; }
.bk-n { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.bk-n div { padding: 14px 22px; border-right: 1px solid var(--line-2); }
.bk-n div:last-child { border-right: 0; }
.bk-n b { display: block; font: 600 38px/1 var(--cond); }
.bk-n small { color: var(--ink-2); font-size: 13.5px; font-weight: 500; line-height: 1.3; display: block; margin-top: 4px; }
.bk-n .e b { color: var(--err); } .bk-n .w b { color: var(--warn); }
.bk-b { padding: 6px 22px 14px; }
@media (max-width: 700px) { .bk-n { grid-template-columns: 1fr 1fr; } .bk-n div { padding: 12px 16px; border-bottom: 1px solid var(--line-2); } .bk-n div:nth-child(2n) { border-right: 0; } .bk-h { padding: 16px; } .bk-h h2 { font-size: 24px; } .bk-b { padding: 4px 16px 12px; } }

/* Tableaux */
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); padding: 9px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; background: #F7F8FB; }
td { padding: 11px 10px; border-bottom: 1px solid var(--line-2); vertical-align: middle; font-size: 14.5px; }
tr.click { cursor: pointer; }
tr.click:hover td { background: #F5F6FB; }
tr.fresh td { background: var(--acc-soft); }
tr.tot td { background: var(--night); color: #fff; border-bottom: 0; }
td small { display: block; color: var(--ink-3); font-size: 12.5px; }
td b { font-weight: 600; }
td.nw, th.nw, td.num { white-space: nowrap; }
td.act .acts { justify-content: flex-end; }
.ref { font: 600 13.5px ui-monospace, Consolas, monospace; white-space: nowrap; }
.tw { overflow-x: auto; margin: 0 -20px; padding: 0 20px; }
.tx { overflow-x: auto; }
.r { text-align: right; } th.r { text-align: right; }
@media (max-width: 1100px) {
  table.rsp thead { display: none; }
  table.rsp, table.rsp tbody { display: block; }
  table.rsp .pill { white-space: normal; }
  table.rsp tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
  table.rsp tr:last-child { border-bottom: 0; }
  table.rsp td { display: block; padding: 0; border: 0; text-align: left; min-width: 0; background: none !important; white-space: normal; }
  table.rsp td[data-l]:not([data-l=""])::before { content: attr(data-l); display: block; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 2px; }
  table.rsp td.w { grid-column: 1 / -1; }
  table.rsp td:empty { display: none; }
  table.rsp td.act .acts { justify-content: flex-start; }
  table.rsp tr.tot { padding: 12px; border-radius: 8px; background: var(--night); }
}
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 6px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.pill svg { width: 13px; height: 13px; }
.pill.ok { background: var(--ok-bg); color: var(--ok); } .pill.warn { background: var(--warn-bg); color: var(--warn); } .pill.err { background: var(--err-bg); color: var(--err); }
.pill.blue { background: var(--blue-soft); color: var(--night); } .pill.site { background: var(--night-3); color: #fff; } .pill.grey { background: var(--line-2); color: var(--ink-2); } .pill.night { background: var(--night); color: #fff; } .pill.yel { background: var(--acc); color: #1B1400; }
.bar { height: 8px; border-radius: 4px; background: var(--line-2); overflow: hidden; min-width: 60px; }
.bar i { display: block; height: 100%; background: var(--night); border-radius: 4px; }
.bar.ok i { background: var(--ok); } .bar.warn i { background: #D28B00; } .bar.err i { background: var(--err); } .bar.soft i { background: var(--night-3); }
.bw { display: flex; align-items: center; gap: 10px; }
.bw .bar { flex: 1; }
.bw .num { font-size: 13px; color: var(--ink-2); font-weight: 600; white-space: nowrap; }
.list { display: grid; }
.li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line-2); text-align: left; background: none; border-left: 0; border-right: 0; border-bottom: 0; width: 100%; min-height: 48px; }
.li:first-child { border-top: 0; }
.li b { display: block; font-size: 14.5px; font-weight: 600; }
.li small { color: var(--ink-3); font-size: 12.5px; display: block; }
.ico { width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; background: var(--bg); color: var(--night); flex: none; }
.ico.w { background: var(--warn-bg); color: var(--warn); } .ico.e { background: var(--err-bg); color: var(--err); } .ico.b { background: var(--blue-soft); color: var(--night); } .ico.g { background: var(--ok-bg); color: var(--ok); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 0 12px; font-weight: 600; color: var(--ink-2); border-bottom: 3px solid transparent; white-space: nowrap; display: flex; gap: 8px; align-items: center; min-height: 44px; }
.tabs button[aria-selected="true"] { color: var(--ink); border-color: var(--night); }
.tabs .n { background: var(--line-2); border-radius: 5px; padding: 0 7px; font-size: 12.5px; font-weight: 700; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; align-items: center; }
.mini { position: relative; flex: 1; min-width: 200px; max-width: 320px; }
.mini svg { position: absolute; left: 12px; top: 13px; color: var(--ink-3); }
.mini input { width: 100%; min-height: 44px; border: 1.5px solid var(--line); border-radius: 8px; padding: 0 12px 0 36px; background: #fff; }
select.sel { min-height: 44px; border: 1.5px solid var(--line); border-radius: 8px; padding: 0 10px; background: #fff; font-weight: 600; max-width: 100%; }
@media (max-width: 560px) { .mini { max-width: none; flex-basis: 100%; } select.sel { flex: 1 1 46%; min-width: 0; } }
.note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 8px; font-size: 14px; margin: 0; }
.note.i { background: var(--blue-soft); color: #101B6E; } .note.w { background: var(--warn-bg); color: var(--warn); } .note.y { background: var(--acc-soft); color: var(--acc-ink); } .note.e { background: var(--err-bg); color: #7C1810; } .note.g { background: var(--ok-bg); color: #134F33; }
.note svg { margin-top: 2px; }
.note > span { flex: 1; min-width: 0; }
.note .acts { margin-top: 8px; }
.steps { display: flex; gap: 3px; min-width: 110px; }
.steps i { flex: 1; height: 6px; border-radius: 3px; background: var(--line); }
.steps i.on { background: var(--ok); } .steps i.now { background: var(--acc); } .steps i.stop { background: var(--err); }

/* Graphiques */
.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 13.5px; color: var(--ink-2); margin-top: 10px; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 11px; height: 11px; border-radius: 3px; flex: none; }
.hbars { display: grid; gap: 10px; }
.hb { display: grid; grid-template-columns: 170px 1fr 70px; gap: 12px; align-items: center; font-size: 14px; }
.hb .bar { height: 12px; }
.hb .num { text-align: right; font-weight: 600; white-space: nowrap; }
@media (max-width: 560px) { .hb { grid-template-columns: 118px 1fr 56px; font-size: 13px; gap: 8px; } }
.donut { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.donut svg { width: 150px; height: 150px; flex: none; }
.donut .lg { display: grid; gap: 8px; flex: 1; min-width: 170px; font-size: 14px; }
.donut .lg div { display: grid; grid-template-columns: 12px 1fr auto; gap: 8px; align-items: center; }
.donut .lg i { width: 11px; height: 11px; border-radius: 3px; }
.chart30 { width: 100%; height: 170px; display: block; }
.axis { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--ink-3); margin-top: 4px; }
.gauge { position: relative; height: 16px; border-radius: 8px; background: var(--line-2); margin: 34px 0 8px; }
.gauge .zone { position: absolute; top: 0; bottom: 0; background: var(--ok-bg); border-left: 2px solid var(--ok); border-right: 2px solid var(--ok); }
.gauge .mk { position: absolute; top: -8px; bottom: -8px; width: 4px; margin-left: -2px; border-radius: 2px; background: var(--night); }
.gauge .mk b { position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%); font: 700 13px var(--sans); background: var(--night); color: #fff; border-radius: 5px; padding: 1px 7px; white-space: nowrap; }
.big { font: 600 46px/1 var(--cond); }
.big span { font: 600 15px var(--sans); margin-left: 4px; }
.trk { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
@media (max-width: 420px) { .trk { grid-template-columns: 1fr; } }
.tr { border: 1px solid var(--line); border-radius: 10px; padding: 14px; display: grid; gap: 10px; background: #fff; min-width: 0; }
.tr .hd { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.tr .hd b { font-weight: 600; display: block; }
.tr .hd small { color: var(--ink-3); font-size: 12.5px; display: block; }
.road { position: relative; height: 8px; border-radius: 4px; background: var(--line-2); margin: 6px 8px; }
.road i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: var(--night); }
.road em { position: absolute; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; background: var(--acc); border: 3px solid var(--night); }

/* Droits, journal, équipe */
.mx { width: 100%; border-collapse: collapse; min-width: 720px; }
.mx th, .mx td { text-align: center; padding: 10px 8px; border-bottom: 1px solid var(--line-2); }
.mx th:first-child, .mx td:first-child { text-align: left; }
.mx .y { color: var(--ok); font-weight: 700; } .mx .n { color: #8A94A3; }
.seal { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: 10px; background: var(--ok-bg); color: #134F33; font-size: 14px; margin-bottom: 14px; }
.seal .ic { width: 38px; height: 38px; border-radius: 8px; background: #fff; display: grid; place-items: center; color: var(--ok); flex: none; }
.staff { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.sc { border: 1px solid var(--line); border-radius: 10px; padding: 14px; display: grid; gap: 8px; background: #fff; }
.sc .top2 { display: flex; gap: 10px; align-items: center; }
.sc b { display: block; font-weight: 600; }
.sc small { color: var(--ink-3); font-size: 12.5px; }

/* Fiche */
#drawer { position: fixed; top: var(--rib); right: 0; bottom: 0; width: min(620px, 100%); background: var(--card); z-index: 75; box-shadow: -30px 0 60px -30px rgba(6, 11, 69, .5); transform: translateX(105%); visibility: hidden; transition: transform .28s cubic-bezier(.2, .8, .2, 1), visibility .28s; display: flex; flex-direction: column; }
#drawer.open { transform: none; visibility: visible; }
#dScrim { position: fixed; inset: 0; background: rgba(6, 11, 69, .4); z-index: 74; }
.dh { padding: 18px 22px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.dh h2 { font: 600 27px/1.1 var(--cond); text-transform: uppercase; margin: 4px 0 8px; }
.xb { width: 44px; height: 44px; border-radius: 8px; border: 0; background: var(--line-2); display: grid; place-items: center; flex: none; }
.db { overflow: auto; padding: 18px 22px 30px; display: grid; gap: 20px; align-content: start; }
.sec h4 { font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 10px; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 6px 12px; font-size: 14.5px; }
.kv span { color: var(--ink-3); }
.kv b { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.lock { font-size: 13px; color: var(--ink-3); display: inline-flex; gap: 6px; align-items: center; }
.log { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 14px; }
.log li { display: grid; grid-template-columns: 138px 1fr; gap: 10px; }
.log li > span:first-child { color: var(--ink-3); font-size: 13px; }
.dl { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.dl li { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.dl li > span:first-child { flex: 1; min-width: 150px; }
.dl li b { display: block; font-weight: 600; font-size: 14.5px; }
.dl li small { color: var(--ink-3); font-size: 12.5px; display: block; }
.dl li.miss { border-color: #E9B4AE; background: #FFF8F7; } .dl li.chk { border-color: #B9C0EE; background: #F6F7FE; }
.tl { list-style: none; margin: 0; padding: 0; display: grid; }
.tl li { display: grid; grid-template-columns: 24px 1fr; gap: 12px; padding-bottom: 14px; position: relative; }
.tl li::before { content: ""; position: absolute; left: 11px; top: 24px; bottom: 0; width: 2px; background: var(--line); }
.tl li:last-child { padding-bottom: 0; } .tl li:last-child::before { display: none; }
.tl i { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); background: #fff; display: grid; place-items: center; color: #fff; }
.tl li.on i { background: var(--ok); border-color: var(--ok); } .tl li.on::before { background: var(--ok); }
.tl li.now i { border-color: var(--acc-2); background: var(--acc); box-shadow: 0 0 0 4px var(--acc-soft); }
.tl li.stop i { border-color: var(--err); background: var(--err); box-shadow: 0 0 0 4px var(--err-bg); }
.tl b { display: block; font-size: 14.5px; font-weight: 600; line-height: 24px; }
.tl small { color: var(--ink-3); font-size: 12.5px; display: block; }
.tl li:not(.on):not(.now):not(.stop) b { color: var(--ink-3); font-weight: 500; }
.plain { border-radius: 10px; padding: 16px 18px; background: var(--night); color: #fff; display: grid; gap: 4px; }
.plain small { color: #F6C04D; font-size: 12.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.plain b { font: 600 25px/1.15 var(--cond); letter-spacing: .01em; }
.plain span { color: #CDD2F3; font-size: 13.5px; }
.plain.wait { background: #7A3B00; } .plain.wait span { color: #F7DDB5; }
.plain.done { background: var(--ok); } .plain.done span { color: #D5EEDF; } .plain.done small { color: #fff; }
.msg { white-space: pre-wrap; font: 500 14px/1.55 var(--sans); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 14px; margin: 0; overflow-wrap: anywhere; }
.dz { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
@media (max-width: 420px) { .dz { grid-template-columns: 1fr; } }
.dzc { border: 1px solid var(--line); border-radius: 10px; padding: 16px; display: grid; gap: 10px; background: #fff; text-align: left; min-width: 0; }
.dzc:hover { border-color: var(--night-3); }
.dzc .t { font: 600 20px/1.2 var(--cond); }
.dzc .hd { display: flex; justify-content: space-between; gap: 8px; align-items: center; flex-wrap: wrap; }

dialog.modal { width: min(640px, calc(100% - 24px)); max-height: calc(100dvh - 40px); padding: 0; border: 0; border-radius: 14px; background: var(--card); color: var(--ink); box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .6); }
dialog.modal::backdrop { background: rgba(6, 11, 69, .55); backdrop-filter: blur(3px); }
.mh { display: flex; justify-content: space-between; gap: 12px; padding: 20px 22px 12px; border-bottom: 1px solid var(--line-2); }
.mh h2 { font: 600 26px/1.1 var(--cond); text-transform: uppercase; margin: 0; }
.mh p { margin: 4px 0 0; color: var(--ink-3); font-size: 14px; }
.mb { padding: 16px 22px 22px; display: grid; gap: 12px; }
.mb .two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .mb .two { grid-template-columns: 1fr; } .kv { grid-template-columns: 116px 1fr; } .log li { grid-template-columns: 1fr; gap: 0; } }
.serr { color: var(--err); font-weight: 600; min-height: 20px; margin: 0; font-size: 14px; }
.tour { counter-reset: s; display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.tour li { counter-increment: s; display: grid; grid-template-columns: 32px 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.tour li::before { content: counter(s); width: 32px; height: 32px; border-radius: 8px; background: var(--night); color: #fff; display: grid; place-items: center; font: 700 16px var(--cond); }
.tour b { font-weight: 600; }
.tour small { display: block; color: var(--ink-3); font-size: 12.5px; }
.toast { position: fixed; right: 20px; bottom: 20px; z-index: 95; background: var(--ink); color: #fff; padding: 14px 18px; border-radius: 10px; font-weight: 600; max-width: min(460px, calc(100% - 40px)); transform: translateY(160%); visibility: hidden; transition: transform .3s, visibility .3s; display: flex; gap: 10px; align-items: center; }
.toast.on { transform: none; visibility: visible; }
.toast.site { background: var(--night); border-left: 5px solid var(--acc); }

/* Suivi public d'un dossier */
#pub { min-height: calc(100dvh - var(--rib)); }
.pub-h { background: var(--night); color: #fff; padding: 16px 22px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.pub-h b { font: 600 21px/1.1 var(--cond); text-transform: uppercase; letter-spacing: .03em; display: block; }
.pub-h small { color: #C3C9EE; font-size: 13px; }
.pub-b { max-width: 760px; margin: 0 auto; padding: 22px 16px 60px; display: grid; gap: 16px; }
.pub-b .card { display: grid; gap: 20px; }
.pub-b h1 { font: 600 30px/1.1 var(--cond); text-transform: uppercase; margin: 4px 0 8px; }
