/* NKS V14 — unified light/dark palette + button/contrast hardening */
:root{
  --nks-page:#f7faff;
  --nks-page-2:#ffffff;
  --nks-surface:#ffffff;
  --nks-surface-soft:#f5f8fc;
  --nks-surface-raised:#ffffff;
  --nks-text:#0f172a;
  --nks-text-2:#475569;
  --nks-text-3:#64748b;
  --nks-border:rgba(15,23,42,.10);
  --nks-border-strong:rgba(15,23,42,.18);
  --nks-primary:#0a63ff;
  --nks-primary-hover:#0755dc;
  --nks-primary-soft:#eaf2ff;
  --nks-primary-text:#ffffff;
  --nks-focus:rgba(10,99,255,.18);
  --nks-header:rgba(255,255,255,.88);
  --nks-shadow:0 16px 42px rgba(15,35,70,.08);
  --nks-shadow-hover:0 24px 56px rgba(10,99,255,.13);
  --nks-danger:#c62828;
  --nks-success:#138a55;
  --nks-warning:#a15c00;
  --nks-dark-section:#07101c;
  --nks-dark-section-text:#f8fbff;
  --nks-dark-section-muted:#bac6d5;
}

body.nks-dark-mode{
  --nks-page:#07101f;
  --nks-page-2:#091425;
  --nks-surface:#0d192b;
  --nks-surface-soft:#101e33;
  --nks-surface-raised:#13223a;
  --nks-text:#f4f8ff;
  --nks-text-2:#c9d5e5;
  --nks-text-3:#9fb0c6;
  --nks-border:rgba(148,163,184,.16);
  --nks-border-strong:rgba(148,163,184,.26);
  --nks-primary:#2188ff;
  --nks-primary-hover:#3b9aff;
  --nks-primary-soft:#102c4d;
  --nks-primary-text:#ffffff;
  --nks-focus:rgba(56,189,248,.20);
  --nks-header:rgba(7,16,31,.90);
  --nks-shadow:0 18px 44px rgba(0,0,0,.28);
  --nks-shadow-hover:0 24px 58px rgba(0,0,0,.40);
  --nks-danger:#ff9b9b;
  --nks-success:#72e3ac;
  --nks-warning:#ffd18a;
  --nks-dark-section:#030811;
  --nks-dark-section-text:#ffffff;
  --nks-dark-section-muted:#c0cad8;
}

html,body{background:var(--nks-page)!important;color:var(--nks-text)!important;}
body{background:linear-gradient(180deg,var(--nks-page) 0%,var(--nks-page-2) 100%)!important;}

/* Typography: keep all regular content readable on both palettes. */
body h1,body h2,body h3,body h4,body h5,body h6,body strong,body label,body summary,
body .project-info h3,body .profile-value,body .contact-details strong{color:var(--nks-text)!important;}
body p,body li,body .section-subtitle,body .faq-content,body .profile-help,
body .project-info p,body .contact-details span,body .auth-links,body .site-footer__note,
body .site-footer__brand p,body .partner-info p,body .service-card p,body .service-content p,
body .founder-content p{color:var(--nks-text-2)!important;}
body .text-gradient{
  background:linear-gradient(135deg,var(--nks-text) 0%,#1553b3 54%,var(--nks-primary) 100%)!important;
  background-clip:text!important;-webkit-background-clip:text!important;-webkit-text-fill-color:transparent!important;
}
body.nks-dark-mode .text-gradient{
  background:linear-gradient(135deg,#ffffff 0%,#b9e5ff 48%,#58baff 100%)!important;
  background-clip:text!important;-webkit-background-clip:text!important;-webkit-text-fill-color:transparent!important;
}

/* Header/navigation */
body header{background:var(--nks-header)!important;border-bottom:1px solid var(--nks-border)!important;box-shadow:0 10px 30px rgba(15,35,70,.05)!important;}
body.nks-dark-mode header{box-shadow:0 12px 36px rgba(0,0,0,.24)!important;}
body header nav > a:not(.btn-nav):not(.btn-nav-outline){color:var(--nks-text)!important;}
body header nav > a:not(.btn-nav):not(.btn-nav-outline):hover,
body header nav > a.active:not(.btn-nav):not(.btn-nav-outline){background:var(--nks-primary-soft)!important;color:var(--nks-primary)!important;}

/* Primary actions: never derive a button background from --text. */
body .btn-primary,
body .btn-nav,
body .btn-submit,
body .btn-contact,
body .btn-home,
body .send-btn,
body .notification-activate,
body .project-action,
body #auth-menu a.btn-nav,
body #auth-menu a[href*="commander"],
body #auth-menu a[href*="espace-client"]{
  background:linear-gradient(135deg,var(--nks-primary) 0%,#1684ff 100%)!important;
  color:var(--nks-primary-text)!important;
  border-color:transparent!important;
  -webkit-text-fill-color:var(--nks-primary-text)!important;
  text-shadow:none!important;
  box-shadow:0 12px 28px rgba(10,99,255,.20)!important;
}
body .btn-primary:hover,
body .btn-nav:hover,
body .btn-submit:hover,
body .btn-contact:hover,
body .btn-home:hover,
body .send-btn:hover,
body .notification-activate:hover,
body #auth-menu a.btn-nav:hover,
body #auth-menu a[href*="commander"]:hover,
body #auth-menu a[href*="espace-client"]:hover{
  background:linear-gradient(135deg,var(--nks-primary-hover) 0%,#2c91ff 100%)!important;
  color:#fff!important;-webkit-text-fill-color:#fff!important;
  transform:translateY(-1px);
}

/* Secondary/outlined actions */
body .btn-nav-outline,
body .btn-secondary,
body .btn-submit-outline,
body .chat-refresh,
body .btn-toggle-pwd,
body .founder-link,
body #auth-menu a.btn-nav-outline,
body #auth-menu a[href*="connexion"]{
  background:var(--nks-surface-raised)!important;
  color:var(--nks-text)!important;
  -webkit-text-fill-color:var(--nks-text)!important;
  border:1px solid var(--nks-border-strong)!important;
  box-shadow:0 8px 22px rgba(15,35,70,.05)!important;
}
body.nks-dark-mode .btn-nav-outline,
body.nks-dark-mode .btn-secondary,
body.nks-dark-mode .btn-submit-outline,
body.nks-dark-mode .chat-refresh,
body.nks-dark-mode .btn-toggle-pwd,
body.nks-dark-mode .founder-link,
body.nks-dark-mode #auth-menu a.btn-nav-outline,
body.nks-dark-mode #auth-menu a[href*="connexion"]{box-shadow:0 8px 22px rgba(0,0,0,.20)!important;}
body .btn-nav-outline:hover,
body .btn-secondary:hover,
body .btn-submit-outline:hover,
body .chat-refresh:hover,
body .btn-toggle-pwd:hover,
body .founder-link:hover,
body #auth-menu a[href*="connexion"]:hover{
  background:var(--nks-primary-soft)!important;color:var(--nks-primary)!important;-webkit-text-fill-color:var(--nks-primary)!important;border-color:rgba(10,99,255,.30)!important;
}

/* Inline-styled hero secondary CTA must follow the active theme too. */
body .hero-actions .btn-nav-outline{background:rgba(255,255,255,.88)!important;color:var(--nks-primary)!important;-webkit-text-fill-color:var(--nks-primary)!important;border:1px solid rgba(10,99,255,.12)!important;}
body.nks-dark-mode .hero-actions .btn-nav-outline{background:rgba(13,25,43,.88)!important;color:#8fd6ff!important;-webkit-text-fill-color:#8fd6ff!important;border-color:rgba(56,189,248,.18)!important;}

/* Disabled states */
body button:disabled,body .btn-primary:disabled,body .btn-submit:disabled,body [aria-disabled="true"]{background:#d8e0eb!important;color:#8793a3!important;-webkit-text-fill-color:#8793a3!important;box-shadow:none!important;opacity:1!important;cursor:not-allowed!important;}
body.nks-dark-mode button:disabled,body.nks-dark-mode .btn-primary:disabled,body.nks-dark-mode .btn-submit:disabled,body.nks-dark-mode [aria-disabled="true"]{background:#27384e!important;color:#8292a8!important;-webkit-text-fill-color:#8292a8!important;}

/* Surfaces/cards */
body .service-card,body .showcase-card,body .glass-card,body .partner-card,body .founder-card,
body .contact-item,body .project-card,body .support-card,body details,body .auth-container,
body .success-container,body .order-form,body .empty-state,body .profile-box,body .chat-shell,
body .chat-window,body .chat-projects,body .chat-messages,body .chat-input-area,body .form-wrapper,
body .gallery-card,body .why-card,body .profile-row{
  background:linear-gradient(180deg,var(--nks-surface) 0%,var(--nks-surface-soft) 100%)!important;
  border-color:var(--nks-border)!important;color:var(--nks-text)!important;box-shadow:var(--nks-shadow)!important;
}
body .showcase-media,body .service-preview,body .split-image,body .partner-logo-panel,
body .contact-icon,body .service-icon{background:var(--nks-surface-soft)!important;border-color:var(--nks-border)!important;}
body .service-card:hover,body .showcase-card:hover,body .partner-card:hover,body .contact-item:hover,
body .project-card:hover,body details:hover{border-color:rgba(10,99,255,.22)!important;box-shadow:var(--nks-shadow-hover)!important;}

/* Inputs */
body input,body textarea,body select{background:var(--nks-surface-raised)!important;color:var(--nks-text)!important;border:1px solid var(--nks-border-strong)!important;}
body input::placeholder,body textarea::placeholder{color:var(--nks-text-3)!important;opacity:.9!important;}
body input:focus,body textarea:focus,body select:focus{border-color:var(--nks-primary)!important;box-shadow:0 0 0 4px var(--nks-focus)!important;}
body select option{background:var(--nks-surface)!important;color:var(--nks-text)!important;}

/* Statuses */
body .status-badge{background:var(--nks-primary-soft)!important;color:var(--nks-primary)!important;border-color:rgba(10,99,255,.15)!important;}
body .status-msg{background:var(--nks-primary-soft)!important;color:var(--nks-primary)!important;}
body .status-msg.error{background:rgba(239,68,68,.10)!important;color:var(--nks-danger)!important;}

/* Dark feature sections keep their intentionally dark design in both themes. */
body .why-us-section{background:var(--nks-dark-section)!important;color:var(--nks-dark-section-text)!important;}
body .why-us-section h1,body .why-us-section h2,body .why-us-section h3,body .why-us-section h4,
body .why-us-section li,body .why-us-section strong{color:var(--nks-dark-section-text)!important;}
body .why-us-section p,body .why-us-section .why-list-content p,body .why-us-section .split-text p{color:var(--nks-dark-section-muted)!important;}
body .why-us-section .text-gradient{background:none!important;-webkit-text-fill-color:#fff!important;color:#fff!important;}

/* Footer */
body .site-footer{background:linear-gradient(180deg,var(--nks-surface-soft),var(--nks-surface))!important;color:var(--nks-text)!important;border-top:1px solid var(--nks-border)!important;}
body .site-footer__brand h2,body .site-footer__column h3,body .site-footer__social-title{color:var(--nks-text)!important;}
body .site-footer__links a,body .site-footer__bottom a{color:var(--nks-text-2)!important;}
body .site-footer__links a:hover,body .site-footer__bottom a:hover{color:var(--nks-primary)!important;}
body .site-footer__social{background:var(--nks-surface-raised)!important;color:var(--nks-text)!important;border-color:var(--nks-border)!important;}

/* Client area */
body .sidebar-menu li{color:var(--nks-text-2)!important;}
body .sidebar-menu li:hover{background:var(--nks-primary-soft)!important;color:var(--nks-text)!important;}
body .sidebar-menu li.active{background:linear-gradient(135deg,var(--nks-primary),#1684ff)!important;color:#fff!important;}
body .message-bubble{background:var(--nks-surface-raised)!important;color:var(--nks-text)!important;border-color:var(--nks-border)!important;}
body .message-row.client .message-bubble{background:linear-gradient(135deg,var(--nks-primary),#1684ff)!important;color:#fff!important;}
body .message-sender{color:var(--nks-text-3)!important;}

/* Theme switch itself */
body .nks-theme-toggle{background:var(--nks-surface-raised)!important;color:var(--nks-text)!important;border-color:var(--nks-border-strong)!important;box-shadow:var(--nks-shadow)!important;}
body .nks-theme-toggle__label{color:var(--nks-text)!important;}
body .nks-theme-toggle__icon{color:#fff!important;background:linear-gradient(135deg,var(--nks-primary),#18b7ff)!important;}
body .nks-theme-toggle svg{width:18px;height:18px;}

/* Explicitly protect intro copy from global palette overrides. */
body .site-intro .intro-title,body .site-intro .intro-title span:not(.intro-blue):not(.intro-dot){color:#fff!important;-webkit-text-fill-color:#fff!important;}
body .site-intro .intro-blue,body .site-intro .intro-dot{color:#1684ff!important;-webkit-text-fill-color:#1684ff!important;}
body .site-intro .intro-subtitle{color:rgba(255,255,255,.88)!important;}
body .site-intro .intro-subtitle strong{color:#1684ff!important;}

@media(max-width:768px){
  body header #auth-menu > a,body header #auth-menu > button{min-height:38px!important;padding:0 16px!important;}
  body .nks-theme-toggle{max-width:calc(100vw - 28px)!important;}
}

/* Small components / chips / icons — final contrast sweep */
body .founder-tags li,body .partner-card__category,body .partner-card__badge,
body .floating-badge,body .service-badge,body .founder-kicker{
  background:var(--nks-primary-soft)!important;color:var(--nks-primary)!important;border-color:rgba(10,99,255,.16)!important;
}
body .step-icon,body .step-number,body .success-container .icon,body .site-footer__social-icon{
  background:var(--nks-surface-raised)!important;color:var(--nks-primary)!important;border-color:var(--nks-border)!important;
}
body .stat-label,body .partner-link,body .service-content li,body .benefits-list li{color:var(--nks-text-2)!important;}
body .partner-link{color:var(--nks-primary)!important;}
body .auth-divider,body .google-loading{color:var(--nks-text-3)!important;}
body .auth-divider::before,body .auth-divider::after{background:var(--nks-border)!important;}
body .auth-divider span{background:var(--nks-surface)!important;color:var(--nks-text-3)!important;}
body .menu-badge{background:var(--nks-primary)!important;color:#fff!important;}
body .sidebar-menu li.logout{color:var(--nks-danger)!important;}
body .sidebar-menu li.logout:hover{background:rgba(239,68,68,.09)!important;}
body .footer-link,body .auth-links a{color:var(--nks-primary)!important;}
body .footer-link:hover,body .auth-links a:hover{color:var(--nks-primary-hover)!important;}
