/* Pages publiques du site (html.site-public) : mode sombre commun (audit UX du 22/11, §3.1).
   Les pages utilisent les classes Tailwind claires (blanc, ardoise) ; on les remappe ici quand le téléphone est en
   sombre, sans toucher la console (server/admin), qui partage server/css/tailwind.css. Couleurs proches de l'accueil
   (server/index.html) : fond #141211, cartes #1d1a18. */
@media (prefers-color-scheme: dark) {
  html.site-public { color-scheme: dark; background-color: #141211 !important; color: #f1eee8 !important; }
  html.site-public body { background-color: #141211; color: #f1eee8; }

  html.site-public .bg-white,
  html.site-public .bg-white\/95,
  html.site-public .bg-white\/90 { background-color: #1d1a18 !important; }
  html.site-public .bg-slate-50,
  html.site-public .bg-slate-50\/70,
  html.site-public .bg-slate-50\/60,
  html.site-public .bg-slate-50\/30,
  html.site-public .bg-\[\#f8fafc\] { background-color: #181614 !important; }
  html.site-public .bg-slate-100,
  html.site-public .bg-slate-100\/80 { background-color: #26221f !important; }
  html.site-public .bg-slate-200 { background-color: #2f2a27 !important; }

  html.site-public .text-slate-900,
  html.site-public .text-slate-800 { color: #f1eee8 !important; }
  html.site-public .text-slate-700,
  html.site-public .text-slate-600 { color: #d6d1c9 !important; }
  html.site-public .text-slate-500,
  html.site-public .text-slate-400 { color: #bab5ad !important; }

  html.site-public .border-slate-100,
  html.site-public .border-slate-200 { border-color: #2f2a27 !important; }
  html.site-public .border-slate-300 { border-color: #45403b !important; }

  html.site-public input:not([type="checkbox"]):not([type="radio"]),
  html.site-public select,
  html.site-public textarea { background-color: #26221f !important; color: #f1eee8 !important; border-color: #45403b !important; }
  html.site-public ::placeholder { color: #8f8a83 !important; }

  /* Teintes claires de la marque (fonds de puces, encadrés) : version sombre lisible. */
  html.site-public .bg-brand-50,
  html.site-public .bg-brand-50\/50,
  html.site-public .bg-brand-50\/70,
  html.site-public .bg-brand-50\/20,
  html.site-public .bg-brand-100,
  html.site-public .bg-brand-100\/80 { background-color: rgb(var(--brand-600) / 0.18) !important; }
  html.site-public .border-brand-100,
  html.site-public .border-brand-200,
  html.site-public .border-brand-200\/80,
  html.site-public .border-brand-300 { border-color: rgb(var(--brand-500) / 0.45) !important; }
  html.site-public .text-brand-600,
  html.site-public .text-brand-700,
  html.site-public .text-brand-800,
  html.site-public .text-brand-900,
  html.site-public .text-brand-950 { color: rgb(var(--brand-300)) !important; }
}

/* En-tête commun : logo et nom cliquables vers l'accueil. */
.site-home-link { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: inherit; }
.site-home-link img { border-radius: 9999px; }
