In my 2012 Nissan Versa this morning in the dark, I was pulling into a parking lot and a lady in dark sweats was in my path, so I gave the brakes a little jab, whereafter, I lost all pedal. I pumped them a couple of times and got a tiny bit of braking, but really nothing at all. Complete loss of brakes. I rolled into the parking place, pulling my emergency brake to stop the car, and turned off the ignition. I restarted the car and the brakes worked fine. An hour later, as I drove home, I repeatedly stabbed the brakes, once to the point that I felt the ABS engage. They worked fine also when I drove the car to work.
What could cause a complete loss of braking like that? Master cylinder failing? Thoughts?