/* ============================================================================
   Okturn — THÈME SOMBRE (01/10/2026). Activé par html[data-theme="dark"], posé par assets/js/theme.js
   (réglage : automatique = système, clair, sombre ; mémorisé dans le navigateur). Les composants lisent les
   variables de tokens.css ; les quelques couleurs écrites en dur (chat, conversation publique, suivi, home)
   sont reprises ici.
   ============================================================================ */
html[data-theme="dark"] {
  color-scheme: dark;
  --fp-white: #15171c; --fp-cream: #1b1a1f; --fp-snow: #1a1c21;
  --fp-gray-50: #1a1c21; --fp-gray-100: #22252b; --fp-gray-150: #272a31; --fp-gray-200: #30343c; --fp-gray-300: #3d424b;
  --fp-gray-400: #7a7f88; --fp-gray-500: #a3a7ae; --fp-gray-600: #c6c9ce; --fp-gray-700: #d8dade; --fp-gray-800: #e8e9ec; --fp-gray-900: #f3f3f5; --fp-gray-950: #fafafa;
  --fp-flame-soft: rgba(255, 87, 34, .16); --fp-flame-glow: rgba(255, 87, 34, .22);
  --fp-success-soft: rgba(16, 185, 129, .16); --fp-success-text: #5fe3b0;
  --fp-warning-soft: rgba(245, 158, 11, .16); --fp-warning-text: #ffc866;
  --fp-error-soft: rgba(239, 68, 68, .16); --fp-error-text: #ff8a8a;
  --fp-info-soft: rgba(59, 130, 246, .16); --fp-info-text: #8ab4ff;
  --bg: #121316; --bg-subtle: #1a1c21; --bg-warm: #1b1a1f; --bg-card: #1e2026; --bg-overlay: rgba(0, 0, 0, .6);
  --text: #f3f3f5; --text-secondary: #c6c9ce; --text-tertiary: #a3a7ae; --text-muted: #7a7f88;
  --border-subtle: rgba(255,255,255,.07); --border: rgba(255,255,255,.11); --border-strong: rgba(255,255,255,.18);
  --status-pending: #30343c; --status-pending-bg: #22252b;
}
html[data-theme="dark"] body { background: var(--bg); color: var(--text); }
html[data-theme="dark"] .public-header { background: rgba(18,19,22,.9); }
html[data-theme="dark"] .burger span { background: var(--text); }
html[data-theme="dark"] .mobmenu { background: #1a1c21; border-top-color: rgba(255,255,255,.08); } html[data-theme="dark"] .mobmenu > a { color: var(--text); }
html[data-theme="dark"] .mobmenu-light { color: var(--text); border-color: rgba(255,255,255,.14); } html[data-theme="dark"] .mobmenu-dark { background: #f3f3f5; color: #121316; }

/* ---- home ---- */
html[data-theme="dark"] .ok-hero { background: radial-gradient(120% 80% at 50% 0%, #2a1d17 0%, #1b1a1f 55%, #121316 100%); }
html[data-theme="dark"] .ok-ticker > span { color: #c6c9ce; } html[data-theme="dark"] .ok-punch { color: #e8e9ec; }
html[data-theme="dark"] .ok-hero-form, html[data-theme="dark"] .ok-how-item, html[data-theme="dark"] .ok-live-card, html[data-theme="dark"] .ok-who-grid > div, html[data-theme="dark"] .ok-who-points li, html[data-theme="dark"] .ok-faq details, html[data-theme="dark"] .ok-demo-evt, html[data-theme="dark"] .ok-pain-card:hover { background: #1e2026; border-color: rgba(255,255,255,.08); }
html[data-theme="dark"] .ok-hero-form textarea, html[data-theme="dark"] .ok-pain-card, html[data-theme="dark"] .ok-hero-chip, html[data-theme="dark"] .ok-demo-evt, html[data-theme="dark"] .ok-demo-txt span, html[data-theme="dark"] .ok-live-steps strong, html[data-theme="dark"] .ok-faq summary { color: var(--text); }
html[data-theme="dark"] .ok-hero-mic { background: #2a2d34; color: #e8e9ec; } html[data-theme="dark"] .ok-hero-fchip, html[data-theme="dark"] .ok-pain-card { background: #1a1c21; border-color: rgba(255,255,255,.08); }
html[data-theme="dark"] .ok-pain, html[data-theme="dark"] .ok-live, html[data-theme="dark"] .ok-price, html[data-theme="dark"] .ok-final, html[data-theme="dark"] .ok-demo { background: #121316; }
html[data-theme="dark"] .ok-how, html[data-theme="dark"] .ok-who, html[data-theme="dark"] .ok-faq { background: #1a1c21; }
html[data-theme="dark"] .ok-demo-txt { background: #1e2026; } html[data-theme="dark"] .ok-demo-launch .ok-demo-txt { background: #1a1c21; border-color: rgba(255,255,255,.18); }
html[data-theme="dark"] li.is-now .ok-demo-txt, html[data-theme="dark"] li.is-blocked .ok-demo-txt { background: #22252b; }
html[data-theme="dark"] .ok-demo-state { background: #2a2d34; color: #a3a7ae; } html[data-theme="dark"] li.is-now .ok-demo-evt { background: #2a1f1a; color: #ffb59a; }
html[data-theme="dark"] li.is-blocked .ok-demo-evt { background: #2a1a1a; color: #ff9a9a; } html[data-theme="dark"] .ok-demo-line { background: #30343c; }
html[data-theme="dark"] .ok-demo-av { box-shadow: 0 0 0 4px #121316; } html[data-theme="dark"] .ok-demo-time { color: #a3a7ae; }
html[data-theme="dark"] .ok-live-bar { background: #2a2d34; } html[data-theme="dark"] .ok-live-wait { background: #2a1f1a; color: #ffb59a; } html[data-theme="dark"] .ok-live-steps li { border-top-color: rgba(255,255,255,.07); }
html[data-theme="dark"] .ok-live-steps li > span { background: #1e2026; border-color: #3d424b; } html[data-theme="dark"] .ok-live-tools em { border-color: rgba(255,255,255,.14); }
html[data-theme="dark"] .ok-price-card { background: #1a1c21; border-color: rgba(255,255,255,.08); } html[data-theme="dark"] .ok-price-card.is-pro { background: #0b0c0f; }
html[data-theme="dark"] .ok-btn-light { background: #1e2026; color: var(--text); border-color: rgba(255,255,255,.14); }
html[data-theme="dark"] .ok-faq p, html[data-theme="dark"] .ok-sub, html[data-theme="dark"] .ok-how-item p, html[data-theme="dark"] .ok-who-grid p { color: var(--text-secondary); }

/* ---- conversation publique + fenêtre ---- */
html[data-theme="dark"] .okp-modal, html[data-theme="dark"] .okp-modal-head { background: #121316; } html[data-theme="dark"] .okp-modal-head { border-bottom-color: rgba(255,255,255,.08); }
html[data-theme="dark"] .okp-modal-close, html[data-theme="dark"] .okp-ok .okp-bubble, html[data-theme="dark"] .okp-card, html[data-theme="dark"] .okp-demo, html[data-theme="dark"] .okp-form, html[data-theme="dark"] .okp-chip, html[data-theme="dark"] .okp-devt { background: #1e2026; color: var(--text); border-color: rgba(255,255,255,.08); }
html[data-theme="dark"] .okp-modal .okp-form { box-shadow: 0 -10px 30px rgba(18,19,22,.9), 0 2px 4px rgba(0,0,0,.3); }
html[data-theme="dark"] .okp-row textarea, html[data-theme="dark"] .okp-ib, html[data-theme="dark"] .okp-steps span, html[data-theme="dark"] .okp-dtxt span { color: var(--text); } html[data-theme="dark"] .okp-ib:hover { background: #2a2d34; }
html[data-theme="dark"] .okp-dtxt, html[data-theme="dark"] .okp-fchip, html[data-theme="dark"] .okp-ok .okp-tag { background: #22252b; border-color: rgba(255,255,255,.08); } html[data-theme="dark"] .okp-dlaunch .okp-dtxt { background: #1a1c21; border-color: rgba(255,255,255,.18); }
html[data-theme="dark"] .okp-demo li.is-now .okp-dtxt { background: #262930; } html[data-theme="dark"] .okp-dstate { background: #2a2d34; color: #a3a7ae; }
html[data-theme="dark"] .okp-demo li.is-now .okp-devt { background: #2a1f1a; color: #ffb59a; } html[data-theme="dark"] .okp-dline { background: #30343c; } html[data-theme="dark"] .okp-dav { box-shadow: 0 0 0 4px #1e2026; }
html[data-theme="dark"] .okp-steps em { background: rgba(16,185,129,.16); color: #5fe3b0; } html[data-theme="dark"] .okp-send:disabled { background: #30343c; }
html[data-theme="dark"] .okfab { background: #f3f3f5; color: #121316; }

/* ---- chat de l'app ---- */
html[data-theme="dark"] .ok-chat { --ok-bg: #121316; --ok-card: #1e2026; --ok-ink: #f3f3f5; --ok-mute: #a3a7ae; --ok-line: rgba(255,255,255,.12); }
html[data-theme="dark"] .ok-head { background: rgba(18,19,22,.9); border-bottom-color: rgba(255,255,255,.08); } html[data-theme="dark"] .ok-icon-btn:hover { background: rgba(255,255,255,.08); }
html[data-theme="dark"] .ok-drawer { background: #1a1c21; } html[data-theme="dark"] .ok-drawer-item { border-top-color: rgba(255,255,255,.06); } html[data-theme="dark"] .ok-drawer-item.is-current, html[data-theme="dark"] .ok-drawer-item:hover { background: #22252b; }
html[data-theme="dark"] .ok-chip, html[data-theme="dark"] .ok-form, html[data-theme="dark"] .ok-card, html[data-theme="dark"] .ok-filechip { background: #1e2026; border-color: rgba(255,255,255,.08); }
html[data-theme="dark"] .ok-composer { background: linear-gradient(to top, #121316 70%, rgba(18,19,22,0)); }
html[data-theme="dark"] .ok-card-head { border-bottom-color: rgba(255,255,255,.07); } html[data-theme="dark"] .ok-pill { background: #2a2d34; color: #d8dade; } html[data-theme="dark"] .ok-pill-action { background: rgba(16,185,129,.16); color: #5fe3b0; }
html[data-theme="dark"] .ok-step-email input { background: #22252b; color: var(--text); } html[data-theme="dark"] .ok-msg-ok .ok-file-tag { background: #2a2d34; }
html[data-theme="dark"] .ok-send:disabled { background: #30343c; } html[data-theme="dark"] .ok-typing i { background: #5a5f68; }

/* ---- avancement en direct ---- */
html[data-theme="dark"] .lv-head, html[data-theme="dark"] .lv-card, html[data-theme="dark"] .lv-activity, html[data-theme="dark"] .lv-tool, html[data-theme="dark"] .lv-btn { background: #1e2026; color: var(--text); border-color: rgba(255,255,255,.1); }
html[data-theme="dark"] .lv-bar { background: #2a2d34; } html[data-theme="dark"] .lv-wait { background: #2a1f1a; color: #ffb59a; } html[data-theme="dark"] .lv-wait.is-blocked { background: #2a1a1a; color: #ff9a9a; } html[data-theme="dark"] .lv-wait.is-done { background: #16302a; color: #7fe8bf; }
html[data-theme="dark"] .lv-step::before { background: #30343c; } html[data-theme="dark"] .lv-step-n { box-shadow: 0 0 0 3px #121316; } html[data-theme="dark"] .lv-step.is-pending .lv-step-n { background: #30343c; color: #a3a7ae; }
html[data-theme="dark"] .lv-answer { background: #22252b; } html[data-theme="dark"] .lv-problem { background: #2a1a1a; color: #ff9a9a; } html[data-theme="dark"] .lv-activity li { border-top-color: rgba(255,255,255,.07); }
html[data-theme="dark"] .lv-state, html[data-theme="dark"] .lv-time { color: #a3a7ae; } html[data-theme="dark"] .lv-state b { color: var(--text); } html[data-theme="dark"] .lv-tool-main { background: var(--fp-flame); color: #fff; }

/* ---- bouton de réglage ---- */
.theme-btn { width: 40px; height: 40px; border: 1px solid var(--border, #E5E5E7); background: var(--bg-card, #fff); color: var(--text, #18181B); border-radius: 50%; cursor: pointer; display: inline-grid; place-items: center; font-size: 15px; font-weight: 700; line-height: 1; -webkit-tap-highlight-color: transparent; }
.theme-btn:hover { border-color: var(--fp-flame, #FF5722); }
@media (max-width: 767px) { .public-header .theme-btn { display: none; } }   /* sur mobile, le réglage est dans le menu burger (François 01/10) */
.theme-row { display: flex; gap: 6px; padding: 10px 0 4px; align-items: center; }
.theme-row span { flex: 1; font-size: 14px; color: var(--text-tertiary, #71717A); }
.theme-row button { height: 40px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border, #E5E5E7); background: var(--bg-card, #fff); color: var(--text, #18181B); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.theme-row button.is-on { background: var(--fp-flame, #FF5722); color: #fff; border-color: transparent; }

/* ===== Tour visuel 02/10/2026 (nuit) — APPLICATION CONNECTÉE =====
   Couleurs claires écrites en dur dans app.css et dans le <style> des pages : en sombre, elles faisaient des blocs blancs
   avec un texte devenu clair (illisible) ou des boutons « fond = couleur du texte » (blanc sur blanc). */
/* pastilles d'état, alertes, chronologie */
html[data-theme="dark"] .app-badge-in_progress { background: rgba(59,130,246,.16); color: #8ab4ff; }
html[data-theme="dark"] .app-badge-completed { background: rgba(16,185,129,.16); color: #5fe3b0; }
html[data-theme="dark"] .app-badge-blocked { background: rgba(239,68,68,.16); color: #ff8a8a; }
html[data-theme="dark"] .app-badge-cancelled { background: #2a2d34; color: #a3a7ae; }
html[data-theme="dark"] .app-badge-pending { background: rgba(245,158,11,.16); color: #ffc866; }
html[data-theme="dark"] .app-alert-success { background: rgba(16,185,129,.14); color: #5fe3b0; }
html[data-theme="dark"] .app-alert-error { background: rgba(239,68,68,.14); color: #ff9a9a; }
html[data-theme="dark"] .app-alert-info { background: rgba(59,130,246,.14); color: #a9c7ff; }
html[data-theme="dark"] .app-alert-warning { background: rgba(245,158,11,.14); color: #ffd27a; }
html[data-theme="dark"] .app-timeline-marker.is-completed { background: rgba(16,185,129,.18); color: #5fe3b0; }
html[data-theme="dark"] .app-timeline-marker.is-blocked { background: rgba(239,68,68,.18); color: #ff8a8a; }
html[data-theme="dark"] .app-timeline-step.step-blocked .app-timeline-body { background: rgba(239,68,68,.1); }
html[data-theme="dark"] .app-timeline-problem { background: rgba(239,68,68,.14); color: #ff9a9a; }
html[data-theme="dark"] .app-stat-trend.up { color: #5fe3b0; } html[data-theme="dark"] .app-stat-trend.down { color: #ff8a8a; }
html[data-theme="dark"] .app-launch-step-meta.warning, html[data-theme="dark"] .fp-step-contact-info-missing, html[data-theme="dark"] .fp-save-bar-dirty { color: #fbbf24; }
/* zones « supprimer / retirer » : fond rouge pâle → rouge très sombre, textes rosés */
html[data-theme="dark"] .app-danger-zone, html[data-theme="dark"] .app-danger-zone-v13 { background: rgba(239,68,68,.07); border-color: rgba(239,68,68,.35); }
html[data-theme="dark"] .app-danger-zone h2, html[data-theme="dark"] .app-danger-zone h3, html[data-theme="dark"] .app-danger-zone-v13 h2, html[data-theme="dark"] .app-danger-zone-v13 h3 { color: #ff8a8a; }
html[data-theme="dark"] .app-danger-zone p, html[data-theme="dark"] .app-danger-zone-v13 p { color: #f3b4b4; }
/* éditeur de process (pages/app/model_new.php) */
html[data-theme="dark"] .fp-step-v2-title-input:hover, html[data-theme="dark"] .fp-step-v2-title-input:focus { background: #22252b; }
html[data-theme="dark"] .fp-step-v2-kebab-menu, html[data-theme="dark"] .fp-step-contact-create-btn, html[data-theme="dark"] .fp-save-bar { background: var(--bg-card); }
html[data-theme="dark"] .fp-step-v2-section select { background: #22252b; color: var(--text); }
html[data-theme="dark"] .fp-step-details-hint { background: rgba(245,158,11,.14); border-color: rgba(245,158,11,.35); color: #ffd27a; }
html[data-theme="dark"] .fp-compact-bar { color: #ffb59a; }
html[data-theme="dark"] .app-step-card.fp-step-v2:hover { border-color: #4a4f58; }
html[data-theme="dark"] .fp-save-bar.is-pulsing { animation-name: fp-save-bar-pulse-dark; }
@keyframes fp-save-bar-pulse-dark { 0% { background: #1e2026; } 20% { background: #2a1f1a; } 100% { background: #1e2026; } }
/* facturation, offres, SMS */
html[data-theme="dark"] .fp-usage-card, html[data-theme="dark"] .fp-billing-history, html[data-theme="dark"] .fp-upgrade-card, html[data-theme="dark"] .fp-upgrade-faq-item,
html[data-theme="dark"] .fp-upgrade-toggle, html[data-theme="dark"] .fp-upgrade-hero-pill, html[data-theme="dark"] .fp-upgrade-reassure-pill { background: var(--bg-card); border-color: rgba(255,255,255,.1); }
html[data-theme="dark"] .fp-usage-bar { background: #2a2d34; }
html[data-theme="dark"] .fp-upgrade-hero { background: linear-gradient(135deg, #2a1d17 0%, #1e2026 100%); border-color: rgba(255,138,80,.25); }
html[data-theme="dark"] .fp-billing-perks { background: rgba(245,158,11,.12); border-color: rgba(245,158,11,.35); }
html[data-theme="dark"] .fp-billing-perks-title, html[data-theme="dark"] .fp-billing-perks-list, html[data-theme="dark"] .fp-billing-perks-link, html[data-theme="dark"] .fp-billing-perks-icon { color: #ffd27a; }
html[data-theme="dark"] .fp-billing-upsell-cta, html[data-theme="dark"] .fp-upgrade-toggle-btn.active, html[data-theme="dark"] .fp-upgrade-card-badge-current, html[data-theme="dark"] .fp-upgrade-btn-secondary { color: #121316; }
html[data-theme="dark"] .fp-upgrade-save-badge { background: rgba(16,185,129,.16); color: #5fe3b0; }
html[data-theme="dark"] .fp-upgrade-check { color: #5fe3b0; }
/* chat : erreur de la carte, trait entre les étapes */
html[data-theme="dark"] .ok-card-error { background: rgba(239,68,68,.14); color: #ff9a9a; }
html[data-theme="dark"] .ok-step + .ok-step::before { background: #30343c; }
/* barre latérale : bouton de déconnexion (icône en trait) */
.app-user-logout { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; min-height: 36px; }
.app-workspace-chevron svg { display: block; }
/* programmations : bandeau « offre Pro » (texte brun foncé sur fond devenu sombre) */
html[data-theme="dark"] .sc-gate { color: #ffb59a; }
/* vue d'ensemble : bloc « Pour bien démarrer » */
html[data-theme="dark"] .fp-starter { background: linear-gradient(135deg, #2a1d17 0%, #1e2026 100%); border-color: rgba(251,146,60,.3); }
html[data-theme="dark"] .fp-starter-check--todo { background: transparent; }
