$1 = \sqrt{1} = \sqrt{(-1)^2} = \sqrt{-1}\sqrt{-1} = i\cdot i = -1$. I know the mistake is here $\sqrt{(-1)^2} = \sqrt{-1}\sqrt{-1}$ because everything else seems right to me, but I don't understand why?
I guess this is the correct way : $\sqrt{(-1)^2} = |\sqrt{-1}| |\sqrt{-1}|$ ?
In general it is not true that $\sqrt{ab}=\sqrt a \sqrt b$. It is true if a and b are positive reals, but square root behaves strangely for negative numbers (and more generally, complex numbers). This is the error.
The more difficult part of the issue, if you're interested, is figuring out what square root means for complex numbers. And what people do, in the field, is call it a multi valued function. Basically there are two numbers that, when squared, give you your original number. And trying to do algebra objects like that isn't straightforward or predictable, for the purpose of this conversation.