/* Portail ALETHEIA → Othelys — verre graphite sombre, lisible.
   Couleur réservée aux statuts (vert payé, ambre en attente, rouge en retard). */

:root {
  color-scheme: dark;
  --ink: #f4f4f5;
  --ink-2: rgba(244, 244, 245, .76);
  --ink-3: rgba(244, 244, 245, .56);
  --hair: rgba(255, 255, 255, .08);
  --glass: rgba(38, 38, 42, .66);
  --card: rgba(255, 255, 255, .055);
  --card-hover: rgba(255, 255, 255, .085);
  --field: rgba(0, 0, 0, .24);
  --edge: rgba(255, 255, 255, .10);
  --edge-hi: rgba(255, 255, 255, .16);
  --sheen: rgba(255, 255, 255, .05);
  --shadow-c: rgba(0, 0, 0, .55);
  --solid: #f5f5f7;
  --on-solid: #111113;
  --ok: #7ee2ad;
  --ok-bg: rgba(52, 211, 153, .14);
  --wait: #f6cf6a;
  --wait-bg: rgba(251, 191, 36, .14);
  --late: #fda4a4;
  --late-bg: rgba(248, 113, 113, .16);
  --muted-bg: rgba(255, 255, 255, .08);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --radius: 20px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: #2b2b2e;
  color: var(--ink);
  font: 15px/1.5 var(--font);
  font-feature-settings: "tnum" 1;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
img { max-width: 100%; }
h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -.01em; }
p { margin: 0; }
.num, .tnum, td.num, th.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.print-only { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* --- Scène : pièce graphite floutée + suspensions ---------------------------------- */
.scene {
  position: fixed; inset: -80px; z-index: -2; pointer-events: none;
  background:
    radial-gradient(60% 45% at 86% 96%, rgba(255, 240, 222, .10), transparent 70%),
    radial-gradient(40% 30% at 12% 8%, rgba(255, 255, 255, .06), transparent 70%),
    linear-gradient(180deg, #4a4a4e 0%, #3b3b3f 46%, #2e2e31 100%);
  filter: blur(14px) saturate(1.04);
}
.scene::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 38%;
  background: linear-gradient(180deg, transparent, rgba(20, 20, 22, .55));
}
.lamps { position: fixed; inset: 0; z-index: -1; pointer-events: none; filter: blur(1.2px); }
.lamp { position: absolute; top: 0; width: 2px; background: rgba(10, 10, 12, .8); }
.lamp::after {
  content: ""; position: absolute; left: 50%; bottom: -46px; width: 104px; height: 50px; transform: translateX(-50%);
  background: linear-gradient(180deg, #232326, #111113);
  clip-path: polygon(34% 0, 66% 0, 100% 100%, 0 100%);
}
.lamp::before {
  content: ""; position: absolute; left: 50%; bottom: -150px; width: 260px; height: 140px; transform: translateX(-50%);
  background: radial-gradient(50% 60% at 50% 0%, rgba(255, 242, 226, .16), transparent 70%);
}
.lamp.l1 { left: 7%; height: 60px; }
.lamp.l2 { right: 9%; height: 96px; }
.lamp.l3 { right: 29%; height: 30px; opacity: .7; }

/* --- Verre ------------------------------------------------------------------------- */
.glass {
  position: relative;
  background: var(--glass);
  -webkit-backdrop-filter: blur(34px) saturate(140%);
  backdrop-filter: blur(34px) saturate(140%);
  border: 1px solid var(--edge);
  box-shadow: inset 0 1px 0 var(--edge-hi), 0 40px 90px -40px var(--shadow-c), 0 2px 6px -2px var(--shadow-c);
}
.glass::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(140deg, var(--sheen), transparent 38%);
}

.shell { max-width: 1320px; margin: 26px auto 40px; padding: 0 20px; }
.panel { border-radius: 30px; }

/* --- En-tête du panneau --------------------------------------------------------------- */
.top {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 22px;
  padding: 16px 24px; border-bottom: 1px solid var(--hair);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; flex: none; }
.brand img { height: 30px; width: auto; display: block; }
.brand .logo-print { display: none; }
.brand .who { display: flex; flex-direction: column; line-height: 1.15; border-left: 1px solid var(--edge); padding-left: 12px; }
.brand .who b { font-size: 13.5px; font-weight: 650; }
.brand .who span { font-size: 12px; color: var(--ink-3); }
.tabs { display: flex; gap: 4px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  position: relative; flex: none; padding: 8px 12px; border-radius: 12px;
  color: var(--ink-2); text-decoration: none; font-weight: 550; font-size: 14.5px;
  transition: color .2s, background .2s;
}
.tabs a:hover { color: var(--ink); background: rgba(255, 255, 255, .05); }
.tabs a[aria-current="page"] { color: #fff; }
.tabs a[aria-current="page"]::after {
  content: ""; position: absolute; left: 12px; bottom: 1px; width: 18px; height: 2px; border-radius: 2px; background: #fff;
}
.tabs .sep { width: 1px; background: var(--edge); margin: 6px 6px; flex: none; }
.me { display: flex; align-items: center; gap: 10px; flex: none; }
.avatar {
  text-decoration: none; color: var(--ink);
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: linear-gradient(160deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, .08));
  border: 1px solid var(--edge-hi); font-weight: 650; font-size: 13px; letter-spacing: .02em;
}
.me .id { display: flex; flex-direction: column; line-height: 1.2; text-decoration: none; }
.me .id b { font-size: 13.5px; font-weight: 600; }
.me .id span { font-size: 12px; color: var(--ink-3); }
.me form { margin: 0; }

.preview-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  margin: 14px 24px 0; padding: 10px 14px; border-radius: 14px;
  background: var(--wait-bg); border: 1px solid rgba(251, 191, 36, .32); color: var(--ink);
}
.preview-bar b { color: var(--wait); }
.preview-bar form { margin: 0; }

main { position: relative; z-index: 1; padding: 24px 24px 28px; display: flex; flex-direction: column; gap: 16px; }
main > * { min-width: 0; }
main > .alert { margin: 0; }
.foot {
  position: relative; z-index: 1;
  display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: space-between;
  padding: 14px 24px 18px; border-top: 1px solid var(--hair); color: var(--ink-3); font-size: 12.5px;
}

/* --- Titres de page ------------------------------------------------------------------------ */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 4px; }
.page-head h1 { font-size: 26px; }
.page-head .sub { color: var(--ink-2); margin-top: 4px; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.crumb { font-size: 13px; color: var(--ink-3); margin-bottom: 6px; }
.crumb a { color: var(--ink-2); text-decoration: none; }
.crumb a:hover { color: var(--ink); text-decoration: underline; }
h2.section { font-size: 17px; margin-bottom: 12px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-head h2 { font-size: 17px; }
.section-head a { color: var(--ink-2); font-size: 13.5px; text-decoration: none; }
.section-head a:hover { color: var(--ink); text-decoration: underline; }

/* --- Cartes ---------------------------------------------------------------------------------- */
.card {
  position: relative; overflow: hidden;
  background: var(--card); border: 1px solid var(--edge); border-radius: var(--radius);
  box-shadow: inset 0 1px 0 var(--edge-hi), 0 14px 34px -24px var(--shadow-c);
  padding: 18px 20px;
}
.card.flush { padding: 0; }
.card.flush > .section-head { padding: 16px 20px 0; }
.grid { display: grid; gap: 16px; }
.grid { align-items: start; }
.cols-2 { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
.cols-even { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.kpi { display: block; text-decoration: none; transition: transform .45s var(--ease), background .25s; }
.kpi:hover { transform: translateY(-3px); background: var(--card-hover); }
.kpi::after {
  content: ""; position: absolute; top: -40px; right: -40px; width: 140px; height: 140px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 255, 255, .10), transparent); pointer-events: none;
}
.kpi .label { display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 13.5px; font-weight: 550; }
.kpi .label i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, .35); flex: none; }
.kpi.ok .label i { background: var(--ok); }
.kpi.wait .label i { background: var(--wait); }
.kpi.late .label i { background: var(--late); }
.kpi .value { font-size: 28px; font-weight: 650; letter-spacing: -.02em; margin-top: 10px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kpi.late .value { color: var(--late); }
.kpi .sub { color: var(--ink-3); font-size: 13px; margin-top: 2px; }
.kpi .go {
  position: absolute; top: 14px; right: 14px; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; border: 1px solid var(--edge); color: var(--ink-2); font-size: 13px;
}

/* --- Graphique ------------------------------------------------------------------------- */
.chart { width: 100%; height: auto; display: block; }
.chart .bar { fill: rgba(255, 255, 255, .24); transform-box: fill-box; transform-origin: 50% 100%; animation: grow .8s var(--ease) backwards; }
.chart .bar.cur { fill: var(--solid); }
.chart .val { fill: var(--ink-2); font-size: 12px; font-weight: 600; text-anchor: middle; }
.chart .lbl { fill: var(--ink-3); font-size: 12px; text-anchor: middle; }
.chart .base { stroke: rgba(255, 255, 255, .14); stroke-width: 1; }
.chart .bar:nth-of-type(2) { animation-delay: .03s } .chart .bar:nth-of-type(3) { animation-delay: .06s }
.chart .bar:nth-of-type(4) { animation-delay: .09s } .chart .bar:nth-of-type(5) { animation-delay: .12s }
.chart .bar:nth-of-type(6) { animation-delay: .15s } .chart .bar:nth-of-type(7) { animation-delay: .18s }
.chart .bar:nth-of-type(8) { animation-delay: .21s } .chart .bar:nth-of-type(9) { animation-delay: .24s }
.chart .bar:nth-of-type(10) { animation-delay: .27s } .chart .bar:nth-of-type(11) { animation-delay: .30s }
.chart .bar:nth-of-type(12) { animation-delay: .33s }
@keyframes grow { from { transform: scaleY(0); } }

/* --- Tableaux -------------------------------------------------------------------------------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.t { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.t th {
  text-align: left; font-size: 12px; font-weight: 650; letter-spacing: .05em; text-transform: uppercase;
  color: var(--ink-3); padding: 10px 12px; border-bottom: 1px solid var(--edge); white-space: nowrap;
}
.t td { padding: 11px 12px; border-bottom: 1px solid rgba(255, 255, 255, .06); vertical-align: top; }
.t tbody tr { transition: background .15s; }
.t tbody tr:hover { background: rgba(255, 255, 255, .035); }
.t tbody tr:last-child td { border-bottom: 0; }
.t .num { text-align: right; white-space: nowrap; }
.t .nowrap { white-space: nowrap; }
.t a.ref { font-weight: 650; text-decoration: none; white-space: nowrap; }
.t a.ref:hover { text-decoration: underline; }
.t tfoot td { border-top: 1px solid var(--edge); border-bottom: 0; font-weight: 650; padding-top: 12px; }
.t .desc { color: var(--ink-2); font-size: 13.5px; white-space: pre-line; margin-top: 3px; }
.card.flush .t th:first-child, .card.flush .t td:first-child { padding-left: 20px; }
.card.flush .t th:last-child, .card.flush .t td:last-child { padding-right: 20px; }
.empty { color: var(--ink-3); padding: 18px 20px; }

/* --- Pastilles de statut ------------------------------------------------------------------ */
.pill {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  padding: 3px 10px 3px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 600; line-height: 1.5;
  background: var(--muted-bg); color: var(--ink-2);
}
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.wait { background: var(--wait-bg); color: var(--wait); }
.pill.late { background: var(--late-bg); color: var(--late); }
.tag { display: inline-block; padding: 1px 8px; border-radius: 7px; font-size: 12px; font-weight: 600; background: rgba(255, 255, 255, .08); color: var(--ink-2); white-space: nowrap; }

/* --- Boutons, champs ------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 8px 16px; border-radius: 999px; border: 1px solid var(--edge-hi);
  background: rgba(255, 255, 255, .08); color: var(--ink); font: 600 14px/1.3 var(--font);
  text-decoration: none; cursor: pointer; transition: background .2s, transform .2s var(--ease);
}
.btn:hover { background: rgba(255, 255, 255, .14); }
.btn:active { transform: scale(.98); }
.btn.solid { background: var(--solid); color: var(--on-solid); border-color: transparent; }
.btn.solid:hover { background: #fff; }
.btn.small { padding: 5px 12px; font-size: 13px; }
.btn.danger { color: var(--late); }
.btn.round { width: 36px; height: 36px; padding: 0; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
:focus-visible { outline: 2px solid rgba(255, 255, 255, .7); outline-offset: 2px; }

label.f { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink-2); margin: 14px 0 6px; }
input.in, select.in {
  width: 100%; padding: 10px 12px; border-radius: 12px;
  background: var(--field); border: 1px solid rgba(255, 255, 255, .14); color: var(--ink);
  font: 15px/1.4 var(--font);
}
input.in:focus, select.in:focus { outline: 2px solid rgba(255, 255, 255, .55); outline-offset: 1px; border-color: transparent; }
input.in[readonly] { color: var(--ink-2); }
select.in option { background: #2b2b2e; color: var(--ink); }
input.code { font-size: 22px; letter-spacing: .25em; text-align: center; font-variant-numeric: tabular-nums; }
.hint { font-size: 13px; color: var(--ink-3); margin-top: 6px; }
.alert { padding: 11px 14px; border-radius: 12px; margin: 14px 0; font-size: 14px; }
.alert.err { background: var(--late-bg); border: 1px solid rgba(248, 113, 113, .35); }
.alert.info { background: var(--muted-bg); border: 1px solid var(--edge); }
.alert.okk { background: var(--ok-bg); border: 1px solid rgba(52, 211, 153, .35); }

/* --- Barre de filtres ---------------------------------------------------------------------- */
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--edge); background: rgba(255, 255, 255, .04); color: var(--ink-2);
  font-size: 13.5px; font-weight: 600; text-decoration: none; white-space: nowrap;
}
.chip:hover { color: var(--ink); background: rgba(255, 255, 255, .08); }
.chip[aria-current="true"] { background: var(--solid); color: var(--on-solid); border-color: transparent; }
.chip .n { font-variant-numeric: tabular-nums; opacity: .7; }
.filters form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-left: auto; }
.filters select.in { width: auto; padding: 7px 10px; font-size: 14px; }
.filters input.in { width: 240px; padding: 7px 12px; font-size: 14px; }

/* --- Fiches ------------------------------------------------------------------------------ */
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.fact .k { font-size: 12.5px; color: var(--ink-3); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.fact .v { font-size: 16px; font-weight: 600; margin-top: 3px; }
.totals { margin-left: auto; max-width: 380px; }
.totals div { display: flex; justify-content: space-between; gap: 18px; padding: 7px 0; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.totals div:last-child { border-bottom: 0; }
.totals .big { font-size: 19px; font-weight: 700; }
.mention { color: var(--ink-3); font-size: 13px; margin-top: 12px; }
.lines .t td:first-child { width: 100%; }
.line-title { font-weight: 600; }

/* --- Activité ---------------------------------------------------------------------------- */
.month-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 16px 20px 6px; }
.month-head h2 { font-size: 18px; text-transform: capitalize; }
.month-head .stats { display: flex; gap: 16px; flex-wrap: wrap; color: var(--ink-2); font-size: 13.5px; }
.month-head .stats b { color: var(--ink); font-variant-numeric: tabular-nums; }
.kind { font-size: 12.5px; color: var(--ink-3); font-weight: 600; white-space: nowrap; }
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: grid; grid-template-columns: 92px 1fr auto; gap: 4px 14px; padding: 10px 0; border-bottom: 1px solid rgba(255, 255, 255, .06); align-items: baseline; }
.feed li:last-child { border-bottom: 0; }
.feed .d { color: var(--ink-3); font-size: 13px; font-variant-numeric: tabular-nums; }
.feed .w { min-width: 0; }
.feed .w a { font-weight: 650; text-decoration: none; }
.feed .w a:hover { text-decoration: underline; }
.feed .w span { color: var(--ink-2); }
.feed .a { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }

/* --- Pages d'authentification --------------------------------------------------------------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 28px 16px; }
.auth-card { width: 100%; max-width: 440px; border-radius: 28px; padding: 30px 30px 26px; }
.auth-card.wide { max-width: 620px; }
.auth-card .logo { height: 34px; width: auto; display: block; margin-bottom: 22px; }
.auth-card h1 { font-size: 22px; }
.auth-card .lead { color: var(--ink-2); margin-top: 6px; }
.auth-card form .btn { width: 100%; margin-top: 20px; padding: 11px 16px; font-size: 15px; }
.auth-foot { margin-top: 18px; font-size: 12.5px; color: var(--ink-3); text-align: center; }
.enroll { display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: center; margin-top: 18px; }
.qr { background: #fff; border-radius: 16px; padding: 8px; line-height: 0; }
.qr svg { width: 200px; height: 200px; }
.secret { font: 600 15px/1.6 ui-monospace, "JetBrains Mono", "SFMono-Regular", Menlo, monospace; letter-spacing: .04em; word-break: break-all; padding: 8px 12px; border-radius: 10px; background: var(--field); border: 1px solid var(--edge); }
.codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 16px 0; padding: 0; list-style: none; }
.codes li { font: 600 16px/1.4 ui-monospace, "JetBrains Mono", Menlo, monospace; letter-spacing: .06em; padding: 9px 12px; border-radius: 10px; background: var(--field); border: 1px solid var(--edge); text-align: center; }
.linkbox { display: flex; gap: 8px; margin-top: 10px; }
.linkbox input { font: 13.5px/1.4 ui-monospace, Menlo, monospace; }

/* --- Admin ------------------------------------------------------------------------------------ */
.inline-form { display: inline; margin: 0; }
.actions-row { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.form-grid { display: grid; grid-template-columns: 1.3fr 1fr .8fr auto; gap: 10px; align-items: end; }
.form-grid label.f { margin-top: 0; }

/* --- Mouvement -------------------------------------------------------------------------------- */
@keyframes rise { from { opacity: 0; filter: blur(12px); transform: translateY(12px) scale(.99); } }
main > *, .kpis > *, .grid > * { animation: rise .62s var(--ease) backwards; }
main > *:nth-child(2), .kpis > *:nth-child(2), .grid > *:nth-child(2) { animation-delay: .055s; }
main > *:nth-child(3), .kpis > *:nth-child(3), .grid > *:nth-child(3) { animation-delay: .11s; }
main > *:nth-child(4), .kpis > *:nth-child(4) { animation-delay: .165s; }
main > *:nth-child(5), .kpis > *:nth-child(5) { animation-delay: .22s; }
main > *:nth-child(n+6), .kpis > *:nth-child(n+6) { animation-delay: .275s; }
.auth-card { animation: rise .62s var(--ease) backwards; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* --- Responsive ------------------------------------------------------------------------------ */
@media (max-width: 1520px) {
  .me .id { display: none; }
}
@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cols-2, .cols-even { grid-template-columns: minmax(0, 1fr); }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .shell { margin: 12px auto 24px; padding: 0 12px; }
  .panel { border-radius: 22px; }
  .top { flex-wrap: wrap; gap: 12px; padding: 14px 16px; }
  .tabs { order: 3; flex-basis: 100%; }
  .me { margin-left: auto; }
  .me .id { display: none; }
  .brand .who { display: none; }
  main { padding: 18px 16px 22px; }
  .preview-bar { margin: 12px 16px 0; }
  .kpis { grid-template-columns: minmax(0, 1fr); }
  .kpi .value { font-size: 25px; }
  .page-head h1 { font-size: 22px; }
  .filters form { margin-left: 0; width: 100%; }
  .filters input.in { width: 100%; flex: 1; }
  .feed li { grid-template-columns: 1fr auto; }
  .chart-wrap { overflow-x: auto; }
  .chart-wrap .chart { min-width: 600px; }
  .feed .d { grid-column: 1 / -1; }
  .enroll { grid-template-columns: 1fr; justify-items: center; }
  .codes { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .foot { padding: 12px 16px 16px; }
  .auth-card { padding: 24px 20px 22px; }
}

/* --- Impression : document propre, sans décor ------------------------------------------------- */
@media print {
  @page { size: A4; margin: 14mm 14mm 16mm; }
  :root { --ink: #111113; --ink-2: #3a3a3e; --ink-3: #6b6b70; --edge: #d4d4d8; --hair: #e4e4e7; }
  body { background: #fff; color: #111113; font-size: 10.5pt; }
  .scene, .lamps, .tabs, .me, .preview-bar, .filters, .no-print, .kpi .go, .btn { display: none !important; }
  .print-only { display: block; }
  .shell { max-width: none; margin: 0; padding: 0; }
  .glass, .card, .panel {
    background: #fff !important; box-shadow: none !important; border-color: #d4d4d8 !important;
    -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
  }
  .glass::before, .kpi::after { display: none; }
  .panel { border: 0 !important; border-radius: 0; }
  .top { padding: 0 0 10px; border-bottom: 1.5px solid #111113; }
  .brand .logo-screen { display: none; }
  .brand .logo-print { display: block; }
  main { display: block; }
  main > * + * { margin-top: 12px; }
  .brand .who { border-left-color: #d4d4d8; }
  main { padding: 14px 0 0; }
  .card { border-radius: 8px; padding: 10px 12px; break-inside: avoid; }
  .card.flush { padding: 0; }
  .t th { color: #3a3a3e; border-bottom: 1px solid #a1a1aa; }
  .t td { border-bottom: 1px solid #e4e4e7; }
  .t tbody tr:hover { background: none; }
  .pill, .pill.ok, .pill.wait, .pill.late { background: none; color: #111113; border: 1px solid #a1a1aa; padding: 0 7px; }
  .pill::before { display: none; }
  .kpi.late .value { color: #111113; }
  .kpis { grid-template-columns: repeat(3, 1fr); }
  .chart .bar { fill: #a1a1aa; } .chart .bar.cur { fill: #111113; }
  .chart .val, .chart .lbl { fill: #3a3a3e; }
  a { text-decoration: none; }
  .foot { border-top: 1px solid #d4d4d8; color: #3a3a3e; padding: 8px 0 0; }
  main > *, .kpis > *, .grid > * { animation: none !important; }
  .print-head { display: flex; justify-content: space-between; font-size: 9pt; color: #3a3a3e; margin-bottom: 8px; }
}
.auth-card > a.btn { width: 100%; margin-top: 20px; padding: 11px 16px; }
.linkbtn { background: none; border: 0; padding: 0; margin-top: 14px; color: var(--ink-2); font: 13.5px/1.4 var(--font); text-decoration: underline; cursor: pointer; }
.linkbtn:hover { color: var(--ink); }
.card-pad { padding: 14px 20px 18px; border-top: 1px solid var(--hair); }
.prose { white-space: pre-line; color: var(--ink); }
.facts.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
form.stack .btn { margin-top: 14px; }
