/* Theme surface overrides — dark/light marketing site */

html[data-nf-theme="dark"] body {
  background: #0b1c33;
  color: var(--nf-ink);
}

.site-header {
  background: var(--nf-header-bg);
}

.site-header.is-scrolled {
  box-shadow: var(--nf-header-shadow);
}

.site-footer {
  background: var(--nf-footer-bg);
}

.theme-toggle {
  appearance: none;
  box-sizing: border-box;
  width: 38px;
  height: 38px;
  padding: 0;
  margin: 0;
  border-radius: 10px;
  border: 1px solid var(--nf-border);
  background: var(--nf-bg-2);
  color: var(--nf-heading);
  cursor: pointer;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.theme-toggle:hover {
  border-color: var(--nf-border-2);
  transform: translateY(-1px);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
  display: block;
}

.theme-toggle .icon-sun {
  display: none;
}

.theme-toggle .icon-moon {
  display: block;
}

html[data-nf-theme="dark"] .theme-toggle .icon-sun {
  display: block;
}

html[data-nf-theme="dark"] .theme-toggle .icon-moon {
  display: none;
}

/* ---- Dark: readable elevated cards ---- */
html[data-nf-theme="dark"] .feature,
html[data-nf-theme="dark"] .blog-card,
html[data-nf-theme="dark"] .leader,
html[data-nf-theme="dark"] .leader-card,
html[data-nf-theme="dark"] .step-card,
html[data-nf-theme="dark"] .step__body,
html[data-nf-theme="dark"] .form-card,
html[data-nf-theme="dark"] .solution-card,
html[data-nf-theme="dark"] .home-journey__step,
html[data-nf-theme="dark"] .role-flow__item,
html[data-nf-theme="dark"] .how-card,
html[data-nf-theme="dark"] .nav__dropdown {
  background: #1a3a5c;
  border: 1px solid rgba(204, 225, 255, 0.28);
  color: var(--nf-ink);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.35);
}

html[data-nf-theme="dark"] .feature:hover {
  border-color: rgba(110, 166, 255, 0.55);
  background: #1e4268;
}

/* Dark: audience stays flat (corporate) — top rule only, no filled block */
html[data-nf-theme="dark"] .audience {
  background: transparent;
  border: 0;
  border-top: 1px solid rgba(204, 225, 255, 0.22);
  border-radius: 0;
  box-shadow: none;
  color: var(--nf-ink);
}

html[data-nf-theme="dark"] .audience:hover {
  background: transparent;
  border-top-color: var(--nf-blue);
  box-shadow: none;
}

/* Dark: About page — sticky nav + flat sections */
html[data-nf-theme="dark"] .about-nav {
  background: rgba(11, 28, 51, 0.92);
  backdrop-filter: blur(8px);
}

html[data-nf-theme="dark"] .about-nav a {
  color: var(--nf-ink-2);
  border-color: rgba(204, 225, 255, 0.22);
  background: transparent;
}

html[data-nf-theme="dark"] .about-nav a.is-active,
html[data-nf-theme="dark"] .about-nav a:hover {
  background: rgba(110, 166, 255, 0.18);
  color: #fff;
  border-color: rgba(110, 166, 255, 0.55);
}

html[data-nf-theme="dark"] .about-block {
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(204, 225, 255, 0.16);
  border-radius: 0;
  box-shadow: none;
  color: var(--nf-ink);
}

html[data-nf-theme="dark"] .about-block:last-child {
  border-bottom: 0;
}

html[data-nf-theme="dark"] .nf-botChallenge {
  background: #0f243c;
  border-color: rgba(204, 225, 255, 0.28);
}

html[data-nf-theme="dark"] .nf-botChallenge__refresh {
  color: rgba(142, 181, 255, 0.95);
  text-decoration: none;
}

html[data-nf-theme="dark"] .nf-botChallenge__refresh:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

html[data-nf-theme="dark"] .home-journey__num,
html[data-nf-theme="dark"] .step__num {
  background: #0f243c;
  border-color: var(--nf-gold);
  color: var(--nf-gold);
  box-shadow: 0 0 0 6px #0b1c33;
}

html[data-nf-theme="dark"] .step.is-active .step__num,
html[data-nf-theme="dark"] .steps .step.is-inview:hover .step__num {
  background: var(--nf-blue);
  color: #0b1c33;
  box-shadow: 0 0 0 6px rgba(110, 166, 255, 0.22);
}

html[data-nf-theme="dark"] .step h3 {
  color: #fff;
}

html[data-nf-theme="dark"] .step p,
html[data-nf-theme="dark"] .home-journey__step p,
html[data-nf-theme="dark"] .role-flow__item p {
  color: rgba(236, 244, 255, 0.92);
}

html[data-nf-theme="dark"] .step.is-active .step__body,
html[data-nf-theme="dark"] .steps .step.is-inview:hover .step__body {
  border-color: var(--nf-gold);
  background: #1e4268;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
}

html[data-nf-theme="dark"] h1,
html[data-nf-theme="dark"] h2,
html[data-nf-theme="dark"] h3,
html[data-nf-theme="dark"] h4,
html[data-nf-theme="dark"] .brand__text,
html[data-nf-theme="dark"] .value-item p,
html[data-nf-theme="dark"] .audience h3,
html[data-nf-theme="dark"] .feature h3,
html[data-nf-theme="dark"] .blog-card h3,
html[data-nf-theme="dark"] .home-journey__step h3,
html[data-nf-theme="dark"] .role-flow__item strong,
html[data-nf-theme="dark"] .screen-card__label strong,
html[data-nf-theme="dark"] .showcase__list li,
html[data-nf-theme="dark"] .cta-band h2 {
  color: var(--nf-heading);
}

html[data-nf-theme="dark"] p,
html[data-nf-theme="dark"] .lead,
html[data-nf-theme="dark"] .audience p,
html[data-nf-theme="dark"] .feature p,
html[data-nf-theme="dark"] .blog-card p,
html[data-nf-theme="dark"] .screen-card__label span,
html[data-nf-theme="dark"] .cta-band p,
html[data-nf-theme="dark"] .nav__link {
  color: var(--nf-ink-2);
}

html[data-nf-theme="dark"] .btn--ghost {
  background: transparent;
  border-color: var(--nf-border-2);
  color: var(--nf-ink-2);
}

html[data-nf-theme="dark"] .btn--ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--nf-heading);
  border-color: rgba(255, 255, 255, 0.28);
}

/* Header CTAs : garder l’accent bleu même en sombre */
html[data-nf-theme="dark"] .header-actions .btn--primary {
  background: var(--nf-blue);
  border-color: var(--nf-blue);
  color: #0b1c33;
}

html[data-nf-theme="dark"] .header-actions .btn--primary:hover {
  background: var(--nf-blue-hover);
  border-color: var(--nf-blue-hover);
  color: #0b1c33;
}

html[data-nf-theme="dark"] .header-actions .btn--ghost {
  background: transparent;
  border-color: var(--nf-blue);
  color: var(--nf-blue);
}

html[data-nf-theme="dark"] .header-actions .btn--ghost:hover {
  background: var(--nf-blue-soft);
  border-color: var(--nf-blue);
  color: #eaf2ff;
}

html[data-nf-theme="dark"] .btn--light {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.22);
}

html[data-nf-theme="dark"] .nav__link:hover,
html[data-nf-theme="dark"] .nav__link.is-active {
  color: var(--nf-heading);
}

html[data-nf-theme="dark"] .lang-switch {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--nf-border);
}

html[data-nf-theme="dark"] .lang-switch a {
  color: var(--nf-ink-2);
}

html[data-nf-theme="dark"] .lang-switch a.is-active {
  background: var(--nf-brand);
  color: #fff;
}

html[data-nf-theme="dark"] .nav-toggle {
  background: var(--nf-bg-2);
  border-color: var(--nf-border);
  color: var(--nf-heading);
}

html[data-nf-theme="dark"] .nav-toggle span {
  background: currentColor;
}

html[data-nf-theme="dark"] .text-gold,
html[data-nf-theme="dark"] .eyebrow,
html[data-nf-theme="dark"] .trusted__label {
  color: var(--nf-gold);
}

html[data-nf-theme="dark"] .section--gold {
  background: var(--nf-blue-soft);
}

/* Icons as <img> — gold stroke baked into SVG; keep full opacity */
html[data-nf-theme="dark"] .value-item__icon,
html[data-nf-theme="dark"] .audience__icon,
html[data-nf-theme="dark"] .feature__icon,
html[data-nf-theme="dark"] .cta-band__icon {
  opacity: 1;
  filter: none;
}

/* Brand mark stays readable */
html[data-nf-theme="dark"] .brand__mark {
  filter: none;
  box-shadow: none;
  border-radius: 8px;
}

/* Trusted logos */
html[data-nf-theme="dark"] .logo-pill {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(204, 225, 255, 0.22);
  color: #fff;
  box-shadow: none;
  opacity: 1;
}

html[data-nf-theme="dark"] .marquee {
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

/* Forms — class is .field (not .form-field) */
html[data-nf-theme="dark"] .field input,
html[data-nf-theme="dark"] .field textarea,
html[data-nf-theme="dark"] .field select {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(204, 225, 255, 0.28);
  color: var(--nf-ink);
  color-scheme: dark;
}

html[data-nf-theme="dark"] .field input::placeholder,
html[data-nf-theme="dark"] .field textarea::placeholder {
  color: var(--nf-ink-3);
}

html[data-nf-theme="dark"] .field input:focus,
html[data-nf-theme="dark"] .field textarea:focus,
html[data-nf-theme="dark"] .field select:focus {
  border-color: var(--nf-blue);
  box-shadow: 0 0 0 3px rgba(110, 166, 255, 0.22);
}

html[data-nf-theme="dark"] .form-card .btn--primary {
  background: var(--nf-blue);
  color: #0b1c33;
  border-color: var(--nf-blue);
}

html[data-nf-theme="dark"] .form-card .btn--primary:hover {
  background: var(--nf-blue-hover);
  color: #0b1c33;
}

html[data-nf-theme="dark"] .nf-botChallenge__question,
html[data-nf-theme="dark"] .nf-botChallenge__hint,
html[data-nf-theme="dark"] .nf-botChallenge__error {
  color: var(--nf-ink-2);
}

html[data-nf-theme="dark"] .nf-botChallenge__error {
  color: #ffb4a8;
}

/* Tabs / chips */
html[data-nf-theme="dark"] .role-tabs__nav {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--nf-border);
}

html[data-nf-theme="dark"] .role-tabs__btn {
  color: var(--nf-ink-2);
}

html[data-nf-theme="dark"] .role-tabs__btn.is-active {
  background: var(--nf-brand);
  color: #fff;
}

html[data-nf-theme="dark"] .role-tabs__btn:hover {
  color: var(--nf-heading);
}

/* How-it-works circuit numbers — keep brand navy fill */
html[data-nf-theme="dark"] .role-flow__item span {
  background: var(--nf-gold-soft);
  color: var(--nf-gold);
}

/* Blog / misc muted labels */
html[data-nf-theme="dark"] .blog-card__meta,
html[data-nf-theme="dark"] .footer-col a,
html[data-nf-theme="dark"] .page-hero:not(.page-hero--media) .lead {
  color: var(--nf-ink-2);
}

html[data-nf-theme="dark"] .blog-share__toggle {
  border-color: rgba(204, 225, 255, 0.22);
  color: var(--nf-ink-2);
}

html[data-nf-theme="dark"] .blog-share__menu {
  background: #123457;
  border-color: rgba(204, 225, 255, 0.22);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

html[data-nf-theme="dark"] .blog-share__item {
  color: #eaf2ff;
}

html[data-nf-theme="dark"] .blog-share__item:hover,
html[data-nf-theme="dark"] .blog-share__item:focus-visible {
  background: rgba(110, 166, 255, 0.16);
}

html[data-nf-theme="dark"] .page-hero--media .page-hero__shade {
  background: linear-gradient(
    115deg,
    rgba(11, 28, 51, 0.88) 0%,
    rgba(11, 28, 51, 0.68) 55%,
    rgba(11, 28, 51, 0.55) 100%
  );
}

html[data-nf-theme="dark"] .blog-card__media,
html[data-nf-theme="dark"] .article__cover {
  background-color: #123457;
}

html[data-nf-theme="dark"] .blog-card__media > img,
html[data-nf-theme="dark"] .article__cover > img {
  opacity: 1;
  filter: none;
}

html[data-nf-theme="dark"] .blog-pagination__btn {
  background: #123457;
  border-color: rgba(204, 225, 255, 0.28);
  color: #eaf2ff;
}

html[data-nf-theme="dark"] .blog-pagination__btn.is-active {
  background: var(--nf-blue);
  border-color: var(--nf-blue);
  color: #0b1c33;
}

html[data-nf-theme="dark"] .leader__avatar {
  background: var(--nf-brand);
}

html[data-nf-theme="dark"] .screen-lightbox__dialog {
  background: #0b1c33;
}

/* Ticket cards inside light panels on platform — stay in product mock (dark) */
html[data-nf-theme="dark"] .ticket-card {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--nf-border);
  color: var(--nf-ink);
}

html[data-nf-theme="dark"] .ticket-card h4 {
  color: var(--nf-heading);
}

html[data-nf-theme="dark"] .ticket-card p {
  color: var(--nf-ink-2);
}

/* Market category — dark */
html[data-nf-theme="dark"] .market-tier__roof {
  background: #184872;
  color: #eaf2ff;
}

html[data-nf-theme="dark"] .market-tier__mark {
  color: #6ea6ff;
}

html[data-nf-theme="dark"] .market-tier--os .market-tier__head {
  background: var(--nf-blue);
  border-color: var(--nf-blue);
  color: #0b1c33;
  box-shadow: 0 8px 22px rgba(110, 166, 255, 0.22);
}

html[data-nf-theme="dark"] .market-tier--os .market-tier__head:hover,
html[data-nf-theme="dark"] .market-tier--os .market-tier__head:focus-visible {
  background: var(--nf-blue-hover);
  border-color: var(--nf-blue-hover);
  color: #0b1c33;
}

html[data-nf-theme="dark"] .market-tier--os .market-tier__level {
  background: rgba(11, 28, 51, 0.14);
  color: #0b1c33;
}

html[data-nf-theme="dark"] .market-tier--os .market-tier__panel {
  background: linear-gradient(165deg, #1a4a78 0%, #102846 75%);
  border-color: rgba(110, 166, 255, 0.5);
  color: #eaf2ff;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.4);
}

html[data-nf-theme="dark"] .market-tier--os .market-tier__tag {
  color: #8ab8ff;
}

html[data-nf-theme="dark"] .market-tier--os .market-tier__title,
html[data-nf-theme="dark"] .market-tier--os .market-caps__btn {
  color: #eaf2ff;
}

html[data-nf-theme="dark"] .market-tier--os .market-caps__icon {
  background: rgba(110, 166, 255, 0.2);
  color: #9ec4ff;
}

html[data-nf-theme="dark"] .market-caps__hint {
  color: rgba(234, 242, 255, 0.62);
}

html[data-nf-theme="dark"] .market-tier--os .market-tier__note {
  border-left-color: rgba(255, 255, 255, 0.18);
}

html[data-nf-theme="dark"] .market-tier--os .market-tier__note p {
  color: rgba(234, 242, 255, 0.82);
}

@media (max-width: 900px) {
  html[data-nf-theme="dark"] .market-tier--os .market-tier__note {
    border-top-color: rgba(255, 255, 255, 0.18);
  }
}

html[data-nf-theme="dark"] .market-tier--mid .market-tier__head,
html[data-nf-theme="dark"] .market-tier--mid .market-tier__panel {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(204, 225, 255, 0.18);
}

html[data-nf-theme="dark"] .market-tier--low .market-tier__head,
html[data-nf-theme="dark"] .market-tier--low .market-tier__panel {
  background: transparent;
  border-color: rgba(204, 225, 255, 0.14);
  opacity: 0.82;
}

html[data-nf-theme="dark"] .market-bridge__badge {
  background: rgba(110, 166, 255, 0.12);
  border-color: rgba(110, 166, 255, 0.4);
  color: #9ec4ff;
}

html[data-nf-theme="dark"] .ops-step {
  background: #1a3a5c;
  border-color: rgba(204, 225, 255, 0.28);
}

html[data-nf-theme="dark"] .cap-modal__backdrop {
  background: rgba(7, 16, 32, 0.55);
}

html[data-nf-theme="dark"] .cap-modal__dialog {
  background: #123457;
  border-color: rgba(110, 166, 255, 0.28);
  color: #eaf2ff;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
}

html[data-nf-theme="dark"] .cap-modal__close {
  color: rgba(234, 242, 255, 0.8);
}

html[data-nf-theme="dark"] .cap-modal__close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

html[data-nf-theme="dark"] .cap-modal__title {
  color: #fff;
}

html[data-nf-theme="dark"] .cap-modal__body {
  color: rgba(234, 242, 255, 0.88);
}

html[data-nf-theme="dark"] .market-caps--muted .market-caps__icon {
  border-color: rgba(204, 225, 255, 0.18);
  color: rgba(214, 228, 248, 0.55);
}

html[data-nf-theme="dark"] .market-value {
  background: transparent;
  border-color: rgba(204, 225, 255, 0.18);
}

html[data-nf-theme="dark"] .market-value__list li {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(204, 225, 255, 0.18);
  color: var(--nf-heading);
}

html[data-nf-theme="dark"] body.nav-open .header-panel,
html[data-nf-theme="dark"] body.nav-open .header-actions {
  background: var(--nf-bg-2);
}

@media (max-width: 960px) {
  html[data-nf-theme="dark"] body.nav-open .header-panel {
    background: #102846;
  }

  html[data-nf-theme="dark"] body.nav-open .header-actions {
    background: #0d223b;
    border-top-color: rgba(255, 255, 255, 0.08);
  }

  html[data-nf-theme="dark"] body.nav-open .header-panel__meta {
    border-bottom-color: rgba(255, 255, 255, 0.08);
  }
}

/* Floating back to top */
.back-to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 70;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid transparent;
  background: var(--nf-brand);
  color: #eaf2ff;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 12px 28px rgba(11, 28, 51, 0.22);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(12px) scale(0.92);
  transition:
    opacity 0.25s var(--nf-ease),
    transform 0.25s var(--nf-ease),
    visibility 0.25s,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
}

.back-to-top:hover {
  background: var(--nf-navy-2);
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(11, 28, 51, 0.28);
}

.back-to-top:focus-visible {
  outline: 2px solid var(--nf-blue);
  outline-offset: 3px;
}

.back-to-top svg {
  width: 20px;
  height: 20px;
  display: block;
}

html[data-nf-theme="dark"] .back-to-top {
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.4);
}

@media (max-width: 640px) {
  .back-to-top {
    right: 1rem;
    bottom: 1rem;
    width: 44px;
    height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .back-to-top {
    transition: opacity 0.15s ease, visibility 0.15s;
    transform: none;
  }

  .back-to-top:hover {
    transform: none;
  }
}

html[data-nf-theme="dark"] .nf-consent-banner__inner,
html[data-nf-theme="dark"] .nf-legal-modal__dialog {
  background: #123457;
  border-color: rgba(110, 166, 255, 0.35);
  color: #eaf2ff;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

html[data-nf-theme="dark"] .nf-consent-banner__copy strong,
html[data-nf-theme="dark"] .nf-legal-modal__dialog h2,
html[data-nf-theme="dark"] .nf-legal-modal__body h3,
html[data-nf-theme="dark"] .nf-cookie-opt__head strong {
  color: #fff;
}

html[data-nf-theme="dark"] .nf-consent-banner__copy p,
html[data-nf-theme="dark"] .nf-legal-modal__body,
html[data-nf-theme="dark"] .nf-cookie-opt p {
  color: rgba(234, 242, 255, 0.82);
}

html[data-nf-theme="dark"] .nf-cookie-opt {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(204, 225, 255, 0.18);
}

html[data-nf-theme="dark"] .nf-legal-modal__footer {
  border-top-color: rgba(204, 225, 255, 0.16);
}

html[data-nf-theme="dark"] .nf-legal-modal__close {
  color: rgba(234, 242, 255, 0.75);
}

html[data-nf-theme="dark"] .nf-legal-modal__close:hover {
  background: rgba(110, 166, 255, 0.16);
  color: #fff;
}

html[data-nf-theme="dark"] .nf-consent-banner__backdrop,
html[data-nf-theme="dark"] .nf-legal-modal__backdrop {
  background: rgba(7, 16, 32, 0.55);
}
