On the periodic Ambrosetti–Prodi problem for a class of ODEs with nonlinearities indefinite in sign