One of two items. You say there was no stumbling. A fuel pump failure would cause pressures to drop and there would be at least a momentary stumble at idle. A bad ignition switch would cause a car to die instantly, perhaps a main relay. Or, a solid shot of water in the fuel would cause it to die at idle or run very rough at speed, then once the water is used up, it runs again. Typically when it is water, you are in the middle of a turn or going up or down a hill - or just leaving the gas station. But to me, it sound more electrical, something turned voltage off to the coils.