/* Design tokens of « AIOS · Pilotage ».
   Source since 23/11/2026: the design system of lyrge.fr V4 (ivory, deep green, mint; Inter and Inter Tight), the
   owner's choice for his second brain: a light interface, like his agency's site (docs/tableau/ADR-003). The values of
   the palette, the radii, the shadows and the typefaces come from lyrge.fr (components/chrome.css). The scales
   (spacing, sizes, durations) and the names of the tokens are kept from the first design (cockpit: Ink, Paper,
   Clay), so that no component had to change: « ink » is the scale of neutrals, « paper » the surfaces, « clay » the
   accent, now Lyrge's greens. The local choices, all deliberate:
   - the monospace stack (system fonts, for the weight budget) and the layout tokens of this app (bars, panel);
   - explicit *-text tokens for status texts on their tinted backgrounds;
   - light only: the site is, and the owner asked for a light background. Telegram's dark theme is not followed.
   Every colour, spacing, radius, shadow and duration of the app comes from here. */

@font-face {
    font-family: 'Inter';
    src: url('../fonts/inter-latin-v3.woff2') format('woff2');
    font-weight: 400 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter Tight';
    src: url('../fonts/inter-tight-latin-v3.woff2') format('woff2');
    font-weight: 600 800;
    font-style: normal;
    font-display: swap;
}

:root {
    color-scheme: light;

    /* — Typography ------------------------------------------------------------ */
    --font-sans:    'Inter', ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --font-display: 'Inter Tight', 'Inter', ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --font-mono:    ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

    --text-2xs:  clamp(0.68rem, 0.65rem + 0.15vw, 0.72rem);
    --text-xs:   clamp(0.75rem, 0.72rem + 0.15vw, 0.8rem);
    --text-sm:   clamp(0.85rem, 0.82rem + 0.15vw, 0.9rem);
    --text-base: 1rem;
    --text-lg:   clamp(1.05rem, 1rem + 0.25vw, 1.15rem);
    --text-xl:   clamp(1.2rem, 1.1rem + 0.5vw, 1.35rem);
    --text-2xl:  clamp(1.5rem, 1.3rem + 1vw, 1.8rem);
    --text-3xl:  clamp(1.85rem, 1.5rem + 1.5vw, 2.4rem);
    --text-4xl:  clamp(2.25rem, 1.8rem + 2.2vw, 3.2rem);
    --text-5xl:  clamp(2.75rem, 2rem + 3.5vw, 4.5rem);

    --leading-tight: 1.15;
    --leading-snug:  1.35;
    --leading-base:  1.55;
    --leading-loose: 1.75;

    --tracking-tight:  -0.03em;
    --tracking-snug:   -0.015em;
    --tracking-base:    0;
    --tracking-wide:    0.02em;
    --tracking-widest:  0.18em;

    --weight-regular:  400;
    --weight-medium:   500;
    --weight-semibold: 600;
    --weight-bold:     700;

    /* — Spacing (8px base) ------------------------------------------------------ */
    --space-px: 1px;
    --space-1:  0.25rem;
    --space-2:  0.5rem;
    --space-3:  0.75rem;
    --space-4:  1rem;
    --space-5:  1.25rem;
    --space-6:  1.5rem;
    --space-7:  1.75rem;
    --space-8:  2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;

    /* — Palette: lyrge.fr V4 (ivory, ink, greens) ---------------------------------------------- */
    --paper:      #FFFFFF;
    --paper-soft: #FCFBF8;
    --paper-dim:  #F7F4EC;

    --ink-50:  #FBF9F4;
    --ink-100: #F3F1EB;
    --ink-200: #E6E3DA;
    --ink-300: #D5D2C8;
    --ink-400: #9FA39A; /* decorative only: never for text */
    --ink-450: #636A64; /* AA body text: 5.6:1 on paper, 4.9:1 on the ivory of the sunken surfaces */
    --ink-500: #667068;
    --ink-600: #4C5550;
    --ink-700: #36403B;
    --ink-800: #1F2925;
    --ink-900: #08120F;
    --ink-950: #050B09;

    /* Accent: Lyrge's greens, from mint to deep green (the names stay « clay ») */
    --clay-50:  #EEF9F3;
    --clay-100: #E1F6EC;
    --clay-200: #C6F3DD;
    --clay-300: #A8EBCB;
    --clay-400: #6FD3A8;
    --clay-500: #073D2D;
    --clay-600: #0D5540;
    --clay-700: #1C5A44;
    --clay-800: #052A1F;
    --clay-900: #03160F;

    /* Secondary blue (lyrge.fr's third colour) */
    --blue-50:  #F1F6FA;
    --blue-100: #E3EEF6;
    --blue-500: #2F6F9A;
    --blue-600: #285F85;
    --blue-700: #214F6F;
    --blue-900: #122C3E;

    /* — Semantic ------------------------------------------------------------------ */
    --bg:          var(--paper-soft);
    --bg-elevated: var(--paper);
    --bg-sunken:   var(--paper-dim);
    --bg-canvas:   #FCFBF8;

    --border:        var(--ink-400);
    --border-strong: var(--ink-500);
    --border-subtle: var(--ink-200);

    --text:           var(--ink-900);
    --text-soft:      var(--ink-700);
    --text-dim:       #56605A;
    --text-mute:      var(--ink-450);
    --text-on-sunken: var(--ink-600);
    --text-invert:    var(--paper);

    --accent:       var(--clay-500);
    --accent-hover: var(--clay-600);
    --accent-soft:  var(--clay-100);
    --accent-text:  var(--clay-700);

    --success:        #23785A;
    --success-bg:     #E3F5EC;
    --success-border: #A8DDC4;
    --success-text:   #1C5A44;
    --warning:        #96610F;
    --warning-bg:     #FBF0DB;
    --warning-border: #EBCF94;
    --warning-text:   #7A4E0B;
    --error:          #A3412A;
    --error-bg:       #F3E6E3;
    --error-border:   #E0B5AA;
    --error-text:     #8A3421;
    --info:           #2F6F9A;
    --info-bg:        #E3EEF6;
    --info-border:    #A9C8DD;
    --info-text:      #214F6F;

    --on-success: #FFFFFF;
    --on-warning: #FFFFFF;
    --on-error:   #FFFFFF;
    --on-accent:  #FFFFFF;

    /* — Shape ------------------------------------------------------------------ */
    --radius-xs:   4px;
    --radius-sm:   6px;
    --radius:      10px;
    --radius-md:   12px;
    --radius-lg:   16px;
    --radius-xl:   24px;
    --radius-2xl:  32px;
    --radius-full: 9999px;

    --border-width:       1px;
    --border-width-thick: 2px;

    /* — Shadows (soft layered) ----------------------------------------------------- */
    --shadow-xs:    0 1px 1px rgba(8, 18, 15, 0.04);
    --shadow-sm:    0 1px 2px rgba(8, 18, 15, 0.05), 0 1px 1px rgba(8, 18, 15, 0.03);
    --shadow-md:    0 1px 2px rgba(8, 18, 15, 0.04), 0 12px 32px -18px rgba(7, 61, 45, 0.22);
    --shadow-lg:    0 2px 6px rgba(7, 61, 45, 0.06), 0 24px 48px -24px rgba(7, 61, 45, 0.30);
    --shadow-xl:    0 2px 6px rgba(7, 61, 45, 0.06), 0 40px 80px -36px rgba(7, 61, 45, 0.50);
    --shadow-2xl:   0 48px 96px -30px rgba(7, 61, 45, 0.45);
    --shadow-inset: inset 0 1px 0 rgba(255, 255, 255, 0.5), inset 0 -1px 0 rgba(8, 18, 15, 0.04);
    --ring-focus:      0 0 0 3px rgba(47, 143, 104, 0.22);
    --ring-focus-blue: 0 0 0 3px rgba(47, 111, 154, 0.2);
    --focus-outline:   2px solid var(--accent);

    /* — Motion ------------------------------------------------------------------ */
    --ease:        cubic-bezier(0.4, 0, 0.2, 1);
    --ease-out:    cubic-bezier(0, 0, 0.2, 1);
    --ease-in:     cubic-bezier(0.4, 0, 1, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --dur-instant: 60ms;
    --dur-fast:    120ms;
    --dur:         180ms;
    --dur-slow:    320ms;
    --dur-slower:  520ms;
    --dur-pulse:   2s;
    --dur-spin:    0.7s;
    --dur-shimmer: 1.4s;
    --dur-reduced: 0.01ms;

    /* — Layout ------------------------------------------------------------------ */
    --topbar-h:      64px;
    --content-max:   1280px;
    --content-prose: 720px;

    /* Local to this app */
    --tabbar-h:   64px;
    --sidebar-w:  248px;
    --sidebar-w-compact: 72px;
    --panel-w:    min(560px, 46vw);
    --touch-min:  44px;
    --z-sticky:   10;
    --z-panel:    20;
    --z-sheet:    30;
    --z-toast:    40;
    --z-palette:  50;
    --z-raise:    1;       /* stacking inside a component: an action above a card's stretched link */
    --card-min:   16rem;   /* narrowest card of the auto-fill grids (sessions, chantiers, programmes) */
    --aside-w:    22rem;   /* side column of the home on wide screens (« Pour vous ») */
    --console-h:  22rem;   /* viewport of a live console: about fourteen lines, the context stays visible */
    --capture-h:  10rem;   /* height of a screenshot thumbnail (the width follows the capture's format) */
    --sheet-w:    34rem;   /* width of a dialog on the computer (a bottom sheet on the phone) */

    /* — Inverse surfaces (tooltips) ---------------------------------------------- */
    --bg-inverse:      var(--ink-950);
    --text-on-inverse: var(--paper);

    /* — Architectural gradients ------------------------------------------------ */
    --grad-canvas: radial-gradient(1200px 600px at 20% -10%, rgba(168, 235, 203, 0.28), transparent 60%),
                   radial-gradient(800px 400px at 100% 20%, rgba(227, 238, 246, 0.55), transparent 60%);
    --grad-hero:   linear-gradient(135deg, #052A1F 0%, #073D2D 50%, #0D5540 100%);
    --grad-clay:   linear-gradient(180deg, #0D5540, #073D2D);
    --grad-paper:  linear-gradient(180deg, var(--paper) 0%, var(--paper-soft) 100%);
}

@media (prefers-reduced-motion: reduce) {
    :root {
        --dur-instant: var(--dur-reduced);
        --dur-fast:    var(--dur-reduced);
        --dur:         var(--dur-reduced);
        --dur-slow:    var(--dur-reduced);
        --dur-slower:  var(--dur-reduced);
    }
}
