Detection of flooding and drying inside a PEM fuel cell stack