Need to charge multiple 18650s without disconnecting from the project

I'm working on a project that requires 12v for an LED strip, will switch down to 5v for the arduino and initially I was planning on running off a 12v wall supply but thought it would be cool to also be able to go portable but just unplugging the project and walking away with it.

My question is, what is the best way to do this with 18650s? I can fit 4 and it seems like series makes sense for powering the project, I can switch to 12v and 5v, but for charging I'm really not sure what is best as I want to be able to have the batteries charging while the project is plugged in, but the project remain powered without interuption when the 12v DC line is removed, and of course I don't want the risk of unbalanced cells resulting in fire or anything, so would I need something like mosfets between each cell and wires from - and + of ALL cells so they can be charged at 4.1 or something individually, would this switch fast enough when DC in is removed so the cells are then outputting the nominal 14.8v ?

It should be possible. Charging the cells from the 12V safely will be harder. If you are able to handle this switching power should be no problem.