Except for minors accused of violation of an order of the court, any minor accused of any act under federal or State law, or a municipal ordinance that would not be illegal if committed by an adult, cannot be placed in a jail, municipal lockup, detention center or secure correctional facility. Confinement in a county jail of a minor accused of a violation of an order of the court, or of a minor for whom there is reasonable cause to believe that the minor is a person described in subsection (3) of Section 5-105, shall be in accordance with the restrictions set forth in Sections 5-410 and 5-501 of this Act.
705 ILCS 405/1-4.1