/*
 * ============================================================================
 * NOTE COLOURS — the stickers on the keyboard.
 * ============================================================================
 *
 * This is the palette as shipped, and the only place a colour is written down.
 * Nothing else in the app hardcodes one: change a hex here and the noteheads,
 * the accidentals and the fill bars all follow.
 *
 * These are defaults, not the last word. Réglages (/reglages) writes whatever
 * has been configured to storage/settings/palette.json and serves it from
 * /palette.css, which the layout links straight after this file — same
 * selector, later in the cascade, so it wins. A colour can therefore be changed
 * on the running site, and only the ones actually changed stop following what
 * is written here.
 *
 * Taken off the instrument: seven stickers, one per white key, repeating every
 * octave — C grey, D red, E green, F black, G pink, A yellow, B blue.
 *
 * The black keys carry no sticker, so a sharp borrows the colour of the white
 * key immediately below it — which is where the hand finds it — and the ♯ on
 * the staff is what tells the two apart. That means C and C# share grey, F and
 * F# share black, and so on: the colour says "this key, or the black one just
 * above it", never more than that.
 *
 * Hues are the stickers'; lightness is pulled down on the pale ones (pink,
 * yellow, grey) so they stay legible on the paper-white score background.
 */

.score {
  --key-0: #8e8e8e; /*  C   grey   */
  --key-1: #8e8e8e; /*  C#  — grey, sharp of C */
  --key-2: #e0452a; /*  D   red    */
  --key-3: #e0452a; /*  D#  — red, sharp of D */
  --key-4: #2a9d54; /*  E   green  */
  --key-5: #1e1e1e; /*  F   black  */
  --key-6: #1e1e1e; /*  F#  — black, sharp of F */
  --key-7: #e0937d; /*  G   pink   */
  --key-8: #e0937d; /*  G#  — pink, sharp of G */
  --key-9: #d6a20e; /*  A   yellow */
  --key-10: #d6a20e; /* A#  — yellow, sharp of A */
  --key-11: #2b8bcd; /* B   blue   */

  /* Rests have no pitch, so their bar is neutral. */
  --key-rest: #b9b3a7;
}

[data-pitch-class="0"] { color: var(--key-0); }
[data-pitch-class="1"] { color: var(--key-1); }
[data-pitch-class="2"] { color: var(--key-2); }
[data-pitch-class="3"] { color: var(--key-3); }
[data-pitch-class="4"] { color: var(--key-4); }
[data-pitch-class="5"] { color: var(--key-5); }
[data-pitch-class="6"] { color: var(--key-6); }
[data-pitch-class="7"] { color: var(--key-7); }
[data-pitch-class="8"] { color: var(--key-8); }
[data-pitch-class="9"] { color: var(--key-9); }
[data-pitch-class="10"] { color: var(--key-10); }
[data-pitch-class="11"] { color: var(--key-11); }

/* Not a pitch class, but the same mapping: silence is a slot in the palette
   like any other, and the settings preview draws it alongside the notes. */
[data-pitch-class="rest"] { color: var(--key-rest); }
