The french language as we know originates from a little part of the country called Ile-de-France
That's a widespread confusion, but not really true. The dialect of Ile de France, called Francien is distinct enough from French standard on this regard. Now it did played an important role but French, as virtually every other language, is the result of a spontaneous and elaborated evolution from various French speeches in medieval/modern chanceries and bureaucracies from one hand, literary dynamism from another . For instance, Picard and Toureangeau were significantly influential as was Francilian, as well usages from other chanceries, as in Normandy.
Basically, the french language as we know it emerged from a set of dialects whom administrative and literary unification favored some speeches influences, and was slowly systematized. It's not that a French language based on, say, Bourguignon wouldn't have significant difference but it would be reckognizable enough if elaborated in a similar timeline.
But if occitan was the main language of the country? How could this happen?
Occitan basically went trough same rules : you didn't have a really unified Occitan language to speak of initially and while a literary koinè emerged in the XIIth century (which is arguably quite early and was a potential linguistical unifier) the existence of several political centers prevented a real go at systematic unification. You'd need a rough political unity in southern France which really asks for an early PoD (the latest I could think of being the War of Succession of Auvergne in Xth century) because the whole place was a political puzzle even before the Great Southern War (which ended, in the early XIIIth, by a mosaicized and significantly weakened Languedoc before the Crusade).
Note that the name Occitan itself was a production of Capetian administration to name newly conquered royal territories (roughly a mix of Oc (yes) and -itania as referring to Aquitania). Before, you didn't really have a single name for medieval Occitan : Provencal, Limousin being generally used (but being prestigious use of specific names) and of course "Roman Language" (which was used for basically every Romance language so far).
So we need to have strong enough political centers and formation in this region (not too early to not butterfly something similar enough to Occitan). Basically more recent the PoD, more difficult it is. But that wouldn't be the official language of France, at best it would be one official language of France : as long you maintain French control over Aquitaine, it wouldn't be possible to have anything else.
Maybe if France's capital was located in the Occitania or in other place in the south? If so, could it bring any consequences ?
That's extremely unlikely : France in its medieval sense is roughly the region set between Tours and Laon and Paris was considered as its cultural and political centers since the VIIIth century. You'd need something catastrophic enough to get rid of this, and it would probably be set in the same region. A state whom centers would be in Aquitaine would be an Aquitain state, not a French one.
I'd argue your best bet is for Ragnar's Siege of Paris turn into a broader Norse attempt to settle the region via the Vikings occuping the Seine more permanently by having King Horik of Denmark refusing to submit to the Franks and accepting the raid leaders as vassals, leading to a "Normandy Danelaw"
The problems being that large settlement was outside Viking capacities and projects. Most of Danelaw was inhabited by Anglo-Saxons whom some took for themselves Scandinavian practices and usages. And that raid leaders did exist in first place because Danish kingship was too weak to oppose entrepreneurial raids that reinforced their captains prestige, leadership and wealth inside Denmark in first place.
This is why Scandinavian presence in WFrancia or MFrancia was relatively limited to the coastal portion (and not everywhere) with a quick mix-up with locals and following acculturation.
It doesn't help that Carolingian court was semi-nomadic and that they rarely if ever set up court in Paris during their rule : it was still a main city administratively and culturally, but never a Carolingian palace.
as the West Francian court is obliged to evacuate the north. A movement of the court to the south so early in kingdom's history has a solid chance of making Occitan the language of the elite before French can get solidified in that position.
Aquitaine was, at this point, essentially disputed by
Pepin II of Aquitaine: he didn't as much controlled the kingdom than being a serious pretender for it, meaning moving court there might not be the brightest idea giving that in this ultra-catastrophic scenario (even if it is, I think still really unlikely) moving South while you're significantly decredibilized is a recipe for disaster : if it had to happen, I'd rather see a move to other palaces such as around Loire or around Meuse.
Really, you can't have Occitan as the sole language of a state, and this state being France, giving that places were Old Occitan was spoken were barely considered as part of Francia/France before the XIVth century at earliest, while being under the control of Frankish/French kings.
Not that the concept isn't interesting (
it's basically the plot of Lou Mounde Parralèl), but at best, you could be in a situation where both France and Aquitaine manage to form similar areas in terms of political unity (or rather, in terms of less mosaicized polities) and Aquitain kingship remaining fairly subordinated to French kingship (as it was for a good part of IXth century, with some remembrances into the Xth) in the form of a dual but unequal kingdom. But even there, I'm not really seeing how and why proto-French would not appear as a main language.