:root {
  --navy: #17365d;
  --blue: #2f6fab;
  --blue-strong: #176eb3;
  --surface: #ffffff;
  --page: #f3f7fb;
  --soft: #f8fafc;
  --line: #dce5ef;
  --muted: #607188;
  --text: #24384f;
  --green: #2a7e5a;
  --green-soft: #e3f3e9;
  --orange: #cf7c1f;
  --orange-soft: #fff0d5;
  --red: #b04848;
  --red-soft: #f7dddd;
  --purple: #7351a2;
  --shadow: 0 18px 50px rgba(23, 54, 93, 0.14);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  font-family: "Segoe UI", Inter, Arial, sans-serif;
  color: var(--text);
  background: var(--page);
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
.is-hidden { display: none !important; }
.mobile-only { display: none; }

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    radial-gradient(circle at 18% 20%, rgba(47,111,171,.18), transparent 30%),
    radial-gradient(circle at 84% 82%, rgba(42,126,90,.12), transparent 31%),
    linear-gradient(135deg, #eef5fb, #f9fbfd);
}
.login-card {
  width: min(860px, 100%);
  min-height: 510px;
  display: grid;
  grid-template-columns: 310px 1fr;
  overflow: hidden;
  border: 1px solid rgba(23,54,93,.1);
  border-radius: 26px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.login-brand {
  display: grid;
  place-items: center;
  background: linear-gradient(155deg, var(--navy), #235b91);
}
.brand-mark {
  width: 150px;
  height: 150px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(255,255,255,.72);
  border-radius: 36px;
  color: #fff;
  font-size: 38px;
  font-weight: 700;
  letter-spacing: .08em;
  box-shadow: inset 0 0 0 10px rgba(255,255,255,.08);
}
.login-logo {
  width: min(225px, 74%);
  height: auto;
  max-height: 255px;
  padding: 9px;
  border: 1px solid rgba(255,255,255,.88);
  border-radius: 28px;
  background: #fff;
  object-fit: contain;
  box-shadow: 0 16px 30px rgba(5,25,48,.32), inset 0 0 0 1px rgba(23,54,93,.06);
}
.login-content { padding: 58px 56px; }
.eyebrow {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .11em;
}
.login-content h1 { margin: 0; color: var(--navy); font-size: 30px; line-height: 1.2; }
.login-intro { margin: 16px 0 28px; color: var(--muted); line-height: 1.55; }
label { display: block; margin: 18px 0 7px; color: var(--navy); font-weight: 600; }
input, select, textarea {
  width: 100%;
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid #c9d6e3;
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  outline: none;
}
textarea { resize: vertical; line-height: 1.4; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(47,111,171,.13); }
.form-error { min-height: 22px; margin: 14px 0 2px; color: #a32e2e; }
.security-note { margin: 18px 0 0; color: var(--muted); font-size: 13px; }

.primary-button, .secondary-button, .icon-button {
  border: 0;
  border-radius: 10px;
  font-weight: 650;
}
.primary-button {
  min-height: 42px;
  padding: 10px 20px;
  background: var(--blue-strong);
  color: #fff;
}
.primary-button:hover { filter: brightness(.96); }
.primary-button:disabled { opacity: .55; }
.secondary-button {
  min-height: 38px;
  padding: 8px 15px;
  border: 1px solid #cbd8e5;
  background: #fff;
  color: var(--navy);
}
.icon-button {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: transparent;
  color: var(--navy);
  font-size: 25px;
}

.app-shell { min-height: 100vh; display: grid; grid-template-rows: 86px 1fr 28px; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 18px 0 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(12px);
}
.topbar-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.topbar-logo {
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  padding: 3px;
  border: 1px solid #d2dce7;
  border-radius: 14px;
  background: #fff;
  object-fit: contain;
  box-shadow: 0 4px 12px rgba(23,54,93,.12);
}
.app-title { margin: 0; color: var(--navy); font-size: 20px; font-weight: 700; }
.app-subtitle { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.user-area { display: flex; align-items: center; gap: 10px; }
.user-badge {
  min-width: 240px;
  padding: 14px 18px;
  text-align: center;
  border-radius: 13px;
  background: #eaf3fc;
  color: var(--navy);
  font-weight: 650;
}
.workspace { min-height: 0; display: grid; grid-template-columns: 165px 1fr; }
.sidebar {
  position: sticky;
  top: 86px;
  height: calc(100vh - 114px);
  overflow-y: auto;
  padding: 10px 10px 18px;
  border-right: 1px solid var(--line);
  background: #fff;
}
.nav-section { margin: 14px 3px 6px; color: #728199; font-size: 11px; letter-spacing: .06em; }
.nav-button {
  width: 100%;
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 8px;
  border: 0;
  border-bottom: 1px solid #d5e1ec;
  background: #fff;
  color: var(--navy);
  text-align: left;
  font-size: 12px;
}
.nav-button span { width: 18px; text-align: center; font-size: 17px; }
.nav-button:hover:not(:disabled):not(.is-active) { background: #e3edf7; color: var(--navy); }
.nav-button.is-active:hover:not(:disabled) { background: #244b76; color: #fff; }
.nav-button.is-active { border-radius: 7px; background: var(--navy); color: #fff; font-weight: 700; }
.nav-button.is-disabled { color: #9aa8b7; opacity: .7; }
.pilot-box {
  margin: 24px 2px 0;
  padding: 12px;
  border: 1px solid #f1d39e;
  border-radius: 11px;
  background: #fff7e8;
  color: #775118;
  font-size: 11px;
  line-height: 1.4;
}
.pilot-box strong, .pilot-box span { display: block; }
.pilot-box span { margin-top: 4px; }
.main-content { min-width: 0; padding: 25px 28px 34px; outline: none; }
.statusbar {
  position: sticky;
  bottom: 0;
  z-index: 15;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 14px;
  border-top: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-size: 11px;
}
.statusbar .sensitive-warning { margin-left: auto; color: #a52424; }

.page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}
.page-heading h1 { margin: 0; color: var(--navy); font-size: 28px; }
.page-heading p { margin: 5px 0 0; color: var(--muted); }
.date-chip, .read-only-chip {
  flex: 0 0 auto;
  min-width: 210px;
  padding: 18px 20px;
  border: 1px solid #ebf0f5;
  border-radius: 14px;
  background: #fff;
  color: var(--navy);
  text-align: center;
  font-weight: 650;
}
.read-only-chip { min-width: auto; padding: 10px 14px; background: #fff7e8; color: #775118; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; }
.metric-card {
  min-height: 115px;
  display: grid;
  grid-template-columns: 46px 1fr;
  align-items: center;
  gap: 14px;
  padding: 17px;
  border: 1px solid #edf1f5;
  border-radius: 15px;
  background: #fff;
}
.metric-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  font-size: 23px;
  font-weight: 700;
}
.metric-value { color: var(--navy); font-size: 27px; font-weight: 700; line-height: 1; }
.metric-label { margin-top: 6px; color: var(--text); font-weight: 650; }
.metric-note { margin-top: 4px; color: var(--muted); font-size: 12px; }
.metric-green .metric-icon { background: #bfe8d0; color: var(--green); }
.metric-blue .metric-icon { background: #c9e0f5; color: var(--blue); }
.metric-orange .metric-icon { background: #f8d6a7; color: var(--orange); }
.metric-red .metric-icon { background: #edc1c1; color: var(--red); }

.dashboard-grid { display: grid; grid-template-columns: minmax(0,2.1fr) minmax(300px,1fr); gap: 16px; margin-top: 16px; }
.panel {
  padding: 19px;
  border: 1px solid #e9eef4;
  border-radius: 15px;
  background: #fff;
}
.panel h2 { margin: 0 0 13px; color: var(--navy); font-size: 18px; }
.status-list { display: grid; gap: 9px; }
.status-row {
  min-height: 83px;
  display: grid;
  grid-template-columns: 5px 42px 1fr auto;
  align-items: center;
  gap: 13px;
  overflow: hidden;
  border-radius: 12px;
  background: var(--soft);
}
.status-stripe { height: 100%; }
.status-row-icon { font-size: 20px; text-align: center; }
.status-row strong { display: block; color: var(--navy); }
.status-row small { display: block; margin-top: 4px; color: var(--muted); }
.status-badge { margin-right: 12px; padding: 13px 16px; border-radius: 11px; background: var(--green-soft); color: var(--green); font-size: 11px; font-weight: 700; text-align: center; }
.todo-list { display: grid; gap: 9px; }
.todo-row { min-height: 104px; display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 12px; background: var(--soft); color: #3f5269; }
.todo-icon { flex: 0 0 28px; font-size: 22px; text-align: center; }
.quick-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.quick-actions .secondary-button, .quick-actions .primary-button { min-width: 160px; }

/* Tableau de bord opérationnel V35. */
.dashboard-page-heading { align-items: center; }
.dashboard-page-heading .eyebrow { margin: 0 0 4px; color: #3c6d94; font-size: 10px; font-weight: 900; letter-spacing: .09em; }
.dashboard-date-block { display: grid; min-width: 290px; gap: 5px; padding: 14px 18px; border: 1px solid #dbe6ef; border-radius: 14px; background: #fff; color: var(--navy); text-align: center; }
.dashboard-date-block strong { font-size: 14px; }
.dashboard-date-block small { color: var(--muted); font-size: 10.5px; }
.dashboard-metric-button { position: relative; width: 100%; color: inherit; font: inherit; text-align: left; cursor: pointer; transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease; }
.dashboard-metric-button:hover { transform: translateY(-2px); border-color: #a9c2d7; box-shadow: 0 10px 24px rgba(23,54,93,.1); }
.dashboard-metric-button:focus-visible { outline: 3px solid rgba(47,111,171,.25); outline-offset: 2px; }
.dashboard-card-arrow { position: absolute; top: 50%; right: 12px; color: #7d94a8; font-size: 24px; transform: translateY(-50%); }
.dashboard-operational-grid { align-items: start; }
.dashboard-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 13px; }
.dashboard-panel-heading h2 { margin: 0; }
.dashboard-panel-heading p { margin: 4px 0 0; color: var(--muted); font-size: 11.5px; }
.dashboard-panel-heading button { flex: 0 0 auto; }
.dashboard-priority-list { display: grid; gap: 9px; }
.dashboard-priority-row { display: grid; width: 100%; min-height: 72px; grid-template-columns: 34px minmax(0,1fr) auto; align-items: center; gap: 11px; padding: 11px 12px; border: 1px solid #dfe8ef; border-radius: 11px; background: #f8fafc; color: #3f5269; font: inherit; text-align: left; cursor: pointer; }
.dashboard-priority-row:hover { border-color: #9dbbd3; background: #f2f7fb; }
.dashboard-priority-row strong, .dashboard-priority-row small { display: block; }
.dashboard-priority-row strong { color: var(--navy); font-size: 12.5px; }
.dashboard-priority-row small { margin-top: 4px; color: var(--muted); font-size: 10.5px; line-height: 1.35; }
.dashboard-priority-row em { padding: 6px 8px; border-radius: 7px; background: #e8f1f8; color: #2f638d; font-size: 9px; font-style: normal; font-weight: 900; white-space: nowrap; }
.dashboard-priority-row.is-danger { border-color: #e4b6b6; background: #fff7f7; }
.dashboard-priority-row.is-danger em { background: #f8dddd; color: #9a2929; }
.dashboard-priority-row.is-warning { border-color: #e7cca0; background: #fffbf3; }
.dashboard-priority-row.is-warning em { background: #f8e8c9; color: #805510; }
.dashboard-priority-row.is-ready em { background: #e2f3e8; color: #236d45; }
.dashboard-priority-icon { color: var(--blue); font-size: 21px; text-align: center; }
.dashboard-shortcuts-panel { margin-top: 16px; }
.dashboard-quick-actions { margin-top: 0; }

.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.search-box { max-width: 430px; }
.toolbar-note { margin-left: auto; color: var(--muted); font-size: 12px; }
.table-card { overflow: hidden; border: 1px solid #e2e9f0; border-radius: 14px; background: #fff; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: 12px 13px; border-bottom: 1px solid #e8eef4; text-align: left; vertical-align: top; }
.data-table th { position: sticky; top: 0; background: #edf4fa; color: var(--navy); font-size: 12px; }
.data-table td { font-size: 13px; }
.data-table tbody tr { cursor: pointer; }
.data-table tbody tr:hover { background: #f5f9fc; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.empty-state { padding: 44px 20px; color: var(--muted); text-align: center; }
.badge { display: inline-block; padding: 4px 8px; border-radius: 999px; background: #e8f0f7; color: var(--navy); font-size: 11px; font-weight: 650; }

.print-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
.print-card { padding: 20px; border: 1px solid #e4ebf2; border-radius: 15px; background: #fff; }
.print-card h2 { margin: 0 0 7px; color: var(--navy); font-size: 18px; }
.print-card p { min-height: 44px; margin: 0 0 15px; color: var(--muted); line-height: 1.45; }
.print-card select { margin-bottom: 13px; }
.print-hint { margin-top: 18px; padding: 15px; border-left: 4px solid var(--blue); border-radius: 9px; background: #edf6fd; color: #385572; }

/* ===== Centre d'impression unifié ===== */
.print-center-page { margin: -10px -12px -18px; }
.print-center-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
  padding: 17px 18px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: #fff;
}
.print-center-title { display: flex; align-items: center; gap: 14px; min-width: 0; }
.print-center-icon {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 13px;
  background: #e6f1fb;
  color: var(--blue-strong);
  font-size: 22px;
  font-weight: 800;
}
.print-center-head h1 { margin: 0; color: var(--navy); font-size: 24px; }
.print-center-head p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.print-profile-control { display: flex; align-items: flex-end; gap: 9px; min-width: min(410px, 42vw); }
.print-profile-control label { flex: 1; margin: 0; color: var(--muted); font-size: 11px; }
.print-profile-control select { min-height: 39px; margin-top: 5px; }
.print-center-context {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin-bottom: 12px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.print-center-context label { min-width: 210px; margin: 0; color: var(--muted); font-size: 11px; }
.print-center-context input, .print-center-context select { min-height: 39px; margin-top: 5px; }
.print-context-summary { margin-left: auto; align-self: center; color: var(--muted); font-size: 12px; text-align: right; }
.special-menu-command { display:flex; align-items:center; gap:9px; flex:1; min-width:0; }
.special-menu-command>div { display:grid; gap:3px; margin-right:auto; min-width:0; color:var(--navy); }
.special-menu-command>div strong { font-size:13px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.special-menu-command>div span { color:var(--muted); font-size:11px; }
.special-menu-command button { white-space:nowrap; }
.print-center-workspace {
  height: clamp(560px, calc(100vh - 295px), 780px);
  min-height: 560px;
  display: grid;
  grid-template-columns: 235px minmax(440px, 1fr) 320px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 14px 38px rgba(23,54,93,.08);
}
.print-catalog {
  min-height: 0;
  overflow-y: auto;
  padding: 14px 10px 18px;
  border-right: 1px solid var(--line);
  background: #fbfcfe;
}
.print-family-title { margin: 12px 8px 6px; color: #7a8a9d; font-size: 10px; font-weight: 800; letter-spacing: .065em; text-transform: uppercase; }
.print-family-title:first-child { margin-top: 2px; }
.print-document-button {
  width: 100%;
  min-height: 37px;
  margin: 1px 0;
  padding: 8px 9px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--navy);
  text-align: left;
  font-size: 11.5px;
  line-height: 1.25;
}
.print-document-button:hover:not(:disabled):not(.is-active) { background: #dceaf7; color: var(--navy); }
.print-document-button.is-active:hover:not(:disabled) { background: #125d97; color: #fff; }
.nav-button:focus-visible, .print-document-button:focus-visible { outline: 2px solid #bf852f; outline-offset: -3px; }
.print-document-button.is-active { background: var(--blue-strong); color: #fff; font-weight: 750; }
.print-document-button:disabled { color: #8b98a6; opacity: .72; cursor: not-allowed; }
.print-document-button small { display: block; margin-top: 2px; color: inherit; opacity: .75; font-size: 9px; }
.print-preview-pane { min-width: 0; display: grid; grid-template-rows: auto auto minmax(0, 1fr); background: #eef3f8; }
.print-preview-title { display:flex; align-items:center; justify-content:space-between; gap:12px; padding: 14px 16px; border-bottom: 1px solid #dae4ee; color: var(--navy); font-size: 13px; font-weight: 750; background: #fff; }
.print-preview-title small { color:#718399; font-size:8px; font-weight:800; letter-spacing:.04em; }
.print-preview-applied { display:flex; flex-wrap:wrap; align-items:center; gap:6px 12px; min-height:38px; padding:7px 16px; border-bottom:1px solid #d8e2ec; background:#f8fbfe; color:#526b85; font-size:9.5px; }
.print-preview-applied span { white-space:nowrap; }
.print-preview-applied strong { color:var(--navy); }
.print-preview-applied .print-effective-scale { margin-left:auto; padding:4px 7px; border-radius:7px; background:#e5f3eb; color:#216447; font-weight:800; }
.print-preview-applied .print-effective-scale.is-adjusted { background:#fff0d5; color:#8c540f; }
.print-fit-warning { color:#9a5c0c; font-weight:750; }
.print-preview-stage { position:relative; min-height: 0; display:flex; overflow: hidden; padding: 14px; }
.print-preview-stage.is-updating::after { content:'Mise à jour de l’aperçu…'; position:absolute; top:20px; right:20px; z-index:3; padding:6px 9px; border-radius:8px; background:rgba(23,54,93,.9); color:#fff; font-size:9px; font-weight:800; box-shadow:0 4px 12px rgba(23,54,93,.18); }
.print-preview-frame {
  width: 100%;
  height: 100%;
  min-height: 0;
  flex: 1 1 auto;
  display: block;
  border: 0;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(30,53,77,.16);
}
.print-preview-loading { width:100%; height:100%; min-height:0; display: grid; place-items: center; color: var(--muted); }
.print-settings-pane { min-width: 0; border-left: 1px solid var(--line); background: #fff; }
.print-settings-tabs { display: grid; grid-template-columns: repeat(3,1fr); gap: 5px; padding: 10px; border-bottom: 1px solid var(--line); }
.print-settings-tabs button { min-height: 36px; border: 0; border-radius: 9px; background: #f2f6fa; color: var(--navy); font-size: 11px; font-weight: 800; }
.print-settings-tabs button.is-active { background: var(--blue-strong); color: #fff; }
.print-settings-body { max-height: 592px; overflow-y: auto; padding: 10px 16px 20px; }
.print-setting-group { margin-bottom: 14px; padding-bottom: 13px; border-bottom: 1px solid #edf1f5; }
.print-setting-group:last-child { border-bottom: 0; }
.print-setting-group h3 { margin: 0 0 10px; color: var(--navy); font-size: 12px; }
.print-setting-row { display: grid; grid-template-columns: minmax(0,1fr) 98px; align-items: center; gap: 9px; margin: 8px 0; color: #40556b; font-size: 11px; }
.print-setting-row input, .print-setting-row select { min-height: 34px; padding: 5px 8px; border-radius: 8px; font-size: 11px; }
.print-setting-row:focus-within { color:var(--blue-strong); font-weight:700; }
.print-setting-row input:focus, .print-setting-row select:focus, .print-setting-row textarea:focus { border-color:var(--blue-strong); background:#fafdff; }
.print-setting-row.is-wide { grid-template-columns: 1fr; }
.print-setting-row textarea { min-height: 70px; font-size: 11px; }
.print-setting-check { display: flex; align-items: center; gap: 9px; margin: 9px 0; color: #40556b; font-size: 11px; }
.print-setting-check input { width: 18px; min-height: 18px; margin: 0; }
.print-columns-list { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; }
.print-columns-list .print-setting-check { margin: 0; }
.print-settings-note { padding: 10px; border-radius: 10px; background: #edf5fc; color: #526b85; font-size: 10.5px; line-height: 1.4; }
.print-settings-main-action { width:100%; margin:0 0 14px; }
.special-menu-editor-categories { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-top:14px; }
.special-menu-editor-category { min-width:0; margin:0; padding:12px; border:1px solid var(--line); border-radius:10px; background:#fbfcfe; }
.special-menu-editor-category legend { padding:0 6px; color:var(--navy); font-size:12px; font-weight:800; }
.special-menu-editor-category label { margin:0 0 9px; }
.special-menu-editor-category label:last-child { margin-bottom:0; }
.menu-special-module { margin:14px 0; overflow:hidden; border:1px solid #b9cddd; border-radius:14px; background:#fff; box-shadow:0 5px 18px rgba(23,54,93,.07); }
.menu-special-module>header { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:15px 18px; border-bottom:1px solid #d5e1eb; background:linear-gradient(135deg,#f5f9fc,#eaf3fa); }
.menu-special-module>header h2 { margin:2px 0 4px; color:var(--navy); font-size:19px; }
.menu-special-module>header p:not(.eyebrow) { margin:0; color:var(--muted); font-size:11px; }
.menu-special-module>header>span { flex:0 0 auto; padding:7px 10px; border-radius:10px; font-size:10px; font-weight:850; }
.menu-special-auto { background:#fff3da; color:#95570f; }
.menu-special-module-body { display:grid; grid-template-columns:180px minmax(220px,1fr); gap:12px 16px; align-items:end; padding:15px 18px; }
.menu-special-module-body>label { margin:0; }
.menu-special-module-body>label input { margin-top:5px; }
.menu-special-current { display:grid; gap:3px; min-height:42px; padding:9px 12px; border:1px solid #cedce8; border-radius:10px; background:#f9fbfd; }
.menu-special-current small { color:var(--muted); font-size:8px; font-weight:850; letter-spacing:.06em; }
.menu-special-current strong { color:var(--navy); font-size:13px; }
.menu-special-current span { color:var(--muted); font-size:10px; }
.menu-special-actions { grid-column:1/-1; display:flex; flex-wrap:wrap; gap:9px; }
.menu-special-actions button { min-height:38px; }
.cafeteria-page { display:grid; gap:14px; }
.cafeteria-heading { align-items:center; margin-bottom:0; }
.cafeteria-heading h1 { margin:2px 0 4px; color:var(--navy); font-size:28px; }
.cafeteria-heading p:not(.eyebrow) { margin:0; color:var(--muted); }
.cafeteria-toolbar { display:flex; align-items:flex-end; justify-content:space-between; gap:14px; padding:14px 17px; }
.cafeteria-toolbar>label { width:210px; margin:0; }
.cafeteria-toolbar input { margin-top:5px; }
.cafeteria-module-actions { display:flex; gap:10px; flex-wrap:wrap; }
.cafeteria-kpis { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.cafeteria-kpis article { min-height:82px; display:grid; place-content:center; padding:12px; border:1px solid #c8d7e3; border-radius:13px; background:#fff; text-align:center; }
.cafeteria-kpis strong { color:var(--navy); font-size:27px; line-height:1; }
.cafeteria-kpis span { margin-top:7px; color:var(--muted); font-size:11px; font-weight:750; }
.cafeteria-source-note { display:grid; gap:7px; padding:15px 17px; border-color:#9dc9aa; background:#eef8f1; }
.cafeteria-source-note strong { color:#286b45; font-size:15px; }
.cafeteria-source-note p { margin:0 0 4px; color:var(--muted); font-size:11px; }
.cafeteria-source-note div { font-size:11px; }
.cafeteria-source-note b { color:var(--navy); }
.cafeteria-config-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.cafeteria-config-card { overflow:hidden; border:1px solid #c8d7e3; border-radius:13px; background:#fff; }
.cafeteria-config-card h3 { margin:0; padding:11px 14px; background:#2e63ad; color:#fff; font-size:13px; }
.cafeteria-config-card.green h3 { background:#328c49; }
.cafeteria-config-card.orange h3 { background:#b66b00; }
.cafeteria-config-card.purple h3 { background:#76509d; }
.cafeteria-config-card ul { columns:2; min-height:74px; margin:0; padding:13px 14px 13px 31px; }
.cafeteria-config-card li { margin-bottom:6px; color:var(--text); font-size:11px; break-inside:avoid; }
.print-center-actions {
  position: sticky;
  top: 78px;
  z-index: 24;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin: 0 0 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.97);
  box-shadow: 0 8px 24px rgba(23,54,93,.10);
  backdrop-filter: blur(8px);
}
.print-center-status-stack { display: grid; align-self: center; gap: 3px; margin-right: auto; min-width: 250px; }
.print-center-status { color: var(--muted); font-size: 11px; }
.print-center-status.is-valid { color: #187345; font-weight: 800; }
.print-center-status.is-error { color: #a32626; font-weight: 800; }
.print-validation-status { color: #667788; font-size: 10px; font-weight: 700; }
.print-validation-status.is-pending { color: #7a6b3f; }
.print-validation-status.is-valid { color: #187345; }
.print-validation-status.is-error { color: #a32626; }
.print-center-actions button { white-space: nowrap; }
.print-center-actions { flex-wrap: wrap; align-items: center; }
.print-center-status-stack { flex: 1 1 250px; }
.print-center-actions .print-return-button { display: inline-flex; align-items: center; justify-self: start; gap: 7px; width: fit-content; max-width: 100%; min-height: 34px; padding: 6px 10px; margin-bottom: 3px; border-color: #b8d9f3; background: #e8f3fe; color: #165e96; font-size: 12px; white-space: normal; text-align: left; }
.print-center-actions .print-return-button:hover { background: #d5e9fb; color: #124d7c; }
.print-center-actions .print-return-button:focus-visible { outline: 2px solid var(--blue-strong); outline-offset: 2px; }
.print-disabled-message { min-height: 570px; display: grid; place-items: center; padding: 30px; text-align: center; color: var(--muted); }
.print-disabled-message strong { display: block; margin-bottom: 8px; color: var(--navy); font-size: 17px; }

@media (max-width: 1280px) {
  .print-center-workspace { grid-template-columns: 210px minmax(390px,1fr) 290px; }
}
@media (max-width: 1050px) {
  .print-center-head { align-items: stretch; flex-direction: column; }
  .print-profile-control { min-width: 0; }
  .print-center-workspace { height:auto; max-height:none; grid-template-columns: 205px 1fr; }
  .print-preview-stage { min-height:570px; }
  .print-preview-frame { min-height:570px; }
  .print-settings-pane { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); }
  .print-settings-body { max-height: none; }
}
@media (max-width: 760px) {
  .print-center-page { margin: 0; }
  .print-center-context { align-items: stretch; flex-direction: column; }
  .print-center-context label { min-width: 0; }
  .print-context-summary { margin-left: 0; text-align: left; }
  .special-menu-command { align-items:stretch; flex-direction:column; }
  .special-menu-command>div { margin-right:0; }
  .special-menu-editor-categories { grid-template-columns:1fr; }
  .menu-special-module>header { align-items:flex-start; flex-direction:column; }
  .menu-special-module-body { grid-template-columns:1fr; }
  .menu-special-actions { grid-column:auto; flex-direction:column; }
  .cafeteria-toolbar { align-items:stretch; flex-direction:column; }
  .cafeteria-toolbar>label { width:auto; }
  .cafeteria-module-actions { flex-direction:column; }
  .cafeteria-kpis,.cafeteria-config-grid { grid-template-columns:1fr; }
  .cafeteria-config-card ul { columns:1; }
  .print-center-workspace { grid-template-columns: 1fr; }
  .print-catalog { max-height: 260px; border-right: 0; border-bottom: 1px solid var(--line); }
  .print-settings-pane { grid-column: auto; }
  .print-center-actions { position:static; flex-wrap: wrap; justify-content: stretch; }
  .print-center-actions button { flex: 1 1 180px; }
  .print-center-status-stack { flex: 1 0 100%; }
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 31, 51, .58);
}
.detail-modal {
  width: min(850px, 100%);
  max-height: min(820px, calc(100vh - 48px));
  display: grid;
  grid-template-rows: auto minmax(0,1fr) auto;
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow);
}
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; padding: 20px 22px 14px; border-bottom: 1px solid var(--line); }
.modal-header h2 { margin: 0; color: var(--navy); }
.modal-body { overflow-y: auto; padding: 20px 22px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px 20px; border-top: 1px solid var(--line); }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }

.detail-photo-card {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 126px minmax(0,1fr);
  align-items: center;
  gap: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #f7fafc;
}
.detail-photo-frame {
  width: 112px;
  height: 142px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid #c5d2df;
  border-radius: 10px;
  background: #fff;
}
.detail-photo-frame img { width: 100%; height: 100%; display: block; object-fit: cover; }
.photo-placeholder { color: #8a99aa; font-size: 12px; font-weight: 700; letter-spacing: .08em; }
.detail-photo-copy small { display: block; margin-bottom: 5px; color: var(--muted); }
.detail-photo-copy strong { display: block; color: var(--navy); font-size: 17px; }
.detail-photo-copy span { display: block; margin-top: 7px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.photo-management-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 13px; }
.photo-management-actions button { min-height: 34px; padding: 7px 11px; font-size: 10px; }
.photo-editor-layout {
  display: grid;
  grid-template-columns: minmax(220px,.75fr) minmax(360px,1.25fr);
  gap: 18px;
}
.photo-editor-source, .photo-crop-panel {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f7fafc;
}
.photo-editor-source { display: flex; flex-direction: column; align-items: center; }
.photo-editor-current {
  width: 160px;
  height: 200px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid #bacbdd;
  border-radius: 15px;
  background: #fff;
}
.photo-editor-current img { width: 100%; height: 100%; display: block; object-fit: cover; }
.photo-file-button {
  position: relative;
  width: 100%;
  max-width: 250px;
  margin-top: 14px;
  padding: 11px 14px;
  overflow: hidden;
  border-radius: 10px;
  background: var(--blue);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
  cursor: pointer;
}
.photo-file-button input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.photo-crop-panel { display: grid; place-items: center; gap: 13px; }
.photo-crop-empty {
  width: min(320px,100%);
  aspect-ratio: 4/5;
  display: grid;
  place-content: center;
  gap: 7px;
  border: 2px dashed #b9c9d8;
  border-radius: 16px;
  background: #fff;
  color: var(--muted);
  text-align: center;
}
.photo-crop-empty strong { color: var(--navy); }
#photo-crop-canvas {
  width: min(320px,100%);
  height: auto;
  aspect-ratio: 4/5;
  border: 1px solid #8da3b7;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(22,54,93,.12);
}
.photo-crop-controls { width: 100%; display: grid; gap: 8px; }
.photo-crop-controls label { display: grid; grid-template-columns: 145px minmax(0,1fr); align-items: center; gap: 10px; color: var(--navy); font-size: 11px; font-weight: 700; }
.photo-crop-controls input[type="range"] { width: 100%; accent-color: var(--blue); }
.photo-crop-controls small { color: var(--muted); overflow-wrap: anywhere; }
.photo-editor-source h3 { width: 100%; margin: 0 0 13px; color: var(--navy); font-size: 15px; text-align: center; }
.photo-editor-help { display: block; margin-top: 11px; color: var(--muted); font-size: 10px; line-height: 1.45; text-align: center; }
.photo-transform-actions { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; margin-top: 5px; }
.photo-transform-actions button { min-height: 34px; padding: 7px 10px; font-size: 9px; }
.photo-readonly-chip { display: inline-flex; align-items: center; min-height: 30px; padding: 6px 10px; border: 1px solid #c5d2df; border-radius: 9px; background: #eef2f6; color: #657382; font-size: 9px; font-weight: 800; letter-spacing: .04em; }
.detail-section { grid-column: 1 / -1; margin-top: 9px; padding-top: 13px; border-top: 1px solid var(--line); color: var(--navy); font-weight: 700; }
.detail-field { padding: 11px 12px; border-radius: 10px; background: var(--soft); }
.detail-field small { display: block; margin-bottom: 4px; color: var(--muted); }
.detail-field strong { white-space: pre-wrap; overflow-wrap: anywhere; }
.schedule-table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.schedule-table th, .schedule-table td { padding: 8px; border: 1px solid var(--line); text-align: center; font-size: 12px; }
.schedule-table th { background: #edf4fa; color: var(--navy); }

.loading-state { min-height: 320px; display: grid; place-items: center; color: var(--muted); }
.spinner { width: 42px; height: 42px; border: 4px solid #d9e5ef; border-top-color: var(--blue); border-radius: 50%; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 1100px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .print-grid { grid-template-columns: 1fr; }
  .user-badge { min-width: 190px; }
}
@media (max-width: 780px) {
  .mobile-only { display: grid; }
  .app-shell { grid-template-rows: 76px 1fr 34px; }
  .topbar { padding: 0 10px; }
  .app-title { font-size: 15px; }
  .app-subtitle { display: none; }
  .user-badge { display: none; }
  .workspace { grid-template-columns: 1fr; }
  .sidebar { position: fixed; top: 76px; bottom: 34px; left: 0; z-index: 50; width: 250px; height: auto; transform: translateX(-102%); transition: transform .2s ease; box-shadow: 18px 0 40px rgba(23,54,93,.18); }
  .sidebar.is-open { transform: translateX(0); }
  .main-content { padding: 18px 12px 28px; }
  .metric-grid { grid-template-columns: 1fr; }
  .page-heading { align-items: stretch; flex-direction: column; }
  .dashboard-date-block { min-width: 0; }
  .dashboard-panel-heading { align-items: stretch; flex-direction: column; }
  .dashboard-panel-heading button { width: 100%; }
  .dashboard-priority-row { grid-template-columns: 30px minmax(0,1fr); }
  .dashboard-priority-row em { grid-column: 2; justify-self: start; }
  .date-chip { min-width: 0; }
  .table-card { overflow-x: auto; }
  .data-table { min-width: 760px; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-photo-card { grid-template-columns: 96px minmax(0,1fr); gap: 12px; }
  .detail-photo-frame { width: 86px; height: 110px; }
  .statusbar { overflow: hidden; white-space: nowrap; }
  .statusbar .sensitive-warning { display: none; }
  .login-card { grid-template-columns: 1fr; }
  .login-brand { min-height: 170px; }
  .brand-mark { width: 100px; height: 100px; border-radius: 24px; font-size: 28px; }
  .login-content { padding: 34px 25px; }
}

/* ===== EMS Web 0.2.2 : Menus et Mise en place ===== */
textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #c9d6e3;
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  font: inherit;
  line-height: 1.45;
  resize: vertical;
  outline: none;
}
textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(47,111,171,.13); }
textarea:disabled { background: #eef2f5; color: #7d8a99; }

.write-chip {
  flex: 0 0 auto;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .03em;
}
.module-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0 0 15px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
}
.module-tabs button {
  min-height: 38px;
  padding: 8px 13px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .025em;
}
.module-tabs button:hover { background: #f1f6fb; color: var(--navy); }
.module-tabs button.is-active { background: var(--navy); color: #fff; }
.module-tabs button span { margin-left: 5px; padding: 2px 6px; border-radius: 999px; background: rgba(255,255,255,.24); }

.module-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.week-picker { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 8px; }
.inline-control {
  display: grid;
  gap: 5px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}
.inline-control input, .inline-control select { min-width: 175px; min-height: 39px; }
.cycle-control { min-width: min(410px, 100%); }
.compact-button { min-width: 42px; padding-inline: 11px; font-size: 20px; }
.module-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  margin: 12px 0 16px;
}
.module-actions .toolbar-note { margin-left: 4px; }
.danger-button, .warning-button, .success-button {
  min-height: 42px;
  padding: 9px 16px;
  border-radius: 10px;
  font: inherit;
  font-weight: 700;
}
.danger-button { border: 1px solid #e5baba; background: #fff5f5; color: #a33131; }
.warning-button { border: 1px solid #e4c17f; background: #fff8e8; color: #85570d; }
.success-button { border: 0; background: var(--green); color: #fff; }
.danger-button:disabled, .warning-button:disabled, .success-button:disabled { opacity: .5; cursor: not-allowed; }

.menu-summary-grid, .production-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 10px;
}
.menu-summary-grid article, .production-summary-grid article {
  min-height: 103px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
}
.menu-summary-grid small, .production-summary-grid small,
.production-status small, .cycle-next-weeks small {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.menu-summary-grid strong, .production-summary-grid strong {
  display: block;
  color: var(--navy);
  font-size: 16px;
  line-height: 1.25;
}
.menu-summary-grid article > span, .production-summary-grid article > span {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}
.menu-summary-grid .menu-mode-exception { border-color: #e7c285; background: #fff8ea; }
.menu-summary-grid .menu-mode-cycle { border-color: #bfd6ec; background: #f3f8fd; }
.dirty-state { color: var(--orange); font-size: 12px; }
.saved-state { color: var(--green); font-size: 13px; }

.menu-week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(180px,1fr));
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 9px;
  scroll-snap-type: x proximity;
}
.menu-day-card {
  min-width: 180px;
  overflow: hidden;
  border: 1px solid #dfe8f0;
  border-radius: 14px;
  background: #fff;
  scroll-snap-align: start;
}
.menu-day-card.is-weekend { border-color: #ead8ae; background: #fffdf8; }
.menu-day-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 13px;
  background: var(--navy);
  color: #fff;
}
.menu-day-card.is-weekend > header { background: #80601f; }
.menu-day-card > header strong, .menu-day-card > header span { display: block; }
.menu-day-card > header strong { font-size: 14px; }
.menu-day-card > header div span { margin-top: 3px; color: rgba(255,255,255,.8); font-size: 10px; }
.day-number { font-size: 24px; font-weight: 750; opacity: .65; }
.menu-meal-block { padding: 10px; border-bottom: 1px solid var(--line); }
.menu-meal-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; }
.menu-meal-heading strong { color: var(--navy); font-size: 11px; letter-spacing: .05em; }
.menu-meal-heading button {
  padding: 4px 7px;
  border: 1px solid #cbd9e6;
  border-radius: 6px;
  background: #fff;
  color: var(--blue);
  font-size: 9px;
  font-weight: 750;
}
.menu-meal-block ol { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.menu-meal-block li {
  min-height: 34px;
  display: grid;
  grid-template-columns: 19px minmax(0,1fr);
  align-items: center;
  gap: 5px;
  padding: 5px 6px;
  border-radius: 7px;
  background: #f6f9fc;
  color: var(--text);
  font-size: 10.5px;
  line-height: 1.25;
}
.menu-meal-block li.is-empty { color: #9aa6b3; font-style: italic; }
.menu-line-index {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #dfeaf4;
  color: var(--navy);
  font-size: 9px;
  font-style: normal;
  font-weight: 750;
}
.menu-line-text { min-width: 0; overflow-wrap: anywhere; }
.state-badge {
  grid-column: 2;
  width: max-content;
  max-width: 100%;
  padding: 2px 5px;
  border-radius: 999px;
  background: #e6f2e9;
  color: #2f6d4e;
  font-size: 8.5px;
  font-style: normal;
}
.angelito-line { margin: 8px 10px; padding: 8px; border: 1px dashed #c7acd9; border-radius: 8px; background: #faf6fd; }
.angelito-line small, .angelito-line strong, .angelito-line span { display: block; }
.angelito-line small { color: var(--purple); font-size: 8.5px; line-height: 1.3; }
.angelito-line strong { margin-top: 4px; color: #583b79; font-size: 10.5px; }
.angelito-line span { margin-top: 3px; color: var(--muted); font-size: 8.5px; }

.editor-modal { grid-template-rows: auto minmax(0,1fr) auto auto; }
.editor-modal.editor-wide { width: min(1120px, 100%); }
.editor-error { min-height: 20px; margin: 0; padding: 2px 22px 7px; color: #a32e2e; font-size: 13px; }
.editor-help { margin: 0 0 14px; padding: 10px 12px; border-left: 3px solid var(--blue); border-radius: 7px; background: #f0f6fb; color: var(--muted); font-size: 12px; line-height: 1.45; }
.menu-editor-form { display: grid; gap: 9px; }
.menu-editor-row {
  display: grid;
  grid-template-columns: 170px minmax(220px,1fr) minmax(180px,.65fr);
  align-items: end;
  gap: 10px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcfe;
}
.menu-editor-row label { display: flex; align-items: center; gap: 7px; margin: 0; font-size: 12px; }
.menu-editor-row label span { width: 21px; height: 21px; display: grid; place-items: center; border-radius: 50%; background: var(--navy); color: #fff; font-size: 10px; }
.angelito-editor { margin-top: 6px; padding: 14px; border: 1px solid #d9c8e7; border-radius: 11px; background: #fbf8fd; }
.angelito-editor legend { padding: 0 7px; color: var(--purple); font-weight: 700; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.form-grid label { margin: 0; }
.full-field { grid-column: 1 / -1; }
.checkbox-field { display: flex !important; align-items: center; gap: 9px; min-height: 44px; padding-top: 21px; }
.checkbox-field input { width: 18px; min-height: 18px; }
.editor-warning { padding: 11px 13px; border: 1px solid #efd198; border-radius: 9px; background: #fff8e9; color: #79531b; font-size: 12px; line-height: 1.45; }

.cycle-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px; }
.cycle-card { padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.cycle-card.is-archived { opacity: .72; background: #f4f5f6; }
.cycle-card header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.cycle-card h2 { margin: 2px 0 0; color: var(--navy); font-size: 17px; }
.cycle-card header small { color: var(--blue); font-weight: 750; }
.cycle-card p { color: var(--muted); font-size: 12px; }
.status-pill { flex: 0 0 auto; padding: 5px 8px; border-radius: 999px; font-size: 9px; font-weight: 750; }
.status-valid { background: var(--green-soft); color: var(--green); }
.status-muted { background: #e8ebee; color: #687686; }
.cycle-next-weeks { min-height: 55px; padding: 10px; border-radius: 9px; background: #f5f8fb; }
.cycle-next-weeks strong { color: var(--text); font-size: 11px; line-height: 1.4; }
.card-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.card-actions button { min-height: 34px; padding: 6px 9px; font-size: 10px; }
.table-actions { display: flex; flex-wrap: wrap; gap: 5px; }
.table-actions button { padding: 5px 7px; border: 1px solid #c9d7e5; border-radius: 6px; background: #fff; color: var(--navy); font-size: 9px; font-weight: 700; }
.table-actions .danger-link { border-color: #e6c4c4; color: #a33131; }

.production-status {
  min-width: 310px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #f7fafc;
}
.production-status strong, .production-status span { display: block; }
.production-status strong { font-size: 13px; }
.production-status span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.production-status.status-valid { border-color: #bcdcc8; background: #f0faf4; color: var(--green); }
.production-status.status-warning { border-color: #ecd09c; background: #fff9ed; color: #85570d; }
.production-status.status-danger { border-color: #e6bcbc; background: #fff5f5; color: #a33131; }
.production-tabs { overflow-x: auto; flex-wrap: nowrap; }
.production-tabs button { white-space: nowrap; }
.production-summary-grid { margin-bottom: 12px; }
.empty-production { max-width: 820px; }
.production-week-table { display: grid; gap: 10px; }
.production-day-row {
  display: grid;
  grid-template-columns: 160px minmax(0,1fr) minmax(0,1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
}
.production-day-row.is-weekend { border-color: #e8d5a6; }
.production-day-row.is-manual { box-shadow: inset 4px 0 0 var(--purple); }
.production-day-row > header { padding: 13px; background: #edf4fa; }
.production-day-row.is-weekend > header { background: #f7edcf; }
.production-day-row > header strong, .production-day-row > header span { display: block; }
.production-day-row > header strong { color: var(--navy); font-size: 15px; }
.production-day-row > header div span { margin-top: 4px; color: var(--muted); font-size: 10px; }
.production-day-row > header button { width: 100%; margin-top: 12px; font-size: 10px; }
.manual-badge { margin-top: 8px; color: var(--purple); font-size: 8px; font-weight: 750; }
.production-service { min-width: 0; padding: 11px 13px; border-left: 1px solid var(--line); }
.production-service h3 { margin: 0 0 7px; color: var(--green); font-size: 11px; letter-spacing: .05em; }
.production-service.resd h3 { color: var(--orange); }
.production-service ul { display: grid; gap: 5px; margin: 0; padding: 0; list-style: none; }
.production-service li { position: relative; padding: 5px 6px 5px 25px; border-radius: 6px; background: #f7f9fb; font-size: 10.5px; line-height: 1.35; overflow-wrap: anywhere; }
.production-service li::before { content: "□"; position: absolute; left: 8px; color: var(--blue); }
.production-service li.requires-validation { background: #fff2ef; color: #9d3027; }
.no-task, .weekend-message { margin: 0; color: #8794a2; font-size: 10.5px; font-style: italic; }
.weekend-message { padding: 10px; border-radius: 7px; background: #fff8e8; color: #85602b; }
.production-editor-reference { margin-bottom: 12px; padding: 10px 12px; border-radius: 9px; background: #f0f6fb; }
.production-editor-reference small { display: block; color: var(--muted); }
.production-editor-reference pre { margin: 5px 0 0; white-space: pre-wrap; color: var(--navy); font: 12px/1.45 "Segoe UI",Arial,sans-serif; }
.production-editor-columns { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.production-editor-columns label { margin: 0; }
.reference-note { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 12px; padding: 12px 14px; border: 1px solid #ecd09a; border-radius: 11px; background: #fff9ec; color: #78531c; }
.reference-note strong { flex: 0 0 auto; }
.reference-note span { color: #816a47; font-size: 12px; }
.reference-table tbody tr, .pending-table tbody tr { cursor: default; }
.pending-table tr.is-current-week td { background: #fff8e8; }

/* ===== EMS Web 0.2.2 : référentiels de production éditables ===== */
.reference-ready { border-color: #b9d9c7; background: #f0faf4; color: var(--green); }
.reference-ready span { color: #547362; }
.reference-editor-form { display: grid; gap: 16px; }
.reference-editor-form label { margin: 0; font-size: 12px; }
.reference-editor-form label > input,
.reference-editor-form label > select,
.reference-editor-form label > textarea { margin-top: 6px; }
.compact-grid { grid-template-columns: minmax(220px,1.3fr) minmax(180px,.8fr) minmax(130px,.45fr); }
.subsection-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.subsection-heading strong, .subsection-heading span { display: block; }
.subsection-heading strong { color: var(--navy); font-size: 14px; }
.subsection-heading span { margin-top: 3px; color: var(--muted); font-size: 11px; }
.variant-heading { margin: 6px 0 0; padding-top: 14px; border-top: 1px solid var(--line); }
.prep-variant-list { display: grid; gap: 14px; }
.prep-variant-card {
  padding: 14px;
  border: 1px solid #cfddea;
  border-radius: 14px;
  background: #f9fbfd;
}
.prep-variant-card > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.prep-variant-card > header strong, .prep-variant-card > header span { display: block; }
.prep-variant-card > header strong { color: var(--navy); }
.prep-variant-card > header span { margin-top: 2px; color: var(--muted); font-size: 11px; }
.danger-link-button, .icon-danger {
  border: 1px solid #e2bcbc;
  border-radius: 8px;
  background: #fff5f5;
  color: #a33131;
  font-weight: 700;
}
.danger-link-button { padding: 7px 10px; font-size: 10px; }
.icon-danger { width: 34px; height: 34px; align-self: end; font-size: 20px; }
.step-editor-card { margin-top: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.prep-step-list { display: grid; gap: 8px; }
.prep-step-row {
  display: grid;
  grid-template-columns: minmax(250px,2fr) minmax(180px,.8fr) 105px 80px 34px;
  align-items: end;
  gap: 8px;
  padding: 9px;
  border: 1px solid #e2e9f0;
  border-radius: 10px;
  background: #fbfcfe;
}
.prep-step-row label { margin: 0; font-size: 10px; }
.prep-step-row input, .prep-step-row select { min-height: 36px; padding: 7px 9px; }
.prep-step-row .step-active { display: flex; align-items: center; gap: 6px; min-height: 36px; }
.prep-step-row .step-active input { width: 17px; min-height: 17px; margin: 0; }
.conditional-card { padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #f9fbfd; }
.weekday-checks { display: grid; grid-template-columns: repeat(7,minmax(90px,1fr)); gap: 7px; margin-top: 10px; }
.weekday-checks label { display: flex; align-items: center; gap: 6px; margin: 0; padding: 9px; border: 1px solid #d7e2ec; border-radius: 9px; background: #fff; }
.weekday-checks input { width: 17px; min-height: 17px; margin: 0; }
.profile-summary { padding: 10px 12px; border-left: 3px solid var(--purple); border-radius: 8px; background: #f7f3fb; color: #654a83; font-size: 12px; }
.editable-reference-table td:last-child { min-width: 190px; }
.editable-reference-table tbody tr { cursor: default; }
.rebuild-policy-modal { width: min(780px,100%); }
.rebuild-policy-list { display: grid; gap: 9px; }
.rebuild-policy-list > label { display: grid; grid-template-columns: minmax(220px,1fr) minmax(230px,.8fr); align-items: center; gap: 14px; margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: #fbfcfe; }
.rebuild-policy-list strong, .rebuild-policy-list small { display: block; }
.rebuild-policy-list small { margin-top: 4px; color: var(--muted); font-weight: 400; }
.reference-rebuild-modal { width: min(760px,100%); }
.reference-prior-week-warning { margin: 12px 0; padding: 12px 14px; border: 1px solid #efc06f; border-radius: 11px; background: #fff7df; color: #76501c; }
.reference-prior-week-warning strong, .reference-prior-week-warning span { display: block; }
.reference-prior-week-warning span { margin-top: 4px; font-size: 12px; line-height: 1.45; }
.rebuild-choice-cards { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.rebuild-choice-cards > div { padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fbfcfe; }
.rebuild-choice-cards strong, .rebuild-choice-cards span { display: block; }
.rebuild-choice-cards strong { color: var(--navy); }
.rebuild-choice-cards span { margin-top: 5px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.transform-task-card { display: grid; grid-template-columns: minmax(240px,1.4fr) 120px minmax(220px,1fr) auto; align-items: end; gap: 10px; margin: 14px 0; padding: 13px; border: 1px solid #d9c8e7; border-radius: 12px; background: #fbf8fd; }
.transform-task-card > div strong, .transform-task-card > div span { display: block; }
.transform-task-card > div strong { color: var(--purple); }
.transform-task-card > div span { margin-top: 4px; color: var(--muted); font-size: 11px; }
.transform-task-card label { margin: 0; font-size: 10px; }
.transform-task-card select { margin-top: 5px; }

.toast-container {
  position: fixed;
  right: 20px;
  bottom: 48px;
  z-index: 220;
  display: grid;
  gap: 9px;
  width: min(430px, calc(100vw - 40px));
  pointer-events: none;
}
.toast {
  padding: 13px 15px;
  border-radius: 11px;
  box-shadow: 0 12px 32px rgba(15,31,51,.2);
  background: #fff;
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .2s ease, transform .2s ease;
}
.toast.is-visible { opacity: 1; transform: translateY(0); }
.toast-success { border-left: 5px solid var(--green); }
.toast-info { border-left: 5px solid var(--blue); }
.toast-warning { border-left: 5px solid var(--orange); }
.toast-error { border-left: 5px solid var(--red); }

@media (max-width: 1280px) {
  .menu-summary-grid, .production-summary-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .production-day-row { grid-template-columns: 135px minmax(0,1fr) minmax(0,1fr); }
}
@media (max-width: 900px) {
  .module-toolbar { align-items: stretch; flex-direction: column; }
  .cycle-control, .production-status { min-width: 0; width: 100%; }
  .cycle-grid { grid-template-columns: 1fr; }
  .production-day-row { grid-template-columns: 110px minmax(250px,1fr) minmax(250px,1fr); overflow-x: auto; }
  .production-editor-columns { grid-template-columns: 1fr; }
  .menu-editor-row { grid-template-columns: 1fr; }
  .menu-editor-row label { padding-bottom: 2px; }
  .reference-note { flex-direction: column; gap: 4px; }
  .prep-step-row { grid-template-columns: 1fr 1fr; }
  .prep-step-row .step-action { grid-column: 1 / -1; }
  .prep-step-row .icon-danger { justify-self: end; }
  .weekday-checks { grid-template-columns: repeat(2,minmax(120px,1fr)); }
  .compact-grid { grid-template-columns: 1fr; }
  .rebuild-policy-list > label { grid-template-columns: 1fr; }
  .rebuild-choice-cards { grid-template-columns: 1fr; }
  .transform-task-card { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .menu-summary-grid, .production-summary-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .full-field { grid-column: auto; }
  .week-picker { align-items: stretch; }
  .inline-control { width: 100%; }
  .inline-control input, .inline-control select { width: 100%; }
  .module-actions > button { flex: 1 1 100%; }
  .modal-backdrop { padding: 8px; }
  .detail-modal { max-height: calc(100vh - 16px); border-radius: 12px; }
  .toast-container { right: 10px; bottom: 45px; width: calc(100vw - 20px); }
}

/* ===== EMS Web 0.2.2 : état cloud partagé et conflits ===== */
.status-link {
  padding: 2px 8px;
  border: 1px solid #ddbd83;
  border-radius: 999px;
  background: #fff8e8;
  color: #805713;
  font-size: 10px;
  font-weight: 750;
}
.status-link:hover { background: #ffefcc; }
.simulation-pilot-box {
  border-color: #b9d9c7;
  background: #f0faf4;
  color: #285f43;
}
.simulation-chip {
  background: #e3f3e9;
  color: #276244;
  box-shadow: inset 0 0 0 1px #b9d9c7;
}
.simulation-banner {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin: 0 0 15px;
  padding: 12px 15px;
  border: 1px solid #b9d9c7;
  border-left: 5px solid var(--green);
  border-radius: 12px;
  background: #f0faf4;
  color: #285f43;
  line-height: 1.45;
}
.simulation-banner strong {
  flex: 0 0 auto;
  color: var(--green);
  font-size: 11px;
  letter-spacing: .04em;
}
.simulation-banner span { color: #547362; font-size: 12px; }

@media (max-width: 700px) {
  .simulation-banner { flex-direction: column; gap: 4px; }
  .status-link { white-space: nowrap; }
}

.external-heading { align-items: center; }
.external-heading h1 { margin: 2px 0 4px; color: var(--navy); font-size: 28px; }
.external-heading p:not(.eyebrow) { margin: 0; color: var(--muted); }
.external-heading-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }

.external-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.external-metric {
  min-height: 82px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 17px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 6px 20px rgba(23,54,93,.05);
}
.external-metric strong { min-width: 48px; font-size: 27px; line-height: 1; }
.external-metric span { color: var(--muted); font-size: 12px; font-weight: 650; }
.external-metric.metric-green strong { color: var(--green); }
.external-metric.metric-orange strong { color: var(--orange); }
.external-metric.metric-navy strong { color: var(--navy); }
.external-metric.metric-blue strong { color: var(--blue); }

.external-client-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 15px 15px 0 0;
  background: #fff;
}
.external-client-toolbar > input { max-width: 430px; min-height: 40px; }
.external-view-tabs {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px;
  border-radius: 11px;
  background: #edf3f9;
}
.external-view-tabs button {
  min-height: 34px;
  padding: 7px 11px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--navy);
  font-size: 11px;
  font-weight: 700;
}
.external-view-tabs button span {
  display: inline-grid;
  min-width: 20px;
  min-height: 20px;
  place-items: center;
  margin-left: 4px;
  border-radius: 10px;
  background: rgba(23,54,93,.09);
}
.external-view-tabs button.is-active { background: var(--navy); color: #fff; box-shadow: 0 4px 12px rgba(23,54,93,.18); }
.external-view-tabs button.is-active span { background: rgba(255,255,255,.18); }

.external-client-layout {
  min-height: 590px;
  display: grid;
  grid-template-columns: minmax(260px, 310px) minmax(0, 1fr);
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 17px 17px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 12px 34px rgba(23,54,93,.07);
}
.external-client-list {
  max-height: calc(100vh - 335px);
  min-height: 590px;
  overflow-y: auto;
  padding: 9px;
  border-right: 1px solid var(--line);
  background: #f7fafd;
}
.external-client-list-item {
  width: 100%;
  min-height: 70px;
  display: grid;
  grid-template-columns: 42px minmax(0,1fr) auto;
  align-items: center;
  gap: 9px;
  margin-bottom: 7px;
  padding: 9px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  text-align: left;
}
.external-client-list-item:hover { border-color: #c9d9e8; background: #fff; }
.external-client-list-item.is-selected { border-color: #a8c8e5; background: #e8f2fb; box-shadow: 0 5px 15px rgba(23,54,93,.08); }
.external-client-avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg,#dcecf9,#f4f8fc);
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}
.external-client-list-copy { min-width: 0; }
.external-client-list-copy strong,
.external-client-list-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.external-client-list-copy strong { color: var(--navy); font-size: 12px; }
.external-client-list-copy small { margin-top: 4px; color: var(--muted); font-size: 10px; }

.external-client-status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .03em;
}
.external-client-status.active { background: var(--green-soft); color: var(--green); }
.external-client-status.inactive { background: var(--orange-soft); color: #95570f; }
.external-client-status.future { background: #e6f0fb; color: var(--blue); }
.external-client-status.archived { background: #e9edf2; color: #596675; }

.external-client-detail {
  min-width: 0;
  max-height: calc(100vh - 335px);
  min-height: 590px;
  overflow-y: auto;
  padding: 15px;
  background: #fbfcfe;
}
.external-empty-detail {
  min-height: 550px;
  display: grid;
  place-content: center;
  gap: 7px;
  color: var(--muted);
  text-align: center;
}
.external-empty-detail strong { color: var(--navy); font-size: 17px; }

.external-profile-hero {
  display: grid;
  grid-template-columns: 132px minmax(200px,1fr) minmax(260px,auto);
  align-items: center;
  gap: 16px;
  padding: 17px;
  border: 1px solid #cadae9;
  border-radius: 17px;
  background: linear-gradient(135deg,#fff,#eef6fc);
}
.external-profile-photo-shell { width: 124px; display: grid; justify-items: center; gap: 7px; }
.external-profile-photo-shell .photo-management-actions { display: grid; width: 124px; margin: 0; }
.external-profile-photo-shell .photo-management-actions button { width: 100%; min-height: 28px; padding: 5px 6px; font-size: 8px; }
.external-profile-hero.is-archived { border-color: #d7dde4; background: linear-gradient(135deg,#fff,#f1f3f5); }
.external-profile-photo {
  width: 78px;
  height: 88px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid #bacbdd;
  border-radius: 15px;
  background: #fff;
  color: var(--blue);
  font-size: 20px;
  font-weight: 800;
}
.external-profile-photo img { width: 100%; height: 100%; display: block; object-fit: cover; }
.external-profile-title { min-width: 0; }
.external-profile-title small { color: var(--blue); font-size: 9px; font-weight: 800; letter-spacing: .09em; }
.external-profile-title h2 { margin: 4px 0 8px; color: var(--navy); font-size: 24px; overflow-wrap: anywhere; }
.external-profile-actions { display: flex; justify-content: flex-end; gap: 7px; flex-wrap: wrap; }
.external-profile-actions button { min-height: 36px; padding: 7px 11px; font-size: 10px; }

.external-archive-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 10px;
  padding: 11px 14px;
  border: 1px solid #d5dce4;
  border-radius: 11px;
  background: #f1f3f5;
}
.external-archive-banner strong { color: var(--navy); }
.external-archive-banner span { color: var(--muted); font-size: 11px; }

.external-service-summary {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 9px;
  margin-top: 10px;
}
.external-service-summary article {
  min-width: 0;
  padding: 12px 13px;
  border: 1px solid #c9dae8;
  border-radius: 12px;
  background: #f4f9fd;
}
.external-service-summary small,
.external-service-summary strong,
.external-service-summary span { display: block; }
.external-service-summary small { color: var(--blue); font-size: 9px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.external-service-summary strong { margin-top: 4px; color: var(--navy); font-size: 12px; line-height: 1.35; overflow-wrap: anywhere; }
.external-service-summary span { margin-top: 4px; color: var(--muted); font-size: 9.5px; line-height: 1.35; }

.external-detail-grid {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 10px;
  margin-top: 11px;
}
.external-info-card {
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
}
.external-info-card h3 { margin: 0 0 10px; color: var(--navy); font-size: 13px; }
.external-info-card > div { margin-top: 8px; }
.external-info-card small, .external-info-card strong { display: block; }
.external-info-card small { color: var(--muted); font-size: 9px; }
.external-info-card strong { margin-top: 3px; font-size: 11px; white-space: pre-wrap; overflow-wrap: anywhere; }

.external-detail-section {
  margin-top: 11px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
}
.external-detail-section > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.external-detail-section h3 { margin: 0; color: var(--navy); font-size: 14px; }
.external-detail-section p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.external-detail-section .schedule-table { margin: 0; font-size: 10px; }
.external-detail-section .schedule-table th,
.external-detail-section .schedule-table td { padding: 7px 5px; }
.external-table-scroll { max-width: 100%; overflow-x: auto; }
.external-compact-table { margin: 0; font-size: 10px; }
.external-compact-table tbody tr { cursor: default; }
.external-open-period { color: #a05e13; font-weight: 800; }
.empty-state.compact { min-height: 70px; padding: 20px; }

.external-address-card, .external-schedule-editor, .external-exception-form {
  min-width: 0;
  margin: 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #f9fbfd;
}
.external-address-card legend, .external-schedule-editor legend, .external-exception-form legend {
  padding: 0 7px;
  color: var(--navy);
  font-weight: 800;
}
.external-address-card label { margin: 7px 0 0; }
.external-address-card button { margin-top: 11px; font-size: 10px; }
.external-schedule-editor table, .external-edit-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.external-schedule-editor th, .external-schedule-editor td,
.external-edit-table th, .external-edit-table td { padding: 6px; border: 1px solid #cbd8e4; text-align: center; }
.external-schedule-editor th, .external-edit-table th { background: #eaf2f9; color: var(--navy); font-size: 10px; }
.external-schedule-editor input, .external-edit-table input, .external-edit-table select { min-height: 36px; padding: 6px 8px; font-size: 11px; }
.external-schedule-editor input { max-width: 82px; margin: auto; text-align: center; }
.external-edit-table th:first-child { width: 165px; }
.external-edit-table th:nth-child(2) { width: 165px; }
.external-edit-table th:last-child { width: 48px; }

.external-activity-editor, .external-exception-editor { display: grid; gap: 12px; }
.external-quick-activity-editor { max-width: 720px; }
.external-operation-warning,
.external-operation-confirm,
.external-resume-summary {
  display: grid;
  gap: 4px;
  padding: 13px 14px;
  border: 1px solid #efd198;
  border-radius: 11px;
  background: #fff8e9;
  color: #79531b;
}
.external-operation-confirm { border-color: #bcdcc8; background: #f0faf4; color: #286747; }
.external-operation-warning strong,
.external-operation-confirm strong,
.external-resume-summary strong { font-size: 13px; }
.external-operation-warning span,
.external-operation-confirm span,
.external-resume-summary span { font-size: 11px; line-height: 1.45; }
.external-resume-summary { border-color: #bfd6ec; background: #f1f7fc; color: var(--navy); }
.external-resume-summary small { color: var(--blue); font-size: 9px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.external-exception-form { margin-top: 4px; }
.external-exception-fields {
  display: grid;
  grid-template-columns: 150px 160px repeat(4,minmax(90px,1fr));
  gap: 9px;
}
.external-exception-fields label { margin: 0; font-size: 10px; }
.external-exception-form > label { margin: 10px 0 0; }
.external-exception-form button { width: fit-content; margin-top: 10px; }
.external-restore-summary {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 8px 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #f8fafc;
}
.external-restore-summary strong { color: var(--navy); }
.external-restore-summary span { color: var(--text); }

@media (max-width: 1400px) {
  .external-detail-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .external-profile-hero { grid-template-columns: 125px minmax(180px,1fr); }
  .external-profile-actions { grid-column: 1/-1; justify-content: flex-start; }
  .external-exception-fields { grid-template-columns: repeat(3,minmax(110px,1fr)); }
}
@media (max-width: 1050px) {
  .external-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .external-client-toolbar { align-items: stretch; flex-direction: column; }
  .external-client-toolbar > input { max-width: none; }
  .external-client-layout { grid-template-columns: 1fr; }
  .external-client-list { min-height: 220px; max-height: 300px; border-right: 0; border-bottom: 1px solid var(--line); }
  .external-client-detail { max-height: none; }
  .external-service-summary { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .external-heading { align-items: stretch; flex-direction: column; }
  .external-heading-actions { justify-content: stretch; }
  .external-heading-actions > * { flex: 1 1 100%; }
  .external-metrics, .external-detail-grid { grid-template-columns: 1fr; }
  .external-view-tabs { overflow-x: auto; }
  .external-view-tabs button { white-space: nowrap; }
  .external-profile-hero { grid-template-columns: 112px 1fr; }
  .external-profile-photo-shell, .external-profile-photo-shell .photo-management-actions { width: 108px; }
  .external-profile-photo { width: 64px; height: 72px; }
  .external-profile-title h2 { font-size: 19px; }
  .external-profile-actions button { flex: 1 1 130px; }
  .external-archive-banner { align-items: flex-start; flex-direction: column; }
  .external-exception-fields { grid-template-columns: 1fr 1fr; }
  .external-restore-summary { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .photo-editor-layout { grid-template-columns: 1fr; }
  .photo-crop-controls label { grid-template-columns: 1fr; gap: 3px; }
  .photo-transform-actions { grid-template-columns: 1fr; }
}

/* Résidents — fiche centrale modifiable V17, libellés communs lisibles */
.resident-module-heading { align-items: center; }
.resident-module-heading h1 { margin: 2px 0 4px; color: var(--navy); font-size: 28px; }
.resident-module-heading p:not(.eyebrow) { margin: 0; color: var(--muted); }
.resident-module-heading-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.resident-module-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 15px 15px 0 0;
  background: #fff;
}
.resident-module-toolbar > input { max-width: 470px; min-height: 40px; }
.resident-module-layout {
  min-height: 610px;
  display: grid;
  grid-template-columns: minmax(260px,310px) minmax(0,1fr);
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 17px 17px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 12px 34px rgba(23,54,93,.07);
}
.resident-module-list {
  min-height: 610px;
  max-height: calc(100vh - 275px);
  overflow-y: auto;
  padding: 9px;
  border-right: 1px solid var(--line);
  background: #f7fafd;
}
.resident-module-list-item {
  width: 100%;
  min-height: 70px;
  display: grid;
  grid-template-columns: 45px minmax(0,1fr) auto;
  align-items: center;
  gap: 9px;
  margin-bottom: 7px;
  padding: 9px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  text-align: left;
}
.resident-module-list-item:hover { border-color: #c9d9e8; background: #fff; }
.resident-module-list-item.is-selected { border-color: #a8c8e5; background: #e8f2fb; box-shadow: 0 5px 15px rgba(23,54,93,.08); }
.resident-room-badge {
  width: 45px;
  min-height: 38px;
  display: grid;
  place-items: center;
  padding: 4px;
  border-radius: 10px;
  background: var(--navy);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}
.resident-list-copy { min-width: 0; }
.resident-list-copy strong, .resident-list-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.resident-list-copy strong { color: var(--navy); font-size: 14px; }
.resident-list-copy small { margin-top: 5px; color: var(--muted); font-size: 12px; }
.resident-module-list-item .external-client-status { font-size: 11px; }
.resident-module-detail {
  min-width: 0;
  min-height: 610px;
  max-height: calc(100vh - 275px);
  overflow-y: auto;
  padding: 15px;
  background: #fbfcfe;
}
.resident-profile-hero {
  display: grid;
  grid-template-columns: 142px minmax(220px,1fr) minmax(310px,auto);
  align-items: center;
  gap: 16px;
  padding: 17px;
  border: 1px solid #cadae9;
  border-radius: 17px;
  background: linear-gradient(135deg,#fff,#eef6fc);
}
.resident-profile-hero.is-archived { border-color: #d7dde4; background: linear-gradient(135deg,#fff,#f1f3f5); }
.resident-profile-photo-shell { width: 134px; display: grid; justify-items: center; gap: 7px; }
.resident-profile-photo-shell .photo-management-actions { display: grid; width: 134px; margin: 0; gap: 5px; }
.resident-profile-photo-shell .photo-management-actions button { width: 100%; min-height: 34px; padding: 7px 8px; font-size: 11px; }
.resident-profile-photo {
  width: 96px;
  height: 112px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid #bacbdd;
  border-radius: 14px;
  background: #fff;
  color: var(--blue);
  font-size: 21px;
  font-weight: 800;
}
.resident-profile-photo img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: center top; }
.resident-profile-title { min-width: 0; }
.resident-profile-title small { color: var(--blue); font-size: 12px; font-weight: 800; letter-spacing: .07em; }
.resident-profile-title h2 { margin: 4px 0 5px; color: var(--navy); font-size: 24px; overflow-wrap: anywhere; }
.resident-profile-title p { margin: 0 0 9px; color: var(--muted); font-size: 13px; }
.resident-profile-title .external-client-status { font-size: 11px; }
.resident-profile-actions { display: flex; justify-content: flex-end; gap: 7px; flex-wrap: wrap; }
.resident-profile-actions button { min-height: 42px; padding: 9px 13px; font-size: 12px; }
.resident-summary-section {
  margin-top: 11px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
}
.resident-summary-section > header,
.resident-editor-common > header,
.resident-editor-service > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 11px;
}
.resident-summary-section h3, .resident-editor-common h3, .resident-editor-service h3 { margin: 0; color: var(--navy); font-size: 18px; }
.resident-summary-section header p, .resident-editor-common header p, .resident-editor-service header p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.resident-summary-section > header > span,
.resident-editor-common > header > span,
.resident-editor-service > header > span {
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  white-space: nowrap;
  font-size: 11px;
  font-weight: 800;
}
.resident-summary-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 9px; }
.resident-summary-card { min-width: 0; padding: 11px; border: 1px solid var(--line); border-radius: 11px; background: #f9fbfd; }
.resident-summary-card h4 { margin: 0 0 8px; color: var(--navy); font-size: 15px; }
.resident-summary-card > div { margin-top: 6px; }
.resident-summary-card small, .resident-summary-card strong { display: block; }
.resident-summary-card small { color: var(--muted); font-size: 12px; }
.resident-summary-card strong { margin-top: 3px; font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
.resident-service-summary-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin-top: 11px; }
.resident-service-summary { min-width: 0; padding: 13px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.resident-service-summary small, .resident-service-summary strong { display: block; }
.resident-service-summary small { color: var(--blue); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.resident-service-summary strong { margin-top: 6px; color: var(--navy); font-size: 14px; }
.resident-service-summary p { margin: 8px 0 0; color: var(--muted); font-size: 13px; line-height: 1.45; white-space: pre-wrap; }

.resident-editor-form { display: grid; gap: 13px; }
.resident-editor-identity,
.resident-editor-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 9px; }
.resident-editor-identity {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #f8fafc;
}
.resident-editor-common,
.resident-editor-service { padding: 13px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.resident-editor-field { min-width: 0; display: grid; align-content: start; gap: 6px; margin: 0; color: var(--muted); font-size: 13px; }
.resident-editor-field > span { color: var(--navy); font-weight: 650; }
.resident-editor-field input, .resident-editor-field select, .resident-editor-field textarea { min-height: 44px; padding: 9px 10px; border-radius: 8px; font-size: 14px; }
.resident-editor-field small { color: var(--muted); font-size: 11px; font-weight: 400; line-height: 1.35; }
.resident-editor-field.is-double { grid-column: span 2; }
.resident-editor-field.is-triple { grid-column: span 3; }
.resident-editor-field.is-wide { grid-column: 1/-1; }
.resident-editor-field.composition textarea { min-height: 112px; }
.resident-editor-grid > h4 {
  grid-column: 1/-1;
  margin: 2px 0 0;
  padding: 7px 9px;
  border-radius: 8px;
  background: #e7f2fb;
  color: var(--navy);
  font-size: 14px;
}
.resident-editor-checks { grid-column: 1/-1; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 7px; }
.resident-editor-coffee-details { grid-column: 1/-1; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 9px; }
.resident-editor-coffee-details.is-hidden { display: none; }
.resident-editor-check {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  margin: 0;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}
.resident-editor-check input { width: 16px; min-height: 16px; margin: 0; accent-color: var(--blue); }
.resident-editor-derived, .resident-editor-warning {
  grid-column: 1/-1;
  padding: 9px 10px;
  border-radius: 9px;
  font-size: 12px;
  line-height: 1.45;
}
.resident-editor-derived { background: var(--green-soft); color: var(--navy); }
.resident-editor-warning { background: var(--orange-soft); color: #85570d; }
.resident-editor-tabs { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; }
.resident-editor-tab {
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--navy);
  font-size: 14px;
  font-weight: 750;
}
.resident-editor-tab.is-active { border-color: var(--blue); background: var(--blue); color: #fff; }
.resident-editor-service { display: none; }
.resident-editor-service.is-active { display: block; }
.resident-editor-service footer { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: 11px; padding-top: 10px; border-top: 1px solid var(--line); }
.resident-editor-service footer strong { color: var(--navy); font-size: 12px; }
.resident-editor-service footer span { padding: 6px 9px; border-radius: 999px; background: #e7f2fb; color: var(--navy); font-size: 11px; }

@media (max-width: 1400px) {
  .resident-profile-hero { grid-template-columns: 142px minmax(190px,1fr); }
  .resident-profile-actions { grid-column: 1/-1; justify-content: flex-start; }
  .resident-summary-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 1050px) {
  .resident-module-toolbar { align-items: stretch; flex-direction: column; }
  .resident-module-toolbar > input { max-width: none; }
  .resident-module-layout { grid-template-columns: 1fr; }
  .resident-module-list { min-height: 210px; max-height: 300px; border-right: 0; border-bottom: 1px solid var(--line); }
  .resident-module-detail { max-height: none; }
  .resident-editor-grid, .resident-editor-identity { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .resident-editor-coffee-details { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .resident-editor-checks { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .resident-editor-field.is-triple { grid-column: span 1; }
}
@media (max-width: 680px) {
  .resident-module-heading { align-items: stretch; flex-direction: column; }
  .resident-module-heading-actions { justify-content: stretch; }
  .resident-module-heading-actions > * { flex: 1 1 100%; }
  .resident-profile-hero { grid-template-columns: 100px minmax(0,1fr); }
  .resident-profile-photo-shell, .resident-profile-photo-shell .photo-management-actions { width: 92px; }
  .resident-profile-photo { width: 72px; height: 84px; }
  .resident-editor-field input, .resident-editor-field select, .resident-editor-field textarea { font-size: 16px; }
  .resident-profile-title h2 { font-size: 19px; }
  .resident-profile-actions button { flex: 1 1 135px; }
  .resident-summary-grid, .resident-service-summary-grid { grid-template-columns: 1fr; }
  .resident-editor-grid, .resident-editor-identity { grid-template-columns: 1fr; }
  .resident-editor-coffee-details { grid-template-columns: 1fr; }
  .resident-editor-field.is-double, .resident-editor-field.is-triple, .resident-editor-field.is-wide { grid-column: 1; }
  .resident-editor-checks { grid-template-columns: 1fr; }
  .resident-editor-tabs { grid-template-columns: 1fr; }
  .resident-summary-section > header, .resident-editor-common > header, .resident-editor-service > header { display: block; }
  .resident-summary-section > header > span, .resident-editor-common > header > span, .resident-editor-service > header > span { display: inline-block; margin-top: 7px; }
}

/* Foyer de jour — gestion complète V27 */
.foyer-texture-badge { background: #167d5a; }
.foyer-planning-section { overflow: hidden; }
.foyer-schedule-scroll { max-width: 100%; overflow-x: auto; }
.foyer-schedule-table { width: 100%; table-layout: fixed; }
.foyer-schedule-table th:first-child { width: 18%; }
.foyer-schedule-table th:nth-child(2) { width: 22%; }
.foyer-schedule-table th:nth-child(3),
.foyer-schedule-table th:nth-child(4) { width: 30%; }
.foyer-schedule-table tbody th { color: var(--navy); text-align: left; }
.foyer-meal-state {
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: #edf1f5;
  color: #66717d;
  font-size: 11px;
  font-weight: 750;
}
.foyer-meal-state.is-planned { background: var(--green-soft); color: var(--green); }
.foyer-notes-grid { grid-template-columns: minmax(0,1fr) minmax(0,2fr); }
.foyer-notes-card { grid-column: auto; }
.foyer-schedule-editor { display: grid; gap: 10px; }
.foyer-schedule-editor .editor-help { margin: 0; }
.foyer-schedule-editor table { min-width: 470px; }
.foyer-schedule-editor th:first-child { width: 50%; text-align: left; }
.foyer-schedule-editor th:nth-child(2),
.foyer-schedule-editor th:nth-child(3) { width: 25%; }
.foyer-schedule-editor input[type="checkbox"] {
  width: 20px;
  height: 20px;
  min-height: 20px;
  accent-color: var(--blue);
}
.foyer-schedule-commands { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.foyer-schedule-commands button { min-height: 36px; padding: 7px 10px; font-size: 11px; }

@media (max-width: 680px) {
  .foyer-notes-grid { grid-template-columns: 1fr; }
  .foyer-schedule-table { min-width: 700px; }
  .foyer-schedule-commands button { flex: 1 1 150px; }
}

/* Planning / Livraisons — Web 0.3.0 RC3 */
.external-planning-page { display: grid; gap: 14px; min-width: 0; }
.delivery-heading { margin-bottom: 0; }
.delivery-week-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(23,54,93,.06);
}
.delivery-week-toolbar > .icon-button {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border: 1px solid #c8d7e5;
  border-radius: 12px;
  background: #eef5fb;
  color: var(--navy);
  font-size: 25px;
}
.delivery-week-toolbar label {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.delivery-week-toolbar input { min-height: 40px; width: 160px; }
.delivery-period { min-width: 0; margin-left: auto; text-align: right; }
.delivery-period strong, .delivery-period span { display: block; }
.delivery-period strong { color: var(--navy); font-size: 14px; }
.delivery-period span { margin-top: 3px; color: var(--muted); font-size: 11px; }
.delivery-archive-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border: 1px solid #c5d7c9;
  border-radius: 16px;
  background: #f3faf5;
}
.delivery-archive-status { display: flex; align-items: center; gap: 11px; min-width: 0; }
.delivery-archive-status strong, .delivery-archive-status small { display: block; }
.delivery-archive-status strong { color: #185e38; font-size: 12px; }
.delivery-archive-status small { margin-top: 3px; color: #527061; font-size: 10px; line-height: 1.35; }
.delivery-archive-icon { flex: 0 0 34px; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: #dceddf; color: #17623a; font-size: 17px; font-weight: 900; }
.delivery-archive-actions { display: flex; align-items: end; gap: 8px; flex-wrap: wrap; }
.delivery-archive-actions label { display: grid; gap: 4px; color: #526577; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.delivery-archive-actions select { min-width: 240px; min-height: 38px; }
.delivery-archive-actions button { min-height: 38px; white-space: nowrap; }
.delivery-archive-banner { display: flex; align-items: center; gap: 10px; padding: 10px 13px; border: 1px solid #86afd4; border-radius: 12px; background: #edf6ff; color: #17365d; }
.delivery-archive-banner strong { flex: 0 0 auto; padding: 4px 7px; border-radius: 6px; background: #17365d; color: #fff; font-size: 9px; }
.delivery-archive-banner span { font-size: 10px; line-height: 1.35; }
.delivery-metrics { grid-template-columns: repeat(4,minmax(0,1fr)); }
.delivery-week-alert {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border: 1px solid #efc88a;
  border-radius: 13px;
  background: #fff7e9;
}
.delivery-week-alert strong { color: #95570f; }
.delivery-week-alert span { color: #795f38; font-size: 11px; }
.delivery-week-scroll {
  max-width: 100%;
  overflow: visible;
  padding: 1px;
}
.delivery-week-grid {
  display: grid;
  grid-template-columns: repeat(7,minmax(0,1fr));
  gap: 9px;
  min-width: 0;
  align-items: stretch;
}
.delivery-day-card {
  min-width: 0;
  min-height: 520px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #c5d3df;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 7px 20px rgba(23,54,93,.07);
}
.delivery-day-card.is-today { border-color: #2c76b7; box-shadow: 0 0 0 2px rgba(44,118,183,.14),0 8px 22px rgba(23,54,93,.1); }
.delivery-day-card > header {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 11px 12px;
  background: linear-gradient(145deg,#17365d,#214e7e);
  color: #fff;
}
.delivery-day-card.is-today > header { background: linear-gradient(145deg,#176aab,#2688cd); }
.delivery-day-card > header span, .delivery-day-card > header strong { display: block; }
.delivery-day-card > header span { font-size: 12px; font-weight: 900; text-transform: uppercase; }
.delivery-day-card > header strong { margin-top: 3px; font-size: 10px; opacity: .86; }
.delivery-day-card > header em {
  padding: 4px 5px;
  border-radius: 6px;
  background: rgba(255,255,255,.18);
  font-size: 7px;
  font-style: normal;
  font-weight: 900;
  letter-spacing: .04em;
}
.delivery-day-list { flex: 1; min-height: 0; padding: 4px 8px; }
.delivery-day-empty { min-height: 360px; display: grid; place-items: center; color: #84909d; font-size: 11px; font-style: italic; }
.delivery-row { position: relative; padding: 10px 3px 9px; border-bottom: 1px solid #d8e1e9; }
.delivery-row:last-child { border-bottom: 0; }
.delivery-row.has-exception { margin: 5px -2px; padding: 9px 6px; border: 1px solid #efc680; border-radius: 10px; background: #fff9ee; }
.delivery-row-top { display: grid; grid-template-columns: minmax(0,1fr) 31px; gap: 6px; align-items: center; }
.delivery-person-link {
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--navy);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.15;
  text-align: left;
  cursor: pointer;
  overflow-wrap: anywhere;
}
.delivery-person-link:hover { color: var(--blue); text-decoration: underline; }
.delivery-person-link.is-static { display: block; cursor: default; }
.delivery-person-link.is-static:hover { color: var(--navy); text-decoration: none; }
.delivery-meal-count {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--navy);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.15);
}
.delivery-address { margin-top: 4px; color: #6b7886; font-size: 8.5px; line-height: 1.2; overflow-wrap: anywhere; }
.delivery-chips { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 6px; }
.delivery-chip { padding: 3px 5px; border: 1px solid #a6b6c5; border-radius: 6px; background: #f7f9fb; color: #4f6172; font-size: 7.5px; font-weight: 800; }
.delivery-chip.salad { border-color: #8db7e1; background: #f0f7ff; color: #165a9c; }
.delivery-chip.soup { border-color: #8fbd82; background: #f2faef; color: #34702f; }
.delivery-chip.dessert { border-color: #c2a4d9; background: #fbf5ff; color: #743a93; }
.delivery-exception { margin-top: 6px; color: #925816; font-size: 8px; line-height: 1.25; }
.delivery-correction {
  margin-top: 7px;
  padding: 4px 6px;
  border: 1px solid #d6a65d;
  border-radius: 7px;
  background: #fff;
  color: #8b5618;
  font-size: 7px;
  font-weight: 900;
  cursor: pointer;
}
.delivery-day-card > footer {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  border-top: 1px solid #aab9c7;
  background: #eaf2f9;
}
.delivery-day-card > footer div { min-width: 0; padding: 8px 2px; border-right: 1px solid #bdcbd7; text-align: center; }
.delivery-day-card > footer div:last-child { border-right: 0; }
.delivery-day-card > footer span, .delivery-day-card > footer strong { display: block; }
.delivery-day-card > footer span { color: #617283; font-size: 6.5px; font-weight: 800; }
.delivery-day-card > footer strong { margin-top: 3px; color: var(--navy); font-size: 14px; }

@media (max-width: 1500px) {
  .delivery-week-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
}
@media (max-width: 1200px) {
  .delivery-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 980px) {
  .delivery-week-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 680px) {
  .delivery-week-toolbar { flex-wrap: wrap; }
  .delivery-week-toolbar label { flex: 1 1 210px; }
  .delivery-week-toolbar input { width: 100%; }
  .delivery-period { flex: 1 1 100%; margin-left: 0; text-align: left; }
  .delivery-archive-control { align-items: stretch; flex-direction: column; }
  .delivery-archive-actions { align-items: stretch; flex-direction: column; }
  .delivery-archive-actions select { min-width: 0; width: 100%; }
  .delivery-metrics { grid-template-columns: 1fr; }
  .delivery-week-alert { align-items: flex-start; flex-direction: column; }
  .delivery-week-grid { grid-template-columns: 1fr; }
}

/* Cafés complets du soir — Web 0.3.0 RC5 */
.coffee-toolbar {
  display: grid;
  grid-template-columns: 210px minmax(280px,1fr) auto;
  gap: 18px;
  align-items: end;
  margin-bottom: 14px;
  padding: 16px 18px;
}
.coffee-date-field label { margin: 0 0 7px; }
.coffee-menu-summary {
  min-width: 0;
  min-height: 64px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 10px 14px;
  border: 1px solid #c8d7e5;
  border-radius: 13px;
  background: #f4f8fc;
}
.coffee-menu-summary small { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.coffee-menu-summary strong { margin-top: 5px; color: var(--navy); font-size: 13px; line-height: 1.35; overflow-wrap: anywhere; }
.coffee-toolbar-actions { display: flex; gap: 9px; flex-wrap: wrap; justify-content: flex-end; }
.coffee-kpis {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.coffee-kpis article {
  min-height: 94px;
  padding: 14px 17px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(23,54,93,.06);
}
.coffee-kpis small, .coffee-kpis strong, .coffee-kpis span { display: block; }
.coffee-kpis small { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.coffee-kpis strong { margin: 3px 0; color: var(--navy); font-size: 27px; }
.coffee-kpis span { color: var(--muted); font-size: 11px; }
.coffee-configure-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
  padding: 16px 18px;
}
.coffee-configure-panel h2, .coffee-section h2 { margin: 0; color: var(--navy); font-size: 17px; }
.coffee-configure-panel p, .coffee-section-heading p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.coffee-configure-controls { min-width: min(520px,55%); display: grid; grid-template-columns: minmax(220px,1fr) auto; gap: 9px; }
.coffee-section { margin-bottom: 14px; padding: 0; overflow: hidden; }
.coffee-section-heading { display: flex; justify-content: space-between; gap: 12px; padding: 15px 18px 11px; }
.coffee-section .table-card { border: 0; border-top: 1px solid var(--line); border-radius: 0; box-shadow: none; }
.coffee-table th:first-child { width: 80px; }
.coffee-table th:last-child { width: 190px; }
.coffee-table td { vertical-align: top; }
.coffee-table tr.coffee-included { background: #f2faf5; }
.coffee-composition-cell { min-width: 190px; line-height: 1.45; }
.coffee-status { display: inline-block; padding: 5px 8px; border-radius: 8px; font-size: 10px; font-weight: 800; line-height: 1.25; }
.coffee-status-included { border: 1px solid #8fc8a5; background: #ebf8f0; color: #276b45; }
.coffee-status-pending { border: 1px solid #e4c486; background: #fff8e9; color: #8b5c16; }
.coffee-status-unavailable { border: 1px solid #c9d1da; background: #f1f3f5; color: #687583; }
.coffee-status-plate { border: 1px solid #aebfd0; background: #edf3f8; color: #28506f; }
.coffee-rule-note {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
  padding: 13px 17px;
  border-color: #8fc8a5;
  background: #eef9f2;
}
.coffee-rule-note strong { flex: 0 0 auto; color: #17623b; font-size: 11px; letter-spacing: .05em; }
.coffee-rule-note span { color: #234b37; font-size: 12px; line-height: 1.45; }
.coffee-pending-warning {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: -3px 0 14px;
  padding: 10px 15px;
  border: 1px solid #e4c486;
  border-radius: 12px;
  background: #fff8e9;
  color: #76511b;
  font-size: 12px;
}
.coffee-pending-warning span { color: #896735; }
.coffee-section-heading > strong {
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: #e9f2fa;
  color: var(--navy);
  font-size: 17px;
}
.coffee-table td small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.coffee-table th:last-child { width: 245px; }
.coffee-row-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.coffee-small-button { min-height: 30px; padding: 6px 9px; font-size: 9px; }
.coffee-empty-row { padding: 22px !important; color: var(--muted); text-align: center; }
.coffee-editor-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.coffee-editor-form label { margin: 0; }
.coffee-editor-form textarea { margin-top: 7px; resize: vertical; }
.coffee-editor-form label > small { display: block; margin-top: 6px; color: var(--muted); font-weight: 400; line-height: 1.4; }
.coffee-editor-intro, .coffee-editor-wide { grid-column: 1 / -1; }
.coffee-editor-intro { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border: 1px solid #bfd2e3; border-radius: 13px; background: #f1f7fc; }
.coffee-editor-intro strong { color: var(--navy); }
.coffee-editor-intro span { color: var(--muted); font-size: 11px; }
.is-muted-field { opacity: .52; }
.coffee-detail-edit { margin-top: 8px; }

@media (max-width: 1180px) {
  .coffee-toolbar { grid-template-columns: 190px minmax(0,1fr); }
  .coffee-toolbar-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .coffee-configure-panel { align-items: stretch; flex-direction: column; }
  .coffee-configure-controls { min-width: 0; width: 100%; }
  .coffee-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 760px) {
  .login-logo { width: 145px; max-height: 150px; }
  .coffee-toolbar { grid-template-columns: 1fr; }
  .coffee-toolbar-actions { grid-column: auto; }
  .coffee-toolbar-actions > button { flex: 1 1 190px; }
  .coffee-kpis { grid-template-columns: 1fr; }
  .coffee-configure-controls { grid-template-columns: 1fr; }
  .coffee-editor-form { grid-template-columns: 1fr; }
  .coffee-rule-note, .coffee-pending-warning { align-items: flex-start; flex-direction: column; }
}

.angelito-heading { align-items: center; }
.angelito-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
  padding: 14px 17px;
  box-shadow: 0 6px 18px rgba(23,54,93,.05);
}
.angelito-month-control, .angelito-toolbar-actions, .angelito-row-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}
.angelito-month-control label { min-width: 190px; margin: 0; }
.angelito-month-control input { margin-top: 5px; }
.angelito-month-control .icon-button { flex: 0 0 40px; width: 40px; height: 40px; margin-top: 18px; font-size: 25px; }
.angelito-toolbar-actions { flex-wrap: wrap; justify-content: flex-end; }
.angelito-kpis {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.angelito-kpis article {
  min-height: 96px;
  padding: 14px 17px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(23,54,93,.06);
}
.angelito-kpis small, .angelito-kpis strong, .angelito-kpis span { display: block; }
.angelito-kpis small { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .035em; text-transform: uppercase; }
.angelito-kpis strong { margin: 4px 0; color: var(--navy); font-size: 25px; line-height: 1.1; }
.angelito-kpis span { color: var(--muted); font-size: 11px; }
.angelito-rule-panel, .angelito-calendar-panel { margin-bottom: 14px; }
.angelito-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}
.angelito-section-heading h2 { margin: 0; color: var(--navy); font-size: 18px; }
.angelito-section-heading p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.angelito-section-heading > span { flex: 0 0 auto; padding: 7px 10px; border-radius: 10px; background: #eaf2fa; color: var(--blue); font-size: 11px; font-weight: 800; }
.angelito-rule-grid {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 10px;
}
.angelito-rule-grid > div {
  min-height: 70px;
  padding: 12px 14px;
  border: 1px solid #d9e4ee;
  border-radius: 13px;
  background: #f7fafc;
}
.angelito-rule-grid small, .angelito-rule-grid strong { display: block; }
.angelito-rule-grid small { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.angelito-rule-grid strong { margin-top: 6px; color: var(--navy); line-height: 1.35; }
.angelito-calendar-panel { padding: 0; overflow: hidden; }
.angelito-calendar-panel .angelito-section-heading { margin: 0; padding: 16px 18px 13px; }
.angelito-table-scroll { max-width: 100%; overflow: auto; border-top: 1px solid var(--line); }
.angelito-table { min-width: 980px; width: 100%; border-collapse: collapse; }
.angelito-table th, .angelito-table td { padding: 9px 10px; border-bottom: 1px solid #e3ebf2; text-align: left; vertical-align: middle; }
.angelito-table th { position: sticky; top: 0; z-index: 1; background: #edf4fa; color: var(--navy); font-size: 11px; }
.angelito-table th:nth-child(1) { width: 96px; }
.angelito-table th:nth-child(2) { width: 100px; }
.angelito-table th:nth-child(3), .angelito-table th:nth-child(4), .angelito-table th:nth-child(5) { width: 74px; text-align: center; }
.angelito-table th:nth-child(6) { width: 140px; }
.angelito-table th:last-child { width: 185px; }
.angelito-table .number-cell { text-align: center; font-weight: 800; color: var(--navy); }
.angelito-row-inactive { background: #f5f7f9; color: #697987; }
.angelito-row-exception { background: #fff8e8; }
.angelito-status { display: inline-block; padding: 5px 8px; border-radius: 8px; font-size: 10px; font-weight: 800; white-space: nowrap; }
.angelito-status-service { border: 1px solid #8fc8a5; background: #ebf8f0; color: #276b45; }
.angelito-status-off { border: 1px solid #c9d1da; background: #f1f3f5; color: #687583; }
.angelito-status-exception { border: 1px solid #e4c486; background: #fff4d8; color: #895c16; }
.angelito-row-actions { flex-wrap: wrap; }
.angelito-row-actions .table-action { min-width: 75px; }
.table-action-danger { color: #a92626 !important; }
.angelito-editor-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.angelito-editor-form label { margin: 0; }
.angelito-editor-wide { grid-column: 1 / -1; }
.angelito-editor-intro {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid #bfd2e3;
  border-radius: 13px;
  background: #f1f7fc;
}
.angelito-editor-intro strong { color: var(--navy); }
.angelito-editor-intro span { color: var(--muted); font-size: 11px; }

@media (max-width: 1100px) {
  .angelito-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .angelito-rule-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .angelito-toolbar { align-items: stretch; flex-direction: column; }
  .angelito-toolbar-actions { justify-content: flex-start; }
}
@media (max-width: 700px) {
  .angelito-heading { align-items: stretch; }
  .angelito-kpis, .angelito-rule-grid, .angelito-editor-form { grid-template-columns: 1fr; }
  .angelito-month-control label { min-width: 0; flex: 1; }
  .angelito-toolbar-actions > button { flex: 1 1 190px; }
  .angelito-section-heading { align-items: stretch; flex-direction: column; }
}

.billing-page { display: flex; flex-direction: column; gap: 12px; }
.billing-heading { align-items: center; margin-bottom: 0; }
.billing-archive-status { flex: 0 0 auto; padding: 8px 12px; border: 1px solid #ebc882; border-radius: 10px; background: #fff5df; color: #8e5b16; font-size: 11px; font-weight: 800; text-align: center; }
.billing-archive-status.is-archived { border-color: #9dc9aa; background: #eaf7ee; color: #286b45; }
/* The command area stays in flow, below the existing EMS banner. */
.billing-command-bar { position: sticky; top: 86px; z-index: 10; display: grid; grid-template-columns: minmax(0,1fr) 190px; gap: 12px; padding: 12px 14px; background: var(--surface); box-shadow: 0 6px 18px rgba(23,54,93,.1); }
.billing-command-main { min-width: 0; display: grid; gap: 10px; }
.billing-command-bar label { min-width: 0; margin: 0; color: var(--muted); font-size: 11px; }
.billing-command-bar select, .billing-command-bar input { min-width: 0; min-height: 36px; margin-top: 4px; padding: 7px 9px; color: var(--navy); font-size: 13px; }
.billing-command-bar button { min-width: 0; min-height: 36px; padding: 8px 12px; font-size: 11px; white-space: normal; }
.billing-selection-controls { display: grid; grid-template-columns: minmax(130px,.8fr) minmax(290px,1.4fr) minmax(150px,1fr); align-items: end; gap: 10px; }
.billing-period-control { min-width: 0; display: flex; align-items: end; gap: 6px; }
.billing-period-control > .secondary-button { flex: 0 0 88px; padding-inline: 7px; }
.billing-month-control { min-width: 0; flex: 1; display: flex; align-items: end; gap: 3px; }
.billing-month-control label { flex: 1; }
.billing-month-control .icon-button { flex: 0 0 26px; width: 26px; height: 36px; padding: 0; font-size: 22px; }
.billing-consult-actions { display: flex; align-items: end; gap: 8px; }
.billing-consult-actions.has-beneficiary { display: grid; grid-template-columns: minmax(140px,1fr) auto auto; }
.billing-consult-actions > button { min-height: 38px; }
.billing-consult-actions > .secondary-button { border-color: #9ebedb; color: var(--blue-strong); background: #f0f7fd; }
.billing-close-action { display: flex; flex-direction: column; justify-content: center; gap: 8px; padding: 10px 12px; border-left: 1px solid #c4d9cc; border-radius: 0 9px 9px 0; background: #f3faf5; }
.billing-close-action > span { color: #527061; font-size: 11px; font-weight: 700; }
.billing-close-action button { min-height: 40px; }
.billing-command-context { display: none; }
.billing-archive-banner { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid #86afd4; border-radius: 10px; background: #edf6ff; color: #17365d; }
.billing-archive-banner strong { flex: 0 0 auto; padding: 4px 7px; border-radius: 6px; background: #17365d; color: #fff; font-size: 9px; }
.billing-archive-banner span { font-size: 10px; line-height: 1.35; }
.billing-kpis { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.billing-kpis article { min-height: 78px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.billing-kpis small, .billing-kpis strong, .billing-kpis span { display: block; }
.billing-kpis small { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .035em; text-transform: uppercase; }
.billing-kpis strong { margin: 5px 0; color: var(--navy); font-size: 22px; line-height: 1.1; }
.billing-kpis span { color: var(--muted); font-size: 11px; }
.billing-detail-panel { padding: 0; overflow: hidden; }
.billing-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px 12px; }
.billing-section-heading h2 { margin: 0; color: var(--navy); font-size: 18px; }
.billing-section-heading p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.billing-section-heading > span { padding: 7px 10px; border-radius: 10px; background: #eaf2fa; color: var(--blue); font-size: 11px; font-weight: 800; white-space: nowrap; }
.billing-table-scroll { max-width: 100%; overflow: auto; border-top: 1px solid var(--line); }
.billing-table { min-width: 900px; width: 100%; border-collapse: collapse; }
.billing-table th, .billing-table td { padding: 9px 10px; border-bottom: 1px solid #e3ebf2; text-align: left; vertical-align: middle; }
.billing-table th { position: sticky; top: 0; z-index: 1; background: #edf4fa; color: var(--navy); font-size: 11px; white-space: nowrap; }
.billing-table .number-cell { text-align: center; color: var(--navy); font-weight: 800; }
.billing-table .money-cell { text-align: right; white-space: nowrap; }
.billing-zero-row { background: #f5f7f9; color: #6f7d89; }
.billing-individual-table th:first-child { width: 22%; }
.billing-individual-table th:nth-child(2) { width: 38%; }
.billing-row-statement { display: block; margin-top: 5px; padding: 4px 8px; border: 1px solid #c2d7eb; border-radius: 6px; background: #f0f7fd; color: var(--blue-strong); font-size: 11px; font-weight: 600; }
.billing-row-statement:hover:not(:disabled) { background: #dcecf9; border-color: #82add2; }
.billing-row-statement:focus-visible { outline: 2px solid var(--blue-strong); outline-offset: 2px; }
@media (max-width: 1200px) and (min-width: 951px) {
  .billing-command-bar { grid-template-columns: minmax(0,1fr); }
  .billing-close-action { flex-direction: row; align-items: center; justify-content: flex-end; border-left: 0; border-top: 1px solid #c4d9cc; padding: 8px 10px; border-radius: 0 0 9px 9px; }
}
@media (max-width: 950px) {
  .billing-command-bar { grid-template-columns: minmax(0,1fr); gap: 8px; padding: 10px; max-height: calc(100dvh - 132px); overflow-y: auto; }
  .billing-command-context { position: sticky; top: -10px; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 3px 0 8px; border-bottom: 1px solid var(--line); background: var(--surface); }
  .billing-command-context strong, .billing-command-context span { display: block; }
  .billing-command-context strong { color: var(--navy); font-size: 15px; }
  .billing-command-context span { margin-top: 2px; color: var(--muted); font-size: 11px; }
  .billing-command-context button { flex: 0 0 auto; font-size: 10px; }
  .billing-selection-controls { display: none; grid-template-columns: repeat(2,minmax(0,1fr)); padding-bottom: 8px; border-bottom: 1px solid var(--line); }
  .billing-command-bar.is-expanded .billing-selection-controls { display: grid; }
  .billing-period-control { grid-column: 1 / -1; grid-row: 2; }
  .billing-consult-actions.has-beneficiary { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .billing-beneficiary-control { grid-column: 1 / -1; }
  .billing-close-action { flex-direction: row; align-items: center; justify-content: flex-end; border-left: 0; border-top: 1px solid #c4d9cc; padding: 7px 8px; border-radius: 0 0 8px 8px; }
  .billing-close-action > span { margin-right: auto; }
  .billing-close-action button { max-width: 210px; min-height: 34px; font-size: 10px; }
  .billing-consult-actions:not(.has-beneficiary) > button { width: 100%; }
}
@media (max-width: 780px) {
  .billing-page { max-width: calc(100vw - 24px); }
  .billing-command-bar { top: 76px; max-height: calc(100dvh - 120px); }
  .billing-heading h1 { font-size: 24px; }
  .billing-kpis article { padding: 9px; }
  .billing-kpis small { font-size: 9px; }
  .billing-kpis strong { font-size: 17px; overflow-wrap: anywhere; }
  .billing-kpis span { font-size: 10px; }
}
@media (max-width: 700px) {
  .billing-heading, .billing-section-heading { align-items: stretch; flex-direction: column; }
  .billing-archive-banner { align-items: flex-start; flex-direction: column; }
}

.external-same-address{display:flex!important;align-items:flex-start;gap:10px;padding:12px;border:1px solid #b9c9d8;border-radius:10px;background:#f4f8fc;font-weight:700;color:#17365d}
.external-same-address input{width:auto!important;min-width:18px;height:18px;margin:1px 0 0;accent-color:#1f6fad}
.external-same-address span{line-height:1.3}
#external-billing-address-fields{display:grid;gap:12px;margin-top:12px}
#external-billing-address-fields[hidden]{display:none!important}

/* Contrôles d’import — analyse lisible et non destructive. */
.import-control-heading { align-items: center; }
.import-control-heading h1 { margin-bottom: 5px; }
.import-control-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.import-control-scan-stamp { display:flex; flex-direction:column; justify-content:center; min-width:112px; padding:6px 11px; border:1px solid var(--line); border-radius:10px; background:#f7fafc; }
.import-control-scan-stamp span { color:var(--muted); font-size:9px; font-weight:850; letter-spacing:.04em; }
.import-control-scan-stamp strong { margin-top:2px; color:var(--navy); font-size:12px; }
.import-control-metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 13px; margin-bottom: 16px; }
.import-control-metric {
  min-height: 112px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-left: 5px solid #7f8d98;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 7px 20px rgba(23,54,93,.06);
}
.import-control-metric span, .import-control-metric strong, .import-control-metric small { display: block; }
.import-control-metric span { color: var(--muted); font-size: 11px; font-weight: 850; letter-spacing: .04em; }
.import-control-metric strong { margin: 5px 0 2px; color: var(--navy); font-size: 30px; line-height: 1; }
.import-control-metric small { color: var(--muted); font-size: 12px; }
.import-control-metric.is-blocking { border-left-color: #c83232; background: linear-gradient(100deg,#fff7f7 0,#fff 34%); }
.import-control-metric.is-review { border-left-color: #d28a16; background: linear-gradient(100deg,#fffaf0 0,#fff 34%); }
.import-control-metric.is-resolved { border-left-color: #2b8b58; background: linear-gradient(100deg,#f4fbf7 0,#fff 34%); }
.import-control-panel { padding: 0; overflow: hidden; }
.import-control-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; padding: 15px 17px; }
.import-control-filters { display: flex; flex-wrap: wrap; gap: 7px; }
.import-control-filters button {
  min-height: 36px;
  padding: 7px 11px;
  border: 1px solid #c8d5e1;
  border-radius: 9px;
  background: #f6f9fc;
  color: var(--navy);
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
}
.import-control-filters button:hover, .import-control-filters button.is-active { border-color: var(--blue); background: var(--blue); color: #fff; }
.import-control-filters button span { display:inline-grid; min-width:20px; height:20px; margin-left:4px; padding:0 5px; place-items:center; border-radius:10px; background:rgba(23,54,93,.10); font-size:10px; }
.import-control-filters button.is-active span { background:rgba(255,255,255,.24); }
.import-control-search { flex: 0 1 360px; margin: 0; color: var(--muted); font-size: 11px; font-weight: 750; }
.import-control-search input { min-width: 250px; margin-top: 5px; }
.import-control-table-scroll { max-width: 100%; overflow: auto; border-top: 1px solid var(--line); }
.import-control-table { min-width: 960px; width: 100%; border-collapse: collapse; }
.import-control-table th, .import-control-table td { padding: 11px 12px; border-bottom: 1px solid #e2eaf1; text-align: left; vertical-align: middle; }
.import-control-table th { position: sticky; top: 0; z-index: 1; background: #edf4fa; color: var(--navy); font-size: 12px; }
.import-control-table td { color: #263c52; font-size: 12px; line-height: 1.4; }
.import-control-detail { display:block; }
.import-control-guidance { display:block; margin-top:4px; color:#60758a; font-size:11px; line-height:1.35; }
.import-control-table th:nth-child(1) { width: 16%; }
.import-control-table th:nth-child(2) { width: 22%; }
.import-control-table th:nth-child(4) { width: 120px; }
.import-control-table th:nth-child(5) { width: 150px; }
.import-control-status { display: inline-block; padding: 6px 8px; border: 1px solid transparent; border-radius: 8px; font-size: 10px; font-weight: 900; white-space: nowrap; }
.import-control-status.is-blocking { border-color: #e1a7a7; background: #fdecec; color: #a62222; }
.import-control-status.is-review { border-color: #e7c17c; background: #fff4d8; color: #855810; }
.import-control-status.is-resolved { border-color: #9dceb0; background: #e9f7ee; color: #236d45; }
.import-control-open { padding: 7px 9px; border: 1px solid #8fb2d2; border-radius: 8px; background: #edf5fc; color: #174f82; font-size: 10px; font-weight: 900; cursor: pointer; white-space: nowrap; }
.import-control-open:hover { border-color: var(--blue); background: var(--blue); color: #fff; }
.import-control-empty { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 45px 20px; color: var(--muted); text-align: center; }
.import-control-empty strong { color: var(--navy); font-size: 16px; }
.import-control-safety { display: flex; align-items: flex-start; gap: 13px; margin-top: 15px; padding: 15px 17px; border: 1px solid #a8d0b6; border-radius: 14px; background: #eff9f3; }
.import-control-safety-icon { display: grid; flex: 0 0 32px; width: 32px; height: 32px; place-items: center; border-radius: 50%; background: #2b8b58; color: #fff; font-size: 17px; font-weight: 900; }
.import-control-safety strong { color: #1d6540; font-size: 13px; }
.import-control-safety p { margin: 4px 0 0; color: #496a58; font-size: 12px; line-height: 1.45; }

@media (max-width: 900px) {
  .import-control-heading, .import-control-toolbar { align-items: stretch; flex-direction: column; }
  .import-control-actions { justify-content: flex-start; }
  .import-control-search { flex-basis: auto; width: 100%; }
  .import-control-search input { min-width: 0; width: 100%; }
}
@media (max-width: 650px) {
  .import-control-metrics { grid-template-columns: 1fr; }
  .import-control-actions { flex-direction: column; }
  .import-control-actions button { width: 100%; }
  .import-control-filters button { flex: 1 1 120px; }
}

/* Archives EMS — dossiers internes distincts des archives extérieures. */
.ems-archive-heading { align-items: center; }
.ems-archive-metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 13px; margin-bottom: 16px; }
.ems-archive-metrics article {
  min-height: 105px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--blue);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 7px 20px rgba(23,54,93,.06);
}
.ems-archive-metrics span, .ems-archive-metrics strong, .ems-archive-metrics small { display: block; }
.ems-archive-metrics span { color: var(--muted); font-size: 11px; font-weight: 850; letter-spacing: .035em; }
.ems-archive-metrics strong { margin: 5px 0 2px; color: var(--navy); font-size: 29px; line-height: 1; }
.ems-archive-metrics small { color: var(--muted); font-size: 12px; }
.ems-archive-metrics article:nth-child(2) { border-top-color: #7351a2; }
.ems-archive-metrics article:nth-child(3) { border-top-color: #d28a16; }
.ems-archive-panel { padding: 0; overflow: hidden; }
.ems-archive-tabs { display: flex; gap: 7px; padding: 14px 17px 0; border-bottom: 1px solid var(--line); }
.ems-archive-tabs button {
  padding: 10px 13px;
  border: 1px solid transparent;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}
.ems-archive-tabs button span { display: inline-grid; min-width: 22px; min-height: 22px; margin-left: 5px; place-items: center; border-radius: 12px; background: #e7eef5; color: var(--navy); font-size: 10px; }
.ems-archive-tabs button.is-active { border-bottom-color: var(--blue); color: var(--blue); }
.ems-archive-tabs button.is-active span { background: var(--blue); color: #fff; }
.ems-archive-toolbar { display: flex; align-items: flex-end; gap: 13px; padding: 14px 17px; }
.ems-archive-toolbar label { margin: 0; color: var(--muted); font-size: 11px; font-weight: 750; }
.ems-archive-toolbar input, .ems-archive-toolbar select { margin-top: 5px; }
.ems-archive-search { flex: 1 1 430px; }
.ems-archive-search input { width: 100%; }
.ems-archive-filter { flex: 0 0 190px; }
.ems-archive-table-scroll { max-width: 100%; overflow: auto; border-top: 1px solid var(--line); }
.ems-archive-table { min-width: 980px; width: 100%; border-collapse: collapse; }
.ems-archive-table th, .ems-archive-table td { padding: 11px 12px; border-bottom: 1px solid #e2eaf1; text-align: left; vertical-align: middle; }
.ems-archive-table th { position: sticky; top: 0; z-index: 1; background: #edf4fa; color: var(--navy); font-size: 12px; }
.ems-archive-table td { color: #263c52; font-size: 12px; line-height: 1.4; }
.ems-archive-table td strong, .ems-archive-table td small { display: block; }
.ems-archive-table td small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.ems-archive-table th:nth-child(1) { width: 22%; }
.ems-archive-table th:nth-child(2) { width: 120px; }
.ems-archive-table th:nth-child(3) { width: 130px; }
.ems-archive-table th:nth-child(5) { width: 135px; }
.ems-archive-table th:nth-child(6) { width: 260px; }
.ems-archive-reason, .ems-archive-file-status, .ems-archive-event { display: inline-block; padding: 5px 8px; border: 1px solid #bdcddd; border-radius: 8px; background: #f2f6fa; color: #405a72; font-size: 10px; font-weight: 900; white-space: nowrap; }
.ems-archive-reason.is-death { border-color: #c7b7d8; background: #f4eef9; color: #67418d; }
.ems-archive-reason.is-move { border-color: #a8c6df; background: #edf5fb; color: #285d87; }
.ems-archive-reason.is-departure { border-color: #e1c58f; background: #fff6e3; color: #875d18; }
.ems-archive-file-status.is-complete { border-color: #9dceb0; background: #e9f7ee; color: #236d45; }
.ems-archive-file-status.is-incomplete { border-color: #e7c17c; background: #fff4d8; color: #855810; }
.ems-archive-event { border-color: #d4b3b3; background: #fbefef; color: #913838; }
.ems-archive-event.is-restored { border-color: #9dceb0; background: #e9f7ee; color: #236d45; }
.ems-archive-event.is-corrected { border-color: #b4cbe0; background: #edf5fc; color: #245f91; }
.ems-archive-open { padding: 7px 9px; border: 1px solid #8fb2d2; border-radius: 8px; background: #edf5fc; color: #174f82; font-size: 10px; font-weight: 900; cursor: pointer; white-space: nowrap; }
.ems-archive-open:hover { border-color: var(--blue); background: var(--blue); color: #fff; }
.ems-archive-actions { display: flex; flex-wrap: wrap; gap: 6px; min-width: 230px; }
.ems-archive-correct, .ems-archive-restore { padding: 7px 9px; border-radius: 8px; font-size: 10px; font-weight: 900; cursor: pointer; white-space: nowrap; }
.ems-archive-correct { border: 1px solid #d0a552; background: #fff6df; color: #7a5310; }
.ems-archive-restore { border: 1px solid #83ba99; background: #eaf7ef; color: #236d45; }
.ems-archive-correct:hover:not(:disabled) { background: #d69220; color: #fff; }
.ems-archive-restore:hover:not(:disabled) { background: #2d8e58; color: #fff; }
.ems-archive-actions button:disabled { cursor: not-allowed; opacity: .46; }
.ems-archive-empty { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 45px 20px; color: var(--muted); text-align: center; }
.ems-archive-empty strong { color: var(--navy); font-size: 16px; }
.ems-archive-note { margin-top: 15px; padding: 15px 17px; border: 1px solid #b5cadc; border-radius: 14px; background: #f2f7fb; }
.ems-archive-note strong { color: var(--navy); font-size: 13px; }
.ems-archive-note p { margin: 4px 0 0; color: #526b82; font-size: 12px; line-height: 1.45; }

@media (max-width: 900px) {
  .ems-archive-heading, .ems-archive-toolbar { align-items: stretch; flex-direction: column; }
  .ems-archive-search, .ems-archive-filter { flex-basis: auto; width: 100%; }
}
@media (max-width: 650px) {
  .ems-archive-metrics { grid-template-columns: 1fr; }
  .ems-archive-heading > button { width: 100%; }
  .ems-archive-tabs button { flex: 1; }
}

/* Paramètres et sauvegardes — administration partagée. */
.settings-module-heading { align-items: center; }
.settings-module-panel { padding: 0; overflow: hidden; }
.settings-module-tabs { display: flex; gap: 7px; padding: 12px 16px 0; border-bottom: 1px solid var(--line); }
.settings-module-tabs button { padding: 11px 14px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--muted); font-size: 12px; font-weight: 850; cursor: pointer; }
.settings-module-tabs button.is-active { border-bottom-color: var(--blue); color: var(--blue); }
#settings-module-content { min-height: 420px; padding: 18px; background: #f8fafc; }
.settings-general-grid { display: grid; grid-template-columns: minmax(320px,.85fr) minmax(430px,1.15fr); gap: 16px; }
.settings-form-card, .settings-list-card, .settings-backup-card {
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(23,54,93,.05);
}
.settings-form-card h3, .settings-list-card h3, .settings-backup-card h3, .settings-room-heading h3 { margin: 0; color: var(--navy); font-size: 17px; }
.settings-form-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.settings-form-card-heading span { padding: 5px 8px; border: 1px solid #acd0ba; border-radius: 8px; background: #edf8f1; color: #267047; font-size: 9px; font-weight: 900; white-space: nowrap; }
.settings-form-card-heading span.is-dirty { border-color: #dfbd78; background: #fff5df; color: #845811; }
.settings-form-card > p, .settings-list-card header p, .settings-backup-card p, .settings-room-heading p { margin: 5px 0 14px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.settings-form-card label { margin: 12px 0 0; color: #385269; font-size: 12px; font-weight: 750; }
.settings-form-card input, .settings-form-card textarea { margin-top: 5px; }
.settings-form-card > button { width: 100%; margin-top: 15px; }
.settings-list-column { display: flex; flex-direction: column; gap: 16px; }
.settings-list-card header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.settings-list-card header span { display: grid; flex: 0 0 30px; width: 30px; height: 30px; place-items: center; border-radius: 50%; background: #e8f1f9; color: var(--blue); font-size: 12px; font-weight: 900; }
.settings-list-values { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
.settings-list-values > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 36px; padding: 6px 7px 6px 10px; border: 1px solid #dbe5ee; border-radius: 9px; background: #f8fafc; }
.settings-list-values strong { overflow: hidden; color: #294158; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.settings-list-values button { display: grid; flex: 0 0 24px; width: 24px; height: 24px; padding: 0; place-items: center; border: 0; border-radius: 6px; background: #f5dfdf; color: #9b2727; font-size: 17px; cursor: pointer; }
.settings-list-values button:disabled { opacity: .45; cursor: not-allowed; }
.settings-list-add { display: flex; gap: 8px; margin-top: 11px; }
.settings-list-add input { min-width: 0; flex: 1; }
.settings-list-add button { flex: 0 0 auto; }
.settings-room-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 15px; }
.settings-room-table-scroll { max-height: 610px; overflow: auto; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.settings-room-table { min-width: 820px; width: 100%; border-collapse: collapse; }
.settings-room-table th, .settings-room-table td { padding: 9px 11px; border-bottom: 1px solid #e3ebf2; text-align: left; vertical-align: middle; }
.settings-room-table th { position: sticky; top: 0; z-index: 1; background: #edf4fa; color: var(--navy); font-size: 12px; }
.settings-room-table td { color: #294158; font-size: 12px; }
.settings-room-table td small { display: block; max-width: 310px; margin-top: 3px; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.settings-occupancy { display: inline-block; min-width: 42px; padding: 4px 7px; border-radius: 8px; background: #e9f7ee; color: #236d45; font-size: 10px; font-weight: 900; text-align: center; }
.settings-occupancy.is-full { background: #fff0df; color: #8b5712; }
.settings-room-actions { display: flex; gap: 6px; }
.settings-room-actions button { padding: 6px 8px; border: 1px solid #9db9d1; border-radius: 7px; background: #edf5fc; color: #245b88; font-size: 9px; font-weight: 900; cursor: pointer; }
.settings-room-actions button.is-danger { border-color: #dfb1b1; background: #faeeee; color: #9a2929; }
.settings-room-actions button:disabled { opacity: .42; cursor: not-allowed; }
.settings-backup-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.settings-external-export-card { margin-bottom: 18px; overflow: hidden; border: 1px solid #8db8a0; border-radius: 16px; background: linear-gradient(135deg,#edf9f2 0%,#fff 68%); box-shadow: 0 8px 22px rgba(31,112,69,.09); }
.settings-external-export-card.is-loading { min-height: 130px; display: flex; align-items: center; justify-content: center; gap: 12px; color: #416d55; }
.settings-external-export-card.has-error, .settings-external-export-card.is-overdue { border-color: #d8b36e; background: linear-gradient(135deg,#fff8e8 0%,#fff 72%); }
.settings-external-export-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 19px 20px 14px; }
.settings-external-export-kicker { display: block; margin-bottom: 4px; color: #247248; font-size: 12px; font-weight: 950; letter-spacing: .055em; }
.settings-external-export-card.is-overdue .settings-external-export-kicker, .settings-external-export-card.has-error .settings-external-export-kicker { color: #8a5c13; }
.settings-external-export-heading h3 { margin: 0; color: var(--navy); font-size: 20px; }
.settings-external-export-heading p { max-width: 980px; margin: 6px 0 0; color: #526b82; font-size: 13px; line-height: 1.5; }
.settings-external-export-state { flex: 0 0 auto; padding: 8px 11px; border: 1px solid #98c4aa; border-radius: 9px; background: #e5f5eb; color: #216c43; font-size: 10px; font-weight: 950; white-space: nowrap; }
.settings-external-export-state.is-overdue { border-color: #dfbd78; background: #fff3d8; color: #845811; }
.settings-external-export-body { display: grid; grid-template-columns: 62px minmax(0,1fr) auto; align-items: center; gap: 17px; padding: 0 20px 17px; }
.settings-external-export-icon { display: grid; width: 62px; height: 62px; place-items: center; border-radius: 17px; background: #278050; color: #fff; font-size: 30px; font-weight: 950; }
.settings-external-export-card.is-overdue .settings-external-export-icon { background: #ae741b; }
.settings-external-export-details { min-width: 0; }
.settings-external-export-facts { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; }
.settings-external-export-facts span { min-width: 0; padding: 9px 10px; border: 1px solid #d5e4dc; border-radius: 9px; background: rgba(255,255,255,.9); }
.settings-external-export-facts small, .settings-external-export-facts strong { display: block; }
.settings-external-export-facts small { margin-bottom: 4px; color: #657b8e; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.settings-external-export-facts strong { overflow: hidden; color: var(--navy); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.settings-external-export-file { margin: 8px 0 0; color: #405d73; font-size: 11px; overflow-wrap: anywhere; }
.settings-external-export-hash { margin: 5px 0 0; color: #60778a; font-family: ui-monospace,SFMono-Regular,Consolas,monospace; font-size: 10px; overflow-wrap: anywhere; }
.settings-external-export-body > button { min-width: 270px; min-height: 48px; }
.settings-external-export-note { display: flex; align-items: center; gap: 10px; padding: 11px 20px; border-top: 1px solid #d5e3dc; background: rgba(255,255,255,.7); color: #526b5e; }
.settings-external-export-note strong { flex: 0 0 auto; font-size: 12px; }
.settings-external-export-note span { font-size: 11px; line-height: 1.4; }
.settings-offsite-backup-card { margin-bottom: 18px; overflow: hidden; border: 1px solid #8eb8c8; border-radius: 16px; background: linear-gradient(135deg,#edf8fb 0%,#fff 68%); box-shadow: 0 8px 22px rgba(25,100,126,.09); }
.settings-offsite-backup-card.is-loading { min-height: 130px; display: flex; align-items: center; justify-content: center; gap: 12px; color: #3d6d7d; }
.settings-offsite-backup-card.is-warning { border-color: #deb96f; background: linear-gradient(135deg,#fff7e3 0%,#fff 72%); }
.settings-offsite-backup-card.has-error { border-color: #dca49e; background: linear-gradient(135deg,#fff0ee 0%,#fff 72%); }
.settings-offsite-backup-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 19px 20px 14px; }
.settings-offsite-kicker { display: block; margin-bottom: 4px; color: #176d89; font-size: 12px; font-weight: 950; letter-spacing: .055em; }
.settings-offsite-backup-card h3 { margin: 0; color: var(--navy); font-size: 20px; }
.settings-offsite-backup-card header p { max-width: 1030px; margin: 6px 0 0; color: #526b82; font-size: 13px; line-height: 1.5; }
.settings-offsite-state { flex: 0 0 auto; padding: 8px 11px; border: 1px solid #98c4aa; border-radius: 9px; background: #e5f5eb; color: #216c43; font-size: 10px; font-weight: 950; white-space: nowrap; }
.settings-offsite-backup-card.is-warning .settings-offsite-state { border-color: #dfbd78; background: #fff3d8; color: #845811; }
.settings-offsite-backup-card.has-error .settings-offsite-state { border-color: #e2aaa4; background: #fdecea; color: #a2342a; }
.settings-offsite-facts { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 9px; padding: 0 20px 13px; }
.settings-offsite-facts > span { min-width: 0; padding: 10px 11px; border: 1px solid #d2e3e9; border-radius: 10px; background: rgba(255,255,255,.86); }
.settings-offsite-facts small, .settings-offsite-facts strong { display: block; }
.settings-offsite-facts small { margin-bottom: 4px; color: #657b8e; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.settings-offsite-facts strong { overflow: hidden; color: var(--navy); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.settings-offsite-retention { display: flex; flex-wrap: wrap; gap: 7px; padding: 0 20px 13px; }
.settings-offsite-retention span { padding: 6px 9px; border-radius: 8px; background: #e5f1f5; color: #3d6472; font-size: 10px; }
.settings-offsite-retention strong { margin-left: 4px; color: var(--navy); }
.settings-offsite-guidance { display: grid; gap: 3px; margin: 0 20px 13px; padding: 10px 12px; border: 1px solid #dfbd78; border-radius: 9px; background: #fff5df; color: #785418; }
.settings-offsite-backup-card.has-error .settings-offsite-guidance { border-color: #e1aaa4; background: #fdecea; color: #8e2f27; }
.settings-offsite-guidance strong { font-size: 11px; }
.settings-offsite-guidance span { font-size: 10px; line-height: 1.45; }
.settings-offsite-guidance code { padding: 1px 4px; border-radius: 4px; background: rgba(255,255,255,.7); }
.settings-offsite-actions { display: flex; align-items: center; gap: 9px; padding: 0 20px 16px; }
.settings-offsite-actions > span { margin-left: auto; color: #5e7589; font-size: 10px; line-height: 1.35; text-align: right; }
.settings-automatic-backup-card { margin-bottom: 18px; overflow: hidden; border: 1px solid #9bbad2; border-radius: 16px; background: linear-gradient(135deg,#eef6fc 0%,#fff 62%); box-shadow: 0 8px 22px rgba(30,90,135,.08); }
.settings-automatic-backup-card.is-loading { min-height: 130px; display: flex; align-items: center; justify-content: center; gap: 12px; color: #48667f; }
.settings-automatic-backup-card.has-error { border-color: #dea6a0; background: #fff6f5; }
.settings-automatic-backup-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 18px 20px 13px; }
.settings-automatic-backup-kicker { display: block; margin-bottom: 4px; color: #23648f; font-size: 11px; font-weight: 950; letter-spacing: .055em; }
.settings-automatic-backup-card h3 { margin: 0; color: var(--navy); font-size: 19px; }
.settings-automatic-backup-card header p { margin: 5px 0 0; color: #526b82; font-size: 13px; line-height: 1.45; }
.settings-automatic-status { flex: 0 0 auto; padding: 7px 10px; border: 1px solid #b5c9da; border-radius: 9px; background: #edf4fa; color: #48667f; font-size: 10px; font-weight: 950; }
.settings-automatic-status.is-success { border-color: #9fcdb0; background: #eaf7ef; color: #237047; }
.settings-automatic-status.has-error { border-color: #e2aaa4; background: #fdecea; color: #a2342a; }
.settings-automatic-facts { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 9px; padding: 0 20px 13px; }
.settings-automatic-facts > span { min-width: 0; padding: 10px 11px; border: 1px solid #d5e1ea; border-radius: 10px; background: rgba(255,255,255,.82); }
.settings-automatic-facts small, .settings-automatic-facts strong { display: block; }
.settings-automatic-facts small { margin-bottom: 4px; color: #6a7f91; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.settings-automatic-facts strong { overflow: hidden; color: var(--navy); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.settings-automatic-retention { display: flex; flex-wrap: wrap; gap: 7px; padding: 0 20px 13px; }
.settings-automatic-retention span { padding: 6px 9px; border-radius: 8px; background: #e8f1f8; color: #49647b; font-size: 10px; }
.settings-automatic-retention strong { margin-left: 4px; color: var(--navy); }
.settings-automatic-retention .is-recovery { background: #e7f6ed; color: #256e47; }
.settings-automatic-error { display: grid; gap: 3px; margin: 0 20px 13px; padding: 10px 12px; border: 1px solid #e1aaa4; border-radius: 9px; background: #fdecea; color: #8e2f27; }
.settings-automatic-error strong { font-size: 11px; }
.settings-automatic-error span { font-size: 10px; line-height: 1.4; }
.settings-automatic-actions { display: flex; align-items: center; gap: 9px; padding: 0 20px 16px; }
.settings-automatic-actions > span { margin-left: auto; color: #5e7589; font-size: 10px; line-height: 1.35; text-align: right; }
.settings-automatic-table-scroll { overflow-x: auto; border-top: 1px solid #d4e1eb; }
.settings-automatic-table { min-width: 1210px; width: 100%; border-collapse: collapse; background: #fff; }
.settings-automatic-table th, .settings-automatic-table td { padding: 9px 11px; border-bottom: 1px solid #e4ebf1; color: #314d65; font-size: 11px; text-align: left; vertical-align: middle; }
.settings-automatic-table th { background: #edf4f9; color: #294c68; font-size: 10px; font-weight: 900; text-transform: uppercase; }
.settings-automatic-table td:nth-child(3), .settings-automatic-table td:nth-child(4), .settings-automatic-table td:nth-child(5) { white-space: nowrap; }
.settings-automatic-table td strong, .settings-automatic-table td small { display: block; }
.settings-automatic-table td small { max-width: 360px; margin-top: 3px; overflow: hidden; color: #74889a; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.settings-automatic-table button { padding: 6px 8px; border: 1px solid #95b8d2; border-radius: 7px; background: #eef6fb; color: #235d88; font-size: 9px; font-weight: 900; cursor: pointer; }
.settings-automatic-table button:disabled { opacity: .55; cursor: not-allowed; }
.settings-automatic-row-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; min-width: 215px; }
.settings-automatic-row-actions .is-restore { border-color: #79ad8e; background: #edf8f1; color: #1f7044; }
.settings-automatic-row-actions .is-delete { border-color: #dfa7a2; background: #fff0ee; color: #a22d24; }
.settings-disk-alert { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 20px 13px; padding: 10px 12px; border: 1px solid #dfbd78; border-radius: 9px; background: #fff5df; color: #785418; }
.settings-disk-alert.is-critical { border-color: #e1aaa4; background: #fdecea; color: #8e2f27; }
.settings-disk-alert strong { font-size: 11px; }
.settings-disk-alert span { font-size: 10px; line-height: 1.4; text-align: right; }
.settings-automatic-backup-card > .settings-full-restore-summary { margin: 14px 20px 18px; }
.settings-automatic-tier { display: inline-block; min-width: 94px; padding: 5px 7px; border-radius: 8px; background: #e8f1f8; color: #2d668f; font-size: 9px; font-weight: 900; text-align: center; text-transform: uppercase; }
.settings-automatic-tier.is-weekly { background: #f1ecf8; color: #64458b; }
.settings-automatic-tier.is-monthly { background: #fff0dc; color: #8a5915; }
.settings-automatic-tier.is-recovery { min-width: 122px; background: #e3f5ea; color: #1f7448; }
.settings-automatic-table td small.settings-recovery-reason { color: #278052; font-size: 9px; font-weight: 850; }
.settings-integrity-state { display: inline-block; min-width: 88px; padding: 5px 7px; border-radius: 8px; background: #fff4d8; color: #8a6417; font-size: 9px; font-weight: 950; text-align: center; }
.settings-integrity-state.is-valid { background: #e5f6eb; color: #207146; }
.settings-integrity-state.is-invalid { background: #fde7e5; color: #a02d25; }
.settings-automatic-table tr.is-integrity-invalid td { background: #fff7f6; }
.settings-automatic-table td small.settings-integrity-error { max-width: 250px; overflow: visible; color: #a02d25; font-size: 9px; font-weight: 750; line-height: 1.35; text-overflow: clip; white-space: normal; }
.settings-automatic-table tr.is-integrity-invalid .settings-automatic-row-actions .is-restore { border-color: #e0aaa5; background: #fbe9e7; color: #962e27; }
.settings-automatic-empty { padding: 22px !important; color: #6d8092 !important; text-align: center !important; }
.settings-backup-card { display: flex; align-items: flex-start; gap: 15px; min-height: 240px; }
.settings-backup-icon { display: grid; flex: 0 0 48px; width: 48px; height: 48px; place-items: center; border-radius: 14px; background: #e5f4eb; color: #2b8153; font-size: 25px; font-weight: 900; }
.settings-backup-card.is-restore .settings-backup-icon { background: #f9eaea; color: #a53535; }
.settings-backup-card > div { display: flex; min-height: 205px; flex: 1; flex-direction: column; }
.settings-backup-card strong { display: block; margin: 2px 0 18px; color: #536b80; font-size: 11px; line-height: 1.45; }
.settings-backup-card button { align-self: flex-start; margin-top: auto; }
.settings-backup-warning { margin-top: 16px; padding: 15px 17px; border: 1px solid #e4c37f; border-radius: 13px; background: #fff7e5; }
.settings-backup-warning strong { color: #82550f; font-size: 13px; }
.settings-backup-warning p { margin: 4px 0 0; color: #775f35; font-size: 12px; line-height: 1.45; }
.settings-full-backup-card { display: grid; grid-template-columns: 64px minmax(0,1fr) auto; align-items: center; gap: 18px; margin-bottom: 18px; padding: 20px; border: 1px solid #91c5a5; border-radius: 16px; background: linear-gradient(135deg,#f1faf4 0%,#fff 72%); box-shadow: 0 8px 22px rgba(35,112,70,.08); }
.settings-full-backup-icon { display: grid; width: 64px; height: 64px; place-items: center; border-radius: 17px; background: #268252; color: #fff; font-size: 18px; font-weight: 950; letter-spacing: .035em; }
.settings-full-backup-copy { min-width: 0; }
.settings-full-backup-kicker { display: block; margin-bottom: 4px; color: #28714b; font-size: 11px; font-weight: 950; letter-spacing: .055em; }
.settings-full-backup-copy h3, .settings-backup-secondary-heading h3 { margin: 0; color: var(--navy); font-size: 18px; }
.settings-full-backup-copy p, .settings-backup-secondary-heading p { margin: 5px 0 10px; color: #526b82; font-size: 13px; line-height: 1.5; }
.settings-full-backup-copy > strong { display: block; color: #526b5c; font-size: 11px; line-height: 1.45; }
.settings-full-backup-includes { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 10px; }
.settings-full-backup-includes span { padding: 5px 8px; border: 1px solid #afd3bd; border-radius: 8px; background: #fff; color: #256b45; font-size: 11px; font-weight: 850; }
.settings-full-backup-card > button { min-width: 220px; min-height: 46px; }
.settings-full-restore-card { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 15px 20px; margin-bottom: 18px; padding: 20px; border: 1px solid #d9b981; border-radius: 16px; background: linear-gradient(135deg,#fff8ea 0%,#fff 75%); box-shadow: 0 8px 22px rgba(126,79,19,.07); }
.settings-full-restore-intro { display: flex; min-width: 0; align-items: center; gap: 16px; }
.settings-full-restore-icon { display: grid; flex: 0 0 54px; width: 54px; height: 54px; place-items: center; border-radius: 15px; background: #aa6b18; color: #fff; font-size: 28px; font-weight: 950; }
.settings-full-restore-kicker { display: block; margin-bottom: 4px; color: #976018; font-size: 11px; font-weight: 950; letter-spacing: .055em; }
.settings-full-restore-intro h3 { margin: 0; color: var(--navy); font-size: 18px; }
.settings-full-restore-intro p { margin: 5px 0 7px; color: #526b82; font-size: 13px; line-height: 1.45; }
.settings-full-restore-intro strong { color: #755d38; font-size: 11px; line-height: 1.4; }
.settings-full-restore-card > .secondary-button { min-width: 250px; min-height: 44px; }
.settings-full-restore-summary { grid-column: 1 / -1; padding: 15px; border: 1px solid #b9d2c3; border-radius: 12px; background: #f4faf6; }
.settings-full-restore-summary.has-revision-conflict { border-color: #e2b0a9; background: #fff3f1; }
.settings-full-restore-summary-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.settings-full-restore-summary-heading strong, .settings-full-restore-summary-heading span { display: block; }
.settings-full-restore-summary-heading strong { color: #236d45; font-size: 14px; }
.settings-full-restore-summary-heading span { margin-top: 3px; color: #526b82; font-size: 11px; overflow-wrap: anywhere; }
.settings-full-restore-summary-heading button { padding: 6px 9px; border: 1px solid #b7c8d7; border-radius: 7px; background: #fff; color: #526b82; font-size: 9px; font-weight: 900; cursor: pointer; }
.settings-full-restore-facts { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 8px; }
.settings-full-restore-facts span { min-width: 0; padding: 9px; border: 1px solid #d6e3db; border-radius: 9px; background: #fff; }
.settings-full-restore-facts small, .settings-full-restore-facts strong { display: block; }
.settings-full-restore-facts small { margin-bottom: 3px; color: #6c7f90; font-size: 9px; }
.settings-full-restore-facts strong { color: var(--navy); font-size: 12px; overflow-wrap: anywhere; }
.settings-full-restore-hash { margin: 10px 0; color: #667b8c; font-family: ui-monospace,SFMono-Regular,Consolas,monospace; font-size: 9px; overflow-wrap: anywhere; }
.settings-pre-restore-protection { display: grid; gap: 3px; margin: 10px 0; padding: 10px 11px; border: 1px solid #a9d2b9; border-radius: 9px; background: #eaf7ef; color: #276744; }
.settings-pre-restore-protection strong { font-size: 12px; }
.settings-pre-restore-protection span { font-size: 10px; line-height: 1.4; }
.settings-full-restore-confirm { display: grid; grid-template-columns: minmax(0,1fr) 190px; align-items: center; gap: 12px; margin: 11px 0; color: #6f5530; font-size: 11px; line-height: 1.4; }
.settings-full-restore-confirm input { min-height: 39px; border-color: #d5ac6a; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.settings-full-restore-summary > .danger-button { min-height: 42px; }
.settings-full-restore-conflict { display: grid; gap: 3px; padding: 11px; border-radius: 9px; background: #f8deda; color: #8a2f26; }
.settings-full-restore-conflict strong { font-size: 12px; }
.settings-full-restore-conflict span { font-size: 10px; line-height: 1.4; }
.settings-backup-secondary-heading { margin: 3px 0 12px; }

@media (max-width: 1000px) {
  .settings-general-grid, .settings-backup-grid { grid-template-columns: 1fr; }
  .settings-external-export-body { grid-template-columns: 62px minmax(0,1fr); }
  .settings-external-export-body > button { grid-column: 1 / -1; width: 100%; }
  .settings-external-export-facts { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .settings-offsite-facts { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .settings-full-backup-card { grid-template-columns: 64px minmax(0,1fr); }
  .settings-full-backup-card > button { grid-column: 1 / -1; width: 100%; }
  .settings-full-restore-card { grid-template-columns: 1fr; }
  .settings-full-restore-card > .secondary-button { width: 100%; }
  .settings-full-restore-facts { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .settings-automatic-facts { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 700px) {
  .settings-module-heading, .settings-room-heading { align-items: stretch; flex-direction: column; }
  .settings-module-tabs { flex-direction: column; padding-bottom: 10px; }
  .settings-module-tabs button { border: 1px solid #d4e0ea; border-radius: 8px; }
  .settings-module-tabs button.is-active { border-color: var(--blue); background: var(--blue); color: #fff; }
  #settings-module-content { padding: 12px; }
  .settings-list-values { grid-template-columns: 1fr; }
  .settings-list-add { align-items: stretch; flex-direction: column; }
  .settings-list-add button, .settings-room-heading button { width: 100%; }
  .settings-backup-card { flex-direction: column; }
  .settings-external-export-heading, .settings-external-export-note { align-items: stretch; flex-direction: column; }
  .settings-external-export-state { align-self: flex-start; }
  .settings-external-export-body { grid-template-columns: 1fr; }
  .settings-external-export-icon { width: 54px; height: 54px; }
  .settings-external-export-facts { grid-template-columns: 1fr; }
  .settings-offsite-backup-card > header, .settings-offsite-actions { align-items: stretch; flex-direction: column; }
  .settings-offsite-state { align-self: flex-start; }
  .settings-offsite-facts { grid-template-columns: 1fr; }
  .settings-offsite-actions > span { margin-left: 0; text-align: left; }
  .settings-disk-alert { align-items: flex-start; flex-direction: column; }
  .settings-disk-alert span { text-align: left; }
  .settings-full-backup-card { grid-template-columns: 1fr; }
  .settings-full-backup-icon { width: 54px; height: 54px; }
  .settings-full-restore-intro { align-items: flex-start; }
  .settings-full-restore-facts { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .settings-full-restore-confirm { grid-template-columns: 1fr; }
  .settings-automatic-backup-card > header, .settings-automatic-actions { align-items: stretch; flex-direction: column; }
  .settings-automatic-status { align-self: flex-start; }
  .settings-automatic-actions > span { margin-left: 0; text-align: left; }
  .settings-automatic-facts { grid-template-columns: 1fr; }
}

/* Droits d’accès — profils attribués par le serveur. */
.access-page-heading { align-items: center; }
.access-profile-badge {
  display: inline-flex;
  min-height: 38px;
  padding: 9px 14px;
  align-items: center;
  border: 1px solid #8ebaa0;
  border-radius: 20px;
  background: #e7f5ec;
  color: #226b43;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .025em;
  white-space: nowrap;
}
.access-profile-standard { border-color: #8fb5d5; background: #e9f3fb; color: #245f90; }
.access-profile-readonly { border-color: #d0b47e; background: #fff5df; color: #815b15; }
.access-session-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; margin-bottom: 16px; }
.access-session-card { display: flex; min-height: 112px; align-items: center; gap: 14px; padding: 17px; }
.access-profile-icon { display: grid; flex: 0 0 44px; width: 44px; height: 44px; place-items: center; border-radius: 13px; background: #e8f1f9; color: var(--blue); font-size: 22px; font-weight: 900; }
.access-session-card span, .access-session-card strong, .access-session-card small { display: block; }
.access-session-card span { margin-bottom: 5px; color: var(--muted); font-size: 12px; font-weight: 750; }
.access-session-card strong { color: var(--navy); font-size: 17px; }
.access-session-card small { margin-top: 4px; color: #5c7184; font-size: 12px; line-height: 1.35; }
.access-matrix-panel { padding: 0; overflow: hidden; }
.access-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 17px 18px; }
.access-section-heading h2 { margin: 0; color: var(--navy); font-size: 19px; }
.access-section-heading p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.access-table-scroll { max-width: 100%; overflow: auto; border-top: 1px solid var(--line); }
.access-matrix-table { min-width: 940px; width: 100%; border-collapse: collapse; }
.access-matrix-table th, .access-matrix-table td { padding: 12px 13px; border-bottom: 1px solid #e1e9f0; text-align: left; vertical-align: middle; }
.access-matrix-table th { background: #edf4fa; color: var(--navy); font-size: 13px; }
.access-matrix-table td { color: #294158; font-size: 13px; }
.access-matrix-table th:first-child { width: 34%; }
.access-matrix-table th:last-child { width: 90px; }
.access-row-restricted { background: #fffaf1; }
.access-status { display: inline-block; padding: 5px 8px; border: 1px solid #a7c9b4; border-radius: 8px; background: #ebf7ef; color: #246c44; font-size: 11px; font-weight: 850; white-space: nowrap; }
.access-status-denied { border-color: #dfb2b2; background: #faeded; color: #9b2d2d; }
.access-matrix-table .table-action { padding: 7px 9px; border: 1px solid #8fb2d2; border-radius: 8px; background: #edf5fc; color: #174f82; font-size: 10px; font-weight: 900; cursor: pointer; }
.access-matrix-table .table-action:disabled { border-color: #d6dce2; background: #f1f3f5; color: #8a949d; cursor: not-allowed; }
.access-note-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; margin-top: 16px; }
.access-rule-card { min-height: 126px; padding: 17px; border-top: 4px solid #2b8b58; }
.access-rule-card:nth-child(2) { border-top-color: var(--blue); }
.access-rule-card:nth-child(3) { border-top-color: #d28a16; }
.access-rule-card h2 { margin: 0 0 8px; color: var(--navy); font-size: 17px; }
.access-rule-card p { margin: 0; color: #526b82; font-size: 13px; line-height: 1.5; }
.access-actions { margin-top: 16px; }

@media (max-width: 1000px) {
  .access-session-grid, .access-note-grid { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .access-page-heading, .access-section-heading { align-items: stretch; flex-direction: column; }
  .access-profile-badge { align-self: flex-start; }
  .access-actions { flex-direction: column; }
  .access-actions button { width: 100%; }
}

/* Gestion des profils V34 — commandes visibles, recherche et états de sécurité. */
.access-users-panel { margin: 0 0 16px; padding: 0; overflow: hidden; border: 2px solid #b9d0e2; }
.access-users-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 20px; background: linear-gradient(110deg,#f7fbfe,#edf5fb); }
.access-users-heading h2 { margin: 2px 0 0; color: var(--navy); font-size: 21px; }
.access-users-heading p { margin: 6px 0 0; color: #526b82; font-size: 13px; }
.access-users-heading .eyebrow { margin: 0; color: #34688f; font-size: 10px; font-weight: 900; letter-spacing: .08em; }
.access-users-content { border-top: 1px solid var(--line); }
.access-users-loading, .access-users-error { display: flex; min-height: 130px; align-items: center; justify-content: center; gap: 11px; padding: 22px; color: var(--muted); font-size: 13px; text-align: center; }
.access-users-loading .spinner { width: 22px; height: 22px; }
.access-users-error { flex-direction: column; }
.access-users-error strong { color: #9b2d2d; font-size: 15px; }
.access-users-error p { margin: 0 0 4px; }
.access-users-summary { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 17px; background: #f7fafc; }
.access-users-summary span { padding: 7px 10px; border: 1px solid #d7e2eb; border-radius: 9px; background: #fff; color: #587087; font-size: 11px; }
.access-users-summary strong { margin-right: 3px; color: var(--navy); font-size: 13px; }
.access-users-toolbar { display: grid; grid-template-columns: minmax(220px,1.5fr) minmax(145px,.75fr) minmax(165px,.85fr) auto; align-items: end; gap: 12px; padding: 14px 17px; border-top: 1px solid #e2eaf1; background: #fff; }
.access-users-toolbar label { color: #385269; font-size: 12px; font-weight: 800; }
.access-users-toolbar input, .access-users-toolbar select { min-height: 41px; margin-top: 5px; font-size: 13px; }
.access-users-toolbar-actions { display: flex; gap: 7px; }
.access-users-toolbar-actions button { min-height: 41px; padding: 8px 11px; white-space: nowrap; }
.access-users-results { padding: 8px 17px; border-top: 1px solid #e2eaf1; background: #f8fafc; color: #60758a; font-size: 11px; }
.access-users-results strong { color: var(--navy); font-size: 13px; }
.access-users-table-scroll { max-width: 100%; overflow: auto; border-top: 1px solid #e2eaf1; }
.access-users-table { min-width: 980px; width: 100%; border-collapse: collapse; }
.access-users-table th, .access-users-table td { padding: 11px 12px; border-bottom: 1px solid #e2eaf1; text-align: left; vertical-align: middle; }
.access-users-table th { background: #e8f1f8; color: var(--navy); font-size: 13px; }
.access-users-table td { color: #294158; font-size: 13px; }
.access-users-table th:first-child { width: 24%; }
.access-users-table th:nth-child(2) { width: 140px; }
.access-users-table th:nth-child(3) { width: 125px; }
.access-users-table th:nth-child(4) { width: 150px; }
.access-users-table tr.is-inactive { background: #f8f9fa; opacity: .78; }
.access-users-table td > strong, .access-users-table td > small { display: block; }
.access-users-table td > small { margin-top: 4px; color: var(--muted); font-size: 11px; }
.access-user-role, .access-user-status { display: inline-block; padding: 5px 8px; border: 1px solid #8fb5d5; border-radius: 8px; background: #e9f3fb; color: #245f90; font-size: 11px; font-weight: 900; white-space: nowrap; }
.access-user-role.is-admin { border-color: #8ebaa0; background: #e7f5ec; color: #226b43; }
.access-user-role.is-readonly { border-color: #d0b47e; background: #fff5df; color: #815b15; }
.access-user-status.is-active { border-color: #9dceb0; background: #e9f7ee; color: #236d45; }
.access-user-status.is-inactive { border-color: #c6cdd3; background: #eff1f3; color: #697681; }
.access-user-status.is-locked { border-color: #e1a7a7; background: #fdecec; color: #a62222; }
.access-user-actions { display: flex; flex-wrap: wrap; gap: 5px; }
.access-user-actions button { padding: 7px 9px; border: 1px solid #9db9d1; border-radius: 7px; background: #edf5fc; color: #245b88; font-size: 10px; font-weight: 900; cursor: pointer; }
.access-user-actions button:hover { border-color: var(--blue); background: var(--blue); color: #fff; }
.access-user-actions button.is-danger { border-color: #dfb1b1; background: #faeeee; color: #9a2929; }
.access-user-actions button.is-danger:hover { border-color: #a92b2b; background: #a92b2b; color: #fff; }
.access-user-actions button.is-success { border-color: #9dceb0; background: #e9f7ee; color: #236d45; }
.access-users-empty { padding: 35px !important; color: var(--muted) !important; text-align: center !important; }
.access-users-empty strong, .access-users-empty small { display: block; }
.access-users-empty strong { color: var(--navy); font-size: 14px; }
.access-users-safety { margin: 14px 17px 17px; padding: 13px 15px; border: 1px solid #b5cadc; border-radius: 12px; background: #f2f7fb; }
.access-users-safety strong { color: var(--navy); font-size: 12px; }
.access-users-safety p { margin: 4px 0 0; color: #526b82; font-size: 11px; line-height: 1.45; }
.access-user-form { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.access-user-form label { margin: 0; color: #385269; font-size: 12px; font-weight: 750; }
.access-user-form input, .access-user-form select { margin-top: 5px; }
.access-user-form label small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; font-weight: 500; }
.access-user-form-note { grid-column: 1 / -1; margin: 0; padding: 12px 13px; border-radius: 10px; background: #f2f7fb; color: #526b82; font-size: 12px; line-height: 1.45; }
.access-user-immutable { padding: 10px 12px; border: 1px solid #dbe5ee; border-radius: 10px; background: #f8fafc; }
.access-user-immutable span, .access-user-immutable strong { display: block; }
.access-user-immutable span { color: var(--muted); font-size: 10px; }
.access-user-immutable strong { margin-top: 4px; color: var(--navy); font-size: 13px; }
.access-password-visibility { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; }
.access-password-visibility input { width: 17px; min-height: 17px; margin: 0; }

@media (max-width: 1100px) {
  .access-users-toolbar { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .access-users-toolbar-actions { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  .access-users-heading { align-items: stretch; flex-direction: column; }
  .access-users-heading button { width: 100%; }
  .access-users-toolbar { grid-template-columns: 1fr; }
  .access-users-toolbar-actions { grid-column: auto; flex-direction: column; }
  .access-users-toolbar-actions button { width: 100%; }
  .access-user-form { grid-template-columns: 1fr; }
}

/* Journal détaillé V36 — écritures Web lisibles, périodes rapides et export. */
.audit-page-heading { align-items: center; }
.audit-readonly-badge { display: inline-flex; min-height: 38px; padding: 9px 14px; align-items: center; border: 1px solid #8ebaa0; border-radius: 20px; background: #e7f5ec; color: #226b43; font-size: 12px; font-weight: 900; letter-spacing: .035em; white-space: nowrap; }
.audit-filter-panel, .audit-results-panel { padding: 0; overflow: hidden; }
.audit-filter-heading, .audit-results-summary { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 17px 18px; }
.audit-filter-heading h2, .audit-results-summary h2 { margin: 0; color: var(--navy); font-size: 19px; }
.audit-filter-heading p, .audit-results-summary p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.audit-period-presets { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; padding: 10px 18px; border-top: 1px solid var(--line); background: #fff; }
.audit-period-presets span { margin-right: 3px; color: #526b82; font-size: 11px; font-weight: 800; }
.audit-period-presets button { min-height: 30px; padding: 6px 9px; border: 1px solid #b5c9d9; border-radius: 8px; background: #f3f7fa; color: #315f83; font-size: 9px; font-weight: 900; cursor: pointer; }
.audit-period-presets button:hover { border-color: var(--blue); background: var(--blue); color: #fff; }
.audit-filter-grid { display: grid; grid-template-columns: minmax(210px,1.4fr) minmax(170px,1fr) minmax(190px,1.15fr) 145px 145px auto; gap: 12px; padding: 16px 18px 18px; border-top: 1px solid var(--line); background: #f8fafc; }
.audit-filter-grid label { color: #385269; font-size: 12px; font-weight: 750; }
.audit-filter-grid input, .audit-filter-grid select { min-height: 42px; margin-top: 5px; font-size: 13px; }
.audit-filter-actions { display: flex; align-items: flex-end; gap: 7px; }
.audit-filter-actions button { min-height: 42px; padding: 9px 11px; }
.audit-results-panel { margin-top: 16px; }
.audit-results-summary { border-bottom: 1px solid var(--line); }
.audit-results-actions { display: flex; align-items: center; gap: 8px; }
.audit-results-actions > span { padding: 6px 9px; border-radius: 8px; background: #edf4fa; color: #45627b; font-size: 11px; font-weight: 800; }
.audit-results-actions button { min-height: 35px; padding: 7px 10px; }
.audit-loading, .audit-error, .audit-empty { display: flex; min-height: 180px; align-items: center; justify-content: center; gap: 11px; padding: 28px; color: var(--muted); font-size: 13px; text-align: center; }
.audit-error, .audit-empty { flex-direction: column; }
.audit-error strong { color: #9b2d2d; font-size: 16px; }
.audit-empty strong { color: var(--navy); font-size: 16px; }
.audit-error p, .audit-empty p { margin: 0; }
.audit-table-scroll { max-width: 100%; overflow: auto; }
.audit-table { min-width: 1040px; width: 100%; border-collapse: collapse; }
.audit-table th, .audit-table td { padding: 12px 13px; border-bottom: 1px solid #e1e9f0; text-align: left; vertical-align: top; }
.audit-table th { position: sticky; top: 0; z-index: 1; background: #edf4fa; color: var(--navy); font-size: 13px; }
.audit-table td { color: #294158; font-size: 13px; line-height: 1.4; }
.audit-table th:first-child { width: 170px; }
.audit-table th:nth-child(2) { width: 190px; }
.audit-table th:nth-child(3) { width: 205px; }
.audit-table time { color: #304e68; font-variant-numeric: tabular-nums; white-space: nowrap; }
.audit-actor strong, .audit-actor small, .audit-table td:nth-child(3) small { display: block; }
.audit-actor strong { color: var(--navy); font-size: 13px; }
.audit-actor small, .audit-table td:nth-child(3) small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.audit-action { display: inline-block; padding: 5px 8px; border: 1px solid #9db9d1; border-radius: 8px; background: #edf5fc; color: #245b88; font-size: 11px; font-weight: 900; }
.audit-action-user { border-color: #bea8d4; background: #f2ebf8; color: #68418b; }
.audit-action-login { border-color: #8ebaa0; background: #e7f5ec; color: #226b43; }
.audit-action-photo { border-color: #d3ac71; background: #fff3df; color: #845710; }
.audit-action-save { border-color: #8fb5d5; background: #e9f3fb; color: #245f90; }
.audit-action-write { border-color: #83b7a0; background: #e8f5ef; color: #1f6b48; }
.audit-detail-list { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.audit-detail-list span { color: #526b82; font-size: 12px; }
.audit-detail-list strong { color: #294158; }
.audit-empty-detail { color: #8190a0; font-size: 12px; font-style: italic; }
.audit-pagination { display: flex; align-items: center; justify-content: center; gap: 15px; padding: 14px 18px; background: #f8fafc; }
.audit-pagination strong { color: #425d75; font-size: 12px; }
.audit-pagination button { min-width: 160px; }
.audit-security-note { display: flex; gap: 13px; margin-top: 16px; padding: 15px 17px; border: 1px solid #a8cdb6; border-radius: 14px; background: #edf8f1; }
.audit-security-note > span { display: grid; flex: 0 0 32px; width: 32px; height: 32px; place-items: center; border-radius: 50%; background: #2f9964; color: #fff; font-size: 18px; font-weight: 900; }
.audit-security-note strong { color: #1e6641; font-size: 14px; }
.audit-security-note p { margin: 4px 0 0; color: #456b56; font-size: 12px; line-height: 1.45; }

@media (max-width: 1250px) {
  .audit-filter-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .audit-filter-actions { align-items: flex-end; }
}
@media (max-width: 700px) {
  .audit-page-heading, .audit-filter-heading, .audit-results-summary { align-items: stretch; flex-direction: column; }
  .audit-readonly-badge { align-self: flex-start; }
  .audit-filter-grid { grid-template-columns: 1fr; }
  .audit-filter-actions { align-items: stretch; flex-direction: column; }
  .audit-period-presets { align-items: stretch; }
  .audit-period-presets span { flex: 1 0 100%; }
  .audit-results-actions { align-items: stretch; flex-direction: column; }
  .audit-filter-actions button, .audit-pagination button { width: 100%; }
  .audit-pagination { align-items: stretch; flex-direction: column; text-align: center; }
}

/* Archives extérieures V42 */
.external-archives-page { display: grid; gap: 14px; }
.external-archives-heading { align-items: center; }
.external-archive-readonly-chip, .external-archive-lock { display: inline-flex; align-items: center; justify-content: center; border: 1px solid #a8c6b5; border-radius: 999px; background: #e8f5ed; color: #17683f; font-size: 11px; font-weight: 900; letter-spacing: .04em; padding: 8px 12px; white-space: nowrap; }
.external-archive-metrics { margin: 0; }
.external-archive-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; }
.external-archive-tabs { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.external-archive-tab { border: 1px solid #b7cce0; border-radius: 9px; background: #fff; color: var(--navy); font-weight: 800; padding: 10px 13px; cursor: pointer; }
.external-archive-tab span { display: inline-grid; place-items: center; min-width: 22px; height: 22px; margin-left: 5px; border-radius: 999px; background: #edf3f9; font-size: 11px; }
.external-archive-tab.is-active { border-color: var(--blue); background: var(--blue); color: #fff; }
.external-archive-tab.is-active span { background: rgba(255,255,255,.2); }
.external-archive-toolbar input[type="search"] { width: min(360px,100%); min-height: 42px; border: 1px solid #b7cce0; border-radius: 9px; padding: 0 13px; background: #fff; color: var(--navy); font-weight: 700; }
.external-archive-list-panel { padding: 0; overflow: hidden; }
.external-archive-list-panel > header { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 15px 17px; border-bottom: 1px solid #d4e0eb; }
.external-archive-list-panel > header h2 { margin: 0; color: var(--navy); font-size: 17px; }
.external-archive-list-panel > header p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.external-archive-lock { border-color: #c3d2df; background: #f1f5f9; color: #455d73; }
.external-archive-table-scroll { overflow: auto; }
.external-archive-table { min-width: 1120px; margin: 0; }
.external-archive-table td { vertical-align: middle; }
.external-archive-table td:first-child { min-width: 225px; }
.external-archive-table td:first-child strong { display: block; color: var(--navy); }
.external-archive-table td:first-child small { display: block; max-width: 230px; margin-top: 4px; color: #75889a; font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.external-archive-revision { display: inline-grid; place-items: center; min-width: 28px; height: 28px; border-radius: 7px; background: #e9f1f8; color: var(--navy); font-weight: 900; }
.external-archive-row-actions { display: flex; gap: 6px; white-space: nowrap; }
.external-archive-row-actions .table-action.is-primary { border-color: var(--blue); background: #eaf4fc; color: #155b91; }
.external-archive-empty { margin: 18px; }

@media (max-width: 900px) {
  .external-archive-toolbar { align-items: stretch; flex-direction: column; }
  .external-archive-toolbar input[type="search"] { width: 100%; }
  .external-archive-list-panel > header { align-items: flex-start; flex-direction: column; }
}

/* Pilotage Repas extérieurs V43 */
.external-meals-page { display: grid; gap: 14px; }
.external-meals-heading { align-items: center; }
.external-meals-toolbar { display: flex; align-items: flex-end; gap: 10px; padding: 13px 15px; }
.external-meals-toolbar > label { min-width: 190px; margin: 0; color: #385269; font-size: 12px; font-weight: 800; }
.external-meals-toolbar > label input { margin-top: 5px; }
.external-meals-toolbar-actions { display: flex; flex: 1; justify-content: flex-end; gap: 7px; flex-wrap: wrap; }
.external-meals-metrics { margin: 0; }
.external-meals-service-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.external-meals-service-card { padding: 0; overflow: hidden; }
.external-meals-service-card > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 17px; border-bottom: 1px solid var(--line); background: #f7fafc; }
.external-meals-service-card > header small, .external-meals-service-card > header h2 { display: block; margin: 0; }
.external-meals-service-card > header small { color: var(--blue); font-size: 10px; font-weight: 900; letter-spacing: .05em; }
.external-meals-service-card > header h2 { margin-top: 4px; color: var(--navy); font-size: 17px; }
.external-meals-service-card > header > strong { color: var(--navy); font-size: 22px; white-space: nowrap; }
.external-meals-service-line { display: grid; grid-template-columns: 36px minmax(0,1fr) auto; align-items: center; gap: 11px; padding: 14px 17px; border-bottom: 1px solid #e2eaf1; }
.external-meals-service-line:last-child { border-bottom: 0; }
.external-meals-service-icon { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 10px; color: #fff; font-weight: 900; }
.external-meals-service-icon.angelito { background: #c97813; }
.external-meals-service-icon.individual { background: #2f6fab; }
.external-meals-service-line strong, .external-meals-service-line small { display: block; }
.external-meals-service-line strong { color: var(--navy); font-size: 13px; }
.external-meals-service-line small { margin-top: 3px; color: var(--muted); font-size: 11px; line-height: 1.35; }
.external-meals-service-line em { padding: 5px 7px; border-radius: 7px; background: #edf3f8; color: #45627a; font-size: 9px; font-style: normal; font-weight: 900; white-space: nowrap; }
.external-meals-week-panel { padding: 0; overflow: hidden; }
.external-meals-week-panel > header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 17px; border-bottom: 1px solid var(--line); }
.external-meals-week-panel > header h2, .external-meals-week-panel > header p { margin: 0; }
.external-meals-week-panel > header h2 { color: var(--navy); font-size: 17px; }
.external-meals-week-panel > header p { margin-top: 4px; color: var(--muted); font-size: 12px; }
.external-meals-week-panel > header > div:last-child { text-align: right; }
.external-meals-week-panel > header > div:last-child strong, .external-meals-week-panel > header > div:last-child span { display: block; }
.external-meals-week-panel > header > div:last-child strong { color: var(--navy); font-size: 17px; }
.external-meals-week-panel > header > div:last-child span { margin-top: 3px; color: var(--muted); font-size: 11px; }
.external-meals-week-scroll { overflow: auto; }
.external-meals-week-table { min-width: 850px; margin: 0; }
.external-meals-week-table td:first-child strong, .external-meals-week-table td:first-child small { display: block; }
.external-meals-week-table td:first-child small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.external-meals-bottom-grid { display: grid; grid-template-columns: minmax(0,1.8fr) minmax(260px,.7fr); gap: 14px; }
.external-meals-deliveries-panel, .external-meals-control-panel { padding: 0; overflow: hidden; }
.external-meals-deliveries-panel > header, .external-meals-control-panel > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.external-meals-deliveries-panel > header h2, .external-meals-control-panel > header h2 { margin: 0; color: var(--navy); font-size: 16px; }
.external-meals-deliveries-panel > header p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.external-meals-deliveries-panel > header > span { display: grid; min-width: 30px; height: 30px; place-items: center; border-radius: 50%; background: #e9f2fa; color: var(--blue); font-weight: 900; }
.external-meals-delivery-list { display: grid; max-height: 330px; overflow: auto; }
.external-meals-delivery-list button { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border: 0; border-bottom: 1px solid #e2eaf1; background: #fff; color: inherit; text-align: left; cursor: pointer; }
.external-meals-delivery-list button:hover { background: #f2f7fb; }
.external-meals-delivery-list span strong, .external-meals-delivery-list span small { display: block; }
.external-meals-delivery-list span strong { color: var(--navy); font-size: 12px; }
.external-meals-delivery-list span small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.external-meals-delivery-list em { color: #1b648f; font-size: 11px; font-style: normal; font-weight: 900; white-space: nowrap; }
.external-meals-control-panel > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-bottom: 1px solid #e2eaf1; color: #526b82; font-size: 12px; }
.external-meals-control-panel > div strong { color: var(--navy); font-size: 17px; }
.external-meals-control-panel > button { width: calc(100% - 32px); margin: 14px 16px 16px; }

@media (max-width: 1050px) {
  .external-meals-toolbar { align-items: stretch; flex-wrap: wrap; }
  .external-meals-toolbar-actions { flex-basis: 100%; justify-content: flex-start; }
  .external-meals-bottom-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .external-meals-service-grid { grid-template-columns: 1fr; }
  .external-meals-toolbar > label { flex: 1; }
  .external-meals-week-panel > header { align-items: flex-start; flex-direction: column; }
  .external-meals-week-panel > header > div:last-child { text-align: left; }
  .external-meals-service-line { grid-template-columns: 34px minmax(0,1fr); }
  .external-meals-service-line em { grid-column: 2; justify-self: start; }
}

/* V44 — calendrier opérationnel mensuel */
.operational-calendar-page { display: grid; gap: 14px; }
.operational-calendar-heading { margin-bottom: 0; }
.operational-calendar-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 16px; }
.operational-calendar-toolbar > div { display: flex; align-items: end; gap: 8px; }
.operational-calendar-toolbar label { display: grid; gap: 4px; margin: 0; color: var(--muted); font-size: 10px; font-weight: 800; }
.operational-calendar-toolbar input { min-width: 165px; }
.operational-calendar-toolbar > strong { color: var(--navy); font-size: 19px; }
.operational-calendar-metrics { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 12px; }
.operational-calendar-metrics article { padding: 14px 16px; border: 1px solid var(--line); border-left: 5px solid #2f6fab; border-radius: 12px; background: #fff; box-shadow: var(--shadow); }
.operational-calendar-metrics article:nth-child(2) { border-left-color: #c97813; }
.operational-calendar-metrics article:nth-child(3) { border-left-color: #7351a2; }
.operational-calendar-metrics article:nth-child(4) { border-left-color: #2b9160; }
.operational-calendar-metrics article:nth-child(5) { border-left-color: #7a8da0; }
.operational-calendar-metrics article.has-warning { border-left-color: #c95a4b; background: #fffafa; }
.operational-calendar-metrics span, .operational-calendar-metrics strong, .operational-calendar-metrics small { display: block; }
.operational-calendar-metrics span { color: #536b80; font-size: 13px; font-weight: 800; }
.operational-calendar-metrics strong { margin: 3px 0; color: var(--navy); font-size: 24px; }
.operational-calendar-metrics small { color: var(--muted); font-size: 11px; }
.operational-calendar-panel { padding: 0; overflow: hidden; }
.operational-calendar-weekdays, .operational-calendar-grid { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); }
.operational-calendar-weekdays { border-bottom: 1px solid var(--line); background: #eef4f8; }
.operational-calendar-weekdays span { padding: 11px 7px; color: #304f6c; font-size: 12px; font-weight: 900; text-align: center; text-transform: uppercase; }
.operational-calendar-cell { position: relative; display: grid; align-content: start; gap: 8px; min-height: 205px; padding: 12px; border: 0; border-right: 1px solid #dce5ec; border-bottom: 1px solid #dce5ec; background: #fff; color: inherit; text-align: left; cursor: pointer; }
.operational-calendar-cell:nth-child(7n) { border-right: 0; }
.operational-calendar-cell:hover { background: #f4f8fb; }
.operational-calendar-cell.is-weekend { background: #f7f9fb; }
.operational-calendar-cell.is-empty { background: #f2f5f7; cursor: default; }
.operational-calendar-cell.is-selected { z-index: 1; background: #eef6fc; box-shadow: inset 0 0 0 2px #2376b5; }
.operational-calendar-cell.is-today .operational-calendar-day-number { background: var(--blue); color: #fff; }
.operational-calendar-day-number { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 50%; color: var(--navy); font-size: 16px; font-weight: 900; }
.operational-calendar-today-label { position: absolute; top: 19px; left: 52px; color: var(--blue); font-size: 9px; font-weight: 900; letter-spacing: .04em; }
.operational-calendar-holiday { color: #9a4225; font-size: 11px; font-weight: 900; line-height: 1.25; }
.operational-calendar-values { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; }
.operational-calendar-values span { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 5px; padding: 7px 8px; border-left: 3px solid #2f6fab; border-radius: 6px; background: #edf5fb; color: #264f70; }
.operational-calendar-values span.is-resd { border-left-color: #7351a2; background: #f3eff9; color: #59417a; }
.operational-calendar-values span.is-external { border-left-color: #2f6fab; background: #edf5fb; color: #264f70; }
.operational-calendar-values span.is-angelito { border-left-color: #c97813; background: #fff5e7; color: #80500f; }
.operational-calendar-values span.is-coffee { border-left-color: #2b9160; background: #edf8f2; color: #256c4a; }
.operational-calendar-values span.is-coffee { grid-column: 1 / -1; }
.operational-calendar-values em { overflow: visible; font-size: 10px; font-style: normal; font-weight: 900; line-height: 1.15; white-space: normal; }
.operational-calendar-values strong { color: inherit; font-size: 13px; }
.operational-calendar-cell-status { display: flex; flex-wrap: wrap; gap: 5px; margin-top: auto; }
.operational-calendar-exception, .operational-calendar-adaptation, .operational-calendar-warning { width: fit-content; padding: 4px 6px; border-radius: 5px; font-size: 8px; font-weight: 900; line-height: 1; }
.operational-calendar-exception { background: #fff0cc; color: #875611; }
.operational-calendar-adaptation { background: #e8f3fb; color: #28678f; }
.operational-calendar-warning { background: #c95a4b; color: #fff; }
.operational-calendar-panel > footer { display: flex; flex-wrap: wrap; gap: 16px; padding: 10px 14px; background: #f7fafc; color: #60758a; font-size: 10px; }
.operational-calendar-panel > footer span { display: flex; align-items: center; gap: 5px; }
.operational-calendar-panel > footer i { width: 8px; height: 8px; border-radius: 50%; background: #2f6fab; }
.operational-calendar-panel > footer .legend-resd { background: #7351a2; }
.operational-calendar-panel > footer .legend-external { background: #2f6fab; }
.operational-calendar-panel > footer .legend-angelito { background: #c97813; }
.operational-calendar-panel > footer .legend-coffee { background: #2b9160; }
.operational-calendar-modal { width: min(1180px, 100%); max-height: min(880px, calc(100vh - 48px)); }
.operational-calendar-modal-body { padding: 0; }
.operational-calendar-selected { padding: 0; overflow: hidden; }
.operational-calendar-selected > header { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 18px; border-bottom: 1px solid var(--line); background: #f8fafc; }
.operational-calendar-selected > header h2, .operational-calendar-selected > header p { margin: 0; }
.operational-calendar-selected > header h2 { margin: 3px 0; color: var(--navy); font-size: 19px; }
.operational-calendar-selected > header p:last-child { color: var(--muted); font-size: 11px; }
.operational-calendar-selected > header > strong { padding: 7px 10px; border-radius: 8px; background: #e6f1f8; color: var(--blue); font-size: 11px; white-space: nowrap; }
.operational-calendar-detail-grid { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); border-bottom: 1px solid var(--line); }
.operational-calendar-detail-grid article { display: flex; min-height: 190px; flex-direction: column; gap: 6px; padding: 15px; border-right: 1px solid var(--line); }
.operational-calendar-detail-grid article:last-child { border-right: 0; }
.operational-calendar-detail-grid span { color: #62788c; font-size: 12px; font-weight: 900; text-transform: uppercase; }
.operational-calendar-detail-grid strong { color: var(--navy); font-size: 16px; }
.operational-calendar-detail-grid small { color: #4e6479; font-size: 12px; line-height: 1.45; }
.operational-calendar-detail-grid small b { color: var(--navy); }
.operational-calendar-detail-grid button { width: fit-content; margin-top: auto; padding: 8px 10px; border: 1px solid #9ebbd3; border-radius: 7px; background: #f5f9fc; color: #1c5d8d; font-size: 10px; font-weight: 900; cursor: pointer; }
.operational-calendar-alerts { padding: 14px 18px 18px; }
.operational-calendar-alerts h3 { margin: 0 0 9px; color: var(--navy); font-size: 14px; }
.operational-calendar-alerts > button { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 12px; margin-top: 6px; padding: 9px 11px; border: 1px solid #e4c37f; border-radius: 8px; background: #fff8e8; color: #795114; text-align: left; cursor: pointer; }
.operational-calendar-alerts > button.is-danger { border-color: #e5aaa3; background: #fff1ef; color: #9a3025; }
.operational-calendar-alerts > button.is-info { border-color: #a9c9df; background: #eef7fc; color: #285f86; }
.operational-calendar-alerts > button span { font-size: 12px; font-weight: 800; }
.operational-calendar-alerts > button em { font-size: 10px; font-style: normal; font-weight: 900; }
.operational-calendar-ready { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid #a9d8bd; border-radius: 8px; background: #eef9f2; color: #216f46; }
.operational-calendar-ready strong, .operational-calendar-ready span { font-size: 10px; }
.operational-calendar-ready span { color: #47705a; }

@media (max-width: 1180px) {
  .operational-calendar-detail-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .operational-calendar-detail-grid article:nth-child(even) { border-right: 0; }
  .operational-calendar-detail-grid article:nth-child(-n+4) { border-bottom: 1px solid var(--line); }
}
@media (max-width: 860px) {
  .operational-calendar-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .operational-calendar-panel { overflow-x: auto; }
  .operational-calendar-weekdays, .operational-calendar-grid { min-width: 1050px; }
  .operational-calendar-toolbar { align-items: flex-start; flex-direction: column-reverse; }
}
@media (max-width: 620px) {
  .operational-calendar-metrics, .operational-calendar-detail-grid { grid-template-columns: 1fr; }
  .operational-calendar-detail-grid article { min-height: 150px; border-right: 0; border-bottom: 1px solid var(--line); }
  .operational-calendar-toolbar > div { flex-wrap: wrap; }
  .operational-calendar-selected > header { align-items: flex-start; flex-direction: column; }
}
/* Maintenance et diagnostic V48 — lecture seule, états techniques lisibles. */
.system-diagnostics-heading { align-items: flex-start; gap: 20px; }
.system-diagnostics-heading-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; flex-wrap: wrap; }
.system-diagnostics-overall { display: inline-flex; align-items: center; min-height: 42px; padding: 0 16px; border-radius: 999px; border: 1px solid #acd7bc; background: #e8f6ed; color: #126637; font-size: 12px; font-weight: 900; letter-spacing: .035em; }
.system-diagnostics-overall.is-warning { border-color: #efd493; background: #fff6dc; color: #8a5900; }
.system-diagnostics-overall.is-critical { border-color: #efb2aa; background: #fff0ee; color: #a22a1e; }
.system-diagnostics-loading, .system-diagnostics-error { min-height: 180px; display: grid; place-content: center; justify-items: center; gap: 12px; text-align: center; }
.system-diagnostics-error strong { color: #9c251d; font-size: 20px; }
.system-diagnostics-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.system-diagnostics-summary article { min-height: 114px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 15px; background: #fff; box-shadow: 0 8px 24px rgba(31,70,112,.055); display: grid; grid-template-columns: 1fr auto; align-content: center; gap: 6px 12px; }
.system-diagnostics-summary small { grid-column: 1 / -1; color: #61758c; font-weight: 700; }
.system-diagnostics-summary strong { color: #102f57; font-size: 28px; line-height: 1; }
.system-diagnostics-summary strong.is-date { font-size: 15px; line-height: 1.25; }
.system-diagnostics-summary span { align-self: center; justify-self: end; font-size: 10px; font-weight: 900; color: #647991; }
.system-diagnostics-summary .is-ok { color: #19703f; }
.system-diagnostics-summary .is-warning { color: #976000; }
.system-diagnostics-summary .is-critical { color: #af2f23; }
.system-diagnostics-key-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(245px, 1fr)); gap: 12px; margin-bottom: 14px; }
.system-diagnostics-key-grid > article { min-height: 238px; padding: 17px; }
.system-diagnostics-key-grid > article.is-diagnostic-warning, .system-diagnostics-key-grid > article.is-disk-warning { border-color: #e1c071; background: #fffaf0; }
.system-diagnostics-key-grid > article.is-diagnostic-critical, .system-diagnostics-key-grid > article.is-disk-critical { border-color: #e2aaa4; background: #fff6f5; }
.system-diagnostics-card-title { display: flex; align-items: center; gap: 10px; padding-bottom: 13px; border-bottom: 1px solid var(--line); color: #13365e; }
.system-diagnostics-card-title > span { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: #e8f2fb; color: #1e6ca8; font-size: 18px; font-weight: 900; }
.system-diagnostics-card-title strong { font-size: 16px; }
.system-diagnostics-key-grid dl { margin: 8px 0 0; }
.system-diagnostics-key-grid dl > div { display: grid; grid-template-columns: minmax(82px, .8fr) minmax(0, 1.3fr); gap: 10px; padding: 9px 0; border-bottom: 1px dotted #cad7e4; }
.system-diagnostics-key-grid dt { color: #64788f; font-size: 13px; }
.system-diagnostics-key-grid dd { margin: 0; color: #0f2f56; font-size: 13px; font-weight: 800; text-align: right; overflow-wrap: anywhere; }
.system-diagnostics-disk-number { margin-top: 24px; color: #123964; font-size: 29px; font-weight: 900; }
.system-diagnostics-key-grid article > small { color: #687b90; }
.system-diagnostics-progress { height: 12px; margin-top: 22px; overflow: hidden; border-radius: 999px; background: #e8eef4; }
.system-diagnostics-progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #2f8d5a, #d09a2c, #c94f43); }
.system-diagnostics-key-grid article > p { margin: 8px 0 0; color: #50677f; font-size: 13px; }
.system-diagnostics-checks, .system-diagnostics-services, .system-diagnostics-photos, .system-diagnostics-paths { margin-bottom: 14px; padding: 0; overflow: hidden; }
.system-diagnostics-checks > header, .system-diagnostics-services > header, .system-diagnostics-photos > header, .system-diagnostics-paths > header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 17px 19px; border-bottom: 1px solid var(--line); background: #f8fbfe; }
.system-diagnostics-checks h2, .system-diagnostics-services h2, .system-diagnostics-photos h2, .system-diagnostics-paths h2 { margin: 0; color: #12365f; font-size: 18px; }
.system-diagnostics-checks header p, .system-diagnostics-services header p, .system-diagnostics-photos header p, .system-diagnostics-paths header p { margin: 4px 0 0; color: #61768d; font-size: 13px; }
.system-diagnostics-checks > header > span, .system-diagnostics-readonly { flex: 0 0 auto; padding: 7px 10px; border-radius: 999px; background: #e6f3ea; color: #17643a; font-size: 10px; font-weight: 900; }
.system-diagnostics-checks > div { display: grid; }
.system-diagnostics-check { min-height: 70px; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid #e3eaf1; }
.system-diagnostics-check:last-child { border-bottom: 0; }
.system-diagnostics-check-icon { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: #e4f4ea; color: #197144; font-weight: 900; }
.system-diagnostics-check.is-warning .system-diagnostics-check-icon { background: #fff2cb; color: #926000; }
.system-diagnostics-check.is-critical .system-diagnostics-check-icon { background: #ffe5e1; color: #ad3024; }
.system-diagnostics-check strong { color: #153657; font-size: 14px; }
.system-diagnostics-check p { margin: 3px 0 0; color: #4d657d; font-size: 13px; }
.system-diagnostics-check small { display: block; margin-top: 4px; color: #8a5b00; font-size: 12px; font-weight: 700; }
.system-diagnostics-check-state { padding: 6px 9px; border-radius: 999px; background: #e9f4ed; color: #17653c; font-size: 9px; font-weight: 900; }
.system-diagnostics-check.is-warning .system-diagnostics-check-state { background: #fff2ce; color: #8a5900; }
.system-diagnostics-check.is-critical .system-diagnostics-check-state { background: #ffe7e4; color: #a42c22; }
.system-diagnostics-service-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; padding: 16px; }
.system-diagnostics-service { min-height: 122px; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 9px; padding: 13px; border: 1px solid #c9e0d1; border-radius: 12px; background: #f6fcf8; }
.system-diagnostics-service > span { width: 25px; height: 25px; border-radius: 50%; display: grid; place-items: center; background: #dcefe3; color: #17663d; font-weight: 900; }
.system-diagnostics-service.is-warning { border-color: #ead18c; background: #fffbec; }
.system-diagnostics-service.is-warning > span { background: #fff0c4; color: #8f5c00; }
.system-diagnostics-service.is-critical { border-color: #e8aaa3; background: #fff5f3; }
.system-diagnostics-service.is-critical > span { background: #ffe0dc; color: #aa2d22; }
.system-diagnostics-service strong { display: block; color: #153659; font-size: 13px; }
.system-diagnostics-service small { display: block; margin-top: 3px; color: #718399; font-size: 11px; overflow-wrap: anywhere; }
.system-diagnostics-service p { margin: 8px 0 0; color: #526a80; font-size: 12px; }
.system-diagnostics-photo-metrics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; padding: 16px; }
.system-diagnostics-photo-metrics span { min-height: 60px; display: flex; align-items: center; justify-content: center; gap: 7px; padding: 10px; border-radius: 11px; background: #f1f6fa; color: #526b82; font-size: 13px; }
.system-diagnostics-photo-metrics strong { color: #12375f; font-size: 22px; }
.system-diagnostics-details { margin: 0 16px 10px; border: 1px solid #d9e3ec; border-radius: 10px; background: #fbfdff; }
.system-diagnostics-details summary { cursor: pointer; padding: 11px 13px; color: #173b62; font-size: 13px; font-weight: 800; }
.system-diagnostics-details ul { max-height: 210px; margin: 0; padding: 0 34px 13px; overflow: auto; color: #526a80; font: 12px/1.55 ui-monospace, SFMono-Regular, Consolas, monospace; }
.system-diagnostics-truncated { margin: 8px 16px 16px; color: #885900; font-size: 11px; }
.system-diagnostics-table-scroll { overflow: auto; }
.system-diagnostics-paths table { width: 100%; border-collapse: collapse; font-size: 12px; }
.system-diagnostics-paths th { padding: 10px 13px; background: #edf4fa; color: #173a60; text-align: left; white-space: nowrap; }
.system-diagnostics-paths td { padding: 11px 13px; border-top: 1px solid #dbe5ee; color: #344f6b; vertical-align: top; }
.system-diagnostics-paths td strong { display: block; color: #15375c; }
.system-diagnostics-paths td small { display: block; margin-top: 3px; color: #6e8195; overflow-wrap: anywhere; }
/* Quarantaine photo V49 — déplacement explicite et toujours réversible. */
.system-diagnostics-photo-section { margin: 0 16px 16px; padding: 16px; border: 1px solid #d6e2ec; border-radius: 12px; background: #fbfdff; }
.system-diagnostics-photo-section h3 { margin: 0; color: #15385f; font-size: 16px; }
.system-diagnostics-photo-section > p { margin: 5px 0 13px; color: #5a7187; font-size: 13px; }
.system-diagnostics-photo-actions { display: grid; gap: 8px; }
.system-diagnostics-photo-actions article { min-height: 65px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 12px; border: 1px solid #dce6ee; border-radius: 10px; background: #fff; }
.system-diagnostics-photo-actions article > div:first-child { min-width: 0; }
.system-diagnostics-photo-actions strong { display: block; color: #12375d; font-size: 13px; overflow-wrap: anywhere; }
.system-diagnostics-photo-actions small { display: block; margin-top: 4px; color: #657b90; font-size: 12px; }
.system-diagnostics-photo-actions article > div:last-child { flex: 0 0 auto; display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.system-diagnostics-photo-actions button { min-height: 36px; padding: 0 11px; font-size: 10px; }
.system-diagnostics-empty { margin: 0; padding: 17px; border-radius: 9px; background: #f1f6fa; color: #5b7289; font-size: 13px; text-align: center; }
.system-diagnostics-preview-backdrop { position: fixed; z-index: 1200; inset: 0; display: grid; place-items: center; padding: 24px; background: rgba(10,27,48,.72); }
.system-diagnostics-preview { width: min(760px, 95vw); max-height: 92vh; overflow: hidden; border-radius: 17px; background: #fff; box-shadow: 0 24px 80px rgba(0,0,0,.32); }
.system-diagnostics-preview > header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 18px; border-bottom: 1px solid #d7e2ec; }
.system-diagnostics-preview > header small { display: block; color: #63809c; font-size: 10px; font-weight: 900; }
.system-diagnostics-preview > header strong { display: block; margin-top: 3px; color: #12375e; font-size: 14px; overflow-wrap: anywhere; }
.system-diagnostics-preview > header button { width: 38px; height: 38px; border: 1px solid #c9d9e7; border-radius: 50%; background: #f3f7fa; color: #173d65; font-size: 25px; cursor: pointer; }
.system-diagnostics-preview > div { min-height: 330px; max-height: calc(92vh - 74px); display: grid; place-items: center; align-content: center; gap: 12px; padding: 20px; overflow: auto; color: #526b82; text-align: center; }
.system-diagnostics-preview img { display: block; max-width: 100%; max-height: calc(92vh - 145px); border-radius: 10px; object-fit: contain; }
.system-diagnostics-preview p { margin: 0; font-size: 13px; }
@media (max-width: 1280px) {
  .system-diagnostics-summary, .system-diagnostics-key-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .system-diagnostics-service-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .system-diagnostics-photo-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .system-diagnostics-heading, .system-diagnostics-heading-actions { display: grid; justify-content: stretch; }
  .system-diagnostics-summary, .system-diagnostics-key-grid, .system-diagnostics-photo-metrics, .system-diagnostics-service-grid { grid-template-columns: 1fr; }
  .system-diagnostics-check { grid-template-columns: 32px minmax(0, 1fr); }
  .system-diagnostics-check-state { grid-column: 2; justify-self: start; }
  .system-diagnostics-photo-actions article { align-items: stretch; flex-direction: column; }
  .system-diagnostics-photo-actions article > div:last-child { justify-content: stretch; }
  .system-diagnostics-photo-actions button { flex: 1; }
}

/* Centre de sauvegardes V62 : styles limités au module de sauvegardes. */
.backup-center { color:var(--navy); padding:4px 0; }
.backup-center h2,.backup-center h3,.backup-center h4,.backup-center p { margin:0; }
.backup-center h2 { font-size:24px; letter-spacing:-.4px; }
.backup-center h3 { font-size:17px; line-height:1.35; }
.backup-center h4 { font-size:15px; line-height:1.4; }
.backup-center p { font-size:13px; line-height:1.65; color:var(--muted); }
.backup-center button { font-size:12px; line-height:1.4; min-height:38px; }
.backup-center button:disabled { opacity:.55; }
.backup-center button:focus-visible,.backup-center summary:focus-visible,.backup-table-scroll:focus-visible { outline:3px solid #82b6e3; outline-offset:3px; }
.backup-center-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; margin:0 0 18px; }
.backup-center-heading p { margin-top:4px; }
.backup-tabs { display:flex; gap:6px; padding:5px; background:#eff4fa; width:fit-content; max-width:100%; border-radius:11px; margin-bottom:22px; }
.backup-tabs button { border:0; background:transparent; color:#59718f; font-weight:650; padding:10px 18px; border-radius:8px; }
.backup-tabs button.is-active { background:white; color:var(--navy); box-shadow:0 2px 7px #17365d14; }
.backup-summary { display:flex; align-items:center; gap:14px; padding:18px 20px; background:#f3f7fc; border:1px solid #d7e4f1; border-radius:13px; margin-bottom:25px; }
.backup-summary.is-success { background:#edf8f2; border-color:#cee7db; }
.backup-summary strong { font-size:15px; }
.backup-summary-icon { display:grid; place-items:center; flex:0 0 38px; height:38px; background:white; border-radius:50%; color:var(--blue); font-size:23px; }
.backup-summary.is-success .backup-summary-icon { color:#218268; }
.backup-summary-count { font-size:12px; font-weight:700; margin-left:auto; white-space:nowrap; }
.backup-section-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:24px 0 14px; }
.backup-section-heading p { margin-top:3px; }
.backup-automatic-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; }
#settings-offsite-backup-host { display:contents; }
#settings-server-backup-host { display:flex; min-width:0; }
.backup-card { display:flex; flex-direction:column; min-width:0; width:100%; padding:22px; border:1px solid #d8e4f0; border-radius:15px; background:linear-gradient(155deg,#fafdff,white 48%); box-shadow:0 3px 12px #17365d05; }
.backup-card header { display:flex; align-items:center; gap:10px; margin-bottom:18px; }
.backup-icon { width:38px; height:38px; flex:0 0 38px; display:grid; place-items:center; border-radius:11px; color:#36719e; background:#eaf2fa; font-size:23px; }
.backup-icon.is-cloud { color:#227d8e; background:#e9f6f7; }
.backup-icon.is-complete { color:#6a60a3; background:#f0eef9; }
.backup-kicker { font-size:10px; font-weight:700; letter-spacing:.65px; color:#72829a; line-height:1.5; }
.backup-card > p { margin:8px 0 12px; min-height:43px; }
.backup-badge { display:inline-flex; align-items:center; align-self:flex-start; width:fit-content; gap:6px; font-size:10px; line-height:1.5; font-weight:750; border-radius:6px; padding:5px 8px; background:#edf2f7; color:#617188; }
.backup-badge::before { content:''; width:5px; height:5px; border-radius:50%; background:currentColor; flex-shrink:0; }
.backup-badge.is-success { background:#e9f5ee; color:#287757; }
.backup-badge.is-warning { background:#fff3dc; color:#925900; }
.backup-badge.is-error { background:#fdebec; color:#ac3741; }
.backup-metrics { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px 12px; margin:22px 0; }
.backup-metrics > div,.backup-detail-metrics > div { min-width:0; }
.backup-center dt { color:var(--muted); font-size:10px; margin:0 0 5px; }
.backup-center dd { margin:0; font-size:12px; font-weight:700; line-height:1.5; overflow-wrap:anywhere; }
.backup-center details { border-top:1px solid #e7edf5; padding-top:12px; margin-top:10px; }
.backup-center summary { cursor:pointer; font-size:12px; font-weight:650; color:#456589; line-height:1.5; }
.backup-center details p { margin:12px 0 0; font-size:12px; }
.backup-card details { margin-top:auto; }
.backup-card footer { margin-top:16px; }
.backup-card footer button { width:100%; }
.backup-detail-metrics { display:grid; gap:12px; margin:16px 0 0; }
.backup-retention { display:flex; flex-wrap:wrap; gap:8px; margin:14px 0; }
.backup-retention span { display:flex; gap:12px; align-items:center; justify-content:space-between; background:#f1f5fa; border-radius:7px; color:#55708c; padding:8px 10px; font-size:11px; }
.backup-retention strong { color:var(--navy); white-space:nowrap; }
.backup-card .backup-retention { display:grid; }
.backup-center .backup-notice { padding:12px 14px; border:1px solid #f0dcb0; background:#fff9eb; color:#825919; border-radius:9px; font-size:12px; margin:12px 0; overflow-wrap:anywhere; }
.backup-notice.is-error { background:#fff1f2; border-color:#eabfc4; color:#a53d45; }
.backup-center .backup-schedule { font-size:11px; padding:14px 3px; color:#637c97; }
.backup-schedule span { margin-left:8px; color:#8795a7; }
.backup-manual-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
#settings-external-export-host { display:flex; min-width:0; }
.backup-manual-card { display:grid; grid-template-columns:42px minmax(0,1fr); gap:12px; border:1px solid #dce6f0; border-radius:13px; padding:20px; width:100%; }
.backup-manual-card > div { min-width:0; }
.backup-manual-card h3 { font-size:15px; margin-bottom:7px; }
.backup-manual-card > button { grid-column:2; justify-self:start; align-self:end; margin-top:8px; }
.backup-file-icon { font-size:10px; font-weight:800; border:1px solid #cfe1ee; color:#35769a; background:#f0f7fb; display:grid; place-items:center; border-radius:9px; width:40px; height:45px; }
.backup-file-icon.is-json { color:#776591; border-color:#e1d8ee; background:#f6f3fa; }
.backup-center .backup-muted { font-size:11px; line-height:1.7; margin-top:10px; }
.backup-center .backup-hash { overflow-wrap:anywhere; font-size:11px; margin:9px 0; }
.backup-recovery-link { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-top:23px; border:1px dashed #c5d4e6; padding:18px 20px; border-radius:11px; }
.backup-recovery-link strong { font-size:13px; }
.backup-toolbar { display:flex; gap:10px; flex-wrap:wrap; align-items:center; margin:18px 0; }
.backup-table-scroll { overflow-x:auto; border:1px solid #dce6ef; border-radius:11px; }
.backup-table { width:100%; min-width:620px; border-collapse:collapse; font-size:12px; text-align:left; }
.backup-table th { background:#f4f7fb; color:#61738a; font-size:11px; padding:13px 14px; font-weight:650; }
.backup-table td { padding:13px 14px; border-top:1px solid #e6edf5; }
.backup-table tr.is-selected { background:#edf5fe; }
.backup-row-button { border:1px solid #d4e2f0; padding:5px 11px; border-radius:7px; color:var(--blue); background:#fff; }
.backup-archive-detail { background:#f8fbff; border:1px solid #cddff1; border-radius:11px; padding:20px; margin:16px 0; }
.backup-archive-detail .backup-metrics { grid-template-columns:repeat(3,minmax(0,1fr)); max-width:650px; }
.backup-delete-button { margin-left:auto; color:#a84949; background:#fff; border:1px solid #e6c4c4; border-radius:7px; padding:8px 14px; }
.backup-recovery-steps { display:flex; gap:24px; margin:20px 0; font-size:12px; color:#607c99; }
.backup-recovery-steps b { display:inline-grid; place-items:center; background:#eaf1fa; color:#3b699e; border-radius:50%; width:26px; height:26px; margin-right:6px; }
.backup-recovery-options { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.backup-recovery-options article { border:1px solid #d8e4f0; border-radius:12px; padding:20px; }
.backup-recovery-options p { margin:8px 0 16px; }
.backup-reinstall { display:flex; align-items:flex-start; gap:14px; padding:20px; border:1px solid #dedaf0; background:#faf9fe; border-radius:12px; margin-top:26px; }
.backup-reinstall p { margin-top:6px; }
.backup-center .backup-advanced { margin-top:24px; padding:18px 0 0; }
.backup-advanced button { margin-top:14px; }
.backup-center .settings-full-restore-summary { overflow-wrap:anywhere; margin-top:20px; }
@media(max-width:1250px) { .backup-card { padding:17px; } .backup-automatic-grid { gap:11px; } .backup-kicker { font-size:9px; } }
@media(max-width:950px) { .backup-automatic-grid { grid-template-columns:1fr; } .backup-card { padding:20px; } .backup-card > p { min-height:0; } .backup-metrics { grid-template-columns:repeat(4,minmax(0,1fr)); } .backup-manual-grid { grid-template-columns:1fr; } .backup-card .backup-retention { display:flex; } .backup-card footer button { width:auto; } }
@media(max-width:600px) { .backup-center-heading,.backup-section-heading,.backup-recovery-link { align-items:flex-start; flex-direction:column; } .backup-center-heading > button { align-self:flex-start; } .backup-tabs { width:100%; gap:2px; } .backup-tabs button { flex:1; padding:9px 6px; font-size:11px; } .backup-summary { flex-wrap:wrap; padding:15px; gap:10px; } .backup-summary > div { flex:1; min-width:150px; } .backup-summary-count { margin-left:48px; } .backup-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); } .backup-manual-card { padding:16px; grid-template-columns:35px minmax(0,1fr); } .backup-file-icon { width:33px; height:39px; font-size:9px; } .backup-recovery-options { grid-template-columns:1fr; } .backup-recovery-steps { gap:10px; flex-wrap:wrap; font-size:11px; } .backup-archive-detail .backup-metrics { grid-template-columns:1fr; } .backup-reinstall { padding:15px; } .backup-card footer button { width:100%; } .backup-center .settings-full-restore-facts { grid-template-columns:1fr; } .backup-center .settings-full-restore-summary { padding:14px; } .backup-center .settings-full-restore-summary-heading { flex-direction:column; gap:12px; } }

/* V67 — indications alimentaires des bénéficiaires extérieurs */
.external-dietary-editor{padding:18px;border:1px solid #c8d9ea;border-radius:12px;background:#f5f9fc}
.external-dietary-editor legend{padding:0 6px;color:#173f6c;font-weight:800}
.external-dietary-editor .external-dietary-check{display:flex;align-items:center;gap:9px;min-height:42px}
.external-dietary-check input[type=checkbox]{width:18px;height:18px;margin:0;flex:0 0 auto}
.external-dietary-section .external-detail-grid{padding:0 16px 16px}
.external-dietary-section .external-info-card strong{white-space:pre-wrap;overflow-wrap:anywhere}
.delivery-dietary{margin-top:8px;padding:7px 9px;border-left:3px solid #c38735;background:#fff8ec;font-size:12px;line-height:1.4;white-space:pre-wrap;overflow-wrap:anywhere;color:#173f6c}

/* Cafétéria : espace Résidents / Matériel, V71. Styles limités au module. */
.cafeteria-workspace .cafeteria-heading { gap:20px; }
.cafeteria-workspace .cafeteria-service-date { width:190px; margin:0; flex-shrink:0; font-size:12px; }
.cafeteria-workspace .cafeteria-service-date input { margin-top:5px; }
.cafeteria-workspace .cafeteria-kpis { display:flex; flex-wrap:wrap; gap:15px 35px; border:1px solid var(--line); border-radius:13px; background:var(--surface); padding:14px 18px; }
.cafeteria-workspace .cafeteria-kpis article { display:flex; align-items:center; gap:8px; min-height:0; padding:0; border:0; background:transparent; text-align:left; }
.cafeteria-workspace .cafeteria-kpis strong { font-size:24px; }
.cafeteria-workspace .cafeteria-kpis span { margin:0; font-size:12px; }
.cafeteria-workspace .cafeteria-tabs { display:flex; gap:25px; border-bottom:1px solid var(--line); }
.cafeteria-workspace .cafeteria-tab { border:0; border-bottom:3px solid transparent; background:transparent; padding:13px 2px; font-size:12px; font-weight:800; color:var(--muted); }
.cafeteria-workspace .cafeteria-tab[aria-selected="true"] { color:var(--blue-strong); border-bottom-color:var(--blue-strong); }
.cafeteria-workspace .cafeteria-tab-panel { display:grid; gap:14px; min-width:0; }
.cafeteria-workspace .cafeteria-section-heading { display:flex; justify-content:space-between; align-items:center; gap:14px; }
.cafeteria-workspace .cafeteria-section-heading h2 { margin:0; font-size:17px; color:var(--navy); }
.cafeteria-workspace .cafeteria-residents-panel { padding:0; overflow:hidden; }
.cafeteria-workspace .cafeteria-residents-table { width:100%; border-collapse:collapse; table-layout:fixed; font-size:12px; }
.cafeteria-workspace .cafeteria-residents-table th { padding:12px 10px; background:#edf4fa; color:var(--navy); font-size:11px; text-align:left; }
.cafeteria-workspace .cafeteria-residents-table td { padding:11px 10px; border-top:1px solid var(--line); vertical-align:middle; overflow-wrap:anywhere; }
.cafeteria-workspace .cafeteria-residents-table th:nth-child(1) { width:6%; }
.cafeteria-workspace .cafeteria-residents-table th:nth-child(2) { width:21%; }
.cafeteria-workspace .cafeteria-residents-table th:nth-child(3),.cafeteria-workspace .cafeteria-residents-table th:nth-child(4) { width:9%; text-align:center; }
.cafeteria-workspace .cafeteria-residents-table th:nth-child(5) { width:22%; }
.cafeteria-workspace .cafeteria-residents-table th:nth-child(6) { width:22%; }
.cafeteria-workspace .cafeteria-residents-table th:nth-child(7) { width:11%; }
.cafeteria-workspace .cafeteria-person { color:var(--navy); }
.cafeteria-workspace .cafeteria-service { text-align:center; }
.cafeteria-workspace .cafeteria-drinks span { display:block; }
.cafeteria-workspace .cafeteria-resident-note { display:block; margin-top:5px; color:var(--muted); }
.cafeteria-workspace .cafeteria-edit-resident { font-size:11px; padding:7px 8px; }
.cafeteria-workspace .cafeteria-meal-code { display:inline-block; min-width:25px; padding:3px 5px; border-radius:5px; background:var(--green-soft); color:var(--green); font-size:11px; font-weight:850; }
.cafeteria-workspace .cafeteria-meal-m { background:var(--orange-soft); color:#805200; }
.cafeteria-workspace .cafeteria-meal-h,.cafeteria-workspace .cafeteria-meal-vh { background:#e9f2fa; color:var(--blue-strong); }
.cafeteria-workspace .cafeteria-meal-sg { background:#fff5cc; color:#715700; }
.cafeteria-workspace .cafeteria-meal-cc { background:#f0e9fa; color:var(--purple); }
.cafeteria-workspace .cafeteria-meal-unknown,.cafeteria-workspace .cafeteria-meal-other { color:var(--muted); }
.cafeteria-workspace .cafeteria-meal-other { font-size:11px; }
.cafeteria-workspace .cafeteria-legend { margin:0; color:var(--muted); font-size:11px; }
.cafeteria-workspace .cafeteria-residents-empty { text-align:center; padding:30px!important; color:var(--muted); }
.cafeteria-workspace .cafeteria-config-card ul.cafeteria-quantity-list { columns:1; min-height:0; list-style:none; padding:8px 16px; }
.cafeteria-workspace .cafeteria-quantity-list li { display:flex; justify-content:space-between; align-items:baseline; gap:14px; padding:8px 0; margin:0; font-size:12px; }
.cafeteria-workspace .cafeteria-quantity-list li+li { border-top:1px solid var(--line); }
.cafeteria-workspace .cafeteria-quantity-list strong { color:var(--navy); }
@media(max-width:1150px) {
  .cafeteria-workspace .cafeteria-section-heading { align-items:flex-start; flex-direction:column; }
  .cafeteria-workspace .cafeteria-residents-table th,.cafeteria-workspace .cafeteria-residents-table td { padding:10px 7px; }
  .cafeteria-workspace .cafeteria-edit-resident { padding:7px 4px; font-size:10px; }
}
@media(max-width:760px) {
  .cafeteria-workspace .cafeteria-heading { align-items:stretch; flex-direction:column; }
  .cafeteria-workspace .cafeteria-service-date { width:100%; }
  .cafeteria-workspace .cafeteria-tabs { gap:15px; }
  .cafeteria-workspace .cafeteria-module-actions { width:100%; }
  .cafeteria-workspace .cafeteria-residents-table,.cafeteria-workspace .cafeteria-residents-table tbody { display:block; }
  .cafeteria-workspace .cafeteria-residents-table thead { display:none; }
  .cafeteria-workspace .cafeteria-residents-table tr { display:grid; grid-template-columns:55px minmax(0,1fr); gap:7px 10px; padding:14px; border-top:1px solid var(--line); }
  .cafeteria-workspace .cafeteria-residents-table tr:first-child { border-top:0; }
  .cafeteria-workspace .cafeteria-residents-table td { padding:0; border:0; }
  .cafeteria-workspace .cafeteria-residents-table td:not(.cafeteria-room):not(.cafeteria-person) { grid-column:1/-1; text-align:left; }
  .cafeteria-workspace .cafeteria-residents-table td[data-label]::before { content:attr(data-label) " : "; color:var(--muted); font-size:11px; }
  .cafeteria-workspace .cafeteria-drinks span { display:inline; }
  .cafeteria-workspace .cafeteria-drinks span+span::before { content:' · '; }
  .cafeteria-workspace .cafeteria-edit-resident { padding:10px 12px; min-height:42px; font-size:11px; }
}

/* V72: kitchen navigation and meal workspace, scoped away from print documents. */
.sidebar .kitchen-nav-group { margin-top:10px; }
.sidebar .kitchen-nav-group summary.nav-section { cursor:pointer; padding:10px 3px; margin:0; font-size:10px; letter-spacing:.035em; }
.sidebar .kitchen-nav-group:has(.nav-button.is-active) summary { color:var(--blue-strong); font-weight:800; }
.distribution-workspace { min-width:0; }
.distribution-workspace .distribution-heading { align-items:center; gap:18px; }
.distribution-workspace .distribution-date { display:grid; gap:6px; min-width:175px; font-size:12px; font-weight:700; color:var(--navy); }
.distribution-workspace .distribution-date input { width:100%; }
.distribution-workspace .distribution-tabs { display:flex; gap:22px; border-bottom:1px solid var(--line); margin:4px 0 20px; }
.distribution-workspace .distribution-tabs button { padding:12px 4px; border:0; border-bottom:3px solid transparent; background:transparent; color:var(--muted); font-size:14px; font-weight:800; }
.distribution-workspace .distribution-tabs button[aria-selected="true"] { color:var(--blue-strong); border-bottom-color:var(--blue-strong); }
.distribution-workspace .distribution-toolbar { display:flex; justify-content:space-between; align-items:center; gap:14px; margin-bottom:16px; }
.distribution-workspace h2 { margin:0 0 3px; color:var(--navy); font-size:17px; }
.distribution-workspace .distribution-muted { color:var(--muted); font-size:12px; }
.distribution-workspace .distribution-actions,.distribution-workspace .distribution-documents { display:flex; flex-wrap:wrap; gap:10px; align-items:center; }
.distribution-workspace .distribution-documents { margin:16px 0 10px; }
.distribution-workspace .distribution-documents>span { font-size:12px; color:var(--muted); }
.distribution-workspace .distribution-documents button { font-size:11px; padding:9px 12px; }
.distribution-workspace .distribution-kpis { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.distribution-workspace .distribution-kpis article { display:grid; gap:3px; padding:14px; border:1px solid var(--line); border-radius:13px; background:white; text-align:center; }
.distribution-workspace .distribution-kpis strong { font-size:26px; color:var(--navy); }
.distribution-workspace .distribution-kpis span { font-size:12px; color:var(--muted); }
.distribution-workspace .distribution-legend { color:var(--muted); font-size:11px; margin:12px 0 18px; }
.distribution-workspace .distribution-group { padding:0; margin:0 0 16px; overflow:hidden; }
.distribution-workspace .distribution-group-heading { display:flex; justify-content:space-between; align-items:center; gap:12px; background:#edf4fa; padding:12px 15px; border-bottom:1px solid var(--line); }
.distribution-workspace .distribution-group-heading h2 { font-size:15px; margin:0; }
.distribution-workspace .distribution-group-heading>span { color:var(--navy); font-size:12px; white-space:nowrap; }
.distribution-workspace .distribution-table { width:100%; table-layout:fixed; border-collapse:collapse; font-size:12px; }
.distribution-workspace .distribution-table th { color:var(--muted); font-size:11px; text-align:left; padding:10px 12px; }
.distribution-workspace .distribution-table td { padding:12px; border-top:1px solid var(--line); overflow-wrap:anywhere; vertical-align:middle; }
.distribution-workspace .distribution-table th:first-child { width:7%; }
.distribution-workspace .distribution-table th:nth-child(2) { width:22%; }
.distribution-workspace .distribution-table th:nth-child(3),.distribution-workspace .distribution-table th:nth-child(4):not(:nth-last-child(2)) { width:12%; }
.distribution-workspace .distribution-table th:last-child { width:100px; }
.distribution-workspace .distribution-person { color:var(--navy); }
.distribution-workspace .distribution-needs span { display:block; }
.distribution-workspace .distribution-needs span+span { margin-top:4px; }
.distribution-workspace .distribution-code { display:inline-block; padding:3px 7px; border-radius:5px; color:var(--navy); background:#edf4fa; }
.distribution-workspace .distribution-edit { font-size:11px; padding:8px; }
.distribution-workspace .distribution-empty { padding:16px; color:var(--muted); }
@media(max-width:1100px) {
 .distribution-workspace .distribution-toolbar { align-items:flex-start; flex-direction:column; }
 .distribution-workspace .distribution-table td,.distribution-workspace .distribution-table th { padding:10px 7px; }
}
@media(max-width:760px) {
 .distribution-workspace .distribution-heading { align-items:stretch; flex-direction:column; }
 .distribution-workspace .distribution-tabs { gap:12px; flex-wrap:wrap; }
 .distribution-workspace .distribution-tabs button { font-size:12px; }
 .distribution-workspace .distribution-kpis { gap:7px; }
 .distribution-workspace .distribution-kpis article { padding:10px 5px; }
 .distribution-workspace .distribution-kpis span { font-size:11px; }
 .distribution-workspace .distribution-actions,.distribution-workspace .distribution-actions button { width:100%; }
 .distribution-workspace .distribution-documents button { width:100%; }
 .distribution-workspace .distribution-table,.distribution-workspace .distribution-table tbody { display:block; }
 .distribution-workspace .distribution-table thead { display:none; }
 .distribution-workspace .distribution-table tr { display:grid; grid-template-columns:45px minmax(0,1fr); gap:9px; padding:14px; border-top:1px solid var(--line); }
 .distribution-workspace .distribution-table td { padding:0; border:0; }
 .distribution-workspace .distribution-table td:nth-child(n+3) { grid-column:1/-1; }
 .distribution-workspace .distribution-table td[data-label]::before { content:attr(data-label) ' : '; color:var(--muted); }
 .distribution-workspace .distribution-edit { min-height:44px; padding:10px 14px; }
 .distribution-workspace .distribution-group-heading { align-items:flex-start; flex-wrap:wrap; }
}

/* V73 approved kitchen accents. These selectors do not match printed documents. */
.distribution-workspace .kitchen-print-button,.cafeteria-workspace .kitchen-print-button { background:var(--green); color:#fff; border:0; padding:11px 14px; font-size:11px; border-radius:7px; }
.distribution-workspace .distribution-toolbar { margin-bottom:12px; }
.distribution-workspace .distribution-documents { gap:9px; }
.distribution-workspace .distribution-legend,.cafeteria-workspace .cafeteria-legend { display:flex; align-items:center; flex-wrap:wrap; gap:8px 14px; }
.distribution-workspace .kitchen-legend-item,.cafeteria-workspace .kitchen-legend-item { display:inline-flex; align-items:center; gap:5px; font-size:11px; }
.distribution-workspace .kitchen-texture,.cafeteria-workspace .kitchen-texture { display:inline-flex; align-items:center; justify-content:center; min-width:29px; min-height:26px; padding:3px 6px; border-radius:6px; font-size:12px; font-weight:800; line-height:1; }
.distribution-workspace .kitchen-texture-n,.cafeteria-workspace .kitchen-texture-n { background:#2b8e4a; color:#fff; }
.distribution-workspace .kitchen-texture-m,.cafeteria-workspace .kitchen-texture-m { background:#f3bb61; color:#50320b; }
.distribution-workspace .kitchen-texture-h,.distribution-workspace .kitchen-texture-vh,.cafeteria-workspace .kitchen-texture-h,.cafeteria-workspace .kitchen-texture-vh { background:#1e4b78; color:#fff; }
.distribution-workspace .kitchen-texture-sg,.cafeteria-workspace .kitchen-texture-sg { background:#b06b00; color:#fff; }
.distribution-workspace .kitchen-texture-cc,.cafeteria-workspace .kitchen-texture-cc { background:#a1266f; color:#fff; }
.distribution-workspace .kitchen-texture-unknown,.cafeteria-workspace .kitchen-texture-unknown { background:#e8edf2; color:var(--muted); }
.distribution-workspace .kitchen-legend-item .kitchen-texture,.cafeteria-workspace .kitchen-legend-item .kitchen-texture { min-width:23px; min-height:21px; padding:2px 4px; font-size:10px; }
.distribution-workspace .distribution-group-heading { border-left:4px solid #3474ad; background:#eaf3fd; }
.distribution-workspace .distribution-group[data-distribution-tone="green"] .distribution-group-heading { border-left-color:var(--green); background:#eaf5ef; }
.distribution-workspace .distribution-group[data-distribution-tone="amber"] .distribution-group-heading { border-left-color:#bd832c; background:#fff5e5; }
.distribution-workspace .distribution-table tbody tr:nth-child(even),.cafeteria-workspace .cafeteria-residents-table tbody tr:nth-child(even) { background:#fafcfe; }
.cafeteria-workspace .cafeteria-residents-table th { background:#eaf5ef; }
.distribution-workspace .distribution-table th:last-child,.cafeteria-workspace .cafeteria-residents-table th:last-child { width:132px; }
.cafeteria-workspace .cafeteria-residents-table th:nth-child(2) { width:20%; }
.cafeteria-workspace .cafeteria-residents-table th:nth-child(3),.cafeteria-workspace .cafeteria-residents-table th:nth-child(4) { width:8%; }
.cafeteria-workspace .cafeteria-residents-table th:nth-child(5) { width:20%; }
.cafeteria-workspace .cafeteria-residents-table th:nth-child(6) { width:auto; }
.distribution-workspace .distribution-edit,.cafeteria-workspace .cafeteria-edit-resident { display:inline-flex; align-items:center; justify-content:center; gap:6px; min-width:108px; padding:9px 12px; white-space:nowrap; word-break:normal; overflow-wrap:normal; flex-shrink:0; background:#e8f3fe; color:#165e96; border:1px solid #b8d9f3; border-radius:7px; font-size:11px; }
.distribution-workspace .distribution-edit:disabled,.cafeteria-workspace .cafeteria-edit-resident:disabled { opacity:.55; cursor:not-allowed; }
@media(max-width:760px) {
 .distribution-workspace .distribution-edit,.cafeteria-workspace .cafeteria-edit-resident { min-height:44px; }
 .distribution-workspace .kitchen-print-button,.cafeteria-workspace .kitchen-print-button { min-height:44px; }
}

/* V76 — modèle commun des onglets, vues et filtres de l'interface EMS. */
:is(#main-content, #editor-backdrop) .ems-tabs {
  --ems-tab-height: 44px;
  --ems-tab-font: 13px;
  --ems-tab-pad: 14px;
  display: flex;
  flex-flow: row wrap;
  align-items: stretch;
  gap: 4px;
  width: auto;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  padding: 4px;
  border: 0;
  border-radius: 12px;
  background: #edf4f9;
  overflow: visible;
}
:is(#main-content, #editor-backdrop) .ems-tabs--compact {
  --ems-tab-height: 36px;
  --ems-tab-font: 12px;
  --ems-tab-pad: 11px;
  border-radius: 10px;
}
:is(#main-content, #editor-backdrop) .ems-tabs > button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 1 auto;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
  min-height: var(--ems-tab-height);
  height: auto;
  margin: 0;
  padding: 8px var(--ems-tab-pad);
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #496582;
  box-shadow: none;
  font-family: inherit;
  font-size: var(--ems-tab-font);
  font-weight: 650;
  line-height: 1.35;
  letter-spacing: normal;
  text-transform: none;
  text-align: center;
  white-space: normal;
  overflow-wrap: normal;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
:is(#main-content, #editor-backdrop) .ems-tabs > button:is(.is-active, [aria-selected="true"]) {
  background: #176eb3;
  color: #fff;
}
:is(#main-content, #editor-backdrop) .ems-tabs > button:hover:not(:disabled) {
  background: #dceaf7;
  color: #17365d;
}
:is(#main-content, #editor-backdrop) .ems-tabs > button:is(.is-active, [aria-selected="true"]):hover:not(:disabled) {
  background: #125d97;
  color: #fff;
}
:is(#main-content, #editor-backdrop) .ems-tabs > button:focus-visible {
  outline: 2px solid #a66915;
  outline-offset: 1px;
}
:is(#main-content, #editor-backdrop) .ems-tabs > button:disabled {
  opacity: .55;
  cursor: not-allowed;
}
:is(#main-content, #editor-backdrop) .ems-tabs > button > span {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  min-width: 21px;
  min-height: 21px;
  height: auto;
  margin: 0;
  padding: 2px 6px;
  border-radius: 999px;
  background: #dce7f1;
  color: #294d70;
  font-size: 10px;
  font-weight: 750;
  line-height: 1.3;
}
:is(#main-content, #editor-backdrop) .ems-tabs > button:is(.is-active, [aria-selected="true"]) > span {
  background: rgba(255,255,255,.18);
  color: #fff;
}
#main-content .ems-tabs:is(.module-tabs, .distribution-tabs, .backup-tabs) { margin-bottom: 16px; }
#main-content .ems-tabs:is(.settings-module-tabs, .ems-archive-tabs) { margin: 12px 16px; }
#main-content .ems-tabs.print-settings-tabs { margin: 10px; }
#main-content .ems-tabs.print-settings-tabs > button { flex: 1 1 auto; }
@media (max-width: 600px) {
  :is(#main-content, #editor-backdrop) .ems-tabs > button { flex: 1 1 auto; }
  #main-content .ems-tabs:is(.settings-module-tabs, .ems-archive-tabs) { margin: 10px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  :is(#main-content, #editor-backdrop) .ems-tabs > button { transition: none; }
}

/* V80 : choix des entrées dans chaque service de la fiche Résident. */
.resident-editor-starters { grid-column:1/-1; min-width:0; margin:0; padding:10px 12px; border:1px solid #b8cde1; border-radius:10px; background:#f1f7fc; }
.resident-editor-starters legend { padding:0 5px; color:var(--navy); font-size:14px; font-weight:700; }
.resident-editor-starters .resident-editor-check:has(input:checked) { border-color:#73af94; background:#e6f4ec; color:#164e3b; }
.resident-editor-starters .resident-editor-check input { accent-color:#23795c; }
.resident-starter-help { margin:8px 0 0; font-size:12px; line-height:1.4; color:var(--muted); }
.resident-editor-starters:disabled { background:#f5f6f8; }

/* V81 : dessert de chaque service, saisi une fois dans la fiche Résident. */
.resident-editor-dessert { background:#f7f4fb; border-color:#cfbde0; }
.resident-dessert-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.resident-dessert-fields > * { min-width:0; }
.kitchen-meal-dessert { display:block; margin-top:5px; font-size:12px; line-height:1.4; color:#5f3877; font-weight:600; overflow-wrap:anywhere; }
@media(max-width:600px) { .resident-dessert-fields { grid-template-columns:1fr; } }

/* V83 : indications propres à la préparation diabétique. */
.resident-editor-diabetic { background:#eff8f4; border-color:#a2ccb8; }
.resident-diabetic-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.resident-diabetic-fields > * { min-width:0; }
@media(max-width:600px) { .resident-diabetic-fields { grid-template-columns:1fr; } }

.cafeteria-equipment-table{width:100%;border-collapse:collapse;font-family:Arial,sans-serif}.cafeteria-equipment-table th,.cafeteria-equipment-table td{padding:9px 12px;border-bottom:1px solid #dae4ee;text-align:left}.cafeteria-equipment-table th:not(:first-child),.cafeteria-equipment-table td:not(:first-child){text-align:center;width:72px}.cafeteria-equipment-table input{width:70px;min-height:38px;text-align:center}
