Energetically-consistent multiscale analysis of fracture in composites materials