Once excluded from political discourse, the far-right AfD party has gained legitimacy and electoral strength.