Ideal resistive transition of a superconductor