/* Modern — login / popup / register — modes clair / sombre */

:root[data-auth-theme="c"],
html[data-auth-theme="c"],
body[data-auth-theme="c"] {
  --lab-accent: #8b5cf6;
  --lab-accent-gradient-end: #a855f7;
  --lab-accent-secondary: var(--lab-accent-gradient-end);
  --lab-accent-hover: #a855f7;
  --lab-accent-muted: #a78bfa;
  --lab-accent-ring: color-mix(in srgb, var(--lab-accent) 35%, transparent);
  --lab-accent-text: var(--lab-accent);
  --lab-accent-border: color-mix(in srgb, var(--lab-accent) 35%, transparent);
  --lab-accent-bg-subtle: color-mix(in srgb, var(--lab-accent) 18%, transparent);
  --lab-accent-gradient: linear-gradient(135deg, var(--lab-accent) 0%, var(--lab-accent-gradient-end) 100%);
  --lab-halo-accent: color-mix(in srgb, var(--lab-accent) 40%, transparent);
  --lab-halo-secondary: color-mix(in srgb, var(--lab-accent-gradient-end) 25%, transparent);
  --lab-danger-hover: #ef4444;

  --auth-bg: #0f172a;
  --auth-surface: rgba(30, 41, 59, 0.75);
  --auth-text: #f1f5f9;
  --auth-muted: #94a3b8;
  --auth-line: rgba(148, 163, 184, 0.3);
  --auth-primary: var(--lab-accent);
  --auth-primary-hover: var(--lab-accent-hover);
  --auth-accent: var(--lab-accent-muted);
  --auth-success: #34d399;
  --auth-danger: #f87171;
  --auth-danger-hover: var(--lab-danger-hover);
  --auth-input-bg: rgba(15, 23, 42, 0.55);
  --auth-input-border: rgba(148, 163, 184, 0.28);
  --auth-input-placeholder: #64748b;
  --auth-ghost-bg: rgba(148, 163, 184, 0.12);
  --auth-ghost-hover: rgba(148, 163, 184, 0.22);
  --auth-focus: 0 0 0 3px var(--lab-accent-ring);
  --lab-radius-md: 12px;
  --lab-select-radius: var(--lab-radius-md);
  --lab-select-padding-y: 11px;
  --lab-select-padding-x: 14px;
  --auth-select-bg: color-mix(in srgb, var(--auth-surface) 72%, transparent);
  --lab-select-padding-right: 2.25rem;
  --lab-select-arrow-size: 1rem;
  --lab-select-arrow-pos: right 0.75rem center;
  --lab-select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4 6l4 4 4-4' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

html[data-auth-theme="c"][data-theme="light"] {
  --lab-accent-ring: color-mix(in srgb, var(--lab-accent) 28%, transparent);
  --lab-accent-border: color-mix(in srgb, var(--lab-accent) 28%, #e2e8f0);
  --lab-accent-bg-subtle: color-mix(in srgb, var(--lab-accent) 10%, #f8fafc);
  --lab-halo-accent: color-mix(in srgb, #94a3b8 14%, transparent);
  --lab-halo-secondary: color-mix(in srgb, #cbd5e1 10%, transparent);
  --auth-bg: #f4f4f5;
  --auth-surface: #ffffff;
  --auth-text: #171717;
  --auth-muted: #525252;
  --auth-line: #d4d4d4;
  --auth-primary: var(--lab-accent);
  --auth-primary-hover: var(--lab-accent-hover);
  --auth-accent: #525252;
  --auth-success: #404040;
  --auth-danger: #262626;
  --auth-danger-hover: #171717;
  --auth-input-bg: #ffffff;
  --auth-input-border: #d4d4d4;
  --auth-input-placeholder: #a3a3a3;
  --auth-ghost-bg: #f4f4f5;
  --auth-ghost-hover: #e5e5e5;
  --auth-focus: 0 0 0 3px color-mix(in srgb, #737373 28%, transparent);
  --lab-radius-md: 12px;
  --lab-select-radius: var(--lab-radius-md);
  --lab-select-padding-y: 11px;
  --lab-select-padding-x: 14px;
  --auth-select-bg: #ffffff;
  --lab-select-padding-right: 2.25rem;
  --lab-select-arrow-size: 1rem;
  --lab-select-arrow-pos: right 0.75rem center;
  --lab-select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4 6l4 4 4-4' stroke='%23737373' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  color-scheme: light;
}

html[data-auth-theme="c"] body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  font-family: "Inter", system-ui, sans-serif;
  background:
    radial-gradient(900px 500px at 20% -10%, var(--lab-halo-accent) 0%, transparent 55%),
    radial-gradient(700px 400px at 90% 110%, var(--lab-halo-secondary) 0%, transparent 50%),
    var(--auth-bg);
  color: var(--auth-text);
  animation: auth-fade-in 0.35s ease;
}

html[data-auth-theme="c"][data-theme="light"] body {
  background: var(--auth-bg);
  color-scheme: light;
}

@keyframes auth-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

html[data-auth-theme="c"] .auth-page-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  width: min(880px, 100%);
  align-items: center;
  box-sizing: border-box;
}

html[data-auth-theme="c"] .auth-page-grid--popup {
  width: min(720px, 94vw);
}

html[data-auth-theme="c"] .auth-preview {
  padding: 24px;
  display: grid;
  gap: 12px;
}

html[data-auth-theme="c"] .auth-brand {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--auth-accent);
}

html[data-auth-theme="c"] .auth-eyebrow {
  margin: 0;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--auth-muted);
}

html[data-auth-theme="c"] .auth-bullets {
  margin: 0;
  padding-left: 18px;
  color: var(--auth-muted);
  font-size: 0.88rem;
  display: grid;
  gap: 6px;
}

html[data-auth-theme="c"] .auth-footer-links a {
  color: var(--auth-accent);
}

html[data-auth-theme="c"] .auth-preview__glass {
  height: 120px;
  border-radius: 16px;
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--lab-accent) 35%, transparent),
    color-mix(in srgb, var(--lab-accent-gradient-end) 28%, transparent)
  );
  border: 1px solid var(--auth-line);
  backdrop-filter: blur(12px);
}

html[data-auth-theme="c"] .auth-shell {
  position: relative;
}

html[data-auth-theme="c"] .auth-card-toolbar {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
}

html[data-auth-theme="c"] .card,
html[data-auth-theme="c"] .auth-shell {
  background: var(--auth-surface);
  border: 1px solid var(--auth-line);
  border-radius: 16px;
  padding: 42px 28px 28px;
  backdrop-filter: blur(16px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  display: grid;
  gap: 14px;
  animation: auth-card-in 0.4s ease;
}

html[data-auth-theme="c"][data-theme="light"] .card,
html[data-auth-theme="c"][data-theme="light"] .auth-shell {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  backdrop-filter: none;
}

@keyframes auth-card-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

html[data-auth-theme="c"] h1,
html[data-auth-theme="c"] h2 {
  margin: 0;
}

html[data-auth-theme="c"] h1 {
  font-size: 1.4rem;
}

html[data-auth-theme="c"] .auth-subtitle {
  margin: 0;
  color: var(--auth-muted);
  font-size: 0.92rem;
}

html[data-auth-theme="c"] label {
  font-size: 0.82rem;
  color: var(--auth-muted);
  margin-top: 2px;
}

html[data-auth-theme="c"] input {
  border: 1px solid var(--auth-input-border, var(--auth-line));
  border-radius: var(--lab-select-radius, 12px);
  padding: var(--lab-select-padding-y, 11px) var(--lab-select-padding-x, 14px);
  font-size: 0.95rem;
  background: var(--auth-input-bg);
  color: var(--auth-text);
  font-family: inherit;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

html[data-auth-theme="c"] input::placeholder {
  color: var(--auth-input-placeholder);
  opacity: 0.9;
}

html[data-auth-theme="c"] input:focus {
  outline: none;
  border-color: var(--auth-primary);
  box-shadow: var(--auth-focus);
}

/* Select custom — cohérent avec admin Modern (flèche accent, glass, hover/focus) */
html[data-auth-theme="c"] select,
html[data-auth-theme="c"] .lab-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  border: 1px solid var(--auth-line);
  border-radius: var(--lab-select-radius, 12px);
  padding: var(--lab-select-padding-y, 11px) var(--lab-select-padding-right, 2.25rem)
    var(--lab-select-padding-y, 11px) var(--lab-select-padding-x, 14px);
  font-size: 0.95rem;
  font-family: inherit;
  background-color: var(--auth-select-bg, var(--auth-input-bg));
  background-image: var(--lab-select-arrow);
  background-repeat: no-repeat;
  background-position: var(--lab-select-arrow-pos, right 0.75rem center);
  background-size: var(--lab-select-arrow-size, 1rem);
  color: var(--auth-text);
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  cursor: pointer;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background-color 0.18s ease;
}

html[data-auth-theme="c"] select:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--lab-accent) 30%, var(--auth-line));
  background-color: color-mix(in srgb, var(--auth-select-bg, var(--auth-input-bg)) 90%, var(--lab-accent));
}

html[data-auth-theme="c"] select:focus {
  outline: none;
  border-color: var(--auth-primary);
  box-shadow: var(--auth-focus);
}

html[data-auth-theme="c"] select:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

html[data-auth-theme="c"]:not([data-theme="light"]) select {
  color-scheme: dark;
}

html[data-auth-theme="c"][data-theme="light"] select {
  color-scheme: light;
}

html[data-auth-theme="c"] select option {
  background: var(--auth-bg);
  color: var(--auth-text);
}

html[data-auth-theme="c"][data-theme="light"] button {
  color: #ffffff;
}

html[data-auth-theme="c"] button {
  border: none;
  border-radius: var(--lab-select-radius, 12px);
  padding: 12px 16px;
  font-weight: 600;
  cursor: pointer;
  background: var(--auth-primary);
  color: #fff;
  font-family: inherit;
  transition: background 0.18s ease;
}

html[data-auth-theme="c"] button:hover:not(:disabled) {
  background: var(--auth-primary-hover);
}

html[data-auth-theme="c"] button:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

html[data-auth-theme="c"] .auth-shell .actions {
  margin-top: 1.5rem;
}

html[data-auth-theme="c"] .auth-status {
  min-height: 1.2em;
  margin: 0;
  font-size: 0.88rem;
  color: var(--auth-muted);
}

html[data-auth-theme="c"] .auth-status--success {
  color: var(--auth-success);
}

html[data-auth-theme="c"] .auth-status--error {
  color: var(--auth-danger);
}

html[data-auth-theme="c"] body.embed-login .auth-card-toolbar,
html[data-auth-theme="c"][data-embed="true"] .auth-card-toolbar,
html[data-auth-theme="c"] body.embed-login .auth-prototype-toolbar-host,
html[data-auth-theme="c"][data-embed="true"] .auth-prototype-toolbar-host {
  display: none !important;
}

html[data-auth-theme="c"] body.embed-login .auth-preview,
html[data-auth-theme="c"][data-embed="true"] .auth-preview {
  display: none !important;
}

html[data-auth-theme="c"] body.embed-login .auth-page-grid,
html[data-auth-theme="c"][data-embed="true"] .auth-page-grid {
  grid-template-columns: 1fr;
  width: min(400px, 100%);
  gap: 0;
}

html[data-auth-theme="c"] body.embed-login,
html[data-auth-theme="c"][data-embed="true"] body {
  min-height: 100dvh;
  padding: 0;
}

html[data-auth-theme="c"] body.embed-login .card,
html[data-auth-theme="c"] body.embed-login .auth-shell,
html[data-auth-theme="c"][data-embed="true"] .card,
html[data-auth-theme="c"][data-embed="true"] .auth-shell {
  padding: 24px 20px 20px;
  backdrop-filter: none;
  box-shadow: none;
  border: none;
}

.auth-theme-mode-toggle {
  justify-self: end;
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: var(--lab-select-radius, 12px);
  border: 1px solid var(--auth-line);
  background: var(--auth-ghost-bg);
  color: var(--auth-text);
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.auth-theme-mode-toggle:hover {
  background: var(--auth-ghost-hover);
}

.auth-theme-mode-toggle:focus-visible {
  outline: none;
  box-shadow: var(--auth-focus);
}

@media (max-width: 767px) {
  html[data-auth-theme="c"] body {
    padding: 16px;
    align-items: center;
  }

  html[data-auth-theme="c"] .auth-preview {
    display: none !important;
  }

  html[data-auth-theme="c"] .auth-page-grid {
    grid-template-columns: 1fr;
    width: min(440px, 100%);
    gap: 0;
    margin: 0 auto;
  }

  html[data-auth-theme="c"] .card,
  html[data-auth-theme="c"] .auth-shell {
    padding: 48px 18px 22px;
  }

  html[data-auth-theme="c"] .auth-card-toolbar {
    top: 12px;
    right: 12px;
  }

  html[data-auth-theme="c"] body.embed-login,
  html[data-auth-theme="c"][data-embed="true"] body {
    padding: 10px;
  }

  html[data-auth-theme="c"] body.embed-login .auth-page-grid,
  html[data-auth-theme="c"][data-embed="true"] .auth-page-grid {
    width: 100%;
    max-width: 400px;
  }
}

@media (max-width: 480px) {
  html[data-auth-theme="c"] body {
    padding: 12px;
  }

  html[data-auth-theme="c"] .card,
  html[data-auth-theme="c"] .auth-shell {
    padding: 44px 14px 18px;
  }
}

html[data-auth-theme="c"] .auth-page-grid:has(.auth-prototype-toolbar-host:not(:empty)) {
  row-gap: 18px;
}

.auth-prototype-toolbar-host {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  padding: 0 4px 2px;
}

.auth-prototype-toolbar {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  max-width: 100%;
  padding: 7px 10px 7px 14px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--auth-surface) 88%, transparent);
  border: 1px solid var(--auth-line);
  backdrop-filter: blur(14px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

html[data-auth-theme="c"][data-theme="light"] .auth-prototype-toolbar {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}

.auth-prototype-toolbar__label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--auth-muted);
  white-space: nowrap;
}

.auth-prototype-toolbar__tag {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  color: var(--auth-muted);
  background: var(--auth-ghost-bg);
  border: 1px solid var(--auth-line);
}

.auth-prototype-toolbar__track {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 10px;
  background: var(--auth-ghost-bg);
  border: 1px solid color-mix(in srgb, var(--auth-line) 80%, transparent);
}

.auth-prototype-toolbar__segment {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  margin: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent !important;
  color: var(--auth-muted) !important;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-prototype-toolbar__segment:hover:not(.is-active) {
  background: var(--auth-ghost-hover) !important;
  color: var(--auth-text) !important;
}

.auth-prototype-toolbar__segment:focus-visible {
  outline: none;
  box-shadow: var(--auth-focus);
}

.auth-prototype-toolbar__segment.is-active,
.auth-prototype-toolbar__segment[aria-pressed="true"] {
  background: var(--auth-surface) !important;
  color: var(--auth-text) !important;
  border-color: var(--auth-line);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.auth-prototype-toolbar__badge {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: color-mix(in srgb, var(--auth-ghost-bg) 80%, transparent);
  color: var(--auth-muted);
  transition: background 0.15s ease, color 0.15s ease;
}

.auth-prototype-toolbar__segment.is-active .auth-prototype-toolbar__badge,
.auth-prototype-toolbar__segment[aria-pressed="true"] .auth-prototype-toolbar__badge {
  background: color-mix(in srgb, var(--lab-accent) 22%, transparent);
  color: var(--lab-accent-text);
}

.auth-prototype-toolbar__name {
  white-space: nowrap;
}

@media (max-width: 520px) {
  .auth-prototype-toolbar {
    gap: 8px;
    padding: 6px 8px 6px 12px;
  }

  .auth-prototype-toolbar__name {
    display: none;
  }

  .auth-prototype-toolbar__segment {
    padding: 5px 8px;
  }
}

@media (max-width: 767px) {
  html[data-auth-theme="c"] .auth-page-grid:has(.auth-prototype-toolbar-host:not(:empty)) {
    row-gap: 14px;
  }

  .auth-prototype-toolbar-host {
    padding-bottom: 4px;
  }
}

/* --- Iframe SSO : palette strictement monochrome (gris, noir, blanc) --- */

/* Variables mode sombre — exige data-theme="dark" pour bascule fiable */
html[data-embed-monochrome="true"][data-theme="dark"],
html[data-embed="true"][data-theme="dark"],
html[data-auth-theme="c"][data-embed-monochrome="true"][data-theme="dark"],
html[data-auth-theme="c"][data-embed="true"][data-theme="dark"] {
  --lab-accent: #a3a3a3;
  --lab-accent-gradient-end: #737373;
  --lab-accent-secondary: #737373;
  --lab-accent-hover: #d4d4d4;
  --lab-accent-muted: #a3a3a3;
  --lab-accent-ring: color-mix(in srgb, #a3a3a3 35%, transparent);
  --lab-accent-text: #a3a3a3;
  --lab-accent-border: #525252;
  --lab-accent-bg-subtle: #262626;
  --lab-accent-gradient: linear-gradient(135deg, #a3a3a3 0%, #737373 100%);
  --lab-halo-accent: transparent;
  --lab-halo-secondary: transparent;
  --auth-bg: #0a0a0a;
  --auth-surface: #171717;
  --auth-text: #fafafa;
  --auth-muted: #a3a3a3;
  --auth-line: #404040;
  --auth-primary: #e5e5e5;
  --auth-primary-hover: #ffffff;
  --auth-accent: #a3a3a3;
  --auth-success: #d4d4d4;
  --auth-danger: #a3a3a3;
  --auth-danger-hover: #737373;
  --auth-input-bg: #262626;
  --auth-input-border: #525252;
  --auth-input-placeholder: #737373;
  --auth-ghost-bg: #262626;
  --auth-ghost-hover: #404040;
  --auth-select-bg: #262626;
  --auth-focus: 0 0 0 3px color-mix(in srgb, #a3a3a3 35%, transparent);
  color-scheme: dark;
}

/* Variables mode clair */
html[data-embed-monochrome="true"][data-theme="light"],
html[data-embed="true"][data-theme="light"],
html[data-auth-theme="c"][data-embed-monochrome="true"][data-theme="light"],
html[data-auth-theme="c"][data-embed="true"][data-theme="light"] {
  --lab-accent: #525252;
  --lab-accent-gradient-end: #737373;
  --lab-accent-secondary: #737373;
  --lab-accent-hover: #404040;
  --lab-accent-muted: #737373;
  --lab-accent-ring: color-mix(in srgb, #525252 22%, transparent);
  --lab-accent-text: #525252;
  --lab-accent-border: #d4d4d4;
  --lab-accent-bg-subtle: #f4f4f5;
  --lab-accent-gradient: linear-gradient(135deg, #525252 0%, #737373 100%);
  --lab-halo-accent: transparent;
  --lab-halo-secondary: transparent;
  --auth-bg: #fafafa;
  --auth-surface: #ffffff;
  --auth-text: #171717;
  --auth-muted: #737373;
  --auth-line: #e5e5e5;
  --auth-primary: #171717;
  --auth-primary-hover: #262626;
  --auth-accent: #737373;
  --auth-success: #404040;
  --auth-danger: #262626;
  --auth-danger-hover: #171717;
  --auth-input-bg: #ffffff;
  --auth-input-border: #d4d4d4;
  --auth-input-placeholder: #a3a3a3;
  --auth-ghost-bg: #f4f4f5;
  --auth-ghost-hover: #e5e5e5;
  --auth-select-bg: #ffffff;
  --auth-focus: 0 0 0 3px color-mix(in srgb, #737373 22%, transparent);
  color-scheme: light;
}

/* Fond page — sans halos colorés, valeurs explicites par thème */
html[data-embed-monochrome="true"][data-theme="dark"] body,
html[data-embed="true"][data-theme="dark"] body,
html[data-auth-theme="c"][data-embed-monochrome="true"][data-theme="dark"] body,
html[data-auth-theme="c"][data-embed="true"][data-theme="dark"] body {
  background: #0a0a0a !important;
  color: #fafafa !important;
  color-scheme: dark;
}

html[data-embed-monochrome="true"][data-theme="light"] body,
html[data-embed="true"][data-theme="light"] body,
html[data-auth-theme="c"][data-embed-monochrome="true"][data-theme="light"] body,
html[data-auth-theme="c"][data-embed="true"][data-theme="light"] body {
  background: #fafafa !important;
  color: #171717 !important;
  color-scheme: light;
}

/* Carte login */
html[data-embed-monochrome="true"][data-theme="dark"] .card,
html[data-embed-monochrome="true"][data-theme="dark"] .auth-shell,
html[data-embed="true"][data-theme="dark"] .card,
html[data-embed="true"][data-theme="dark"] .auth-shell {
  background: #171717 !important;
  border-color: #404040 !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45) !important;
  backdrop-filter: none !important;
  color: #fafafa !important;
}

html[data-embed-monochrome="true"][data-theme="light"] .card,
html[data-embed-monochrome="true"][data-theme="light"] .auth-shell,
html[data-embed="true"][data-theme="light"] .card,
html[data-embed="true"][data-theme="light"] .auth-shell {
  background: #ffffff !important;
  border-color: #e5e5e5 !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06) !important;
  backdrop-filter: none !important;
  color: #171717 !important;
}

/* Titres, labels, sous-titres */
html[data-embed-monochrome="true"][data-theme="dark"] h1,
html[data-embed-monochrome="true"][data-theme="dark"] h2,
html[data-embed-monochrome="true"][data-theme="dark"] label,
html[data-embed-monochrome="true"][data-theme="dark"] .auth-subtitle,
html[data-embed-monochrome="true"][data-theme="dark"] .auth-eyebrow,
html[data-embed="true"][data-theme="dark"] h1,
html[data-embed="true"][data-theme="dark"] h2,
html[data-embed="true"][data-theme="dark"] label,
html[data-embed="true"][data-theme="dark"] .auth-subtitle,
html[data-embed="true"][data-theme="dark"] .auth-eyebrow {
  color: #a3a3a3 !important;
}

html[data-embed-monochrome="true"][data-theme="dark"] h1,
html[data-embed-monochrome="true"][data-theme="dark"] h2,
html[data-embed="true"][data-theme="dark"] h1,
html[data-embed="true"][data-theme="dark"] h2 {
  color: #fafafa !important;
}

html[data-embed-monochrome="true"][data-theme="light"] h1,
html[data-embed-monochrome="true"][data-theme="light"] h2,
html[data-embed-monochrome="true"][data-theme="light"] label,
html[data-embed-monochrome="true"][data-theme="light"] .auth-subtitle,
html[data-embed-monochrome="true"][data-theme="light"] .auth-eyebrow,
html[data-embed="true"][data-theme="light"] h1,
html[data-embed="true"][data-theme="light"] h2,
html[data-embed="true"][data-theme="light"] label,
html[data-embed="true"][data-theme="light"] .auth-subtitle,
html[data-embed="true"][data-theme="light"] .auth-eyebrow {
  color: #737373 !important;
}

html[data-embed-monochrome="true"][data-theme="light"] h1,
html[data-embed-monochrome="true"][data-theme="light"] h2,
html[data-embed="true"][data-theme="light"] h1,
html[data-embed="true"][data-theme="light"] h2 {
  color: #171717 !important;
}

/* Champs de formulaire */
html[data-embed-monochrome="true"][data-theme="dark"] input,
html[data-embed-monochrome="true"][data-theme="dark"] select,
html[data-embed-monochrome="true"][data-theme="dark"] textarea,
html[data-embed="true"][data-theme="dark"] input,
html[data-embed="true"][data-theme="dark"] select,
html[data-embed="true"][data-theme="dark"] textarea {
  background: #262626 !important;
  border-color: #525252 !important;
  color: #fafafa !important;
  color-scheme: dark;
}

html[data-embed-monochrome="true"][data-theme="light"] input,
html[data-embed-monochrome="true"][data-theme="light"] select,
html[data-embed-monochrome="true"][data-theme="light"] textarea,
html[data-embed="true"][data-theme="light"] input,
html[data-embed="true"][data-theme="light"] select,
html[data-embed="true"][data-theme="light"] textarea {
  background: #ffffff !important;
  border-color: #d4d4d4 !important;
  color: #171717 !important;
  color-scheme: light;
}

html[data-embed-monochrome="true"][data-theme="dark"] input::placeholder,
html[data-embed-monochrome="true"][data-theme="dark"] textarea::placeholder,
html[data-embed="true"][data-theme="dark"] input::placeholder,
html[data-embed="true"][data-theme="dark"] textarea::placeholder {
  color: #737373 !important;
}

html[data-embed-monochrome="true"][data-theme="light"] input::placeholder,
html[data-embed-monochrome="true"][data-theme="light"] textarea::placeholder,
html[data-embed="true"][data-theme="light"] input::placeholder,
html[data-embed="true"][data-theme="light"] textarea::placeholder {
  color: #a3a3a3 !important;
}

html[data-embed-monochrome="true"][data-theme="dark"] input:focus,
html[data-embed-monochrome="true"][data-theme="dark"] select:focus,
html[data-embed="true"][data-theme="dark"] input:focus,
html[data-embed="true"][data-theme="dark"] select:focus {
  border-color: #a3a3a3 !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, #a3a3a3 35%, transparent) !important;
}

html[data-embed-monochrome="true"][data-theme="light"] input:focus,
html[data-embed-monochrome="true"][data-theme="light"] select:focus,
html[data-embed="true"][data-theme="light"] input:focus,
html[data-embed="true"][data-theme="light"] select:focus {
  border-color: #737373 !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, #737373 22%, transparent) !important;
}

html[data-embed-monochrome="true"][data-theme="dark"] select:hover:not(:disabled),
html[data-embed="true"][data-theme="dark"] select:hover:not(:disabled) {
  border-color: #737373 !important;
  background-color: #262626 !important;
}

html[data-embed-monochrome="true"][data-theme="light"] select:hover:not(:disabled),
html[data-embed="true"][data-theme="light"] select:hover:not(:disabled) {
  border-color: #a3a3a3 !important;
  background-color: #ffffff !important;
}

/* Checkbox / radio */
html[data-embed-monochrome="true"][data-theme="dark"] input[type="checkbox"],
html[data-embed-monochrome="true"][data-theme="dark"] input[type="radio"],
html[data-embed="true"][data-theme="dark"] input[type="checkbox"],
html[data-embed="true"][data-theme="dark"] input[type="radio"] {
  accent-color: #e5e5e5;
  color-scheme: dark;
}

html[data-embed-monochrome="true"][data-theme="light"] input[type="checkbox"],
html[data-embed-monochrome="true"][data-theme="light"] input[type="radio"],
html[data-embed="true"][data-theme="light"] input[type="checkbox"],
html[data-embed="true"][data-theme="light"] input[type="radio"] {
  accent-color: #171717;
  color-scheme: light;
}

/* Bouton primaire */
html[data-embed-monochrome="true"][data-theme="dark"] button,
html[data-embed="true"][data-theme="dark"] button {
  background: #e5e5e5 !important;
  color: #0a0a0a !important;
}

html[data-embed-monochrome="true"][data-theme="dark"] button:hover:not(:disabled),
html[data-embed="true"][data-theme="dark"] button:hover:not(:disabled) {
  background: #ffffff !important;
}

html[data-embed-monochrome="true"][data-theme="light"] button,
html[data-embed="true"][data-theme="light"] button {
  background: #171717 !important;
  color: #ffffff !important;
}

html[data-embed-monochrome="true"][data-theme="light"] button:hover:not(:disabled),
html[data-embed="true"][data-theme="light"] button:hover:not(:disabled) {
  background: #262626 !important;
}

/* Liens */
html[data-embed-monochrome="true"][data-theme="dark"] a,
html[data-embed-monochrome="true"][data-theme="dark"] .auth-brand,
html[data-embed-monochrome="true"][data-theme="dark"] .auth-accent,
html[data-embed-monochrome="true"][data-theme="dark"] .auth-footer-links a,
html[data-embed="true"][data-theme="dark"] a,
html[data-embed="true"][data-theme="dark"] .auth-brand,
html[data-embed="true"][data-theme="dark"] .auth-accent,
html[data-embed="true"][data-theme="dark"] .auth-footer-links a {
  color: #a3a3a3 !important;
  text-decoration-color: #404040;
}

html[data-embed-monochrome="true"][data-theme="dark"] a:hover,
html[data-embed="true"][data-theme="dark"] a:hover {
  color: #fafafa !important;
}

html[data-embed-monochrome="true"][data-theme="light"] a,
html[data-embed-monochrome="true"][data-theme="light"] .auth-brand,
html[data-embed-monochrome="true"][data-theme="light"] .auth-accent,
html[data-embed-monochrome="true"][data-theme="light"] .auth-footer-links a,
html[data-embed="true"][data-theme="light"] a,
html[data-embed="true"][data-theme="light"] .auth-brand,
html[data-embed="true"][data-theme="light"] .auth-accent,
html[data-embed="true"][data-theme="light"] .auth-footer-links a {
  color: #525252 !important;
  text-decoration-color: #e5e5e5;
}

html[data-embed-monochrome="true"][data-theme="light"] a:hover,
html[data-embed="true"][data-theme="light"] a:hover {
  color: #171717 !important;
}

/* Toolbar / header */
html[data-embed-monochrome="true"] .auth-card-toolbar,
html[data-embed="true"] .auth-card-toolbar {
  color: inherit;
}

/* Messages statut */
html[data-embed-monochrome="true"][data-theme="dark"] .auth-status,
html[data-embed="true"][data-theme="dark"] .auth-status {
  color: #a3a3a3 !important;
}

html[data-embed-monochrome="true"][data-theme="light"] .auth-status,
html[data-embed="true"][data-theme="light"] .auth-status {
  color: #737373 !important;
}

html[data-embed-monochrome="true"] .auth-status--success,
html[data-embed-monochrome="true"] .auth-status--error,
html[data-embed="true"] .auth-status--success,
html[data-embed="true"] .auth-status--error {
  color: inherit !important;
}

/* Halos / aperçu latéral */
html[data-embed-monochrome="true"][data-theme="dark"] .auth-preview__glass,
html[data-embed="true"][data-theme="dark"] .auth-preview__glass {
  background: linear-gradient(135deg, #404040, #262626) !important;
}

html[data-embed-monochrome="true"][data-theme="light"] .auth-preview__glass,
html[data-embed="true"][data-theme="light"] .auth-preview__glass {
  background: linear-gradient(135deg, #e5e5e5, #d4d4d4) !important;
}
