/*
 * THEME — couleurs, police, tailles. Changer l'apparence = modifier ce fichier.
 * Le mode nuit est en bas (suit le système, ou le bouton "Mode nuit").
 */

:root {
    /* police système : zéro téléchargement, rendu natif sur chaque appareil */
    --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, Roboto, 'Helvetica Neue', Arial, sans-serif;
    --text-size: 15px;

    /* une ligne de liste = --row-pad + --row-lh + --row-pad (44px : cible tactile confortable) */
    --row-lh: 22px;
    --row-pad: 11px;
    --radius: 12px;
    --sidebar: 232px;

    /* surfaces */
    --bg: #f6f7f9;
    --surface: #ffffff;
    --surface-2: #f1f3f6;
    --border: #e5e7eb;
    --border-strong: #d0d5dd;
    --shadow: 0 1px 2px rgba(16, 24, 40, .05);
    --shadow-lg: 0 12px 32px -8px rgba(16, 24, 40, .18), 0 4px 8px -4px rgba(16, 24, 40, .06);

    /* texte */
    --text: #101828;
    --text-2: #475467;
    --muted: #98a2b3;

    /* couleurs d'action */
    --accent: #4f46e5;
    --accent-soft: #eef2ff;
    --on-accent: #ffffff;
    --danger: #e5484d;
    --danger-soft: #fdecec;
    --warning: #d97706;
    --warning-soft: #fef3c7;
    --strike: #98a2b3;

    /* priorités (coup de surligneur derrière le texte, cf. CONFIG.PRIORITIES) */
    --prio-1: rgba(250, 204, 21, .4);
    --prio-2: rgba(249, 115, 22, .3);
    --prio-3: rgba(239, 68, 68, .26);
    --prio-1-ink: #ca8a04;
    --prio-2-ink: #ea580c;
    --prio-3-ink: #dc2626;
    --prio-1-row: rgba(250, 204, 21, .13);
    --prio-2-row: rgba(249, 115, 22, .1);
    --prio-3-row: rgba(239, 68, 68, .09);

    /* notes */
    --note: #fef7d6;
    --note-edge: transparent; /* liseré en haut des notes (utile en mode nuit) */
    --note-text: #101828;

    /* couleur de chaque section (icône active, pastilles) */
    --tab-tasks: #4f46e5;
    --tab-agenda: #0d9488;
    --tab-themes: #ea580c;
    --tab-notes: #ca8a04;
}

/* ---------- Mode nuit ---------- */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        color-scheme: dark;
        --bg: #0f1115;
        --surface: #171a21;
        --surface-2: #1f232c;
        --border: #262b35;
        --border-strong: #353b47;
        --shadow: 0 1px 2px rgba(0, 0, 0, .3);
        --shadow-lg: 0 16px 40px -8px rgba(0, 0, 0, .6);
        --text: #e7e9ee;
        --text-2: #a9b0bd;
        --muted: #6b7382;
        --accent: #818cf8;
        --accent-soft: rgba(129, 140, 248, .14);
        --on-accent: #0f1115;
        --danger: #f2777a;
        --danger-soft: rgba(242, 119, 122, .12);
        --warning: #fbbf24;
        --warning-soft: rgba(251, 191, 36, .12);
        --strike: #6b7382;
        --prio-1: rgba(250, 204, 21, .22);
        --prio-2: rgba(249, 115, 22, .24);
        --prio-3: rgba(239, 68, 68, .26);
        --prio-1-ink: #facc15;
        --prio-2-ink: #fb923c;
        --prio-3-ink: #f87171;
        --prio-1-row: rgba(250, 204, 21, .07);
        --prio-2-row: rgba(249, 115, 22, .08);
        --prio-3-row: rgba(239, 68, 68, .09);
        --note: #24221e;
        --note-edge: rgba(250, 204, 21, .7);
        --note-text: #e7e9ee;
        --tab-tasks: #818cf8;
        --tab-agenda: #2dd4bf;
        --tab-themes: #fb923c;
        --tab-notes: #facc15;
    }
}
:root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #0f1115;
    --surface: #171a21;
    --surface-2: #1f232c;
    --border: #262b35;
    --border-strong: #353b47;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow-lg: 0 16px 40px -8px rgba(0, 0, 0, .6);
    --text: #e7e9ee;
    --text-2: #a9b0bd;
    --muted: #6b7382;
    --accent: #818cf8;
    --accent-soft: rgba(129, 140, 248, .14);
    --on-accent: #0f1115;
    --danger: #f2777a;
    --danger-soft: rgba(242, 119, 122, .12);
    --warning: #fbbf24;
    --warning-soft: rgba(251, 191, 36, .12);
    --strike: #6b7382;
    --prio-1: rgba(250, 204, 21, .22);
    --prio-2: rgba(249, 115, 22, .24);
    --prio-3: rgba(239, 68, 68, .26);
    --prio-1-ink: #facc15;
    --prio-2-ink: #fb923c;
    --prio-3-ink: #f87171;
    --prio-1-row: rgba(250, 204, 21, .07);
    --prio-2-row: rgba(249, 115, 22, .08);
    --prio-3-row: rgba(239, 68, 68, .09);
    --note: #24221e;
    --note-edge: rgba(250, 204, 21, .7);
    --note-text: #e7e9ee;
    --tab-tasks: #818cf8;
    --tab-agenda: #2dd4bf;
    --tab-themes: #fb923c;
    --tab-notes: #facc15;
}
:root[data-theme="light"] { color-scheme: light; }
