There are obviously a lot of reasons but essentially we can separate in two categories, from a military point point of view; and from a more global approach with deeper reasons of the french military decline. Let's start with the second aspect.
The situation and balance of power is absolutely not the same in 1700/1800 and 1900. In the first case France is until the beginning of the 19th century the most populated power of the whole Europe(including Russia), while after 1815 the French demography is stalling for multiple reasons. It only raised from 30 millions to barely 40 millions inhabitants between 1815 and 1914 While in the meantime Italy, Germany and UK double or triple their population (14 to 42 M for U-K, 22 to 70M for Germany (considering the border of 1815) 18 to 35M for Italy). In 1914 France is only the 5th (behind Russia, Germany, Austria-Hungary and United Kingdom) most populated country of Europe, that's a huge change!
The main continental rival of France in Europe is in 1700 Austria and the politically divided Holy Roman Empire (while France is one of the most centralized country of Europe thanks to the absolutist reforms of Richelieu/Louis XIII and Louis XIV). Which after 1870 is no more the case, Germany is now a united state that became more populated and powerful than France.
The third reason of the French relative weakness is the (comparatively) lack of industrialization of France. On the eve of WWI, Germany is producing 16 % (from 13 % in 1870) of the world industrial goods, while UK went from 32 % to 14 %, and France from 10 % to 6 % ( USA went from 23 % to 32 %). Germany is almost 3 time as industrialized as France, it is no wonder that it had the most powerful artillery and heavy artillery of Europe.
As for military reasons it is tougher to give reasons as each defeat or victory has its' own distinctive reasons that cannot be transposed to another war. It is a more fluctuant than the global situation formerly explained. France did not went from a complete powerhouse to a bunch of "surrendering monkeys". It lost badly in the 7 years war and in the 1870 war while France (with the help of allies naturally) successfull repelled the German in WWI. There is obviously no comparison possible between the defeat in the battle of France and the Algerian war.
However I guess that your main concern is the collapse of the French army quality between WWI where French army is considered the best of the world and WW2. Here are some explanations.
-The lack of budget and interest in the army and the pacifism of the politician/population. France is exhausted and traumatized by WWI, a colossal debt, its' million of French death and the destruction of the French north-east. There are huge reduction in "offensive" equipment programs (considered "aggressive"). In 1933 (Year of Hitler's arrival at the head of Germany) France is suppressing 5000 officers, in 1934, France produced only three tanks, France is cutting a third of its' military budget between 1933 and 1935...
-The inadequate doctrine (see my post here) https://www.reddit.com/r/AskHistorians/comments/5ir0na/what_land_doctrines_did_the_western_powers/dbaj86f/