Non-LTE time-dependent spectroscopic modelling of Type II-plateau supernovae from the photospheric to the nebular phase: case study for 15 and 25 M⊙ progenitor stars