/* Valeurs par défaut (thème clair) — évite les var() non définies */
:root{
  --surface:#ffffff; --surface2:#f8fafc;
  --text:#0f172a; --muted:#4f5f78;
  --line:#e6ebf2;
}
/* =========================================================
   Support WS — Apparence publique (module Thèmes)
   Surcharges de variables uniquement : les pages gardent leur CSS.
   ========================================================= */
html[data-theme="dark"]{
  color-scheme:dark;
  --bg:#050914; --bg2:#0a1428;
  --surface:#0f1a2e; --surface2:#15243b;
  --text:#e6edf8; --muted:#9fb0c7;
  --line:rgba(255,255,255,.10);
  --shadow-card:0 18px 42px rgba(0,0,0,.40);
}
html[data-theme="dark"] body{background:#050914;color:#e6edf8}
html[data-theme="dark"] .card,
html[data-theme="dark"] .panel{background:#0f1a2e;border-color:rgba(255,255,255,.10)}
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea{background:#15243b;color:#e6edf8;border-color:rgba(255,255,255,.12)}

html[data-theme="dark"][data-palette="neon"]{
  --bg:#030817; --bg2:#071a36;
  --accent:#1e5cff; --accent2:#38bdf8;
  --surface:#0b1a33; --surface2:#10233f;
  --text:#f8fbff; --muted:#9db4d6;
  --line:rgba(56,189,248,.18);
}
html[data-theme="dark"][data-palette="neon"] body{
  background:
    radial-gradient(1100px 620px at 88% -12%, rgba(34,197,94,.12), transparent 60%),
    radial-gradient(1000px 560px at -8% 4%, rgba(56,189,248,.12), transparent 62%),
    #030817;
  color:#f8fbff;
}

/* Composants publics sensibles au thème */
html[data-theme="dark"] .recap{background:var(--surface2);border-color:var(--line)}
html[data-theme="dark"] .field input,
html[data-theme="dark"] .field select,
html[data-theme="dark"] .field textarea{background:var(--surface);color:var(--text);border-color:var(--line)}
html[data-theme="dark"] .error,
html[data-theme="dark"] .global-error{background:rgba(220,38,38,.14);color:#fecaca}
html[data-theme="dark"] .chip,
html[data-theme="dark"] .badge{background:var(--surface2);color:var(--text)}
html[data-theme="dark"][data-palette="neon"] .btn--primary{background:linear-gradient(180deg,#1e5cff,#1b4fd1);box-shadow:0 8px 22px rgba(30,92,255,.35),inset 0 -2px 0 rgba(34,197,94,.6)}
html[data-theme="dark"][data-palette="neon"] .btn--hero{box-shadow:0 10px 26px rgba(34,197,94,.28)}

/* Champs et titres publics en sombre */
html[data-theme="dark"] .field label,
html[data-theme="dark"] .field .label{color:var(--text)}
html[data-theme="dark"] .field input,
html[data-theme="dark"] .field select,
html[data-theme="dark"] .field textarea{background:var(--surface2);border-color:rgba(255,255,255,.16);color:var(--text)}
html[data-theme="dark"] .field input::placeholder,
html[data-theme="dark"] .field textarea::placeholder{color:var(--muted);opacity:.85}
html[data-theme="dark"] .mini-title,
html[data-theme="dark"] .section-title,
html[data-theme="dark"] .contact-card__title{color:var(--text)}
html[data-theme="dark"] .recap{background:var(--surface2);border-color:var(--line)}
html[data-theme="dark"] .recap__label{color:var(--muted)}

/* Pied flottant : opaque, séparé, sans transparence */
.app__foot{opacity:1 !important;background:var(--surface) !important;border-top:1px solid var(--line);box-shadow:none !important}

/* Suivi (track my request) — lisibilité sombre */
html[data-theme="dark"] .flash{background:rgba(34,197,94,.14);color:#a7f3c0;box-shadow:inset 0 0 0 1px rgba(74,222,128,.25)}
html[data-theme="dark"] .flash--err{background:rgba(220,38,38,.14);color:#fecaca;box-shadow:inset 0 0 0 1px rgba(248,113,113,.25)}
html[data-theme="dark"] .bubble{background:var(--surface2);color:var(--text)}
html[data-theme="dark"] .bubble--client{background:rgba(47,111,230,.20);color:var(--text)}
html[data-theme="dark"] .ticket-item{background:var(--surface2);border-color:var(--line)}
html[data-theme="dark"] .auth__aside .steps li{color:var(--muted)}
html[data-theme="dark"] .auth__aside .steps li.is-active{color:var(--text)}
html[data-theme="dark"] .auth__aside .steps li.is-active span{background:var(--accent);color:#fff}
