/* ==========================================================================
   Design tokens — light/dark theme custom properties. Loaded first: every
   other CSS file in this folder reads these instead of hardcoding colors.
   Même palette et même composant de bascule que php-admin-tool (public/css/
   theme.css), portés ici pour une identité visuelle cohérente entre les
   deux outils internes.
   ========================================================================== */

:root {
    color-scheme: light dark;

    --bg: #ffffff;
    --bg-subtle: #f6f7f9;
    --surface: #ffffff;
    --border: #e2e5ea;
    --text: #1a1d23;
    --text-muted: #5b6270;
    --text-tertiary: #6b7280;
    --accent: #d9770e;
    --accent-hover: #b8630a;
    --link: var(--accent);
    --accent-contrast: #14161a;
    --border-interactive: var(--text-muted);

    --color-danger: #c92a2a;
    --color-danger-hover: #a61e1e;
    --color-danger-bg: #f8d7da;
    --color-danger-border: #f5c2c7;
    --color-success: #276749;
    --color-success-hover: #1e5238;
    --color-success-bg: #d1e7dd;
    --color-success-border: #badbcc;
    --color-info: #055160;
    --color-info-bg: #cff4fc;
    --color-info-border: #b6effb;
    --color-warning: #664d03;
    --color-warning-bg: #fff3cd;
    --color-warning-border: #ffecb5;

    --switch-bg: #e2e8f0;
    --switch-icon: #718096;

    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-pill: 999px;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);

    --transition-fast: 120ms ease;
    --transition-base: 200ms ease;
}

[data-theme="light"] {
    color-scheme: light;
}

[data-theme="dark"] {
    color-scheme: dark;
    --bg: #1e2024;
    --bg-subtle: #2c2f35;
    --surface: #25282d;
    --border: #34373d;
    --text: #e8e9eb;
    --text-muted: #9ea1a8;
    --text-tertiary: #868a91;
    --accent: #e8912f;
    --accent-hover: #f2a34a;
    --link: var(--accent);
    --accent-contrast: #14161a;

    --color-danger: #ff6b6b;
    --color-danger-hover: #ff8787;
    --color-danger-bg: #3a1f1f;
    --color-danger-border: #5c2b2b;
    --color-success: #5aa77a;
    --color-success-hover: #6bb88b;
    --color-success-bg: #16321f;
    --color-success-border: #234a2c;
    --color-info: #7dd3e0;
    --color-info-bg: #163238;
    --color-info-border: #204650;
    --color-warning: #ffd43b;
    --color-warning-bg: #3a2f0d;
    --color-warning-border: #524115;

    --switch-bg: #2d3748;
    --switch-icon: #cbd5e0;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4), inset 0 0 0 1px rgba(255, 255, 255, 0.04);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}
