Danni, the French are in Afganistan for show and tell, they are to train the Afgani army, only! Their assignment was so far outside of the original combat zones as to be reachable ONLY by air! Things changed and now they're in one of several danger zones, and the French people, after hearing from their sons/fathers/husbands are demanding their return!
France backed out the backdoor of NATO's Military arm about 35, or so, years ago, it took them 20 years to figure out Germany was between them and ANY threat from Russia, and therefore they didn't need to spend their money on military preparedness with NATO.
They however, chose to remain inside the Administrative arm, therefore getting to help determine the other members military and administrative purchases, without having to pay a dime, or franc, in their case. Not a bad deal for them, all mouth, no need for action! The Canadians were doing the same to us before this new Prime Minister!
The French paid NO attention to the activities of the Taliban in their immediate area of responsibility! They were nailed for their own stupidity, and lack of coordinated actions!
A military unit is always cognizant of what's happening AROUND them to the maximum extent possible, ALWAYS! (their lives may, and in this case did depend on it!)
Sadly, they were watched, over a period of time, (maybe two or three months, time is of no consequence to that type of enemy) and a pattern was determined to occur, on a regular enough basis, allowing for an attack to occur, with a reasonable level of success! This was planned and carried out while yet still, someone watched the target (possibly a cook, dishwasher, or gardener, ON the base itself, or, a truck driver). Possibly someone who's family was under threat of harm, or a true zealot, impossible to really know, YET!
It will be determined, in time, exactly what, and how this happened!