Ramaphosa’s future in doubt after disappointing South African election