/* Themes clair / sombre, partages par le portail, les tickets et l'audit.
   Le theme sombre est celui de chaque style.css ; ce fichier ne redefinit que le clair.
   A charger APRES le style.css de la page. */

:root { color-scheme: dark; }

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f5f7;
  --panel: #ffffff;
  --panel-2: #eef0f4;
  --border: #d5d9e0;
  --text: #1c1f26;
  --muted: #5b6270;
  /* accent un peu plus fonce : texte blanc lisible sur les boutons */
  --accent: #b8502f;
  --accent-hover: #a04426;
}

/* Pastilles de statut du portail (couleurs codees en dur pour le theme sombre) */
:root[data-theme="light"] .status-badge.open { background: #fdeedb; color: #92510c; }
:root[data-theme="light"] .status-badge.in_progress { background: #e1eefb; color: #1a5a9a; }
:root[data-theme="light"] .status-badge.closed { background: #dff3e5; color: #1c7137; }

:root[data-theme="light"] .error,
:root[data-theme="light"] .hint.error,
:root[data-theme="light"] .closure-status.error { color: #c0392b; }
:root[data-theme="light"] .closure-status.warn,
:root[data-theme="light"] .ticket-info.warn { color: #9a6200; }

:root[data-theme="light"] button.danger { color: #c0392b; }
:root[data-theme="light"] button.danger:hover:not(:disabled) { border-color: #c0392b; background: rgba(192, 57, 43, 0.08); }

:root[data-theme="light"] .modal-overlay { background: rgba(20, 24, 33, 0.45); }
:root[data-theme="light"] .toast { box-shadow: 0 6px 20px rgba(20, 24, 33, 0.18); }
:root[data-theme="light"] .badge { background: rgba(184, 80, 47, 0.12); }
:root[data-theme="light"] .badge.warn { background: rgba(154, 98, 0, 0.14); color: #8a5800; }
:root[data-theme="light"] .tmsg-warn { color: #8a5800; }
