On a singular periodic Ambrosetti–Prodi problem