/**
 * Pharmony Tools - Theme Variables
 * Système de thème Light/Dark/Auto
 */

:root {
    /* ========================================
       MODE LIGHT (défaut)
       ======================================== */

    /* Backgrounds */
    --bg-body: #ffffff;
    --bg-primary: #ffffff;
    --bg-secondary: #f9f9f9;
    --bg-tertiary: #f5f5f5;
    --bg-quaternary: #f0f0f0;
    --bg-hover: #e9ecef;
    --bg-active: #e0e7ee;
    --bg-header: #ffffff;
    --bg-card: #ffffff;
    --bg-input: #ffffff;
    --bg-code: #f8f9fa;
    --bg-highlight: #fff3cd;
    --bg-info: #d1ecf1;
    --bg-success: #d4edda;
    --bg-error: #f8d7da;
    --bg-warning: #fff3cd;

    /* Text */
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-muted: #999999;
    --text-light: #bbbbbb;
    --text-inverse: #ffffff;
    --text-link: #007cba;
    --text-link-hover: #005a87;

    /* Borders */
    --border-color: #dddddd;
    --border-light: #eeeeee;
    --border-dark: #cccccc;
    --border-focus: #007cba;

    /* Accent colors */
    --accent-primary: #007cba;
    --accent-primary-hover: #005a87;
    --accent-primary-light: #e0f0f8;
    --accent-secondary: #6c757d;
    --accent-secondary-hover: #5a6268;

    /* Status colors */
    --color-success: #28a745;
    --color-success-bg: #d4edda;
    --color-success-border: #c3e6cb;
    --color-success-text: #155724;

    --color-error: #dc3545;
    --color-error-bg: #f8d7da;
    --color-error-border: #f5c6cb;
    --color-error-text: #721c24;

    --color-warning: #ffc107;
    --color-warning-bg: #fff3cd;
    --color-warning-border: #ffeeba;
    --color-warning-text: #856404;

    --color-info: #17a2b8;
    --color-info-bg: #d1ecf1;
    --color-info-border: #bee5eb;
    --color-info-text: #0c5460;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 8px rgba(0, 0, 0, 0.15);

    /* Navigation specific */
    --nav-bg: #ffffff;
    --nav-text: #333333;
    --nav-link: #333333;
    --nav-link-hover: #007cba;
    --nav-link-active-bg: #007cba;
    --nav-link-active-text: #ffffff;
    --nav-border: #dddddd;

    /* Table specific */
    --table-header-bg: #f5f5f5;
    --table-row-hover: #f9f9f9;
    --table-row-alt: #fafafa;
    --table-border: #dddddd;

    /* Button specific */
    --btn-primary-bg: #007cba;
    --btn-primary-text: #ffffff;
    --btn-primary-hover: #005a87;
    --btn-secondary-bg: #6c757d;
    --btn-secondary-text: #ffffff;
    --btn-secondary-hover: #5a6268;
    --btn-danger-bg: #dc3545;
    --btn-danger-text: #ffffff;
    --btn-danger-hover: #c82333;

    /* Scrollbar */
    --scrollbar-track: #f1f1f1;
    --scrollbar-thumb: #007cba;
    --scrollbar-thumb-hover: #005a87;

    /* Code/XML syntax (Bender) - couleurs originales */
    --xml-tag: #8c8c8c;
    --xml-attr: #9a0909;
    --xml-value: #705bd7;
    --xml-element: #1565c0;
    --xml-comment: #757575;
}

/* ========================================
   MODE DARK
   ======================================== */

[data-theme="dark"] {
    /* Backgrounds */
    --bg-body: #1a1a1a;
    --bg-primary: #1e1e1e;
    --bg-secondary: #252525;
    --bg-tertiary: #2d2d2d;
    --bg-quaternary: #363636;
    --bg-hover: #3d3d3d;
    --bg-active: #4a4a4a;
    --bg-header: #1e1e1e;
    --bg-card: #252525;
    --bg-input: #2d2d2d;
    --bg-code: #2d2d2d;
    --bg-highlight: #4a3f00;
    --bg-info: #0c3545;
    --bg-success: #1a3d1a;
    --bg-error: #3d1a1a;
    --bg-warning: #4a3f00;

    /* Text */
    --text-primary: #e0e0e0;
    --text-secondary: #b0b0b0;
    --text-muted: #808080;
    --text-light: #606060;
    --text-inverse: #1a1a1a;
    --text-link: #6bb8e5;
    --text-link-hover: #8ecaed;

    /* Borders */
    --border-color: #444444;
    --border-light: #333333;
    --border-dark: #555555;
    --border-focus: #6bb8e5;

    /* Accent colors */
    --accent-primary: #4da6d9;
    --accent-primary-hover: #6bb8e5;
    --accent-primary-light: #1a3d4d;
    --accent-secondary: #8a9199;
    --accent-secondary-hover: #9da5ad;

    /* Status colors */
    --color-success: #4caf50;
    --color-success-bg: #1a3d1a;
    --color-success-border: #2e5a2e;
    --color-success-text: #81c784;

    --color-error: #ef5350;
    --color-error-bg: #3d1a1a;
    --color-error-border: #5a2e2e;
    --color-error-text: #ef9a9a;

    --color-warning: #ffca28;
    --color-warning-bg: #4a3f00;
    --color-warning-border: #6b5a00;
    --color-warning-text: #ffe082;

    --color-info: #29b6f6;
    --color-info-bg: #0c3545;
    --color-info-border: #1a5a6b;
    --color-info-text: #81d4fa;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 2px 4px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 4px 8px rgba(0, 0, 0, 0.5);

    /* Navigation specific */
    --nav-bg: #1e1e1e;
    --nav-text: #e0e0e0;
    --nav-link: #e0e0e0;
    --nav-link-hover: #6bb8e5;
    --nav-link-active-bg: #4da6d9;
    --nav-link-active-text: #1a1a1a;
    --nav-border: #444444;

    /* Table specific */
    --table-header-bg: #2d2d2d;
    --table-row-hover: #363636;
    --table-row-alt: #252525;
    --table-border: #444444;

    /* Button specific */
    --btn-primary-bg: #4da6d9;
    --btn-primary-text: #1a1a1a;
    --btn-primary-hover: #6bb8e5;
    --btn-secondary-bg: #6c757d;
    --btn-secondary-text: #ffffff;
    --btn-secondary-hover: #8a9199;
    --btn-danger-bg: #ef5350;
    --btn-danger-text: #ffffff;
    --btn-danger-hover: #f44336;

    /* Scrollbar */
    --scrollbar-track: #2d2d2d;
    --scrollbar-thumb: #4da6d9;
    --scrollbar-thumb-hover: #6bb8e5;

    /* Code/XML syntax (Bender) - versions claires des originales */
    --xml-tag: #b0b0b0;
    --xml-attr: #ff8a8a;
    --xml-value: #b8a0ff;
    --xml-element: #64b5f6;
    --xml-comment: #9e9e9e;
}

/* ========================================
   TRANSITIONS
   ======================================== */

/* Transition douce pour le changement de thème */
html.theme-transition,
html.theme-transition *,
html.theme-transition *:before,
html.theme-transition *:after {
    transition: background-color 0.3s ease,
                color 0.3s ease,
                border-color 0.3s ease,
                box-shadow 0.3s ease !important;
}
