Euro zone inflation eased in June because of more moderate energy price rises, but the slowdown was less than expected.