I understand that France under Louis XIV had achieved a sort of hegemony over Europe with its peak in 1683. Thereafter, France seems to have began a slow decline that ended in bankruptcy and revolution.
What caused the downfall of the hegemony of Louis XIV’s France? Are the policies of the Sun King and his successors to blame, or was the decline a result of underlying economic or social factors? It would also help to understand what led to the rise of France in the first place.
As an extension, how was France able to reverse its decline and become the dominant power in Europe under Napoleon (albeit briefly)?
I would push back against the assumption in your question that France ceased to be Europe's dominant power after Louis XIV. With hindsight, it's easy to think of the 1700s as mere prelude to the inevitable revolution. But we should remember that the reason the French Revolution came as a total shock was because it happened in the most powerful nation in Europe, the one most people would have pegged as unshakeable. Between 1683 and Waterloo, France was "the great nation," la Grande Nation.
Nevertheless, it is true that when Louis XIV's reign ended in 1715 France was in bad shape. If Louis XIV had died in the 1680s he would have easily been France's greatest king, but the policies he pursued in the last decades of his life were ruinous. France's coffers were emptied and its population reduced by harvest failure and the Sun King's ceaseless-warring, none of which had met with any success since about 1683, as you point out. There was serious religious strife in the country because Louis had revoked the Edict of Nantes in 1685, which reignited anti-Protestant violence and caused an economic brain-drain as the Huguenots fled France to seek refuge with its enemies in England, the German states, and Holland (all of whom made great hay out of this as anti-French propaganda). Louis could not even maintain peace among the Catholics of his realm because of his heavy-handed response to the new heresy of Jansenism, a somewhat Calvinist Catholic movement which was popular with France's literate classes. Louis cracked hard on the Jansenists by imprisoning notable members, razing a Jansenist convent outside Paris, and pestering the Pope to condemn the movement in a papal bull in 1713. This was a terrible decision, because even many orthodox Catholics in France saw it as an attack on the independence of the French church. Even the sumptuous court life of France seemed to be dying alongside the Sun King in the new century. Gone were the days of grand extravaganzas in the gardens of Versailles; Louis preferred quieter places to stay in his last years. France's cultural greatness had diminished in tandem with its diplomatic and geopolitical situation. When Louis died in 1715, France had no money, no allies, and its political culture was under serious pressure from Jansenists, nobles, and administrators who all wanted reform and an end to Louis Quatorzian absolutism.
The scene looked set for a total disaster after Louis XIV's death. His grandson Louis XV was only five years old, so the roguish Prince of Orleans, Phillipe II, became regent. Yet in fact France bounced back remarkably quickly. This had a lot to do with France's demographic and geographic advantages. No matter how badly Louis XIV ran the country into the ground, the fact remained that 20 million people lived in France, and the population rate continuted to shoot upwards until evening out mid-century. That meant that one in five Europeans lived in France, which encompassed 514 million square kilometers of good agricultural land defended by an "iron belt" of fortresses built by the master military engineer Vauban. That's not to mention France's colonial empire, which included the Caribbean island of Saint-Domingue, whose immense economic potential was just being untapped by the construction of sugar plantations. In 1685 there had been no sugar plantations on the island, by 1717 over 100 had been built, and by the mid-century they were producing 42,000 tons of sugar per year (worked in hellish conditions by by thousands of African slaves). France had been put under the cosh, but thanks to its people, its country, and its empire it retained the potential for greatness.
The chief problem Louis XIV left behind was debt, but nobody doubted that France could recover. The chief method of doing so was through loans, which were raised by selling government offices which gained revenue to their holder. Thanks to massive borrowing, as well as tax farmed by private agents, the state kept ahead of its debts. However, here we can see one of the cracks in the wall. Eventually the state's soaring debts would catch up with it unless the financial system was reformed in a way that gave the state more control over the economy, rather than relying on private loans and tax farmer. The regent tasked the Scottish economist John Law with creating a national bank. Law was ahead of his time in advocating for a fiat currency unbacked by precious metals, but his reform attempts turned into a fiasco when he used the new paper money to finance a colonial company in Louisiana. The land turned out to be a stinking swamp, the colonists died, and the bubble burst, causing a money panic and destroying the confidence in the French economy which Law had been charged with building. This was a crucial moment: for the rest of the century, anyone who advocated reforming public finances was reminded of the specter of John Law, and the monarchy continued to stagger under the weight of its growing debts until the revolution.
But these debts financed a newly powerful military machine, an economic boom, a cultural flowering in the Enlightenment. First of all, no European power surpassed France even after Louis XIV's losses. An increasingly centralized, disciplined army (financed by one third of national spending) served France well in the War of Austrian Succession (1740-48), especially at the brilliant victory of Fontenoy which secured the Netherlands for France, and also captured Madras from the British in India. The sinews of war were strengthened by a vibrant economy at home, thanks to the sugar trade, a growing industrial sector producing textiles and luxury goods on a small scale, and good harvests.
To quote the historian Colin Jones:
"from the death of Louis XIV down to the Revolution, France's population would grow by one third, from 21.6 million in 1715 to 28.6 million in 1789, while its trade with Europe increased fourfold and that with its colonies expanded tenfold - a record that no other European power, even England, its perennial competitor, could match."
And while most of the state's money went towards the military and debts, the economic boom made France the cultural center of Europe again. Trade, urbanization, and better communications made it possible for the Enlightenment to take place, through the increasing affordability of books and newspapers, and the establishment of coffee shops and salons for debate.
At mid-century France had regained the heights from which it had fallen in the late 1600s. If you are looking for the start of a slow decline, I would say that 1757 is a better place to look than 1683. That was France's annus horribilius, and it was the result of what historians call the Diplomatic Revolution, the reversal of long-established politics as the Bourbons and the Habsburgs became allies with the First Treaty of Versailles in 1756 and went to war with Prussia and Britain. This was a disastrous alliance for France. It had been meant to bring peace to the continent so that France could turn its attentions overseas, but instead it dragged the nation into a disastrous war and a punishing peace which stripped France of her North American colonies. On the bright side, Lorraine and Corsica passed into French hands in the following decade. The Seven Years War, however, was France's low point of the century, and it was followed by financial and agricultural crises which compounded everyone's misery.
Debt continued to hang around the state's neck like an albatross, and as everyone knows the American War of Independence was the last big nail in the coffin, although it gave Louis XVI the satisfaction of stripping England of its North American empire. Yet although the debt crisis eventually led to the outbreak of the revolution in 1789, I don't think we should see that as the continuation of decline. Rather, I think the revolutionaries, and later Napoleon, ended the stagnation of French power and fully untapped the France, now conceived of as a nation of citizens, rather than a kingdom of subjects, could finally tap its colossal reserves of wealth and manpower. The end of feudal privileges enabled the creation of a capitalist economy. A levee en masse of citizen-soldiers expanded France's borders to unprecedented limits at the point of their bayonets. France had not declined - it had maintained and even surpassed the glories of the Sun King.
The France which Napoleon inherited in 1799 was not a dying power, but a nation at its historical prime.
TL;DR
The 18th century was France's century, although cracks in the foundation were becoming visible.
Nevertheless even the revolution only made France stronger - it was larger by far when Napoleon took control in 1799 than it had been in 1700. Napoleon unleashed France's full potential in his bid for Europe. It was the nineteenth century, after Waterloo, where France entered a period of real decline that left it behind its rivals.
Sources:
Colin Jones, The Great Nation: France from Louis XV to Napoleon. London, Penguin Books, 2002.
Daniel Roche, France in the Enlightenment. Cambridge: Harvard University Press, 2000.
The short answer is: the policies of the Sun King and his successors are to blame but underlying economic or social factors also played a part, as did some bad luck.
I will try to answer this in a more profound manner, but the scope of the question is so broad it will take a long time to answer it.
***
Part I: Politics
Chapter 1: France Ascendancy
Under Louis XIII and the Cardinal Richelieu France moved strongly toward centralisation and an absolute monarchy and battled against the Habsburg. During the regency of Anne of Austria, the Cardinal Mazarin pursued this policies which soon led to the Frondes in 1648-1649 and 1650-53. After that Louis XIV could seat with more confort on his throne. The Grand Condé, one of France best general of the times, prince of blood and principal artisan of the Second Fronde had fled to Spain but he was defeated at the Battle of the Dunes by a French-English alliance in 1758 (Mazarin had negociated with Cromwell). About a year later, Spain exhausted in money and men signed the Peace of the Pyrenees ending a twenty-three years war. France gained the Roussillon, the Artois, Graveling and Thionville, Louis married Maria-Teresa the daughter of Philip IV but had to pardon the Grand Condé.
Two years later, Mazarin died and Louis secured his hoard, indeed Mazarin had embezzled a great deal of money (200 millions francs according to Voltaire). Thus Louis became one of the wealthiest monarchs of Europe and reigned on one of the most populated territory of Europe: 20 millions people lived in France. For comparison England and Spain had a population of 5 millions each, Italy 6 millions, the Dutch Republic 2 millions, the only state that could rival France was the Holy Roman Empire with some 21 millions people, but it was a mosaic of hundred of states none had more than 2 millions people and its geographic situation was far worse after the Thirty Years' War and with renewed Ottoman aggression. And with that population came two things: taxes and men for the armies.
But on thing loomed on the French state: the Spanish Succession. After the death of Philip IV in 1665, Charles II succeeded him, but he was an invalid unlikely to live long and to produce an heir. Maria-Teresa his eldest half-sister had to renounce her rights to the Spanish crown when she espoused Louis, against a dowry of 500,000 crowns to be paid in eighteen months, but it would never be paid. The Habsbourg of Spain and those of Austria, who were also emperor of the HRE, were close allies and had France in a vice. At the times Spain possessed the Spanish Netherlands, Franche-Comté on France north-eastern and eastern frontiers, Lorraine and Alsace where also in part imperial territories, so the French kings always felt threatened by this.
One of the primary goal of Louis politic of réunions was to secure his frontiers, he would often use a legal argument to declare war (inheritance, ancestral rights to this piece of land from this bishopric, etc.). With the War of the Devolution (1667-8) and the Dutch War (1672-8/9) France acquired Franche-Comté and a number of fortresses like Tournai, Charleroi, Condé, Valenciennes, Ypres and Saint- Omer, also the city of Freiburg east of the Rhine. Louis brought the port-city of Dunkirk from the king of England Charles II in 1662, ending this possible threat to his realm. In 1678 the north-eastern frontier was secured with a system of fortress build by Vauban. It was time to close the eastern frontier so he occupied Strasbourg in 1681 and as the emperor was defending Vienna against the Turks he made sorties in the Spanish Netherlands, provoking Spain into war, and occupied Luxembourg. This led to the Truce of Ratisbonne in 1684 where France acquired Strasbourg, Luxembourg and the French occupation of Lorraine was recognized.
Chapter 2: The First Turmoils
The religious policies of Louis had also started to change since 1670, when he began to gnaw at the Edit of Nantes, restricting the rights of the huguenots (French Protestants), the infamous dragonnades where the royal mounted troops called the dragons were quartered on Protestant families and allowed to terrorize them into renouncing their faith. This change of policies where enacted under the growing influence of Louvois, the minister of war, and the diminishing influence of Colbert as well as some contentions with the Pope Innocent XI over some rights on vacant bishoprics. When Leopold I, the Habsburg emperor defended Vienna against the Turks and was acclaimed the champion of Christendom, His Most Christian Majesty had to demonstrate his orthodoxy, this sentiment was again reinforced when the catholic James II became king of England. So in 1685 the Edict of Fontainebleau revoked the Edict of Nantes.
The ensuing flight of huguenots is believed to have had a bad effect on the economy, but recent reassessments had weakened this point of view. But it also made Louis XIV to be perceived by his rivals as a threat to Europe and permitted William of Orange to organize powerful coalition against him.
Then comes the Nine Years War (1688–97). After some initial successes and despite more victories than the Allies (HRE, England now under William of Orange, the Dutch Republic, Spain and Savoy) Louis had to accept the Treaty of Ryswick (1697) and return his possessions east of the Rhine, retire from Lorraine and return Luxembourg and other fortresses to Spain, recognize William III as King of England despite his ally James II living in exile in France, but he kept Strasbourg and his possessions in Alsace. But the war was not the only calamity that plagued France at the time, since 1691 France had suffered three bad harvest and a terrible winter in 1693-4, which ravaged its economy and population.
And we arrive at the War of the Spanish Succession (1701–13/14). The issue his complex but to sum it up: both the Sun King and the Emperor had a shot to put someone on the throne of Spain and as Philip IV had not paid the dowry of his wife Louis considered that his renunciation of his rights was moot. Charles II had made a will leaving the Spanish Inheritance to Philippe, duke of Anjou, the second grandson of the Sun King, but the will ruled against the union of the two crowns of France and Spain. Nevertheless Louis accepted that will in part because failing to do so would put the archduke Charles as heir to the Spanish Empire. At first it seemed that war would only lead to conflict with the HRE but Louis made various provocations against the other states that helped revive the Grand Alliance against him: he proclaimed that his grandson's right to the French Succession remained valid, he recognized James III as King of England after the death of his father in exile despite William III continued existence on the throne of England, he gave preferable treatment to French traders in Spanish markets against their English rivals and a French company acquired the asiento, the exclusive right to the trade in slaves from Africa to the Spanish colonies.
Soon France was at war on four fronts: in Germany, Spain, the Low Countries and Italy. Everywhere Louis was defeated save in Spain and in 1709 peace loomed on Europe, but the Allies wanted an unconditional surrender of the Bourbon, on particular note was a provision in the treaty that the frontier fortresses would be given to the Alliance under a temporary truce before a settlement in Spain where Philip V (Louis' grandson) continued to resist with the help of the Castillans. If the truce failed to deliver peace the Alliance would have an overwhelming advantage to conquer France. The peace negotiations broke and war resumed, but the battle of Malplaquet was a serious setback for the Alliance, then a changement of government in England led to its withdrawal from the war and the death of the Emperor Leopold I in 1711 succeeded by the archduke Charles, the other contender for the Spanish Succession, who threatened to revive the Habsburg Empire of Charles V diminished the support of his allies. The French scored another big victory at Denain in 1712. The subsequent Peace of Utrecht (1713-4) led to a far more satisfactory settlement for France: Louis kept Maubeuge, Condé and Lille on the Netherlands frontier, the Alsace and Strasbourg on the eastern frontier, his grandson kept his crown in Spain and the Indies; but in trade it was a bad deal: England tightened her colonial grip on North America and the West Indies and her navy controlled the Mediterranean, she also acquired the asiento.
Bibliography
W. Durant, A. Durant, The Age of Louis XIV
J. H. Sennan, Louis XIV