:root {
  --c-bg: #eef3f8;
  --c-surface: #ffffff;
  --c-border: #ccd9e7;
  --c-text: #102033;
  --c-muted: #4f647b;
  --c-primary: #0f4c81;
  --c-primary-h: #0b3b63;
  --c-danger: #c33d2b;
  --c-warning: #a05d12;
  --c-success: #1d7f49;
  --c-draft: #6b7280;
  --c-submitted: #0f4c81;
  --c-approved: #1d7f49;
  --c-exporting: #a05d12;
  --c-rejected: #c33d2b;
  --c-exported-to-lexflow: #0f766e;
  --c-export-failed: #c33d2b;
  --radius: 8px;
  --shadow: 0 6px 20px rgba(13, 42, 74, .08);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  height: 100%;
  overflow: hidden;
}
body {
  font-family: "Segoe UI", "Trebuchet MS", Tahoma, Arial, sans-serif;
  font-size: .9375rem;
  background: linear-gradient(180deg, #f4f8fc 0%, #edf3f9 100%);
  color: var(--c-text);
  line-height: 1.5;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  padding: .55rem 1.1rem;
  background: linear-gradient(180deg, #ffffff 0%, #f6f9fd 100%);
  border-bottom: 1px solid var(--c-border);
  flex-wrap: nowrap;
  position: sticky;
  top: 0;
  z-index: 20;
}
.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  text-decoration: none;
  color: #27486b;
  font-weight: 600;
  font-size: .9rem;
  flex: 0 0 auto;
}
.brand-logo {
  height: 28px;
  width: auto;
}
.nav-links { display: flex; gap: .9rem; align-items: center; font-size: .875rem; }
.nav-links a {
  color: var(--c-primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .2rem .35rem;
  border-radius: 6px;
}
.nav-links a:hover { background: #e6eff9; }
.nav-icon { width: 15px; height: 15px; object-fit: contain; }

.app-layout {
  height: 100vh;      /* fallback navigateurs sans dvh */
  height: 100dvh;     /* Safari iOS : évite le clipping sous la barre d'outils dynamique */
  min-height: unset;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  overflow: hidden;
}
.global-sidebar {
  border-right: 1px solid var(--c-border);
  background: #fbfdff;
  padding: 1rem .85rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.global-sidebar-brand {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding-bottom: .65rem;
  border-bottom: 1px solid #d4e0eb;
}
.global-brand-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
}
.global-brand-title {
  font-weight: 700;
  color: #183a59;
}
.global-brand-sub {
  font-size: .74rem;
  color: var(--c-muted);
}
.global-sidebar-section-title {
  font-size: .73rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #4a6684;
}
.global-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}
.global-sidebar-link {
  display: flex;
  align-items: center;
  gap: .45rem;
  text-decoration: none;
  color: #173c5c;
  border: 1px solid #d7e4f1;
  background: #f7fbff;
  border-radius: 8px;
  padding: .58rem .62rem;
  font-weight: 600;
}
.global-sidebar-link:hover {
  background: #eaf3fc;
}
.global-sidebar-section-title--spaced {
  margin-top: .9rem;
}
.global-sidebar-ext {
  margin-left: auto;
  color: #6b8299;
  font-weight: 400;
}
.global-user-card {
  margin-top: auto;
  border: 1px solid var(--c-border);
  border-radius: 9px;
  background: #f7fbff;
  padding: .65rem;
  color: var(--c-muted);
  font-size: .78rem;
  line-height: 1.45;
}
.global-user-card strong {
  display: block;
  color: var(--c-text);
  margin-bottom: .2rem;
}
.app-workspace {
  min-width: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;      /* fallback navigateurs sans dvh */
  height: 100dvh;     /* Safari iOS : hauteur de viewport dynamique */
  overflow: hidden;
}

.sidebar-logo-cabinet {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 20px 0;
}

.sidebar-logo-cabinet img {
  max-width: 264px;
  width: 100%;
  height: auto;
  object-fit: contain;
  opacity: 0.95;
}

.main { max-width: 1120px; margin: 0 auto; padding: 1.4rem 1rem; }
.main.main-app {
  max-width: none;
  margin: 0;
  width: 100%;
  padding: 1rem 1.2rem;
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.1rem;
  flex-wrap: wrap;
  gap: .6rem;
}
.page-header h2 { font-size: 1.22rem; font-weight: 700; color: #15314f; }

.body-centered {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: radial-gradient(circle at 20% 10%, #f9fcff 0%, #edf3fa 55%, #e6eef8 100%);
}
.login-card {
  width: 100%;
  max-width: 390px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: var(--shadow);
}
.login-logo { display: block; width: 120px; margin: 0 auto .5rem; }
.login-title { font-size: 1.35rem; font-weight: 700; margin-bottom: 1.4rem; text-align: center; }
.login-title span { color: var(--c-primary); }

.form-stack { display: flex; flex-direction: column; gap: 1rem; }
.form-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}
.field { display: flex; flex-direction: column; gap: .3rem; }
.field-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.field-row .field { flex: 1; min-width: 160px; }
.field-check { display: flex; align-items: center; gap: .5rem; }
.field-readonly {
  display: flex;
  gap: 1.2rem;
  padding: .75rem;
  background: #f3f8fe;
  border: 1px solid #dce9f8;
  border-radius: var(--radius);
  font-size: .875rem;
  flex-wrap: wrap;
}
.form-actions { display: flex; gap: .75rem; margin-top: .5rem; flex-wrap: wrap; }
label { font-size: .875rem; font-weight: 600; color: #1b395a; }
.required { color: var(--c-danger); }
input[type=text], input[type=date], input[type=number], input[type=email],
input[type=password], textarea, select {
  width: 100%;
  padding: .52rem .72rem;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  font-size: .9375rem;
  font-family: inherit;
  background: var(--c-surface);
  color: var(--c-text);
  transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: #7ea7d2;
  box-shadow: 0 0 0 2px rgba(15, 76, 129, .12);
}
.input-sm { padding: .35rem .6rem; font-size: .875rem; }
.hint { font-size: .8125rem; color: var(--c-muted); }
.hint-block {
  display: block;
  font-size: .8125rem;
  color: var(--c-muted);
  padding: .5rem 0;
  line-height: 1.4;
}
.form-inline { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.inline-form { display: inline; margin: 0; }
.mb-1 { margin-bottom: 1rem; }
.section-gap-top { margin-top: 1.25rem; }
.breadcrumb-row {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  align-items: center;
}
.documents-shell {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 1.05rem;
  align-items: start;
}
.docs-tree-column {
  align-self: start;
}
.docs-sidebar-title {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #355477;
  margin-bottom: .35rem;
}
.docs-tree-column {
  background: #fbfdff;
  border-color: #cedceb;
  box-shadow: none;
}
.docs-tree-header {
  margin-bottom: .5rem;
}
.docs-tree-card {
  background: var(--c-surface);
  border: 1px solid #d3dfec;
  border-radius: 10px;
  box-shadow: inset 0 0 0 1px #eef4fb;
  padding: .5rem .45rem;
  min-height: 24rem;
}
.explorer-group {
  margin-top: .55rem;
}
.explorer-tree-list {
  list-style: none;
  margin: 0;
  padding-left: .85rem;
}
.explorer-tree-list .explorer-tree-list {
  border-left: 1px solid #d8e4f0;
  margin-left: .28rem;
  padding-left: .65rem;
}
.explorer-tree-node {
  margin: .08rem 0;
}
.explorer-tree-link.is-branch {
  background: #f3f8fe;
  border-left-color: #b6cce3;
}
.explorer-group-label {
  font-size: .72rem;
  color: #5f7994;
  margin-bottom: .18rem;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.explorer-link {
  display: block;
  text-decoration: none;
  color: #1b4467;
  border-radius: 9px;
  border-left: 3px solid transparent;
  padding: .42rem .52rem;
  margin-bottom: .14rem;
  font-size: .865rem;
  position: relative;
}
.explorer-root {
  font-weight: 700;
}
.explorer-indent-1 {
  margin-left: .52rem;
  padding-left: .72rem;
}
.explorer-indent-2 {
  margin-left: 1.02rem;
  padding-left: .8rem;
}
.explorer-indent-1::before,
.explorer-indent-2::before {
  content: "";
  position: absolute;
  left: .28rem;
  top: 0;
  bottom: 0;
  width: 1px;
  background: #d8e4f0;
}
.explorer-link:hover,
.explorer-link:focus-visible {
  background: #f1f7fd;
  border-left-color: #87acd2;
}
.explorer-link.is-active {
  background: #dbeaf9;
  border-left-color: #0f4c81;
  color: #0c3d66;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px #bfd6ee;
}
.docs-main-column {
  min-width: 0;
}
.docs-main-header h2 {
  margin: 0;
  font-size: 1.34rem;
  color: #132f4b;
}
.docs-main-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  flex-wrap: wrap;
  margin-bottom: .56rem;
}
.docs-toolbar {
  display: inline-flex;
  gap: .5rem;
  flex-wrap: wrap;
}
.docs-breadcrumb-row {
  font-size: .79rem;
  color: #5a748f;
}
.docs-breadcrumb-row a {
  color: #2a5a89;
  text-decoration: none;
}
.docs-breadcrumb-row a:hover {
  text-decoration: underline;
}
.docs-panel-header {
  box-shadow: none;
  border-color: #cddceb;
}
.docs-target-card {
  background: linear-gradient(180deg, #f7fbff 0%, #ffffff 100%);
  border-color: #d1deeb;
  box-shadow: none;
}
.docs-target-label {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .02em;
  color: #456482;
  margin-bottom: .25rem;
}
.docs-target-path code {
  font-size: .83rem;
}
.docs-subtitle {
  margin-bottom: .55rem;
  font-weight: 700;
  color: #234667;
}
.docs-documents-panel {
  padding-top: .9rem;
  border-color: #ccdcec;
  box-shadow: none;
}
.docs-panel-context {
  border-left: 4px solid #86add4;
}
.docs-panel-action {
  box-shadow: none;
  border-color: #d4dfec;
}
.docs-main-column .alert-info {
  border-color: #c9dbee;
  background: #f2f8ff;
  color: #1f476f;
}
.docs-documents-panel .table {
  box-shadow: none;
  border: 1px solid #d3dfeb;
}
.docs-documents-panel .table th {
  background: #eaf3fd;
  color: #23486d;
}
.docs-documents-panel .table td:first-child {
  font-weight: 600;
  color: #153754;
}
.docs-documents-panel .cell-actions {
  justify-content: flex-start;
  gap: .32rem;
}
.rename-form {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  width: 100%;
  max-width: 520px;
}
.rename-input {
  max-width: 320px;
}
.rename-label {
  display: inline-block;
}
.is-hidden {
  display: none !important;
}
.timesheet-row-other td {
  background: #f5f7fa;
  color: #6b7280;
}
.timesheet-inline-form {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  flex-wrap: wrap;
}
.timesheet-inline-form input[type="date"] {
  width: 150px;
}
.timesheet-inline-form input[type="text"] {
  width: 260px;
}
.timesheet-inline-form input[type="number"] {
  width: 90px;
}
.table-sort-link {
  color: inherit;
  text-decoration: none;
}
.table-sort-link:hover {
  text-decoration: underline;
}
.sort-indicator {
  font-size: .72rem;
  color: #335a84;
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: .45rem .9rem;
  border: 1px solid #c7d8ea;
  border-radius: var(--radius);
  background: #f7fbff;
  color: #193652;
  font-size: .875rem;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s, border-color .15s;
  white-space: nowrap;
}
.btn:hover { background: #e9f2fb; border-color: #aec5de; }
.btn-primary { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.btn-primary:hover { background: var(--c-primary-h); border-color: var(--c-primary-h); }
.btn-danger { background: var(--c-danger); border-color: var(--c-danger); color: #fff; }
.btn-warning { background: var(--c-warning); border-color: var(--c-warning); color: #fff; }
.btn-validate-soft {
  background: #d8f2e4;
  border-color: #8ecfa8;
  color: #1f6a3e;
}
.btn-validate-soft:hover {
  background: #c2ebd4;
  border-color: #74bd92;
}
.btn-full { width: 100%; justify-content: center; }
.btn-sm { padding: .3rem .65rem; font-size: .8125rem; }
.btn-link {
  background: none;
  border: none;
  color: var(--c-primary);
  cursor: pointer;
  font-size: .875rem;
  padding: 0;
  text-decoration: underline;
  font-family: inherit;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
  background: var(--c-surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.table th {
  background: #ecf3fb;
  padding: .62rem .85rem;
  text-align: left;
  font-weight: 700;
  font-size: .8125rem;
  border-bottom: 1px solid var(--c-border);
  color: #27486b;
}
.table td { padding: .62rem .85rem; border-bottom: 1px solid var(--c-border); vertical-align: top; }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: #f7fbff; }
.cell-num { text-align: right; font-variant-numeric: tabular-nums; }
.cell-desc { max-width: 260px; }
.cell-case { font-family: ui-monospace, monospace; font-size: .85rem; white-space: nowrap; }
.cell-actions { display: flex; gap: .4rem; flex-wrap: wrap; }

.badge {
  display: inline-block;
  padding: .15rem .55rem;
  border-radius: 99px;
  font-size: .75rem;
  font-weight: 700;
  white-space: nowrap;
}
.badge-draft            { background: #edf1f5; color: var(--c-draft); }
.badge-submitted        { background: #dbe9f7; color: var(--c-submitted); }
.badge-approved         { background: #d8f2e4; color: var(--c-approved); }
.badge-exporting        { background: #f6e7cf; color: var(--c-exporting); }
.badge-rejected         { background: #f8dddd; color: var(--c-rejected); }
.badge-exported-to-lexflow { background: #d9f3ee; color: var(--c-exported-to-lexflow); }
.badge-export-failed    { background: #f8dddd; color: var(--c-export-failed); }
.badge-admin            { background: #dde9f8; color: #17406d; }
.badge-lexflow-import   { background: #e8eef5; color: #294861; margin-left: .35rem; }
.badge-vps-exported     { background: #e2f1ea; color: #1d5b42; margin-left: .35rem; }
.tag {
  display: inline-block;
  padding: .1rem .45rem;
  border-radius: 4px;
  background: #f3f8fe;
  font-size: .8125rem;
  border: 1px solid #d8e6f4;
}

.alert {
  padding: .75rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  font-size: .875rem;
  border: 1px solid transparent;
}
.alert-error { background: #f9e0de; color: #7d2116; border-color: #e7b4ad; }
.alert-success { background: #e0f4e8; color: #165330; border-color: #b4ddc4; }
.alert-info { background: #eaf3ff; color: #0f3f6e; border-color: #b9d2f1; }

.timesheet-row-import td {
  background: #f5f8fb;
}
.timesheet-row-exported td {
  background: #f2f8f4;
}

.review-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: .75rem;
  box-shadow: var(--shadow);
}
.review-header { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; margin-bottom: .5rem; font-size: .875rem; }
.review-body { font-size: .9rem; margin-bottom: .75rem; }
.review-body p { margin-bottom: .4rem; }
.review-actions { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.notes-internal { font-size: .8125rem; color: var(--c-muted); margin-top: .4rem; }

.admin-tabs { display: flex; gap: .5rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.tab-link {
  padding: .4rem .9rem;
  border-radius: var(--radius);
  border: 1px solid var(--c-border);
  color: var(--c-text);
  text-decoration: none;
  font-size: .875rem;
  background: var(--c-surface);
}
.tab-link:hover { background: #eef4fb; }

.empty-state {
  padding: 2.5rem;
  text-align: center;
  color: var(--c-muted);
  background: var(--c-surface);
  border: 1px dashed var(--c-border);
  border-radius: var(--radius);
}
.text-muted { color: var(--c-muted); }
code {
  font-family: ui-monospace, monospace;
  font-size: .85em;
  background: #edf4fb;
  padding: .1em .35em;
  border-radius: 3px;
}

@media (max-width: 980px) {
  /* Sur mobile/tablette, le shell base.html cesse d'être une grille figée en
     100vh qui coupe le contenu qui déborde. .app-layout devient le conteneur
     scrollable (vertical) ; sidebar et workspace s'empilent et prennent leur
     hauteur naturelle. Scopé aux classes du shell → aucune incidence sur les
     pages autonomes (boussole/dossiers/flux) qui gèrent leur propre scroll. */
  .app-layout {
    grid-template-columns: 1fr;
    height: 100dvh;
    overflow-y: auto;
    overflow-x: hidden;
  }
  .app-workspace {
    height: auto;
    overflow: visible;
  }
  .main.main-app {
    overflow: visible;
  }
  .global-sidebar {
    border-right: none;
    border-bottom: 1px solid var(--c-border);
  }
}

@media (max-width: 700px) {
  .field-row { flex-direction: column; }
  .table { font-size: .8125rem; }
  .cell-desc { max-width: 140px; }
  .brand-logo { height: 24px; }
  .documents-shell { grid-template-columns: 1fr; }
  .docs-tree-column,
  .docs-main-column { min-height: auto; }
}

/* ── FLUX ──────────────────────────────── */
.flux-container {
  padding: 1rem;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.flux-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.flux-header h1 { font-size: 1.1rem; font-weight: 700; margin: 0; }
.flux-tabs { display: flex; gap: 0.5rem; }
.flux-filters { display: flex; gap: 0.5rem; margin-left: auto; }
.tab-btn, .filter-btn {
  padding: 0.4rem 0.8rem; border-radius: 20px;
  border: 1px solid var(--c-border); background: var(--c-surface);
  color: var(--c-text); text-decoration: none; font-size: 0.85rem; cursor: pointer;
}
.tab-btn.active, .filter-btn.active {
  background: var(--c-primary); color: #fff; border-color: var(--c-primary);
}
.flux-layout {
  display: grid;
  grid-template-columns: 300px 1fr 200px;
  gap: 1rem;
  flex: 1;
  min-height: 0;
}
.flux-list,
.flux-detail {
  overflow-y: auto;
  min-height: 0;
  height: 100%;
}
.flux-list {
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  background: var(--c-surface);
}
.flux-detail {
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  background: var(--c-surface);
  padding: 1rem;
}
.flux-detail::-webkit-scrollbar,
.flux-list::-webkit-scrollbar {
  width: 8px;
  background: var(--c-border);
}
.flux-detail::-webkit-scrollbar-thumb,
.flux-list::-webkit-scrollbar-thumb {
  background: var(--c-primary);
  border-radius: 4px;
}
.flux-actions {
  border: 1px solid var(--c-border); border-radius: var(--radius);
  background: var(--c-surface); padding: 1rem; min-height: 400px;
}
.flux-actions h3 { font-size: 0.75rem; font-weight: 700; color: var(--c-muted); margin-bottom: 0.75rem; text-transform: uppercase; letter-spacing: .05em; }
.mail-item {
  padding: 0.75rem 1rem; border-bottom: 1px solid var(--c-border);
  cursor: pointer; transition: background 0.15s;
}
.mail-item:hover { background: #f0f5fa; }
.mail-item.unread { border-left: 3px solid var(--c-primary); }
.mail-item-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.2rem; }
.mail-sender { font-size: 0.82rem; font-weight: 600; color: var(--c-text); }
.mail-subject { font-size: 0.8rem; color: var(--c-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mail-status { font-size: 0.7rem; padding: 0.15rem 0.45rem; border-radius: 10px; }
.badge-a-traiter { background: #fef3c7; color: #92400e; }
.mail-detail-header { display: flex; flex-direction: column; gap: 0.25rem; padding: 0.75rem; background: #f8fafc; border-radius: var(--radius); margin-bottom: 0.75rem; font-size: 0.85rem; }
.mail-subject-large { font-size: 1rem; font-weight: 600; margin-bottom: 0.75rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--c-border); }
.mail-body {
  font-size: 0.85rem;
  line-height: 1.6;
  padding: 0.75rem 1rem;
  background: var(--c-surface);
  border-radius: 6px;
  margin-bottom: 1rem;
  border: 1px solid var(--c-border);
}
.mail-body p {
  margin: 0 0 0.4rem 0;
}
.mail-case-section, .mail-ai-section { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--c-border); }
.mail-case-section h3, .mail-ai-section h3 { font-size: 0.8rem; font-weight: 700; color: var(--c-muted); text-transform: uppercase; margin-bottom: 0.5rem; display: flex; align-items: center; gap: 0.5rem; }
.case-select { width: 100%; padding: 0.4rem 0.6rem; border: 1px solid var(--c-border); border-radius: var(--radius); font-size: 0.85rem; margin-bottom: 0.5rem; }
.case-suggestion { display: flex; flex-direction: column; gap: 0.4rem; }
.suggestion-score { font-size: 0.75rem; color: var(--c-muted); }
.ai-badge { font-size: 0.7rem; font-weight: 600; background: #ede9fe; color: #5b21b6; padding: 0.15rem 0.45rem; border-radius: 10px; }
.ai-analysis-grid { display: flex; flex-direction: column; gap: 0.5rem; }
.ai-row { display: flex; gap: 0.75rem; font-size: 0.85rem; }
.ai-label { font-weight: 600; color: var(--c-muted); min-width: 130px; flex-shrink: 0; }
.ai-value { color: var(--c-text); }
.urgence-haute { color: var(--c-danger); font-weight: 700; }
.urgence-modérée { color: var(--c-warning); font-weight: 600; }
.urgence-faible { color: var(--c-success); }
.ai-footer { font-size: 0.72rem; color: var(--c-muted); margin-top: 0.75rem; padding-top: 0.5rem; border-top: 1px solid var(--c-border); font-style: italic; }
.action-btn { display: block; width: 100%; padding: 0.5rem 0.75rem; margin-bottom: 0.4rem; text-align: left; border: 1px solid var(--c-border); border-radius: var(--radius); background: var(--c-surface); color: var(--c-text); font-size: 0.85rem; cursor: pointer; text-decoration: none; transition: background 0.15s; }
.action-btn:hover { background: #f0f5fa; }
.action-list { display: flex; flex-direction: column; gap: 0.4rem; }
.action-placeholder { font-size: 0.8rem; color: var(--c-muted); }
.loading { color: var(--c-muted); font-size: 0.85rem; font-style: italic; padding: 0.5rem 0; }
.empty-state { padding: 2rem 1rem; text-align: center; color: var(--c-muted); font-size: 0.85rem; }

@media (max-width: 980px) {
  .flux-layout { grid-template-columns: 1fr; height: auto; }
  .flux-list { max-height: 300px; }
}

/* ================================================================
   LexFlow Drop Zone — classes .lf-*
   Ajoutees pour la zone de drop avec accumulation progressive
   (flux_reply_panel.html)
================================================================ */

.lf-drop-zone {
  display: block;
  width: 100%;
  border: 0;
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
  margin-top: 0.6rem;
  margin-bottom: 0.3rem;
  background: transparent;
  user-select: none;
}
.lf-drop-zone:hover,
.lf-drop-zone:focus {
  background: #f8fafc;
  outline: none;
  box-shadow: inset 0 0 0 1px var(--c-border);
}
.lf-drop-zone.drag-over {
  background: #eff6ff;
  box-shadow: inset 0 0 0 2px var(--c-primary);
}
.lf-drop-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}
.lf-drop-inner span {
  font-size: 0.85rem;
  color: var(--c-text);
}
.lf-drop-inner small {
  font-size: 0.77rem;
  color: var(--c-muted);
}
.lf-drop-inner u {
  color: var(--c-primary);
}

.lf-file-list {
  list-style: none;
  padding: 0;
  margin: 0.2rem 0;
  font-size: 0.83rem;
}
.lf-file-list li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.3rem;
  border-bottom: 1px solid var(--c-border);
  border-radius: 2px;
}
.lf-file-list li:last-child {
  border-bottom: none;
}
.lf-icon {
  flex-shrink: 0;
  font-size: 1rem;
}
.lf-fname {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--c-text);
}
.lf-fsize {
  color: var(--c-muted);
  font-size: 0.78rem;
  white-space: nowrap;
}
.lf-file-list .remove-btn {
  margin-left: 0.2rem;
  cursor: pointer;
  color: var(--c-danger);
  background: none;
  border: none;
  font-size: 0.85rem;
  padding: 0 0.2rem;
  line-height: 1;
  flex-shrink: 0;
}
.lf-file-list .remove-btn:hover {
  opacity: 0.7;
}

.lf-file-error {
  color: var(--c-danger);
  font-size: 0.8rem;
  margin: 0.25rem 0;
  padding: 0.25rem 0.4rem;
  border-left: 3px solid var(--c-danger);
  background: #fef2f2;
  border-radius: 2px;
}

.lf-nas-path {
  font-size: 0.77rem;
  color: var(--c-muted);
  margin-top: 0.3rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-wrap: wrap;
}
.lf-nas-path code {
  user-select: all;
  cursor: pointer;
  font-family: "Consolas", "Courier New", monospace;
  font-size: 0.77rem;
  background: #f1f5f9;
  padding: 0.1rem 0.3rem;
  border-radius: 3px;
  border: 1px solid var(--c-border);
  color: var(--c-text);
  transition: background 0.2s;
}
.lf-nas-path code:hover {
  background: #e2eaf3;
}
