

/* ===================================
   THEMES - Dark & Light
   =================================== */

/* LIGHT THEME (default) */
:root {
    /* Backgrounds */
    --bg-primary: #ffffff;
    --bg-secondary: #eeeeee;
    --bg-tertiary: #ffffff;

    /* Text */
    --text-primary: #0e0e0e;
    --text-secondary: #353535;
    --text-muted: #6c757d;
    --text-black: black;

    /* Accents */
    --accent-primary: #ff6b35;
    --accent-songs: #ff7949;
    --accent-exercices: #ffb936;
    --accent-compositions: #cf6e88;
    --accent-utility: #4C8089;
    --accent-rythme: #8b5cf6;
    --accent-libre: #ff7949;
    --accent-success: #4ade80;
    --accent-warning: #eab308;
    --accent-danger: #ef4444;

    /* Borders */
    --border-color: #ffffff;

    /* Accent secondaire (utilisé hors boutons : ex. notes de gamme) */
    --accent-secondary: #8b5cf6;

    /* Cards */
    --card-bg: #ffffff;
    --card-hover: #f8f9fa;

    /* Status */
    --status-to-learn: #3498db;
    --status-learning: #f39c12;
    --status-mastered: #27ae60;

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

    /* Rhythm generator — dégradé accent-primary → accent-exercices
       (du plus long = accent-primary au plus court = teinté accent-exercices).
       Silence reste neutre, ghost = accent-exercices pur. */
    --rhythm-noire_pointee: var(--accent-primary);
    --rhythm-noire:         color-mix(in srgb, var(--accent-primary) 80%, var(--accent-exercices));
    --rhythm-triolet:       color-mix(in srgb, var(--accent-primary) 80%, var(--accent-exercices));
    --rhythm-pointee:       color-mix(in srgb, var(--accent-primary) 60%, var(--accent-exercices));
    --rhythm-croche:        color-mix(in srgb, var(--accent-primary) 40%, var(--accent-exercices));
    --rhythm-double:        color-mix(in srgb, var(--accent-primary) 20%, var(--accent-exercices));
    --rhythm-silence:       var(--bg-tertiary);
    --rhythm-ghost:         #adadad;
}

/* DARK THEME */
[data-theme="dark"] {
    /* Backgrounds */
    --bg-primary: #383f5e;
    --bg-secondary: #4e5472;
    --bg-tertiary: #656a83;

    /* Text */
    --text-primary: #f0f0f0;
    --text-secondary: #d4c4b0;
    --text-muted: #a89f91;
    --text-dark: #383f5e;

    /* Accents */
    --accent-primary: #ff7949;
    --accent-songs: #ff7949;
    --accent-exercices: #ffb936;
    --accent-compositions: #cf6e88;
    --accent-utility: #4C8089;
    --accent-rythme: #ad49ff;
    --accent-libre: #4C8089;
    --accent-success: #4ade80;
    --accent-warning: #ff7949;
    --accent-danger: #ef4444;

    /* Borders */
    --border-color: #8288a7;

    /* Accent secondaire (utilisé hors boutons : ex. notes de gamme) */
    --accent-secondary: #307D91;

    /* Status */
    --status-to-learn: #a855f7;
    --status-learning: #fb923c;
    --status-mastered: #4ade80;

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

    /* Rhythm generator — overrides éventuels propres au dark theme.
       Par défaut, la palette est définie dans :root via color-mix(accent-primary, …)
       et se recalcule automatiquement avec l'accent-primary courant. */
}

/* Transitions simples */
* {
    transition: background-color 0.15s ease, color 0.15s ease;
}

/* Accent par type de contenu */
body[data-content-type="songs"] { --accent-primary: var(--accent-songs);}
body[data-content-type="exercices"] { --accent-primary: var(--accent-exercices);}
body[data-content-type="compositions"] { --accent-primary: var(--accent-compositions);}
body[data-content-type="backing_tracks"] { --accent-primary: var(--accent-compositions);}
/* libre & rythme : pas d'override d'accent body — seul le pick est coloré */
