/*-----------------------------------------------------------------------------
 * Project : Mentor - Interactive Courses for Schools
 * File    : public/css/variables.css
 * Stylesheet : design tokens (colours, semantic aliases, typography, spacing, shape, layout)
 * Author  : Johann Sievering
 * AI Support : Claude Code
 * Date    : 2026-10-25 The first slice: frontend shell
 * Rev     : forked from ergane v0.69.1 public/css/variables.css (token names kept; palette placeholder to be validated by the owner)
 * Rev     : 2026-10-25 0.3.0: the pastels of the complement pane's pages (concept, memento)
 * Rev     : 2026-11-07 0.41.2: the light blue of every button that runs a program or its tests (the owner's request D-90)
 * Version : 0.41.2
 *-----------------------------------------------------------------------------
 * Brief chapter 16. Loaded first by every page; nothing else defines a raw
 * colour, so the owner's palette decision changes this file only. The token
 * names are Ergane's, so that the components forked later port unchanged.
 * The placeholder palette: a deep blue as the primary (header, links,
 * headings), a warm orange as the accent (the current entry, « J'ai
 * terminé » in the workspace), a light blue for every button that runs a
 * program or its tests (D-90), Ergane's semantic colours. Every text
 * colour below reaches 4.5:1 on its intended background (WCAG 1.4.3).
 *---------------------------------------------------------------------------*/

:root {
    /* ── Brand (placeholder, to be validated by the owner) ── */
    --blue:         #2B5F86;   /* primary: the header bar, headings, links */
    --blue-50:      #E6EEF5;
    --blue-900:     #16334A;
    --terracotta:   #A8552E;   /* accent: the current entry, the brand mark, « J'ai terminé » */
    --terracotta-50:#F7E8DF;
    --terracotta-900:#5C2A12;
    --olive:        #5A5A2E;   /* secondary family, kept for the components that use it */
    --olive-50:     #EEEEE2;
    --olive-900:    #2E2E14;

    /* ── Semantic ── */
    --green:        #1D7A45;
    --green-50:     #E4F4EA;
    --orange:       #854F0B;
    --orange-50:    #FAEEDA;
    --red:          #B3261E;
    --red-50:       #FBE4E4;

    /* ── Neutrals ── */
    --gray:         #5B6573;
    --gray-border:  #DDE2E8;
    --gray-50:      #F1F3F6;
    --ink:          #1F2733;
    --bg:           #F5F6F8;
    --bg-card:      #FFFFFF;

    /* ── Aliases used by the components ── */
    --primary:        var(--blue);
    --primary-dark:   var(--blue-900);
    --primary-soft:   var(--blue-50);
    --accent:         var(--terracotta);
    --accent-dark:    var(--terracotta-900);
    --accent-soft:    var(--terracotta-50);
    --secondary:      var(--olive);
    --secondary-soft: var(--olive-50);
    --text:           var(--ink);
    --text-light:     var(--gray);
    --border:         var(--gray-border);
    --success:        var(--green);
    --success-soft:   var(--green-50);
    --warning:        var(--orange);
    --warning-soft:   var(--orange-50);
    --error:          var(--red);
    --error-soft:     var(--red-50);
    --focus:          #1F5FBF;   /* one focus colour, ≥ 3:1 on every light surface (WCAG 2.4.7 / 1.4.11) */

    /* ── The three results of the workspace (brief chapter 6: Python, the tests and the AI never look alike) ── */
    --python-bg:      #1B2430;   /* Python's own output: a dark console, monospace, shown verbatim */
    --python-text:    #E8EEF4;
    --python-error:   #FFB4A8;
    --tests-bg:       var(--green-50);
    --tests-border:   var(--green);
    --ai-bg:          #F3EFFA;   /* the AI's explanation: a light violet, never mistaken for Python's output */
    --ai-border:      #6A4C9C;

    /* ── The buttons that run a program or its tests (the owner's request D-90): one light blue on every page ── */
    --run-bg:         #B3DDF8;   /* its text 9.1:1 on it, 7.9:1 on the hover */
    --run-bg-hover:   #9AD0F5;
    --run-border:     #3A89C4;   /* 3.8:1 on white, 3.5:1 on the page (WCAG 1.4.11) */
    --run-text:       var(--blue-900);

    /* ── The pages of the complement pane (decision D-16): each kind has its pastel, never the AI's violet ── */
    --concept-bg:     #E6F5EF;   /* a concept page: pastel mint */
    --concept-strong: #1F6B5C;   /* its title strip and its links (white on it 6.3:1; on the mint 5.6:1) */
    --memento-bg:     #FFF7DD;   /* the memento: pastel yellow, a reference card */
    --memento-strong: #6E5200;   /* its title strip (white text on it: 7.3:1) */
    --memento-border: #E9D9A6;

    /* ── The header bar ── */
    --header-bg:      var(--blue);
    --header-text:    #FFFFFF;
    --header-height:  3.5rem;
    --footer-height:  2.75rem;

    /* ── Typography (body 16 px, fields never under 16 px) ── */
    --font-family:  "Segoe UI", "Trebuchet MS", system-ui, -apple-system, Roboto, sans-serif;
    --font-mono:    ui-monospace, "Cascadia Mono", Consolas, "Liberation Mono", monospace;
    --font-size-xs: 0.8125rem;
    --font-size-sm: 0.9375rem;
    --font-size-md: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: clamp(1.25rem, 1.1rem + 0.8vw, 1.5rem);
    --font-size-2xl:clamp(1.75rem, 1.4rem + 1.4vw, 2.25rem);
    --line-height:  1.5;

    /* ── Spacing ── */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.5rem;
    --space-6: 2rem;
    --space-8: 3rem;

    /* ── Shape ── */
    --radius-sm: 4px;
    --radius:    8px;
    --radius-lg: 12px;
    --radius-pill: 999px;
    --shadow-sm: 0 1px 2px rgba(31, 39, 51, 0.06);
    --shadow:    0 2px 10px rgba(31, 39, 51, 0.10);

    /* ── Layout ── */
    --target:     2.75rem;   /* 44 px: the smallest touch target (brief chapter 16) */
    --page-max:   80rem;
    --z-header:   100;
    --z-menu:     200;
}
