Hi there hope i can be of some help.
From the symptoms you describe it sounds like a chrarging fault. The whining noise you describe and the ignition light been on are most likely linked.
A whining noise from the engine can indicate worn alternator bearings. If the alternator bearing are damaged, this usually causes internal damage to the alternator. The fact that your c-max actually cuts out, suggest a serious internal fault with the alternator and will need replacing.
The vehicle can restart as during cranking the 'smart charge' system cuts off charging, and any unecessary drains on the battery, i,e radio,heaters etc.
If i can be any more help, please ask, cheers Bob