I had the exact same problem. High, low and side lights all went out when on a long stretch of unlit country road.
Thankfully the mrs was there on her 125 to guide me through.
Turned out it was a black connector rhs behind the rad. Cleaned the contacts, checked everything was well again and rammed grease into the connector.
Didn't have any issues for the next year until the bike went.