The question mark should go within the parentheses (I've copied this answer from a related later question asking much the same thing about exclamation marks and parenthesised text).
The general principle, as Danger Fourpence says, is that a sentence should remain structurally valid if the parenthetical brackets, and everything enclosed by them, are removed. I think it's really a stylistic choice whether I
put a period after the word “parentheses” in that first sentence above. (But if I had, I’d have had to put the second period inside the closing bracket, like this.)
The text within parentheses can be a whole sentence (several sentences?), but I don’t think it’s acceptable for the “enclosing” sentence to continue after the closing bracket, if one or more periods (exclamation/question marks don’t count!) appear in the parenthetical text.
Thus, for example, this statement ends with a period after the final word “here”. (Following the principle outlined above, I can parenthesise multiple sentences, but in this case they aren’t “part of” any enclosing sentence. Thus the second parenthesised sentence ends with a period before the closing bracket, after this word “here”.) Even if there’s no actual “rule” saying I can’t, I wouldn’t replace the word “period” (and corresponding symbol!) in that statement with “comma” and start this supplementary statement with “but even”!