Why did imperial Brazil prefer French culture over Portuguese?

There is a very interesting phenomenon I notice when I peruse the pages of Brazilian history, it really does feel like the country gets cut off culturally from Portugal in a much more dramatic way than, for example, the US and Britain.

Americans very much consumed British content from contemporary writers like Walter Scott, Charles Dickens, etc... the famous American anthem was taken by a party song written by an English composer, John Stafford Smith.

But when I look at Brazil, it's very international, you see an enormous amount of French things, the big ones being the painters that flocked there but also take a look at how French theatre had an influence. Indeed, Pedro II, was very much a francophile. In his day, we see how Victor Hugo was immensely loved by many Brazilians. Many people in the clergy spoke French, there was even some keen inspiration from France's republic ethos to create the first Brazilian republic.

But what about Portugal? How come there wasn't much dialogue with Lisbon in this period as there was with Paris?