Whren, reasonable suspicion, and consent to search.
Montana courts apply both the U.S. Constitution and the Montana Constitution to traffic stops & pretext claims. When state protections are broader than federal ones, Montana judges follow the state rule. When they are equal or narrower, federal precedent controls under the Supremacy Clause.
Federal cases governing traffic stops & pretext include controlling U.S. Supreme Court decisions and binding precedent from the federal circuit covering Montana. Civil remedies most often proceed under 42 U.S.C. § 1983, with defenses including qualified immunity.
Legal information, not legal advice. For advice on your situation, consult a licensed attorney in Montana.