maybe a bad ignition switch ? thats what I would check like you said the stereo and air shut off, i bet the dash lights went off to . if the stereo goes and air /heater fan shuts off again play with the ignition switch it will most likely come back on or stall the engine.