I read some papers and I think the explanation is that the driving electric (magnetic) field leads the response by π, thus making the effective permittivity (permeability) negative. But my question is, in resonance the driving force leads the response by π/2, not π, so how does that work?
Exactly at the frequency of a damped resonance, the field leads the response by π/2, which manifests as strong damping.
Above the resonance, the field leads almost by π, which causes nearly opposite signs of the response to the field.
Note we are speaking of "effective parameters", that are obtained by some choice of a homogenization procedure. Depending on the type of structure, this may be a troublesome and ambiguous operation, where sometimes the permittivity/permeability can also depend on the wavevector (spatial dispersion).