/* ==========================================================================
   OBTURA — Mode sombre
   Activé par <html data-theme="dark"> (réglage du système ou bouton Thème).
   Les couleurs passent par les variables : seules les teintes « en dur » sont reprises ici.
   ========================================================================== */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bone: #0F0F0E;
  --paper: #1B1B19;
  --stone: #4A4A45;
  --ink: #EDEDE9;
  --ink-soft: rgba(237, 237, 233, 0.62);
  --ink-faint: rgba(237, 237, 233, 0.14);
  --line: rgba(237, 237, 233, 0.16);
  --accent: #9DB3DE;
  --success: #7CC09A;
  --danger: #E88A7F;
  --warn: #D9A84A;
  --viewer-bg: #070707;
  --shadow-lift: 0 18px 50px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .input:focus { background: #151513; }

[data-theme="dark"] select.input { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23EDEDE9' stroke-width='1.2' fill='none'/%3E%3C/svg%3E"); }
[data-theme="dark"] select.input option { background: #1B1B19; color: #EDEDE9; }

/* Teintes encre « en dur » des autres feuilles : on les passe en clair */
[data-theme="dark"] .meter,
[data-theme="dark"] .progress,
[data-theme="dark"] .gbar__track,
[data-theme="dark"] .shop-url code,
[data-theme="dark"] .slug-field__prefix,
[data-theme="dark"] .pwd-rules li,
[data-theme="dark"] .switch__track { background: rgba(237, 237, 233, 0.1); }
[data-theme="dark"] .switch__track::after { background: #EDEDE9; }
[data-theme="dark"] .doc, [data-theme="dark"] .sign-pad { background: var(--paper); }
[data-theme="dark"] .dropzone.is-over { background: var(--paper); }
[data-theme="dark"] .dialog { background: rgba(0, 0, 0, 0.6); }
[data-theme="dark"] .account-pill__chip + .account-pill__chip { border-left-color: rgba(17, 17, 17, 0.2); }
[data-theme="dark"] .account-pill__chip:hover { background: rgba(17, 17, 17, 0.08); }
[data-theme="dark"] .admin-strip a:hover { background: rgba(17, 17, 17, 0.08); }

/* La signature reste tracée en sombre sur fond clair */
[data-theme="dark"] .sign-pad canvas { background: #F4F4F1; }
