Prediction of charge-transfer excitations in coumarin-based dyes using a range-separated functional tuned from first principles