The detention of applicants should be applied in accordance with the underlying principle that a person should not be held in detention for the sole reason that that person is seeking international protection, particularly in accordance with the international legal obligations of the Member States and with Article 31 of the Geneva Convention. In accordance with , minors should, as a rule, not be detained, but should be placed in accommodation with special provisions for minors, including where appropriate in non-custodial, community-based placements. Given the negative impact of detention on minors, such detention could be used, in accordance with Union law, exclusively in exceptional circumstances, where strictly necessary, only as a last resort, for the shortest time possible and never in prison accommodation or any other facility destined for law enforcement purposes. Minors are not to be separated from their parents or care givers, and the principle of family unity should generally lead to the use of adequate alternatives to detention for families with minors, in accommodation suitable for them. Moreover, everything possible must be done to ensure that a viable range of adequate alternatives to detention of minors is available and accessible.