/* Elunis CORE reprend les mêmes palettes que l'ERP, avec ses propres composants.
   La coquille (barre latérale, barre haute) est décrite dans mood_control.css. */
.mc-brand-logo-light { display:none; }

/* La barre latérale suit la luminosité du thème, comme le logo transparent. */
html:is([data-theme="elunis_light"], [data-theme="elunis_azure"], [data-theme="elunis_lagoon"], [data-theme="elunis_dawn"], [data-theme="elunis_orchid"], [data-theme="elunis_plum_mid"], [data-theme="elunis_emerald_mid"]) {
  .mc-sidebar { background:var(--sidebar-bg); color:var(--ink); border-right:1px solid var(--line); scrollbar-color:var(--line) transparent; }
  .mc-brand { color:var(--ink); }
  .mc-brand-logo-light { display:block; }
  .mc-brand-logo-dark { display:none; }
  .mc-brand small, .control-nav-title, .mc-sidebar-footer { color:var(--muted); }
  .mc-sidebar .control-nav a { color:var(--ink); }
  .mc-sidebar .control-nav a:hover { background:var(--blue-soft); color:var(--blue); }
  .mc-sidebar .control-nav a.active { background:var(--surface); color:var(--blue); box-shadow:inset 3px 0 var(--elunis-primary); }
  .mc-sidebar-footer { border-color:var(--line); }
}

html[data-theme^="elunis_"] {
  --navy:var(--elunis-primary);
  --purple:var(--blue);
  --purple2:var(--elunis-secondary);
  --warning:var(--warn);
}
html[data-theme^="elunis_"] .list-row-action:hover { background:var(--blue-soft); color:var(--blue); }
html[data-theme^="elunis_"] .card { background:var(--surface); box-shadow:var(--shadow); }
html[data-theme^="elunis_"] th { background:var(--surface-alt); }
html[data-theme^="elunis_"] .badge,
html[data-theme^="elunis_"] .role-badge { background:var(--blue-soft); color:var(--blue); }
html[data-theme^="elunis_"] .active { color:var(--success); }
html[data-theme^="elunis_"] .warning { color:var(--warn); }
html[data-theme^="elunis_"] .button,
html[data-theme^="elunis_"] button { background:var(--mc-action-blue,var(--blue)); color:var(--button-ink); }
html[data-theme^="elunis_"] .secondary { background:var(--surface-alt); color:var(--ink); }
html[data-theme^="elunis_"] input,
html[data-theme^="elunis_"] select,
html[data-theme^="elunis_"] textarea { border-color:var(--input-border); background:var(--surface); color:var(--ink); }
html[data-theme^="elunis_"] :is(a,button,input,select,textarea,summary):focus-visible { outline-color:var(--blue); }
html[data-theme^="elunis_"] .messages li { background:var(--success-soft); color:var(--success); }
html[data-theme^="elunis_"] .messages li.error { background:var(--danger-soft); color:var(--danger); }
html[data-theme^="elunis_"] .messages li.warning { background:var(--warn-soft); color:var(--warn); }
html[data-theme^="elunis_"] .messages li.info { background:var(--info-soft); color:var(--info); }
html[data-theme^="elunis_"] .sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
html[data-theme^="elunis_"] .mood-theme-switcher select { width:auto; min-width:175px; max-width:215px; padding:7px 9px; font-size:.84rem; }

/* Fonds sombres pour la navigation, tandis que le bleu clair reste lisible
   sur les cartes et les champs. */
html:is([data-theme="elunis_lunar_core"], [data-theme="elunis_moonlight"], [data-theme="elunis_orbital_night"], [data-theme="elunis_celestial"], [data-theme="elunis_beyond_blue"]) {
  --mc-sidebar-bg:linear-gradient(180deg,var(--sidebar-bg),var(--bg));
  --mc-action-blue:var(--elunis-primary);
  --blue:var(--elunis-secondary);
}
html:is([data-theme="elunis_lunar_core"], [data-theme="elunis_moonlight"], [data-theme="elunis_orbital_night"], [data-theme="elunis_celestial"], [data-theme="elunis_beyond_blue"]) :is(.mc-avatar,.mc-tabs a[aria-current="page"],.mc-progress span,.mc-timeline-dot) {
  background:var(--elunis-primary);
}
html:is([data-theme="elunis_lunar_core"], [data-theme="elunis_moonlight"], [data-theme="elunis_orbital_night"], [data-theme="elunis_celestial"], [data-theme="elunis_beyond_blue"]) a.card:hover {
  background:var(--surface-hover);
}
html:is([data-theme="elunis_lunar_core"], [data-theme="elunis_moonlight"], [data-theme="elunis_orbital_night"], [data-theme="elunis_celestial"], [data-theme="elunis_beyond_blue"]) .mc-login-page {
  background:radial-gradient(900px 430px at 10% -10%,color-mix(in srgb,var(--elunis-accent) 12%,transparent),transparent),var(--bg);
}


/* Les panneaux des écrans Mood héritent aussi de la surface active. */
html[data-theme^="elunis_"] :is(
  .form-section,.flags-section,.advanced-options,.deployment-info-item,
  .internal-company-row,.module-kpi,.list-view,.module-row,.peppol-section,
  .peppol-option,.peppol-actions,.peppol-next,.peppol-steps li,
  .provisioning-dialog,.provisioning-steps,.catalog-quick-dialog,
  .client-identity,.subscription-setup,.creation-details,.auto-generated-note,
  .base-line,.included-line,.notice,.result pre
) { background:var(--surface-alt); color:var(--ink); }
html[data-theme^="elunis_"] :is(.list-view th,.plan-feature-lists table th) { background:var(--surface-alt); }
html[data-theme^="elunis_"] :is(.peppol-section-number,.peppol-section-heading>span,.role-billing,.peppol-status,.peppol-capabilities span) { background:var(--blue-soft); color:var(--blue); }
html[data-theme^="elunis_"] :is(.active-badge,.tenant-availability.is-available,.peppol-status.is-enabled,.role-support) { background:var(--success-soft); color:var(--success); }
html[data-theme^="elunis_"] :is(.inactive-badge,.tenant-availability.is-conflict,.peppol-errors,.peppol-form-errors,.notice.error) { background:var(--danger-soft); color:var(--danger); }
html[data-theme^="elunis_"] .tenant-availability.is-warning { background:var(--warn-soft); color:var(--warn); }



/* Variantes de boutons de la coquille : elles doivent l'emporter sur la couleur de thème. */
html[data-theme^="elunis_"] :is(.button,button).ghost { background:transparent; color:var(--blue); border-color:transparent; }
html[data-theme^="elunis_"] :is(.button,button).ghost:hover { background:var(--blue-soft); }
html[data-theme^="elunis_"] :is(.button,button).danger { background:var(--danger); color:#fff; }
html[data-theme^="elunis_"] .nav-toggle { background:var(--surface-alt); color:var(--ink); }

/* Le rouge clair des statuts demande un libellé foncé sur un bouton plein. */
html:is([data-theme="elunis_lunar_core"], [data-theme="elunis_moonlight"], [data-theme="elunis_orbital_night"], [data-theme="elunis_celestial"], [data-theme="elunis_beyond_blue"]) :is(.button,button).danger {
  color:var(--bg);
}
html[data-theme="elunis_orbital_night"] {
  --blue:var(--elunis-accent);
}
