:root{font-family:Inter,Segoe UI,Arial,sans-serif;color:#172033;background:#e7eef5}*{box-sizing:border-box}body{margin:0;background:#e7eef5}.topbar{display:flex;justify-content:space-between;gap:20px;align-items:center;padding:26px 34px;background:#fff;border-bottom:1px solid #cfdbe7}.topbar h1{margin:0;font-size:28px}.topbar p{margin:6px 0 0;color:#617083}.top-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}.api-pill{font-size:12px;background:#dff1fa;color:#125d7a;padding:8px 12px;border-radius:999px}.tabs{display:flex;gap:8px;padding:12px 24px;background:#fff;border-bottom:1px solid #cfdbe7;overflow:auto;position:sticky;top:0;z-index:5}.tab{border:0;background:transparent;padding:10px 14px;border-radius:8px;cursor:pointer;white-space:nowrap;color:#475569}.tab:hover{background:#edf3f8}.tab.active{background:#17658c;color:#fff}main{padding:24px;max-width:1700px;margin:auto}.view{display:none}.view.active{display:block}.panel{background:#fff;border:1px solid #d5e0ea;border-radius:14px;padding:20px;margin-bottom:20px;box-shadow:0 6px 22px rgba(24,50,76,.08)}.panel h2{margin:0}.period-summary h2{font-size:19px}.panel-title-row{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:16px}.panel-title-row p{margin:4px 0 0;color:#64748b}.cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-bottom:20px}.dashboard-cards{grid-template-columns:repeat(4,minmax(0,1fr))}.card{background:#f7fafc;border:1px solid #dde6ee;border-radius:14px;padding:18px 22px;box-shadow:0 6px 22px rgba(24,50,76,.07);border-left:6px solid #17658c}.card.error{background:#fff3f2;border-left-color:#c83f34}.card.warning{background:#fff8e9;border-left-color:#dc8c00}.card.success{background:#eef9f4;border-left-color:#168a63}.card span{display:block;color:#657386;font-size:14px}.card strong{display:block;font-size:28px;margin-top:8px}.import-row,.filters,.actions-inline{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.filters{margin-bottom:16px}.compact-filters{margin-bottom:14px}.filters input,.filters select,.week-select,.import-row input{padding:9px 11px;border:1px solid #bfcddb;border-radius:8px;background:#fff;min-height:38px}.filters input{min-width:260px;flex:1}.week-select{min-width:330px}.primary,.secondary,.mini{border:0;border-radius:8px;padding:10px 15px;cursor:pointer;text-decoration:none;display:inline-flex;align-items:center;justify-content:center}.primary{background:#17658c;color:#fff}.secondary{background:#e4ebf2;color:#24364b}.secondary:hover{background:#d6e1eb}.mini{padding:6px 9px;font-size:11px;background:#e4ebf2;color:#24364b}.mini.success{background:#dff3e9;color:#0e694a}.mini.warning{background:#fff0cc;color:#8a5900}.mini.danger{background:#f8d9d6;color:#8e2119}.primary:disabled,.secondary:disabled,.mini:disabled{opacity:.45;cursor:not-allowed}.link-button{font-size:13px}.active-filter{background:#17658c!important;color:#fff!important}.message{font-size:14px;font-weight:600}.message.info{color:#17658c}.message.success{color:#168a63}.message.error{color:#c83f34}.summary-grid,.stats-cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.summary-item{background:#f4f8fb;border:1px solid #dfe8f0;border-radius:10px;padding:14px}.summary-item:nth-child(3){background:#fff4f2}.summary-item:nth-child(4){background:#fff8e9}.summary-item span{display:block;color:#657386;font-size:13px}.summary-item strong{display:block;font-size:22px;margin-top:4px}.summary-grid>.summary-item:not(.period-card){text-align:center}.summary-grid>.summary-item:not(.period-card) strong{width:100%;text-align:center}.period-card span{font-size:12px}.table-wrap{overflow:auto;border:1px solid #d8e2eb;border-radius:10px}table{width:100%;border-collapse:collapse;font-size:12.5px}th,td{padding:9px 8px;border-bottom:1px solid #e3ebf2;text-align:left;vertical-align:top}th{background:#edf3f7;color:#304257;position:sticky;top:0;z-index:1;white-space:nowrap}tbody tr:nth-child(even){background:#fafcfd}tbody tr:hover{background:#edf5fa}.badge{display:inline-block;padding:3px 7px;border-radius:999px;color:#fff;font-size:11px}.badge.OK{background:#168a63}.badge.Erreur{background:#c83f34}.badge.Avertissement{background:#dc8c00}.editable{width:110px;padding:6px;border:1px solid #bfcddb;border-radius:6px}.comment{min-width:190px;min-height:54px;padding:6px;border:1px solid #bfcddb;border-radius:6px}.client-group{border:1px solid #d4e0ea;border-radius:10px;margin-bottom:10px;overflow:hidden}.client-header{display:flex;justify-content:space-between;gap:10px;padding:12px 14px;background:#edf4f9;cursor:pointer;font-weight:700}.client-header:hover{background:#e1edf5}.client-header .counts{font-weight:400;color:#64748b}.client-body.collapsed{display:none}.location-aris{color:#126da0;font-weight:700}.totals{margin-top:12px;font-weight:700;color:#34465a}.checkbox{font-size:13px}.stats-layout{display:grid;grid-template-columns:360px 1fr;gap:28px;align-items:center}.donut-wrap{display:flex;align-items:center;gap:22px}.donut{width:190px;height:190px;border-radius:50%;display:grid;place-items:center;background:conic-gradient(#168a63 0 33%,#dc8c00 33% 66%,#c83f34 66%)}.donut>div{width:116px;height:116px;border-radius:50%;background:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center}.donut strong{font-size:28px}.donut span{font-size:12px;color:#64748b}.legend div{margin:8px 0}.legend i{display:inline-block;width:10px;height:10px;border-radius:50%;margin-right:7px}.comparison-columns{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:14px}.comparison-block{border:1px solid #dce5ee;border-radius:10px;padding:14px;background:#f8fafc}.comparison-block.new{background:#fff8e9}.comparison-block.resolved{background:#eef9f4}.comparison-block.recurrent{background:#edf4fa}.comparison-block h3{margin:0 0 10px}.comparison-block ul{margin:0;padding-left:18px}.comparison-block li{margin:6px 0}.two-columns{display:grid;grid-template-columns:1fr 1fr;gap:24px}.row-actions{display:flex;gap:5px;flex-wrap:wrap;min-width:210px}.history-status{display:inline-block;padding:3px 7px;border-radius:999px;background:#e7edf3}.history-status.success{background:#dff3e9;color:#0f6b4a}.history-status.error{background:#f8d9d6;color:#8e2119}.history-status.deleted{background:#eceff3;color:#596979}.history-status.replaced{background:#fff0cc;color:#8a5900}.details-list p{margin:8px 0}.modal{display:none;position:fixed;inset:0;background:rgba(15,25,40,.45);z-index:20;padding:30px;overflow:auto}.modal.show{display:flex;align-items:flex-start;justify-content:center}.modal-card{width:min(1100px,100%);max-height:90vh;overflow:auto;background:#fff;border-radius:14px;padding:20px;box-shadow:0 18px 50px rgba(15,25,40,.25)}.toast{position:fixed;right:20px;bottom:20px;max-width:420px;padding:12px 16px;border-radius:9px;background:#172033;color:#fff;opacity:0;transform:translateY(12px);pointer-events:none;transition:.2s;z-index:30}.toast.show{opacity:1;transform:none}.empty{text-align:center;color:#64748b;padding:24px}.money{text-align:right;white-space:nowrap}input:focus,select:focus,textarea:focus{border-color:#17658c;outline:2px solid rgba(23,101,140,.15)}
@media(max-width:1250px){.dashboard-cards,.cards,.summary-grid,.stats-cards{grid-template-columns:repeat(2,1fr)}.stats-layout{grid-template-columns:1fr}.comparison-columns,.two-columns{grid-template-columns:1fr}.topbar{align-items:flex-start;flex-direction:column}.top-actions{justify-content:flex-start}}
@media(max-width:620px){main{padding:12px}.cards,.summary-grid,.stats-cards{grid-template-columns:1fr}.week-select{min-width:100%;width:100%}.panel-title-row{align-items:flex-start;flex-direction:column}.topbar{padding:20px}.actions-inline{align-items:stretch}.secondary,.primary{width:100%}}

.modal[hidden]{display:none!important}.comparison-selectors label{display:flex;flex-direction:column;gap:5px;font-size:12px;color:#52657a;font-weight:600}.comparison-selectors select{font-size:13px;color:#172033;font-weight:400}.comparison-selectors{align-items:flex-end}.comparison-selectors .week-select{min-width:360px}

/* =========================================================
   Sources Excel / e-mail
   ========================================================= */
.import-sources-grid{display:grid;grid-template-columns:1fr 1fr;gap:28px}.import-source-block{min-width:0}.mail-source-block{border-left:1px solid #d8e2eb;padding-left:28px}.mail-sync-status{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:12px}.mail-sync-item{background:#f4f8fb;border:1px solid #dfe8f0;border-radius:8px;padding:9px 10px}.mail-sync-item span{display:block;color:#657386;font-size:11px}.mail-sync-item strong{display:block;margin-top:3px;font-size:13px;overflow-wrap:anywhere}.agent-badge,.source-badge{display:inline-flex;align-items:center;border-radius:999px;padding:3px 7px;font-size:10.5px;font-weight:700;white-space:nowrap}.agent-badge{background:#e5eef6;color:#204866}.agent-badge.Acronis{background:#e9e8ff;color:#4b3f9d}.agent-badge.Synology{background:#e3f3ff;color:#135f87}.agent-badge.Veeam{background:#e0f7ef;color:#116646}.agent-badge.Inconnu{background:#eceff3;color:#596979}.source-badge.email{background:#fff0cc;color:#8a5900}.source-badge.excel{background:#dff1fa;color:#125d7a}.mail-subject{max-width:340px;white-space:normal;overflow-wrap:anywhere}.mail-error{max-width:430px;white-space:normal;overflow-wrap:anywhere}.mail-detail-grid{display:grid;grid-template-columns:180px 1fr;gap:8px 14px}.mail-detail-grid dt{font-weight:700;color:#40556a}.mail-detail-grid dd{margin:0;white-space:pre-wrap;overflow-wrap:anywhere}.mail-details-button{white-space:nowrap}.activity-meta{display:flex;gap:5px;flex-wrap:wrap;align-items:center}.activity-subject{color:#40556a;font-size:12px;margin-top:5px}.activity-error{color:#8e2119;font-size:12px;margin-top:5px;white-space:normal}.activity-info-muted{color:#64748b;font-size:11.5px;margin-top:5px}.mail-status-path{grid-column:1/-1}.mail-sync-running{opacity:.7;pointer-events:none}
@media(max-width:1000px){.import-sources-grid{grid-template-columns:1fr}.mail-source-block{border-left:0;border-top:1px solid #d8e2eb;padding-left:0;padding-top:22px}.mail-sync-status{grid-template-columns:1fr 1fr}}
@media(max-width:620px){.mail-sync-status{grid-template-columns:1fr}.mail-detail-grid{grid-template-columns:1fr}.mail-detail-grid dt{margin-top:8px}}

/* =========================================================
   Version 6.2 : affichage plus lisible des sujets et erreurs
   ========================================================= */
.compact-cell {
  max-width: 320px;
}

.compact-cell > strong,
.compact-cell .activity-error,
.compact-cell.mail-subject,
.compact-cell.mail-error {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  line-height: 1.35;
}

.compact-cell .activity-info-muted {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.activity-latest-note {
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid #cbdbe8;
  border-radius: 9px;
  background: #f4f8fb;
  color: #40556a;
  font-size: 12.5px;
}

.dashboard-card-detail {
  display: block;
  width: 100%;
  margin-top: 6px;
  color: #64748b;
  font-size: 11px;
  font-weight: 400;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mail-sync-status {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}


/* =========================================================
   Version 6.4 : indicateur de récupération des mails
   ========================================================= */
.mail-loading-overlay[hidden] {
  display: none !important;
}

.mail-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 30, 45, 0.52);
  backdrop-filter: blur(2px);
}

.mail-loading-card {
  width: min(560px, 100%);
  display: flex;
  align-items: flex-start;
  gap: 22px;
  padding: 28px;
  border: 1px solid #d4e0ea;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(15, 30, 45, 0.32);
}

.mail-loading-spinner {
  flex: 0 0 auto;
  width: 50px;
  height: 50px;
  border: 5px solid #dbe8f0;
  border-top-color: #17658c;
  border-radius: 50%;
  animation: mail-loading-spin 0.85s linear infinite;
}

.mail-loading-content {
  min-width: 0;
}

.mail-loading-content h2 {
  margin: 0 0 8px;
  color: #172033;
  font-size: 22px;
}

.mail-loading-content > p {
  margin: 6px 0;
}

.mail-loading-content #mailLoadingText {
  color: #17658c;
  font-size: 15px;
  font-weight: 700;
}

.mail-loading-elapsed {
  color: #40556a;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.mail-loading-note {
  padding-top: 8px;
  color: #64748b;
  font-size: 12.5px;
  line-height: 1.45;
}

.button-spinner {
  width: 15px;
  height: 15px;
  margin-right: 8px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: mail-loading-spin 0.75s linear infinite;
}

.secondary .button-spinner {
  border-color: rgba(36, 54, 75, 0.25);
  border-top-color: #24364b;
}

.mail-operation-message {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
}

.mail-operation-message::before {
  content: '';
  width: 13px;
  height: 13px;
  margin-right: 8px;
  border: 2px solid rgba(23, 101, 140, 0.25);
  border-top-color: #17658c;
  border-radius: 50%;
  animation: mail-loading-spin 0.75s linear infinite;
}

body.mail-loading-open {
  overflow: hidden;
}

@keyframes mail-loading-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 620px) {
  .mail-loading-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 24px 20px;
  }
}

/* =========================================================
   Version 6.5 : centrage des cartes d'état de la messagerie
   ========================================================= */
.mail-sync-status {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.mail-sync-status > .mail-sync-item {
  grid-column: span 2;
  display: flex;
  min-height: 66px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.mail-sync-status > .mail-sync-item span,
.mail-sync-status > .mail-sync-item strong {
  width: 100%;
  text-align: center;
}

/* La carte "Dossiers / messages" est seule sur sa ligne : on la centre. */
.mail-sync-status > .mail-sync-item:nth-child(7) {
  grid-column: 3 / span 2;
}

/* La ligne du chemin de la base reste sur toute la largeur. */
.mail-sync-status > .mail-status-path {
  grid-column: 1 / -1;
}

@media (max-width: 1000px) {
  .mail-sync-status {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .mail-sync-status > .mail-sync-item {
    grid-column: span 2;
  }

  .mail-sync-status > .mail-sync-item:nth-child(7) {
    grid-column: 2 / span 2;
  }

  .mail-sync-status > .mail-status-path {
    grid-column: 1 / -1;
  }
}

@media (max-width: 620px) {
  .mail-sync-status {
    grid-template-columns: 1fr;
  }

  .mail-sync-status > .mail-sync-item,
  .mail-sync-status > .mail-sync-item:nth-child(7),
  .mail-sync-status > .mail-status-path {
    grid-column: 1;
  }
}


/* v6.7 - affichage sécurisé du corps HTML des e-mails */
.mail-message-section{margin-top:18px;border-top:1px solid #d8e2eb;padding-top:16px}.mail-message-section h3{margin:0 0 10px;font-size:16px;color:#24364b}.mail-message-loading,.mail-message-error{border:1px solid #d8e2eb;border-radius:10px;padding:18px;background:#f7fafc;color:#64748b}.mail-message-error{background:#fff3f2;color:#8e2119;border-color:#efc8c4}.mail-html-frame{display:block;width:100%;min-height:360px;border:1px solid #d8e2eb;border-radius:10px;background:#fff}.modal-card:has(.mail-message-section){width:min(1280px,100%)}

/* =========================================================
   Version 6.8.0 : quotas ARIS plus visuels
   ========================================================= */
#view-quotas .table-wrap {
  overflow: auto;
}

#view-quotas table {
  min-width: 1180px;
}

.quota-row {
  transition: background-color .18s ease, box-shadow .18s ease;
}

.quota-row > td:first-child {
  border-left: 5px solid transparent;
}

.quota-row-ok {
  background: #f7fcf9 !important;
}

.quota-row-ok > td:first-child {
  border-left-color: #1f9d68;
}

.quota-row-warning {
  background: #fffaf0 !important;
}

.quota-row-warning > td:first-child {
  border-left-color: #e29a16;
}

.quota-row-exceeded {
  background: #fff1f0 !important;
  box-shadow: inset 0 0 0 1px rgba(201, 65, 65, .12);
}

.quota-row-exceeded > td:first-child {
  border-left-color: #cf3f3f;
}

.quota-row-unconfigured {
  background: #fafbfd !important;
}

.quota-row-unconfigured > td:first-child {
  border-left-color: #8a9aab;
}

.quota-row-client {
  background: #f7f9fb !important;
  color: #607083;
}

.quota-row-client > td:first-child {
  border-left-color: #b7c2cd;
}

.quota-row:hover {
  filter: brightness(.99);
}

.quota-client-name {
  display: block;
  margin-bottom: 7px;
  color: #172033;
  font-size: 12.5px;
}

.quota-status {
  display: inline-flex;
  max-width: 210px;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 7px;
  padding: 5px 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 10.5px;
  line-height: 1.2;
}

.quota-status span {
  font-weight: 800;
}

.quota-status small {
  font-size: 10px;
}

.quota-status-ok {
  border-color: #b9dfcd;
  background: #e7f7ef;
  color: #116947;
}

.quota-status-warning {
  border-color: #eed29a;
  background: #fff3d8;
  color: #875700;
}

.quota-status-exceeded {
  border-color: #efbbb7;
  background: #ffe3e1;
  color: #98271f;
}

.quota-status-unconfigured {
  border-color: #d4dce4;
  background: #edf1f5;
  color: #5d6d7d;
}

.quota-status-client {
  border-color: #d8e0e7;
  background: #eef2f5;
  color: #617181;
}

.location-client {
  color: #657386;
  font-weight: 600;
}

.quota-storage-cell {
  min-width: 165px;
}

.quota-number {
  display: inline-block;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.quota-number-default {
  color: #24425a;
}

.quota-number-success {
  color: #15744f;
}

.quota-number-warning {
  color: #a56900;
}

.quota-number-danger {
  color: #bd3028;
}

.quota-progress {
  width: 145px;
  height: 7px;
  margin-top: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #dfe7ed;
}

.quota-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #259767;
}

.quota-progress-warning span {
  background: #e29a16;
}

.quota-progress-exceeded span {
  background: #cf3f3f;
}

.quota-progress-label {
  display: block;
  margin-top: 4px;
  color: #66788a;
  font-size: 10px;
  white-space: nowrap;
}

.quota-overage-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 9px;
  border: 1px solid #edaaa5;
  border-radius: 999px;
  background: #ffddda;
  color: #a8241c;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.quota-not-configured {
  display: block;
  margin-top: 4px;
  color: #7a8998;
}

.quota-na-badge {
  display: inline-flex;
  padding: 5px 8px;
  border: 1px solid #d4dce4;
  border-radius: 999px;
  background: #edf1f5;
  color: #607083;
  font-weight: 700;
  white-space: nowrap;
}

.quota-client-note {
  display: block;
  max-width: 150px;
  margin-top: 5px;
  color: #82909d;
  line-height: 1.3;
}

.quota-muted-value {
  color: #9aa6b1;
  font-weight: 700;
}

.quota-no-action {
  color: #8b98a5;
  font-size: 11px;
  white-space: nowrap;
}

.quota-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.quota-summary-card {
  padding: 13px 15px;
  border: 1px solid #dce5ec;
  border-radius: 10px;
  background: #f5f8fa;
}

.quota-summary-card span {
  display: block;
  color: #607083;
  font-size: 11.5px;
}

.quota-summary-card strong {
  display: block;
  margin-top: 5px;
  color: #263c50;
  font-size: 19px;
  font-variant-numeric: tabular-nums;
}

.quota-summary-success {
  border-color: #bce0cf;
  background: #eaf8f1;
}

.quota-summary-success strong {
  color: #15744f;
}

.quota-summary-warning {
  border-color: #eed29a;
  background: #fff5df;
}

.quota-summary-warning strong {
  color: #9a6300;
}

.quota-summary-danger {
  border-color: #efbbb7;
  background: #ffe9e7;
}

.quota-summary-danger strong {
  color: #b52d25;
}

@media (max-width: 950px) {
  .quota-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .quota-summary-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   Version 6.8.3 : largeur des filtres de la page Quotas
   ========================================================= */
#view-quotas .filters {
  display: grid;
  grid-template-columns: minmax(460px, 3fr) minmax(300px, 1fr);
  align-items: center;
  gap: 12px;
}

#view-quotas #quotasSearch {
  width: 100%;
  min-width: 0;
  flex: none;
}

#view-quotas #quotaLocationFilter {
  width: 100%;
  min-width: 300px;
}

@media (max-width: 950px) {
  #view-quotas .filters {
    grid-template-columns: minmax(320px, 2fr) minmax(250px, 1fr);
  }

  #view-quotas #quotaLocationFilter {
    min-width: 250px;
  }
}

@media (max-width: 680px) {
  #view-quotas .filters {
    grid-template-columns: 1fr;
  }

  #view-quotas #quotaLocationFilter {
    min-width: 0;
  }
}

/* =========================================================
   Version 6.9.0 : aide complète et intuitive sur chaque page
   ========================================================= */
.page-help-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
  padding: 13px 15px;
  border: 1px solid #c9dce9;
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(23, 101, 140, .08), rgba(255, 255, 255, .95));
  box-shadow: 0 4px 14px rgba(24, 50, 76, .05);
}

.page-help-strip-text {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.page-help-strip-text strong {
  color: #17324d;
  font-size: 14px;
}

.page-help-strip-text span {
  color: #60748a;
  font-size: 12px;
}

.page-help-button {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 14px;
  border: 1px solid #17658c;
  border-radius: 10px;
  background: #17658c;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 5px 14px rgba(23, 101, 140, .18);
  transition:
    transform .15s ease,
    background-color .15s ease,
    box-shadow .15s ease;
}

.page-help-button:hover {
  background: #125777;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(23, 101, 140, .24);
}

.page-help-button:focus-visible {
  outline: 3px solid rgba(23, 101, 140, .25);
  outline-offset: 3px;
}

.page-help-button-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  color: #17658c;
  font-size: 15px;
  font-weight: 900;
}

.page-help-modal {
  padding: 18px;
}

.page-help-modal .modal-card {
  width: min(1450px, 100%);
  max-height: 95vh;
  padding: 24px;
}

.page-help-modal #modalTitle {
  color: #17324d;
  font-size: 25px;
}

.page-help-guide {
  color: #23394e;
  font-size: 16px;
  line-height: 1.6;
}

.page-help-hero {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: center;
  gap: 22px;
  margin-bottom: 20px;
  padding: 24px;
  border: 1px solid #bcd6e6;
  border-radius: 16px;
  background:
    linear-gradient(135deg, #eaf6fc 0%, #f8fcfe 56%, #fff 100%);
}

.page-help-hero-icon {
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  border-radius: 22px;
  background: #17658c;
  font-size: 40px;
  box-shadow: 0 10px 25px rgba(23, 101, 140, .20);
}

.page-help-kicker {
  display: block;
  margin-bottom: 5px;
  color: #17658c;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.page-help-hero h3 {
  margin: 0;
  color: #142d46;
  font-size: 26px;
  line-height: 1.25;
}

.page-help-hero p {
  max-width: 980px;
  margin: 9px 0 0;
  color: #466177;
  font-size: 17px;
}

.page-help-section {
  margin-bottom: 20px;
  overflow: hidden;
  border: 1px solid #d5e2eb;
  border-radius: 15px;
  background: #fff;
}

.page-help-section-heading {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 17px 19px;
  border-bottom: 1px solid #dbe6ee;
  background: #eef6fa;
}

.page-help-section-heading > span {
  font-size: 27px;
}

.page-help-section-heading h3 {
  margin: 0;
  color: #17324d;
  font-size: 19px;
}

.page-help-section-heading p {
  margin: 2px 0 0;
  color: #64788a;
  font-size: 13px;
}

.page-help-steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
  padding: 18px;
}

.page-help-step {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 12px;
  padding: 15px;
  border: 1px solid #dde7ee;
  border-radius: 12px;
  background: #fbfdfe;
}

.page-help-step-number {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: #17658c;
  color: #fff;
  font-size: 18px;
  font-weight: 900;
}

.page-help-step h4 {
  margin: 0 0 4px;
  color: #17324d;
  font-size: 16px;
}

.page-help-step p {
  margin: 0;
  color: #526b7e;
  font-size: 14px;
  line-height: 1.55;
}

.page-help-two-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(330px, .8fr);
  gap: 20px;
}

.page-help-side-stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.page-help-words {
  margin: 0;
}

.page-help-word {
  display: grid;
  grid-template-columns: minmax(130px, 28%) minmax(0, 1fr);
  border-bottom: 1px solid #edf2f5;
}

.page-help-word:last-child {
  border-bottom: 0;
}

.page-help-word dt,
.page-help-word dd {
  margin: 0;
  padding: 12px 15px;
}

.page-help-word dt {
  background: #f7fafc;
  color: #17658c;
  font-weight: 900;
}

.page-help-word dd {
  color: #455f73;
}

.page-help-example {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 14px;
  padding: 20px;
  border: 1px solid #efd69c;
  border-radius: 15px;
  background: #fff8e8;
}

.page-help-example-icon {
  font-size: 34px;
}

.page-help-example h3,
.page-help-remember h3 {
  margin: 0 0 8px;
  color: #17324d;
  font-size: 18px;
}

.page-help-example p {
  margin: 0;
  color: #5f5335;
  font-size: 15px;
}

.page-help-remember {
  padding: 20px;
  border: 1px solid #bfe1cf;
  border-radius: 15px;
  background: #eef9f4;
}

.page-help-remember ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.page-help-remember li {
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr);
  gap: 8px;
  color: #315c4a;
}

.page-help-remember li span {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  background: #168a63;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.page-help-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 4px;
  padding: 18px 20px;
  border: 1px solid #ccdce7;
  border-radius: 13px;
  background: #f4f8fb;
}

.page-help-bottom p {
  margin: 0;
  color: #526a7d;
}

.page-help-close-bottom {
  min-width: 150px;
  font-weight: 800;
}

@media (max-width: 950px) {
  .page-help-steps,
  .page-help-two-columns {
    grid-template-columns: 1fr;
  }

  .page-help-side-stack {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .page-help-strip,
  .page-help-bottom {
    align-items: stretch;
    flex-direction: column;
  }

  .page-help-button,
  .page-help-close-bottom {
    width: 100%;
  }

  .page-help-modal {
    padding: 8px;
  }

  .page-help-modal .modal-card {
    padding: 14px;
  }

  .page-help-hero {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .page-help-hero-icon {
    width: 64px;
    height: 64px;
    border-radius: 17px;
    font-size: 31px;
  }

  .page-help-hero h3 {
    font-size: 21px;
  }

  .page-help-hero p {
    font-size: 15px;
  }

  .page-help-steps,
  .page-help-side-stack {
    grid-template-columns: 1fr;
  }

  .page-help-word {
    grid-template-columns: 1fr;
  }

  .page-help-word dt {
    padding-bottom: 4px;
  }

  .page-help-word dd {
    padding-top: 5px;
  }
}

/* =========================================================
   Version 6.9.4 : alignement des cartes de récupération mail
   ========================================================= */
.mail-sync-status {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.mail-sync-status > .mail-sync-item,
.mail-sync-status > .mail-sync-item:nth-child(7) {
  grid-column: auto;
  width: auto;
  min-width: 0;
}

.mail-sync-status > .mail-status-path {
  grid-column: 1 / -1;
}

@media (max-width: 1000px) {
  .mail-sync-status {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mail-sync-status > .mail-sync-item,
  .mail-sync-status > .mail-sync-item:nth-child(7) {
    grid-column: auto;
  }

  .mail-sync-status > .mail-status-path {
    grid-column: 1 / -1;
  }
}

@media (max-width: 620px) {
  .mail-sync-status {
    grid-template-columns: 1fr;
  }

  .mail-sync-status > .mail-sync-item,
  .mail-sync-status > .mail-sync-item:nth-child(7),
  .mail-sync-status > .mail-status-path {
    grid-column: 1;
  }
}

/* =========================================================
   Supervision v6.10 — centre d'actions, clients, santé
   ========================================================= */

.action-center-panel {
  border-top: 4px solid #173f6b;
}

.action-summary {
  margin-bottom: 18px;
}

.action-count.critical strong,
.health-card.error strong {
  color: #b42318;
}

.action-count.high strong,
.health-card.warning strong {
  color: #b25e09;
}

.action-count.medium strong {
  color: #8a6500;
}

.action-center-list {
  display: grid;
  gap: 10px;
}

.action-center-item {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid #dce3ea;
  border-left: 5px solid #7b8794;
  border-radius: 10px;
  background: #fff;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.action-center-item:hover {
  background: #f7f9fb;
  border-color: #b9c6d3;
}

.action-center-item.critical { border-left-color: #b42318; }
.action-center-item.high { border-left-color: #d96b0b; }
.action-center-item.medium { border-left-color: #c28b00; }
.action-center-item.low { border-left-color: #60758a; }

.action-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.action-main strong,
.action-main span,
.action-main small {
  overflow-wrap: anywhere;
}

.action-main small,
.action-meta small,
.cell-note,
.muted {
  color: #687583;
}

.action-meta {
  display: grid;
  gap: 4px;
  justify-items: end;
  white-space: nowrap;
  color: #687583;
  font-size: .85rem;
}

.criticality-badge,
.state-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 700;
  white-space: nowrap;
}

.criticality-badge.critical,
.state-badge.error {
  color: #8f1d16;
  background: #fde8e7;
}

.criticality-badge.high {
  color: #9a4d05;
  background: #fff0de;
}

.criticality-badge.medium,
.state-badge.warning {
  color: #765800;
  background: #fff5c7;
}

.criticality-badge.low,
.state-badge.neutral {
  color: #4a5c6c;
  background: #eaf0f5;
}

.state-badge.success {
  color: #096847;
  background: #dff5ea;
}

.success-empty,
.health-ok {
  padding: 16px;
  border: 1px solid #b8e0cf;
  border-radius: 10px;
  background: #effaf5;
  color: #096847;
}

.cell-note {
  display: block;
  margin-top: 4px;
  max-width: 320px;
  white-space: normal;
}

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

.compact-button {
  padding: 6px 9px;
  font-size: .82rem;
}

button.danger {
  border: 1px solid #dfb2ae;
  background: #fff;
  color: #a52a22;
}

button.danger:hover {
  background: #fff0ef;
}

.muted-row {
  opacity: .68;
}

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

.editor-grid label,
.settings-form-grid label {
  display: grid;
  gap: 6px;
  font-weight: 600;
}

.editor-grid input,
.editor-grid select,
.editor-grid textarea,
.settings-form-grid input,
.settings-form-grid select {
  width: 100%;
}

.editor-span {
  grid-column: 1 / -1;
}

.editor-grid .checkbox,
.settings-form-grid .checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
}

.editor-grid .checkbox input,
.settings-form-grid .checkbox input {
  width: auto;
}

.modal-actions,
.settings-actions {
  margin-top: 18px;
  justify-content: flex-end;
}

.health-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.health-card {
  display: grid;
  gap: 5px;
  padding: 15px;
  border: 1px solid #dce3ea;
  border-radius: 10px;
  background: #fff;
}

.health-card strong {
  font-size: 1.25rem;
}

.health-card small {
  color: #687583;
  overflow-wrap: anywhere;
}

.health-card.success {
  border-left: 5px solid #168a63;
}

.health-card.warning {
  border-left: 5px solid #dc8c00;
}

.health-card.error {
  border-left: 5px solid #c83f34;
}

.health-problems {
  margin-top: 18px;
}

.health-problems h3 {
  margin-bottom: 10px;
}

.health-problem {
  margin-top: 8px;
  padding: 11px 13px;
  border-left: 4px solid #c83f34;
  border-radius: 6px;
  background: #fff0ef;
  color: #84251e;
}

.detail-list dl {
  display: grid;
  grid-template-columns: minmax(150px, auto) 1fr;
  gap: 8px 14px;
  margin: 0;
}

.detail-list dt {
  font-weight: 700;
  color: #435364;
}

.detail-list dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.notification-settings-panel .api-pill.warning {
  background: #fff1d6;
  color: #8a5400;
}

.setting-checkbox {
  align-self: end;
  min-height: 42px;
}

.diagnostic-output {
  max-height: 340px;
  overflow: auto;
  padding: 12px;
  border-radius: 8px;
  background: #101820;
  color: #e8eef4;
  white-space: pre-wrap;
}

@media (max-width: 900px) {
  .action-center-item {
    grid-template-columns: 1fr;
  }

  .action-meta {
    justify-items: start;
  }

  .editor-grid,
  .settings-form-grid {
    grid-template-columns: 1fr;
  }

  .editor-span {
    grid-column: auto;
  }

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


/* =========================================================
   Supervision v6.10.1 — centre d'actions compact et aide
   ========================================================= */
.action-center-heading {
  margin-bottom: 10px;
}

.action-summary-compact {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 10px;
}

.action-summary-chip {
  display: inline-grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 2px 8px;
  min-width: 145px;
  padding: 7px 11px;
  border: 1px solid #d9e2eb;
  border-radius: 9px;
  background: #f7f9fb;
  cursor: help;
}

.action-summary-chip span {
  font-size: .78rem;
  color: #5f6f80;
}

.action-summary-chip strong {
  justify-self: end;
  font-size: 1.08rem;
}

.action-summary-chip small {
  grid-column: 1 / -1;
  font-size: .69rem;
  color: #778595;
}

.action-summary-chip.critical { border-left: 4px solid #b42318; }
.action-summary-chip.high { border-left: 4px solid #d96b0b; }
.action-summary-chip.medium { border-left: 4px solid #c28b00; }
.action-summary-chip.total { border-left: 4px solid #173f6b; }

.action-center-list.compact {
  gap: 7px;
}

.action-client-group {
  overflow: hidden;
  border: 1px solid #dce3ea;
  border-left: 4px solid #7b8794;
  border-radius: 9px;
  background: #fff;
}

.action-client-group.critical { border-left-color: #b42318; }
.action-client-group.high { border-left-color: #d96b0b; }
.action-client-group.medium { border-left-color: #c28b00; }
.action-client-group.low { border-left-color: #60758a; }

.action-client-group > summary {
  display: grid;
  grid-template-columns: auto minmax(140px, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 7px 11px;
  cursor: pointer;
  list-style: none;
  background: #fff;
}

.action-client-group > summary::-webkit-details-marker {
  display: none;
}

.action-client-group > summary:hover {
  background: #f7f9fb;
}

.action-client-count {
  color: #667789;
  font-size: .81rem;
  white-space: nowrap;
}

.action-client-chevron {
  color: #526579;
  font-size: 1.05rem;
  transition: transform .15s ease;
}

.action-client-group[open] .action-client-chevron {
  transform: rotate(180deg);
}

.action-client-items {
  display: grid;
  border-top: 1px solid #e5ebf1;
}

.action-client-items .action-center-item {
  grid-template-columns: 8px minmax(0, 1fr) auto;
  gap: 10px;
  padding: 8px 11px;
  border: 0;
  border-bottom: 1px solid #edf1f5;
  border-radius: 0;
  background: #fbfcfd;
}

.action-client-items .action-center-item:last-child {
  border-bottom: 0;
}

.action-client-items .action-main {
  gap: 1px;
}

.action-client-items .action-main strong {
  font-size: .88rem;
}

.action-client-items .action-main small,
.action-client-items .action-main span,
.action-client-items .action-meta {
  font-size: .75rem;
}

.action-client-items .action-main > span {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  color: #34475a;
}

.criticality-dot {
  width: 7px;
  height: 7px;
  margin-top: 6px;
  border-radius: 50%;
  background: #7b8794;
}

.action-center-item.critical .criticality-dot { background: #b42318; }
.action-center-item.high .criticality-dot { background: #d96b0b; }
.action-center-item.medium .criticality-dot { background: #c28b00; }
.action-center-item.low .criticality-dot { background: #60758a; }

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

.help-overview-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 10px;
  align-items: center;
  padding: 14px;
  border: 1px solid #d7e1ea;
  border-radius: 11px;
  background: #fff;
  color: #172b3d;
  text-align: left;
  cursor: pointer;
}

.help-overview-card:hover {
  border-color: #85a8c7;
  background: #f4f8fb;
  transform: translateY(-1px);
}

.help-overview-card > span {
  grid-row: 1 / 3;
  font-size: 1.5rem;
}

.help-overview-card strong {
  font-size: .92rem;
}

.help-overview-card small {
  color: #667789;
  line-height: 1.35;
}

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

.help-legend-grid > div {
  padding: 12px;
  border: 1px solid #dce3ea;
  border-radius: 10px;
  background: #f9fbfc;
}

.help-legend-grid p {
  margin: 8px 0 0;
  color: #5f6f80;
  font-size: .82rem;
}

@media (max-width: 1100px) {
  .help-overview-grid,
  .help-legend-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .action-summary-chip {
    flex: 1 1 140px;
  }

  .action-client-group > summary {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .action-client-count {
    grid-column: 2;
    white-space: normal;
  }

  .action-client-chevron {
    grid-column: 3;
    grid-row: 1 / 3;
  }

  .help-overview-grid,
  .help-legend-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   Supervision v6.11.1 — clients sans sauvegarde sur la période
   ========================================================= */
.badge.Absente {
  background: #9a6700;
  color: #fff;
}

.client-group.missing-client {
  border-color: #ead6a2;
  background: #fffdf7;
}

.client-header.missing-client-header {
  background: #fff7df;
  border-left: 5px solid #d99a00;
  padding-left: 11px;
}

.client-header.missing-client-header:hover {
  background: #ffefc2;
}

.missing-activity-count {
  color: #8a5a00 !important;
  font-weight: 700 !important;
}

.missing-activity-row {
  background: #fffaf0 !important;
}

.missing-activity-row:hover {
  background: #fff3d6 !important;
}

.missing-activity-message {
  color: #8a5a00;
  font-weight: 600;
  line-height: 1.35;
}


/* =========================================================
   Supervision v6.11.6 — authentification et utilisateurs
   ========================================================= */
.auth-locked > header,
.auth-locked > nav,
.auth-locked > main {
  filter: blur(2px);
  pointer-events: none;
  user-select: none;
}

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 35, 55, .62);
  backdrop-filter: blur(4px);
}
.auth-gate[hidden] { display: none; }
.auth-card {
  width: min(460px, 100%);
  padding: 30px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 25px 80px rgba(0, 0, 0, .28);
}
.auth-card h2 { margin: 0 0 8px; }
.auth-card [hidden] { display: none !important; }
.auth-mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 20px;
  padding: 5px;
  border-radius: 11px;
  background: #edf3f7;
}
.auth-mode-switch button {
  min-height: 38px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #31546c;
  font-weight: 700;
}
.auth-mode-switch button.active {
  background: #fff;
  color: #0f5f86;
  box-shadow: 0 2px 8px rgba(15, 95, 134, .15);
}
.auth-create-info {
  margin: 18px 0;
  padding: 16px;
  border: 1px solid #c8ddea;
  border-radius: 10px;
  background: #f3f9fc;
}
.auth-create-info p { margin: 8px 0 14px; }
.auth-card p { color: #617083; }
.auth-card label { display: grid; gap: 6px; margin: 15px 0; font-weight: 600; }
.auth-card input {
  width: 100%;
  min-height: 43px;
  padding: 10px 12px;
  border: 1px solid #bfcddb;
  border-radius: 8px;
  font: inherit;
}
.auth-card .primary { width: 100%; margin-top: 8px; }
body[data-role="read_only"] .primary,
body[data-role="read_only"] button.danger,
body[data-role="read_only"] .save-alert,
body[data-role="read_only"] #importButton,
body[data-role="read_only"] #mailCollectButton,
body[data-role="read_only"] #mailSyncButton,
body[data-role="read_only"] #backupDatabase,
body[data-role="read_only"] #createFullBackup,
body[data-role="read_only"] #saveNotificationSettings,
body[data-role="read_only"] #testNotification,
body[data-role="read_only"] #sendDailySummary {
  opacity: .45;
  pointer-events: none;
}

/* =========================================================
   Supervision v6.11.6 — connexion manuelle et gestion utilisateur
   ========================================================= */

.auth-login-hint {
  margin: 14px 0 0;
  padding: 10px 12px;
  border-radius: 9px;
  background: #eef6fb;
  color: #31546c !important;
  font-size: .83rem;
  line-height: 1.4;
}

.user-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 230px;
}

.warning-box {
  padding: 16px;
  border: 1px solid #e8bbb7;
  border-left: 5px solid #b42318;
  border-radius: 10px;
  background: #fff5f4;
}

.warning-box p:last-child {
  margin-bottom: 0;
}

.state-badge.info {
  margin-left: 6px;
  color: #125d7a;
  background: #dff1fa;
}



/* =========================================================
   Supervision v6.12.0 - documentation et centre d'aide
   ========================================================= */
.help-documentation-title { align-items: flex-start; gap: 18px; }
.documentation-version {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 999px;
  background: #e7f3f8;
  border: 1px solid #b7d4e1;
  color: #155d7e;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.help-purpose-grid,
.help-document-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.help-purpose-card,
.help-document-card {
  border: 1px solid #cedde6;
  border-radius: 12px;
  background: #f8fbfd;
  padding: 15px;
}
.help-purpose-card {
  display: grid;
  gap: 6px;
}
.help-purpose-card strong,
.help-document-card strong {
  color: #102a43;
  font-size: 15px;
}
.help-purpose-card span,
.help-document-card span {
  color: #526b7d;
  line-height: 1.45;
}
.help-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 16px;
  padding: 13px;
  border-radius: 12px;
  background: #102a43;
  color: #fff;
}
.help-flow span {
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .1);
  font-weight: 700;
}
.help-flow b { color: #7dd3fc; font-size: 18px; }
.help-daily-steps {
  margin: 14px 0 0;
  padding-left: 24px;
  display: grid;
  gap: 10px;
}
.help-daily-steps li {
  padding-left: 4px;
  color: #243f55;
  line-height: 1.45;
}
.help-document-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.help-document-card > div:first-child {
  display: grid;
  gap: 6px;
}
@media (max-width: 820px) {
  .help-purpose-grid,
  .help-document-grid { grid-template-columns: 1fr; }
  .help-document-card { align-items: flex-start; flex-direction: column; }
  .documentation-version { white-space: normal; }
}

/* =========================================================
   Ancienne interface 6.13.0 retirée en 6.14.1
   ========================================================= */
.history-toolbar{display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap;margin:0 0 14px;padding:10px 12px;border:1px solid #dce6ee;border-radius:10px;background:#f6f9fb}.history-storage-status{display:flex;flex-direction:column;gap:3px;color:#52657a;font-size:12px}.history-storage-status strong{color:#24364b;font-size:13px}.history-storage-status .storage-warning{color:#9b5e00;font-weight:700}.history-pagination-controls{display:flex;align-items:center;gap:8px;flex-wrap:wrap;color:#52657a;font-size:12px}.history-pagination-controls select{min-height:36px;padding:7px 9px;border:1px solid #bfcddb;border-radius:8px;background:#fff}.history-pagination-controls .secondary{padding:8px 11px}.history-pagination-controls #historyPageInfo{min-width:130px;text-align:center;font-weight:700;color:#34465a}
@media(max-width:760px){.history-toolbar{align-items:stretch}.history-storage-status,.history-pagination-controls{width:100%}.history-pagination-controls .secondary{width:auto;flex:1}.history-pagination-controls #historyPageInfo{order:3;width:100%}}

/* =========================================================
   Styles historiques non utilisés — v6.14.1
   ========================================================= */

.unknowns-panel .panel-title-row {
  align-items: flex-start;
}

.unknowns-summary {
  margin: 1rem 0;
}

.unknown-detection-note {
  margin: 0 0 1rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid #d7e2ea;
  border-radius: 10px;
  background: #f7fafc;
  color: #334155;
  font-size: 0.92rem;
}

.unknowns-filters {
  grid-template-columns: minmax(150px, 0.8fr) minmax(140px, 0.7fr) minmax(260px, 1.8fr) minmax(85px, 0.4fr);
}

.unknowns-table th,
.unknowns-table td {
  vertical-align: top;
}

.unknown-kind-badge {
  display: inline-flex;
  align-items: center;
  min-width: 108px;
  justify-content: center;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
}

.unknown-kind-badge.agent {
  background: #fff7d6;
  color: #7c5a00;
  border: 1px solid #ead98a;
}

.unknown-kind-badge.mail {
  background: #feeceb;
  color: #a12b24;
  border: 1px solid #f1b8b4;
}

.unknown-reasons {
  margin: 0;
  padding-left: 1rem;
  min-width: 220px;
}

.unknown-reasons li + li {
  margin-top: 0.25rem;
}

.unknown-actions {
  min-width: 150px;
}

.unknown-actions .compact-button {
  margin: 0 0.25rem 0.25rem 0;
}

.unknown-review-context {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
  padding: 0.8rem 0.9rem;
  border-radius: 10px;
  background: #f7fafc;
  border: 1px solid #d7e2ea;
}

.unknown-review-context span {
  color: #64748b;
  font-size: 0.9rem;
}

.editor-wide {
  grid-column: 1 / -1;
}

.unknowns-pagination {
  margin-top: 0.9rem;
}

@media (max-width: 1050px) {
  .unknowns-filters {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 680px) {
  .unknowns-filters {
    grid-template-columns: 1fr;
  }
}

.unknown-summary-warning { background: #fff8e9; border-color: #eed29a; }
.unknown-summary-warning strong { color: #9a6500; }
.unknown-summary-error { background: #fff0ef; border-color: #efbbb7; }
.unknown-summary-error strong { color: #a12b24; }
.unknown-summary-success { background: #eef9f4; border-color: #bce0cf; }
.unknown-summary-success strong { color: #15744f; }
.unknown-summary-neutral { background: #eef5fb; border-color: #c9dbea; }
.unknown-summary-neutral strong { color: #245b7a; }
.unknown-summary-muted { background: #f3f5f7; border-color: #d8dee5; }
.unknown-summary-muted strong { color: #64748b; }

/* v6.14.1 — sécurité de l'authentification */
.auth-link-button {
  border: 0;
  background: transparent;
  color: var(--primary, #2563eb);
  text-decoration: underline;
  cursor: pointer;
  padding: 0.5rem;
  font: inherit;
}
.auth-link-button:hover,
.auth-link-button:focus-visible {
  text-decoration-thickness: 2px;
}

/* v6.15.0 - historique complet et diagnostic IMAP */
.backup-history-filters label{display:flex;flex-direction:column;gap:4px;font-size:12px;color:#52657a}.backup-history-filters label select,.backup-history-filters label input{min-width:170px}.backup-history-filters .backup-history-search-label{flex:1;min-width:260px}.backup-history-summary{margin:4px 0 16px}.backup-history-summary-item.success{background:#eef9f4}.backup-history-summary-item.warning{background:#fff8e9}.backup-history-summary-item.error{background:#fff3f2}.backup-history-pagination{justify-content:flex-end;margin-top:14px}.backup-history-groups{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.backup-history-group{display:grid;grid-template-columns:minmax(220px,1fr) auto auto;align-items:center;gap:16px;padding:14px 16px;border:1px solid #d7e2ec;border-radius:10px;background:#f8fbfd}.backup-history-group>div:first-child{display:flex;flex-direction:column;gap:3px}.backup-history-group-label{font-size:11px;text-transform:uppercase;color:#718096}.backup-history-group small{color:#64748b}.backup-history-group-counts{display:flex;gap:7px;flex-wrap:wrap}.backup-history-group-counts span{padding:5px 8px;border-radius:999px;font-size:11px;font-weight:700}.backup-history-group-counts .success{background:#dff3e9;color:#0f6b4a}.backup-history-group-counts .warning{background:#fff0cc;color:#8a5900}.backup-history-group-counts .error{background:#f8d9d6;color:#8e2119}.backup-history-table td small{display:block;color:#64748b;margin-top:3px;max-width:420px}.mail-test-result{border-left:5px solid #17658c;padding:4px 0 4px 16px}.mail-test-result.success{border-left-color:#168a63}.mail-test-result.error{border-left-color:#c83f34}.mail-test-result dl{display:grid;grid-template-columns:190px 1fr;gap:8px 14px}.mail-test-result dt{font-weight:700}.mail-test-result dd{margin:0}.mail-test-inline{margin-top:8px}@media(max-width:980px){.backup-history-groups{grid-template-columns:1fr}.backup-history-group{grid-template-columns:1fr}.backup-history-pagination{justify-content:flex-start}}


/* v6.16.0 - actions Import Excel / Récupération mail dans la barre supérieure */
.top-actions .quick-action-button{white-space:nowrap}
.quick-action-dialog{display:flex;flex-direction:column;gap:16px}
.quick-action-intro{margin:0;color:#64748b}
.quick-action-controls{margin:0}
.quick-action-dialog .message{margin:0}
.modal-card:has(.excel-import-dialog){width:min(700px,100%)}
.modal-card:has(.mail-recovery-dialog){width:min(1220px,100%)}
.mail-recovery-dialog .mail-sync-status{margin-top:0}
@media(max-width:760px){
  .top-actions .quick-action-button{flex:1 1 auto}
  .quick-action-controls{align-items:stretch}
  .quick-action-controls input,
  .quick-action-controls button{width:100%}
}
