:root {
  color: #18322e;
  background: #f5f6f2;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  --ink: #18322e;
  --muted: #61736f;
  --paper: #ffffff;
  --line: #dbe2dc;
  --green-950: #123c35;
  --green-800: #1b5b4e;
  --green-100: #dcebe3;
  --lime: #d7ef75;
  --red: #a6362d;
  --red-soft: #fce9e6;
  --amber: #8a5b05;
  --amber-soft: #fff4d5;
  --shadow: 0 16px 45px rgb(18 60 53 / 10%);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: var(--green-800); }
:focus-visible { outline: 3px solid #80a900; outline-offset: 2px; }
h1, h2, h3, p { margin-top: 0; }
h1 { color: var(--green-950); font-size: clamp(1.85rem, 3vw, 2.55rem); letter-spacing: -.035em; margin-bottom: .55rem; }
h2 { color: var(--green-950); }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

.sr-only {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.full-state {
  min-height: 100vh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 1rem;
  padding: 2rem;
  color: var(--muted);
}
.spinner {
  display: inline-block;
  width: 1.2rem;
  height: 1.2rem;
  margin-right: .65rem;
  border: 2px solid #b7c6bf;
  border-top-color: var(--green-800);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem 1rem;
  background:
    radial-gradient(circle at 18% 12%, rgb(215 239 117 / 28%), transparent 28rem),
    linear-gradient(135deg, #eff4ed, #f8f5eb);
}
.auth-card {
  width: min(100%, 29rem);
  padding: clamp(1.5rem, 5vw, 2.5rem);
  border: 1px solid rgb(18 60 53 / 10%);
  border-radius: 1.5rem;
  background: rgb(255 255 255 / 94%);
  box-shadow: var(--shadow);
}
.auth-card-wide { width: min(100%, 38rem); }
.brand-mark {
  width: 3.1rem;
  height: 3.1rem;
  display: grid;
  place-items: center;
  margin-bottom: 1.6rem;
  border-radius: 1rem;
  color: var(--green-950);
  background: var(--lime);
  font-weight: 900;
  font-size: 1.35rem;
}
.brand-mark-small { width: 2.4rem; height: 2.4rem; border-radius: .75rem; margin: 0; flex: 0 0 auto; }
.eyebrow {
  margin-bottom: .5rem;
  color: var(--green-800);
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.lede { color: var(--muted); line-height: 1.6; }
.security-note { margin: 1.25rem 0 0; text-align: center; color: var(--muted); font-size: .82rem; }
.enrollment-box { margin: 1.25rem 0; line-height: 1.6; }
.enrollment-box li { margin-bottom: .8rem; }
.secret-code {
  display: block;
  overflow-wrap: anywhere;
  margin-top: .5rem;
  padding: .75rem;
  border-radius: .65rem;
  background: #eef2ed;
  color: var(--green-950);
  font-weight: 700;
  letter-spacing: .08em;
}

.form-stack { display: grid; gap: 1rem; }
.form-stack label, .filter-bar label {
  display: grid;
  gap: .42rem;
  color: #294943;
  font-size: .87rem;
  font-weight: 700;
}
input, select, textarea {
  width: 100%;
  border: 1px solid #b9c8c1;
  border-radius: .7rem;
  padding: .72rem .8rem;
  color: var(--ink);
  background: white;
}
input:disabled, select:disabled, textarea:disabled { color: #73817e; background: #eef1ee; cursor: not-allowed; }
textarea { resize: vertical; }
small { color: var(--muted); font-weight: 500; }
fieldset { margin: 0; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: .75rem; }
legend { padding: 0 .35rem; font-weight: 800; font-size: .87rem; }
.check-row { display: flex !important; align-items: center; gap: .6rem !important; margin: .45rem 0; }
.check-row input { width: 1.1rem; height: 1.1rem; }
.totp-input { font: 700 1.5rem/1 ui-monospace, monospace; letter-spacing: .38em; text-align: center; }

.button {
  min-height: 2.65rem;
  border: 1px solid transparent;
  border-radius: .72rem;
  padding: .65rem 1rem;
  font-weight: 800;
  cursor: pointer;
}
.button:disabled { opacity: .58; cursor: not-allowed; }
.button-primary { color: white; background: var(--green-800); }
.button-primary:hover:not(:disabled) { background: var(--green-950); }
.button-secondary { color: var(--green-950); border-color: #abc0b7; background: white; }
.button-danger { color: white; background: var(--red); }
.button-wide { width: 100%; }

.notice {
  display: flex;
  gap: .4rem;
  flex-direction: column;
  margin: 0 0 1rem;
  padding: .85rem 1rem;
  border-radius: .75rem;
  line-height: 1.45;
}
.notice-error { color: #7d251f; border: 1px solid #efc6c1; background: var(--red-soft); }
.notice-info { color: #254a43; border: 1px solid #bdd3ca; background: #e9f2ee; }
.notice-success { color: #24543f; border: 1px solid #bddbc9; background: #e8f5ed; }
.notice-warning { color: #6f4b0a; border: 1px solid #eed894; background: var(--amber-soft); }

.workspace {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 17.5rem minmax(0, 1fr);
}
.sidebar {
  position: fixed;
  z-index: 20;
  inset: 0 auto 0 0;
  width: 17.5rem;
  display: flex;
  flex-direction: column;
  color: #e9f3ee;
  background: var(--green-950);
  transition: width .18s ease, transform .18s ease;
}
.sidebar-brand { display: flex; align-items: center; gap: .7rem; min-height: 4.8rem; padding: 1rem; border-bottom: 1px solid rgb(255 255 255 / 10%); }
.sidebar-brand .sidebar-label { flex: 1; display: grid; }
.sidebar-brand small { color: #a9c1b9; }
.sidebar .icon-button { color: #d9e8e2; }
.sidebar nav { flex: 1; overflow-y: auto; padding: .8rem; }
.nav-group { margin-bottom: 1.3rem; }
.nav-group h2 { margin: .7rem .65rem; color: #89a99e; font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; }
.nav-link {
  display: flex;
  align-items: center;
  gap: .8rem;
  min-height: 2.8rem;
  margin: .18rem 0;
  padding: .6rem .75rem;
  border-radius: .7rem;
  color: #dbe9e4;
  text-decoration: none;
  font-size: .9rem;
  font-weight: 650;
}
.nav-link:hover { background: rgb(255 255 255 / 8%); }
.nav-link-active { color: var(--green-950); background: var(--lime) !important; }
.operator-card { display: flex; align-items: center; gap: .65rem; padding: .9rem; border-top: 1px solid rgb(255 255 255 / 10%); }
.operator-copy { flex: 1; min-width: 0; display: grid; }
.operator-copy strong { overflow: hidden; text-overflow: ellipsis; font-size: .78rem; }
.operator-copy small { overflow: hidden; text-overflow: ellipsis; color: #9eb8af; font-size: .66rem; }
.avatar { width: 2rem; height: 2rem; display: grid; place-items: center; border-radius: 50%; color: var(--green-950); background: var(--lime); font-weight: 900; }
.workspace-main { grid-column: 2; min-width: 0; padding: clamp(1.25rem, 4vw, 3rem); }
.workspace-collapsed { grid-template-columns: 5rem minmax(0, 1fr); }
.workspace-collapsed .sidebar { width: 5rem; }
.workspace-collapsed .sidebar-label, .workspace-collapsed .avatar { display: none; }
.workspace-collapsed .nav-link, .workspace-collapsed .sidebar-brand, .workspace-collapsed .operator-card { justify-content: center; }
.mobile-header { display: none; }

.page-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 1.5rem; margin-bottom: 1.6rem; }
.page-heading p:not(.eyebrow) { max-width: 48rem; color: var(--muted); line-height: 1.55; }
.filter-bar {
  display: flex;
  align-items: end;
  gap: .8rem;
  margin-bottom: 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--paper);
}
.filter-bar label { min-width: 10rem; flex: 1; }
.table-card, .state-card, .placeholder-card {
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--paper);
  box-shadow: 0 8px 25px rgb(18 60 53 / 5%);
}
.table-summary { padding: .8rem 1rem; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .82rem; font-weight: 700; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .84rem; }
th, td { padding: .8rem 1rem; border-bottom: 1px solid #edf0ed; text-align: left; vertical-align: middle; }
th { color: #536762; background: #f7f9f6; font-size: .72rem; letter-spacing: .04em; text-transform: uppercase; }
tbody tr:last-child td { border-bottom: 0; }
.current-badge { display: block; width: max-content; margin-top: .3rem; padding: .18rem .4rem; border-radius: 999px; color: var(--green-950); background: var(--lime); font-size: .64rem; font-weight: 850; }
.status { display: inline-flex; padding: .23rem .48rem; border-radius: 999px; font-size: .7rem; font-weight: 800; }
.status-active { color: #185139; background: #ddf2e5; }
.status-inactive { color: #6d4440; background: #f2e8e6; }
/* 6.7a — le badge de verrouillage s'empile sous le statut, palette ambre des avertissements. */
.status-locked { display: block; width: max-content; margin-top: .3rem; color: #6f4b0a; background: var(--amber-soft); }
.row-actions { display: flex; justify-content: flex-end; gap: .4rem; }
.state-card { padding: 2rem; text-align: center; color: var(--muted); }
.state-loading { display: flex; align-items: center; justify-content: center; }
.mono-compact { display: block; max-width: 12rem; overflow: hidden; text-overflow: ellipsis; font-family: ui-monospace, monospace; font-size: .75rem; }

.icon-action { position: relative; display: inline-flex; }
.icon-button {
  width: 2.25rem;
  height: 2.25rem;
  display: inline-grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: .62rem;
  color: var(--green-950);
  background: transparent;
  font-weight: 900;
  cursor: pointer;
}
.icon-button:hover:not(:disabled) { border-color: var(--line); background: #eef3ef; }
.icon-button:disabled, .icon-button[aria-disabled="true"] { color: #9ca8a5; cursor: not-allowed; }
.tooltip {
  position: absolute;
  z-index: 60;
  right: 0;
  bottom: calc(100% + .4rem);
  width: max-content;
  max-width: 14rem;
  padding: .38rem .52rem;
  border-radius: .4rem;
  color: white;
  background: #102a26;
  font-size: .7rem;
  font-weight: 650;
  pointer-events: none;
  opacity: 0;
  transform: translateY(.2rem);
  transition: opacity .12s ease, transform .12s ease;
}
.icon-action:hover .tooltip, .icon-action:focus-within .tooltip { opacity: 1; transform: translateY(0); }

.modal-backdrop {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgb(10 33 29 / 58%);
}
.modal {
  width: min(100%, 54rem);
  max-height: min(90vh, 50rem);
  display: flex;
  flex-direction: column;
  border-radius: 1.1rem;
  background: white;
  box-shadow: 0 24px 80px rgb(0 0 0 / 25%);
}
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); }
.modal-header h2 { margin: 0; font-size: 1.25rem; }
.modal-body { overflow-y: auto; padding: 1.25rem; }
.modal-footer { display: flex; justify-content: flex-end; gap: .7rem; padding: 1rem 1.25rem; border-top: 1px solid var(--line); }
.confirmation-details { display: grid; gap: 1rem; margin: 0; }
.confirmation-details div { padding-left: .8rem; border-left: 3px solid var(--line); }
.confirmation-details dt { margin-bottom: .25rem; color: var(--green-950); font-weight: 850; }
.confirmation-details dd { margin: 0; color: var(--muted); line-height: 1.5; }
.confirmation-before-action { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.confirmation-before-action h3 { margin-bottom: .35rem; color: var(--green-950); font-size: 1rem; }
.confirmation-before-action p { color: var(--muted); line-height: 1.5; }
.table-check { display: inline-flex; align-items: center; justify-content: center; }
.table-check input { width: 1.1rem; height: 1.1rem; margin: 0; }
.lifecycle-job-filters .row-actions { flex: 0 0 auto; }
.transient-lifecycle-receipt { max-height: 24rem; margin: .75rem 0; overflow-y: auto; }
.transient-lifecycle-receipt table { background: white; }

.placeholder-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.placeholder-card { min-height: 14rem; padding: 1.5rem; }
.placeholder-card p { color: var(--muted); line-height: 1.55; }
.placeholder-icon { width: 2.3rem; height: 2.3rem; display: grid; place-items: center; margin-bottom: 2rem; border-radius: .7rem; color: var(--green-950); background: var(--lime); font-weight: 900; }
.nav-scrim { display: none; }

/* ── Analysis (Lot 7 M4) ─────────────────────────────────────────────────────────── */
.analysis-filters { flex-direction: column; align-items: stretch; }
.analysis-filter-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: .8rem; }
.analysis-filter-actions { display: flex; justify-content: flex-end; gap: .6rem; }
.analysis-check { display: flex !important; flex-direction: row !important; align-items: center; gap: .5rem; font-weight: 650; }
.analysis-check input { width: auto; }
.analysis-freshness { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .8rem; padding: .6rem 1rem; border: 1px solid var(--line); border-radius: .8rem; background: var(--paper); color: var(--muted); font-size: .82rem; }
.analysis-population { margin: 0 0 1rem; color: var(--muted); font-size: .8rem; }
.analysis-headline { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: .8rem; margin-bottom: 1.2rem; }
.analysis-stat { display: flex; flex-direction: column; gap: .25rem; padding: 1rem; }
.analysis-stat strong { font-size: 1.6rem; }
.analysis-stat span { color: var(--muted); font-size: .78rem; font-weight: 700; }
.analysis-stat small { color: var(--muted); font-size: .68rem; }
.analysis-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr)); gap: 1rem; }
.analysis-panel { padding: 1rem; }
.analysis-panel-head { display: flex; justify-content: space-between; align-items: center; gap: .6rem; margin-bottom: .8rem; }
.analysis-panel-head h2 { margin: 0; font-size: 1rem; }
.analysis-panel-note { color: var(--muted); font-size: .78rem; line-height: 1.5; }
.analysis-distribution ul { display: grid; gap: .45rem; margin: 0 0 .6rem; padding: 0; list-style: none; }
.analysis-distribution li { display: grid; grid-template-columns: minmax(6rem, 1fr) 2fr auto; align-items: center; gap: .6rem; font-size: .8rem; }
.analysis-bar { display: block; height: .55rem; overflow: hidden; border-radius: 999px; background: #eef3ef; }
.analysis-bar span { display: block; height: 100%; border-radius: 999px; background: var(--lime); }
.analysis-bar-cell { min-width: 8rem; }
.analysis-bucket-count { color: var(--muted); font-weight: 700; }
.analysis-big-figure { display: flex; flex-direction: column; gap: .3rem; margin: 0 0 .6rem; }
.analysis-big-figure strong { font-size: 1.9rem; }
.analysis-big-figure span { color: var(--muted); font-size: .8rem; }
.analysis-table-tools { display: flex; flex-wrap: wrap; align-items: end; gap: .8rem; margin-bottom: .8rem; }
.analysis-table-tools label { display: grid; gap: .3rem; font-size: .78rem; font-weight: 700; }
.analysis-column-picker { position: relative; }
.analysis-column-menu { position: absolute; z-index: 40; top: calc(100% + .4rem); right: 0; display: grid; gap: .4rem; width: max-content; max-height: 20rem; overflow-y: auto; padding: .8rem 1rem; }
.analysis-selection { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .8rem; margin-bottom: .8rem; padding: .6rem 1rem; border: 1px dashed var(--line); border-radius: .8rem; color: var(--muted); font-size: .8rem; }
.analysis-pagination { align-items: center; justify-content: center; margin-top: 1rem; }

@media (max-width: 850px) {
  .workspace { display: block; padding-top: 3.8rem; }
  .workspace-main { padding: 1rem; }
  .mobile-header {
    position: fixed;
    z-index: 15;
    inset: 0 0 auto;
    height: 3.8rem;
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .65rem 1rem;
    color: white;
    background: var(--green-950);
  }
  .mobile-header .icon-button { color: white; }
  .mobile-header .icon-button:hover:not(:disabled) {
    border-color: rgb(255 255 255 / 35%);
    background: rgb(255 255 255 / 10%);
  }
  .sidebar, .workspace-collapsed .sidebar { width: min(88vw, 18rem); transform: translateX(-105%); }
  .sidebar-open { transform: translateX(0) !important; }
  .workspace-collapsed .sidebar-label, .workspace-collapsed .avatar { display: initial; }
  .workspace-collapsed .nav-link, .workspace-collapsed .sidebar-brand, .workspace-collapsed .operator-card { justify-content: initial; }
  .nav-scrim { position: fixed; z-index: 18; inset: 0; display: block; width: 100%; border: 0; background: rgb(0 0 0 / 45%); }
  .page-heading { flex-direction: column; }
  .filter-bar { align-items: stretch; flex-direction: column; }
  .filter-bar label { min-width: 0; }
  .analysis-selection .row-actions { width: 100%; flex-wrap: wrap; min-width: 0; }
  .analysis-selection .row-actions > * { flex: 1 1 10rem; min-width: 0; }
  .lifecycle-job-filters .row-actions { width: 100%; flex-wrap: wrap; }
  .lifecycle-job-filters .row-actions > * { flex: 1 1 9rem; }
  .placeholder-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ── Inspection utilisateur (6.2) ─────────────────────────────────────────── */
.detail-section { margin-bottom: 1.25rem; }
.detail-section-heading { padding: 1rem 1rem 0; margin-bottom: 0; }
.detail-section-heading h2 { margin-bottom: .3rem; }
.detail-section-heading p { color: var(--muted); margin-bottom: .6rem; }
.detail-section-idle { color: var(--muted); padding: 0 1rem 1rem; }
.detail-section-body { padding: 0 1rem 1rem; display: grid; gap: .9rem; }
.detail-identity { padding: 0 1rem; }
.detail-step { display: inline-block; margin-right: .55rem; }
.detail-attempt { text-align: start; }
.transcript { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.bubble { max-width: 46rem; border: 1px solid var(--line); border-radius: 14px; padding: .65rem .85rem; background: var(--paper); }
.bubble-inbound { justify-self: start; }
.bubble-outbound { justify-self: end; background: var(--green-100); border-color: transparent; }
.bubble-meta { color: var(--muted); font-size: .82rem; margin-bottom: .3rem; }
.menu-options { margin: .45rem 0 0; padding-inline-start: 1.1rem; color: var(--green-950); }
.menu-options li { border: 1px solid var(--line); border-radius: 8px; padding: .2rem .55rem; margin-bottom: .25rem; list-style: none; background: var(--paper); display: inline-block; margin-inline-end: .35rem; }
.cv-pair { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.cv-pair h4 { color: var(--green-950); margin: 0 0 .35rem; }
.cv-pair section { border: 1px solid var(--line); border-radius: 12px; padding: .7rem .85rem; }

/* ── Bibliothèque média et groupes (6.3/6.4) ──────────────────────── */
.heading-actions, .inline-actions, .member-toolbar, .export-bar, .pagination {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .65rem;
}
.heading-actions { justify-content: flex-end; }
.export-bar {
  justify-content: flex-end;
  margin-bottom: 1rem;
  padding: .75rem 1rem;
  border: 1px solid var(--line);
  border-radius: .85rem;
  background: #eef3ef;
}
.export-bar span { flex: 1; min-width: 15rem; color: var(--muted); font-size: .82rem; }
.export-bar .button { display: inline-flex; align-items: center; text-decoration: none; }
.pagination { justify-content: flex-end; padding: .75rem 1rem; border-top: 1px solid var(--line); }
.pagination span { margin-right: auto; color: var(--muted); font-size: .82rem; }
.pagination .button { min-height: 2.25rem; padding: .4rem .7rem; }
.versions-panel { margin-top: 2rem; }
.versions-panel > h2 { font-size: 1.2rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.form-grid label { display: grid; align-content: start; gap: .42rem; }
.inline-checks { display: flex; flex-wrap: wrap; gap: 1rem; }
.field-help { margin: 0 0 .8rem; color: var(--muted); font-size: .82rem; line-height: 1.5; }
.field-error { color: var(--red); font-size: .78rem; font-weight: 700; }
.file-list { display: grid; gap: .65rem; margin-bottom: .8rem; }
.file-row {
  display: grid;
  grid-template-columns: auto minmax(10rem, 2fr) minmax(8rem, 1fr) minmax(8rem, 1fr) auto auto;
  align-items: end;
  gap: .55rem;
  padding: .7rem;
  border: 1px solid var(--line);
  border-radius: .75rem;
  background: #f8faf8;
}
.file-row > strong { align-self: center; color: var(--green-800); }
.file-row label { display: grid; gap: .3rem; color: var(--muted); font-size: .72rem; font-weight: 700; }
.file-row input { padding: .55rem; font-size: .78rem; }
.reorder-controls { display: flex; }
.upload-button { position: relative; display: inline-flex; align-items: center; }
.button-disabled { opacity: .58; cursor: not-allowed; }
.import-preview { margin-top: 1rem; }
.import-preview .table-scroll { max-height: 18rem; border: 1px solid var(--line); border-radius: .7rem; }

.groups-layout { display: grid; grid-template-columns: minmax(14rem, 20rem) minmax(0, 1fr); gap: 1rem; align-items: start; }
.group-list, .members-panel { min-width: 0; }
.group-list > h2 { font-size: 1.1rem; }
.group-cards { display: grid; gap: .55rem; }
.group-card {
  width: 100%;
  display: grid;
  gap: .45rem;
  padding: .85rem;
  border: 1px solid var(--line);
  border-radius: .85rem;
  color: var(--ink);
  background: var(--paper);
  text-align: left;
  cursor: pointer;
}
.group-card:hover { border-color: #9eb8af; }
.group-card-active { border-color: var(--green-800); box-shadow: inset 4px 0 var(--green-800); }
.group-card > span { display: flex; justify-content: space-between; gap: .5rem; }
.group-card code { color: var(--muted); font-size: .7rem; }
.group-card small { color: var(--amber); font-weight: 750; }
.members-panel { padding: 1rem; border: 1px solid var(--line); border-radius: 1rem; background: var(--paper); box-shadow: 0 8px 25px rgb(18 60 53 / 5%); }
.panel-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1rem; }
.panel-heading h2 { margin-bottom: .35rem; }
.panel-heading p:not(.eyebrow) { margin: 0; color: var(--muted); }
.compact-filter { padding: .75rem; }
.member-toolbar { justify-content: flex-end; margin: 0 0 .8rem; }
.delete-policy { margin-top: 1rem; }

@media (max-width: 1100px) {
  .file-row { grid-template-columns: auto minmax(10rem, 1fr) minmax(8rem, 1fr); }
}

@media (max-width: 850px) {
  .heading-actions { justify-content: flex-start; }
  .form-grid, .groups-layout { grid-template-columns: 1fr; }
  .file-row { grid-template-columns: 1fr; align-items: stretch; }
  .file-row > strong { align-self: auto; }
  .export-bar { justify-content: flex-start; }
  .member-toolbar { justify-content: flex-start; }
}

/* Studio de contenu (Lot 6.4) — onglets, aperçu WhatsApp par langue, cartes de repère. */
.studio-tabs { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1.4rem; border-bottom: 1px solid var(--line); }
.studio-tab {
  padding: .6rem .95rem;
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: .5rem .5rem 0 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}
.studio-tab:hover { color: var(--green-800); }
.studio-tab-active { border-bottom-color: var(--green-800); color: var(--green-800); }
.studio-filters .check-inline { flex: 0 0 auto; flex-direction: row; align-items: center; gap: .45rem; min-width: 0; }
/* Comme les cases de sélection Lifecycle : largeur intrinsèque, jamais les 100 % des inputs. */
.studio-filters .check-inline input { width: 1.1rem; min-width: 1.1rem; }
/* L'amorçage du catalogue : une carte, pas un formulaire de filtre — c'est un acte, pas une vue. */
.studio-import { padding: 1rem 1.1rem; display: grid; gap: .6rem; }
.studio-import p { margin: 0; }
.studio-import .check-inline { flex-direction: row; align-items: center; gap: .45rem; }
.studio-import .check-inline input { width: 1.1rem; min-width: 1.1rem; }
.row-subtle { display: block; margin-top: .2rem; color: var(--muted); font-size: .72rem; }
.lang-chip {
  display: inline-block;
  margin-right: .25rem;
  padding: .14rem .38rem;
  border-radius: .4rem;
  background: #e6efe9;
  color: var(--green-800);
  font-size: .68rem;
  font-weight: 800;
  text-transform: uppercase;
}
.lang-chip-missing { background: #f1eee6; color: var(--muted); opacity: .7; }
.copy-language { padding: .8rem 0; border-bottom: 1px solid var(--line); }
.copy-language label { display: grid; gap: .4rem; margin-bottom: .5rem; }
.copy-previews { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: .8rem; }
.copy-preview { margin: 0; }
.copy-preview figcaption { margin-bottom: .35rem; color: var(--muted); font-size: .74rem; font-weight: 750; }
.copy-preview small { color: var(--muted); font-size: .7rem; }
/* L'aperçu ADM-TEXT-04 : `dir` est posé par le composant, jamais deviné par la mise en page. */
.whatsapp-bubble {
  padding: .6rem .75rem;
  border-radius: .8rem .8rem .8rem .15rem;
  background: #e8f6d8;
  color: #0f2419;
  font-size: .85rem;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.whatsapp-bubble p { margin: 0; }
.whatsapp-bubble small { display: block; margin-top: .25rem; color: #4a6152; }
.cue-card { margin: .8rem 0; padding: .85rem; border: 1px solid var(--line); border-radius: .8rem; background: #f8faf8; }
.cue-card legend { padding: 0 .35rem; color: var(--green-800); font-weight: 800; }
.cue-card label { display: grid; gap: .35rem; margin-bottom: .55rem; }

/* Garde-fous (6.7a) — formulaire des réglages, accès global, panneaux d'état isolés. */
.safeguards-form, .safeguards-grant, .safeguards-unavailable { margin-bottom: 1.4rem; padding: 1rem 1.1rem; display: grid; gap: .6rem; }
.safeguards-form h2, .safeguards-grant h2, .safeguards-status h2 { margin: 0; font-size: 1.05rem; }
.safeguards-grant p, .safeguards-unavailable p { margin: 0; }
.provenance-note { margin: 0; color: var(--muted); font-size: .8rem; }
/* Les bornes du §23.2 restent visibles à côté du champ, dans la même voix que le refus serveur. */
.bounds-hint { margin: 0; color: var(--muted); font-size: .74rem; }
.safeguards-status { margin-top: 1.4rem; display: grid; gap: .8rem; }
.safeguards-panels { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: .8rem; }
.safeguards-panel { padding: 1rem 1.1rem; display: grid; gap: .45rem; align-content: start; }
.safeguards-panel h3 { margin: 0; font-size: .95rem; }
.safeguards-panel p { margin: 0; font-size: .85rem; }
/* Un panneau indisponible est une étiquette assumée, jamais une page blanche (ADM-DASH-08). */
.panel-unavailable { color: var(--muted); }
.panel-unavailable h3 { color: var(--muted); }
