/* Evergrande Transit — interface (charte issue du logo et de la maquette : bleu marine, bleu vif, rouge) */
:root {
  --navy: #0a2f7a; --navy-2: #0e3d96; --navy-3: #1a4cb0;
  --blue: #1d62d6; --blue-600: #1650b8; --blue-50: #eaf1ff; --blue-100: #d6e4ff;
  --red: #e0101a; --red-600: #bd0c15; --red-50: #fde7e8;
  --green: #1c9a58; --green-50: #e1f5ea; --orange: #e08a07; --orange-50: #fdf0d6; --yellow: #c9a100; --yellow-50: #fbf4cf;
  --danger: #d93636; --danger-50: #fde6e6; --violet: #6b4fd6;
  --bg: #eef3fb; --card: #fff; --line: #e0e8f4; --line-2: #cfd9ea; --text: #14213d; --muted: #5d6c88; --muted-2: #8795ae;
  --radius: 12px; --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(10, 35, 90, .05), 0 6px 20px rgba(10, 35, 90, .06);
  --shadow-lg: 0 20px 60px rgba(8, 25, 70, .28);
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, Arial, sans-serif;
  --side-w: 232px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 14px; line-height: 1.45; color: var(--text); background: var(--bg); }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; }
p { margin: 0 0 .6em; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid rgba(29, 98, 214, .45); outline-offset: 2px; border-radius: 6px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
.skip { position: absolute; left: -999px; top: 6px; background: #fff; padding: 8px 12px; border-radius: 6px; z-index: 1000; }
.skip:focus { left: 8px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; }
.nowrap { white-space: nowrap; }
.noscript { padding: 24px; text-align: center; }
.spacer { flex: 1; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ---------- Boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px; border-radius: 9px; border: 1px solid transparent; font-weight: 600; font-size: 13.5px; line-height: 1.2; transition: background .15s, box-shadow .15s, transform .05s; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.loading { position: relative; color: transparent; pointer-events: none; }
.btn.loading::after { content: ""; position: absolute; width: 16px; height: 16px; border: 2px solid rgba(255, 255, 255, .5); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.btn-ghost.loading::after, .btn-white.loading::after { border-color: rgba(0, 0, 0, .2); border-top-color: var(--blue); }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 4px 12px rgba(29, 98, 214, .28); }
.btn-primary:hover:not(:disabled) { background: var(--blue-600); }
.btn-red { background: var(--red); color: #fff; box-shadow: 0 4px 12px rgba(224, 16, 26, .28); }
.btn-red:hover:not(:disabled) { background: var(--red-600); }
.btn-green { background: var(--green); color: #fff; box-shadow: 0 4px 12px rgba(28, 154, 88, .26); }
.btn-green:hover:not(:disabled) { background: #167f49; }
.btn-ghost { background: #fff; border-color: var(--line-2); color: var(--text); }
.btn-ghost:hover:not(:disabled) { background: var(--blue-50); border-color: var(--blue-100); }
.btn-white { background: #fff; color: var(--navy); border-color: var(--line-2); }
.btn-sm { padding: 6px 11px; font-size: 12.5px; border-radius: 8px; }
.btn-block { width: 100%; }
.icon-btn { background: none; border: 0; padding: 6px; border-radius: 8px; color: var(--muted); display: inline-grid; place-items: center; }
.icon-btn:hover { background: var(--blue-50); color: var(--blue); }

/* ---------- Champs ---------- */
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; min-width: 0; }
.field label { font-weight: 600; font-size: 12.5px; color: #2a3a5c; }
.req { color: var(--red); }
.hint { font-size: 12px; color: var(--muted); }
.field-err { font-size: 12px; color: var(--danger); min-height: 0; }
.field-err:empty { display: none; }
input, select, textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 9px; background: #fff; transition: border-color .15s, box-shadow .15s; min-width: 0; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(29, 98, 214, .16); }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--danger); }
input:disabled, select:disabled { background: #f3f6fb; color: var(--muted); }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap > .ic { position: absolute; left: 12px; color: var(--muted-2); pointer-events: none; }
.input-wrap input { padding-left: 38px; }
.input-wrap .eye { position: absolute; right: 4px; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; user-select: none; }
.check input { width: 16px; height: 16px; accent-color: var(--blue); padding: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 16px; }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 650; white-space: nowrap; }
.b-success, .b-green { background: var(--green-50); color: #11713f; }
.b-warning { background: var(--orange-50); color: #9a5f00; }
.b-orange { background: #ffe9d6; color: #b34a00; }
.b-danger { background: var(--danger-50); color: #b11f1f; }
.b-info { background: var(--blue-50); color: var(--blue-600); }
.b-neutral { background: #eceff5; color: #4a5875; }
.level-chip { display: inline-flex; align-items: baseline; gap: 4px; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.level-chip b { color: var(--navy); background: var(--blue-50); padding: 1px 7px; border-radius: 6px; font-size: 12px; }

/* ---------- Cartes ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h2 { font-size: 15px; color: var(--navy); }
.card.flush { padding: 0; overflow: hidden; }
.card.flush .card-head { padding: 16px 18px 0; }

/* ---------- Écran de connexion ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); background: #fff; }
.login-hero { position: relative; background: var(--navy) url("/assets/hero.jpg") center/cover no-repeat; min-height: 360px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; }
.login-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255, 255, 255, .92) 0%, rgba(255, 255, 255, .55) 18%, rgba(10, 47, 122, .05) 38%, rgba(10, 47, 122, .55) 100%); }
.login-hero .brand { position: relative; padding: 26px 30px; }
.login-hero .brand img { height: 86px; width: auto; display: block; }
.login-hero .tagline { position: relative; color: #fff; padding: 0 30px 34px; max-width: 560px; text-shadow: 0 2px 12px rgba(0, 0, 0, .35); }
.login-hero .tagline h2 { font-size: 26px; font-weight: 750; margin-bottom: 8px; }
.login-hero .tagline ul { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 7px; font-weight: 600; font-size: 14px; }
.login-hero .tagline li { display: flex; gap: 9px; align-items: center; }
.login-hero .tagline .ic { color: #7fe3a8; }
.login-side { position: relative; display: flex; align-items: center; justify-content: center; padding: 40px 28px; background: #fff url("/assets/swoosh.svg") left center/auto 100% no-repeat; }
.login-card { width: 100%; max-width: 400px; }
.login-card .mobile-logo { display: none; }
.login-card h1 { font-size: 24px; color: var(--navy); margin-bottom: 4px; }
.login-card .sub { color: var(--muted); margin-bottom: 24px; }
.login-card .row-between { display: flex; justify-content: space-between; align-items: center; margin: -2px 0 18px; gap: 8px; flex-wrap: wrap; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted-2); font-size: 12px; margin: 14px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.login-foot { margin-top: 28px; text-align: center; font-size: 12px; color: var(--muted-2); }
.alert { display: flex; gap: 10px; padding: 11px 13px; border-radius: 10px; font-size: 13px; margin-bottom: 14px; align-items: flex-start; }
.alert .ic { margin-top: 1px; }
.alert-error { background: var(--danger-50); color: #9b1c1c; }
.alert-info { background: var(--blue-50); color: var(--blue-600); }
.alert-warn { background: var(--orange-50); color: #8a5300; }
.alert-ok { background: var(--green-50); color: #0f6a3a; }

/* ---------- Coquille applicative ---------- */
.shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; }
.side { background: linear-gradient(180deg, var(--navy) 0%, #082666 100%); color: #cfdcf7; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; z-index: 30; }
.side .logo { margin: 14px 14px 10px; background: #fff; border-radius: 12px; padding: 8px 10px; display: grid; place-items: center; }
.side .logo img { max-width: 100%; max-height: 54px; display: block; }
.nav { display: flex; flex-direction: column; gap: 3px; padding: 8px 10px; overflow-y: auto; flex: 1; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px; color: #cfdcf7; font-weight: 600; font-size: 13.5px; text-decoration: none; position: relative; }
.nav a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.nav a[aria-current="page"] { background: var(--blue); color: #fff; box-shadow: 0 6px 16px rgba(0, 0, 0, .22); }
.nav .count { margin-left: auto; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; }
.side-foot { padding: 10px; border-top: 1px solid rgba(255, 255, 255, .1); }
.side-foot button { width: 100%; display: flex; gap: 11px; align-items: center; padding: 10px 12px; border-radius: 10px; background: none; border: 0; color: #cfdcf7; font-weight: 600; }
.side-foot button:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 12px 24px; background: rgba(255, 255, 255, .85); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.topbar h1 { font-size: 18px; color: var(--navy); }
.burger { display: none; }
.top-search { position: relative; width: 280px; max-width: 34vw; }
.top-search input { padding: 8px 12px 8px 34px; border-radius: 999px; background: var(--bg); border-color: transparent; font-size: 13px; }
.top-search .ic { position: absolute; left: 11px; top: 9px; color: var(--muted-2); width: 16px; height: 16px; }
.bell { position: relative; }
.bell .dot-n { position: absolute; top: 1px; right: 0; background: var(--red); color: #fff; font-size: 10px; font-weight: 700; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; display: grid; place-items: center; border: 2px solid #fff; }
.userchip { display: flex; align-items: center; gap: 9px; padding: 4px 8px 4px 4px; border-radius: 999px; background: transparent; border: 0; }
.userchip:hover { background: var(--blue-50); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--blue), var(--navy-2)); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 12px; flex: none; }
.userchip .who { text-align: left; line-height: 1.15; }
.userchip .who b { display: block; font-size: 13px; }
.userchip .who span { font-size: 11.5px; color: var(--muted); }
.menu { position: absolute; right: 24px; top: 58px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); min-width: 220px; padding: 6px; z-index: 40; }
.menu button, .menu a { display: flex; gap: 10px; align-items: center; width: 100%; padding: 9px 12px; border-radius: 8px; background: none; border: 0; text-align: left; color: var(--text); font-size: 13.5px; text-decoration: none; }
.menu button:hover, .menu a:hover { background: var(--blue-50); text-decoration: none; }
.menu .sep { height: 1px; background: var(--line); margin: 5px 0; }
.view { padding: 22px 24px 48px; display: flex; flex-direction: column; gap: 18px; max-width: 1500px; width: 100%; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.page-head h2 { font-size: 20px; color: var(--navy); }
.page-head .sub { color: var(--muted); font-size: 13px; }
.backdrop { display: none; }

/* ---------- KPI ---------- */
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.kpi { border-radius: 14px; padding: 15px 16px; display: flex; gap: 12px; align-items: center; border: 1px solid transparent; text-decoration: none; color: inherit; transition: transform .12s, box-shadow .12s; }
a.kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow); text-decoration: none; }
.kpi .kic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: #fff; flex: none; }
.kpi .kic .ic { width: 22px; height: 22px; }
.kpi .num { font-size: 27px; font-weight: 750; line-height: 1; letter-spacing: -.5px; }
.kpi .lbl { font-size: 12.5px; color: var(--muted); font-weight: 600; margin-top: 3px; }
.k-blue { background: var(--blue-50); border-color: var(--blue-100); } .k-blue .num, .k-blue .kic { color: var(--blue); }
.k-green { background: var(--green-50); border-color: #bfe8d0; } .k-green .num, .k-green .kic { color: var(--green); }
.k-orange { background: var(--orange-50); border-color: #f5dba5; } .k-orange .num, .k-orange .kic { color: var(--orange); }
.k-red { background: var(--danger-50); border-color: #f6c4c4; } .k-red .num, .k-red .kic { color: var(--danger); }
.k-violet { background: #eeeafd; border-color: #d8d0f7; } .k-violet .num, .k-violet .kic { color: var(--violet); }
.dash-grid { display: grid; grid-template-columns: 1.1fr 1.4fr 1fr; gap: 16px; align-items: start; }
.dash-grid-2 { display: grid; grid-template-columns: 1.5fr 1fr; gap: 16px; align-items: start; }

/* répartition par étape */
.levels { display: grid; gap: 9px; }
.lv { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; align-items: center; text-decoration: none; color: inherit; padding: 3px 4px; border-radius: 8px; }
a.lv:hover { background: var(--blue-50); text-decoration: none; }
.lv .nm { font-weight: 700; color: var(--navy); font-size: 12.5px; }
.lv .bar-wrap { background: #eef2f9; border-radius: 999px; height: 22px; position: relative; overflow: hidden; }
.lv .bar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--blue), #4a8cf5); min-width: 6px; }
.lv .bar-fill.hot { background: linear-gradient(90deg, var(--orange), #f2b34a); }
.lv .bar-lbl { position: absolute; left: 10px; top: 0; font-size: 11.5px; line-height: 22px; color: #fff; font-weight: 600; text-shadow: 0 1px 2px rgba(0, 0, 0, .25); white-space: nowrap; }
.lv .cnt { font-weight: 750; min-width: 24px; text-align: right; }
.lv .flags { display: flex; gap: 4px; margin-left: 6px; }

/* ---------- Tableaux ---------- */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 13px; }
table.t th { text-align: left; font-weight: 700; color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; background: #fafcff; position: sticky; top: 0; }
table.t td { padding: 11px 12px; border-bottom: 1px solid #edf1f8; vertical-align: middle; }
table.t tbody tr:hover { background: #f7faff; }
table.t tr.clickable { cursor: pointer; }
table.t .actions { text-align: right; white-space: nowrap; }
.ref { font-weight: 700; color: var(--navy); }
.late-flag { color: var(--danger); font-weight: 700; font-size: 11.5px; display: inline-flex; gap: 3px; align-items: center; }
.progress { width: 70px; height: 6px; background: #e7edf7; border-radius: 99px; overflow: hidden; display: inline-block; vertical-align: middle; }
.progress i { display: block; height: 100%; background: var(--green); }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.filters .field { margin: 0; min-width: 130px; flex: 1 1 130px; }
.filters .field.grow { flex: 2 1 220px; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 18px; flex-wrap: wrap; }
.pager-btns { display: flex; gap: 4px; align-items: center; }
.pg { min-width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line-2); background: #fff; display: inline-grid; place-items: center; font-weight: 600; font-size: 13px; padding: 0 6px; }
.pg.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.pg:disabled { opacity: .4; cursor: not-allowed; }
.pg-gap { color: var(--muted-2); padding: 0 4px; }
.empty { text-align: center; padding: 36px 16px; color: var(--muted); }
.empty .ic { width: 38px; height: 38px; color: var(--line-2); margin-bottom: 6px; }

/* ---------- Onglets ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs button { background: none; border: 0; padding: 10px 14px; font-weight: 650; color: var(--muted); border-bottom: 3px solid transparent; white-space: nowrap; display: inline-flex; gap: 7px; align-items: center; }
.tabs button:hover { color: var(--blue); }
.tabs button[aria-selected="true"] { color: var(--blue); border-bottom-color: var(--blue); }
.tabs .tc { background: var(--blue-50); color: var(--blue); border-radius: 999px; padding: 0 7px; font-size: 11px; }
.tabs .tc.red { background: var(--danger-50); color: var(--danger); }

/* ---------- Fiche dossier ---------- */
.dossier-head { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.dossier-head h2 { font-size: 22px; color: var(--navy); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.dossier-head .meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.actions-bar { display: flex; gap: 8px; flex-wrap: wrap; }
.banner { display: flex; gap: 12px; align-items: flex-start; padding: 13px 16px; border-radius: 12px; border: 1px solid; }
.banner .ic { width: 22px; height: 22px; margin-top: 1px; }
.banner b { display: block; }
.banner-info { background: var(--blue-50); border-color: var(--blue-100); color: #174a9e; }
.banner-danger { background: var(--danger-50); border-color: #f4bcbc; color: #8e1b1b; }
.banner-warn { background: var(--orange-50); border-color: #f2d696; color: #7c4b00; }
.banner-ok { background: var(--green-50); border-color: #b9e5cb; color: #0e6338; }
.info-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 22px; }
.info-grid dt { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 700; }
.info-grid dd { margin: 2px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.stepper { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 0; position: relative; }
.step { text-align: center; position: relative; padding: 0 3px; }
.step::before { content: ""; position: absolute; top: 17px; left: -50%; width: 100%; height: 3px; background: var(--line-2); z-index: 0; }
.step:first-child::before { display: none; }
.step.done::before, .step.cur::before, .step.ctl::before, .step.fix::before, .step.blk::before { background: var(--green); }
.step .dot { width: 36px; height: 36px; border-radius: 50%; margin: 0 auto; display: grid; place-items: center; background: #fff; border: 3px solid var(--line-2); color: var(--muted-2); font-weight: 700; font-size: 12px; position: relative; z-index: 1; }
.step.done .dot { background: var(--green); border-color: var(--green); color: #fff; }
.step.cur .dot { border-color: var(--blue); color: var(--blue); box-shadow: 0 0 0 5px rgba(29, 98, 214, .16); }
.step.fix .dot { background: var(--danger); border-color: var(--danger); color: #fff; box-shadow: 0 0 0 5px rgba(217, 54, 54, .16); }
.step.ctl .dot { background: var(--orange); border-color: var(--orange); color: #fff; box-shadow: 0 0 0 5px rgba(224, 138, 7, .2); }
.step.ctl .st { color: #9a5f00; font-weight: 700; }
.step.blk .dot { background: #5b6472; border-color: #5b6472; color: #fff; }
.step .lbl { font-size: 11.5px; font-weight: 700; margin-top: 7px; color: var(--navy); line-height: 1.2; }
.step .st { font-size: 11px; color: var(--muted); margin-top: 1px; }
.step .rw { font-size: 10.5px; color: var(--danger); font-weight: 700; }
.blockers { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.blockers li { display: flex; gap: 8px; align-items: center; font-size: 13px; }
.blockers .ic { color: var(--orange); }

/* documents */
.doc-card { border: 1px solid var(--line); border-radius: 12px; padding: 13px 14px; background: #fff; }
.doc-card + .doc-card { margin-top: 10px; }
.doc-top { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.doc-ic { width: 38px; height: 38px; border-radius: 10px; background: var(--danger-50); color: var(--danger); display: grid; place-items: center; flex: none; }
.doc-ic.ok { background: var(--green-50); color: var(--green); }
.doc-ic.info { background: var(--blue-50); color: var(--blue); }
.doc-name { font-weight: 700; }
.versions { margin: 10px 0 0 50px; display: grid; gap: 6px; }
.ver { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); padding: 7px 10px; border-radius: 8px; background: #f7f9fd; }
.ver b { color: var(--text); }
.ver.rejected { background: var(--danger-50); }
.dropzone { border: 2px dashed var(--blue-100); background: #f6f9ff; border-radius: 14px; padding: 22px 16px; text-align: center; transition: background .15s, border-color .15s; }
.dropzone.over { background: var(--blue-50); border-color: var(--blue); }
.dropzone .ic { width: 34px; height: 34px; color: var(--blue); }
.dropzone p { margin: 4px 0; }
.drop-ctl { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin: 12px 0 6px; align-items: flex-end; }
.drop-ctl .field { margin: 0; min-width: 160px; text-align: left; }
.file-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* timeline historique */
.tl { list-style: none; margin: 0; padding: 0 0 0 4px; }
.tl li { position: relative; padding: 0 0 16px 28px; }
.tl li::before { content: ""; position: absolute; left: 6px; top: 16px; bottom: -2px; width: 2px; background: var(--line); }
.tl li:last-child::before { display: none; }
.tl .pt { position: absolute; left: 0; top: 3px; width: 14px; height: 14px; border-radius: 50%; border: 3px solid var(--blue); background: #fff; }
.tl .pt.ok { border-color: var(--green); } .tl .pt.bad { border-color: var(--danger); } .tl .pt.warn { border-color: var(--orange); }
.tl .t-top { display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline; }
.tl .t-act { font-weight: 700; }
.tl .t-res { color: var(--muted); font-size: 13px; }

/* validation */
.val-info { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin-bottom: 14px; font-size: 13.5px; }
.val-info dt { color: var(--muted); font-weight: 600; }
.val-info dd { margin: 0; font-weight: 650; }
.ok-banner { display: flex; gap: 10px; align-items: center; background: var(--green-50); color: #0f6a3a; padding: 11px 14px; border-radius: 10px; font-weight: 650; margin-bottom: 14px; }

/* stepper formulaire */
.wizard { display: flex; align-items: center; gap: 0; margin: 0 auto 6px; max-width: 560px; width: 100%; }
.wz { flex: 1; text-align: center; position: relative; font-size: 12px; font-weight: 650; color: var(--muted); }
.wz .c { width: 28px; height: 28px; border-radius: 50%; margin: 0 auto 4px; display: grid; place-items: center; background: #fff; border: 2px solid var(--line-2); font-weight: 700; position: relative; z-index: 1; }
.wz.on .c { background: var(--blue); border-color: var(--blue); color: #fff; }
.wz.done .c { background: var(--green); border-color: var(--green); color: #fff; }
.wz.on, .wz.done { color: var(--navy); }
.wz::before { content: ""; position: absolute; top: 13px; right: 50%; width: 100%; height: 2px; background: var(--line-2); }
.wz:first-child::before { display: none; }
.wz.on::before, .wz.done::before { background: var(--green); }
.form-card { max-width: 920px; margin: 0 auto; width: 100%; }
.section-title { font-size: 14px; font-weight: 750; color: var(--navy); margin: 4px 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; flex-wrap: wrap; }

/* notifications */
.notif { display: flex; gap: 12px; padding: 14px 18px; border-bottom: 1px solid #edf1f8; align-items: flex-start; cursor: pointer; }
.notif:hover { background: #f7faff; }
.notif.unread { background: #f3f8ff; }
.notif .ni { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.ni.success { background: var(--green-50); color: var(--green); } .ni.danger { background: var(--danger-50); color: var(--danger); }
.ni.warning { background: var(--orange-50); color: var(--orange); } .ni.info { background: var(--blue-50); color: var(--blue); }
.notif .nt { font-weight: 700; } .notif .nb { color: var(--muted); font-size: 13px; margin-top: 2px; }
.notif .when { margin-left: auto; color: var(--muted-2); font-size: 12px; white-space: nowrap; }

/* graphiques */
.chart-box { width: 100%; }
.chart { width: 100%; height: auto; display: block; }
.chart .grid { stroke: #e6ecf6; stroke-width: 1; }
.chart .ax { fill: var(--muted); font-size: 10.5px; }
.chart .ln { stroke-width: 2.6; stroke-linejoin: round; stroke-linecap: round; }
.c-blue { stroke: var(--blue); } .c-green { stroke: var(--green); } .c-orange { stroke: var(--orange); } .c-red { stroke: var(--danger); } .c-violet { stroke: var(--violet); } .c-gray { stroke: #9aa7bf; }
.dot.c-blue, .dot.c-green, .dot.c-orange, .dot.c-red { fill: #fff; stroke-width: 2.2; }
.bar.c-blue, .sw.c-blue.f { fill: var(--blue); stroke: none; } .bar.c-green { fill: var(--green); stroke: none; } .bar.c-red { fill: var(--danger); stroke: none; } .bar.c-orange { fill: var(--orange); stroke: none; } .bar.c-violet { fill: var(--violet); stroke: none; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; list-style: none; padding: 8px 2px 0; margin: 0; font-size: 12px; color: var(--muted); }
.legend li { display: flex; align-items: center; gap: 6px; }
.legend.col { flex-direction: column; gap: 8px; padding-top: 0; font-size: 12.5px; }
.legend.col li { width: 100%; } .legend.col li span { flex: 1; } .legend.col b { color: var(--text); }
.sw { width: 10px; height: 10px; border-radius: 3px; display: inline-block; background: #ccc; }
.sw.c-blue { background: var(--blue); } .sw.c-green { background: var(--green); } .sw.c-orange { background: var(--orange); } .sw.c-red { background: var(--danger); } .sw.c-violet { background: var(--violet); } .sw.c-gray { background: #9aa7bf; }
.donut-box { display: grid; grid-template-columns: 150px 1fr; gap: 14px; align-items: center; }
.donut { width: 150px; height: 150px; }
.donut-bg { stroke: #edf1f8; }
.seg.c-blue { stroke: var(--blue); } .seg.c-green { stroke: var(--green); } .seg.c-orange { stroke: var(--orange); } .seg.c-red { stroke: var(--danger); } .seg.c-violet { stroke: var(--violet); }
.donut-n { font-size: 24px; font-weight: 750; fill: var(--text); } .donut-l { font-size: 10px; fill: var(--muted); }
.mini-bars { display: grid; gap: 8px; }
.mb { display: grid; grid-template-columns: 110px minmax(0, 1fr) 54px; gap: 10px; align-items: center; font-size: 12.5px; }
.mb .track { height: 10px; background: #eef2f9; border-radius: 99px; overflow: hidden; } .mb .track i { display: block; height: 100%; background: var(--blue); border-radius: 99px; }
.mb.red .track i { background: var(--danger); }
.mb .v { text-align: right; font-weight: 700; }

/* alertes */
.alert-list { display: grid; gap: 14px; }
.alert-list h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 6px; display: flex; gap: 6px; align-items: center; }
.alert-list ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.alert-list li a { display: flex; gap: 8px; justify-content: space-between; padding: 6px 9px; border-radius: 8px; background: #f7f9fd; color: var(--text); font-size: 13px; }
.alert-list li a:hover { background: var(--blue-50); text-decoration: none; }

/* modale, toasts */
.overlay { position: fixed; inset: 0; background: rgba(8, 20, 55, .55); display: grid; place-items: center; padding: 16px; z-index: 100; overflow-y: auto; animation: fade .15s; }
.dialog { background: #fff; border-radius: 16px; box-shadow: var(--shadow-lg); width: 100%; max-width: 520px; max-height: calc(100vh - 32px); display: flex; flex-direction: column; animation: pop .16s; }
.dialog.wide { max-width: 760px; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.dialog-head h3 { font-size: 17px; color: var(--navy); }
.dialog-body { padding: 18px 20px; overflow-y: auto; }
.dialog-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line); flex-wrap: wrap; background: #fafcff; border-radius: 0 0 16px 16px; }
.toasts { position: fixed; right: 16px; bottom: 16px; display: grid; gap: 8px; z-index: 200; max-width: min(420px, calc(100vw - 32px)); }
.toast { display: flex; align-items: flex-start; gap: 10px; background: #fff; border-radius: 12px; padding: 12px 12px 12px 14px; box-shadow: var(--shadow-lg); border-left: 5px solid var(--blue); animation: pop .18s; font-size: 13.5px; }
.toast .ic:first-child { margin-top: 1px; color: var(--blue); }
.toast span { flex: 1; overflow-wrap: anywhere; }
.t-success { border-left-color: var(--green); } .t-success .ic:first-child { color: var(--green); }
.t-error { border-left-color: var(--danger); } .t-error .ic:first-child { color: var(--danger); }
.spinner { width: 30px; height: 30px; border: 3px solid var(--blue-100); border-top-color: var(--blue); border-radius: 50%; animation: spin .8s linear infinite; margin: 40px auto; }
.boot { min-height: 100vh; display: grid; place-items: center; }
.secret { display: flex; gap: 8px; align-items: center; background: #f3f6fc; border: 1px dashed var(--line-2); padding: 10px 12px; border-radius: 10px; margin: 10px 0; }
.secret code { font-size: 15px; font-weight: 700; letter-spacing: .5px; flex: 1; overflow-wrap: anywhere; }
.roles-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 14px; }
.logo-preview { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: grid; place-items: center; min-height: 130px; }
.logo-preview img { max-width: 100%; max-height: 110px; }
.sec-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.sec-list li { display: flex; gap: 10px; align-items: flex-start; }
.sec-list .ic { color: var(--green); margin-top: 2px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- Responsive ---------- */
@media (max-width: 1280px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } .dash-grid { grid-template-columns: 1fr 1fr; } .dash-grid > :first-child { grid-column: 1 / -1; } }
@media (max-width: 980px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 264px; transform: translateX(-102%); transition: transform .22s; box-shadow: var(--shadow-lg); }
  .shell.open .side { transform: none; }
  .shell.open .backdrop { display: block; position: fixed; inset: 0; background: rgba(8, 20, 55, .5); z-index: 25; }
  .burger { display: inline-grid; }
  .top-search { display: none; }
  .dash-grid, .dash-grid-2, .two-col { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .menu { right: 12px; }
  .topbar, .view { padding-left: 14px; padding-right: 14px; }
  .stepper { grid-template-columns: 1fr; gap: 0; }
  .step { display: grid; grid-template-columns: 36px 1fr; column-gap: 12px; text-align: left; padding: 0 0 14px; }
  .step::before { top: -14px; left: 17px; width: 3px; height: 100%; }
  .step .dot { margin: 0; } .step .lbl { margin-top: 0; align-self: center; } .step .st, .step .rw { grid-column: 2; }
}
@media (max-width: 820px) {
  .login { grid-template-columns: 1fr; }
  .login-hero { min-height: 220px; max-height: 260px; }
  .login-hero .tagline { display: none; }
  .login-hero .brand img { height: 64px; }
  .login-side { background-image: none; padding: 24px 18px 32px; align-items: flex-start; }
}
@media (max-width: 640px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .userchip .who { display: none; }
  .donut-box { grid-template-columns: 1fr; justify-items: center; }
  .info-grid { grid-template-columns: 1fr; }
  .roles-grid { grid-template-columns: 1fr; }
  .versions { margin-left: 0; }
  .filters .field { flex: 1 1 100%; }
  .mb { grid-template-columns: 90px minmax(0, 1fr) 44px; }
  .page-head .actions-bar { width: 100%; }
  .page-head .actions-bar .btn { flex: 1; }
}

/* ---- Pages complémentaires (paramètres, utilisateurs, rapports, notifications) ---- */
.logo-box { display: grid; place-items: center; padding: 16px; background: #fff; border: 1px dashed var(--border, #d5ddec); border-radius: 12px; margin-bottom: 12px; }
.logo-prev { max-width: 260px; max-height: 110px; width: auto; height: auto; object-fit: contain; }
.temp-pw { font-size: 1.35rem; letter-spacing: .06em; text-align: center; padding: 14px; margin-top: 12px; background: #f3f6fc; border-radius: 10px; user-select: all; word-break: break-all; }
.role-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px 14px; margin-bottom: 12px; }
.sla-in { width: 80px; padding: 6px 8px; border: 1px solid var(--border, #d5ddec); border-radius: 8px; font: inherit; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 16px; }
.stat { background: #fff; border-radius: 14px; padding: 16px 18px; box-shadow: 0 1px 3px rgba(16, 42, 100, .08); }
.stat .lbl { font-size: .8rem; color: #5b6b8c; text-transform: uppercase; letter-spacing: .04em; }
.stat .num { font-size: 1.7rem; font-weight: 700; color: #0b2a6f; margin: 4px 0; }
.notif-list { list-style: none; margin: 0; padding: 0; }
.notif-list .notif { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border-bottom: 1px solid #e8edf6; }
.notif-list .notif.unread { background: #f3f7ff; }
.notif .n-title { font-weight: 600; }
.row { display: flex; align-items: center; flex-wrap: wrap; }
@media (max-width: 1100px) { .dash-grid { grid-template-columns: 1fr; } .dash-grid-2 { grid-template-columns: 1fr; } }
.recovery { list-style: none; padding: 0; margin: 10px 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; }
.recovery li { background: #f3f6fc; border: 1px dashed var(--line-2); border-radius: 8px; padding: 6px 10px; font-weight: 700; letter-spacing: .5px; }
.rights-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 16px; }
.rights-fam { margin: 12px 0 4px; font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted, #5d6b82); }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
@media (max-width: 720px) { .rights-grid, .recovery { grid-template-columns: 1fr; } }

/* Ouverture : choix VRAC / conteneurisé, champs calculés */
.radio-row { display: flex; gap: 12px; margin: 4px 0 12px; flex-wrap: wrap; }
.radio { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--line, #d6dbe6); border-radius: 8px; cursor: pointer; font-weight: 600; background: #fff; }
.radio.on { border-color: var(--blue, #1a56db); background: #eef3ff; color: var(--blue, #1a56db); }
.readonly { padding: 9px 12px; border: 1px dashed var(--line, #d6dbe6); border-radius: 8px; background: #f7f8fb; font-weight: 700; }

/* ===== État d'ouverture A4 ===== */
.os-wrap { display: flex; flex-direction: column; gap: 14px; align-items: center; }
.os-bar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; width: 100%; max-width: 210mm; }
.os-page { width: 210mm; min-height: 297mm; background: #fff; color: #14213d; padding: 10mm 12mm 8mm; box-shadow: var(--shadow); font-size: 9.5pt; line-height: 1.35; border: 1px solid var(--line); }
.os-page .mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; }
.os-head { display: flex; align-items: center; gap: 14px; padding-bottom: 8px; border-bottom: 3px solid var(--navy); }
.os-logo { width: 74px; height: 74px; object-fit: contain; }
.os-brand { flex: 1; }
.os-name { font-size: 19pt; font-weight: 800; color: var(--navy); letter-spacing: .02em; }
.os-tag { color: var(--red); font-weight: 700; letter-spacing: .12em; font-size: 8.5pt; }
.os-addr { color: var(--muted); font-size: 8.5pt; }
.os-no { border: 1.5px solid var(--navy); border-radius: 6px; padding: 6px 12px; text-align: center; min-width: 150px; }
.os-no-t { font-size: 7.5pt; font-weight: 700; color: var(--red); letter-spacing: .1em; }
.os-no-n { font-size: 15pt; font-weight: 800; color: var(--navy); }
.os-no-d { font-size: 7pt; color: var(--muted); }
.os-title { text-align: center; margin: 10px 0 8px; font-weight: 800; letter-spacing: .08em; color: var(--navy); font-size: 10.5pt; }
.os-sec { border: 1px solid var(--line-2); border-radius: 6px; margin-bottom: 7px; overflow: hidden; break-inside: avoid; }
.os-sec > header { background: var(--navy); color: #fff; font-weight: 700; font-size: 8.5pt; padding: 4px 10px; letter-spacing: .04em; }
.os-grid2, .os-grid3, .os-grid4 { display: grid; }
.os-grid2 { grid-template-columns: 1fr 1fr; } .os-grid3 { grid-template-columns: repeat(3, 1fr); } .os-grid4 { grid-template-columns: repeat(4, 1fr); }
.os-f { padding: 3px 10px; border-bottom: 1px solid var(--line); }
.os-l { font-size: 7pt; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.os-v { font-size: 9.5pt; } .os-v.strong { font-weight: 700; }
.os-party { border-right: 1px solid var(--line-2); } .os-party:last-child { border-right: 0; }
.os-party-h { display: flex; justify-content: space-between; padding: 4px 10px; background: var(--blue-50); border-bottom: 1px solid var(--line); font-size: 8.5pt; color: var(--navy); }
.os-modes { padding: 5px 10px; font-weight: 700; display: flex; align-items: center; gap: 6px; border-bottom: 1px solid var(--line); }
.os-box { display: inline-flex; align-items: center; justify-content: center; width: 12px; height: 12px; border: 1.3px solid var(--navy); border-radius: 2px; font-size: 9px; line-height: 1; color: var(--navy); font-weight: 900; flex: none; }
.os-box.on { background: var(--blue-50); }
.os-list { padding: 4px 10px 6px; } .os-list table { width: 100%; border-collapse: collapse; margin-top: 3px; font-size: 9pt; }
.os-list th { text-align: left; font-size: 7pt; color: var(--muted); border-bottom: 1.5px solid var(--navy); padding: 2px 6px; } .os-list td { padding: 2px 6px; border-bottom: 1px solid var(--line); }
.os-docs { list-style: none; margin: 0; padding: 2px 10px 4px; }
.os-docs li { display: grid; grid-template-columns: 14px 38px 1.6fr 1fr 70px 1.4fr 52px; gap: 8px; align-items: center; padding: 2px 0; border-bottom: 1px solid var(--line); font-size: 8.5pt; }
.os-docs li:last-child { border-bottom: 0; } .os-code { color: var(--navy); } .os-ds { font-weight: 700; color: var(--muted); text-align: right; } .os-ds.ok { color: var(--green); }
.os-dn, .os-df { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.os-obs-t { padding: 5px 10px; min-height: 12mm; font-style: italic; white-space: pre-wrap; }
.os-foot { text-align: center; color: var(--muted-2); font-size: 7pt; margin-top: 2px; }
@page { size: A4 portrait; margin: 0; }
@media print {
  body { background: #fff !important; }
  .no-print, .side, .topbar, .backdrop, .toasts, .toast-wrap { display: none !important; }
  .shell { display: block; } .main, .view { display: block; padding: 0 !important; margin: 0 !important; }
  .os-wrap { display: block; } .os-page { box-shadow: none; border: 0; margin: 0; width: 210mm; min-height: 0; padding: 7mm 12mm 3mm; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

.os-inline { padding: 6px 10px; line-height: 2; } .os-item { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; } .os-sep { font-weight: 700; color: var(--muted); }
