The French president’s domestic woes have dimmed his ambitions and weakened his influence within the European Union.