:root {
  --bg: #f5f7f8;
  --panel: #ffffff;
  --panel-strong: #f0f4f3;
  --surface-raised: #f8fbfa;
  --line: #d8e1de;
  --text: #17242e;
  --muted: #667671;
  --accent: #2859c5;
  --accent-dark: #1b469d;
  --accent-soft: #eaf0ff;
  --accent-border: #bccdf5;
  --accent-ink: #173d8d;
  --crest-primary: #305fe0;
  --crest-primary-dark: #163b8f;
  --crest-primary-ink: #0f2f78;
  --crest-secondary: #65b444;
  --crest-secondary-dark: #3f8a28;
  --theme-root-text: #173f8e;
  --theme-root-muted: #5270aa;
  --theme-root-wash: color-mix(in srgb, var(--crest-primary) 8%, var(--panel));
  --theme-root-wash-hover: color-mix(in srgb, var(--crest-primary) 13%, var(--panel));
  --theme-root-active: linear-gradient(90deg, color-mix(in srgb, var(--crest-primary) 19%, var(--panel)), color-mix(in srgb, var(--crest-secondary) 8%, var(--panel)));
  --selection-bg: #e9f0ff;
  --selection-border: #bbcdf5;
  --selection-text: #173d8d;
  --selection-muted: #43649c;
  --selection-chip-bg: #ffffff;
  --tree-line: #d8e1de;
  --tree-icon: #66809a;
  --folder-icon: #4972b6;
  --folder-icon-active: #1f55ba;
  --folder-body: var(--folder-icon);
  --folder-tab: color-mix(in srgb, var(--folder-icon) 72%, #ffffff);
  --folder-shadow: rgba(35, 74, 133, 0.18);
  --info-icon-bg: #ffffff;
  --info-icon-border: #c8d4e5;
  --info-icon-text: #315caa;
  --chevron-right-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 18 6-6-6-6'/%3E%3C/svg%3E") center / 16px 16px no-repeat;
  --drag-bg: #eaf6ed;
  --drag-text: #1e6139;
  --drag-outline: #3d9755;
  --warning: #9a5b00;
  --danger: #b42318;
  --red-background: #7a1f1c;
  --red-background-hover: #651816;
  --shadow: 0 12px 30px rgba(20, 31, 27, 0.09);
  --option-hover-bg: var(--selection-bg);
  --option-hover-text: var(--selection-text);
  --option-hover-muted: var(--selection-muted);
  --option-hover-border: var(--selection-border);
  --option-hover-chip-bg: var(--selection-chip-bg);
  --sidebar-width: 340px;
  --editor-panel-width: 520px;
  --advanced-search-width: 440px;
  --job-import-width: 440px;
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

[data-theme="dark"] {
  --bg: #171a1c;
  --panel: #1e2225;
  --panel-strong: #272d30;
  --surface-raised: #242a2d;
  --line: #3b4648;
  --text: #eef4f2;
  --muted: #acbbb7;
  --accent: #82aaff;
  --accent-dark: #5d87e8;
  --accent-soft: #2a3b5c;
  --accent-border: #4f73a9;
  --accent-ink: #dce8ff;
  --crest-primary: #7da2ff;
  --crest-primary-dark: #9db9ff;
  --crest-primary-ink: #dce6ff;
  --crest-secondary: #8bd36b;
  --crest-secondary-dark: #a7e08e;
  --theme-root-text: #dce8ff;
  --theme-root-muted: #a9c0ef;
  --theme-root-wash: color-mix(in srgb, var(--crest-primary) 13%, var(--panel));
  --theme-root-wash-hover: color-mix(in srgb, var(--crest-primary) 19%, var(--panel));
  --theme-root-active: linear-gradient(90deg, color-mix(in srgb, var(--crest-primary) 25%, var(--panel)), color-mix(in srgb, var(--crest-secondary) 11%, var(--panel)));
  --selection-bg: #2a3b5b;
  --selection-border: #4e73aa;
  --selection-text: #e0ebff;
  --selection-muted: #b8caf1;
  --selection-chip-bg: #1d2735;
  --tree-line: #3d4a4a;
  --tree-icon: #94a8bd;
  --folder-icon: #8fb6ff;
  --folder-icon-active: #dce8ff;
  --folder-body: var(--folder-icon);
  --folder-tab: color-mix(in srgb, var(--folder-icon) 62%, #1e2225);
  --folder-shadow: rgba(3, 8, 18, 0.52);
  --info-icon-bg: #232b36;
  --info-icon-border: #53647a;
  --info-icon-text: #cfe0ff;
  --drag-bg: #233a2c;
  --drag-text: #cfeeda;
  --drag-outline: #7bc992;
  --warning: #d6a45f;
  --danger: #d35f5f;
  --shadow: 0 16px 36px rgba(0, 0, 0, 0.32);
  --option-hover-bg: var(--selection-bg);
  --option-hover-text: var(--selection-text);
  --option-hover-muted: var(--selection-muted);
  --option-hover-border: var(--selection-border);
  --option-hover-chip-bg: var(--selection-chip-bg);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
}

body.modal-open {
  overflow: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
}

.app-shell.advanced-search-open {
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr) var(--advanced-search-width);
}

.app-shell.job-import-open {
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr) var(--job-import-width);
}

.app-shell.advanced-search-open .topbar,
.app-shell.job-import-open .topbar,
.app-shell.job-import-open .topbar-actions,
.app-shell.advanced-search-open .topbar-actions {
  flex-wrap: wrap;
}

.sidebar {
  grid-column: 1;
  grid-row: 1;
  height: 100vh;
  border-right: 1px solid var(--line);
  background: var(--panel);
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 22px 16px 0;
  overflow: hidden;
}

.sidebar-resizer {
  position: relative;
  grid-column: 1;
  grid-row: 1;
  justify-self: end;
  align-self: stretch;
  z-index: 5;
  width: 14px;
  margin-right: -7px;
  border-inline: 1px solid transparent;
  background: transparent;
  cursor: col-resize;
  touch-action: none;
}

.sidebar-resizer::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 6px;
  width: 2px;
  background: var(--line);
}

.sidebar-resizer::after {
  content: "";
  position: absolute;
  top: 17px;
  left: 4px;
  width: 6px;
  height: 34px;
  border-inline: 1px solid currentColor;
  color: transparent;
  transform: translateY(-50%);
  transition: color 0.12s ease, background 0.12s ease;
}

.sidebar-resizer:hover,
.sidebar-resizer:focus-visible,
.sidebar-resizer.dragging {
  border-color: rgba(15, 118, 110, 0.32);
  background: rgba(15, 118, 110, 0.08);
  outline: none;
}

.sidebar-resizer:hover::before,
.sidebar-resizer:focus-visible::before,
.sidebar-resizer.dragging::before {
  background: var(--accent);
}

.sidebar-resizer:hover::after,
.sidebar-resizer:focus-visible::after,
.sidebar-resizer.dragging::after {
  color: var(--accent);
  background: var(--panel);
}

.workspace {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  height: 100vh;
  overflow: hidden;
}

.startup-failure-panel {
  width: min(680px, calc(100vw - 64px));
  margin: 42px auto;
  padding: 28px 30px;
  border: 1px solid rgba(148, 163, 184, 0.42);
  border-radius: 22px;
  background:
    radial-gradient(circle at top left, rgba(219, 234, 254, 0.92), rgba(255, 255, 255, 0.98) 45%),
    #ffffff;
  box-shadow: 0 28px 90px rgba(15, 23, 42, 0.12);
}

.startup-failure-panel h2 {
  margin: 0 0 10px;
  color: var(--text);
  font-size: clamp(1.6rem, 2.4vw, 2.2rem);
  line-height: 1.1;
}

.startup-failure-panel p:last-child {
  margin: 0;
  max-width: 58ch;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
}

body.sidebar-strip-mode {
  min-width: 0;
}

body.sidebar-strip-mode .app-shell {
  grid-template-columns: minmax(0, 1fr);
  width: 100vw;
  min-width: 0;
}

body.sidebar-strip-mode .sidebar {
  width: 100vw;
  min-width: 0;
  border-right: 0;
  padding: 16px 10px 0;
}

body.sidebar-strip-mode .sidebar-resizer,
body.sidebar-strip-mode .workspace {
  display: none;
}

body.sidebar-strip-mode .brand {
  position: relative;
  margin-bottom: 12px;
}

body.sidebar-strip-mode .brand-copy {
  position: absolute;
  left: 50%;
  width: auto;
  transform: translateX(-50%);
}

body.sidebar-strip-mode .sidebar-tools {
  margin-bottom: 10px;
}

body.sidebar-resizing,
body.advanced-search-resizing,
body.job-import-resizing,
body.editor-panel-resizing {
  cursor: col-resize;
  user-select: none;
}

body.sidebar-resizing *,
body.advanced-search-resizing *,
body.job-import-resizing *,
body.editor-panel-resizing * {
  cursor: col-resize !important;
}

.brand {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.brand::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -9px;
  left: 0;
  height: 1px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    transparent,
    color-mix(in srgb, var(--crest-primary-ink) 58%, transparent) 10%,
    color-mix(in srgb, var(--crest-primary-ink) 46%, transparent) 90%,
    transparent
  );
}

.brand-identity {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 0 1 142px;
  width: auto;
  min-width: 0;
  gap: 5px;
}

.brand-mark {
  width: 47px;
  height: 43px;
  flex: 0 0 auto;
  object-fit: contain;
}

.brand-title {
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.2px;
  white-space: nowrap;
  color: var(--crest-primary-ink);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.9);
}

.brand-subtitle,
.eyebrow,
.module-description,
.field-hint {
  color: var(--muted);
}

.brand-subtitle {
  font-size: 13px;
}

.brand-shortcuts {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.brand-shortcut {
  position: relative;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
  color: var(--muted);
  padding: 0;
  cursor: pointer;
}

.brand-shortcut svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand-shortcut:hover,
.brand-shortcut:focus-visible {
  background: var(--panel-strong);
  color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.brand-shortcut.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.advanced-search-shortcut.has-active-search {
  border-color: var(--accent);
  color: var(--accent);
}

.advanced-search-shortcut.panel-open {
  border-color: var(--accent);
  background: var(--panel-strong);
  color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.job-import-shortcut.panel-open {
  border-color: #7c3aed;
  background: linear-gradient(135deg, color-mix(in srgb, #7c3aed 12%, var(--panel)), color-mix(in srgb, var(--accent) 8%, var(--panel)));
  color: #5b21b6;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}

.job-import-shortcut svg {
  stroke-width: 1.9;
}

.job-import-status-dot {
  position: absolute;
  right: 4px;
  bottom: 4px;
  display: none;
  width: 6px;
  height: 6px;
  border: 1px solid var(--panel);
  border-radius: 50%;
  background: #7c3aed;
}

.advanced-search-active-dot {
  position: absolute;
  right: 4px;
  bottom: 4px;
  display: none;
  width: 6px;
  height: 6px;
  border: 1px solid var(--panel);
  border-radius: 50%;
  background: var(--accent);
}

.advanced-search-shortcut.has-active-search .advanced-search-active-dot {
  display: block;
}

.sidebar-tools {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 0;
}

.sidebar-fixed-zone {
  flex: 0 0 auto;
  padding-bottom: 0;
}

.input,
.select,
.textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
  color: var(--text);
  padding: 10px 12px;
  outline: none;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
}

.global-search-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.global-search-filters {
  display: grid;
  gap: 0;
}

.global-search-row {
  display: block;
}

.global-search-input-wrap {
  position: relative;
  min-width: 0;
}

.global-search-input,
.global-search-type {
  min-height: 40px;
  padding: 9px 11px;
  font-size: 13px;
}

.global-search-type {
  min-width: 0;
}

.global-search-options {
  display: flex;
  align-items: center;
  width: 100%;
  flex-wrap: wrap;
  gap: 6px 16px;
}

.global-search-word-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  user-select: none;
}

.global-search-word-option input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.global-search-history {
  position: absolute;
  z-index: 40;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 288px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 6px;
}

.global-search-history-item {
  display: block;
  width: 100%;
  min-height: 34px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--text);
  padding: 7px 9px;
  text-align: left;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
  cursor: pointer;
}

.global-search-history-item:hover,
.global-search-history-item:focus-visible {
  background: var(--panel-strong);
  outline: none;
}

.global-search-status {
  min-height: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.global-search-empty-state {
  margin: 24px 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
}

.sidebar-root-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  min-width: 0;
  margin-left: auto;
}

.sidebar-root-actions-standalone {
  width: 100%;
  justify-content: flex-end;
  padding-right: 28px;
}

.sidebar-root-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 24px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--muted);
  padding: 3px 5px;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}

.sidebar-root-action:hover,
.sidebar-root-action:focus-visible {
  border-color: rgba(15, 118, 110, 0.35);
  background: var(--panel-strong);
  color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1);
}

.sidebar-root-action:disabled {
  cursor: default;
  opacity: 0.45;
  box-shadow: none;
}

.sidebar-root-action:disabled:hover,
.sidebar-root-action:disabled:focus-visible {
  border-color: var(--line);
  background: var(--panel);
  color: var(--muted);
}

.sidebar-counter-refresh {
  width: 32px;
  padding: 3px;
}

.sidebar-counter-refresh-icon {
  display: inline-grid;
  width: 15px;
  height: 15px;
  place-items: center;
  border-radius: 999px;
  color: currentColor;
  font-size: 15px;
  line-height: 1;
  transform-origin: center;
}

.sidebar-counter-refresh.is-refreshing .sidebar-counter-refresh-icon {
  animation: sidebar-counter-refresh-spin 0.78s linear infinite;
}

@keyframes sidebar-counter-refresh-spin {
  to {
    transform: rotate(360deg);
  }
}

.sidebar-root-action-icon {
  display: inline-grid;
  width: 10px;
  height: 10px;
  place-items: center;
  border-radius: 999px;
  background: currentColor;
  color: var(--accent);
  font-size: 0;
  -webkit-mask: var(--chevron-right-mask);
  mask: var(--chevron-right-mask);
  transition: transform 0.14s ease, color 0.14s ease;
}

#sidebarRootsToggle[data-action="expand"] .sidebar-root-action-icon {
  transform: rotate(90deg);
}

#sidebarRootsToggle[data-action="collapse"] .sidebar-root-action-icon {
  transform: rotate(-90deg);
}

.global-search-results {
  max-height: min(260px, 36vh);
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.global-search-result {
  display: block;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  padding: 9px 10px;
  text-align: left;
  cursor: pointer;
}

.global-search-result:last-child {
  border-bottom: 0;
}

.global-search-result:hover,
.global-search-result:focus-visible {
  background: var(--panel-strong);
  outline: none;
}

.global-search-result-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.global-search-result-type {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.1);
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
}

.global-search-result-module,
.global-search-result-path,
.global-search-result-excerpt {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.global-search-result-title {
  margin-bottom: 2px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.global-search-result-excerpt {
  margin-top: 4px;
}

.compact {
  max-width: 310px;
}

.module-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.module-list-pinned {
  flex: 0 0 auto;
}

.module-list-scroll {
  flex: 1 1 auto;
  min-height: 0;
  margin-top: -26px;
  margin-right: -6px;
  padding: 0 6px 22px 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.module-list-scroll,
.sidebar-workflow-scroll-region {
  scrollbar-color: color-mix(in srgb, var(--muted) 74%, var(--line)) transparent;
  scrollbar-width: auto;
}

.module-list-scroll::-webkit-scrollbar,
.sidebar-workflow-scroll-region::-webkit-scrollbar {
  width: 13px;
  height: 13px;
}

.module-list-scroll::-webkit-scrollbar-track,
.sidebar-workflow-scroll-region::-webkit-scrollbar-track {
  background: transparent;
}

.module-list-scroll::-webkit-scrollbar-thumb,
.sidebar-workflow-scroll-region::-webkit-scrollbar-thumb {
  min-height: 64px;
  border: 3px solid transparent;
  border-radius: 999px;
  background:
    color-mix(in srgb, var(--muted) 76%, var(--line))
    content-box;
}

.module-list-scroll::-webkit-scrollbar-thumb:hover,
.sidebar-workflow-scroll-region::-webkit-scrollbar-thumb:hover {
  background:
    color-mix(in srgb, var(--muted) 88%, var(--accent))
    content-box;
}

.category-title {
  margin: 16px 8px 6px;
  color: color-mix(in srgb, var(--theme-root-text) 58%, var(--muted));
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.module-list-scroll > .category-title:first-child {
  display: flex;
  align-items: center;
  min-height: 24px;
  margin-top: 0;
  margin-bottom: 6px;
  padding-right: 116px;
}

.module-button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
  width: 100%;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  padding: 9px 8px;
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
}

.module-button > span:not(.module-count):not(.sidebar-urbanisme-toggle):not(.sidebar-tree-caret):not(.sidebar-urbanisme-folder-icon) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.module-button:hover {
  background: var(--panel-strong);
}

.module-button.active {
  background: var(--selection-bg);
  color: var(--selection-text);
  font-weight: 800;
}

.module-button.ged-drag-switch-pending,
.conseil-municipal-workflow-button.ged-drag-switch-pending {
  background: var(--selection-bg);
  color: var(--selection-text);
  box-shadow: inset 0 0 0 1px var(--selection-border);
}

.sidebar-urbanisme-child.ged-drag-expand-pending,
.sidebar-alsh-folder.ged-drag-expand-pending {
  background: var(--selection-bg);
  color: var(--selection-text);
  box-shadow: inset 0 0 0 1px var(--selection-border);
}

.urbanisme-only-button {
  grid-template-columns: auto minmax(0, 1fr) auto;
  font-weight: 900;
}

.urbanisme-only-button:not(.active):not(.search-match-theme) {
  color: var(--theme-root-text);
  background:
    linear-gradient(90deg, var(--theme-root-wash), rgba(255, 255, 255, 0) 76%);
  box-shadow: inset 3px 0 0 color-mix(in srgb, var(--crest-secondary) 74%, var(--crest-primary));
}

.urbanisme-only-button:not(.active):not(.search-match-theme):hover {
  color: var(--crest-primary-ink);
  background:
    linear-gradient(90deg, var(--theme-root-wash-hover), rgba(255, 255, 255, 0) 78%);
  box-shadow:
    inset 3px 0 0 var(--crest-secondary),
    0 1px 0 rgba(48, 95, 224, 0.08);
}

.urbanisme-only-button.active:not(.search-match-theme) {
  color: var(--crest-primary-ink);
  background: var(--theme-root-active);
  box-shadow: inset 3px 0 0 var(--crest-primary);
}

.sidebar-urbanisme-toggle {
  display: inline-block;
  width: 16px;
  height: 16px;
  color: var(--tree-icon);
  font-size: 0;
  background: currentColor;
  -webkit-mask: var(--chevron-right-mask);
  mask: var(--chevron-right-mask);
  transition: transform 0.16s ease, color 0.16s ease;
}

.urbanisme-only-button.open .sidebar-urbanisme-toggle,
.has-tree-toggle.tree-open .sidebar-urbanisme-toggle {
  transform: rotate(90deg);
}

.sidebar-urbanisme-group {
  display: grid;
  gap: 2px;
}

.sidebar-urbanisme-children {
  display: grid;
  gap: 2px;
  margin: 3px 0 8px 14px;
  padding: 5px 0 6px 12px;
  border-left: 1px solid color-mix(in srgb, var(--tree-line) 72%, transparent);
}

.conseil-municipal-workflows {
  margin-left: 10px;
  padding-left: 9px;
}

.conseil-municipal-workflow {
  display: grid;
  gap: 2px;
}

.conseil-municipal-workflow-button.sidebar-urbanisme-child.has-tree-toggle {
  grid-template-columns: 12px minmax(0, 1fr) auto;
  min-height: 36px;
  padding-left: 6px;
  font-weight: 900;
  white-space: nowrap;
}

.conseil-municipal-workflow-scopes {
  display: grid;
  gap: 2px;
  margin: 1px 0 6px 12px;
  padding-left: 8px;
  border-left: 1px solid color-mix(in srgb, var(--tree-line) 70%, transparent);
}

.sidebar-workflow-fixed-classify-layout {
  align-items: start;
}

.sidebar-workflow-fixed-classify {
  position: relative;
  z-index: 2;
  background: color-mix(in srgb, var(--panel) 96%, white);
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.06);
}

.sidebar-workflow-scroll-region {
  display: grid;
  gap: 2px;
  max-height: calc(100vh - 318px);
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding-right: 3px;
}

.sidebar-urbanisme-active-header {
  margin: 2px 0 4px 2px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

.sidebar-urbanisme-child {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  position: relative;
  min-width: 0;
  min-height: 34px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  padding: 6px 8px 6px 9px;
  text-align: left;
  font-size: 13px;
  font-weight: 700;
}

.sidebar-urbanisme-child.has-tree-toggle {
  grid-template-columns: 12px auto minmax(0, 1fr) auto;
  gap: 7px;
  padding-left: 6px;
}

.sidebar-tree-caret {
  display: inline-grid;
  width: 16px;
  height: 16px;
  place-items: center;
  color: var(--tree-icon);
  font-size: 0;
  line-height: 1;
  background: currentColor;
  -webkit-mask: var(--chevron-right-mask);
  mask: var(--chevron-right-mask);
  transition: transform 0.14s ease, color 0.14s ease;
}

.sidebar-tree-caret.open {
  transform: rotate(90deg);
}

.sidebar-tree-caret.empty {
  opacity: 0;
}

.sidebar-urbanisme-child::before {
  content: "";
  position: absolute;
  left: -13px;
  top: 15px;
  width: 10px;
  border-top: 1px solid color-mix(in srgb, var(--tree-line) 58%, transparent);
}

.sidebar-urbanisme-child:hover,
.sidebar-urbanisme-child.active {
  background: var(--selection-bg);
  color: var(--selection-text);
}

.sidebar-urbanisme-child:hover .sidebar-tree-caret,
.sidebar-urbanisme-child:hover .sidebar-urbanisme-toggle,
.sidebar-urbanisme-child.active .sidebar-tree-caret,
.sidebar-urbanisme-child.active .sidebar-urbanisme-toggle,
.module-button:hover .sidebar-urbanisme-toggle,
.module-button.active .sidebar-urbanisme-toggle {
  color: var(--selection-text);
}

.sidebar-urbanisme-child.active {
  font-weight: 900;
}

.sidebar-urbanisme-folder-icon {
  position: relative;
  width: 17px;
  height: 17px;
  color: var(--folder-icon);
  background: currentColor;
  box-shadow: none;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z'/%3E%3C/svg%3E") center / 17px 17px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z'/%3E%3C/svg%3E") center / 17px 17px no-repeat;
}

.sidebar-urbanisme-folder-icon::before {
  content: none;
}

.sidebar-urbanisme-child:hover .sidebar-urbanisme-folder-icon,
.sidebar-urbanisme-child.active .sidebar-urbanisme-folder-icon,
.sidebar-alsh-folder:hover .sidebar-urbanisme-folder-icon,
.sidebar-alsh-folder.active .sidebar-urbanisme-folder-icon {
  color: var(--folder-icon-active);
}

.sidebar-urbanisme-folder-icon.search-match-folder-icon {
  width: 18px;
  height: 16px;
  border-radius: 0;
  color: inherit;
  background: transparent url("icons/rouge-22.png?v=20260620-transparent") center / contain no-repeat;
  box-shadow: none;
  -webkit-mask: none;
  mask: none;
}

.sidebar-urbanisme-folder-icon.search-match-folder-icon::before {
  content: none;
}

.search-match-folder {
  color: #8f1d1b;
  font-weight: 900;
}

.search-match-folder .sidebar-urbanisme-folder-label,
.search-match-folder > span:not(.sidebar-tree-caret):not(.sidebar-urbanisme-folder-icon) {
  color: #8f1d1b;
  font-weight: 900;
}

.sidebar-urbanisme-folder-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-urbanisme-folder-code {
  color: var(--muted);
  font-weight: 900;
}

.sidebar-urbanisme-folder-name {
  text-transform: uppercase;
}

.sidebar-urbanisme-child-count {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  min-height: 18px;
  padding: 1px 7px;
  border: 1px solid color-mix(in srgb, var(--line) 74%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 6%, var(--panel));
  color: var(--selection-muted);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
}

.sidebar-urbanisme-child.active .sidebar-urbanisme-child-count,
.sidebar-urbanisme-child:hover .sidebar-urbanisme-child-count {
  background: var(--selection-chip-bg);
  color: var(--selection-muted);
}

.sidebar-urbanisme-child.droppable {
  outline: 1px dashed transparent;
  outline-offset: -2px;
}

.sidebar-urbanisme-child.droppable.drag-over {
  background: var(--drag-bg);
  color: var(--drag-text);
  outline-color: var(--drag-outline);
}

.sidebar-alsh-dossiers {
  display: grid;
  gap: 4px;
  margin: 3px 0 8px calc(34px + (var(--alsh-folder-level, 0) * 14px));
}

.sidebar-alsh-tree {
  display: grid;
  gap: 4px;
  margin: 3px 0 8px 28px;
}

.sidebar-urbanisme-root-tree {
  display: grid;
  gap: 2px;
  margin: 3px 0 8px 0;
}

.sidebar-urbanisme-root-tree > .sidebar-urbanisme-folder-node > .sidebar-urbanisme-folder {
  min-height: 34px;
}

.sidebar-alsh-folder-node {
  display: grid;
  gap: 3px;
}

.procurement-guidance-host {
  position: relative;
}

.procurement-guidance-host.has-procurement-guidance > .sidebar-urbanisme-child,
.procurement-guidance-host.has-procurement-guidance > .sidebar-alsh-folder {
  padding-right: 38px;
}

.procurement-guidance-trigger {
  position: absolute;
  z-index: 3;
  top: 6px;
  right: 7px;
  display: inline-grid;
  width: 22px;
  height: 22px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--info-icon-border);
  border-radius: 999px;
  background: var(--info-icon-bg);
  color: var(--info-icon-text);
  cursor: help;
  font-size: 0;
  line-height: 1;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.12);
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease, transform 0.14s ease;
}

.procurement-guidance-trigger::before {
  content: "";
  width: 15px;
  height: 15px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 16v-4'/%3E%3Cpath d='M12 8h.01'/%3E%3C/svg%3E") center / 15px 15px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 16v-4'/%3E%3Cpath d='M12 8h.01'/%3E%3C/svg%3E") center / 15px 15px no-repeat;
}

.procurement-guidance-trigger.has-official-source::after {
  content: "";
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 8px;
  height: 3px;
  border: 1px solid #fff;
  border-radius: 2px;
  background: linear-gradient(90deg, #000091 0 33.33%, #fff 33.33% 66.66%, #e1000f 66.66%);
  opacity: 0.92;
}

.procurement-guidance-trigger:hover,
.procurement-guidance-trigger:focus-visible,
.procurement-guidance-trigger[aria-expanded="true"] {
  border-color: var(--accent-border);
  background: var(--accent-soft);
  color: var(--accent-ink);
  outline: 2px solid color-mix(in srgb, var(--accent) 28%, transparent);
  outline-offset: 1px;
  transform: translateY(-1px);
}

.procurement-guidance-bubble {
  position: fixed;
  z-index: 10050;
  width: min(380px, calc(100vw - 24px));
  max-height: min(430px, calc(100vh - 24px));
  overflow: auto;
  padding: 17px 18px 15px;
  border: 1px solid #c8ccd8;
  border-top: 4px solid #000091;
  border-radius: 10px;
  background: var(--panel, #fff);
  color: var(--text, #17202a);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.24), 0 3px 10px rgba(15, 23, 42, 0.14);
}

.procurement-guidance-bubble::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(90deg, #000091 0 33.33%, #fff 33.33% 66.66%, #e1000f 66.66%);
}

.ged-click-tooltip {
  position: fixed;
  z-index: 10060;
  width: max-content;
  max-width: min(360px, calc(100vw - 24px));
  border: 1px solid var(--selection-border);
  border-radius: 10px;
  background: var(--panel);
  color: var(--text);
  padding: 10px 12px;
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.24), 0 2px 8px rgba(15, 23, 42, 0.14);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.ged-click-tooltip::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 22px;
  width: 10px;
  height: 10px;
  border-top: 1px solid var(--selection-border);
  border-left: 1px solid var(--selection-border);
  background: inherit;
  transform: rotate(45deg);
}

.ged-domain-summary-tooltip {
  position: fixed;
  z-index: 10065;
  width: max-content;
  max-width: min(360px, calc(100vw - 24px));
  border: 1px solid rgba(37, 99, 235, 0.22);
  border-radius: 14px;
  background:
    radial-gradient(circle at 14% 18%, rgba(59, 130, 246, 0.18), transparent 34%),
    linear-gradient(135deg, #eef7ff 0%, #f3fff9 56%, #fff9e8 100%);
  color: #0f2740;
  padding: 12px 14px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.22), 0 3px 10px rgba(15, 23, 42, 0.12);
  font-size: 12px;
  line-height: 1.35;
}

.ged-domain-summary-tooltip::before {
  content: "";
  position: absolute;
  top: 18px;
  left: -6px;
  width: 10px;
  height: 10px;
  border-bottom: 1px solid rgba(37, 99, 235, 0.22);
  border-left: 1px solid rgba(37, 99, 235, 0.22);
  background: inherit;
  transform: rotate(45deg);
}

.domain-summary-tooltip-eyebrow {
  margin-bottom: 3px;
  color: #006c67;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.domain-summary-tooltip-title {
  display: block;
  margin-bottom: 9px;
  color: #001e50;
  font-size: 13px;
  line-height: 1.25;
}

.domain-summary-tooltip-rows {
  display: grid;
  gap: 5px;
}

.domain-summary-tooltip-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-width: 220px;
  padding: 4px 0;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.domain-summary-tooltip-label {
  color: #465a64;
  font-weight: 700;
}

.domain-summary-tooltip-value {
  color: #002b6b;
  font-weight: 900;
  text-align: right;
  white-space: nowrap;
}

.procurement-guidance-title {
  display: block;
  max-width: calc(100% - 128px);
  margin: 0 0 10px;
  color: var(--text, #17202a);
  font-size: 15px;
  line-height: 1.25;
}

.procurement-guidance-description {
  margin: 0;
  color: var(--text, #24323d);
  font-size: 13px;
  line-height: 1.52;
}

.procurement-official-mark {
  float: right;
  display: flex;
  width: 118px;
  margin: -5px -4px 8px 12px;
  align-items: center;
  gap: 6px;
  color: #000091;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1.12;
  text-transform: uppercase;
}

.procurement-marianne-emblem {
  display: block;
  flex: 0 0 42px;
  width: 42px;
  height: 28px;
}

.procurement-marianne-emblem svg {
  display: block;
  width: 100%;
  height: 100%;
}

.procurement-guidance-sources {
  display: flex;
  margin-top: 12px;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
}

.procurement-guidance-source {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #000091;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.procurement-guidance-source::after {
  content: "↗";
  font-size: 12px;
}

.procurement-guidance-source:hover,
.procurement-guidance-source:focus-visible {
  color: #e1000f;
}

@media (max-width: 620px) {
  .procurement-guidance-bubble {
    right: 12px !important;
    left: 12px !important;
    width: auto;
  }

  .procurement-guidance-title {
    max-width: calc(100% - 104px);
  }

  .procurement-official-mark {
    width: 98px;
    font-size: 8px;
  }
}

.sidebar-alsh-folder,
.sidebar-alsh-empty-tree,
.sidebar-alsh-unfiled-title {
  margin-left: calc(var(--alsh-folder-level, 0) * 14px);
}

.sidebar-alsh-folder {
  align-items: center;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 7px;
  width: calc(100% - (var(--alsh-folder-level, 0) * 14px));
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  padding: 6px 7px;
  text-align: left;
}

.sidebar-alsh-folder.has-tree-toggle {
  grid-template-columns: 12px auto minmax(0, 1fr) auto;
  gap: 6px;
}

.sidebar-alsh-folder:hover {
  border-color: var(--selection-border);
  background: var(--selection-bg);
  color: var(--selection-text);
}

.sidebar-alsh-folder:hover * {
  color: var(--selection-text);
}

.sidebar-alsh-folder.active,
.sidebar-alsh-folder.drag-over {
  border-color: var(--selection-border);
  background: var(--selection-bg);
  color: var(--selection-text);
}

.sidebar-alsh-folder.drag-over,
.sidebar-alsh-child.drag-over {
  outline: 2px solid var(--drag-outline);
  outline-offset: -2px;
}

.sidebar-alsh-folder span:not(.sidebar-alsh-folder-icon) {
  overflow: hidden;
  font-size: 12px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-alsh-folder small {
  align-items: center;
  display: inline-flex;
  min-width: 22px;
  justify-content: center;
  border-radius: 999px;
  background: var(--panel-strong);
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  padding: 2px 6px;
}

.sidebar-alsh-unfiled {
  display: none !important;
  gap: 4px;
  margin-top: 5px;
}

.sidebar-mail-reference-children {
  display: grid !important;
  gap: 3px;
  margin: 3px 0 4px 20px;
  padding-left: 9px;
  border-left: 1px dotted color-mix(in srgb, var(--accent) 28%, var(--line));
}

.sidebar-mail-reference-children .sidebar-alsh-dossier {
  min-width: 0;
  padding: 5px 7px;
}

.sidebar-mail-reference-children .sidebar-alsh-dossier small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-alsh-unfiled-title,
.sidebar-alsh-empty-tree {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  padding: 5px 7px;
  text-transform: uppercase;
}

.sidebar-alsh-dossier {
  display: grid;
  gap: 2px;
  width: 100%;
  position: relative;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  padding: 6px 7px;
  text-align: left;
}

.sidebar-alsh-dossier.search-match-dossier {
  padding-left: 31px;
  border-color: #efb1ad;
  background: #fff4f3;
  color: #8f1d1b;
}

.sidebar-alsh-dossier.search-match-dossier::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 8px;
  width: 18px;
  height: 16px;
  background: transparent url("icons/rouge-22.png?v=20260620-transparent") center / contain no-repeat;
}

.sidebar-alsh-dossier:hover,
.sidebar-alsh-dossier.active,
.sidebar-alsh-dossier.drag-over {
  border-color: var(--selection-border);
  background: var(--selection-bg);
  color: var(--selection-text);
}

.sidebar-alsh-dossier.drag-over {
  outline: 2px solid var(--drag-outline);
  outline-offset: -2px;
}

.sidebar-alsh-dossier span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 850;
}

.sidebar-alsh-dossier .sidebar-workflow-document-title {
  align-items: center;
  display: inline-flex;
  gap: 6px;
  min-width: 0;
}

.sidebar-alsh-dossier .sidebar-workflow-file-icon {
  flex: 0 0 auto;
  font-size: 10px;
  min-height: 18px;
  min-width: 26px;
}

.sidebar-alsh-dossier .sidebar-dossier-ged-title {
  gap: 7px;
  max-width: 100%;
}

.sidebar-alsh-dossier .sidebar-dossier-ged-icon {
  align-items: center;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line));
  border-radius: 8px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 16%, transparent), color-mix(in srgb, var(--panel) 82%, transparent));
  color: var(--accent);
  display: inline-flex;
  font-size: 13px;
  font-weight: 900;
  justify-content: center;
}

.sidebar-alsh-dossier .sidebar-dossier-ged-title.is-closed .sidebar-dossier-ged-icon {
  border-color: color-mix(in srgb, var(--warning) 55%, var(--line));
  color: var(--warning);
}

.sidebar-alsh-dossier .sidebar-dossier-ged-title.is-archived {
  opacity: .78;
}

.sidebar-alsh-dossier .sidebar-dossier-ged-title.is-archived .sidebar-dossier-ged-icon {
  border-color: color-mix(in srgb, var(--muted) 60%, var(--line));
  color: var(--muted);
}

.dossier-ged-status-badge {
  border-radius: 999px;
  background: color-mix(in srgb, var(--warning) 14%, transparent);
  color: var(--warning);
  flex: 0 0 auto;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .02em;
  line-height: 1;
  padding: 3px 5px;
  text-transform: uppercase;
}

.dossier-ged-status-badge.is-archived {
  background: color-mix(in srgb, var(--muted) 16%, transparent);
  color: var(--muted);
}

.sidebar-alsh-dossier .sidebar-workflow-document-name {
  min-width: 0;
}

.sidebar-alsh-dossier small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.module-count {
  display: inline-grid;
  justify-self: end;
  place-items: center;
  flex: 0 0 auto;
  min-width: 24px;
  min-height: 18px;
  padding: 2px 7px;
  border: 1px solid color-mix(in srgb, var(--line) 74%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 6%, var(--panel));
  color: var(--selection-muted);
  font-size: 11px;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.module-button.search-match-theme {
  background: var(--red-background);
  box-shadow: none;
  color: #fff;
}

.module-button.search-match-theme .sidebar-urbanisme-toggle {
  color: rgba(255, 255, 255, 0.88);
}

.sidebar-tree-root {
  margin-top: 12px;
}

.sidebar-tree-root-label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  border-radius: 7px;
  padding: 9px 8px;
  cursor: pointer;
  color: var(--theme-root-text);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.sidebar-tree-root-label::before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  background: currentColor;
  color: var(--theme-root-muted);
  -webkit-mask: var(--chevron-right-mask);
  mask: var(--chevron-right-mask);
  transition: transform 0.14s ease, color 0.14s ease;
}

.sidebar-tree-root[open] > .sidebar-tree-root-label::before {
  transform: rotate(90deg);
}

.sidebar-tree-root-label::-webkit-details-marker,
.sidebar-tree-folder-label::-webkit-details-marker {
  display: none;
}

.sidebar-tree-root-label:hover,
.sidebar-tree-folder-label:hover,
.sidebar-tree-leaf:hover {
  background: var(--panel-strong);
}

.sidebar-tree-root-label.active {
  background: var(--theme-root-active);
  color: var(--crest-primary-ink);
  box-shadow: inset 3px 0 0 var(--crest-primary);
}

.sidebar-urbanisme-tree {
  display: grid;
  gap: 2px;
  padding: 6px 0 10px 0;
}

.sidebar-tree-folder {
  min-width: 0;
  position: relative;
}

.sidebar-tree-folder-label {
  list-style: none;
  border-radius: 7px;
  padding: 8px 8px 8px 10px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
}

.sidebar-tree-folder-label::before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  background: currentColor;
  color: var(--muted);
  -webkit-mask: var(--chevron-right-mask);
  mask: var(--chevron-right-mask);
  transition: transform 0.14s ease, color 0.14s ease;
}

.sidebar-tree-folder[open] > .sidebar-tree-folder-label::before {
  transform: rotate(90deg);
}

.sidebar-tree-folder-label.active,
.sidebar-tree-leaf.active {
  background: var(--selection-bg);
  color: var(--selection-text);
}

.sidebar-tree-children {
  display: grid;
  gap: 2px;
  margin-left: 13px;
  padding: 0 0 6px 14px;
  border-left: 1px solid var(--tree-line);
}

.sidebar-urbanisme-dossiers {
  display: grid;
  gap: 4px;
  margin-top: 6px;
}

.sidebar-empty {
  padding: 10px 8px;
  color: var(--muted);
  font-size: 13px;
}

.module-button-compact {
  margin-top: 6px;
}

.urbanisme-dossier-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "label count"
    "meta count";
  gap: 2px 8px;
  width: 100%;
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  padding: 7px 8px;
  text-align: left;
}

.urbanisme-dossier-row:hover,
.urbanisme-dossier-row.active {
  background: var(--selection-bg);
  color: var(--selection-text);
}

.dossier-label {
  grid-area: label;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 900;
}

.dossier-meta {
  grid-area: meta;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 12px;
}

.urbanisme-dossier-row.active .dossier-meta {
  color: var(--selection-muted);
}

.dossier-pill {
  grid-area: count;
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 23px;
  height: 23px;
  border-radius: 999px;
  background: #eef2f0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.urbanisme-dossier-row.active .dossier-pill {
  background: var(--selection-chip-bg);
  color: var(--selection-muted);
}

.sidebar-tree-leaf {
  min-width: 0;
  min-height: 34px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  padding: 6px 8px 6px 10px;
  text-align: left;
  font-size: 13px;
  overflow-wrap: anywhere;
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 7px;
  align-items: start;
}

.sidebar-tree-leaf::before {
  content: "";
  position: absolute;
  left: -14px;
  top: 17px;
  width: 11px;
  border-top: 1px solid var(--tree-line);
}

.tree-kind {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  border-radius: 4px;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  overflow: hidden;
}

.tree-kind-action {
  background: var(--accent);
}

.tree-kind-document,
.tree-kind-decision {
  background: #244f7a;
}

.tree-kind-doc {
  background: #315a9c;
}

.tree-kind-pdf {
  min-width: 26px;
  background: var(--red-background);
}

.tree-kind-img {
  min-width: 28px;
  background: #7a5a24;
}

.tree-kind-piece,
.tree-kind-preuve,
.tree-kind-recepisse {
  background: #6d4ba3;
}

.tree-kind-avis {
  background: #2c7a68;
}

.tree-kind-declencheur {
  background: #9a5b00;
}

.tree-kind-confirmation {
  background: #315a9c;
}

.tree-kind-transmission {
  background: #6d4ba3;
}

.tree-kind-info {
  background: var(--muted);
}

.tree-leaf-label {
  min-width: 0;
  line-height: 1.25;
}

.workspace {
  min-width: 0;
  height: 100vh;
  min-height: 0;
  padding: 26px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.topbar {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.ged-trash-queue-progress {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  flex: 0 0 auto;
  margin: -12px 0 14px;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 180ms ease, transform 180ms ease;
}

.ged-trash-queue-progress.hidden {
  display: none;
}

.ged-trash-queue-track {
  position: relative;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(148, 163, 184, 0.14), rgba(148, 163, 184, 0.28)),
    color-mix(in srgb, var(--panel) 84%, var(--line) 16%);
  box-shadow: inset 0 0 0 1px rgba(36, 76, 112, 0.08);
}

.ged-trash-queue-bar {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--ged-trash-progress, 0%);
  min-width: 0;
  border-radius: inherit;
  background:
    linear-gradient(90deg, #2dd4bf 0%, #38bdf8 52%, #2563eb 100%);
  box-shadow:
    0 0 12px rgba(56, 189, 248, 0.38),
    0 0 2px rgba(37, 99, 235, 0.45);
  transition: width 190ms cubic-bezier(0.22, 0.82, 0.32, 1);
}

.ged-trash-queue-progress.is-complete .ged-trash-queue-bar {
  background: linear-gradient(90deg, #34d399 0%, #22c55e 100%);
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.3);
}

.ged-trash-queue-progress.has-errors .ged-trash-queue-bar {
  background: linear-gradient(90deg, #fb7185 0%, #f97316 100%);
  box-shadow: 0 0 10px rgba(249, 115, 22, 0.26);
}

.ged-trash-queue-percent {
  min-width: 38px;
  color: color-mix(in srgb, var(--text) 76%, var(--accent) 24%);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  text-align: right;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}

.eyebrow {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(26px, 3vw, 38px);
}

.urbanisme-topbar {
  margin-bottom: 18px;
}

.urbanisme-heading-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  line-height: 1.15;
}

.urbanisme-heading-main {
  font-size: clamp(24px, 2.4vw, 31px);
  font-weight: 900;
}

.urbanisme-heading-detail {
  font-size: clamp(18px, 1.7vw, 23px);
  font-weight: 750;
}

h2 {
  font-size: 18px;
}

.module-description {
  margin: 8px 0 0;
  max-width: 760px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.auth-user-label {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  min-height: 38px;
  padding: 9px 10px;
}

.auth-user-logout-chip {
  cursor: pointer;
  transition: border-color 140ms ease, color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.auth-user-logout-chip:hover,
.auth-user-logout-chip:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line) 58%);
  color: var(--crest-primary-ink);
  box-shadow: 0 7px 18px rgba(37, 99, 235, 0.08);
  outline: none;
  transform: translateY(-1px);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  font-weight: 700;
  padding: 7px 10px;
  user-select: none;
}

.theme-toggle input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.theme-toggle-track {
  position: relative;
  width: 42px;
  height: 22px;
  border-radius: 999px;
  background: var(--panel-strong);
  box-shadow: inset 0 0 0 1px var(--line);
}

.theme-toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(20, 31, 27, 0.22);
  transition: transform 0.18s ease, background 0.18s ease;
}

.theme-toggle input:checked + .theme-toggle-track {
  background: var(--accent);
}

.theme-toggle input:checked + .theme-toggle-track .theme-toggle-thumb {
  transform: translateX(20px);
}

.theme-toggle:has(input:focus-visible) {
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
}

.primary-button,
.secondary-button,
.danger-button,
.ghost-button,
.icon-button {
  border: 1px solid transparent;
  border-radius: 7px;
  min-height: 38px;
  padding: 9px 13px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}

.primary-button {
  background: var(--accent);
  color: #fff;
}

.primary-button:hover {
  background: var(--accent-dark);
}

.secondary-button,
.ghost-button {
  background: var(--panel);
  border-color: var(--line);
  color: var(--text);
}

.secondary-button:hover,
.ghost-button:hover {
  background: var(--panel-strong);
}

.trusted-devices-button {
  border-color: rgba(37, 99, 235, 0.28);
  color: #123b7a;
}

.trusted-devices-shortcut {
  border-color: rgba(37, 99, 235, 0.28);
  background: linear-gradient(180deg, #ffffff 0%, #eff6ff 100%);
  color: #1d4ed8;
}

.trusted-devices-shortcut:hover,
.trusted-devices-shortcut:focus-visible {
  border-color: rgba(37, 99, 235, 0.55);
  background: #dbeafe;
}

.compact-button {
  min-height: 30px;
  padding: 5px 9px;
  border-radius: 6px;
  font-size: 12px;
}

.danger-button {
  background: #fff5f3;
  border-color: #ffd1ca;
  color: var(--danger);
}

.icon-button {
  width: 38px;
  padding: 0;
  background: var(--panel);
  border-color: var(--line);
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 14px var(--editor-panel-width);
  gap: 9px;
  align-items: start;
}

.content-grid-readonly {
  grid-template-columns: minmax(0, 1fr);
}

.content-grid-readonly .editor-resizer,
.content-grid-readonly .editor-panel {
  display: none;
}

.content-grid-modal-editor {
  grid-template-columns: minmax(0, 1fr);
}

.content-grid-modal-editor .editor-resizer,
.content-grid-modal-editor .editor-panel {
  display: none;
}

@media (min-width: 1181px) {
  .content-grid-table-bottom {
    min-height: calc(100vh - 170px);
    align-items: stretch;
  }

  .content-grid-table-bottom .table-section {
    align-self: end;
  }

  .content-grid-table-bottom .table-wrap {
    min-height: 220px;
    max-height: 320px;
  }
}

.editor-resizer {
  position: sticky;
  top: 26px;
  align-self: stretch;
  min-height: calc(100vh - 220px);
  border-inline: 1px solid transparent;
  background: transparent;
  cursor: col-resize;
  touch-action: none;
}

.editor-resizer::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 6px;
  width: 2px;
  background: var(--line);
}

.editor-resizer::after {
  content: "";
  position: sticky;
  top: 48%;
  display: block;
  width: 6px;
  height: 34px;
  margin-left: 3px;
  border-inline: 1px solid currentColor;
  color: transparent;
  transform: translateY(-50%);
  transition: color 0.12s ease, background 0.12s ease;
}

.editor-resizer:hover,
.editor-resizer:focus-visible,
.editor-resizer.dragging {
  border-color: rgba(15, 118, 110, 0.32);
  background: rgba(15, 118, 110, 0.08);
  outline: none;
}

.editor-resizer:hover::before,
.editor-resizer:focus-visible::before,
.editor-resizer.dragging::before {
  background: var(--accent);
}

.editor-resizer:hover::after,
.editor-resizer:focus-visible::after,
.editor-resizer.dragging::after {
  color: var(--accent);
  background: var(--panel);
}

.urbanisme-ged-section {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  flex: 1;
  min-height: 0;
  margin-bottom: 0;
}

.urbanisme-search-panel,
.urbanisme-results-panel,
.urbanisme-tree-panel,
.urbanisme-viewer-panel {
  min-width: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.urbanisme-tree-panel {
  overflow: hidden;
}

.urbanisme-search-panel {
  padding: 10px;
}

.urbanisme-search-bar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.urbanisme-search-bar.is-filtering {
  grid-template-columns: minmax(260px, 1fr) auto minmax(220px, 320px);
}

.urbanisme-search-input {
  width: 100%;
}

.urbanisme-filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.urbanisme-filter-toggle input {
  width: 16px;
  height: 16px;
}

.urbanisme-etape-select {
  width: 100%;
}

.urbanisme-results-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.urbanisme-results {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.urbanisme-results-summary {
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  padding: 12px 14px;
}

.urbanisme-stage-list,
.urbanisme-result-list {
  display: grid;
  gap: 12px;
  padding: 12px;
}

.urbanisme-stage-block {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.urbanisme-stage-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  background: #f7faf8;
  padding: 11px 13px;
}

.urbanisme-stage-header h2 {
  font-size: 15px;
}

.stage-count {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.urbanisme-document-list {
  display: grid;
}

.urbanisme-dossier-tree-list {
  display: grid;
  gap: 0;
}

.urbanisme-dossier-tree {
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.urbanisme-dossier-tree:last-child {
  border-bottom: 0;
}

.urbanisme-dossier-tree.dragging {
  opacity: 0.55;
}

.urbanisme-dossier-tree.file-drag-over > .urbanisme-dossier-tree-root {
  background: #dff5ee;
  box-shadow: inset 0 0 0 2px var(--accent);
}

.urbanisme-classify-tray {
  border-bottom: 1px solid var(--line);
  background: #f9fbfa;
}

.urbanisme-dossier-tree-root {
  align-items: center;
  cursor: pointer;
  display: grid;
  gap: 10px;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  list-style: none;
  min-height: 48px;
  padding: 10px 14px;
}

.urbanisme-dossier-tree-root::-webkit-details-marker {
  display: none;
}

.urbanisme-dossier-tree-root::before {
  background: currentColor;
  color: var(--muted);
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  -webkit-mask: var(--chevron-right-mask);
  mask: var(--chevron-right-mask);
  transition: transform 0.14s ease, color 0.14s ease;
}

.urbanisme-dossier-tree[open] > .urbanisme-dossier-tree-root::before {
  transform: rotate(90deg);
}

.urbanisme-dossier-tree-root:hover,
.urbanisme-dossier-tree.active > .urbanisme-dossier-tree-root {
  background: #eef8f4;
}

.urbanisme-dossier-tree-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.urbanisme-dossier-tree-main strong {
  color: var(--text);
  font-size: 15px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.urbanisme-dossier-tree-meta {
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.urbanisme-dossier-tree-count {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  min-height: 26px;
  padding: 3px 9px;
  white-space: nowrap;
}

.urbanisme-dossier-tree-menu {
  min-height: 30px;
  min-width: 34px;
}

.urbanisme-dossier-tree-children {
  display: grid;
  gap: 2px;
  padding: 0 14px 10px 38px;
}

.urbanisme-dossier-tree-file,
.urbanisme-dossier-tree-empty {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  cursor: default;
  display: grid;
  gap: 9px;
  grid-template-columns: auto minmax(0, 1fr);
  min-height: 34px;
  padding: 6px 8px;
  text-align: left;
  width: 100%;
}

.urbanisme-dossier-tree-empty {
  color: var(--muted);
  display: block;
  font-weight: 700;
  padding-left: 0;
}

.urbanisme-dossier-tree-file:hover,
.urbanisme-dossier-tree-file.active,
.urbanisme-dossier-tree-empty:hover {
  background: color-mix(in srgb, var(--accent) 5%, var(--panel-strong));
  border-color: color-mix(in srgb, var(--accent) 12%, transparent);
}

.urbanisme-dossier-tree-file.dragging {
  opacity: 0.52;
}

.ged-file-drag-source {
  cursor: grab;
}

.ged-file-drag-source.dragging,
.ged-file-drag-source:active {
  cursor: grabbing;
}

.ged-file-drag-selected {
  outline: none;
  box-shadow:
    inset 3px 0 0 color-mix(in srgb, var(--accent) 82%, transparent),
    0 0 0 1px color-mix(in srgb, var(--accent) 42%, transparent);
  background: color-mix(in srgb, var(--accent) 12%, var(--panel));
  border-color: color-mix(in srgb, var(--accent) 34%, transparent);
}

.ged-file-lasso-active,
.ged-file-lasso-active * {
  user-select: none;
}

.ged-file-lasso-surface-active {
  cursor: crosshair;
}

.ged-file-lasso-box {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  border: 1px solid color-mix(in srgb, var(--accent) 72%, #ffffff);
  border-radius: 5px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 18%, transparent), color-mix(in srgb, var(--accent) 7%, transparent));
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--accent) 22%, transparent),
    inset 0 0 0 1px rgba(255, 255, 255, 0.48);
}

.ged-file-selection-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--line));
  border-radius: 12px;
  background: color-mix(in srgb, var(--panel) 94%, var(--accent) 6%);
}

.ged-central-navigation {
  align-items: center;
  display: inline-flex;
  gap: 4px;
}

.ged-central-nav-button {
  min-height: 28px;
  min-width: 32px;
  padding: 4px 8px;
  font-size: 15px;
  font-weight: 900;
}

.ged-file-details-header {
  display: grid;
  flex: 0 0 auto;
  grid-template-columns: minmax(230px, 1fr) minmax(120px, 150px) minmax(72px, 90px) minmax(82px, 105px) minmax(145px, 190px);
  gap: 12px;
  margin: 4px 4px 0;
  padding: 7px 9px 7px 52px;
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: 8px 8px 4px 4px;
  background: color-mix(in srgb, var(--panel) 94%, var(--accent) 6%);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.ged-file-details-header span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ged-file-selection-count {
  margin-right: auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.ged-file-view-group {
  align-items: center;
  display: inline-flex;
  gap: 4px;
}

.ged-file-view-button {
  min-height: 26px;
  padding: 4px 8px;
}

.ged-file-view-button.active {
  border-color: color-mix(in srgb, var(--accent) 62%, var(--line));
  background: color-mix(in srgb, var(--accent) 12%, var(--panel));
  color: var(--accent-strong);
}

.ged-file-selection-indicator {
  display: none;
  place-items: center;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border: 1px solid color-mix(in srgb, var(--accent) 32%, var(--line));
  border-radius: 6px;
  background: var(--panel);
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

.ged-file-selection-indicator.is-selected {
  border-color: color-mix(in srgb, var(--accent) 74%, var(--line));
  background: color-mix(in srgb, var(--accent) 16%, var(--panel));
}

.ged-dossier-selected {
  outline: none;
  box-shadow:
    inset 3px 0 0 color-mix(in srgb, var(--accent) 74%, transparent),
    0 0 0 1px color-mix(in srgb, var(--accent) 16%, transparent);
}

.sidebar-alsh-dossier.ged-dossier-selected {
  border-color: color-mix(in srgb, var(--accent) 42%, #ffffff);
  background: color-mix(in srgb, var(--accent) 7%, #ffffff);
}

.ged-focus-current {
  outline: 2px solid color-mix(in srgb, var(--accent) 82%, transparent);
  outline-offset: 2px;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
}

.urbanisme-dossier-tree-file.has-suggestion {
  align-items: center;
  grid-template-columns: auto minmax(190px, 0.55fr) minmax(360px, 1fr);
}

.urbanisme-file-type-icon {
  align-items: center;
  border: 1px solid #bcd0e5;
  border-radius: 4px;
  color: #17456d;
  display: inline-flex;
  font-size: 10px;
  font-weight: 900;
  justify-content: center;
  line-height: 1;
  min-height: 18px;
  min-width: 26px;
  padding: 2px 4px;
  text-transform: uppercase;
}

.urbanisme-file-type-icon.is-pdf {
  background: #e9f3ff;
}

.urbanisme-file-type-icon.is-img {
  background: #fff0dc;
  border-color: #f1b86e;
  color: #8a4c00;
}

.urbanisme-file-type-icon.is-doc {
  background: #e8f0ff;
  border-color: #9fb8ea;
  color: #234c9d;
}

.urbanisme-file-type-icon.is-xls {
  background: #e7f6ee;
  border-color: #93d0ad;
  color: #156b3c;
}

.urbanisme-file-type-icon.is-ppt {
  background: #fff0e8;
  border-color: #eba574;
  color: #9a451f;
}

.urbanisme-file-thumb {
  align-items: center;
  background: #f6faf8;
  border: 1px solid #c7ddd7;
  border-radius: 5px;
  display: inline-flex;
  height: 34px;
  justify-content: center;
  overflow: hidden;
  position: relative;
  width: 46px;
}

.urbanisme-file-thumb img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.urbanisme-file-thumb span {
  background: rgba(255, 255, 255, 0.88);
  border-radius: 3px 0 0 0;
  bottom: 0;
  color: #8a4c00;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  padding: 3px 4px;
  position: absolute;
  right: 0;
}

.urbanisme-file-thumb.is-error {
  background: #fff0dc;
}

.urbanisme-file-thumb.is-error img {
  display: none;
}

.urbanisme-dossier-tree-file-info {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.urbanisme-dossier-tree-file-info strong {
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.urbanisme-dossier-tree-file-info small {
  color: var(--muted);
  font-size: 11px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.urbanisme-ocr-summary {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.urbanisme-ocr-line,
.urbanisme-ocr-excerpt {
  color: #4b625d;
  font-size: 11px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.urbanisme-ocr-excerpt {
  color: #62756f;
}

.urbanisme-ocr-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
}

.urbanisme-ocr-tag {
  border: 1px solid #c7ddd7;
  border-radius: 4px;
  background: #f1fbf8;
  color: #24554c;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
  max-width: 160px;
  overflow: hidden;
  padding: 2px 5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.urbanisme-classify-suggestions {
  border: 1px solid #d9c683;
  border-left: 4px solid #c89b2d;
  border-radius: 6px;
  background: #fff8df;
  display: grid;
  gap: 5px;
  margin-top: 0;
  min-width: 0;
  padding: 7px 9px;
}

.urbanisme-classify-suggestions-text {
  color: #4f4b43;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
  margin: 0;
}

.urbanisme-classify-suggestion-list {
  display: grid;
  gap: 3px;
  margin: 0;
  padding-left: 15px;
}

.urbanisme-classify-suggestion-list li {
  color: #7f2d1d;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.35;
}

.urbanisme-classify-suggestion-type {
  color: #7f2d1d;
}

.urbanisme-classify-suggestion-list strong {
  color: #7f2d1d;
  font-weight: 900;
}

.urbanisme-inged-progress {
  display: grid;
  gap: 8px;
  border: 1px solid #b8d8d1;
  border-left: 4px solid #0f766e;
  border-radius: 8px;
  background: #eefaf7;
  padding: 11px 13px;
}

.urbanisme-inged-progress-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.urbanisme-inged-progress-header strong {
  color: #073f3b;
  font-size: 14px;
}

.urbanisme-inged-progress-header span,
.urbanisme-inged-progress-step {
  color: #315f58;
  font-size: 12px;
  font-weight: 800;
}

.urbanisme-inged-progress-step {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.urbanisme-inged-progress-bar {
  display: block;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #d6e8e3;
}

.urbanisme-inged-progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #0f766e;
  transition: width 0.2s ease;
}

.urbanisme-inged-progress-stages {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.urbanisme-inged-progress-stages span {
  border: 1px solid #c7ddd7;
  border-radius: 4px;
  background: #fbfffe;
  color: #486962;
  font-size: 10px;
  font-weight: 900;
  padding: 2px 6px;
}

.urbanisme-inged-progress-stages span.active {
  border-color: #0f766e;
  background: #d7f2eb;
  color: #073f3b;
}

.urbanisme-document-row,
.urbanisme-result-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  cursor: pointer;
  padding: 13px 14px;
}

.urbanisme-document-row:hover,
.urbanisme-document-row.active,
.urbanisme-result-row:hover,
.urbanisme-result-row.active {
  background: #eef8f4;
}

.urbanisme-dossier-tree-file.is-pending {
  cursor: wait;
  opacity: 0.78;
}

.urbanisme-dossier-tree-file.is-pending .urbanisme-file-type-icon {
  border-color: #d5b25f;
  color: #8a5d0a;
}

.urbanisme-document-title,
.urbanisme-result-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 900;
}

.urbanisme-document-details,
.urbanisme-result-details {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.urbanisme-document-meta,
.urbanisme-result-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  flex-wrap: wrap;
}

.result-chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 800;
}

.result-chip.muted {
  color: var(--muted);
}

.urbanisme-empty-state {
  border: 0;
}

.urbanisme-security-notice {
  display: grid;
  gap: 8px;
  border: 1px solid #f2b66d;
  border-left: 4px solid #d97706;
  border-radius: 8px;
  background: #fff7ed;
  color: #3b2a18;
  padding: 12px 14px;
}

.urbanisme-security-notice strong {
  color: #7c2d12;
  font-size: 14px;
}

.urbanisme-security-notice p {
  margin: 0;
  color: #5f4630;
  font-size: 13px;
}

.urbanisme-security-notice ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.urbanisme-security-notice li {
  display: grid;
  gap: 2px;
  min-width: 0;
  border-top: 1px solid #fed7aa;
  padding-top: 7px;
}

.urbanisme-security-file-name {
  color: #111827;
  font-size: 13px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.urbanisme-security-file-reason,
.urbanisme-security-more {
  color: #6b4f32;
  font-size: 12px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.urbanisme-tree-header,
.urbanisme-viewer-toolbar {
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.urbanisme-viewer-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.urbanisme-tree {
  max-height: 680px;
  overflow: auto;
  padding: 10px;
}

.tree-folder {
  border-bottom: 1px solid #edf1ee;
}

.tree-folder:last-child {
  border-bottom: 0;
}

.tree-folder-label,
.tree-leaf {
  width: 100%;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.tree-folder-label {
  list-style: none;
  padding: 10px 9px;
  font-weight: 800;
}

.tree-folder-label::-webkit-details-marker {
  display: none;
}

.tree-folder-label::before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  background: currentColor;
  color: var(--muted);
  -webkit-mask: var(--chevron-right-mask);
  mask: var(--chevron-right-mask);
  transition: transform 0.14s ease, color 0.14s ease;
}

.tree-folder[open] > .tree-folder-label::before {
  transform: rotate(90deg);
}

.tree-folder-label:hover,
.tree-leaf:hover {
  background: var(--panel-strong);
}

.tree-folder-label.active,
.tree-leaf.active {
  background: #dcefe9;
  color: #073f3b;
}

.tree-children {
  display: grid;
  gap: 3px;
  padding: 0 0 8px 22px;
}

.tree-leaf {
  min-height: 32px;
  padding: 6px 9px;
  font-size: 13px;
}

.viewer-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.urbanisme-viewer {
  min-height: 488px;
  padding: 16px;
  user-select: none;
}

.viewer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.7fr);
  gap: 14px;
}

.viewer-block {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  padding: 14px;
}

.viewer-block-wide {
  grid-column: 1 / -1;
}

.viewer-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.viewer-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 4px 9px;
  font-size: 13px;
  font-weight: 700;
}

.viewer-dossiers,
.viewer-files {
  display: grid;
  gap: 8px;
}

.viewer-dossier,
.viewer-file {
  display: grid;
  gap: 3px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  padding: 10px;
  color: var(--text);
  text-align: left;
}

.viewer-file {
  cursor: pointer;
}

.viewer-file:hover {
  border-color: var(--accent);
}

.viewer-dossier span,
.viewer-file small,
.document-preview-meta span {
  color: var(--muted);
  font-size: 13px;
}

.viewer-empty {
  color: var(--muted);
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 8px;
}

.document-preview {
  display: grid;
  gap: 12px;
  min-height: 456px;
}

.document-preview-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.document-frame,
.document-image,
.document-placeholder {
  width: 100%;
  min-height: 420px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.document-frame {
  height: min(68vh, 760px);
}

.document-image {
  object-fit: contain;
  padding: 10px;
}

.alsh-ged-section {
  display: grid;
  flex: 1 1 auto;
  min-height: 0;
}

.alsh-viewer-panel,
.alsh-viewer {
  min-width: 0;
  min-height: 0;
}

.alsh-viewer-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.alsh-viewer {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
  min-height: 0;
}

.alsh-viewer-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 14px 16px;
}

.alsh-viewer-header h2 {
  margin: 0;
  overflow-wrap: anywhere;
}

.alsh-viewer-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.alsh-viewer-drop-zone {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  height: var(--ged-viewer-zone-height, auto);
  min-height: 0;
  overflow: hidden;
  padding: 12px;
}

.alsh-viewer-drop-zone:has(.alsh-file-list),
.alsh-document-picker:has(.alsh-file-list) {
  cursor: crosshair;
}

.alsh-viewer-drop-zone.drag-over {
  border-color: #0f766e;
  background: #eefaf7;
  box-shadow: inset 0 0 0 2px rgba(15, 118, 110, 0.18);
}

.alsh-document-preview,
.alsh-document-frame,
.alsh-document-image {
  min-height: 0;
}

.alsh-document-preview {
  display: flex;
  flex: 1 1 auto;
  height: var(--ged-document-preview-height, calc(100vh - 275px));
  min-height: 280px;
  overflow: hidden;
}

.alsh-document-frame {
  flex: 1 1 auto;
  height: 100%;
  min-height: 0;
  width: 100%;
}

.alsh-document-image {
  height: 100%;
  width: 100%;
  object-fit: contain;
}

.alsh-document-picker,
.alsh-file-list {
  gap: 8px;
}

.alsh-document-picker {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}

.ged-trash-document-picker {
  gap: 10px;
}

.ged-trash-file-button.active {
  border-color: #2563eb;
  background: #eaf1ff;
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.38);
}

.ged-trash-preview-panel {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 8px;
  min-height: 320px;
  overflow: hidden;
}

.ged-trash-preview-header {
  align-items: center;
  background: linear-gradient(90deg, rgba(239, 246, 255, 0.95), rgba(245, 251, 249, 0.95));
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  display: flex;
  gap: 10px;
  justify-content: space-between;
  min-height: 34px;
  padding: 6px 10px;
}

.ged-trash-preview-header strong,
.ged-trash-preview-header span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ged-trash-preview-header span {
  color: var(--muted);
  flex: 0 0 auto;
  font-size: 12px;
}

.alsh-file-list {
  cursor: crosshair;
  display: grid;
  flex: 1 1 auto;
  grid-template-columns: 1fr;
  max-height: none;
  min-height: 0;
  overflow: auto;
  padding: 4px;
}

body[data-ged-file-explorer-view="details"] .alsh-file-list {
  gap: 3px;
  grid-template-columns: 1fr;
}

body[data-ged-file-explorer-view="details"] .ged-file-details-row {
  grid-template-columns: auto minmax(0, 1fr);
}

.ged-file-details-grid {
  display: grid;
  grid-template-columns: 58px minmax(230px, 1fr) minmax(120px, 150px) minmax(72px, 90px) minmax(82px, 105px) minmax(145px, 190px);
  gap: 12px;
  align-items: center;
  width: 100%;
}

.ged-file-details-cell {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ged-file-details-name {
  display: block;
}

.ged-file-details-name strong,
.ged-file-details-name small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ged-file-details-visual {
  align-items: center;
  display: inline-flex;
  justify-content: center;
}

.ged-file-details-imported-at,
.ged-file-details-type,
.ged-file-details-size,
.ged-file-details-owner {
  color: var(--muted);
  font-size: 12px;
}

body[data-ged-file-explorer-view="tiles"] .alsh-file-list {
  align-items: start;
  gap: 9px;
  grid-auto-rows: auto;
  grid-template-columns: repeat(auto-fill, minmax(142px, 1fr));
}

body[data-ged-file-explorer-view="tiles"] .ged-file-details-header {
  display: none;
}

body[data-ged-file-explorer-view="tiles"] .alsh-file-button {
  align-content: start;
  align-items: start;
  gap: 6px;
  grid-template-columns: 1fr;
  justify-items: center;
  height: auto;
  min-height: 136px;
  overflow: hidden;
  padding: 8px 8px;
  position: relative;
  text-align: center;
}

body[data-ged-file-explorer-view="tiles"] .alsh-file-button .urbanisme-dossier-tree-file-info {
  justify-items: center;
  min-width: 0;
  width: 100%;
}

body[data-ged-file-explorer-view="tiles"] .ged-file-details-grid {
  display: grid;
  align-items: start;
  gap: 4px;
  grid-template-columns: 1fr;
  min-width: 0;
  width: 100%;
}

body[data-ged-file-explorer-view="tiles"] .ged-file-details-visual {
  justify-self: center;
  min-height: 58px;
}

body[data-ged-file-explorer-view="tiles"] .ged-file-details-name {
  display: block;
  justify-self: stretch;
  min-width: 0;
  width: 100%;
}

body[data-ged-file-explorer-view="tiles"] .ged-file-details-name strong {
  display: -webkit-box;
  max-width: 100%;
  min-height: 26px;
  overflow: hidden;
  overflow-wrap: anywhere;
  text-align: center;
  text-overflow: ellipsis;
  white-space: normal;
  word-break: break-word;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

body[data-ged-file-explorer-view="tiles"] .ged-file-details-imported-at,
body[data-ged-file-explorer-view="tiles"] .ged-file-details-type,
body[data-ged-file-explorer-view="tiles"] .ged-file-details-size,
body[data-ged-file-explorer-view="tiles"] .ged-file-details-owner {
  font-size: 11px;
  line-height: 1.15;
  text-align: center;
}

body[data-ged-file-explorer-view="tiles"] .ged-file-details-size,
body[data-ged-file-explorer-view="tiles"] .ged-file-details-owner {
  display: none;
}

body[data-ged-file-explorer-view="tiles"] .alsh-file-button .urbanisme-dossier-tree-file-info strong,
body[data-ged-file-explorer-view="tiles"] .alsh-file-button .urbanisme-dossier-tree-file-info small {
  max-width: 100%;
  text-align: center;
}

body[data-ged-file-explorer-view="tiles"] .alsh-file-button .urbanisme-file-thumb {
  height: 54px;
  width: 78px;
}

body[data-ged-file-explorer-view="tiles"] .alsh-file-button .urbanisme-file-type-icon {
  min-height: 28px;
  min-width: 38px;
}

.ged-workflow-central-folder {
  cursor: default;
}

.ged-workflow-central-folder-visual {
  align-items: center;
  display: inline-flex;
  height: 20px;
  justify-content: center;
  width: 28px;
}

.ged-workflow-central-folder-visual svg {
  display: block;
  height: 20px;
  width: 28px;
}

body[data-ged-file-explorer-view="details"] .ged-workflow-central-folder-row .ged-file-details-name strong {
  color: color-mix(in srgb, var(--accent) 72%, var(--text) 28%) !important;
}

body[data-ged-file-explorer-view="details"] .ged-workflow-central-folder-row .ged-file-details-size {
  color: color-mix(in srgb, var(--muted) 82%, var(--text) 18%) !important;
  font-size: 11px !important;
}

body[data-ged-file-explorer-view="tiles"] .ged-workflow-central-folder {
  min-height: 118px;
}

body[data-ged-file-explorer-view="tiles"] .ged-workflow-central-folder .ged-workflow-central-folder-visual {
  height: 58px;
  width: 72px;
}

body[data-ged-file-explorer-view="tiles"] .ged-workflow-central-folder .ged-workflow-central-folder-visual svg {
  height: 50px;
  width: 68px;
}

.ged-file-filter-hidden {
  display: none !important;
}

.document-placeholder {
  display: grid;
  place-items: center;
  text-align: center;
}

.table-section,
.editor-panel,
.vault-section,
.register-section {
  min-width: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.table-toolbar,
.editor-header,
.vault-header,
.register-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #fff4dc;
  color: var(--warning);
  font-size: 12px;
  font-weight: 800;
}

.table-wrap {
  overflow: auto;
  min-height: 420px;
  max-height: calc(100vh - 220px);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
}

th,
td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 14px;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f9fbfa;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

tr:hover td {
  background: #fbfdfc;
}

.cell-muted {
  color: var(--muted);
}

.row-actions {
  display: flex;
  gap: 8px;
}

.small-button {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  min-height: 30px;
  padding: 5px 9px;
}

.small-button:hover {
  background: var(--panel-strong);
}

.small-button.danger {
  color: var(--danger);
}

.editor-panel {
  position: sticky;
  top: 26px;
}

.editor-header {
  align-items: flex-start;
}

.form-empty {
  padding: 18px;
  color: var(--muted);
}

.editor-form {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.form-field {
  display: grid;
  gap: 6px;
}

.form-field-wide {
  grid-column: 1 / -1;
}

.form-field label {
  font-size: 13px;
  font-weight: 800;
}

.role-rights-matrix {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
  overflow: hidden;
}

.role-rights-matrix-wrap {
  max-height: min(440px, calc(100vh - 360px));
  overflow: auto;
}

.role-rights-table {
  min-width: 720px;
}

.role-rights-table th,
.role-rights-table td {
  padding: 8px 9px;
  text-align: center;
  vertical-align: middle;
}

.role-rights-table th:first-child,
.role-rights-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  text-align: left;
  background: var(--panel);
}

.role-rights-table th {
  white-space: nowrap;
}

.role-rights-table thead th:first-child {
  z-index: 3;
}

.role-rights-module-cell {
  min-width: 190px;
}

.role-rights-module-cell strong,
.role-rights-module-cell span {
  display: block;
}

.role-rights-module-cell span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.role-rights-check {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-strong);
  cursor: pointer;
}

.role-rights-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}

.service-assignment-matrix {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
  overflow: hidden;
}

.theme-assignment-matrix {
  display: grid;
  gap: 8px;
  padding: 8px;
}

.theme-assignment-search {
  display: grid;
  max-width: 360px;
  gap: 4px;
}

.theme-assignment-search label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.theme-assignment-list {
  display: grid;
  max-height: min(520px, calc(100vh - 350px));
  overflow-x: hidden;
  overflow-y: auto;
  gap: 6px;
  padding-right: 4px;
}

.theme-assignment-list.has-no-results::after {
  content: "Aucun thème ne correspond à la recherche.";
  padding: 16px;
  color: var(--muted);
  font-size: 13px;
}

.theme-assignment-card {
  width: 100%;
  min-width: 0;
  overflow: visible;
  min-height: 46px;
  border: 1px solid #111;
  border-radius: 8px;
  background: var(--panel);
}

.theme-assignment-card.has-actions {
  min-height: var(--theme-action-min-height, 162px);
}

.theme-assignment-card.no-actions {
  min-height: 46px;
}

.theme-assignment-card.hidden {
  display: none;
}

.theme-assignment-card.is-disabled {
  color: var(--muted);
}

.theme-assignment-row {
  display: grid;
  align-items: stretch;
  min-width: 0;
  grid-template-columns: minmax(260px, 1fr) minmax(0, 3.4fr);
}

.theme-assignment-row > * {
  min-width: 0;
  padding: 8px 9px;
  text-align: center;
}

.theme-assignment-card.no-actions .theme-assignment-row {
  grid-template-columns: minmax(0, 1fr);
}

.theme-assignment-row > :first-child {
  text-align: left;
}

.theme-assignment-group-row {
  min-height: 25px;
  border-bottom: 1px solid var(--line);
}

.theme-assignment-action-row {
  min-height: 31px;
}

.theme-assignment-value-row {
  min-height: 46px;
}

.theme-assignment-card.has-actions .theme-assignment-value-row {
  min-height: var(--theme-action-min-height, 162px);
}

.theme-assignment-group {
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.theme-assignment-action-header {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.theme-assignment-theme-cell {
  display: flex;
  align-items: center;
  min-width: 0;
  overflow: hidden;
  font-weight: 800;
}

.theme-assignment-master {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 32px;
  cursor: pointer;
}

.theme-assignment-card.has-actions .theme-assignment-master {
  min-height: var(--theme-master-min-height, 140px);
}

.theme-assignment-master input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}

.theme-assignment-name {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.theme-assignment-actions-grid {
  display: grid;
  grid-template-columns: repeat(var(--theme-action-columns, 1), minmax(78px, 1fr));
  grid-template-rows: repeat(var(--theme-action-rows, 2), minmax(66px, auto));
  gap: 7px 9px;
  align-items: stretch;
  overflow-x: auto;
  padding-bottom: 24px !important;
}

.theme-assignment-action-cell {
  display: flex;
  min-height: 66px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  box-sizing: border-box;
  padding: 5px 4px !important;
}

.theme-assignment-action-label {
  display: flex;
  align-items: end;
  justify-content: center;
  max-width: 100%;
  min-height: 30px;
  overflow: visible;
  color: var(--text);
  font-size: 11.5px;
  font-weight: 750;
  line-height: 1.15;
  text-align: center;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

.theme-assignment-action-break {
  display: none;
  width: 100%;
  height: 0;
  flex: 0 0 0;
}

.service-assignment-table-wrap {
  max-height: min(520px, calc(100vh - 350px));
  overflow: auto;
}

.service-assignment-table {
  min-width: 1160px;
}

.service-assignment-table th,
.service-assignment-table td {
  padding: 8px 9px;
  text-align: left;
  vertical-align: middle;
}

.service-assignment-table th:not(:first-child),
.service-assignment-table td:not(:first-child) {
  width: 102px;
  text-align: center;
}

.service-assignment-table th:first-child,
.service-assignment-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--panel);
}

.service-assignment-table thead th:first-child {
  z-index: 5;
}

.service-assignment-table thead th {
  position: sticky;
  top: 0;
  z-index: 4;
  background: var(--panel);
}

.service-assignment-table .service-assignment-action-row th {
  top: 36px;
}

.service-assignment-group {
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0;
  text-align: center;
}

.service-assignment-action-row th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.service-assignment-group-dossiers {
  border-left: 1px solid var(--line);
}

.service-assignment-group-fichiers {
  border-left: 2px solid var(--line);
}

.service-assignment-table .service-assignment-group-start {
  border-left: 2px solid var(--line);
}

.service-assignment-service {
  min-width: 250px;
  font-weight: 800;
}

.service-assignment-service {
  display: flex;
  align-items: center;
  gap: 8px;
}

.service-assignment-service-name {
  min-width: 0;
}

.service-action-header-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  line-height: 1.05;
}

.service-action-header-label {
  display: block;
  white-space: nowrap;
}

.service-bulk-check {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--panel-strong);
  cursor: pointer;
}

.service-bulk-check input {
  width: 14px;
  height: 14px;
  accent-color: var(--accent);
  cursor: pointer;
}

.service-column-bulk {
  border-color: rgba(181, 72, 54, 0.45);
  background: #fff1ed;
}

.service-column-bulk input {
  accent-color: #b54836;
}

.service-row-bulk {
  flex: 0 0 auto;
}

.service-assignment-table tr.is-disabled {
  color: var(--muted);
}

.service-assignment-table tr.is-disabled .service-assignment-service {
  font-weight: 650;
}

.textarea {
  min-height: 88px;
  resize: vertical;
}

.form-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding-top: 8px;
}

.vault-section {
  margin-top: 18px;
}

.vault-header,
.register-header {
  align-items: flex-start;
}

.register-section {
  margin-top: 18px;
}

.register-form {
  display: grid;
  grid-template-columns: repeat(6, minmax(130px, 1fr)) auto;
  gap: 12px;
  align-items: end;
  padding: 16px;
}

.register-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.register-form .checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  color: var(--text);
}

.checkbox-label input {
  width: 16px;
  height: 16px;
}

.register-result {
  border-top: 1px solid var(--line);
  padding: 14px 16px;
  color: var(--muted);
}

.register-result a {
  color: var(--accent-dark);
  font-weight: 800;
}

.upload-form {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.file-input {
  width: min(360px, 100%);
  background: #fff;
}

.file-list {
  padding: 0;
}

.file-list.drag-over {
  outline: 2px solid #0f766e;
  outline-offset: 4px;
  background: #eef8f4;
}

.file-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) repeat(3, auto);
  gap: 12px;
  align-items: center;
  padding: 13px 16px;
  border-top: 1px solid var(--line);
}

.file-row > div {
  min-width: 0;
}

.file-row.ged-file-drag-selected {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.file-name {
  font-weight: 800;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-meta {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: flex;
  justify-content: flex-end;
  background: rgba(18, 25, 23, 0.36);
}

.advanced-search-panel,
.job-import-panel {
  position: relative;
  grid-column: 3;
  grid-row: 1;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-width: 0;
  height: 100vh;
  overflow: hidden;
  border-left: 1px solid var(--line);
  background: var(--panel);
  box-shadow: -8px 0 24px rgba(20, 31, 27, 0.1);
}

.job-import-panel {
  grid-template-rows: auto minmax(0, 1fr);
  background:
    radial-gradient(circle at 18% 10%, rgba(124, 58, 237, 0.11), transparent 28%),
    linear-gradient(180deg, color-mix(in srgb, var(--panel) 94%, #eef2ff), var(--panel));
}

.advanced-search-resizer,
.job-import-resizer {
  position: absolute;
  z-index: 6;
  top: 0;
  bottom: 0;
  left: 0;
  width: 14px;
  border-inline: 1px solid transparent;
  background: transparent;
  cursor: col-resize;
  touch-action: none;
}

.advanced-search-resizer::before,
.job-import-resizer::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 6px;
  width: 2px;
  background: var(--line);
}

.advanced-search-resizer::after,
.job-import-resizer::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 4px;
  width: 6px;
  height: 42px;
  border-inline: 1px solid currentColor;
  color: transparent;
  transform: translateY(-50%);
}

.advanced-search-resizer:hover,
.advanced-search-resizer:focus-visible,
.advanced-search-resizer.dragging,
.job-import-resizer:hover,
.job-import-resizer:focus-visible,
.job-import-resizer.dragging {
  border-color: rgba(15, 118, 110, 0.32);
  background: rgba(15, 118, 110, 0.08);
  outline: none;
}

.advanced-search-resizer:hover::before,
.advanced-search-resizer:focus-visible::before,
.advanced-search-resizer.dragging::before,
.job-import-resizer:hover::before,
.job-import-resizer:focus-visible::before,
.job-import-resizer.dragging::before {
  background: var(--accent);
}

.advanced-search-resizer:hover::after,
.advanced-search-resizer:focus-visible::after,
.advanced-search-resizer.dragging::after,
.job-import-resizer:hover::after,
.job-import-resizer:focus-visible::after,
.job-import-resizer.dragging::after {
  color: var(--accent);
  background: var(--panel);
}

.advanced-search-header,
.job-import-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px 17px;
  border-bottom: 1px solid var(--line);
}

.advanced-search-header .eyebrow,
.advanced-search-header h2,
.advanced-search-header .module-description,
.job-import-header .eyebrow,
.job-import-header h2,
.job-import-header .module-description {
  margin: 0;
}

.advanced-search-header h2,
.job-import-header h2 {
  margin-top: 3px;
  font-size: 23px;
  line-height: 1.2;
}

.job-import-header h2 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--crest-primary-ink);
  font-family: "Segoe UI Variable Text", "Segoe UI", Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 20px;
  font-weight: 760;
  letter-spacing: -0.018em;
}

.job-import-header h2 span {
  line-height: 1.08;
}

.job-import-header h2 small {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 2px 7px 3px;
  border: 1px solid color-mix(in srgb, #7c3aed 24%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, #7c3aed 8%, var(--panel));
  color: #5b21b6;
  font-size: 10.5px;
  font-weight: 850;
  letter-spacing: 0.012em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.advanced-search-header .module-description,
.job-import-header .module-description {
  margin-top: 5px;
  font-size: 13px;
}

.advanced-search-header .icon-button,
.job-import-header .icon-button {
  display: grid;
  place-items: center;
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
}

.advanced-search-header .icon-button svg,
.job-import-header .icon-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.advanced-search-body,
.job-import-body {
  overflow: auto;
  padding: 4px 22px 10px;
}

.job-import-body {
  padding-top: 18px;
}

.job-import-reference-field {
  display: grid;
  gap: 5px;
  margin: 0 0 10px;
}

.job-import-reference-field span {
  color: var(--crest-primary-ink);
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 0.035em;
  line-height: 1.15;
  text-transform: uppercase;
}

.job-import-reference-field input {
  width: 100%;
  min-height: 32px;
  padding: 6px 9px;
  border: 1px solid color-mix(in srgb, #7c3aed 18%, var(--line));
  border-radius: 9px;
  background: var(--panel);
  color: var(--text);
  font: inherit;
  font-size: 12.5px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.job-import-reference-field input:focus {
  border-color: color-mix(in srgb, #7c3aed 62%, var(--line));
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}

.job-import-drop-zone {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  margin: 0 0 14px;
  padding: 16px;
  border: 1px dashed color-mix(in srgb, #7c3aed 38%, var(--line));
  border-radius: 15px;
  background:
    radial-gradient(circle at 8% 20%, rgba(124, 58, 237, 0.13), transparent 32%),
    linear-gradient(135deg, color-mix(in srgb, #7c3aed 6%, var(--panel)), color-mix(in srgb, var(--accent) 5%, var(--panel)));
  color: var(--text);
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease, background 0.16s ease;
}

.job-import-drop-zone.is-drag-over {
  border-color: #7c3aed;
  background:
    radial-gradient(circle at 8% 20%, rgba(124, 58, 237, 0.22), transparent 34%),
    linear-gradient(135deg, color-mix(in srgb, #7c3aed 11%, var(--panel)), color-mix(in srgb, var(--accent) 8%, var(--panel)));
  box-shadow: 0 16px 38px rgba(91, 33, 182, 0.18), inset 0 0 0 1px rgba(124, 58, 237, 0.26);
  transform: translateY(-1px);
}

.job-import-drop-zone.is-busy {
  border-style: solid;
  border-color: color-mix(in srgb, #0f766e 48%, var(--line));
  background:
    linear-gradient(90deg, rgba(15, 118, 110, 0.08), rgba(124, 58, 237, 0.08)),
    color-mix(in srgb, var(--accent) 5%, var(--panel));
  box-shadow: inset 0 -2px 0 rgba(15, 118, 110, 0.36);
}

.job-import-drop-zone:focus-visible {
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.18);
}

.job-import-drop-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid color-mix(in srgb, #7c3aed 30%, var(--line));
  border-radius: 17px;
  background: color-mix(in srgb, #7c3aed 10%, var(--panel));
  color: #5b21b6;
}

.job-import-drop-icon svg {
  width: 32px;
  height: 32px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.job-import-drop-text {
  min-width: 0;
}

.job-import-drop-text h3 {
  margin: 0;
  color: var(--crest-primary-ink);
  font-size: 15px;
  line-height: 1.2;
}

.job-import-drop-text p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.35;
}

.job-import-drop-summary {
  color: #5b21b6 !important;
  font-weight: 700;
}

.job-import-empty-state {
  display: grid;
  grid-template-columns: minmax(112px, auto) minmax(160px, 1fr) minmax(94px, 0.35fr) auto;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid color-mix(in srgb, #7c3aed 18%, var(--line));
  border-radius: 9px;
  background:
    linear-gradient(135deg, color-mix(in srgb, #7c3aed 7%, var(--panel)), color-mix(in srgb, var(--accent) 4%, var(--panel)));
  color: var(--text);
  text-align: left;
}

.job-import-empty-logo {
  display: none;
  place-items: center;
  width: 64px;
  height: 64px;
  border: 1px solid color-mix(in srgb, #7c3aed 28%, var(--line));
  border-radius: 20px;
  background: color-mix(in srgb, #7c3aed 9%, var(--panel));
  color: #5b21b6;
  box-shadow: 0 12px 28px rgba(91, 33, 182, 0.12);
}

.job-import-empty-logo svg {
  width: 38px;
  height: 38px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.job-import-empty-state h3 {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--crest-primary-ink);
  font-size: 13px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-import-empty-state p {
  max-width: none;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-import-progress {
  width: 100%;
  min-width: 80px;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: color-mix(in srgb, #7c3aed 10%, var(--line));
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.08);
}

.job-import-progress > span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7c3aed, #2563eb 52%, #0f766e);
  transition: width 0.28s ease;
}

.job-import-progress-percent {
  color: #0f766e;
  font-size: 11px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.job-import-empty-state.has-job-import-context {
  cursor: context-menu;
}

.job-import-empty-state.is-deleting-job-import {
  opacity: 0.72;
  pointer-events: none;
}

.job-import-status-context-menu {
  position: fixed;
  z-index: 5000;
  min-width: 168px;
  padding: 6px;
  border: 1px solid color-mix(in srgb, #ef4444 18%, var(--line));
  border-radius: 10px;
  background: var(--panel);
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.18);
}

.job-import-status-context-item {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: flex-start;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.job-import-status-context-item:hover,
.job-import-status-context-item:focus-visible {
  outline: none;
  background: color-mix(in srgb, #ef4444 10%, var(--panel));
}

.job-import-status-context-item.is-danger {
  color: #b91c1c;
  font-weight: 800;
}

.job-import-queue {
  width: 100%;
  margin: 0;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, #7c3aed 16%, var(--line));
  border-radius: 11px;
  background: var(--panel);
  box-shadow: 0 10px 24px rgba(91, 33, 182, 0.07);
}

.job-import-queue-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-bottom: 1px solid color-mix(in srgb, #7c3aed 12%, var(--line));
  background: linear-gradient(90deg, #f7f1ff, #f8fbff);
}

.job-import-queue-header h3 {
  margin: 0;
  color: var(--crest-primary-ink);
  font-size: 13px;
  line-height: 1.15;
}

.job-import-queue-summary {
  color: #5b21b6;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.job-import-queue-list {
  display: grid;
  gap: 5px;
  padding: 6px;
}

.job-import-lot-row {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 78px;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 4px 6px;
  border: 1px solid color-mix(in srgb, #7c3aed 12%, var(--line));
  border-radius: 8px;
  background: linear-gradient(90deg, color-mix(in srgb, #7c3aed 4%, var(--panel)), #fff);
  cursor: context-menu;
}

.job-import-lot-row:hover,
.job-import-lot-row:focus-within {
  border-color: color-mix(in srgb, #7c3aed 30%, var(--line));
  box-shadow: 0 5px 16px rgba(91, 33, 182, 0.08);
}

.job-import-lot-row.is-active {
  background: linear-gradient(90deg, #f3ecff, #f9fbff);
}

.job-import-lot-toggle {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #5b21b6;
  cursor: pointer;
}

.job-import-lot-toggle:hover,
.job-import-lot-toggle:focus-visible {
  outline: none;
  background: color-mix(in srgb, #7c3aed 10%, var(--panel));
}

.job-import-lot-toggle svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.16s ease;
}

.job-import-lot-row.is-open .job-import-lot-toggle svg {
  transform: rotate(90deg);
}

.job-import-lot-main {
  min-width: 0;
}

.job-import-lot-title {
  display: flex;
  align-items: baseline;
  gap: 7px;
  min-width: 0;
  color: var(--crest-primary-ink);
  font-size: 12.5px;
  font-weight: 900;
  line-height: 1.2;
}

.job-import-lot-title span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-import-lot-status {
  flex: 0 0 auto;
  color: #0f766e;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.job-import-lot-meta {
  overflow: hidden;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-import-lot-progress-cell {
  display: grid;
  align-items: center;
  gap: 3px;
}

.job-import-lot-progress {
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: color-mix(in srgb, #7c3aed 10%, var(--line));
}

.job-import-lot-progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7c3aed, #2563eb 55%, #0f766e);
  transition: width 0.25s ease;
}

.job-import-lot-percent {
  color: #0f766e;
  font-size: 10.5px;
  font-weight: 900;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.job-import-tree-stack {
  display: grid;
  gap: 10px;
}

.job-import-tree-stack .job-import-tree-card {
  margin-top: 0;
}

.job-import-tree-card {
  width: 100%;
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, #2563eb 16%, var(--line));
  border-radius: 12px;
  background: var(--panel);
  box-shadow: 0 8px 22px rgba(21, 80, 148, 0.06);
}

.job-import-tree-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 11px;
  border-bottom: 1px solid color-mix(in srgb, #2563eb 13%, var(--line));
  background: linear-gradient(90deg, #eef8f4, #f8fbff);
}

.job-import-tree-header .eyebrow {
  margin: 0 0 2px;
  color: #0f766e;
  font-size: 9.5px;
  letter-spacing: 0.045em;
}

.job-import-tree-header h3 {
  margin: 0;
  color: var(--crest-primary-ink);
  font-size: 13px;
  line-height: 1.2;
}

.job-import-tree-summary {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.job-import-tree-viewport {
  max-height: min(42vh, 380px);
  min-height: 74px;
  overflow: auto;
  padding: 6px 8px;
  background: linear-gradient(180deg, #fff, #fbfdfd);
  scrollbar-gutter: stable;
}

.job-import-tree-node {
  position: relative;
  min-width: 0;
}

.job-import-tree-group {
  margin-left: 9px;
  padding-left: 13px;
  border-left: 1px dotted #b8c9d3;
}

.job-import-tree-row {
  display: grid;
  grid-template-columns: 18px 34px minmax(0, 1fr) auto;
  align-items: center;
  min-height: 27px;
  column-gap: 4px;
  padding: 1px 6px 1px 2px;
  border-radius: 7px;
  color: #0c2435;
  font-size: 12px;
}

.job-import-tree-row:hover {
  background: #eef6ff;
}

.job-import-tree-row.is-assignable {
  cursor: grab;
}

.job-import-tree-row.is-assignable:active {
  cursor: grabbing;
}

.job-import-tree-row.is-assigned {
  opacity: 0.7;
}

.job-import-tree-row.is-current {
  background: #eaf2ff;
  outline: 1px solid #6fa0ff;
}

.job-import-tree-row.is-current-folder {
  background: #f3f9ff;
}

.job-import-tree-toggle {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #557187;
  cursor: pointer;
}

.job-import-tree-toggle[disabled] {
  cursor: default;
  opacity: 0.28;
}

.job-import-tree-toggle svg {
  width: 11px;
  height: 11px;
  transition: transform 0.16s ease;
}

.job-import-tree-toggle[aria-expanded="true"] svg {
  transform: rotate(90deg);
}

.job-import-tree-icon {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 22px;
}

.job-import-tree-icon.is-folder img {
  display: block;
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.job-import-tree-icon.is-file {
  min-width: 30px;
  padding: 0 3px;
  height: 16px;
  border: 1px solid #9dc3ef;
  border-radius: 4px;
  background: #f7fbff;
  color: #0b5fc2;
  font-size: 9px;
  font-weight: 900;
}

.job-import-tree-name {
  min-width: 0;
  padding-left: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}

.job-import-tree-state {
  min-width: 16px;
  text-align: right;
  font-size: 10px;
  font-weight: 900;
}

.job-import-tree-state.is-processing {
  color: #7c3aed;
  animation: jobImportTreePulse 1s ease-in-out infinite;
}

.job-import-tree-state.is-rejected {
  color: #d62828;
}

.job-import-tree-state.is-accepted {
  color: #007965;
}

.job-import-tree-state.is-assigned {
  color: #2563eb;
}

.job-import-tree-state.is-pending {
  color: #7a8991;
}

@keyframes jobImportTreePulse {
  0%,
  100% {
    opacity: 0.45;
  }

  50% {
    opacity: 1;
  }
}

.job-import-rejections {
  width: 100%;
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, #dc2626 22%, var(--line));
  border-radius: 12px;
  background: var(--panel);
  box-shadow: 0 8px 22px rgba(127, 29, 29, 0.06);
}

.job-import-rejections-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 11px;
  border-bottom: 1px solid color-mix(in srgb, #dc2626 18%, var(--line));
  background: color-mix(in srgb, #dc2626 5%, var(--panel));
}

.job-import-rejections-header .eyebrow {
  margin: 0 0 2px;
  color: #991b1b;
  font-size: 9.5px;
  letter-spacing: 0.045em;
}

.job-import-rejections-header h3 {
  margin: 0;
  color: color-mix(in srgb, #7f1d1d 86%, var(--text));
  font-size: 13px;
  line-height: 1.2;
}

.job-import-rejected-count {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  height: 22px;
  padding: 0 7px;
  border: 1px solid color-mix(in srgb, #dc2626 24%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, #dc2626 8%, var(--panel));
  color: #991b1b;
  font-size: 11px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.job-import-rejected-table {
  min-width: 0;
}

.job-import-rejected-table-head,
.job-import-rejected-item {
  display: grid;
  grid-template-columns: minmax(110px, 0.9fr) minmax(145px, 1.35fr);
  min-width: 0;
}

.job-import-rejected-table-head {
  position: sticky;
  top: 0;
  z-index: 1;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 94%, #f1f5f9);
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.035em;
}

.job-import-rejected-table-head > span,
.job-import-rejected-item > span {
  min-width: 0;
  padding: 6px 8px;
}

.job-import-rejected-table-head > span + span,
.job-import-rejected-item > span + span {
  border-left: 1px solid var(--line);
}

.job-import-rejected-list {
  width: 100%;
  max-height: min(32vh, 280px);
  overflow-y: auto;
  overflow-x: hidden;
  text-align: left;
  scrollbar-gutter: stable;
}

.job-import-rejected-item {
  border-bottom: 1px solid color-mix(in srgb, #dc2626 12%, var(--line));
  color: var(--text);
  font-size: 11.5px;
  line-height: 1.3;
}

.job-import-rejected-item:nth-child(even) {
  background: color-mix(in srgb, #dc2626 3%, var(--panel));
}

.job-import-rejected-item:last-child {
  border-bottom: 0;
}

.job-import-rejected-file,
.job-import-rejected-reason {
  overflow-wrap: anywhere;
}

.job-import-rejected-file {
  color: var(--crest-primary-ink);
  font-weight: 700;
}

.job-import-rejected-reason {
  color: color-mix(in srgb, #991b1b 78%, var(--text));
}

.job-import-rejected-summary {
  margin: 0;
  padding: 6px 10px;
  border-top: 1px solid color-mix(in srgb, #dc2626 12%, var(--line));
  color: var(--muted);
  font-size: 10.5px;
  text-align: right;
}

.advanced-search-criterion {
  display: grid;
  gap: 9px;
  padding: 14px 0 13px;
  border-bottom: 1px solid var(--line);
}

.advanced-search-criterion:last-child {
  border-bottom: 0;
}

.advanced-search-criterion h3 {
  margin: 0;
  color: var(--crest-primary-ink);
  font-size: 13px;
  line-height: 1.2;
}

.advanced-search-date-range {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.advanced-search-date-range label {
  display: grid;
  min-width: 0;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.advanced-search-date-range .input {
  width: 100%;
  min-width: 0;
}

.advanced-search-status {
  min-height: 18px;
  padding-top: 4px;
  font-weight: 700;
}

.advanced-search-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 22px;
  border-top: 1px solid var(--line);
  background: var(--panel-strong);
}

@media (max-width: 1180px) {
  .app-shell.advanced-search-open,
  .app-shell.job-import-open {
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  }

  .advanced-search-panel,
  .job-import-panel {
    position: fixed;
    z-index: 850;
    inset: 0 0 0 auto;
    width: min(var(--advanced-search-width), calc(100vw - 48px));
    box-shadow: -16px 0 36px rgba(20, 31, 27, 0.2);
  }

  .job-import-panel {
    width: min(var(--job-import-width), calc(100vw - 48px));
  }
}

@media (max-width: 560px) {
  .advanced-search-header,
  .advanced-search-body,
  .advanced-search-actions,
  .job-import-header,
  .job-import-body {
    padding-right: 16px;
    padding-left: 16px;
  }

}

.dossier-modal {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(880px, calc(100vw - 28px));
  height: 100vh;
  overflow: hidden;
  background: #fff;
  box-shadow: -18px 0 36px rgba(20, 31, 27, 0.16);
}

.dossier-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding: 18px 20px;
}

.dossier-modal-body {
  display: grid;
  gap: 14px;
  align-content: start;
  overflow: auto;
  padding: 16px 20px 22px;
}

.ged-properties-backdrop {
  z-index: 960;
  align-items: center;
  justify-content: center;
}

.ged-properties-modal {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 24px 60px rgba(20, 31, 27, 0.24);
}

.ged-properties-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding: 14px 16px;
}

.ged-properties-header h2 {
  margin: 2px 0 0;
  overflow-wrap: anywhere;
  font-size: 18px;
}

.ged-properties-body {
  display: grid;
  gap: 12px;
  overflow: auto;
  padding: 14px 16px 16px;
}

.ged-properties-list {
  display: grid;
  grid-template-columns: minmax(140px, 0.7fr) minmax(0, 1fr);
  gap: 8px 14px;
  margin: 0;
}

.ged-properties-list dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.ged-properties-list dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-weight: 750;
}

.ged-properties-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.role-rights-modal {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(1480px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  margin: 24px auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 24px 60px rgba(20, 31, 27, 0.24);
}

.role-rights-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 50px;
  border-bottom: 1px solid var(--line);
  padding: 8px 16px;
}

.role-rights-modal-header > div {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  white-space: nowrap;
}

.role-rights-modal-header .eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
}

.role-rights-modal-header .eyebrow::after {
  content: "-";
  margin-left: 8px;
  color: var(--muted);
  font-weight: 700;
}

.role-rights-modal-header h2 {
  overflow: hidden;
  margin: 0;
  font-size: 18px;
  line-height: 1.15;
  text-overflow: ellipsis;
}

.role-rights-modal-header .module-description {
  display: none;
}

.role-rights-modal-body {
  min-height: 0;
  overflow: auto;
}

.module-editor-modal-form,
.role-rights-modal-form {
  gap: 16px;
}

.module-editor-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.user-editor-modal-form {
  gap: 8px;
  padding: 10px 16px 0;
}

.user-editor-modal-form .module-editor-form-grid {
  grid-template-columns: repeat(7, minmax(120px, 1fr));
  gap: 6px 10px;
}

.user-editor-modal-form .form-field {
  gap: 3px;
}

.user-editor-modal-form .form-field label {
  font-size: 12px;
  line-height: 1.1;
}

.user-editor-modal-form .input,
.user-editor-modal-form .select {
  height: 34px;
  min-height: 34px;
  padding: 5px 10px;
  border-radius: 6px;
}

.user-editor-modal-form .textarea {
  min-height: 54px;
  padding: 6px 10px;
}

.user-password-actions {
  display: grid;
  grid-template-columns: minmax(130px, auto) minmax(240px, 1fr) auto;
  align-items: center;
  gap: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 92%, var(--accent) 8%);
  padding: 7px 10px;
}

.user-password-actions-title {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.user-password-status {
  color: var(--text);
  font-size: 13px;
}

.user-password-action-buttons {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.user-password-setter {
  display: flex;
  align-items: center;
  gap: 6px;
}

.user-password-input {
  width: 190px;
}

.user-password-actions .primary-button,
.user-password-actions .secondary-button,
.user-password-actions .danger-button {
  min-height: 32px;
  padding: 6px 10px;
}

.subtle-danger-button {
  border: 1px solid rgba(153, 27, 27, 0.26);
  background: #fff5f5;
  color: #991b1b;
}

.user-password-action-result {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.user-password-action-result[hidden] {
  display: none;
}

.user-password-temp-password {
  border: 1px solid rgba(15, 118, 110, 0.28);
  border-radius: 6px;
  background: #eefaf7;
  color: #0f766e;
  padding: 5px 8px;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  font-weight: 800;
}

.user-editor-modal-form .service-assignment-table-wrap {
  max-height: min(560px, calc(100vh - 250px));
}

.user-editor-modal-form .service-assignment-table th,
.user-editor-modal-form .service-assignment-table td {
  padding: 4px 7px;
  font-size: 12px;
}

.user-editor-modal-form .service-assignment-table th:not(:first-child),
.user-editor-modal-form .service-assignment-table td:not(:first-child) {
  width: 92px;
}

.user-editor-modal-form .service-assignment-table .service-assignment-action-row th {
  top: 28px;
}

.user-editor-modal-form .service-assignment-group {
  font-size: 13px;
}

.user-editor-modal-form .service-assignment-action-row th {
  font-size: 11px;
}

.user-editor-modal-form .service-assignment-service {
  min-width: 230px;
}

.user-editor-modal-form .role-rights-check {
  width: 24px;
  height: 24px;
  border-radius: 5px;
}

.user-editor-modal-form .role-rights-check input {
  width: 14px;
  height: 14px;
}

@media (max-width: 760px) {
  .user-editor-modal-form .module-editor-form-grid {
    grid-template-columns: 1fr;
  }

  .user-password-actions {
    grid-template-columns: 1fr;
  }

  .user-password-action-buttons {
    justify-content: flex-start;
  }
}

.role-rights-form-summary {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(180px, 0.8fr) minmax(260px, 1.4fr);
  gap: 14px;
}

.role-rights-modal .role-rights-matrix-wrap {
  max-height: calc(100vh - 390px);
}

.role-rights-modal .role-rights-table {
  min-width: 1060px;
}

.role-rights-modal-actions {
  position: sticky;
  bottom: 0;
  margin: 0 -16px -16px;
  border-top: 1px solid var(--line);
  background: var(--panel);
  padding: 14px 16px 16px;
}

.trusted-devices-backdrop {
  z-index: 980;
  align-items: center;
  justify-content: center;
  padding: 12px;
}

.trusted-devices-modal {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(1460px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: 0 28px 70px rgba(20, 31, 27, 0.26);
}

.trusted-devices-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding: 14px 18px;
}

.trusted-devices-header h2 {
  margin: 2px 0 0;
  color: var(--text);
  font-size: 20px;
}

.trusted-devices-body {
  display: grid;
  gap: 12px;
  min-height: 0;
  overflow: auto;
  padding: 14px 18px 18px;
}

.trusted-devices-loading {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.trusted-devices-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.trusted-devices-stat {
  display: grid;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 92%, #2563eb 8%);
  padding: 9px 11px;
}

.trusted-devices-stat strong {
  color: #123b7a;
  font-size: 22px;
  line-height: 1;
}

.trusted-devices-stat span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.trusted-devices-layout {
  display: grid;
  grid-template-columns: minmax(250px, 300px) minmax(760px, 1fr);
  gap: 14px;
  min-height: 0;
}

.trusted-device-form,
.trusted-devices-list-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
}

.trusted-device-form {
  display: grid;
  align-content: start;
  gap: 9px;
  padding: 13px;
}

.trusted-device-form h3,
.trusted-devices-list-header h3 {
  margin: 0;
  color: var(--crest-primary-ink);
  font-size: 15px;
}

.trusted-device-form label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.trusted-device-form .input,
.trusted-device-form .textarea {
  min-height: 32px;
  padding: 6px 9px;
}

.trusted-device-form .textarea {
  min-height: 60px;
  resize: vertical;
}

.trusted-device-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px;
  gap: 8px;
}

.trusted-device-form-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.trusted-devices-list-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.trusted-devices-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
}

.trusted-devices-table-wrap {
  min-height: 0;
  overflow: auto;
}

.trusted-devices-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 12px;
}

.trusted-devices-table th:nth-child(1),
.trusted-devices-table td:nth-child(1) {
  width: 17%;
}

.trusted-devices-table th:nth-child(2),
.trusted-devices-table td:nth-child(2) {
  width: 76px;
}

.trusted-devices-table th:nth-child(3),
.trusted-devices-table td:nth-child(3) {
  width: 20%;
}

.trusted-devices-table th:nth-child(4),
.trusted-devices-table td:nth-child(4),
.trusted-devices-table th:nth-child(5),
.trusted-devices-table td:nth-child(5) {
  width: 108px;
}

.trusted-devices-table th:nth-child(6),
.trusted-devices-table td:nth-child(6) {
  width: 330px;
}

.trusted-devices-table th,
.trusted-devices-table td {
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding: 7px 8px;
  text-align: left;
  text-overflow: ellipsis;
  vertical-align: top;
}

.trusted-devices-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f3f7fb;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.trusted-devices-table td strong,
.trusted-devices-table td span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trusted-devices-table td span {
  margin-top: 3px;
  color: var(--muted);
}

.trusted-device-row:nth-child(even) {
  background: #f8fbff;
}

.trusted-device-row.trusted-device-revoked {
  opacity: 0.72;
}

.trusted-device-row.trusted-device-expired {
  background: #fff9ed;
}

.trusted-device-identity-cell strong {
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
}

.trusted-device-identity-cell span {
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 11px;
}

.trusted-device-status {
  display: inline-flex !important;
  width: max-content;
  border: 1px solid rgba(15, 118, 110, 0.24);
  border-radius: 999px;
  background: #eefaf7;
  color: #0f766e !important;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 900;
}

.trusted-device-revoked .trusted-device-status {
  border-color: #ffd1ca;
  background: #fff5f3;
  color: var(--danger) !important;
}

.trusted-device-expired .trusted-device-status {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #9a3412 !important;
}

.trusted-devices-empty {
  color: var(--muted);
  font-weight: 800;
  text-align: center !important;
}

.trusted-device-action-muted {
  color: var(--muted);
  font-size: 11px;
  white-space: normal !important;
}

.trusted-device-action-cell {
  text-align: right !important;
  white-space: nowrap;
}

.trusted-device-action-group {
  display: inline-flex;
  max-width: 100%;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  flex: 0 0 auto;
  vertical-align: middle;
}

.trusted-device-action-group + .trusted-device-action-group {
  margin-left: 5px;
}

.trusted-device-action-cell .compact-button {
  flex: 0 0 auto;
  min-height: 22px;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
}

.trusted-device-action-cell .danger-button {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.trusted-device-delete-button {
  border-color: #fecaca !important;
  background: #fff7f7 !important;
}

.trusted-device-revoke-modal {
  width: min(520px, calc(100vw - 28px));
}

.trusted-device-revoke-reason {
  display: grid;
  gap: 6px;
  padding: 0 20px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.trusted-device-revoke-reason .textarea {
  min-height: 72px;
  resize: vertical;
}

@media (max-width: 900px) {
  .trusted-devices-layout,
  .trusted-devices-summary {
    grid-template-columns: 1fr;
  }
}

.confirmation-backdrop {
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.confirmation-modal {
  display: grid;
  gap: 18px;
  width: min(440px, calc(100vw - 28px));
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(20, 31, 27, 0.22);
}

.confirmation-modal * {
  min-width: 0;
}

.confirmation-header {
  border-bottom: 1px solid var(--line);
  padding: 18px 20px 0;
}

.confirmation-header h2 {
  margin: 0;
  padding-bottom: 14px;
  font-size: 18px;
  letter-spacing: 0;
}

.confirmation-message {
  margin: 0;
  padding: 0 20px;
  white-space: pre-line;
  color: var(--text);
  line-height: 1.5;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.confirmation-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding: 14px 20px 18px;
}

.mail-target-ready-backdrop {
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.mail-target-ready-modal {
  width: min(340px, calc(100vw - 32px));
  gap: 12px;
  padding: 16px;
  border-radius: 10px;
}

.mail-target-ready-modal .confirmation-message {
  padding: 0;
  font-size: 14px;
  line-height: 1.35;
  text-align: center;
}

.mail-target-ready-modal .confirmation-actions {
  justify-content: center;
  border-top: 0;
  padding: 0;
}

.mail-target-ready-modal .primary-button {
  min-width: 72px;
}

.dossier-ged-drop-backdrop {
  z-index: 1010;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.dossier-ged-drop-modal {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(560px, calc(100vw - 28px));
  max-height: calc(100vh - 36px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: 0 24px 64px rgba(20, 31, 27, 0.28);
}

.dossier-ged-drop-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding: 18px 20px 15px;
}

.dossier-ged-drop-header .eyebrow,
.dossier-ged-drop-header h2,
.dossier-ged-drop-header .module-description {
  margin: 0;
}

.dossier-ged-drop-header h2 {
  margin-top: 3px;
  font-size: 20px;
  line-height: 1.2;
}

.dossier-ged-drop-header .module-description {
  margin-top: 7px;
  max-width: 460px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.dossier-ged-drop-form {
  display: grid;
  gap: 14px;
  overflow: auto;
  padding: 18px 20px 20px;
}

.dossier-ged-drop-context {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
  padding: 12px 14px;
  color: var(--muted);
  font-size: 13px;
}

.dossier-ged-drop-context p,
.dossier-ged-drop-help,
.dossier-ged-drop-error {
  margin: 0;
}

.dossier-ged-drop-context strong {
  color: var(--text);
}

.dossier-ged-drop-help {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.dossier-ged-drop-error {
  color: var(--danger);
  font-size: 13px;
  font-weight: 800;
}

.dossier-ged-drop-actions {
  position: sticky;
  bottom: -20px;
  margin: 0 -20px -20px;
  border-top: 1px solid var(--line);
  background: var(--panel);
  padding: 14px 20px 18px;
}

.dossier-action-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.dossier-section {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  padding: 14px;
}

.dossier-section h3 {
  margin: 0;
  font-size: 14px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.dossier-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}

.dossier-field {
  display: grid;
  gap: 4px;
  min-width: 0;
  border: 1px solid #edf1ee;
  border-radius: 7px;
  background: #fff;
  padding: 10px;
}

.dossier-field span,
.dossier-file-row span,
.dossier-event-row span,
.dossier-event-row small {
  color: var(--muted);
  font-size: 13px;
}

.dossier-field strong,
.dossier-file-row strong,
.dossier-event-row strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.dossier-field strong.muted {
  color: var(--muted);
  font-weight: 700;
}

.dossier-file-list,
.dossier-event-list {
  display: grid;
  gap: 8px;
}

.dossier-event-list {
  max-height: 360px;
  overflow-y: auto;
  padding-right: 4px;
}

.dossier-file-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid #edf1ee;
  border-radius: 7px;
  background: #fff;
  padding: 10px;
}

.dossier-file-row > div,
.dossier-event-row {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.dossier-event-row {
  border-left: 3px solid var(--accent);
  background: #fff;
  border-radius: 7px;
  padding: 10px 12px;
}

.dossier-edit-form {
  display: grid;
  gap: 16px;
}

.dossier-edit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.dossier-edit-field {
  display: grid;
  gap: 6px;
}

.dossier-edit-field.wide {
  grid-column: 1 / -1;
}

.dossier-edit-field span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.dossier-edit-field textarea {
  min-height: 76px;
}

.dossier-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.assignment-form {
  display: grid;
  gap: 14px;
}

.assignment-user-list {
  display: grid;
  gap: 8px;
  max-height: min(440px, 52vh);
  overflow: auto;
  padding-right: 4px;
}

.assignment-user-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  padding: 10px 12px;
}

.assignment-user-row.disabled {
  opacity: 0.58;
}

.assignment-user-info {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.assignment-user-info strong,
.assignment-user-info small {
  overflow-wrap: anywhere;
}

.assignment-user-info small,
.assignment-notice {
  color: var(--muted);
  font-size: 13px;
}

.assignment-notice {
  margin: 0;
}

.urbanisme-context-menu {
  position: fixed;
  z-index: 1000;
  width: min(260px, calc(100vw - 16px));
  max-height: min(440px, calc(100vh - 16px));
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 6px;
}

.context-title {
  padding: 8px 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.context-item {
  display: block;
  width: 100%;
  min-height: 33px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  padding: 7px 9px;
  text-align: left;
}

.context-item:hover {
  background: var(--panel-strong);
}

.context-item.danger {
  color: var(--danger);
}

.context-item.warning {
  color: var(--warning);
}

.context-divider {
  height: 1px;
  margin: 6px 4px;
  background: var(--line);
}

.hidden {
  display: none !important;
}

.empty-state {
  padding: 36px;
  color: var(--muted);
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  max-width: min(420px, calc(100vw - 40px));
  border-radius: 8px;
  background: #17211e;
  color: #fff;
  padding: 12px 14px;
  box-shadow: var(--shadow);
}

.mail-import-monitor {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 95;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 13px;
  width: min(440px, calc(100vw - 40px));
  border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--line));
  border-radius: 16px;
  background:
    radial-gradient(circle at 12% 18%, color-mix(in srgb, var(--accent) 24%, transparent), transparent 34%),
    linear-gradient(135deg, color-mix(in srgb, var(--panel) 94%, white), color-mix(in srgb, var(--panel) 82%, var(--accent) 8%));
  color: var(--text);
  padding: 14px 15px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.20);
  backdrop-filter: blur(14px);
  transform: translate(-50%, -50%);
}

.mail-import-monitor.hidden {
  display: none !important;
}

.mail-import-monitor-orb {
  position: relative;
  width: 58px;
  height: 58px;
  border-radius: 999px;
  background:
    radial-gradient(circle, color-mix(in srgb, var(--accent) 82%, white) 0 19%, transparent 20%),
    conic-gradient(from 0deg, color-mix(in srgb, var(--accent) 92%, white), transparent 34%, color-mix(in srgb, var(--crest-secondary) 82%, white), transparent 70%, color-mix(in srgb, var(--accent) 92%, white));
  box-shadow:
    inset 0 0 18px rgba(255, 255, 255, 0.58),
    0 0 0 1px color-mix(in srgb, var(--accent) 22%, transparent),
    0 0 24px color-mix(in srgb, var(--accent) 32%, transparent);
  animation: mail-import-radar-spin 2.2s linear infinite;
}

.mail-import-monitor-orb::before,
.mail-import-monitor-orb::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: inherit;
}

.mail-import-monitor-orb::after {
  inset: -5px;
  border-color: color-mix(in srgb, var(--accent) 26%, transparent);
  animation: mail-import-radar-pulse 1.55s ease-out infinite;
}

.mail-import-monitor[data-status="success"] .mail-import-monitor-orb {
  animation-duration: 3.8s;
  background:
    radial-gradient(circle, #ffffff 0 16%, transparent 17%),
    conic-gradient(from 0deg, #10b981, transparent 35%, #34d399, transparent 72%, #10b981);
}

.mail-import-monitor[data-status="warning"] .mail-import-monitor-orb,
.mail-import-monitor[data-status="error"] .mail-import-monitor-orb {
  background:
    radial-gradient(circle, #ffffff 0 16%, transparent 17%),
    conic-gradient(from 0deg, var(--warning), transparent 34%, var(--danger), transparent 72%, var(--warning));
}

.mail-import-monitor-main {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.mail-import-monitor-eyebrow {
  color: var(--accent);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mail-import-monitor-title {
  color: var(--text);
  font-size: 14px;
  font-weight: 950;
  line-height: 1.22;
}

.mail-import-monitor-detail {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
}

.mail-import-monitor-progress {
  overflow: hidden;
  height: 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--line) 60%, transparent);
}

.mail-import-monitor-progress-bar {
  width: var(--mail-import-progress, 8%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--crest-secondary) 70%, white));
  box-shadow: 0 0 18px color-mix(in srgb, var(--accent) 45%, transparent);
  transition: width 0.36s ease;
}

.mail-import-monitor-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.mail-import-monitor-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--panel-strong) 78%, transparent);
  padding: 2px 7px;
}

@keyframes mail-import-radar-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes mail-import-radar-pulse {
  0% {
    opacity: 0.8;
    transform: scale(0.82);
  }
  100% {
    opacity: 0;
    transform: scale(1.28);
  }
}

.operation-progress {
  position: fixed;
  right: 20px;
  bottom: 78px;
  z-index: 80;
  width: min(460px, calc(100vw - 40px));
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  padding: 12px 14px;
  box-shadow: var(--shadow);
}

.operation-progress-label {
  display: grid;
  gap: 3px;
  margin-bottom: 10px;
}

.operation-progress-label strong {
  font-size: 14px;
}

.operation-progress-label span {
  color: var(--muted);
  font-size: 12px;
}

.operation-progress-bar {
  position: relative;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #dfe8e4;
}

.operation-progress-bar span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 42%;
  border-radius: inherit;
  background: var(--accent);
  animation: operation-progress-sweep 1.2s ease-in-out infinite;
}

@keyframes operation-progress-sweep {
  0% {
    transform: translateX(-115%);
  }
  52% {
    transform: translateX(82%);
  }
  100% {
    transform: translateX(245%);
  }
}

.standalone-viewer-body {
  min-height: 100vh;
  background: var(--bg);
}

.standalone-document-viewer {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background: var(--bg);
}

.standalone-document-viewer.loading {
  display: grid;
  place-items: center;
  padding: 24px;
}

.standalone-viewer-message {
  display: grid;
  gap: 16px;
  justify-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  padding: 24px;
  box-shadow: var(--shadow);
}

.standalone-document-viewer.error .standalone-viewer-message {
  color: var(--danger);
}

.standalone-viewer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  padding: 12px 16px;
}

.standalone-viewer-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.standalone-viewer-identity h1 {
  margin: 0;
  color: var(--text);
  font-size: 17px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.standalone-viewer-identity p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.standalone-viewer-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.standalone-viewer-zoom {
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
  min-width: 44px;
  text-align: center;
}

.standalone-viewer-content {
  min-height: 0;
  overflow: auto;
  padding: 14px;
}

.standalone-document-frame,
.standalone-document-image,
.standalone-document-text {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.standalone-document-frame {
  width: 100%;
  height: calc(100vh - 98px);
  min-height: 620px;
}

.standalone-document-frame-locked {
  pointer-events: none;
}

.standalone-document-image {
  display: block;
  height: auto;
  margin: 0 auto;
  max-width: 100%;
  user-select: none;
  -webkit-user-drag: none;
}

.standalone-document-text {
  min-height: calc(100vh - 124px);
  margin: 0;
  overflow: auto;
  padding: 16px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #122438;
  font-family: Consolas, "Liberation Mono", monospace;
  line-height: 1.45;
}

.standalone-preview-notice {
  display: grid;
  gap: 10px;
  align-content: center;
  justify-items: center;
  min-height: calc(100vh - 124px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow);
}

.standalone-preview-notice h2 {
  margin: 0;
  font-size: 19px;
}

.standalone-preview-notice p {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.45;
}

.standalone-preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 4px;
}

[data-theme="dark"] .module-button.active,
[data-theme="dark"] .sidebar-urbanisme-child:hover,
[data-theme="dark"] .sidebar-urbanisme-child.active,
[data-theme="dark"] .sidebar-urbanisme-child.droppable.drag-over,
[data-theme="dark"] .urbanisme-dossier-tree.file-drag-over > .urbanisme-dossier-tree-root,
[data-theme="dark"] .sidebar-tree-root-label.active,
[data-theme="dark"] .sidebar-tree-folder-label.active,
[data-theme="dark"] .sidebar-tree-leaf.active,
[data-theme="dark"] .urbanisme-dossier-row:hover,
[data-theme="dark"] .urbanisme-dossier-row.active,
[data-theme="dark"] .tree-folder-label.active,
[data-theme="dark"] .tree-leaf.active,
[data-theme="dark"] .urbanisme-dossier-tree-root:hover,
[data-theme="dark"] .urbanisme-dossier-tree.active > .urbanisme-dossier-tree-root,
[data-theme="dark"] .urbanisme-dossier-tree-file:hover,
[data-theme="dark"] .urbanisme-dossier-tree-file.active,
[data-theme="dark"] .urbanisme-document-row:hover,
[data-theme="dark"] .urbanisme-document-row.active,
[data-theme="dark"] .urbanisme-result-row:hover,
[data-theme="dark"] .urbanisme-result-row.active {
  background: var(--selection-bg);
  color: var(--selection-text);
}

[data-theme="dark"] .sidebar-urbanisme-children,
[data-theme="dark"] .sidebar-urbanisme-child::before {
  border-color: var(--tree-line);
}

[data-theme="dark"] .file-list.drag-over {
  background: var(--drag-bg);
}

[data-theme="dark"] .sidebar-urbanisme-active-header {
  color: var(--accent);
}

[data-theme="dark"] .sidebar-urbanisme-folder-icon {
  background: var(--folder-body);
}

[data-theme="dark"] .sidebar-urbanisme-folder-icon::before {
  background: var(--folder-tab);
}

[data-theme="dark"] .sidebar-urbanisme-folder-icon.search-match-folder-icon {
  background: transparent url("icons/rouge-22.png?v=20260620-transparent") center / contain no-repeat;
  box-shadow: none;
}

[data-theme="dark"] .sidebar-urbanisme-folder-icon.search-match-folder-icon::before {
  content: none;
}

[data-theme="dark"] .dossier-meta,
[data-theme="dark"] .urbanisme-dossier-row.active .dossier-meta {
  color: var(--muted);
}

[data-theme="dark"] .urbanisme-dossier-row.active .dossier-pill,
[data-theme="dark"] .dossier-pill,
[data-theme="dark"] .sidebar-urbanisme-child-count,
[data-theme="dark"] .result-chip,
[data-theme="dark"] .viewer-chip,
[data-theme="dark"] .badge {
  background: var(--panel-strong);
  color: var(--muted);
  border-color: var(--line);
}

[data-theme="dark"] .urbanisme-search-panel,
[data-theme="dark"] .urbanisme-results-panel,
[data-theme="dark"] .alsh-viewer-header,
[data-theme="dark"] .alsh-viewer-drop-zone,
[data-theme="dark"] .urbanisme-tree-panel,
[data-theme="dark"] .urbanisme-viewer-panel,
[data-theme="dark"] .urbanisme-stage-block,
[data-theme="dark"] .urbanisme-dossier-tree,
[data-theme="dark"] .table-section,
[data-theme="dark"] .editor-panel,
[data-theme="dark"] .vault-section,
[data-theme="dark"] .register-section,
[data-theme="dark"] .urbanisme-context-menu,
[data-theme="dark"] .dossier-modal,
[data-theme="dark"] .role-rights-modal,
[data-theme="dark"] .dossier-ged-drop-modal,
[data-theme="dark"] .confirmation-modal {
  background: var(--panel);
}

[data-theme="dark"] .urbanisme-stage-header,
[data-theme="dark"] th,
[data-theme="dark"] .table-toolbar,
[data-theme="dark"] .editor-header,
[data-theme="dark"] .vault-header,
[data-theme="dark"] .register-header {
  background: #1c1c1c;
}

[data-theme="dark"] .urbanisme-document-row,
[data-theme="dark"] .urbanisme-dossier-tree-file,
[data-theme="dark"] .urbanisme-dossier-tree-empty,
[data-theme="dark"] .urbanisme-result-row,
[data-theme="dark"] .viewer-block,
[data-theme="dark"] .viewer-dossier,
[data-theme="dark"] .viewer-file,
[data-theme="dark"] .document-frame,
[data-theme="dark"] .document-image,
[data-theme="dark"] .document-placeholder,
[data-theme="dark"] .dossier-section,
[data-theme="dark"] .dossier-field,
[data-theme="dark"] .dossier-file-row,
[data-theme="dark"] .dossier-event-row,
[data-theme="dark"] .assignment-user-row,
[data-theme="dark"] .small-button,
[data-theme="dark"] .context-item {
  background: #262626;
  color: var(--text);
  border-color: var(--line);
}

[data-theme="dark"] .user-password-actions {
  background: #242424;
  border-color: var(--line);
}

[data-theme="dark"] .subtle-danger-button {
  background: #3a2424;
  border-color: #6f3333;
  color: #f1caca;
}

[data-theme="dark"] .user-password-temp-password {
  background: #1f2d2a;
  border-color: #315c56;
  color: #a7f3d0;
}

[data-theme="dark"] .service-column-bulk {
  background: var(--selection-bg);
  border-color: var(--selection-border);
}

[data-theme="dark"] .service-column-bulk input {
  accent-color: var(--accent);
}

[data-theme="dark"] .urbanisme-file-type-icon {
  background: var(--panel-strong);
  border-color: var(--line);
  color: var(--text);
}

[data-theme="dark"] .urbanisme-file-type-icon.is-img {
  color: #d6a45f;
}

[data-theme="dark"] .urbanisme-file-type-icon.is-doc,
[data-theme="dark"] .urbanisme-file-type-icon.is-pdf {
  color: #e0b6b6;
}

[data-theme="dark"] .urbanisme-file-type-icon.is-xls {
  color: #9ee6b8;
}

[data-theme="dark"] .urbanisme-file-type-icon.is-ppt {
  color: #f0b28c;
}

[data-theme="dark"] .urbanisme-ocr-line,
[data-theme="dark"] .urbanisme-ocr-excerpt {
  color: #b8b8b8;
}

[data-theme="dark"] .urbanisme-ocr-tag {
  background: var(--selection-bg);
  border-color: var(--selection-border);
  color: var(--selection-text);
}

[data-theme="dark"] .urbanisme-file-thumb {
  background: #252525;
  border-color: #444444;
}

[data-theme="dark"] .urbanisme-file-thumb span {
  background: rgba(30, 30, 30, 0.88);
  color: #d6a45f;
}

[data-theme="dark"] .urbanisme-classify-suggestions {
  background: var(--selection-bg);
  border-color: var(--selection-border);
  border-left-color: var(--accent);
}

[data-theme="dark"] .urbanisme-classify-suggestions-text {
  color: var(--muted);
}

[data-theme="dark"] .urbanisme-classify-suggestion-list li,
[data-theme="dark"] .urbanisme-classify-suggestion-type,
[data-theme="dark"] .urbanisme-classify-suggestion-list strong {
  color: var(--selection-text);
}

[data-theme="dark"] .urbanisme-inged-progress {
  background: #242424;
  border-color: var(--line);
  border-left-color: var(--accent);
}

[data-theme="dark"] .urbanisme-inged-progress-header strong,
[data-theme="dark"] .urbanisme-inged-progress-stages span.active {
  color: var(--selection-text);
}

[data-theme="dark"] .urbanisme-inged-progress-header span,
[data-theme="dark"] .urbanisme-inged-progress-step {
  color: #b8b8b8;
}

[data-theme="dark"] .urbanisme-inged-progress-bar {
  background: #343434;
}

[data-theme="dark"] .urbanisme-inged-progress-bar span {
  background: var(--red-background);
}

[data-theme="dark"] .urbanisme-inged-progress-stages span {
  background: #2a2a2a;
  border-color: #444444;
  color: #b8b8b8;
}

[data-theme="dark"] .urbanisme-inged-progress-stages span.active {
  background: var(--selection-bg);
  border-color: var(--selection-border);
}

[data-theme="dark"] .dossier-section,
[data-theme="dark"] .viewer-block {
  background: #242424;
}

[data-theme="dark"] .standalone-viewer-header,
[data-theme="dark"] .standalone-viewer-message {
  background: var(--panel);
}

[data-theme="dark"] .standalone-document-text {
  background: #242424;
  color: var(--text);
}

[data-theme="dark"] .urbanisme-security-notice {
  background: #2c2020;
  border-color: #7f3434;
  color: #f0dada;
}

[data-theme="dark"] .urbanisme-security-notice strong,
[data-theme="dark"] .urbanisme-security-file-name {
  color: #f2b6b6;
}

[data-theme="dark"] .urbanisme-security-notice p,
[data-theme="dark"] .urbanisme-security-file-reason,
[data-theme="dark"] .urbanisme-security-more {
  color: #d8aaaa;
}

[data-theme="dark"] .urbanisme-security-notice li {
  border-color: #633030;
}

[data-theme="dark"] tr:hover td,
[data-theme="dark"] .small-button:hover,
[data-theme="dark"] .context-item:hover,
[data-theme="dark"] .secondary-button:hover,
[data-theme="dark"] .ghost-button:hover {
  background: var(--panel-strong);
}

[data-theme="dark"] .module-button:hover,
[data-theme="dark"] .sidebar-urbanisme-child:hover,
[data-theme="dark"] .sidebar-urbanisme-child.droppable.drag-over,
[data-theme="dark"] .sidebar-alsh-folder:hover,
[data-theme="dark"] .sidebar-alsh-folder.drag-over,
[data-theme="dark"] .sidebar-alsh-dossier:hover,
[data-theme="dark"] .sidebar-alsh-dossier.drag-over,
[data-theme="dark"] .sidebar-tree-root-label:hover,
[data-theme="dark"] .sidebar-tree-folder-label:hover,
[data-theme="dark"] .sidebar-tree-leaf:hover,
[data-theme="dark"] .urbanisme-dossier-row:hover,
[data-theme="dark"] .urbanisme-dossier-tree.file-drag-over > .urbanisme-dossier-tree-root,
[data-theme="dark"] .urbanisme-dossier-tree-root:hover,
[data-theme="dark"] .urbanisme-dossier-tree-file:hover,
[data-theme="dark"] .urbanisme-dossier-tree-empty:hover,
[data-theme="dark"] .urbanisme-document-row:hover,
[data-theme="dark"] .urbanisme-result-row:hover,
[data-theme="dark"] .tree-folder-label:hover,
[data-theme="dark"] .tree-leaf:hover,
[data-theme="dark"] .viewer-file:hover,
[data-theme="dark"] tr:hover td,
[data-theme="dark"] .small-button:hover,
[data-theme="dark"] .context-item:hover,
[data-theme="dark"] .secondary-button:hover,
[data-theme="dark"] .ghost-button:hover {
  background: var(--option-hover-bg);
  border-color: var(--option-hover-border);
  color: var(--option-hover-text);
}

[data-theme="dark"] .sidebar-alsh-folder.active,
[data-theme="dark"] .sidebar-alsh-dossier.active {
  border-color: var(--selection-border);
  background: var(--selection-bg);
  color: var(--selection-text);
}

[data-theme="dark"] .module-button:hover *,
[data-theme="dark"] .sidebar-urbanisme-child:hover *,
[data-theme="dark"] .sidebar-urbanisme-child.droppable.drag-over *,
[data-theme="dark"] .sidebar-alsh-folder:hover *,
[data-theme="dark"] .sidebar-alsh-folder.drag-over *,
[data-theme="dark"] .sidebar-alsh-dossier:hover *,
[data-theme="dark"] .sidebar-alsh-dossier.drag-over *,
[data-theme="dark"] .sidebar-tree-root-label:hover *,
[data-theme="dark"] .sidebar-tree-folder-label:hover *,
[data-theme="dark"] .sidebar-tree-leaf:hover *,
[data-theme="dark"] .urbanisme-dossier-row:hover *,
[data-theme="dark"] .urbanisme-dossier-tree.file-drag-over > .urbanisme-dossier-tree-root *,
[data-theme="dark"] .urbanisme-dossier-tree-root:hover *,
[data-theme="dark"] .urbanisme-dossier-tree-file:hover *,
[data-theme="dark"] .urbanisme-dossier-tree-empty:hover *,
[data-theme="dark"] .urbanisme-document-row:hover *,
[data-theme="dark"] .urbanisme-result-row:hover *,
[data-theme="dark"] .tree-folder-label:hover *,
[data-theme="dark"] .tree-leaf:hover *,
[data-theme="dark"] .viewer-file:hover *,
[data-theme="dark"] tr:hover td *,
[data-theme="dark"] .small-button:hover *,
[data-theme="dark"] .context-item:hover *,
[data-theme="dark"] .secondary-button:hover *,
[data-theme="dark"] .ghost-button:hover * {
  color: var(--option-hover-text);
}

[data-theme="dark"] .module-button:hover .module-count,
[data-theme="dark"] .sidebar-urbanisme-child:hover .sidebar-urbanisme-child-count,
[data-theme="dark"] .sidebar-alsh-folder:hover small,
[data-theme="dark"] .urbanisme-dossier-row:hover .dossier-pill,
[data-theme="dark"] .urbanisme-dossier-tree-root:hover .urbanisme-dossier-tree-count,
[data-theme="dark"] .urbanisme-document-row:hover .result-chip,
[data-theme="dark"] .urbanisme-result-row:hover .result-chip,
[data-theme="dark"] .viewer-file:hover .viewer-chip,
[data-theme="dark"] tr:hover td .badge {
  background: var(--option-hover-chip-bg);
  border-color: var(--option-hover-border);
  color: var(--option-hover-text);
}

[data-theme="dark"] .sidebar-urbanisme-child:hover::before,
[data-theme="dark"] .sidebar-tree-leaf:hover::before {
  border-color: var(--option-hover-border);
}

[data-theme="dark"] .sidebar-tree-root-label:hover::before,
[data-theme="dark"] .sidebar-tree-folder-label:hover::before,
[data-theme="dark"] .urbanisme-dossier-tree-root:hover::before,
[data-theme="dark"] .tree-folder-label:hover::before {
  color: var(--option-hover-text);
}

[data-theme="dark"] select option {
  background: var(--option-hover-bg);
  color: var(--option-hover-text);
}

html[data-theme="dark"] .module-button:hover,
html[data-theme="dark"] .module-button:focus-visible,
html[data-theme="dark"] .sidebar-urbanisme-child:hover,
html[data-theme="dark"] .sidebar-urbanisme-child:focus-visible,
html[data-theme="dark"] .sidebar-urbanisme-child.droppable.drag-over,
html[data-theme="dark"] .sidebar-alsh-folder:hover,
html[data-theme="dark"] .sidebar-alsh-folder:focus-visible,
html[data-theme="dark"] .sidebar-alsh-folder.drag-over,
html[data-theme="dark"] .sidebar-alsh-dossier:hover,
html[data-theme="dark"] .sidebar-alsh-dossier:focus-visible,
html[data-theme="dark"] .sidebar-alsh-dossier.drag-over,
html[data-theme="dark"] .sidebar-tree-root-label:hover,
html[data-theme="dark"] .sidebar-tree-root-label:focus-visible,
html[data-theme="dark"] .sidebar-tree-folder-label:hover,
html[data-theme="dark"] .sidebar-tree-folder-label:focus-visible,
html[data-theme="dark"] .sidebar-tree-leaf:hover,
html[data-theme="dark"] .sidebar-tree-leaf:focus-visible,
html[data-theme="dark"] .urbanisme-dossier-row:hover,
html[data-theme="dark"] .urbanisme-dossier-row:focus-visible,
html[data-theme="dark"] .urbanisme-dossier-tree.file-drag-over > .urbanisme-dossier-tree-root,
html[data-theme="dark"] .urbanisme-dossier-tree-root:hover,
html[data-theme="dark"] .urbanisme-dossier-tree-root:focus-visible,
html[data-theme="dark"] .urbanisme-dossier-tree-file:hover,
html[data-theme="dark"] .urbanisme-dossier-tree-file:focus-visible,
html[data-theme="dark"] .urbanisme-dossier-tree-empty:hover,
html[data-theme="dark"] .urbanisme-dossier-tree-empty:focus-visible,
html[data-theme="dark"] .urbanisme-document-row:hover,
html[data-theme="dark"] .urbanisme-document-row:focus-visible,
html[data-theme="dark"] .urbanisme-result-row:hover,
html[data-theme="dark"] .urbanisme-result-row:focus-visible,
html[data-theme="dark"] .tree-folder-label:hover,
html[data-theme="dark"] .tree-folder-label:focus-visible,
html[data-theme="dark"] .tree-leaf:hover,
html[data-theme="dark"] .tree-leaf:focus-visible,
html[data-theme="dark"] .viewer-file:hover,
html[data-theme="dark"] .viewer-file:focus-visible,
html[data-theme="dark"] tr:hover td,
html[data-theme="dark"] .small-button:hover,
html[data-theme="dark"] .small-button:focus-visible,
html[data-theme="dark"] .context-item:hover,
html[data-theme="dark"] .context-item:focus-visible,
html[data-theme="dark"] .secondary-button:hover,
html[data-theme="dark"] .secondary-button:focus-visible,
html[data-theme="dark"] .ghost-button:hover,
html[data-theme="dark"] .ghost-button:focus-visible {
  background: var(--option-hover-bg) !important;
  border-color: var(--option-hover-border) !important;
  color: var(--option-hover-text) !important;
}

html[data-theme="dark"] .module-button:hover *,
html[data-theme="dark"] .module-button:focus-visible *,
html[data-theme="dark"] .sidebar-urbanisme-child:hover *,
html[data-theme="dark"] .sidebar-urbanisme-child:focus-visible *,
html[data-theme="dark"] .sidebar-urbanisme-child.droppable.drag-over *,
html[data-theme="dark"] .sidebar-alsh-folder:hover *,
html[data-theme="dark"] .sidebar-alsh-folder:focus-visible *,
html[data-theme="dark"] .sidebar-alsh-folder.drag-over *,
html[data-theme="dark"] .sidebar-alsh-dossier:hover *,
html[data-theme="dark"] .sidebar-alsh-dossier:focus-visible *,
html[data-theme="dark"] .sidebar-alsh-dossier.drag-over *,
html[data-theme="dark"] .sidebar-tree-root-label:hover *,
html[data-theme="dark"] .sidebar-tree-root-label:focus-visible *,
html[data-theme="dark"] .sidebar-tree-folder-label:hover *,
html[data-theme="dark"] .sidebar-tree-folder-label:focus-visible *,
html[data-theme="dark"] .sidebar-tree-leaf:hover *,
html[data-theme="dark"] .sidebar-tree-leaf:focus-visible *,
html[data-theme="dark"] .urbanisme-dossier-row:hover *,
html[data-theme="dark"] .urbanisme-dossier-row:focus-visible *,
html[data-theme="dark"] .urbanisme-dossier-tree.file-drag-over > .urbanisme-dossier-tree-root *,
html[data-theme="dark"] .urbanisme-dossier-tree-root:hover *,
html[data-theme="dark"] .urbanisme-dossier-tree-root:focus-visible *,
html[data-theme="dark"] .urbanisme-dossier-tree-file:hover *,
html[data-theme="dark"] .urbanisme-dossier-tree-file:focus-visible *,
html[data-theme="dark"] .urbanisme-dossier-tree-empty:hover *,
html[data-theme="dark"] .urbanisme-dossier-tree-empty:focus-visible *,
html[data-theme="dark"] .urbanisme-document-row:hover *,
html[data-theme="dark"] .urbanisme-document-row:focus-visible *,
html[data-theme="dark"] .urbanisme-result-row:hover *,
html[data-theme="dark"] .urbanisme-result-row:focus-visible *,
html[data-theme="dark"] .tree-folder-label:hover *,
html[data-theme="dark"] .tree-folder-label:focus-visible *,
html[data-theme="dark"] .tree-leaf:hover *,
html[data-theme="dark"] .tree-leaf:focus-visible *,
html[data-theme="dark"] .viewer-file:hover *,
html[data-theme="dark"] .viewer-file:focus-visible *,
html[data-theme="dark"] tr:hover td *,
html[data-theme="dark"] .small-button:hover *,
html[data-theme="dark"] .small-button:focus-visible *,
html[data-theme="dark"] .context-item:hover *,
html[data-theme="dark"] .context-item:focus-visible *,
html[data-theme="dark"] .secondary-button:hover *,
html[data-theme="dark"] .secondary-button:focus-visible *,
html[data-theme="dark"] .ghost-button:hover *,
html[data-theme="dark"] .ghost-button:focus-visible * {
  color: var(--option-hover-text) !important;
}

html[data-theme="dark"] .module-button:hover .module-count,
html[data-theme="dark"] .module-button:focus-visible .module-count,
html[data-theme="dark"] .sidebar-urbanisme-child:hover .sidebar-urbanisme-child-count,
html[data-theme="dark"] .sidebar-urbanisme-child:focus-visible .sidebar-urbanisme-child-count,
html[data-theme="dark"] .sidebar-alsh-folder:hover small,
html[data-theme="dark"] .sidebar-alsh-folder:focus-visible small,
html[data-theme="dark"] .sidebar-alsh-dossier:hover small,
html[data-theme="dark"] .sidebar-alsh-dossier:focus-visible small,
html[data-theme="dark"] .urbanisme-dossier-row:hover .dossier-pill,
html[data-theme="dark"] .urbanisme-dossier-row:focus-visible .dossier-pill,
html[data-theme="dark"] .urbanisme-dossier-tree-root:hover .urbanisme-dossier-tree-count,
html[data-theme="dark"] .urbanisme-dossier-tree-root:focus-visible .urbanisme-dossier-tree-count,
html[data-theme="dark"] .urbanisme-document-row:hover .result-chip,
html[data-theme="dark"] .urbanisme-document-row:focus-visible .result-chip,
html[data-theme="dark"] .urbanisme-result-row:hover .result-chip,
html[data-theme="dark"] .urbanisme-result-row:focus-visible .result-chip,
html[data-theme="dark"] .viewer-file:hover .viewer-chip,
html[data-theme="dark"] .viewer-file:focus-visible .viewer-chip,
html[data-theme="dark"] tr:hover td .badge {
  background: var(--option-hover-chip-bg) !important;
  border-color: var(--option-hover-border) !important;
  color: var(--option-hover-text) !important;
}

.module-button:hover,
.module-button:focus-visible,
.sidebar-urbanisme-child:hover,
.sidebar-urbanisme-child:focus-visible,
.sidebar-urbanisme-child.droppable.drag-over,
.sidebar-alsh-folder:hover,
.sidebar-alsh-folder:focus-visible,
.sidebar-alsh-folder.drag-over,
.sidebar-alsh-dossier:hover,
.sidebar-alsh-dossier:focus-visible,
.sidebar-alsh-dossier.drag-over,
.sidebar-tree-root-label:hover,
.sidebar-tree-root-label:focus-visible,
.sidebar-tree-folder-label:hover,
.sidebar-tree-folder-label:focus-visible,
.sidebar-tree-leaf:hover,
.sidebar-tree-leaf:focus-visible,
.urbanisme-dossier-row:hover,
.urbanisme-dossier-row:focus-visible,
.urbanisme-dossier-tree.file-drag-over > .urbanisme-dossier-tree-root,
.urbanisme-dossier-tree-root:hover,
.urbanisme-dossier-tree-root:focus-visible,
.urbanisme-dossier-tree-file:hover,
.urbanisme-dossier-tree-file:focus-visible,
.urbanisme-dossier-tree-empty:hover,
.urbanisme-dossier-tree-empty:focus-visible,
.urbanisme-document-row:hover,
.urbanisme-document-row:focus-visible,
.urbanisme-result-row:hover,
.urbanisme-result-row:focus-visible,
.tree-folder-label:hover,
.tree-folder-label:focus-visible,
.tree-leaf:hover,
.tree-leaf:focus-visible,
.viewer-file:hover,
.viewer-file:focus-visible,
tr:hover td,
.small-button:hover,
.small-button:focus-visible,
.context-item:hover,
.context-item:focus-visible,
.secondary-button:hover,
.secondary-button:focus-visible,
.ghost-button:hover,
.ghost-button:focus-visible {
  background: var(--option-hover-bg) !important;
  border-color: var(--option-hover-border) !important;
  color: var(--option-hover-text) !important;
}

.module-button:hover *,
.module-button:focus-visible *,
.sidebar-urbanisme-child:hover *,
.sidebar-urbanisme-child:focus-visible *,
.sidebar-urbanisme-child.droppable.drag-over *,
.sidebar-alsh-folder:hover *,
.sidebar-alsh-folder:focus-visible *,
.sidebar-alsh-folder.drag-over *,
.sidebar-alsh-dossier:hover *,
.sidebar-alsh-dossier:focus-visible *,
.sidebar-alsh-dossier.drag-over *,
.sidebar-tree-root-label:hover *,
.sidebar-tree-root-label:focus-visible *,
.sidebar-tree-folder-label:hover *,
.sidebar-tree-folder-label:focus-visible *,
.sidebar-tree-leaf:hover *,
.sidebar-tree-leaf:focus-visible *,
.urbanisme-dossier-row:hover *,
.urbanisme-dossier-row:focus-visible *,
.urbanisme-dossier-tree.file-drag-over > .urbanisme-dossier-tree-root *,
.urbanisme-dossier-tree-root:hover *,
.urbanisme-dossier-tree-root:focus-visible *,
.urbanisme-dossier-tree-file:hover *,
.urbanisme-dossier-tree-file:focus-visible *,
.urbanisme-dossier-tree-empty:hover *,
.urbanisme-dossier-tree-empty:focus-visible *,
.urbanisme-document-row:hover *,
.urbanisme-document-row:focus-visible *,
.urbanisme-result-row:hover *,
.urbanisme-result-row:focus-visible *,
.tree-folder-label:hover *,
.tree-folder-label:focus-visible *,
.tree-leaf:hover *,
.tree-leaf:focus-visible *,
.viewer-file:hover *,
.viewer-file:focus-visible *,
tr:hover td *,
.small-button:hover *,
.small-button:focus-visible *,
.context-item:hover *,
.context-item:focus-visible *,
.secondary-button:hover *,
.secondary-button:focus-visible *,
.ghost-button:hover *,
.ghost-button:focus-visible * {
  color: var(--option-hover-text) !important;
}

.module-button:hover .module-count,
.module-button:focus-visible .module-count,
.sidebar-urbanisme-child:hover .sidebar-urbanisme-child-count,
.sidebar-urbanisme-child:focus-visible .sidebar-urbanisme-child-count,
.sidebar-alsh-folder:hover small,
.sidebar-alsh-folder:focus-visible small,
.sidebar-alsh-dossier:hover small,
.sidebar-alsh-dossier:focus-visible small,
.urbanisme-dossier-row:hover .dossier-pill,
.urbanisme-dossier-row:focus-visible .dossier-pill,
.urbanisme-dossier-tree-root:hover .urbanisme-dossier-tree-count,
.urbanisme-dossier-tree-root:focus-visible .urbanisme-dossier-tree-count,
.urbanisme-document-row:hover .result-chip,
.urbanisme-document-row:focus-visible .result-chip,
.urbanisme-result-row:hover .result-chip,
.urbanisme-result-row:focus-visible .result-chip,
.viewer-file:hover .viewer-chip,
.viewer-file:focus-visible .viewer-chip,
tr:hover td .badge {
  background: var(--option-hover-chip-bg) !important;
  border-color: var(--option-hover-border) !important;
  color: var(--option-hover-text) !important;
}

.sidebar-urbanisme-child:hover::before,
.sidebar-tree-leaf:hover::before {
  border-color: var(--option-hover-border) !important;
}

.sidebar-tree-root-label:hover::before,
.sidebar-tree-folder-label:hover::before,
.urbanisme-dossier-tree-root:hover::before,
.tree-folder-label:hover::before {
  color: var(--option-hover-text) !important;
}

[data-theme="dark"] .modal-backdrop {
  background: rgba(0, 0, 0, 0.52);
}

[data-theme="dark"] .toast {
  background: #eeeeee;
  color: #1a1a1a;
}

[data-theme="dark"] .operation-progress {
  border-color: #414141;
  background: #242424;
}

[data-theme="dark"] .operation-progress-bar {
  background: #3a3a3a;
}

[data-theme="dark"] .operation-progress-bar span {
  background: var(--red-background);
}

[data-theme="dark"] .ged-trash-queue-track {
  background:
    linear-gradient(90deg, rgba(148, 163, 184, 0.1), rgba(148, 163, 184, 0.2)),
    rgba(15, 23, 42, 0.58);
  box-shadow: inset 0 0 0 1px rgba(226, 232, 240, 0.08);
}

[data-theme="dark"] .ged-trash-queue-percent {
  color: #bfdbfe;
}

@media (max-width: 1180px) {
  .urbanisme-ged-section,
  .content-grid {
    grid-template-columns: 1fr;
  }

  .editor-resizer {
    display: none;
  }

  .urbanisme-dossier-tree-file.has-suggestion {
    grid-template-columns: auto minmax(170px, 0.7fr) minmax(280px, 1fr);
  }

  .editor-panel {
    position: static;
  }
}

@media (max-width: 860px) {
  .app-shell {
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  }

  .sidebar-resizer {
    display: none;
  }

  .sidebar {
    grid-column: 1;
    grid-row: 1;
    border-right: 1px solid var(--line);
    border-bottom: 0;
    max-height: none;
    padding: 18px 12px 0;
  }

  .workspace {
    grid-column: 2;
    grid-row: 1;
    padding: 18px;
  }

  .topbar,
  .standalone-viewer-header,
  .table-toolbar,
  .urbanisme-search-bar,
  .urbanisme-viewer-toolbar,
  .vault-header,
  .register-header,
  .register-form,
  .upload-form {
    flex-direction: column;
    align-items: stretch;
  }

  .viewer-grid {
    grid-template-columns: 1fr;
  }

  .file-row {
    grid-template-columns: 1fr;
  }

  .urbanisme-search-bar,
  .urbanisme-dossier-tree-root,
  .urbanisme-document-row,
  .urbanisme-result-row,
  .dossier-file-row {
    grid-template-columns: 1fr;
  }

  .urbanisme-dossier-tree-root::before {
    display: none;
  }

  .urbanisme-dossier-tree-file.has-suggestion {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .urbanisme-dossier-tree-file.has-suggestion .urbanisme-classify-suggestions {
    grid-column: 1 / -1;
  }

  .urbanisme-dossier-tree-children {
    padding-left: 14px;
  }

  .urbanisme-dossier-tree-count,
  .urbanisme-dossier-tree-menu {
    justify-self: start;
  }

  .urbanisme-document-meta,
  .urbanisme-result-meta {
    justify-content: flex-start;
  }

  .dossier-modal {
    width: 100vw;
  }

  .role-rights-modal {
    width: 100vw;
    max-height: 100vh;
    margin: 0;
    border-radius: 0;
  }

  .role-rights-form-summary {
    grid-template-columns: 1fr;
  }

  .dossier-edit-grid {
    grid-template-columns: 1fr;
  }

  .dossier-modal-header,
  .standalone-viewer-actions,
  .dossier-action-row,
  .dossier-edit-actions {
    align-items: stretch;
  }

  .standalone-document-frame {
    height: calc(100vh - 170px);
    min-height: 420px;
  }

  .dossier-action-row,
  .standalone-viewer-actions,
  .dossier-edit-actions {
    flex-direction: column;
  }

  .register-form {
    display: flex;
  }

  .compact {
    max-width: none;
  }
}

.module-button:hover,
.module-button:focus-visible,
.module-button.active,
.sidebar-urbanisme-child:hover,
.sidebar-urbanisme-child:focus-visible,
.sidebar-urbanisme-child.active,
.sidebar-urbanisme-child.droppable.drag-over,
.sidebar-alsh-folder:hover,
.sidebar-alsh-folder:focus-visible,
.sidebar-alsh-folder.active,
.sidebar-alsh-folder.drag-over,
.sidebar-alsh-dossier:hover,
.sidebar-alsh-dossier:focus-visible,
.sidebar-alsh-dossier.active,
.sidebar-alsh-dossier.drag-over,
.sidebar-alsh-child.drag-over,
.sidebar-tree-root-label:hover,
.sidebar-tree-root-label:focus-visible,
.sidebar-tree-root-label.active,
.sidebar-tree-folder-label:hover,
.sidebar-tree-folder-label:focus-visible,
.sidebar-tree-folder-label.active,
.sidebar-tree-leaf:hover,
.sidebar-tree-leaf:focus-visible,
.sidebar-tree-leaf.active,
.tree-folder-label:hover,
.tree-folder-label:focus-visible,
.tree-folder-label.active,
.tree-leaf:hover,
.tree-leaf:focus-visible,
.tree-leaf.active,
.urbanisme-dossier-tree.file-drag-over > .urbanisme-dossier-tree-root,
.urbanisme-dossier-tree-root:hover,
.urbanisme-dossier-tree-root:focus-visible,
.urbanisme-dossier-tree-file:hover,
.urbanisme-dossier-tree-file:focus-visible,
.urbanisme-dossier-tree-empty:hover,
.urbanisme-dossier-tree-empty:focus-visible,
.urbanisme-document-row:hover,
.urbanisme-document-row:focus-visible,
.urbanisme-result-row:hover,
.urbanisme-result-row:focus-visible,
.viewer-file:hover,
.viewer-file:focus-visible,
.context-item:hover {
  background: var(--selection-bg) !important;
  border-color: var(--selection-border) !important;
  color: var(--selection-text) !important;
  text-shadow: none !important;
}

.module-button:hover *,
.module-button:focus-visible *,
.module-button.active *,
.sidebar-urbanisme-child:hover *,
.sidebar-urbanisme-child:focus-visible *,
.sidebar-urbanisme-child.active *,
.sidebar-urbanisme-child.droppable.drag-over *,
.sidebar-alsh-folder:hover *,
.sidebar-alsh-folder:focus-visible *,
.sidebar-alsh-folder.active *,
.sidebar-alsh-folder.drag-over *,
.sidebar-alsh-dossier:hover *,
.sidebar-alsh-dossier:focus-visible *,
.sidebar-alsh-dossier.active *,
.sidebar-alsh-dossier.drag-over *,
.sidebar-alsh-child.drag-over *,
.sidebar-tree-root-label:hover *,
.sidebar-tree-root-label:focus-visible *,
.sidebar-tree-root-label.active *,
.sidebar-tree-folder-label:hover *,
.sidebar-tree-folder-label:focus-visible *,
.sidebar-tree-folder-label.active *,
.sidebar-tree-leaf:hover *,
.sidebar-tree-leaf:focus-visible *,
.sidebar-tree-leaf.active *,
.tree-folder-label:hover *,
.tree-folder-label:focus-visible *,
.tree-folder-label.active *,
.tree-leaf:hover *,
.tree-leaf:focus-visible *,
.tree-leaf.active *,
.urbanisme-dossier-tree.file-drag-over > .urbanisme-dossier-tree-root *,
.urbanisme-dossier-tree-root:hover *,
.urbanisme-dossier-tree-root:focus-visible *,
.urbanisme-dossier-tree-file:hover *,
.urbanisme-dossier-tree-file:focus-visible *,
.urbanisme-dossier-tree-empty:hover *,
.urbanisme-dossier-tree-empty:focus-visible *,
.urbanisme-document-row:hover *,
.urbanisme-document-row:focus-visible *,
.urbanisme-result-row:hover *,
.urbanisme-result-row:focus-visible *,
.viewer-file:hover *,
.viewer-file:focus-visible *,
.context-item:hover * {
  color: var(--selection-text) !important;
  text-shadow: none !important;
}

.module-button:hover .module-count,
.module-button:focus-visible .module-count,
.module-button.active .module-count,
.sidebar-urbanisme-child:hover .sidebar-urbanisme-child-count,
.sidebar-urbanisme-child:focus-visible .sidebar-urbanisme-child-count,
.sidebar-urbanisme-child.active .sidebar-urbanisme-child-count,
.sidebar-urbanisme-child.droppable.drag-over .sidebar-urbanisme-child-count,
.sidebar-alsh-folder:hover small,
.sidebar-alsh-folder:focus-visible small,
.sidebar-alsh-folder.active small,
.sidebar-alsh-folder.drag-over small,
.sidebar-alsh-dossier:hover small,
.sidebar-alsh-dossier:focus-visible small,
.sidebar-alsh-dossier.active small,
.sidebar-alsh-dossier.drag-over small,
.urbanisme-dossier-tree-root:hover .urbanisme-dossier-tree-count,
.urbanisme-dossier-tree-root:focus-visible .urbanisme-dossier-tree-count,
.urbanisme-dossier-tree.file-drag-over > .urbanisme-dossier-tree-root .urbanisme-dossier-tree-count,
.urbanisme-document-row:hover .result-chip,
.urbanisme-document-row:focus-visible .result-chip,
.urbanisme-result-row:hover .result-chip,
.urbanisme-result-row:focus-visible .result-chip,
.viewer-file:hover .viewer-chip {
  background: var(--selection-chip-bg) !important;
  border-color: var(--selection-border) !important;
  color: var(--selection-muted) !important;
}

.module-button.search-match-theme,
.module-button.search-match-theme:hover,
.module-button.search-match-theme:focus-visible,
.module-button.search-match-theme.active {
  background: var(--red-background) !important;
  border-color: var(--red-background) !important;
  box-shadow: none !important;
  color: #fff !important;
  text-shadow: none !important;
}

.conseil-municipal-workflow-button.search-match-theme,
.conseil-municipal-workflow-button.search-match-theme:hover,
.conseil-municipal-workflow-button.search-match-theme:focus-visible,
.conseil-municipal-workflow-button.search-match-theme.active {
  background: var(--red-background) !important;
  color: #fff !important;
}

.conseil-municipal-workflow-button.search-match-theme * {
  color: #fff !important;
}

.module-button.search-match-theme *,
.module-button.search-match-theme:hover *,
.module-button.search-match-theme:focus-visible *,
.module-button.search-match-theme.active * {
  color: #fff !important;
  text-shadow: none !important;
}

.module-button.search-match-theme .module-count,
.module-button.search-match-theme:hover .module-count,
.module-button.search-match-theme:focus-visible .module-count,
.module-button.search-match-theme.active .module-count {
  background: rgba(255, 255, 255, 0.2) !important;
  border-color: rgba(255, 255, 255, 0.28) !important;
  color: #fff !important;
}

.module-button.urbanisme-only-button:not(.search-match-theme) {
  min-height: 38px;
  border: 1px solid color-mix(in srgb, var(--crest-primary) 12%, transparent) !important;
  background:
    linear-gradient(90deg,
      var(--theme-root-wash) 0%,
      color-mix(in srgb, var(--crest-secondary) 4%, var(--panel)) 68%,
      color-mix(in srgb, var(--panel) 86%, transparent) 100%) !important;
  color: var(--theme-root-text) !important;
  box-shadow:
    inset 3px 0 0 color-mix(in srgb, var(--crest-secondary) 78%, var(--crest-primary)),
    0 1px 0 rgba(23, 63, 142, 0.04) !important;
  text-shadow: none !important;
}

.module-button.urbanisme-only-button.open:not(.active):not(.search-match-theme) {
  border-color: color-mix(in srgb, var(--crest-primary) 18%, var(--line)) !important;
  background:
    linear-gradient(90deg,
      color-mix(in srgb, var(--crest-primary) 10%, var(--panel)) 0%,
      color-mix(in srgb, var(--crest-secondary) 6%, var(--panel)) 100%) !important;
}

.module-button.urbanisme-only-button:hover:not(.search-match-theme),
.module-button.urbanisme-only-button:focus-visible:not(.search-match-theme) {
  border-color: color-mix(in srgb, var(--crest-primary) 34%, var(--crest-secondary)) !important;
  background:
    linear-gradient(90deg,
      var(--theme-root-wash-hover) 0%,
      color-mix(in srgb, var(--crest-secondary) 10%, var(--panel)) 100%) !important;
  color: var(--crest-primary-ink) !important;
  box-shadow:
    inset 4px 0 0 var(--crest-secondary),
    0 2px 8px rgba(48, 95, 224, 0.1) !important;
}

.module-button.urbanisme-only-button.active:not(.search-match-theme) {
  border-color: var(--selection-border) !important;
  background: var(--theme-root-active) !important;
  color: var(--crest-primary-ink) !important;
  box-shadow:
    inset 4px 0 0 var(--crest-primary),
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    0 2px 10px rgba(48, 95, 224, 0.14) !important;
}

.module-button.urbanisme-only-button:not(.search-match-theme) * {
  color: inherit !important;
  text-shadow: none !important;
}

.module-button.urbanisme-only-button:not(.search-match-theme) .sidebar-urbanisme-toggle {
  color: var(--theme-root-muted) !important;
  background: var(--theme-root-muted) !important;
}

.module-button.urbanisme-only-button:hover:not(.search-match-theme) .sidebar-urbanisme-toggle,
.module-button.urbanisme-only-button:focus-visible:not(.search-match-theme) .sidebar-urbanisme-toggle,
.module-button.urbanisme-only-button.active:not(.search-match-theme) .sidebar-urbanisme-toggle {
  color: var(--crest-primary-ink) !important;
  background: var(--crest-primary-ink) !important;
}

[data-theme="dark"] .module-button.urbanisme-only-button:not(.search-match-theme) .sidebar-urbanisme-toggle {
  color: var(--theme-root-muted) !important;
  background: var(--theme-root-muted) !important;
}

[data-theme="dark"] .module-button.urbanisme-only-button:hover:not(.search-match-theme) .sidebar-urbanisme-toggle,
[data-theme="dark"] .module-button.urbanisme-only-button:focus-visible:not(.search-match-theme) .sidebar-urbanisme-toggle,
[data-theme="dark"] .module-button.urbanisme-only-button.active:not(.search-match-theme) .sidebar-urbanisme-toggle {
  color: var(--crest-primary-ink) !important;
  background: var(--crest-primary-ink) !important;
}

/* Vue centrale "Détails" : ergonomie proche de l'explorateur Windows. */
body[data-ged-file-explorer-view="details"] .alsh-document-picker {
  gap: 0 !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  scrollbar-gutter: stable;
}

body[data-ged-file-explorer-view="details"] .ged-file-details-header {
  flex: 0 0 auto !important;
  grid-template-columns: var(--ged-file-details-columns, 44px 430px 118px 58px 82px 130px) !important;
  align-items: center !important;
  gap: 8px !important;
  margin: 6px 0 0 !important;
  padding: 5px 6px !important;
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent) !important;
  border-radius: 3px 3px 0 0 !important;
  background: color-mix(in srgb, var(--panel-strong) 88%, #eef3fb 12%) !important;
  box-shadow: none !important;
  color: color-mix(in srgb, var(--muted) 82%, var(--text)) !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  letter-spacing: 0 !important;
  min-width: var(--ged-file-details-total-width, 918px) !important;
  text-transform: none !important;
}

body[data-ged-file-explorer-view="details"] .ged-file-details-header-cell {
  align-items: center !important;
  display: flex !important;
  min-width: 0 !important;
  overflow: visible !important;
  padding-right: 6px !important;
  position: relative !important;
  white-space: nowrap !important;
}

body[data-ged-file-explorer-view="details"] .ged-file-details-sort-button {
  align-items: center !important;
  appearance: none !important;
  background: transparent !important;
  border: 0 !important;
  color: inherit !important;
  cursor: pointer !important;
  display: inline-flex !important;
  font: inherit !important;
  gap: 3px !important;
  min-width: 0 !important;
  padding: 0 !important;
  text-align: left !important;
  width: 100% !important;
}

body[data-ged-file-explorer-view="details"] .ged-file-details-static-header {
  align-items: center !important;
  color: inherit !important;
  display: inline-flex !important;
  font: inherit !important;
  min-width: 0 !important;
  width: 100% !important;
}

body[data-ged-file-explorer-view="details"] .ged-file-details-sort-button:hover,
body[data-ged-file-explorer-view="details"] .ged-file-details-sort-button:focus-visible,
body[data-ged-file-explorer-view="details"] .ged-file-details-sort-button.is-active {
  color: var(--accent) !important;
  outline: none !important;
}

body[data-ged-file-explorer-view="details"] .ged-file-details-header-label {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body[data-ged-file-explorer-view="details"] .ged-file-details-sort-indicator {
  color: var(--accent) !important;
  flex: 0 0 10px !important;
  font-size: 10px !important;
  line-height: 1 !important;
  min-width: 10px !important;
  overflow: visible !important;
  text-align: center !important;
}

body[data-ged-file-explorer-view="details"] .ged-file-details-resizer {
  bottom: -5px !important;
  cursor: col-resize !important;
  position: absolute !important;
  right: -7px !important;
  top: -5px !important;
  width: 14px !important;
  z-index: 4 !important;
}

body[data-ged-file-explorer-view="details"] .ged-file-details-resizer::after {
  background: color-mix(in srgb, var(--line) 90%, transparent) !important;
  bottom: 5px !important;
  content: "" !important;
  display: block !important;
  left: 6px !important;
  position: absolute !important;
  top: 5px !important;
  width: 1px !important;
}

body[data-ged-file-explorer-view="details"] .ged-file-details-resizer:hover::after {
  background: var(--accent) !important;
  width: 2px !important;
}

body.ged-file-column-resizing,
body.ged-file-column-resizing * {
  cursor: col-resize !important;
  user-select: none !important;
}

body[data-ged-file-explorer-view="details"] .alsh-file-list {
  align-content: start !important;
  flex: 1 1 auto !important;
  gap: 0 !important;
  grid-auto-rows: min-content !important;
  padding: 0 !important;
  border: 1px solid color-mix(in srgb, var(--line) 60%, transparent) !important;
  border-top: 0 !important;
  border-radius: 0 0 3px 3px !important;
  background: var(--panel) !important;
  min-width: var(--ged-file-details-total-width, 918px) !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

body[data-ged-file-explorer-view="details"] .alsh-file-list + .ged-file-status-bar {
  min-width: var(--ged-file-details-total-width, 918px) !important;
}

body[data-ged-file-explorer-view="details"] .alsh-file-list:has(+ .ged-file-status-bar) {
  border-radius: 0 !important;
}

body[data-ged-file-explorer-view="details"] .alsh-file-button.urbanisme-dossier-tree-file.ged-file-details-row {
  display: block !important;
  min-height: 24px !important;
  padding: 0 4px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--text) !important;
  line-height: 1.2 !important;
}

body[data-ged-file-explorer-view="details"] .alsh-file-button.urbanisme-dossier-tree-file.ged-file-details-row:nth-child(odd) {
  background: color-mix(in srgb, #dff4ee 42%, var(--panel) 58%) !important;
}

body[data-ged-file-explorer-view="details"] .alsh-file-button.urbanisme-dossier-tree-file.ged-file-details-row:nth-child(even) {
  background: color-mix(in srgb, #eaf2ff 38%, var(--panel) 62%) !important;
}

body[data-ged-file-explorer-view="details"] .alsh-file-button.urbanisme-dossier-tree-file.ged-file-details-row:hover,
body[data-ged-file-explorer-view="details"] .alsh-file-button.urbanisme-dossier-tree-file.ged-file-details-row:focus-visible {
  background: color-mix(in srgb, var(--accent) 9%, transparent) !important;
  border-color: transparent !important;
  color: var(--text) !important;
  outline: none !important;
}

body[data-ged-file-explorer-view="details"] .alsh-file-button.urbanisme-dossier-tree-file.ged-file-details-row.active,
body[data-ged-file-explorer-view="details"] .alsh-file-button.urbanisme-dossier-tree-file.ged-file-details-row.ged-file-drag-selected {
  background: color-mix(in srgb, var(--accent) 14%, transparent) !important;
  box-shadow: inset 2px 0 0 color-mix(in srgb, var(--accent) 70%, transparent) !important;
}

body[data-ged-file-explorer-view="details"] .ged-file-details-grid {
  grid-template-columns: var(--ged-file-details-columns, 44px 430px 118px 58px 82px 130px) !important;
  align-items: center !important;
  gap: 8px !important;
  min-height: 24px !important;
  min-width: var(--ged-file-details-total-width, 918px) !important;
  width: 100% !important;
}

body[data-ged-file-explorer-view="details"] .ged-file-details-cell {
  color: inherit !important;
  font-size: 12px !important;
  line-height: 1.15 !important;
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body[data-ged-file-explorer-view="details"] .ged-file-details-name {
  display: block !important;
}

body[data-ged-file-explorer-view="details"] .ged-file-details-name strong {
  color: var(--text) !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body[data-ged-file-explorer-view="details"] .ged-file-details-visual {
  align-items: center !important;
  display: inline-flex !important;
  justify-content: center !important;
}

body[data-ged-file-explorer-view="details"] .ged-file-name-icon {
  justify-self: start !important;
}

body[data-ged-file-explorer-view="details"] .ged-file-name-icon.urbanisme-file-type-icon {
  min-height: 16px !important;
  min-width: 24px !important;
  padding: 1px 4px !important;
  font-size: 10px !important;
  line-height: 1 !important;
}

body[data-ged-file-explorer-view="details"] .ged-file-name-icon.urbanisme-file-thumb {
  height: 18px !important;
  width: 26px !important;
}

body[data-ged-file-explorer-view="details"] .ged-file-details-imported-at,
body[data-ged-file-explorer-view="details"] .ged-file-details-type,
body[data-ged-file-explorer-view="details"] .ged-file-details-size,
body[data-ged-file-explorer-view="details"] .ged-file-details-owner {
  color: color-mix(in srgb, var(--text) 72%, var(--muted)) !important;
}

/* Barre d'outils centrale : plus fine, moins "boutons Bootstrap". */
.ged-file-selection-toolbar {
  align-items: center !important;
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 6px !important;
  padding: 4px 7px !important;
  border-radius: 7px !important;
  border-color: color-mix(in srgb, var(--line) 72%, transparent) !important;
  background: color-mix(in srgb, var(--panel) 97%, var(--accent) 3%) !important;
  box-shadow: none !important;
}

.ged-file-selection-toolbar .small-button {
  min-height: 24px !important;
  padding: 2px 8px !important;
  border-radius: 5px !important;
  border-color: color-mix(in srgb, var(--line) 88%, transparent) !important;
  background: color-mix(in srgb, var(--panel) 98%, var(--text) 2%) !important;
  box-shadow: none !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  line-height: 1.1 !important;
}

.ged-file-selection-toolbar .small-button:hover,
.ged-file-selection-toolbar .small-button:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 48%, var(--line)) !important;
  background: color-mix(in srgb, var(--panel) 92%, var(--accent) 8%) !important;
}

.ged-file-selection-toolbar .small-button.danger {
  color: color-mix(in srgb, #c81e1e 82%, var(--text)) !important;
}

.ged-file-selection-toolbar .small-button:disabled,
.ged-file-selection-toolbar .small-button[disabled] {
  border-color: color-mix(in srgb, var(--line) 70%, transparent) !important;
  background: color-mix(in srgb, var(--panel) 98%, var(--muted) 2%) !important;
  color: color-mix(in srgb, var(--muted) 62%, transparent) !important;
  cursor: default !important;
  opacity: 0.55 !important;
  pointer-events: none !important;
}

.ged-file-selection-count {
  flex: 0 0 auto !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  margin-right: 4px !important;
  white-space: nowrap !important;
}

.ged-file-status-bar {
  align-items: center !important;
  background: color-mix(in srgb, var(--panel) 96%, var(--accent) 4%) !important;
  border: 1px solid color-mix(in srgb, var(--line) 74%, transparent) !important;
  border-radius: 0 0 6px 6px !important;
  border-top: 0 !important;
  color: color-mix(in srgb, var(--text) 78%, var(--muted)) !important;
  display: flex !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  min-height: 25px !important;
  padding: 3px 9px !important;
  user-select: none !important;
  white-space: nowrap !important;
}

body[data-ged-file-explorer-view="tiles"] .ged-file-status-bar {
  border-top: 1px solid color-mix(in srgb, var(--line) 74%, transparent) !important;
  border-radius: 6px !important;
  margin-top: 2px !important;
}

.ged-central-navigation {
  gap: 3px !important;
}

.ged-file-selection-toolbar .ged-central-nav-button {
  align-items: center !important;
  display: inline-flex !important;
  justify-content: center !important;
  min-height: 23px !important;
  min-width: 28px !important;
  padding: 0 !important;
  font-size: 13px !important;
  font-weight: 700 !important;
}

.ged-file-selection-toolbar .ged-file-view-button {
  min-height: 24px !important;
  min-width: 76px !important;
}

.ged-file-view-group {
  flex: 0 0 auto !important;
  gap: 3px !important;
}

.ged-file-filter-group {
  align-items: center !important;
  display: flex !important;
  flex: 1 1 auto !important;
  gap: 4px !important;
  min-width: 260px !important;
  overflow: hidden !important;
}

.ged-file-filter-input {
  border: 1px solid color-mix(in srgb, var(--line) 84%, transparent) !important;
  border-radius: 5px !important;
  background: color-mix(in srgb, var(--panel) 98%, var(--text) 2%) !important;
  color: var(--text) !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  height: 24px !important;
  min-height: 24px !important;
  padding: 2px 6px !important;
}

.ged-file-filter-input:focus {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line)) !important;
  outline: none !important;
}

.ged-file-filter-name {
  flex: 1 1 150px !important;
  min-width: 92px !important;
}

.ged-file-filter-type {
  flex: 0 1 116px !important;
  min-width: 88px !important;
}

.ged-file-filter-date {
  flex: 0 1 136px !important;
  min-width: 118px !important;
}

.ged-file-view-button.active {
  border-color: color-mix(in srgb, var(--accent) 54%, var(--line)) !important;
  background: color-mix(in srgb, var(--accent) 8%, var(--panel)) !important;
  color: var(--accent-strong) !important;
}

.workflow-tree-delete-backdrop {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.28);
  backdrop-filter: blur(2px);
}

.workflow-tree-delete-modal {
  width: min(620px, calc(100vw - 36px));
  max-height: min(76vh, 680px);
  display: grid;
  grid-template-rows: auto auto minmax(90px, 1fr) auto;
  gap: 12px;
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.42);
  border-radius: 18px;
  background: var(--surface, #fff);
  color: var(--text, #0f172a);
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.26);
}

.workflow-tree-delete-modal * {
  min-width: 0;
}

.workflow-tree-delete-modal h2 {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.workflow-tree-delete-intro {
  margin: 0;
  color: var(--muted, #475569);
  font-size: 0.92rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.workflow-tree-delete-document-list {
  min-height: 0;
  max-height: 42vh;
  overflow: auto;
  overflow-x: hidden;
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.72);
}

.workflow-tree-delete-document {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}

.workflow-tree-delete-document:last-child {
  border-bottom: 0;
}

.workflow-tree-delete-document strong {
  font-size: 0.9rem;
  color: var(--text, #0f172a);
  line-height: 1.25;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.workflow-tree-delete-document span {
  font-size: 0.78rem;
  color: var(--muted, #64748b);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.workflow-tree-delete-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.ged-workflow-trash-wrapper {
  margin-top: 2px;
}

.ged-workflow-trash-node {
  opacity: 0.96;
  grid-template-columns: 16px 17px minmax(0, 1fr) auto;
  gap: 7px;
  width: 100%;
  min-height: 30px;
  padding-left: 6px;
}

.ged-workflow-trash-node .sidebar-trash-icon {
  display: inline-grid;
  place-items: center;
  width: 17px;
  height: 17px;
  font-size: 0;
  line-height: 1;
  color: var(--tree-icon);
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h18'/%3E%3Cpath d='M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2'/%3E%3Cpath d='M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6'/%3E%3Cpath d='M10 11v6'/%3E%3Cpath d='M14 11v6'/%3E%3C/svg%3E") center / 17px 17px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h18'/%3E%3Cpath d='M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2'/%3E%3Cpath d='M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6'/%3E%3Cpath d='M10 11v6'/%3E%3Cpath d='M14 11v6'/%3E%3C/svg%3E") center / 17px 17px no-repeat;
}

.ged-workflow-trash-node .sidebar-urbanisme-child-count {
  justify-self: end;
}

.ged-workflow-trash-node.drag-over {
  outline: 2px solid var(--danger, #dc2626) !important;
  background: color-mix(in srgb, var(--danger, #dc2626) 9%, var(--panel, #fff)) !important;
}

.ged-workflow-trash-node.drag-over * {
  color: var(--danger, #dc2626) !important;
}

.context-item.disabled {
  opacity: 0.62;
  cursor: default;
  pointer-events: none;
}

.conseil-mail-import-viewer-zone {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.conseil-mail-import-list {
  display: grid;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.conseil-mail-import-list-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 22px;
  padding: 3px 8px;
  border: 1px solid color-mix(in srgb, var(--line, #d7e0dc) 78%, transparent);
  border-radius: 8px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent, #2563eb) 8%, var(--panel, #fff)), color-mix(in srgb, #f8fbff 86%, var(--panel, #fff)));
  color: var(--accent-strong, #0f3b82);
  font-size: 0.78rem;
  font-weight: 850;
}

.conseil-mail-import-list-title small {
  flex: 0 0 auto;
  padding: 1px 7px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent, #2563eb) 9%, var(--panel, #fff));
  color: var(--muted, #64748b);
  font-size: 0.7rem;
  font-weight: 800;
}

.conseil-document-list-title {
  margin-top: 2px;
  background: linear-gradient(90deg, color-mix(in srgb, #10b981 8%, var(--panel, #fff)), color-mix(in srgb, #f8fffb 88%, var(--panel, #fff)));
}

.conseil-mail-import-table {
  display: grid;
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line, #d7e0dc);
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel, #fff);
}

.conseil-mail-import-row {
  display: grid;
  grid-template-columns: minmax(142px, 0.7fr) minmax(220px, 1.4fr) minmax(96px, 0.35fr);
  align-items: center;
  min-width: 0;
}

.conseil-mail-import-header {
  background: color-mix(in srgb, var(--accent, #2563eb) 5%, var(--panel, #fff));
  border-bottom: 1px solid var(--line, #d7e0dc);
}

.conseil-mail-import-sort {
  height: 28px;
  min-width: 0;
  padding: 0 9px;
  border: 0;
  border-right: 1px solid var(--line, #d7e0dc);
  background: transparent;
  color: var(--accent-strong, #0f3b82);
  font-size: 0.76rem;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.conseil-mail-import-sort:last-child {
  border-right: 0;
  text-align: right;
}

.conseil-mail-import-item {
  width: 100%;
  min-height: 30px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--line, #d7e0dc) 55%, transparent);
  background: var(--panel, #fff);
  color: var(--text, #0f172a);
  font: inherit;
  text-align: left;
  cursor: default;
}

.conseil-mail-import-item:nth-child(odd) {
  background: color-mix(in srgb, #e9f7f2 56%, var(--panel, #fff));
}

.conseil-mail-import-item:last-child {
  border-bottom: 0;
}

.conseil-mail-import-item:hover,
.conseil-mail-import-item:focus-visible,
.conseil-mail-import-item.active {
  outline: none;
  background: color-mix(in srgb, var(--accent, #2563eb) 12%, var(--panel, #fff));
}

.conseil-mail-import-item.ged-mail-import-selected {
  outline: none;
  background: color-mix(in srgb, var(--accent, #2563eb) 14%, var(--panel, #fff));
  box-shadow:
    inset 3px 0 0 color-mix(in srgb, var(--accent, #2563eb) 82%, transparent),
    0 0 0 1px color-mix(in srgb, var(--accent, #2563eb) 40%, transparent);
}

.conseil-mail-import-cell {
  min-width: 0;
  padding: 5px 9px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.8rem;
}

.conseil-mail-import-attachments {
  text-align: right;
  font-weight: 800;
}

.conseil-mail-import-detail {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.conseil-mail-import-attachments-panel,
.conseil-mail-import-preview-panel {
  min-width: 0;
  border: 1px solid var(--line, #d7e0dc);
  border-radius: 10px;
  background: var(--panel, #fff);
}

.conseil-mail-import-attachments-panel {
  padding: 7px 8px 8px;
}

.conseil-mail-import-detail-heading {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
}

.conseil-mail-import-detail-heading strong {
  min-width: 0;
  overflow: hidden;
  overflow-wrap: anywhere;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--accent-strong, #0f3b82);
  font-size: 0.86rem;
}

.conseil-mail-import-detail-heading span {
  flex: 0 1 auto;
  color: var(--muted, #64748b);
  font-size: 0.75rem;
  text-align: right;
}

.conseil-mail-import-section-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 18px;
  padding: 1px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent, #2563eb) 12%, var(--panel, #fff));
  color: var(--accent-strong, #0f3b82) !important;
  font-size: 0.68rem !important;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.conseil-mail-import-documents-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 20px;
  margin: 0 0 4px;
  color: var(--accent-strong, #0f3b82);
  font-size: 0.76rem;
  font-weight: 850;
}

.conseil-mail-import-documents-heading::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: color-mix(in srgb, var(--line, #d7e0dc) 78%, transparent);
}

.conseil-mail-import-documents-heading small {
  order: 3;
  flex: 0 0 auto;
  color: var(--muted, #64748b);
  font-size: 0.7rem;
  font-weight: 800;
}

.conseil-mail-attachments-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px 6px;
  max-height: 132px;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 1px 4px 1px 1px;
  scrollbar-gutter: stable;
}

.conseil-mail-attachment-tile {
  display: flex;
  gap: 7px;
  align-items: center;
  width: 100%;
  min-height: 24px;
  height: 24px;
  padding: 2px 6px;
  border: 1px solid color-mix(in srgb, var(--line, #d7e0dc) 78%, transparent);
  border-radius: 6px;
  background: color-mix(in srgb, #f8fbff 70%, var(--panel, #fff));
  color: var(--text, #0f172a);
  text-align: left;
  cursor: grab;
}

.conseil-mail-attachment-tile:hover,
.conseil-mail-attachment-tile:focus-visible,
.conseil-mail-attachment-tile.active,
.conseil-mail-attachment-tile.ged-file-drag-selected {
  outline: none;
  border-color: color-mix(in srgb, var(--accent, #2563eb) 45%, var(--line, #d7e0dc));
  background: color-mix(in srgb, var(--accent, #2563eb) 9%, var(--panel, #fff));
}

.conseil-mail-attachment-tile.ged-file-drag-selected {
  box-shadow:
    inset 3px 0 0 color-mix(in srgb, var(--accent, #2563eb) 82%, transparent),
    0 0 0 1px color-mix(in srgb, var(--accent, #2563eb) 42%, transparent);
}

.conseil-mail-attachment-tile .urbanisme-file-visual,
.conseil-mail-attachment-tile .ged-file-name-icon {
  flex: 0 0 auto;
  width: 24px;
  height: 18px;
  font-size: 0.62rem;
}

.conseil-mail-attachment-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.76rem;
  font-weight: 800;
}

.conseil-mail-import-preview-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.conseil-mail-import-preview-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex: 0 0 auto;
  min-height: 26px;
  padding: 4px 10px;
  border-bottom: 1px solid var(--line, #d7e0dc);
  background: color-mix(in srgb, #f8fbff 84%, var(--panel, #fff));
  color: var(--accent-strong, #0f3b82);
  font-size: 0.75rem;
  font-weight: 800;
}

.conseil-mail-import-preview-title small {
  min-width: 0;
  overflow: hidden;
  color: var(--muted, #64748b);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.72rem;
  font-weight: 750;
}

.conseil-mail-import-preview-panel .document-preview,
.conseil-mail-import-preview-panel .document-frame {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
}
