[hidden] { display: none !important; }

.loading-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px;
}
.loading-card {
  background: var(--surface); border-radius: var(--radius); padding: 20px; border: 1px solid var(--line);
}
.loading-shimmer {
  background: linear-gradient(90deg, var(--line) 25%, var(--bg) 50%, var(--line) 75%);
  background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: 4px; margin-bottom: 10px;
}
.loading-shimmer:last-child { margin-bottom: 0; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.loading-list {
  display: flex; flex-direction: column; gap: 10px;
}
.loading-list-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px;
}
.loading-list-row .loading-shimmer { margin-bottom: 0; }

:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-soft: #f9fbff;
  --ink: #16202f;
  --muted: #607086;
  --line: #dfe6ef;
  --line-strong: #c8d3df;
  --brand: #0f766e;
  --brand-strong: #115e59;
  --accent: #2563eb;
  --warning: #b45309;
  --danger: #b42318;
  --success: #15803d;
  --ceh: #0f766e;
  --ses: #d97706;
  --shadow: 0 18px 45px rgba(31, 45, 61, 0.12);
  --radius: 8px;
  --sidebar-width: 280px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

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

body.auth-active {
  overflow: hidden;
}

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

button {
  cursor: pointer;
}

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

.app-shell.is-locked {
  display: none;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.12), transparent 34%),
    linear-gradient(315deg, rgba(37, 99, 235, 0.12), transparent 36%),
    var(--bg);
}

.login-screen.is-hidden {
  display: none;
}

.login-panel {
  width: min(460px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.login-form {
  display: grid;
  gap: 14px;
}

.login-form input,
.login-form select {
  min-height: 44px;
  padding: 0 12px;
}

.login-form .primary-button {
  margin-top: 4px;
}

.login-hint {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: var(--surface-soft);
}

.login-hint p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 18px;
  background: #0f172a;
  color: #eef6ff;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #10b981, #2563eb);
  color: white;
  font-weight: 800;
}

.brand-logo {
  width: 56px;
  height: 44px;
  object-fit: contain;
  border-radius: var(--radius);
}

/* Logo dans la page de login : plus grand que dans la sidebar pour donner
   de la présence visuelle à l'écran d'authentification. */
.login-brand .brand-logo {
  width: 80px;
  height: 64px;
}

.brand-block strong,
.brand-block span {
  display: block;
}

.brand-block span,
.panel-label {
  color: #aab8cd;
  font-size: 0.82rem;
}

.nav-stack {
  display: grid;
  gap: 8px;
}

.nav-item {
  border: 1px solid transparent;
  background: transparent;
  color: #c7d4e7;
  text-align: left;
  min-height: 42px;
  border-radius: var(--radius);
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-item:hover,
.nav-item.is-active {
  background: rgba(255, 255, 255, 0.09);
  color: white;
  border-color: rgba(255, 255, 255, 0.1);
}

.nav-icon {
  width: 22px;
  text-align: center;
  color: #93c5fd;
}
.nav-icon svg {
  display: block;
  margin: 0 auto;
  vertical-align: middle;
}

.main-shell {
  padding: 24px;
  min-width: 0;
}

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

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0;
  font-weight: 700;
  font-size: 0.74rem;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(1.55rem, 2.4vw, 2.35rem);
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 1.08rem;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  font-size: 1rem;
}

.topbar-actions,
.toolbar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.user-menu {
  position: relative;
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px 0 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
}

.user-menu span {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #e7f7f4;
  color: var(--brand-strong);
  font-size: 0.78rem;
  font-weight: 900;
  pointer-events: none;
}

.user-menu strong,
.user-menu small {
  display: block;
  line-height: 1.1;
  pointer-events: none;
}

.user-menu small {
  color: var(--muted);
  font-size: 0.74rem;
}

.user-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 180px;
  margin-top: 4px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
  z-index: 100;
}

.user-dropdown.is-open {
  display: block;
}

.dropdown-item {
  padding: 10px 14px;
  font-size: .87rem;
  cursor: pointer;
  color: var(--ink);
}

.dropdown-item:hover {
  background: var(--hover);
}

.dropdown-divider {
  height: 1px;
  background: var(--line);
  margin: 4px 0;
}

.primary-button,
.ghost-button,
.text-button,
.icon-button,
.copy-button,
.quick-button {
  border-radius: var(--radius);
  min-height: 40px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  padding: 0 14px;
  font-weight: 700;
}

.primary-button {
  background: var(--brand);
  color: white;
  border-color: var(--brand);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.primary-button:hover {
  background: var(--brand-strong);
}

.ghost-button:hover,
.text-button:hover,
.icon-button:hover,
.quick-button:hover {
  border-color: var(--line-strong);
  background: var(--surface-soft);
}

.text-button {
  color: var(--accent);
  border-color: transparent;
  background: transparent;
}

.icon-button {
  width: 40px;
  padding: 0;
  display: grid;
  place-items: center;
  font-size: 1.25rem;
}

.screen {
  display: none;
}

.screen.is-visible {
  display: block;
}

.filter-band,
.content-panel,
.preview-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.filter-band {
  padding: 16px;
  margin-bottom: 16px;
  display: grid;
  gap: 14px;
}

.search-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 12px;
  background: var(--surface-soft);
}

.search-wrap span {
  color: var(--muted);
  font-size: 1.25rem;
  display: inline-flex;
  align-items: center;
}

.search-wrap input {
  border: 0;
  outline: 0;
  width: 100%;
  background: transparent;
  min-height: 42px;
}

.filters-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 10px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

select,
input,
textarea {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
}

select {
  min-height: 40px;
  padding: 0 10px;
}

textarea {
  width: 100%;
  resize: vertical;
  min-height: 150px;
  padding: 12px;
  line-height: 1.5;
}

.segmented-control {
  display: inline-flex;
  padding: 3px;
  background: #e9eef6;
  border-radius: var(--radius);
}

.segmented-control button {
  border: 0;
  background: transparent;
  border-radius: 6px;
  min-height: 34px;
  padding: 0 12px;
  color: var(--muted);
  font-weight: 700;
}

.segmented-control button.is-active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.12);
}

.library-layout {
  display: block;
}

.content-panel {
  padding: 16px;
  min-width: 0;
}

.content-panel.wide {
  grid-column: 1 / -1;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.template-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.template-grid.list-mode {
  grid-template-columns: 1fr;
}

.template-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 14px;
  display: grid;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.template-card:hover {
  border-color: var(--brand);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.08);
}

.template-card:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
  gap: 12px;
  min-height: 238px;
}

.template-card:hover,
.template-card.is-selected {
  border-color: #92b8ff;
  box-shadow: 0 10px 26px rgba(37, 99, 235, 0.1);
}

.template-card.list-card {
  min-height: auto;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.card-top,
.card-actions,
.meta-row,
.chip-row,
.preview-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 25px;
}

.card-top {
  justify-content: space-between;
}

.card-title {
  min-width: 0;
}

.card-title strong {
  display: block;
  overflow-wrap: anywhere;
}

.card-title span {
  color: var(--muted);
  font-size: 0.84rem;
}

.favorite-button {
  width: 34px;
  height: 34px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: #8795a7;
}

.favorite-button.is-active {
  color: #d97706;
  border-color: #f7c66b;
  background: #fff7e6;
}

.status-pill,
.channel-pill,
.tag-pill,
.crm-chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 9px;
  font-size: 0.76rem;
  font-weight: 800;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--muted);
}

.status-pill.Validé {
  color: var(--success);
  background: #eaf8ef;
  border-color: #bce8c9;
}

.status-pill.Brouillon {
  color: var(--warning);
  background: #fff7ed;
  border-color: #fed7aa;
}

.status-pill.Archivé {
  color: #64748b;
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.template-snippet {
  color: var(--muted);
  line-height: 1.45;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.score-line {
  display: grid;
  gap: 6px;
}

.score-head {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.score-bar {
  height: 8px;
  background: #e8edf4;
  border-radius: 999px;
  overflow: hidden;
}

.score-bar span {
  display: block;
  height: 100%;
  width: var(--score);
  background: linear-gradient(90deg, var(--brand), var(--accent));
}

.copy-button {
  background: #eef8f6;
  color: var(--brand-strong);
  border-color: #b7e5db;
}

.quick-button {
  min-height: 36px;
}

.preview-panel {
  position: sticky;
  top: 24px;
  min-height: 620px;
  padding: 16px;
}

.empty-preview {
  min-height: 580px;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
  align-content: center;
  gap: 8px;
}

.empty-preview span {
  font-size: 2rem;
}

.preview-content {
  display: grid;
  gap: 14px;
}

.preview-subject,
.preview-message {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  padding: 12px;
  line-height: 1.5;
}

.variable-token {
  color: var(--accent);
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  padding: 0 4px;
  font-weight: 800;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.34);
  z-index: 20;
}

.template-drawer {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -45%) scale(0.96);
  width: min(960px, calc(100vw - 32px));
  max-height: calc(100vh - 24px);
  background: var(--surface);
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.32);
  border-radius: 14px;
  z-index: 30;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  padding: 22px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

#drawerBody {
  flex: 1;
  overflow-y: auto;
  padding-right: 4px;
}

#drawerBody textarea {
  min-height: 120px;
}

.template-drawer.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.drawer-grid,
.variable-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.drawer-grid label,
.variable-grid label {
  font-size: 0.8rem;
}

.drawer-grid input,
.variable-grid input {
  min-height: 40px;
  padding: 0 10px;
}

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

.version-list,
.rank-list,
.timeline-list,
.process-list {
  display: grid;
  gap: 10px;
}

.version-item,
.rank-item,
.timeline-item,
.process-list article,
.schema-grid article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: var(--surface-soft);
}

.rank-item,
.timeline-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.rank-item p,
.timeline-item p,
.schema-grid p,
.process-list p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.45;
}


.architecture-map,
.schema-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.architecture-map div {
  min-height: 68px;
  display: grid;
  place-items: center;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff, #f6f9fd);
  font-weight: 800;
}

.wireframe-stack {
  display: grid;
  grid-template-columns: 1.35fr 0.75fr;
  gap: 12px;
  align-items: end;
}

.wireframe {
  border: 2px solid #b9c7d8;
  border-radius: var(--radius);
  padding: 12px;
  min-height: 260px;
  background: #f8fafc;
}

.wireframe.compact {
  min-height: 260px;
}

.wireframe span {
  color: var(--muted);
  font-weight: 800;
  font-size: 0.78rem;
}

.wf-top,
.wf-grid div,
.wf-columns div {
  border-radius: 6px;
  background: #dce5f0;
}

.wf-top {
  height: 36px;
  margin: 10px 0;
}

.wf-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}

.wf-grid.single {
  grid-template-columns: 1fr;
}

.wf-grid div {
  height: 52px;
}

.wf-columns {
  display: grid;
  grid-template-columns: 1fr 0.55fr;
  gap: 8px;
}

.wf-columns.single {
  grid-template-columns: 1fr;
}

.wf-columns div {
  height: 118px;
}

.crm-flow {
  display: grid;
  grid-template-columns: minmax(180px, 260px) 1fr minmax(280px, 1fr);
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.flow-node,
.flow-grid div {
  min-height: 72px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  text-align: center;
  font-weight: 800;
  background: var(--surface-soft);
}

.flow-node.source {
  background: #e7f7f4;
  border-color: #b7e5db;
  color: var(--brand-strong);
}

.flow-line {
  height: 2px;
  background: var(--line-strong);
}

.flow-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 24px);
  background: #0f172a;
  color: white;
  border-radius: var(--radius);
  padding: 12px 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 50;
  box-shadow: var(--shadow);
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 1180px) {
  .filters-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .library-layout {
    grid-template-columns: 1fr;
  }

  .preview-panel {
    position: static;
    min-height: auto;
  }

  .empty-preview {
    min-height: 220px;
  }
}

@media (max-width: 920px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .nav-stack {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .nav-item {
    justify-content: center;
  }

  .blueprint-layout,
  .template-grid {
    grid-template-columns: 1fr;
  }

  .wireframe-stack,
  .crm-flow {
    grid-template-columns: 1fr;
  }

  .flow-line {
    height: 28px;
    width: 2px;
    justify-self: center;
  }
}

@media (max-width: 680px) {
  .main-shell {
    padding: 14px;
  }

  .topbar {
    display: grid;
  }

  .topbar-actions,
  .toolbar-row {
    width: 100%;
  }

  .topbar-actions > *,
  .toolbar-row > * {
    flex: 1;
  }

  .filters-grid,
  .drawer-grid,
  .variable-grid,
  .architecture-map,
  .schema-grid,
  .flow-grid {
    grid-template-columns: 1fr;
  }

  .nav-stack {
    grid-template-columns: 1fr 1fr;
  }

  .template-card.list-card {
    grid-template-columns: 1fr;
  }
}

.channel-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
}
.channel-header.phone { background: #e8f5e9; color: #2e7d32; }
.channel-header.email { background: #e3f2fd; color: #1565c0; }
.channel-header.whatsapp { background: #e0f7fa; color: #00796b; }
.channel-icon { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; }

.admin-form { max-width: 800px; }
.admin-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
.admin-form-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; color: var(--ink); }
.admin-form-grid input,
.admin-form-grid select { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; background: var(--surface); color: var(--ink); }
.admin-form-grid input:focus,
.admin-form-grid select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12); }
#screen-admin { padding: 32px; }

.admin-tabs { display: flex; gap: 0; margin-bottom: 24px; border-bottom: 2px solid var(--line); }
.admin-tab { padding: 10px 20px; background: none; border: none; font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; }
.admin-tab.is-active { color: var(--ink); border-bottom-color: var(--brand); }

.full-input { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; background: var(--surface); color: var(--ink); }
.full-input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12); }

.taxo-picker { margin-bottom: 20px; max-width: 320px; }
.taxo-picker label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; color: var(--ink); }
.taxo-picker select { padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; background: var(--surface); color: var(--ink); }
.taxo-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 20px; }
.taxo-add-form { display: flex; gap: 8px; margin-bottom: 16px; }
.taxo-add-form input { flex: 1; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; background: var(--bg); color: var(--ink); }
.taxo-add-form input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12); }
.taxo-terms-list { display: flex; flex-direction: column; gap: 4px; }
.taxo-term-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); }
.taxo-term-row .term-delete { background: none; border: none; color: #ef4444; cursor: pointer; font-size: 18px; font-weight: 700; padding: 0 4px; line-height: 1; }
.taxo-term-row .term-delete:hover { color: #dc2626; }

.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th { text-align: left; padding: 10px 12px; border-bottom: 2px solid var(--line); font-weight: 600; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.admin-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); }
.admin-table tbody tr:hover { background: var(--surface-soft); }
.admin-actions { display: flex; gap: 8px; justify-content: flex-end; }

.pagination { display: flex; align-items: center; justify-content: center; gap: 4px; margin-top: 24px; padding: 12px 0; }
.page-btn { min-width: 36px; height: 36px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); font-size: 14px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0 8px; transition: background .15s, border-color .15s; }
.page-arrow { font-size: 20px; font-weight: 700; }
.page-btn:hover:not(:disabled) { background: var(--brand); color: #fff; border-color: var(--brand); }
.page-btn:disabled { opacity: .4; cursor: default; }
.page-btn.is-current { background: var(--brand); color: #fff; border-color: var(--brand); font-weight: 600; }
.page-dots { padding: 0 4px; color: var(--muted); font-size: 14px; }
.text-button.is-active { background: var(--brand); color: #fff; border-color: var(--brand); font-weight: 600; }

/* ─── Documents ────────────────────────────────────── */
.doc-card { cursor: pointer; }
.doc-card:hover { border-color: var(--brand); }
.doc-card-header { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.doc-icon { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; background: var(--surface-soft); border-radius: var(--radius); flex-shrink: 0; color: var(--brand); }
.doc-category { display: inline-block; font-size: 12px; color: #2563eb; background: #eef2ff; padding: 2px 8px; border-radius: 4px; margin-top: 2px; font-weight: 500; }
.ressource-badge { display: inline-block; font-size: 12px; color: #7c3aed; background: #f5f3ff; padding: 2px 8px; border-radius: 4px; margin-top: 2px; font-weight: 500; }
.company-badge { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 4px; margin-top: 2px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px; }
.doc-meta { margin-top: 8px; font-size: 12px; color: var(--muted); }

.web-card { cursor: pointer; }
.web-card:hover { border-color: var(--brand); }
.web-card-header { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.web-icon { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; background: var(--surface-soft); border-radius: var(--radius); flex-shrink: 0; color: var(--brand); }
.web-category { display: inline-block; font-size: 12px; color: #2563eb; background: #eef2ff; padding: 2px 8px; border-radius: 4px; margin-top: 2px; font-weight: 500; }
.company-badge[data-company="CEH"], .company-badge:not([data-company="SES"]):not([data-company=""]) { color: #0f766e; background: #e6f4f1; }
.company-badge[data-company="SES"] { color: #d97706; background: #fef3c7; }
.copy-link-btn { margin-left: auto; font-size: 12px; background: var(--brand); border: none; border-radius: 4px; padding: 4px 12px; cursor: pointer; color: #fff; font-weight: 600; white-space: nowrap; flex-shrink: 0; }
.copy-link-btn:hover { opacity: 0.85; }
#docViewerContainer { padding: 0 4px; }
