Just wondering if the French and Imperial Mexicans won in Mexico somehow what would be the relations between Mexico and France would it essentially be a puppet of France or would they be allies on equal footings
I think you'd also require a decisive Confederate victory in the Civil War, since the U.S. did mass a few soldiers in southern Texas in 1866, to let the French know they were not welcome there.
In any event, Mexico could turn into a protectorate like what happened with Morocco or Vietnam.