/* Yaka v2 — mode sombre. Fichier GÉNÉRÉ par outils/generer_sombre.py à partir de ui.css, style.css et espaces.css
   (règles à fond blanc ou pastel), puis complété à la main en bas. Activé par <html data-theme="dark">. */
html[data-theme="dark"] {
  color-scheme: dark;
  --white: #1C1C1C; --gray-50: #121212; --gray-100: #262626; --gray-200: #2E2E2E; --gray-300: #474747;
  --gray-500: #8C8C8C; --gray-600: #A6A6A6; --gray-700: #CFCFCF; --gray-900: #3A3A3A;
  --bg: #0B0B0B; --bg-subtle: #121212; --surface: #1C1C1C; --border: #2E2E2E; --text: #F2F2F2; --text-muted: #A6A6A6;
  --success-100: #12352A; --warning-100: #3A2E10; --danger-100: #3A1A1A; --info-100: #14263F; --yaka-orange-100: #3A2416;
  --yaka-orange-50: #2A1D14; --violet-100: #2A2238; --rating: #F2F2F2;
  --encre: #F2F2F2; --gris: #A6A6A6; --trait: #2E2E2E; --fond: #0B0B0B; --carte: #1C1C1C;
  --orange-pale: #3A2416; --vert-pale: #12352A; --rouge-pale: #3A1A1A;
  --ombre: 0 2px 10px rgba(0, 0, 0, .5); --shadow-1: 0 1px 2px rgba(0,0,0,.6); --shadow-2: 0 4px 16px rgba(0,0,0,.6);
}
html[data-theme="dark"] body { background: var(--bg); color: var(--text); }
html[data-theme="dark"] body.app-client { --fond: #0B0B0B; --trait: #2E2E2E; --gris: #A6A6A6; }
html[data-theme="dark"] body.app-pro, html[data-theme="dark"] body.app-livreur { background: var(--bg-subtle); }

html[data-theme="dark"] .ui-store__fav { background: var(--surface); }
html[data-theme="dark"] .ui-item__plus { background: var(--surface); color: var(--text); }
html[data-theme="dark"] .ui-statut--nouvelle, html[data-theme="dark"] .ui-statut--attente_paiement { background: #3A2E10; color: #F5D58A; }
html[data-theme="dark"] .ui-mode button[aria-pressed="true"] { background: var(--surface); color: var(--text); }
html[data-theme="dark"] .champ input:not([type=checkbox]):not([type=radio]), html[data-theme="dark"] .champ select, html[data-theme="dark"] .champ textarea, html[data-theme="dark"] .refus input { background: var(--surface); color: var(--text); }
html[data-theme="dark"] .statut-pastille.statut-en_livraison { background: #14263F; color: #9CC2F5; }
html[data-theme="dark"] .livreur-info { background: #14263F; color: #9CC2F5; }
html[data-theme="dark"] .info-attente { background: #3A2E10; color: #F5D58A; }
html[data-theme="dark"] .paiement-etat.verification { background: #3A2E10; color: #F5D58A; }
html[data-theme="dark"] .delai-acceptation { background: #3A2E10; }
html[data-theme="dark"] .pastille-argent { background: #3A2E10; color: #F5D58A; }
html[data-theme="dark"] body.app-client .entete { background: var(--surface); }
html[data-theme="dark"] .ui-onglets { background: var(--surface); }
html[data-theme="dark"] .ui-tiroir { background: var(--surface); }
html[data-theme="dark"] .ui-rond--blanc { background: var(--surface); }
html[data-theme="dark"] .ui-onglets-rubriques { background: var(--surface); }
html[data-theme="dark"] .ui-fiche__cta { background: var(--surface); }
html[data-theme="dark"] .ui-radio-carte--bouton { background: var(--surface); color: var(--text); }
html[data-theme="dark"] .ui-champ input, html[data-theme="dark"] .ui-champ select { background: var(--surface); color: var(--text); }
html[data-theme="dark"] .ui-checkout__carte { background: var(--surface); }
html[data-theme="dark"] .ui-checkout__adresse { background: var(--surface); color: var(--text); }
html[data-theme="dark"] .ui-marqueur--commerce { background: var(--surface); color: var(--text); }
html[data-theme="dark"] .ui-suivi--carte .ui-suivi__panneau { background: var(--surface); }
html[data-theme="dark"] .ui-suggestions { background: var(--surface); }
html[data-theme="dark"] .pilule-alerte { background: #3A2E10; color: #F5D58A; }
html[data-theme="dark"] .etapes-livreur li.fait { color: var(--text); }
html[data-theme="dark"] .etapes-livreur li.courant { color: var(--text); }
html[data-theme="dark"] .offre-course__accepter { background: var(--surface); color: var(--text); color: var(--text); }
html[data-theme="dark"] .pastille-etat.cmd { background: var(--surface); }
html[data-theme="dark"] .marqueur-gestion.cmd { background: var(--surface); }
html[data-theme="dark"] .bulle.interne { background: #3A3412; color: #F5E08A; }
html[data-theme="dark"] .etiquette.haute { background: #3A1A1A; color: #FF9C9C; }
html[data-theme="dark"] .form-note-interne { background: #2E2A12; }
html[data-theme="dark"] .app-livreur .hero-service .bouton { background: var(--surface); color: var(--text); }

/* Compléments */
html[data-theme="dark"] input, html[data-theme="dark"] select, html[data-theme="dark"] textarea { background: var(--surface); color: var(--text); border-color: var(--gray-300); }
html[data-theme="dark"] .leaflet-tile-pane { filter: brightness(.65) invert(1) contrast(1.6) hue-rotate(200deg) saturate(.25) brightness(.85); }
html[data-theme="dark"] .leaflet-container { background: #1a1a1a; }
html[data-theme="dark"] .ui-btn--secondary { background: #2E2E2E; color: var(--text); }
html[data-theme="dark"] .ui-sheet, html[data-theme="dark"] .ui-dialog, html[data-theme="dark"] .ui-tiroir { background: var(--surface); color: var(--text); }
html[data-theme="dark"] .entete, html[data-theme="dark"] body.app-client .entete { background: var(--bg); border-color: var(--border); }
html[data-theme="dark"] .logo-texte { color: inherit; }
html[data-theme="dark"] body.app-livreur .logo-pastille, html[data-theme="dark"] body.livreur .logo-pastille { background: #000; color: #fff; box-shadow: inset 0 0 0 1px #474747; }
html[data-theme="dark"] .ui-cloche, html[data-theme="dark"] .ui-entete-compte, html[data-theme="dark"] .ui-hamburger { color: var(--text); }
html[data-theme="dark"] .ui-hamburger span, html[data-theme="dark"] .ui-hamburger span::before, html[data-theme="dark"] .ui-hamburger span::after { background: var(--text); }
html[data-theme="dark"] .ui-onglets a.est-actif, html[data-theme="dark"] .app-livreur .nav-bas a.actif { color: var(--text); }
html[data-theme="dark"] :is(.app-pro, .app-livreur) a:not(.bouton):not(.pilule) { color: var(--text); }
html[data-theme="dark"] .app-pro .delai-acceptation, html[data-theme="dark"] .app-livreur .etiquette-priorite { background: #3A2416; color: #FFC9A3; }
html[data-theme="dark"] .app-pro .carte-livreur.attente, html[data-theme="dark"] :is(.app-pro, .app-livreur) .info.info-attente { color: #F5D58A; }
html[data-theme="dark"] :is(.app-pro, .app-livreur) .info.info-alerte { color: #FF9C9C; }
html[data-theme="dark"] .ui-store__fav, html[data-theme="dark"] .ui-item__plus { background: #2E2E2E; color: var(--text); }
html[data-theme="dark"] .ui-code { background: #000; }
html[data-theme="dark"] .bulle.autre { background: #262626; color: var(--text); }
html[data-theme="dark"] img { filter: brightness(.92); }
html[data-theme="dark"] .offre-course__accepter { background: #fff; color: #141414; }
html[data-theme="dark"] .ui-btn--dark, html[data-theme="dark"] .ui-chip.est-actif { color: #fff; }

