/* LE CERVEAU v95 — Prune nocturne + Brume prune
   Cette couche remplace uniquement les anciennes surfaces bleues de la DA.
   Les couleurs métier (citron, succès, alerte, priorité) restent inchangées. */
:root {
  --prune-night: #37223f;
  --prune-night-soft: #5a385f;
  --prune-mist: #e9ddea;
  --prune-mist-soft: #f5eef5;
  --prune-mist-hover: #f1e7f2;
  --prune-border: #e3d4e5;
  --prune-muted: #705875;
  --prune-ice: #fbf8fb;
}

/* Aplats foncés : héros, résumés et espaces d'accès. */
.welcome,
.context-hero,
.settings-hero,
.murgier-hero,
.followups-hero,
.credit-notes-summary,
.deposit-summary,
.subcontract-hero,
.client-detail-hero,
.referral-code-card {
  color: #fff !important;
  background:
    radial-gradient(circle at 86% 12%, rgba(216, 244, 60, .14), transparent 28%),
    linear-gradient(125deg, var(--prune-night-soft), var(--prune-night)) !important;
  box-shadow: 0 16px 36px rgba(55, 34, 63, .19) !important;
}

.welcome .eyebrow,
.context-hero .eyebrow,
.settings-hero .eyebrow,
.murgier-hero .eyebrow,
.followups-hero .eyebrow,
.credit-notes-summary .eyebrow,
.deposit-summary .eyebrow,
.subcontract-hero .eyebrow,
.client-detail-hero .eyebrow {
  color: var(--ginger) !important;
}

.welcome p:last-child,
.context-hero p:last-child,
.settings-hero p:last-child,
.murgier-hero p:last-child,
.followups-hero p:last-child,
.credit-notes-summary p:last-child,
.deposit-summary p,
.subcontract-hero p:last-child,
.client-detail-hero p:last-child,
.referral-code-card span {
  color: #eadfeb !important;
}

.cooling-rule-icon {
  color: var(--ginger);
  background: var(--prune-night);
  box-shadow: 0 8px 20px rgba(55, 34, 63, .16);
}

.saas-auth,
.login-shell,
.subscription-blocked {
  background:
    radial-gradient(circle at 12% 8%, rgba(216, 244, 60, .12), transparent 30%),
    var(--prune-night) !important;
}

.login-visual {
  background:
    radial-gradient(circle at 70% 70%, rgba(216, 244, 60, .12), transparent 30%),
    linear-gradient(145deg, var(--prune-night-soft), var(--prune-night)) !important;
}

.saas-auth-brand h1 em,
.login-copy h1 em,
.login-pill {
  color: var(--ginger) !important;
}

.saas-auth-brand > p,
.login-copy > p {
  color: #e4d9e6 !important;
}

.login-pill {
  border-color: rgba(216, 244, 60, .36) !important;
  background: rgba(216, 244, 60, .08) !important;
}

.super-admin-side {
  background: var(--prune-night) !important;
}

.super-admin-side nav button.active {
  border-color: var(--prune-mist) !important;
  background: rgba(233, 221, 234, .17) !important;
  box-shadow: inset 3px 0 var(--ginger) !important;
}

/* Navigation claire : Brume prune remplace l'ancien bleu pastel. */
.app-shell aside {
  color: var(--prune-night) !important;
  background: linear-gradient(180deg, var(--prune-mist-soft), var(--prune-mist)) !important;
  border-color: var(--prune-border) !important;
  box-shadow: 8px 0 28px rgba(55, 34, 63, .07) !important;
}

.side-brand strong,
.user-block strong {
  color: var(--prune-night) !important;
}

.side-brand span,
.user-block span {
  color: var(--prune-muted) !important;
}

.app-shell aside nav {
  scrollbar-color: rgba(90, 56, 95, .28) transparent;
}

.app-shell aside nav::-webkit-scrollbar-thumb {
  background: rgba(90, 56, 95, .28);
  background-clip: padding-box;
}

.app-shell aside nav::-webkit-scrollbar-thumb:hover {
  background: rgba(90, 56, 95, .44);
  background-clip: padding-box;
}

.app-shell aside nav button {
  color: var(--prune-muted) !important;
}

.app-shell aside nav button > span,
.app-shell aside nav button .nav-drag {
  color: #8b6d90;
}

.app-shell aside nav button:hover {
  color: var(--prune-night) !important;
  border-color: rgba(90, 56, 95, .12) !important;
  background: rgba(255, 255, 255, .52) !important;
}

.app-shell aside nav button.active {
  color: var(--prune-night) !important;
  border-color: #d9c6dc !important;
  background: var(--prune-mist) !important;
  box-shadow: 0 7px 18px rgba(55, 34, 63, .13) !important;
}

.app-shell aside nav button.active > span:first-child,
.app-shell aside nav button.active .nav-drag {
  color: var(--ginger) !important;
}

.user-block {
  border-color: #d8c8db !important;
}

.avatar {
  color: #fff !important;
  background: var(--prune-night-soft) !important;
}

.group-view-toggle input:checked + .group-view-switch::after,
.deposit-supplier-toggles input:checked + i,
.group-operations-tabs button.active span {
  background: var(--prune-night) !important;
}

.user-block button,
.sidebar-toggle,
.tablet-nav-toggle,
.mobile-nav-toggle {
  color: var(--prune-muted) !important;
}

.sidebar-toggle,
.tablet-nav-toggle {
  border-color: #dacbdd !important;
  background: rgba(255, 255, 255, .54) !important;
}

.sidebar-toggle:hover,
.tablet-nav-toggle:hover {
  color: var(--prune-night) !important;
  background: #fff !important;
}

/* Brume prune sur les surfaces secondaires auparavant bleu pastel. */
.tabs,
.hygiene-tabs,
.zone-filter,
.supplier-hub-tabs,
.followup-mode-tabs,
.group-filters {
  border-color: var(--prune-border) !important;
  background: var(--prune-mist) !important;
}

.cooling-rule,
.group-view-admin-visibility,
.deposit-validation {
  border-color: var(--prune-border) !important;
  background: linear-gradient(135deg, var(--prune-mist), var(--prune-ice)) !important;
}

.group-view-switch {
  background: #d8cbd9 !important;
}

.group-view-toggle input:checked + .group-view-switch {
  background: var(--ginger) !important;
}

.date-chip,
.date-chip.admin-chip,
.count,
.credit-notes-summary > span,
.doc-icon,
.doc-icon.photo-icon,
.event-count,
.security-archive-badge,
.group-readonly-badge,
.group-ops-card footer span,
.group-table-head,
.role-visibility-head,
.permission-head,
.client-head,
.stock-list-head,
.murgier-head,
.followup-month > header,
.group-task-lists article,
.group-mini-metrics article,
.group-attention b,
.group-ops-table article {
  border-color: var(--prune-border) !important;
  background: var(--prune-mist) !important;
}

.murgier-category h4,
.stock-import,
.archive-category-filter,
.deposit-supplier-toggles label,
.group-operations-tabs button,
.subcontract-tabs button,
.group-restaurant-row.selected,
.brain-time-preview,
.workspace-profile-footer button,
.supplier-memo-modal #add-supplier-schedule {
  border-color: var(--prune-border) !important;
  background: var(--prune-mist-soft) !important;
}

.settings-section button:not(.primary):not(.close):not(.quantity-stepper button),
.admin-config button,
.task-edit-actions button,
.murgier-admin-inline button,
.config-row > button,
.record-actions button,
.document-actions button,
.archive-period-reset,
.brain-date-head > button,
.brain-date-actions button {
  color: var(--prune-night) !important;
  border-color: #dacbdd !important;
  background: var(--prune-mist) !important;
}

.settings-section button:hover,
.admin-config button:hover,
.task-edit-actions button:hover,
.murgier-admin-inline button:hover,
.config-row > button:hover,
.record-actions button:hover,
.document-actions button:hover,
.archive-period-reset:hover,
.brain-date-head > button:hover,
.brain-date-actions button:hover {
  border-color: #c9b2cd !important;
  background: var(--prune-mist-hover) !important;
}

.brain-date-picker,
.brain-time-picker {
  border-color: #d7c6da !important;
  background: var(--prune-ice) !important;
  box-shadow: 0 28px 70px rgba(55, 34, 63, .24) !important;
}

.brain-date-day:hover,
.brain-date-day.today {
  border-color: #cfb8d3 !important;
  background: var(--prune-mist) !important;
}

.brain-time-wheels select {
  border-color: #d7c6da !important;
  background: linear-gradient(var(--prune-mist), #fff 38%, #fff 62%, var(--prune-mist)) !important;
}

.drag-selected,
.murgier-row.active {
  outline-color: #b99abe !important;
  background: var(--prune-mist-soft) !important;
}

.nav-drop-target {
  box-shadow: inset 0 2px var(--prune-night-soft) !important;
}

.super-admin-shell,
.support-preview {
  background: #f4eff5 !important;
}

@media (max-width: 1100px) {
  .app-shell aside,
  .app-shell.sidebar-collapsed aside {
    border-color: var(--prune-border) !important;
    box-shadow: 8px 0 28px rgba(55, 34, 63, .08) !important;
  }
}

@media (max-width: 700px) {
  .app-shell aside,
  .app-shell.sidebar-collapsed aside {
    border-color: var(--prune-border) !important;
    box-shadow: 0 -8px 28px rgba(55, 34, 63, .1) !important;
  }

  .mobile-nav-expanded .mobile-nav-toggle {
    border-color: var(--prune-border) !important;
    background: var(--prune-mist-soft) !important;
  }
}
