/**
 * TECH Menuiserie — Shared Design Tokens v1.0
 * Single source of truth for brand identity across all modules.
 *
 * Usage: <link rel="stylesheet" href="/assets/css/tech-brand.css">
 *        (BEFORE module-specific variables.css)
 *
 * Modules may override --accent for WCAG compliance:
 *   --accent: #d06810  (4.6:1 on white, configurator)
 *   --accent: #d97706  (4.5:1 on white, email/transport/respond)
 * Always document the WCAG reason in the override.
 */

:root {
    /* ═══ Brand Colors ═══ */
    --brand-navy: #003168;
    --brand-orange: #ef7c1a;

    /* ═══ Primary (navy) ═══ */
    --primary: #003168;
    --primary-light: #2d4a6f;
    --primary-dark: #001f42;

    /* ═══ Accent (orange) ═══ */
    --accent: #ef7c1a;
    --accent-hover: #c56510;
    --accent-light: #fff3e6;
    --accent-decorative: #ef7c1a; /* Full orange — use on dark bg or large text only */

    /* ═══ Neutral ═══ */
    --bg: #ffffff;
    --bg-alt: #faf9f7;
    --bg-dark: #1f2937;
    --text: #1f2937;
    --text-muted: #6b7280;
    --text-light: #9ca3af;
    --text-secondary: #6b7280;
    --border: #e5e7eb;
    --border-dark: #d1d5db;

    /* ═══ Semantic ═══ */
    --success: #10b981;
    --success-light: #d1fae5;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --error: #ef4444;
    --error-light: #fee2e2;
    --info: #3b82f6;
    --info-light: #dbeafe;

    /* ═══ Typography ═══ */
    --font-heading: 'DM Serif Display', serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'DM Mono', monospace;

    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;

    /* ═══ Spacing ═══ */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;

    /* ═══ Border Radius ═══ */
    --radius-sm: 6px;
    --radius: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* ═══ Shadows ═══ */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.2);

    /* ═══ Transitions ═══ */
    --transition-fast: 0.15s ease;
    --transition: 0.2s ease;
    --transition-slow: 0.3s ease;

    /* ═══ Z-index ═══ */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-overlay: 300;
    --z-modal: 400;
    --z-tooltip: 500;
}

/* ═══ Shared WCAG Components ═══ */

/* Screen reader only (WCAG 1.3.1) */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Skip to content link (WCAG 2.4.1) */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 9999;
    padding: 12px 24px;
    background: var(--primary);
    color: white;
    font-weight: 600;
    font-size: var(--text-sm);
    text-decoration: none;
    border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus {
    left: 0;
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Focus Styles (WCAG 2.4.7) */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Reduced Motion (WCAG 2.3.3) */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* High Contrast (WCAG 1.4.11) */
@media (forced-colors: active) {
    .btn, .badge, button { border: 1px solid ButtonText; }
}

/* Scrollbar Styling */
* { scrollbar-width: thin; scrollbar-color: var(--border-dark) var(--bg-alt); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-alt); }
::-webkit-scrollbar-thumb { background: var(--border-dark); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* Selection */
::selection {
    background: var(--accent-light);
    color: var(--primary);
}
