/**
 * Thème sombre — activé par `html[data-theme="dark"]` (voir js/app-theme.js).
 * Variables héritées par le dashboard ; surfaces principales recolorées.
 */
html[data-theme="dark"] {
  color-scheme: dark;
  /* Même gris que la sidebar : gouttières page + zone derrière le shell arrondi */
  background: #101012;
  --app-ui-border: #2e2e32;
  --xyz-pastel-blue: #1e2a3d;
  --xyz-pastel-cyan: #1a3036;
  --app-accent-blue: #243044;
  /* Même bleu iOS que le dashboard clair / Settings (#007aff), pas le turquoise */
  --app-upgrade-text: #007aff;
  --app-upgrade-rgb: 0, 122, 255;
  --app-upgrade-bg: rgba(0, 122, 255, 0.14);
  --app-upgrade-bg-hover: rgba(0, 122, 255, 0.22);
  --app-usage-progress-fill: var(--app-upgrade-text);
  --xyz-tour-deep-a: #1a2433;
  --xyz-tour-deep-b: #162830;
  --xyz-tour-deep-c: #152028;
  --xyz-stroke-blue: #3d5566;
}

html[data-theme="dark"] body {
  background: #101012;
  color: #e8e8ed;
}

/* Dégradé coin page (clair) : en sombre il cassait l’unité avec la sidebar */
html[data-theme="dark"] body::after {
  opacity: 0;
  pointer-events: none;
}

/* ——— Dashboard ——— */
html[data-theme="dark"] .dashboard-layout,
html[data-theme="dark"] .dashboard-shell-outer {
  background: #101012;
}

html[data-theme="dark"] .app-sidebar {
  background: #101012;
}

html[data-theme="dark"] .dashboard-shell {
  background: #141416;
  border-color: var(--app-ui-border);
  color: #e8e8ed;
}

html[data-theme="dark"] .navbar {
  background: #141416;
  color: #e8e8ed;
}

html[data-theme="dark"] .navbar-shell-header-title,
html[data-theme="dark"] .shell-header-title {
  color: #e8e8ed;
}

html[data-theme="dark"] .app-sidebar-panel,
html[data-theme="dark"] .app-sidebar-inner {
  background: #101012;
  color: #e8e8ed;
}

html[data-theme="dark"] .app-sidebar-header {
  border-color: var(--app-ui-border);
}

html[data-theme="dark"] .app-sidebar-footer-btn,
html[data-theme="dark"] #app-sidebar-primary-tabs a.app-sidebar-tab:link,
html[data-theme="dark"] #app-sidebar-primary-tabs a.app-sidebar-tab:visited,
html[data-theme="dark"] .app-sidebar-footer a.app-sidebar-footer-btn:link,
html[data-theme="dark"] .app-sidebar-footer a.app-sidebar-footer-btn:visited {
  color: #ffffff;
}

html[data-theme="dark"] .app-sidebar-footer-btn-icon {
  stroke: #e8e8ed;
}

/* Onglets & liens footer : en clair le hover est #f3f4f6 — ici surface sombre lisible */
html[data-theme="dark"] .app-sidebar-footer-btn:hover {
  background: #252528;
}

html[data-theme="dark"] .app-sidebar-footer-btn:active {
  background: #2f2f33;
}

html[data-theme="dark"] .app-sidebar-footer-btn.app-sidebar-tab--active:hover,
html[data-theme="dark"] #app-sidebar-tabs a.app-sidebar-tab.app-sidebar-tab--active:hover,
html[data-theme="dark"] #app-sidebar-notes-list a.app-sidebar-tab.app-sidebar-tab--active:hover {
  background: #2f2f33;
}

/* Libellés des onglets : en clair ils restent #111 et masquent l’héritage du parent */
html[data-theme="dark"] .app-sidebar-footer-btn-label {
  color: #ffffff;
}

html[data-theme="dark"] .app-sidebar-tab--logout {
  color: #f87171;
}

html[data-theme="dark"] .app-sidebar-tab--logout:hover {
  background: rgba(248, 113, 113, 0.12);
  color: #fca5a5;
}

html[data-theme="dark"] .app-sidebar-tab--logout .app-sidebar-footer-btn-label {
  color: inherit;
}

html[data-theme="dark"] .app-sidebar-tab--logout .app-sidebar-footer-btn-icon {
  stroke: currentColor;
}

html[data-theme="dark"] .app-sidebar-notes-create-btn {
  background: #1c1c1f;
  border-color: var(--app-ui-border);
  color: #ffffff;
}

html[data-theme="dark"] .app-sidebar-notes-create-btn:hover {
  background: #252528;
  border-color: #3f3f46;
}

html[data-theme="dark"] #app-sidebar-tabs a.app-sidebar-tab:link,
html[data-theme="dark"] #app-sidebar-tabs a.app-sidebar-tab:visited {
  color: #ffffff;
}

html[data-theme="dark"] #app-sidebar-tabs .app-sidebar-tab-pct {
  color: #e5e7eb;
}

html[data-theme="dark"] .app-sidebar-tab-sub {
  color: #d1d5db;
}

html[data-theme="dark"] .app-sidebar-tabs a.app-sidebar-tab.app-sidebar-tab--active,
html[data-theme="dark"] #app-sidebar-notes-list a.app-sidebar-tab.app-sidebar-tab--active {
  background: #252528;
}

html[data-theme="dark"] .app-sidebar-usage {
  background: #18181b;
  border-color: var(--app-ui-border);
}

html[data-theme="dark"] .app-sidebar-usage-title,
html[data-theme="dark"] .app-sidebar-usage-remaining-label,
html[data-theme="dark"] .app-sidebar-usage-remaining-value {
  color: #e8e8ed;
}

html[data-theme="dark"] button.app-sidebar-usage-details-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #e8e8ed;
}

html[data-theme="dark"] button.app-sidebar-usage-details-toggle:focus-visible {
  outline: 2px solid #a1a1aa;
  outline-offset: 2px;
}

html[data-theme="dark"] .app-sidebar-user-trigger:hover {
  background: #252528;
}

/* Logo / lien Agent à gauche du « + » : hover & focus comme le reste de la rangée */
html[data-theme="dark"] a.app-sidebar-brand {
  background: transparent;
}

html[data-theme="dark"] a.app-sidebar-brand:hover {
  background: #252528;
}

html[data-theme="dark"] a.app-sidebar-brand:active {
  background: #2f2f33;
}

html[data-theme="dark"] a.app-sidebar-brand:focus-visible {
  outline: 2px solid #a1a1aa;
  outline-offset: 2px;
}

html[data-theme="dark"] .app-sidebar-user-quick-btn {
  background: #252528;
  color: #ffffff;
}

html[data-theme="dark"] .app-sidebar-user-quick-btn:hover {
  background: #2f2f33;
}

html[data-theme="dark"] .app-sidebar-user-quick-btn:focus-visible {
  outline: 2px solid #a1a1aa;
  outline-offset: 2px;
}

html[data-theme="dark"] .app-sidebar-account-search-panel {
  background: #18181b;
  border-color: var(--app-ui-border);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  color: #e8e8ed;
}

html[data-theme="dark"] .dashboard-pricing-overlay-shell {
  box-shadow:
    0 6px 20px rgba(0, 0, 0, 0.22),
    0 1px 4px rgba(0, 0, 0, 0.12);
}

html[data-theme="dark"] .dashboard-settings-2fa-titlebar {
  border-bottom-color: var(--app-ui-border);
}

html[data-theme="dark"] .dashboard-settings-2fa-title {
  color: #e8e8ed;
}

html[data-theme="dark"] .dashboard-settings-2fa-body {
  background: #18181b;
}

html[data-theme="dark"] .dashboard-settings-2fa-fallback {
  color: #9ca3af;
}

html[data-theme="dark"] .dashboard-settings-2fa-verify-lead {
  color: #9ca3af;
}

html[data-theme="dark"] .dashboard-settings-2fa-otp-cell {
  background: #27272a;
  border-color: var(--app-ui-border);
  color: #e8e8ed;
}

html[data-theme="dark"] .dashboard-settings-2fa-otp-cell:focus {
  border-color: #a1a1aa;
  background: #18181b;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .dashboard-settings-2fa-verify-error {
  color: #f87171;
}

html[data-theme="dark"] .app-sidebar-account-search-cmdbar,
html[data-theme="dark"] .app-sidebar-account-search-tabs,
html[data-theme="dark"] .app-sidebar-account-search-results-wrap,
html[data-theme="dark"] .app-sidebar-account-search-footer {
  background: #18181b;
}

html[data-theme="dark"] .app-sidebar-account-search-cmdbar {
  border-bottom-color: var(--app-ui-border);
}

html[data-theme="dark"] .app-sidebar-account-search-input {
  color: #e8e8ed;
  background: transparent;
}

html[data-theme="dark"] .app-sidebar-account-search-input::placeholder {
  color: #9ca3af;
}

html[data-theme="dark"] .app-sidebar-account-search-kbd {
  color: #9ca3af;
  background: #27272a;
  border-color: var(--app-ui-border);
}

html[data-theme="dark"] .app-sidebar-account-search-tab {
  color: #9ca3af;
}

html[data-theme="dark"] .app-sidebar-account-search-tab:hover {
  color: #e8e8ed;
}

html[data-theme="dark"] .app-sidebar-account-search-tab--selected {
  color: #e8e8ed;
  background: #27272a;
  border-color: var(--app-ui-border);
}

html[data-theme="dark"] .app-sidebar-account-search-tab:focus-visible {
  outline-color: #a1a1aa;
}

html[data-theme="dark"] .app-sidebar-account-search-group-heading {
  color: #9ca3af;
}

html[data-theme="dark"] .app-sidebar-account-search-item {
  color: #e8e8ed;
}

html[data-theme="dark"] .app-sidebar-account-search-item:hover {
  background: rgba(39, 39, 42, 0.85);
}

html[data-theme="dark"] .app-sidebar-account-search-item--selected,
html[data-theme="dark"] .app-sidebar-account-search-item--selected:hover {
  background: #27272a;
}

html[data-theme="dark"] .app-sidebar-account-search-item:focus-visible {
  outline-color: #a1a1aa;
}

html[data-theme="dark"] .app-sidebar-account-search-item-icon {
  color: #9ca3af;
}

html[data-theme="dark"] .app-sidebar-account-search-empty {
  color: #9ca3af;
}

html[data-theme="dark"] .app-sidebar-account-search-footer {
  border-top-color: var(--app-ui-border);
}

html[data-theme="dark"] .app-sidebar-account-search-footer-hint span {
  color: #9ca3af;
}

html[data-theme="dark"] .app-sidebar-account-search-footer-sep {
  background: var(--app-ui-border);
}

html[data-theme="dark"] .app-sidebar-account-search-footer-open {
  color: #e8e8ed;
  background: #18181b;
  border-color: var(--app-ui-border);
}

html[data-theme="dark"] .app-sidebar-account-search-footer-open:hover {
  background: #27272a;
}

html[data-theme="dark"] .app-sidebar-account-search-footer-open:focus-visible {
  outline-color: #a1a1aa;
}

html[data-theme="dark"] .app-sidebar-account-search-footer-open-label {
  color: #9ca3af;
}

html[data-theme="dark"] .app-sidebar-user-trigger-labels .app-sidebar-title-text {
  color: #e8e8ed;
}

html[data-theme="dark"] .app-sidebar-user-trigger-email,
html[data-theme="dark"] .app-sidebar-section-title {
  color: #9ca3af;
}

html[data-theme="dark"] .dashboard-welcome {
  color: #e8e8ed;
}

html[data-theme="dark"] .welcome-home-prompt-input {
  color: #e8e8ed;
  background: transparent;
}

html[data-theme="dark"] .welcome-home-agent {
  /* Fond = celui de la page (shell) ; seuls la carte + le compose ont un gris plus pâle */
  background: transparent;
  border-color: transparent;
}

html[data-theme="dark"] .welcome-home-free-plan-pill {
  --welcome-free-pill-bg: rgba(235, 235, 245, 0.08);
  --welcome-free-pill-bg-hover: rgba(235, 235, 245, 0.13);
  --welcome-free-pill-text: #d1d1d6;
  --welcome-free-pill-sep: rgba(235, 235, 245, 0.38);
  background: var(--welcome-free-pill-bg);
  border: none;
  color: var(--welcome-free-pill-text);
}

html[data-theme="dark"] .welcome-home-free-plan-pill__sep {
  color: var(--welcome-free-pill-sep);
}

html[data-theme="dark"] .welcome-home-free-plan-pill__label {
  color: var(--welcome-free-pill-text);
  -webkit-text-fill-color: var(--welcome-free-pill-text);
}

html[data-theme="dark"] a.welcome-home-free-plan-pill__cta,
html[data-theme="dark"] button.welcome-home-free-plan-pill__cta {
  background-image: linear-gradient(
    105deg,
    var(--app-upgrade-text) 0%,
    var(--app-upgrade-text) 36%,
    color-mix(in srgb, var(--app-upgrade-text) 78%, #003d99) 44%,
    color-mix(in srgb, var(--app-upgrade-text) 52%, #a8cfff) 50%,
    color-mix(in srgb, var(--app-upgrade-text) 72%, #001a66) 56%,
    var(--app-upgrade-text) 64%,
    var(--app-upgrade-text) 100%
  );
}

html[data-theme="dark"] .welcome-home-preset {
  background: #1f1f23;
  border-color: var(--app-ui-border);
  color: #e8e8ed;
}

html[data-theme="dark"] .welcome-home-preset:hover {
  background: #2a2a2f;
}

html[data-theme="dark"] .welcome-home-preset[aria-pressed="true"] {
  border-color: rgba(var(--app-upgrade-rgb), 0.42);
  background: var(--app-upgrade-bg);
  color: var(--app-upgrade-text);
}

html[data-theme="dark"] .welcome-home-preset[aria-pressed="true"]:hover {
  background: var(--app-upgrade-bg-hover);
  color: var(--app-upgrade-text);
}

html[data-theme="dark"] .welcome-action-btn-sublabel {
  color: #9ca3af;
}

html[data-theme="dark"] .dashboard-home-ai-chat-panel,
html[data-theme="dark"] .dashboard-colleague-panel {
  background: #141416;
  border-color: var(--app-ui-border);
}

html[data-theme="dark"] .dashboard-home-ai-chat-row,
html[data-theme="dark"] .dashboard-discussion-row {
  border-color: var(--app-ui-border);
}

html[data-theme="dark"] .dashboard-home-ai-chat-row:hover,
html[data-theme="dark"] .dashboard-discussion-row:hover {
  background: #1c1c20;
}

html[data-theme="dark"] #dashboard-workspace {
  background: #141416;
}

/* Même surface que .dashboard-shell : quiz, fiches, etc. (plus de bande #1a1a1d) */
html[data-theme="dark"] .dashboard-workspace-iframe {
  background: #141416;
  color-scheme: dark;
}

/* Chat collègue : aligné sur le shell + vues workspace */
html[data-theme="dark"] .dashboard-shell.dashboard-shell--colleague-chat #dashboard-workspace,
html[data-theme="dark"] .dashboard-shell.dashboard-shell--colleague-chat .dashboard-workspace-iframe {
  background: #141416;
}

/* Tiroir Ask AI : même fond que le shell (bordure gauche déjà --app-ui-border) */
html[data-theme="dark"] .dashboard-game-ai-drawer,
html[data-theme="dark"] .dashboard-game-ai-drawer-inner {
  background: #141416;
}

/* Scroll vertical mobile : piste assortie au fond du shell */
@media (max-width: 768px) {
  html[data-theme="dark"] .dashboard-shell-main-gutter > main.container {
    scrollbar-color: #3f3f46 #141416;
  }

  html[data-theme="dark"] .dashboard-shell-main-gutter > main.container::-webkit-scrollbar-corner {
    background: #141416;
  }
}

/* Accueil : carte ext. + zone prompt = gris un peu plus pâle que le fond page (#141416) */
html[data-theme="dark"] .welcome-home-agent-card {
  --welcome-home-agent-card-surface: #1a1a1d;
}

html[data-theme="dark"] .welcome-home-agent-card::after {
  background: linear-gradient(
    to bottom right,
    var(--app-ui-border) 0%,
    var(--welcome-home-agent-card-surface) 48%,
    var(--welcome-home-agent-card-surface) 100%
  );
}

html[data-theme="dark"] .welcome-home-agent-head {
  color: #a1a1aa;
}

html[data-theme="dark"] .welcome-home-agent-compose {
  color: #e8e8ed;
  background: #252528;
}

html[data-theme="dark"] .welcome-home-mobile-more-menu {
  background: #1a1a1d;
  border-color: var(--app-ui-border);
  box-shadow: none;
}

html[data-theme="dark"] .welcome-home-mobile-more-item {
  color: #e8e8ed;
}

html[data-theme="dark"] .welcome-home-mobile-more-item:hover {
  background: #252528;
}

html[data-theme="dark"] .welcome-home-mobile-more-item:active {
  background: #2a2a30;
}

/* Compose agent : pièces jointes, plugins, envoi, micro (+ menu plugins) */
html[data-theme="dark"] .welcome-home-send-btn,
html[data-theme="dark"] .welcome-home-attach-btn {
  background: #1f1f23;
  color: #e8e8ed;
}

html[data-theme="dark"] .welcome-home-send-btn:hover,
html[data-theme="dark"] .welcome-home-attach-btn:hover {
  background: #2a2a2f;
}

html[data-theme="dark"] .welcome-home-send-btn:focus-visible,
html[data-theme="dark"] .welcome-home-attach-btn:focus-visible {
  outline-color: #a1a1aa;
}

html[data-theme="dark"] .welcome-home-attach-files-btn {
  color: #d1d5db;
}

html[data-theme="dark"] .welcome-home-record-btn {
  border-color: var(--app-ui-border);
}

html[data-theme="dark"] .welcome-home-record-btn.welcome-action-btn--recording {
  background: rgba(127, 29, 29, 0.35);
  color: #fca5a5;
  border-color: #ef4444;
}

html[data-theme="dark"] .welcome-home-record-btn.welcome-action-btn--recording:hover {
  background: rgba(127, 29, 29, 0.45);
  color: #fecaca;
  border-color: #f87171;
}

html[data-theme="dark"] .welcome-home-plugins-menu {
  background: #1a1a1d;
  border-color: var(--app-ui-border);
  box-shadow: none;
}

html[data-theme="dark"] .welcome-home-plugins-item {
  color: #e8e8ed;
}

html[data-theme="dark"] .welcome-home-plugins-item:hover {
  background: #252528;
}

html[data-theme="dark"] .welcome-home-plugins-item:focus-visible {
  outline-color: #a1a1aa;
}

html[data-theme="dark"] .welcome-home-plugins-item-icon,
html[data-theme="dark"] .welcome-home-plugin-capsule-icon {
  color: #d1d5db;
}

html[data-theme="dark"] .welcome-home-spotlight-stage {
  --welcome-home-spotlight-surface: #1a1a1d;
  --welcome-home-spotlight-slide-stroke: #5c5c66;
  --welcome-home-spotlight-stroke: #3f3f46;
}

html[data-theme="dark"] .welcome-home-spotlight-slide {
  /* Même surface que la bande « Uplearn » (.welcome-home-agent-card). */
  background: var(--welcome-home-spotlight-surface);
  border: 1px solid var(--welcome-home-spotlight-slide-stroke);
  color: #e8e8ed;
}

html[data-theme="dark"] .welcome-home-spotlight-slide-media {
  background: transparent;
  border: none;
}

html[data-theme="dark"] .welcome-home-spotlight-slide-title {
  color: #f4f4f5;
}

html[data-theme="dark"] .welcome-home-spotlight-slide-desc {
  color: #a1a1aa;
}

html[data-theme="dark"] .welcome-home-spotlight-slide--active:focus-visible {
  outline-color: #60a5fa;
}

@media (min-width: 769px) and (hover: hover) {
  html[data-theme="dark"] .welcome-home-spotlight-dismiss {
    background: var(--welcome-home-spotlight-surface);
    border: 1px solid var(--welcome-home-spotlight-stroke);
    color: #e4e4e7;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  }
  html[data-theme="dark"] .welcome-home-spotlight-dismiss:hover {
    background: #27272a;
    color: #fafafa;
  }
  html[data-theme="dark"] .welcome-home-spotlight-dismiss:focus-visible {
    outline-color: #60a5fa;
  }
}

html[data-theme="dark"] .welcome-home-spotlight-dot {
  background: #52525b;
}

html[data-theme="dark"] .welcome-home-spotlight-dot:hover {
  background: #71717a;
}

html[data-theme="dark"] .welcome-home-spotlight-dot:focus-visible {
  outline-color: #a1a1aa;
}

html[data-theme="dark"] .welcome-home-spotlight-dot.is-active {
  background: #f4f4f5;
}

html[data-theme="dark"] .welcome-home-plugin-capsule {
  background: #1f1f23;
  border-color: var(--app-ui-border);
  color: #e8e8ed;
}

html[data-theme="dark"] .welcome-home-plugin-capsule:hover {
  background: #2a2a2f;
  border-color: #3f3f46;
}

html[data-theme="dark"] .welcome-home-plugin-capsule:focus-visible {
  outline-color: #a1a1aa;
}

html[data-theme="dark"] .welcome-home-mobile-more-btn {
  background: #1f1f23;
  color: #e8e8ed;
}

html[data-theme="dark"] .welcome-home-mobile-more-btn:hover {
  background: #2a2a2f;
}

html[data-theme="dark"] .welcome-home-mobile-more-btn:focus-visible {
  outline-color: #a1a1aa;
}

html[data-theme="dark"] .welcome-modal-box {
  background: #1a1a1d;
  border-color: var(--app-ui-border);
}

html[data-theme="dark"] .welcome-modal-box h2 {
  color: #ffffff;
}

html[data-theme="dark"] .welcome-modal-hint {
  color: #9ca3af;
}

html[data-theme="dark"] .welcome-moodle-field label {
  color: #d1d5db;
}

html[data-theme="dark"] .welcome-moodle-input {
  background: #141416;
  border-color: var(--app-ui-border);
  color: #e8e8ed;
}

html[data-theme="dark"] .welcome-moodle-input:focus {
  outline-color: #a1a1aa;
}

html[data-theme="dark"] .welcome-moodle-error {
  color: #fca5a5;
}

html[data-theme="dark"] .welcome-modal-cancel {
  background: #252528;
  color: #e8e8ed;
}

html[data-theme="dark"] .welcome-modal-cancel:hover {
  background: #2f2f33;
}

/* Barre sous le header : chats IA / collègue / jeu */
html[data-theme="dark"] .dashboard-colleague-toolbar,
html[data-theme="dark"] .dashboard-home-ai-chat-toolbar,
html[data-theme="dark"] .dashboard-game-toolbar {
  background: #141416;
}

html[data-theme="dark"] .dashboard-colleague-drawer,
html[data-theme="dark"] .dashboard-colleague-drawer-inner {
  background: #141416;
}

html[data-theme="dark"] .navbar-page-title {
  color: #ffffff;
}

html[data-theme="dark"] .get-started-trigger {
  color: #e8e8ed;
}

html[data-theme="dark"] .get-started-trigger:hover {
  background: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .get-started-trigger:focus-visible {
  outline-color: #a1a1aa;
}

html[data-theme="dark"] .dashboard-colleague-drawer .dashboard-colleague-panel-head h2,
html[data-theme="dark"] #dashboard-home-ai-chat-panel-title,
html[data-theme="dark"] #dashboard-colleague-panel-title {
  color: #ffffff;
}

html[data-theme="dark"] .dashboard-chat-panel-close-btn {
  color: #e8e8ed;
}

html[data-theme="dark"] .dashboard-chat-panel-close-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .dashboard-chat-panel-close-btn:focus-visible {
  outline-color: #e8e8ed;
}

html[data-theme="dark"] .dashboard-colleague-new-chat-btn {
  color: #e8e8ed;
}

html[data-theme="dark"] .dashboard-colleague-new-chat-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .dashboard-colleague-chat-peer-chevron {
  color: #e8e8ed;
}

html[data-theme="dark"] .dashboard-colleague-chat-overflow-menu {
  background: #1a1a1d;
  border-color: var(--app-ui-border);
  box-shadow: none;
}

html[data-theme="dark"] .dashboard-colleague-chat-overflow-menu-icon {
  color: #d1d5db;
}

html[data-theme="dark"] .dashboard-colleague-chat-overflow-menu button {
  color: #e8e8ed;
}

html[data-theme="dark"] .dashboard-colleague-chat-overflow-menu button:hover {
  background: #252528;
}

html[data-theme="dark"] .dashboard-colleague-chat-overflow-menu-item--danger:hover {
  background: rgba(220, 38, 38, 0.15);
}

html[data-theme="dark"] #dashboard-home-ai-chat-panel-list .dashboard-home-ai-chat-row:not(.dashboard-home-ai-chat-row--editing):hover {
  background: rgba(255, 255, 255, 0.06);
}

html[data-theme="dark"] #dashboard-home-ai-chat-panel-list .dashboard-home-ai-chat-row__line {
  color: #e8e8ed;
}

html[data-theme="dark"] #dashboard-home-ai-chat-panel-list .dashboard-home-ai-chat-row--editing {
  color: #e8e8ed;
}

html[data-theme="dark"] .dashboard-home-ai-chat-row__title-input {
  background: #1a1a1d;
  border-color: var(--app-ui-border);
  color: #e8e8ed;
}

html[data-theme="dark"] .dashboard-discussion-row {
  color: #e8e8ed;
}

html[data-theme="dark"] .dashboard-discussion-row:hover {
  background-color: rgba(255, 255, 255, 0.06);
}

html[data-theme="dark"] .dashboard-discussion-name {
  color: #ffffff;
}

html[data-theme="dark"] #dashboard-colleague-panel-list button.dashboard-discussion-row:hover,
html[data-theme="dark"] #dashboard-colleague-panel-list button.dashboard-discussion-row:active {
  background-color: rgba(255, 255, 255, 0.05);
}

html[data-theme="dark"]
  #dashboard-colleague-panel-list
  button.dashboard-discussion-row--folder.dashboard-discussion-row--folder-drag-over {
  outline: 2px solid #60a5fa;
  outline-offset: 1px;
  background: rgba(37, 99, 235, 0.22);
}

html[data-theme="dark"] .dashboard-home-ai-chat-row__menu {
  background: #1a1a1d;
  border-color: var(--app-ui-border);
  box-shadow: none;
}

html[data-theme="dark"] .dashboard-home-ai-chat-row__menu-item {
  color: #e8e8ed;
}

html[data-theme="dark"] .dashboard-home-ai-chat-row__menu-item:hover {
  background: #252528;
}

html[data-theme="dark"] .dashboard-home-ai-chat-row__more:hover {
  color: #ffffff;
}

html[data-theme="dark"] .dashboard-home-ai-chat-item:hover .dashboard-home-ai-chat-row__more,
html[data-theme="dark"] .dashboard-home-ai-chat-item:focus-within .dashboard-home-ai-chat-row__more,
html[data-theme="dark"] .dashboard-home-ai-chat-item--menu-open .dashboard-home-ai-chat-row__more {
  color: #d1d5db;
}

html[data-theme="dark"] .dashboard-notes-ask-ai-drawer-title {
  color: #e8e8ed;
}

html[data-theme="dark"] .dashboard-game-ai-panel-body,
html[data-theme="dark"] .dashboard-game-ai-chat-shell {
  --dashboard-game-ai-muted: #1a1a1d;
  --dashboard-game-ai-head-text: #9ca3af;
  --dashboard-game-ai-empty-title-text: #b8bcc4;
}

/* Bulles assistant : pas de fond distinct (même plan que la zone de chat) */
html[data-theme="dark"] .dashboard-game-ai-chat-msg--assistant {
  background: transparent;
  color: #e8e8ed;
}

/* Tiroir Ask AI : le bloc blanc sous le titre → même gris que le shell pour lisibilité du texte */
html[data-theme="dark"] .dashboard-game-ai-chat-shell-inner {
  background: #141416;
}

html[data-theme="dark"] .dashboard-game-ai-chat-input {
  color: #e8e8ed;
}

html[data-theme="dark"] .dashboard-game-ai-chat-input::placeholder {
  color: #9ca3af;
}

html[data-theme="dark"] .dashboard-game-ai-chat-loading-spinner {
  border-color: #3f3f46;
  border-top-color: #e8e8ed;
}

html[data-theme="dark"] .welcome-home-ai-typing {
  background: #252528;
  border-color: var(--app-ui-border);
}

html[data-theme="dark"] .welcome-home-ai-typing-dot {
  background: #9ca3af;
}

html[data-theme="dark"] .dashboard-game-ai-chat-msg--user {
  color: #ffffff;
  border-color: var(--app-ui-border);
}

html[data-theme="dark"] .dashboard-pricing-overlay-titlebar,
html[data-theme="dark"] .dashboard-pricing-overlay-body {
  background: #1a1a1d;
  color: #e8e8ed;
}

html[data-theme="dark"] .dashboard-pricing-overlay-titlebar {
  border-color: var(--app-ui-border);
}

html[data-theme="dark"] .dashboard-pricing-overlay-titlebar h2 {
  color: #e8e8ed;
}

html[data-theme="dark"] .dashboard-pricing-overlay-close {
  color: #9ca3af;
}

html[data-theme="dark"] .dashboard-pricing-overlay-close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #e8e8ed;
}

html[data-theme="dark"] input.settings-input-gen,
html[data-theme="dark"] textarea {
  color: inherit;
}

/* ——— Settings page ——— Même fond #101012 que la sidebar ; titres en blanc */
html[data-theme="dark"] .settings-page {
  background: #101012;
  color: #e8e8ed;
}

html[data-theme="dark"] .settings-card,
html[data-theme="dark"] .settings-main,
html[data-theme="dark"] .settings-tabs,
html[data-theme="dark"] .settings-aside {
  background: #101012;
  color: #e8e8ed;
}

html[data-theme="dark"] .settings-main {
  scrollbar-color: #3f3f46 #101012;
}

html[data-theme="dark"] .settings-main::-webkit-scrollbar-corner {
  background: #101012;
}

html[data-theme="dark"] .settings-aside {
  border-color: var(--app-ui-border);
}

html[data-theme="dark"] .settings-mem-invite-card,
html[data-theme="dark"] .settings-mem-add-panel,
html[data-theme="dark"] .settings-pricing-card,
html[data-theme="dark"] .settings-plugin-card {
  background: #101012;
}

html[data-theme="dark"] .settings-pricing-card[data-pricing-plan="pro"] {
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.2),
    0 1px 3px rgba(0, 0, 0, 0.1);
}

html[data-theme="dark"] .settings-plugin-card:hover {
  background: #1a1a1d;
}

html[data-theme="dark"] .settings-bill-pricing-link,
html[data-theme="dark"] .settings-bill-sub-summary {
  background: #101012;
  border-color: var(--app-ui-border);
}

html[data-theme="dark"] .settings-bill-pricing-link:hover,
html[data-theme="dark"] .settings-bill-sub-summary:hover {
  background: #1a1a1d;
  border-color: var(--app-ui-border);
}

html[data-theme="dark"] .settings-pricing-pill {
  background: #1a1a1d;
  border-color: var(--app-ui-border);
}

html[data-theme="dark"] .settings-pricing-pill-opt:hover:not(.is-selected) {
  color: #ffffff;
}

html[data-theme="dark"] .settings-pricing-pill-opt.is-selected {
  background: #252528;
  color: #ffffff;
  box-shadow: none;
}

html[data-theme="dark"] .settings-pricing-btn {
  background: #1a1a1d;
  border-color: var(--app-ui-border);
  color: #e8e8ed;
}

html[data-theme="dark"] .settings-pricing-btn:hover:not([aria-disabled="true"]) {
  background: #252528;
  border-color: #3f3f46;
}

html[data-theme="dark"] .settings-pricing-feature {
  color: #e5e7eb;
}

html[data-theme="dark"] .settings-pricing-feature-mark {
  color: #ffffff;
}

html[data-theme="dark"] .settings-pricing-price-line--primary {
  color: #ffffff;
}

html[data-theme="dark"] .settings-tab {
  color: #e5e7eb;
}

html[data-theme="dark"] .settings-tab:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}

html[data-theme="dark"] .settings-tab[aria-selected="true"] {
  background: #252528;
  color: #ffffff;
}

html[data-theme="dark"] .settings-tab.settings-tab--sidebar-logout {
  color: #f87171;
}

html[data-theme="dark"] .settings-tab.settings-tab--sidebar-logout:hover {
  background: rgba(248, 113, 113, 0.12);
  color: #fca5a5;
}

html[data-theme="dark"] .settings-gen-block h2,
html[data-theme="dark"] .settings-gen-row-label,
html[data-theme="dark"] .settings-gen-row-label label,
html[data-theme="dark"] .settings-mem-invite-title,
html[data-theme="dark"] .settings-mem-role-label,
html[data-theme="dark"] .settings-mem-name,
html[data-theme="dark"] .settings-mem-thead,
html[data-theme="dark"] .settings-mem-th-label,
html[data-theme="dark"] .settings-pricing-card h3,
html[data-theme="dark"] .settings-pricing-card-title-row h3,
html[data-theme="dark"] .settings-bill-sub-plan,
html[data-theme="dark"] .settings-bill-sub-paid,
html[data-theme="dark"] .hint.settings-bill-actions-hint,
html[data-theme="dark"] .hint.settings-bill-upcoming-line,
html[data-theme="dark"] .settings-plugin-card__title,
html[data-theme="dark"] .settings-2fa-overlay-title {
  color: #ffffff;
}

html[data-theme="dark"] .settings-input-gen,
html[data-theme="dark"] .settings-lang-trigger {
  background: #1a1a1d;
  border-color: var(--app-ui-border);
  color: #e8e8ed;
}

html[data-theme="dark"] .settings-input-gen:disabled {
  background: #161618;
  color: #a1a1aa;
}

html[data-theme="dark"] .settings-gen-select,
html[data-theme="dark"] .settings-mem-search-input {
  background: #1a1a1d;
  border-color: var(--app-ui-border);
  color: #e8e8ed;
}

html[data-theme="dark"] .settings-gen-row-desc,
html[data-theme="dark"] .settings-muted {
  color: #9ca3af;
}

html[data-theme="dark"] .settings-back {
  color: #9ca3af;
}

html[data-theme="dark"] .settings-mem-sort-btn:hover {
  background: rgba(255, 255, 255, 0.06);
}

html[data-theme="dark"] .settings-2fa-overlay-dialog {
  background: #101012;
  border-color: var(--app-ui-border);
  box-shadow: none;
}

html[data-theme="dark"] .settings-2fa-overlay-close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

html[data-theme="dark"] .settings-2fa-qr-wrap {
  background: #1a1a1d;
  border-color: var(--app-ui-border);
}

html[data-theme="dark"] .settings-lang-dropdown {
  background: #1a1a1d;
  border-color: var(--app-ui-border);
  box-shadow: none;
}

html[data-theme="dark"] .settings-lang-option {
  background: #1a1a1d;
  border-color: var(--app-ui-border);
  color: #e8e8ed;
}

html[data-theme="dark"] .settings-lang-option:hover {
  background: #252528;
  border-color: #3f3f46;
}

html[data-theme="dark"] .settings-btn-row-secondary {
  background: #1a1a1d;
  color: #ffffff;
}

html[data-theme="dark"] .settings-btn-row-secondary:hover {
  background: #252528;
}

html[data-theme="dark"] .settings-plugin-card__connect {
  background: #1a1a1d;
  color: #ffffff;
}

html[data-theme="dark"] .settings-plugin-card__connect:hover {
  background: #252528;
}

/* Tutoriel tableau de bord : ligne lisible sur fond sombre */
html[data-theme="dark"] .dashboard-feature-tour-connector .dashboard-feature-tour-connector-line {
  stroke: rgba(248, 250, 252, 0.72);
}
html[data-theme="dark"] .dashboard-feature-tour-connector .dashboard-feature-tour-connector-dot-target {
  stroke: none;
}
html[data-theme="dark"] .dashboard-feature-tour-capsule {
  background-color: #000000;
  border-color: rgba(255, 255, 255, 0.22);
}
html[data-theme="dark"] .dashboard-feature-tour-title {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff;
}
html[data-theme="dark"] .dashboard-feature-tour-body {
  color: rgba(255, 255, 255, 0.92) !important;
  -webkit-text-fill-color: rgba(255, 255, 255, 0.92);
}
