

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

/* LIGHT THEME (default) */
:root {
    /* Backgrounds */
    --bg-primary: #ffffff;
    --bg-secondary: #eeeeee;
    --bg-tertiary: #ffffff;
    /* Surface "papier" : claire dans les deux thèmes (jamais surchargée en
       dark), pour les bulles et encarts qui doivent rester lisibles avec de
       l'encre noire quel que soit le fond de page. À utiliser avec
       --text-black. */
    --surface-paper: #f5f5f5;

    /* 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-packs: #34d399;
    --accent-utility: #2397e4;
    --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 — coups ↓ ↑ en accent-utility, coup étouffé (x) gris */
    --rhythm-stroke:        var(--accent-utility);
    --rhythm-ghost:         #adadad;
    /* Favoris (étoile) */
    --accent-favori:        color-mix(in srgb, var(--accent-primary) 20%, var(--accent-exercices));

    /* Couleur de chaque catégorie d'exercice (cartes de packs) */
    --cat-main-gauche: #4f8ef7;
    --cat-main-droite: #ffb936;
    --cat-rythme:      #ad49ff;
    --cat-accords:     #ff7949;
    --cat-manche:      #2ec4b6;
    --cat-phrase:      #cf6e88;
    --cat-bonus:       #4ade80;

    /* Couleur de chaque niveau (débutant / intermédiaire / avancé), partout sur
       le site (/bienvenue/, /parcours…) : « montée en chaleur » du jaune au corail,
       douce, et distincte de l'orange des boutons. Texte foncé (--text-dark) dessus. */
    --niveau-debutant:      #f2c063;
    --niveau-intermediaire: #eb9f5e;
    --niveau-avance:        #de7f74;
}

/* DARK THEME */
[data-theme="dark"] {
    /* Backgrounds */
    --bg-primary: #3b456f;
    --bg-secondary: #515b84;
    --bg-tertiary: #677195;

    /* Text */
    --text-primary: #f0f0f0;
    --text-secondary: #d4c4b0;
    --text-muted: #a89f91;
    --text-dark: #3b456f;

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

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

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

    /* 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);}
body[data-content-type="packs"] { --accent-primary: var(--accent-packs);}
body[data-content-type="parcours"] { --accent-primary: var(--accent-packs);}

/* libre & rythme : pas d'override d'accent body — seul le pick est coloré */

/* Le panneau playlist garde un accent stable quel que soit le type de contenu
   de la page (les items, eux, restent colorés par type via --pli-accent) */
#playlist-content { --accent-primary: var(--accent-songs); } /* garde l'orange même quand l'accent de page change */
