In other words why in the history classes in Italy usually the Napoleonic wars are viewed by the eyes of the french so Austerlitz is a great victory and Waterloo is a disaster (a "disfatta") akin to Cannae or Caporetto?
It is because Italians actually fought for the french? Or because the Risorgimento owes much to the Revolution and its ideals? Or simply it is cultural closeness?
Sorry for any akward error
It is because Italians actually fought for the french?
Much of Italy was under French rule for most of the Napoleonic Wars, either directly or through French puppets. Here's a map of 'metropolitan' France (i.e. the legal boundaries of the French mainland) in 1812; here's another showing French puppet states. As you can see, pretty much all of modern Italy was under French control.
Napoleon, in addition to being legal ruler of France, was crowned King of Italy, thus converting the Italian Republic that had been formed in the aftermath of the 1800 Italian Campaign with the Kingdom of Italy, which he ruled through his viceroy, his stepson Eugene. The Kingdom of Naples was converted into a French puppet in 1806, when Napoleon replaced its Bourbon rulers with his brother Joseph. When Joseph was made King of Spain, Marshal Murat, Napoleon's brother-in-law, was made King of Naples. France gradually annexed the remaining North Italian states until 1812.
Thus many Italians were part of the French Empire, and all of Italy was part of the wider 'Napoleonic' Empire. The parts of Italy that were directly ruled by France had all the same governmental structures as any departement in France itself; they had prefects, national guards - and conscription. The armies of the annexed states were folded into the Grande Armée, some of them - like the Tirailleurs du Po - gaining a reputation as crack troops. Others, like the majority of Neapolitan troops, were considered a liability.
There is, however, another side to your coin: as you say, the Risorgiamento owed a lot of its foundation to the ideas of nationality and liberty it found when it was conquered for the French Republic by General Bonaparte in 1796. The idea that Austrian rule was a foreign yoke to be thrown off became extremely influential in the period between 1815 and 1848, although it must be noted that 'influential' here refers to the liberal elites who were the drivers of the Italian nationalist project, rather than common people. The fact that the Second French Empire under Napoleon III aided and abetted the various Italian states in their attempts to throw off Austrian rule also helped raise the First Empire in the estimation of nationalist writers.
Sources:
Swords Around a Throne: Napoleon's Grande Armée, by John R. Elting
The Italian Risorgiamento: State, Society and National Unification, by Lucy Riall
The Napoleonic Empire by Geoffrey Ellis